@ezeep/ezeep-js 1.0.158 → 1.0.161
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_14.cjs.entry.js +27 -21
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ezp-auth/ezp-auth.js +16 -16
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +4 -4
- package/dist/collection/components/ezp-printing/ezp-printing.js +24 -0
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +5 -1
- package/dist/custom-elements/index.js +28 -22
- package/dist/directives/proxies.ts +1 -1
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/ezp-auth_14.entry.js +27 -21
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_14.entry.js +3 -3
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/p-80d5c308.system.js +1 -1
- package/dist/ezeep/{p-a249450f.entry.js → p-9ff19f99.entry.js} +2 -2
- package/dist/ezeep/{p-1d853ab8.system.entry.js → p-e762ca0f.system.entry.js} +3 -3
- package/dist/types/components/ezp-auth/ezp-auth.d.ts +2 -1
- 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/readme.md +6 -6
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/p-80d5c308.system.js +1 -1
- package/www/build/{p-a249450f.entry.js → p-9ff19f99.entry.js} +2 -2
- package/www/build/{p-1d853ab8.system.entry.js → p-e762ca0f.system.entry.js} +3 -3
- package/www/index.html +1 -1
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_14.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["ezp-auth_14.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64],"logOut":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
21
21
|
});
|
|
@@ -3167,7 +3167,7 @@ let EzpAuth = class {
|
|
|
3167
3167
|
index.registerInstance(this, hostRef);
|
|
3168
3168
|
this.authCancel = index.createEvent(this, "authCancel", 7);
|
|
3169
3169
|
this.authSuccess = index.createEvent(this, "authSuccess", 7);
|
|
3170
|
-
this.
|
|
3170
|
+
this.oauthPopupWindow = null;
|
|
3171
3171
|
this.previousUrl = null;
|
|
3172
3172
|
}
|
|
3173
3173
|
listenDialogAction() {
|
|
@@ -3176,38 +3176,32 @@ let EzpAuth = class {
|
|
|
3176
3176
|
listenDialogClose() {
|
|
3177
3177
|
this.authCancel.emit();
|
|
3178
3178
|
}
|
|
3179
|
+
listenStatusCancel() {
|
|
3180
|
+
this.authCancel.emit();
|
|
3181
|
+
}
|
|
3179
3182
|
openSignInWindow(url, name) {
|
|
3180
3183
|
// remove any existing event listeners
|
|
3181
3184
|
window.removeEventListener('message', this.receiveMessage);
|
|
3182
3185
|
// window features
|
|
3183
3186
|
const strWindowFeatures = 'toolbar=no, menubar=no, width=600, height=7000, top=100, left=100';
|
|
3184
|
-
if (this.
|
|
3187
|
+
if (this.oauthPopupWindow === null || this.oauthPopupWindow.closed) {
|
|
3185
3188
|
/* if the pointer to the window object in memory does not exist
|
|
3186
3189
|
or if such pointer exists but the window was closed */
|
|
3187
|
-
this.
|
|
3190
|
+
this.oauthPopupWindow = window.open(url, name, strWindowFeatures);
|
|
3188
3191
|
}
|
|
3189
3192
|
else if (this.previousUrl !== this.auth.authURI.toString()) {
|
|
3190
3193
|
/* if the resource to load is different,
|
|
3191
3194
|
then we load it in the already opened secondary window and then
|
|
3192
3195
|
we bring such window back on top/in front of its parent window. */
|
|
3193
|
-
this.
|
|
3194
|
-
this.
|
|
3196
|
+
this.oauthPopupWindow = window.open(url, name, strWindowFeatures);
|
|
3197
|
+
this.oauthPopupWindow.focus();
|
|
3195
3198
|
}
|
|
3196
3199
|
else {
|
|
3197
3200
|
/* else the window reference must exist and the window
|
|
3198
3201
|
is not closed; therefore, we can bring it back on top of any other
|
|
3199
3202
|
window with the focus() method. There would be no need to re-create
|
|
3200
3203
|
the window or to reload the referenced resource. */
|
|
3201
|
-
this.
|
|
3202
|
-
}
|
|
3203
|
-
// check if the window was closed and cancel login accordingly
|
|
3204
|
-
if (this.hidelogin) {
|
|
3205
|
-
let checkClosedTimer = setInterval(() => {
|
|
3206
|
-
if (this.windowObjectReference.closed) {
|
|
3207
|
-
this.authCancel.emit();
|
|
3208
|
-
clearInterval(checkClosedTimer);
|
|
3209
|
-
}
|
|
3210
|
-
}, 500);
|
|
3204
|
+
this.oauthPopupWindow.focus();
|
|
3211
3205
|
}
|
|
3212
3206
|
// add the listener for receiving a message from the popup
|
|
3213
3207
|
window.addEventListener('message', (event) => this.receiveMessage(event), false);
|
|
@@ -3232,7 +3226,7 @@ let EzpAuth = class {
|
|
|
3232
3226
|
}
|
|
3233
3227
|
}
|
|
3234
3228
|
render() {
|
|
3235
|
-
return this.hidelogin ? (index.h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true })) : (index.h(index.Host, null, 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" })));
|
|
3229
|
+
return this.hidelogin ? (index.h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : (index.h(index.Host, null, 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" })));
|
|
3236
3230
|
}
|
|
3237
3231
|
};
|
|
3238
3232
|
EzpAuth.style = ezpAuthCss;
|
|
@@ -32803,7 +32797,7 @@ let EzpPrinterSelection = class {
|
|
|
32803
32797
|
fn: this.printService.getPrintStatus,
|
|
32804
32798
|
validate: this.validateData,
|
|
32805
32799
|
interval: this.POLL_INTERVAL,
|
|
32806
|
-
maxAttempts:
|
|
32800
|
+
maxAttempts: 30,
|
|
32807
32801
|
}).catch((err) => {
|
|
32808
32802
|
console.warn(err);
|
|
32809
32803
|
this.printFailed = true;
|
|
@@ -32970,7 +32964,7 @@ let EzpPrinterSelection = class {
|
|
|
32970
32964
|
fn: this.printService.getPrintStatus,
|
|
32971
32965
|
validate: this.validateData,
|
|
32972
32966
|
interval: this.POLL_INTERVAL,
|
|
32973
|
-
maxAttempts:
|
|
32967
|
+
maxAttempts: 30,
|
|
32974
32968
|
}).catch((err) => {
|
|
32975
32969
|
console.log(err);
|
|
32976
32970
|
this.printFailed = true;
|
|
@@ -33005,8 +32999,8 @@ let EzpPrinterSelection = class {
|
|
|
33005
32999
|
else {
|
|
33006
33000
|
format = 'A4';
|
|
33007
33001
|
}
|
|
33008
|
-
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name
|
|
33009
|
-
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name
|
|
33002
|
+
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Name;
|
|
33003
|
+
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Id;
|
|
33010
33004
|
}
|
|
33011
33005
|
/**
|
|
33012
33006
|
*
|
|
@@ -33261,6 +33255,14 @@ let EzpPrinting = class {
|
|
|
33261
33255
|
this.authOpen = true;
|
|
33262
33256
|
}
|
|
33263
33257
|
}
|
|
33258
|
+
async logOut() {
|
|
33259
|
+
localStorage.removeItem('properties');
|
|
33260
|
+
localStorage.removeItem('refreshToken');
|
|
33261
|
+
localStorage.removeItem('access_token');
|
|
33262
|
+
localStorage.removeItem('printer');
|
|
33263
|
+
localStorage.removeItem('isAuthorized');
|
|
33264
|
+
this.printOpen = false;
|
|
33265
|
+
}
|
|
33264
33266
|
checkAuth() {
|
|
33265
33267
|
const printService = new EzpPrintService(this.redirecturi, this.clientid);
|
|
33266
33268
|
let accessToken = authStore.state.accessToken;
|
|
@@ -33730,7 +33732,11 @@ let EzpUserMenu = class {
|
|
|
33730
33732
|
this.userMenuClosure.emit();
|
|
33731
33733
|
};
|
|
33732
33734
|
this.logOut = () => {
|
|
33733
|
-
localStorage.
|
|
33735
|
+
localStorage.removeItem('properties');
|
|
33736
|
+
localStorage.removeItem('refreshToken');
|
|
33737
|
+
localStorage.removeItem('access_token');
|
|
33738
|
+
localStorage.removeItem('printer');
|
|
33739
|
+
localStorage.removeItem('isAuthorized');
|
|
33734
33740
|
authStore.state.isAuthorized = false;
|
|
33735
33741
|
this.logoutEmitter.emit();
|
|
33736
33742
|
};
|
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_14.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
19
|
+
return index.bootstrapLazy([["ezp-auth_14.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64],"logOut":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -4,7 +4,7 @@ import authStore from '../../services/auth';
|
|
|
4
4
|
import i18next from 'i18next';
|
|
5
5
|
export class EzpAuth {
|
|
6
6
|
constructor() {
|
|
7
|
-
this.
|
|
7
|
+
this.oauthPopupWindow = null;
|
|
8
8
|
this.previousUrl = null;
|
|
9
9
|
}
|
|
10
10
|
listenDialogAction() {
|
|
@@ -13,38 +13,32 @@ export class EzpAuth {
|
|
|
13
13
|
listenDialogClose() {
|
|
14
14
|
this.authCancel.emit();
|
|
15
15
|
}
|
|
16
|
+
listenStatusCancel() {
|
|
17
|
+
this.authCancel.emit();
|
|
18
|
+
}
|
|
16
19
|
openSignInWindow(url, name) {
|
|
17
20
|
// remove any existing event listeners
|
|
18
21
|
window.removeEventListener('message', this.receiveMessage);
|
|
19
22
|
// window features
|
|
20
23
|
const strWindowFeatures = 'toolbar=no, menubar=no, width=600, height=7000, top=100, left=100';
|
|
21
|
-
if (this.
|
|
24
|
+
if (this.oauthPopupWindow === null || this.oauthPopupWindow.closed) {
|
|
22
25
|
/* if the pointer to the window object in memory does not exist
|
|
23
26
|
or if such pointer exists but the window was closed */
|
|
24
|
-
this.
|
|
27
|
+
this.oauthPopupWindow = window.open(url, name, strWindowFeatures);
|
|
25
28
|
}
|
|
26
29
|
else if (this.previousUrl !== this.auth.authURI.toString()) {
|
|
27
30
|
/* if the resource to load is different,
|
|
28
31
|
then we load it in the already opened secondary window and then
|
|
29
32
|
we bring such window back on top/in front of its parent window. */
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
33
|
+
this.oauthPopupWindow = window.open(url, name, strWindowFeatures);
|
|
34
|
+
this.oauthPopupWindow.focus();
|
|
32
35
|
}
|
|
33
36
|
else {
|
|
34
37
|
/* else the window reference must exist and the window
|
|
35
38
|
is not closed; therefore, we can bring it back on top of any other
|
|
36
39
|
window with the focus() method. There would be no need to re-create
|
|
37
40
|
the window or to reload the referenced resource. */
|
|
38
|
-
this.
|
|
39
|
-
}
|
|
40
|
-
// check if the window was closed and cancel login accordingly
|
|
41
|
-
if (this.hidelogin) {
|
|
42
|
-
let checkClosedTimer = setInterval(() => {
|
|
43
|
-
if (this.windowObjectReference.closed) {
|
|
44
|
-
this.authCancel.emit();
|
|
45
|
-
clearInterval(checkClosedTimer);
|
|
46
|
-
}
|
|
47
|
-
}, 500);
|
|
41
|
+
this.oauthPopupWindow.focus();
|
|
48
42
|
}
|
|
49
43
|
// add the listener for receiving a message from the popup
|
|
50
44
|
window.addEventListener('message', (event) => this.receiveMessage(event), false);
|
|
@@ -69,7 +63,7 @@ export class EzpAuth {
|
|
|
69
63
|
}
|
|
70
64
|
}
|
|
71
65
|
render() {
|
|
72
|
-
return this.hidelogin ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true })) : (h(Host, null,
|
|
66
|
+
return this.hidelogin ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : (h(Host, null,
|
|
73
67
|
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" })));
|
|
74
68
|
}
|
|
75
69
|
static get is() { return "ezp-auth"; }
|
|
@@ -185,5 +179,11 @@ export class EzpAuth {
|
|
|
185
179
|
"target": undefined,
|
|
186
180
|
"capture": false,
|
|
187
181
|
"passive": false
|
|
182
|
+
}, {
|
|
183
|
+
"name": "statusCancel",
|
|
184
|
+
"method": "listenStatusCancel",
|
|
185
|
+
"target": undefined,
|
|
186
|
+
"capture": false,
|
|
187
|
+
"passive": false
|
|
188
188
|
}]; }
|
|
189
189
|
}
|
|
@@ -112,7 +112,7 @@ export class EzpPrinterSelection {
|
|
|
112
112
|
fn: this.printService.getPrintStatus,
|
|
113
113
|
validate: this.validateData,
|
|
114
114
|
interval: this.POLL_INTERVAL,
|
|
115
|
-
maxAttempts:
|
|
115
|
+
maxAttempts: 30,
|
|
116
116
|
}).catch((err) => {
|
|
117
117
|
console.warn(err);
|
|
118
118
|
this.printFailed = true;
|
|
@@ -281,7 +281,7 @@ export class EzpPrinterSelection {
|
|
|
281
281
|
fn: this.printService.getPrintStatus,
|
|
282
282
|
validate: this.validateData,
|
|
283
283
|
interval: this.POLL_INTERVAL,
|
|
284
|
-
maxAttempts:
|
|
284
|
+
maxAttempts: 30,
|
|
285
285
|
}).catch((err) => {
|
|
286
286
|
console.log(err);
|
|
287
287
|
this.printFailed = true;
|
|
@@ -316,8 +316,8 @@ export class EzpPrinterSelection {
|
|
|
316
316
|
else {
|
|
317
317
|
format = 'A4';
|
|
318
318
|
}
|
|
319
|
-
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name
|
|
320
|
-
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name
|
|
319
|
+
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Name;
|
|
320
|
+
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Id;
|
|
321
321
|
}
|
|
322
322
|
/**
|
|
323
323
|
*
|
|
@@ -80,6 +80,14 @@ export class EzpPrinting {
|
|
|
80
80
|
this.authOpen = true;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
async logOut() {
|
|
84
|
+
localStorage.removeItem('properties');
|
|
85
|
+
localStorage.removeItem('refreshToken');
|
|
86
|
+
localStorage.removeItem('access_token');
|
|
87
|
+
localStorage.removeItem('printer');
|
|
88
|
+
localStorage.removeItem('isAuthorized');
|
|
89
|
+
this.printOpen = false;
|
|
90
|
+
}
|
|
83
91
|
checkAuth() {
|
|
84
92
|
const printService = new EzpPrintService(this.redirecturi, this.clientid);
|
|
85
93
|
let accessToken = authStore.state.accessToken;
|
|
@@ -447,6 +455,22 @@ export class EzpPrinting {
|
|
|
447
455
|
"text": "\nPublic methods",
|
|
448
456
|
"tags": []
|
|
449
457
|
}
|
|
458
|
+
},
|
|
459
|
+
"logOut": {
|
|
460
|
+
"complexType": {
|
|
461
|
+
"signature": "() => Promise<void>",
|
|
462
|
+
"parameters": [],
|
|
463
|
+
"references": {
|
|
464
|
+
"Promise": {
|
|
465
|
+
"location": "global"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"return": "Promise<void>"
|
|
469
|
+
},
|
|
470
|
+
"docs": {
|
|
471
|
+
"text": "",
|
|
472
|
+
"tags": []
|
|
473
|
+
}
|
|
450
474
|
}
|
|
451
475
|
}; }
|
|
452
476
|
static get listeners() { return [{
|
|
@@ -29,7 +29,11 @@ export class EzpUserMenu {
|
|
|
29
29
|
this.userMenuClosure.emit();
|
|
30
30
|
};
|
|
31
31
|
this.logOut = () => {
|
|
32
|
-
localStorage.
|
|
32
|
+
localStorage.removeItem('properties');
|
|
33
|
+
localStorage.removeItem('refreshToken');
|
|
34
|
+
localStorage.removeItem('access_token');
|
|
35
|
+
localStorage.removeItem('printer');
|
|
36
|
+
localStorage.removeItem('isAuthorized');
|
|
33
37
|
authStore.state.isAuthorized = false;
|
|
34
38
|
this.logoutEmitter.emit();
|
|
35
39
|
};
|
|
@@ -3178,7 +3178,7 @@ let EzpAuth$1 = class extends HTMLElement {
|
|
|
3178
3178
|
this.__attachShadow();
|
|
3179
3179
|
this.authCancel = createEvent(this, "authCancel", 7);
|
|
3180
3180
|
this.authSuccess = createEvent(this, "authSuccess", 7);
|
|
3181
|
-
this.
|
|
3181
|
+
this.oauthPopupWindow = null;
|
|
3182
3182
|
this.previousUrl = null;
|
|
3183
3183
|
}
|
|
3184
3184
|
listenDialogAction() {
|
|
@@ -3187,38 +3187,32 @@ let EzpAuth$1 = class extends HTMLElement {
|
|
|
3187
3187
|
listenDialogClose() {
|
|
3188
3188
|
this.authCancel.emit();
|
|
3189
3189
|
}
|
|
3190
|
+
listenStatusCancel() {
|
|
3191
|
+
this.authCancel.emit();
|
|
3192
|
+
}
|
|
3190
3193
|
openSignInWindow(url, name) {
|
|
3191
3194
|
// remove any existing event listeners
|
|
3192
3195
|
window.removeEventListener('message', this.receiveMessage);
|
|
3193
3196
|
// window features
|
|
3194
3197
|
const strWindowFeatures = 'toolbar=no, menubar=no, width=600, height=7000, top=100, left=100';
|
|
3195
|
-
if (this.
|
|
3198
|
+
if (this.oauthPopupWindow === null || this.oauthPopupWindow.closed) {
|
|
3196
3199
|
/* if the pointer to the window object in memory does not exist
|
|
3197
3200
|
or if such pointer exists but the window was closed */
|
|
3198
|
-
this.
|
|
3201
|
+
this.oauthPopupWindow = window.open(url, name, strWindowFeatures);
|
|
3199
3202
|
}
|
|
3200
3203
|
else if (this.previousUrl !== this.auth.authURI.toString()) {
|
|
3201
3204
|
/* if the resource to load is different,
|
|
3202
3205
|
then we load it in the already opened secondary window and then
|
|
3203
3206
|
we bring such window back on top/in front of its parent window. */
|
|
3204
|
-
this.
|
|
3205
|
-
this.
|
|
3207
|
+
this.oauthPopupWindow = window.open(url, name, strWindowFeatures);
|
|
3208
|
+
this.oauthPopupWindow.focus();
|
|
3206
3209
|
}
|
|
3207
3210
|
else {
|
|
3208
3211
|
/* else the window reference must exist and the window
|
|
3209
3212
|
is not closed; therefore, we can bring it back on top of any other
|
|
3210
3213
|
window with the focus() method. There would be no need to re-create
|
|
3211
3214
|
the window or to reload the referenced resource. */
|
|
3212
|
-
this.
|
|
3213
|
-
}
|
|
3214
|
-
// check if the window was closed and cancel login accordingly
|
|
3215
|
-
if (this.hidelogin) {
|
|
3216
|
-
let checkClosedTimer = setInterval(() => {
|
|
3217
|
-
if (this.windowObjectReference.closed) {
|
|
3218
|
-
this.authCancel.emit();
|
|
3219
|
-
clearInterval(checkClosedTimer);
|
|
3220
|
-
}
|
|
3221
|
-
}, 500);
|
|
3215
|
+
this.oauthPopupWindow.focus();
|
|
3222
3216
|
}
|
|
3223
3217
|
// add the listener for receiving a message from the popup
|
|
3224
3218
|
window.addEventListener('message', (event) => this.receiveMessage(event), false);
|
|
@@ -3243,7 +3237,7 @@ let EzpAuth$1 = class extends HTMLElement {
|
|
|
3243
3237
|
}
|
|
3244
3238
|
}
|
|
3245
3239
|
render() {
|
|
3246
|
-
return this.hidelogin ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true })) : (h(Host, null, 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" })));
|
|
3240
|
+
return this.hidelogin ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : (h(Host, null, 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" })));
|
|
3247
3241
|
}
|
|
3248
3242
|
static get style() { return ezpAuthCss; }
|
|
3249
3243
|
};
|
|
@@ -32826,7 +32820,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32826
32820
|
fn: this.printService.getPrintStatus,
|
|
32827
32821
|
validate: this.validateData,
|
|
32828
32822
|
interval: this.POLL_INTERVAL,
|
|
32829
|
-
maxAttempts:
|
|
32823
|
+
maxAttempts: 30,
|
|
32830
32824
|
}).catch((err) => {
|
|
32831
32825
|
console.warn(err);
|
|
32832
32826
|
this.printFailed = true;
|
|
@@ -32993,7 +32987,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32993
32987
|
fn: this.printService.getPrintStatus,
|
|
32994
32988
|
validate: this.validateData,
|
|
32995
32989
|
interval: this.POLL_INTERVAL,
|
|
32996
|
-
maxAttempts:
|
|
32990
|
+
maxAttempts: 30,
|
|
32997
32991
|
}).catch((err) => {
|
|
32998
32992
|
console.log(err);
|
|
32999
32993
|
this.printFailed = true;
|
|
@@ -33028,8 +33022,8 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33028
33022
|
else {
|
|
33029
33023
|
format = 'A4';
|
|
33030
33024
|
}
|
|
33031
|
-
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name
|
|
33032
|
-
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name
|
|
33025
|
+
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Name;
|
|
33026
|
+
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Id;
|
|
33033
33027
|
}
|
|
33034
33028
|
/**
|
|
33035
33029
|
*
|
|
@@ -33286,6 +33280,14 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33286
33280
|
this.authOpen = true;
|
|
33287
33281
|
}
|
|
33288
33282
|
}
|
|
33283
|
+
async logOut() {
|
|
33284
|
+
localStorage.removeItem('properties');
|
|
33285
|
+
localStorage.removeItem('refreshToken');
|
|
33286
|
+
localStorage.removeItem('access_token');
|
|
33287
|
+
localStorage.removeItem('printer');
|
|
33288
|
+
localStorage.removeItem('isAuthorized');
|
|
33289
|
+
this.printOpen = false;
|
|
33290
|
+
}
|
|
33289
33291
|
checkAuth() {
|
|
33290
33292
|
const printService = new EzpPrintService(this.redirecturi, this.clientid);
|
|
33291
33293
|
let accessToken = authStore.state.accessToken;
|
|
@@ -33767,7 +33769,11 @@ let EzpUserMenu$1 = class extends HTMLElement {
|
|
|
33767
33769
|
this.userMenuClosure.emit();
|
|
33768
33770
|
};
|
|
33769
33771
|
this.logOut = () => {
|
|
33770
|
-
localStorage.
|
|
33772
|
+
localStorage.removeItem('properties');
|
|
33773
|
+
localStorage.removeItem('refreshToken');
|
|
33774
|
+
localStorage.removeItem('access_token');
|
|
33775
|
+
localStorage.removeItem('printer');
|
|
33776
|
+
localStorage.removeItem('isAuthorized');
|
|
33771
33777
|
authStore.state.isAuthorized = false;
|
|
33772
33778
|
this.logoutEmitter.emit();
|
|
33773
33779
|
};
|
|
@@ -33828,7 +33834,7 @@ let EzpUserMenu$1 = class extends HTMLElement {
|
|
|
33828
33834
|
};
|
|
33829
33835
|
|
|
33830
33836
|
globalScripts();
|
|
33831
|
-
const EzpAuth = /*@__PURE__*/proxyCustomElement(EzpAuth$1, [1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]]);
|
|
33837
|
+
const EzpAuth = /*@__PURE__*/proxyCustomElement(EzpAuth$1, [1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]]);
|
|
33832
33838
|
const EzpBackdrop = /*@__PURE__*/proxyCustomElement(EzpBackdrop$1, [1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]]);
|
|
33833
33839
|
const EzpDialog = /*@__PURE__*/proxyCustomElement(EzpDialog$1, [1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}]);
|
|
33834
33840
|
const EzpIcon = /*@__PURE__*/proxyCustomElement(EzpIcon$1, [1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}]);
|
|
@@ -167,7 +167,7 @@ export class EzpPrinterSelection {
|
|
|
167
167
|
export declare interface EzpPrinting extends Components.EzpPrinting {}
|
|
168
168
|
@ProxyCmp({
|
|
169
169
|
inputs: ['appearance', 'authapihosturl', 'clientid', 'custom', 'fileid', 'filename', 'filetype', 'fileurl', 'hidelogin', 'hidemenu', 'language', 'printapihosturl', 'redirecturi', 'theme', 'trigger'],
|
|
170
|
-
methods: ['open']
|
|
170
|
+
methods: ['open', 'logOut']
|
|
171
171
|
})
|
|
172
172
|
@Component({
|
|
173
173
|
selector: 'ezp-printing',
|
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_14",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
18
|
+
return bootstrapLazy([["ezp-auth_14",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64],"logOut":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"loading":[32],"options":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
19
19
|
});
|
|
@@ -3163,7 +3163,7 @@ let EzpAuth = class {
|
|
|
3163
3163
|
registerInstance(this, hostRef);
|
|
3164
3164
|
this.authCancel = createEvent(this, "authCancel", 7);
|
|
3165
3165
|
this.authSuccess = createEvent(this, "authSuccess", 7);
|
|
3166
|
-
this.
|
|
3166
|
+
this.oauthPopupWindow = null;
|
|
3167
3167
|
this.previousUrl = null;
|
|
3168
3168
|
}
|
|
3169
3169
|
listenDialogAction() {
|
|
@@ -3172,38 +3172,32 @@ let EzpAuth = class {
|
|
|
3172
3172
|
listenDialogClose() {
|
|
3173
3173
|
this.authCancel.emit();
|
|
3174
3174
|
}
|
|
3175
|
+
listenStatusCancel() {
|
|
3176
|
+
this.authCancel.emit();
|
|
3177
|
+
}
|
|
3175
3178
|
openSignInWindow(url, name) {
|
|
3176
3179
|
// remove any existing event listeners
|
|
3177
3180
|
window.removeEventListener('message', this.receiveMessage);
|
|
3178
3181
|
// window features
|
|
3179
3182
|
const strWindowFeatures = 'toolbar=no, menubar=no, width=600, height=7000, top=100, left=100';
|
|
3180
|
-
if (this.
|
|
3183
|
+
if (this.oauthPopupWindow === null || this.oauthPopupWindow.closed) {
|
|
3181
3184
|
/* if the pointer to the window object in memory does not exist
|
|
3182
3185
|
or if such pointer exists but the window was closed */
|
|
3183
|
-
this.
|
|
3186
|
+
this.oauthPopupWindow = window.open(url, name, strWindowFeatures);
|
|
3184
3187
|
}
|
|
3185
3188
|
else if (this.previousUrl !== this.auth.authURI.toString()) {
|
|
3186
3189
|
/* if the resource to load is different,
|
|
3187
3190
|
then we load it in the already opened secondary window and then
|
|
3188
3191
|
we bring such window back on top/in front of its parent window. */
|
|
3189
|
-
this.
|
|
3190
|
-
this.
|
|
3192
|
+
this.oauthPopupWindow = window.open(url, name, strWindowFeatures);
|
|
3193
|
+
this.oauthPopupWindow.focus();
|
|
3191
3194
|
}
|
|
3192
3195
|
else {
|
|
3193
3196
|
/* else the window reference must exist and the window
|
|
3194
3197
|
is not closed; therefore, we can bring it back on top of any other
|
|
3195
3198
|
window with the focus() method. There would be no need to re-create
|
|
3196
3199
|
the window or to reload the referenced resource. */
|
|
3197
|
-
this.
|
|
3198
|
-
}
|
|
3199
|
-
// check if the window was closed and cancel login accordingly
|
|
3200
|
-
if (this.hidelogin) {
|
|
3201
|
-
let checkClosedTimer = setInterval(() => {
|
|
3202
|
-
if (this.windowObjectReference.closed) {
|
|
3203
|
-
this.authCancel.emit();
|
|
3204
|
-
clearInterval(checkClosedTimer);
|
|
3205
|
-
}
|
|
3206
|
-
}, 500);
|
|
3200
|
+
this.oauthPopupWindow.focus();
|
|
3207
3201
|
}
|
|
3208
3202
|
// add the listener for receiving a message from the popup
|
|
3209
3203
|
window.addEventListener('message', (event) => this.receiveMessage(event), false);
|
|
@@ -3228,7 +3222,7 @@ let EzpAuth = class {
|
|
|
3228
3222
|
}
|
|
3229
3223
|
}
|
|
3230
3224
|
render() {
|
|
3231
|
-
return this.hidelogin ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true })) : (h(Host, null, 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" })));
|
|
3225
|
+
return this.hidelogin ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : (h(Host, null, 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" })));
|
|
3232
3226
|
}
|
|
3233
3227
|
};
|
|
3234
3228
|
EzpAuth.style = ezpAuthCss;
|
|
@@ -32799,7 +32793,7 @@ let EzpPrinterSelection = class {
|
|
|
32799
32793
|
fn: this.printService.getPrintStatus,
|
|
32800
32794
|
validate: this.validateData,
|
|
32801
32795
|
interval: this.POLL_INTERVAL,
|
|
32802
|
-
maxAttempts:
|
|
32796
|
+
maxAttempts: 30,
|
|
32803
32797
|
}).catch((err) => {
|
|
32804
32798
|
console.warn(err);
|
|
32805
32799
|
this.printFailed = true;
|
|
@@ -32966,7 +32960,7 @@ let EzpPrinterSelection = class {
|
|
|
32966
32960
|
fn: this.printService.getPrintStatus,
|
|
32967
32961
|
validate: this.validateData,
|
|
32968
32962
|
interval: this.POLL_INTERVAL,
|
|
32969
|
-
maxAttempts:
|
|
32963
|
+
maxAttempts: 30,
|
|
32970
32964
|
}).catch((err) => {
|
|
32971
32965
|
console.log(err);
|
|
32972
32966
|
this.printFailed = true;
|
|
@@ -33001,8 +32995,8 @@ let EzpPrinterSelection = class {
|
|
|
33001
32995
|
else {
|
|
33002
32996
|
format = 'A4';
|
|
33003
32997
|
}
|
|
33004
|
-
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name
|
|
33005
|
-
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name
|
|
32998
|
+
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Name;
|
|
32999
|
+
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name.includes(format)).Id;
|
|
33006
33000
|
}
|
|
33007
33001
|
/**
|
|
33008
33002
|
*
|
|
@@ -33257,6 +33251,14 @@ let EzpPrinting = class {
|
|
|
33257
33251
|
this.authOpen = true;
|
|
33258
33252
|
}
|
|
33259
33253
|
}
|
|
33254
|
+
async logOut() {
|
|
33255
|
+
localStorage.removeItem('properties');
|
|
33256
|
+
localStorage.removeItem('refreshToken');
|
|
33257
|
+
localStorage.removeItem('access_token');
|
|
33258
|
+
localStorage.removeItem('printer');
|
|
33259
|
+
localStorage.removeItem('isAuthorized');
|
|
33260
|
+
this.printOpen = false;
|
|
33261
|
+
}
|
|
33260
33262
|
checkAuth() {
|
|
33261
33263
|
const printService = new EzpPrintService(this.redirecturi, this.clientid);
|
|
33262
33264
|
let accessToken = authStore.state.accessToken;
|
|
@@ -33726,7 +33728,11 @@ let EzpUserMenu = class {
|
|
|
33726
33728
|
this.userMenuClosure.emit();
|
|
33727
33729
|
};
|
|
33728
33730
|
this.logOut = () => {
|
|
33729
|
-
localStorage.
|
|
33731
|
+
localStorage.removeItem('properties');
|
|
33732
|
+
localStorage.removeItem('refreshToken');
|
|
33733
|
+
localStorage.removeItem('access_token');
|
|
33734
|
+
localStorage.removeItem('printer');
|
|
33735
|
+
localStorage.removeItem('isAuthorized');
|
|
33730
33736
|
authStore.state.isAuthorized = false;
|
|
33731
33737
|
this.logoutEmitter.emit();
|
|
33732
33738
|
};
|