@ezeep/ezeep-js 1.0.157 → 1.0.160
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 +2 -2
- package/dist/cjs/ezp-auth_14.cjs.entry.js +30 -25
- package/dist/cjs/{index-d547be4e.js → index-baa7689a.js} +8 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/ezp-auth/ezp-auth.js +16 -16
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +5 -6
- package/dist/collection/components/ezp-printing/ezp-printing.js +24 -0
- package/dist/collection/components/ezp-upload/ezp-upload.css +1 -0
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +5 -1
- package/dist/custom-elements/index.js +30 -25
- package/dist/directives/proxies.ts +1 -1
- package/dist/esm/ezeep.js +2 -2
- package/dist/esm/ezp-auth_14.entry.js +30 -25
- package/dist/esm/{index-485041ac.js → index-18d4bf15.js} +8 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_14.entry.js +3 -3
- package/dist/esm-es5/index-18d4bf15.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/ezeep.js +1 -1
- package/dist/ezeep/p-80d5c308.system.js +1 -0
- package/dist/ezeep/{p-f310e367.entry.js → p-9ff19f99.entry.js} +2 -2
- package/dist/ezeep/p-d9b69b53.js +1 -0
- package/dist/ezeep/{p-e149771a.system.entry.js → p-e762ca0f.system.entry.js} +3 -3
- package/{www/build/p-cc2bb341.system.js → dist/ezeep/p-f96ca6a7.system.js} +1 -1
- package/dist/types/components/ezp-auth/ezp-auth.d.ts +2 -1
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +1 -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/www/build/ezeep.esm.js +1 -1
- package/www/build/ezeep.js +1 -1
- package/www/build/p-80d5c308.system.js +1 -0
- package/www/build/{p-f310e367.entry.js → p-9ff19f99.entry.js} +2 -2
- package/www/build/p-d9b69b53.js +1 -0
- package/www/build/{p-e149771a.system.entry.js → p-e762ca0f.system.entry.js} +3 -3
- package/{dist/ezeep/p-cc2bb341.system.js → www/build/p-f96ca6a7.system.js} +1 -1
- package/www/index.html +1 -1
- package/dist/esm-es5/index-485041ac.js +0 -1
- package/dist/ezeep/p-d4dae139.system.js +0 -1
- package/dist/ezeep/p-fa808a39.js +0 -1
- package/www/build/p-d4dae139.system.js +0 -1
- package/www/build/p-fa808a39.js +0 -1
package/dist/cjs/ezeep.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-baa7689a.js');
|
|
4
4
|
const appGlobals = require('./app-globals-53afb196.js');
|
|
5
5
|
|
|
6
6
|
/*
|
|
@@ -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
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-baa7689a.js');
|
|
6
6
|
|
|
7
7
|
const appendToMap = (map, propName, value) => {
|
|
8
8
|
const items = map.get(propName);
|
|
@@ -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
|
*
|
|
@@ -33014,8 +33008,7 @@ let EzpPrinterSelection = class {
|
|
|
33014
33008
|
*
|
|
33015
33009
|
*/
|
|
33016
33010
|
/** Description... */
|
|
33017
|
-
async
|
|
33018
|
-
this.loading = true;
|
|
33011
|
+
async connectedCallback() {
|
|
33019
33012
|
this.getPropertiesFromLocalStorage();
|
|
33020
33013
|
this.getUserInfo();
|
|
33021
33014
|
this.printService = new EzpPrintService(this.redirectURI, this.clientID);
|
|
@@ -33262,6 +33255,14 @@ let EzpPrinting = class {
|
|
|
33262
33255
|
this.authOpen = true;
|
|
33263
33256
|
}
|
|
33264
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
|
+
}
|
|
33265
33266
|
checkAuth() {
|
|
33266
33267
|
const printService = new EzpPrintService(this.redirecturi, this.clientid);
|
|
33267
33268
|
let accessToken = authStore.state.accessToken;
|
|
@@ -33638,7 +33639,7 @@ let EzpTextButton = class {
|
|
|
33638
33639
|
};
|
|
33639
33640
|
EzpTextButton.style = ezpTextButtonCss;
|
|
33640
33641
|
|
|
33641
|
-
const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-color-foreground-tertiary));border-radius:3px;color:var(--ezp-color-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-color-theme-translucent);--ezp-upload-border-color:var(--ezp-color-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-color-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-color-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}";
|
|
33642
|
+
const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-color-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-color-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-color-theme-translucent);--ezp-upload-border-color:var(--ezp-color-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-color-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-color-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}";
|
|
33642
33643
|
|
|
33643
33644
|
let EzpUpload = class {
|
|
33644
33645
|
constructor(hostRef) {
|
|
@@ -33731,7 +33732,11 @@ let EzpUserMenu = class {
|
|
|
33731
33732
|
this.userMenuClosure.emit();
|
|
33732
33733
|
};
|
|
33733
33734
|
this.logOut = () => {
|
|
33734
|
-
localStorage.
|
|
33735
|
+
localStorage.removeItem('properties');
|
|
33736
|
+
localStorage.removeItem('refreshToken');
|
|
33737
|
+
localStorage.removeItem('access_token');
|
|
33738
|
+
localStorage.removeItem('printer');
|
|
33739
|
+
localStorage.removeItem('isAuthorized');
|
|
33735
33740
|
authStore.state.isAuthorized = false;
|
|
33736
33741
|
this.logoutEmitter.emit();
|
|
33737
33742
|
};
|
|
@@ -1172,6 +1172,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1172
1172
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1173
1173
|
}
|
|
1174
1174
|
endNewInstance();
|
|
1175
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1175
1176
|
}
|
|
1176
1177
|
if (Cstr.style) {
|
|
1177
1178
|
// this component has styles but we haven't registered them yet
|
|
@@ -1200,6 +1201,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1200
1201
|
schedule();
|
|
1201
1202
|
}
|
|
1202
1203
|
};
|
|
1204
|
+
const fireConnectedCallback = (instance) => {
|
|
1205
|
+
{
|
|
1206
|
+
safeCall(instance, 'connectedCallback');
|
|
1207
|
+
}
|
|
1208
|
+
};
|
|
1203
1209
|
const connectedCallback = (elm) => {
|
|
1204
1210
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1205
1211
|
const hostRef = getHostRef(elm);
|
|
@@ -1243,6 +1249,8 @@ const connectedCallback = (elm) => {
|
|
|
1243
1249
|
// reattach any event listeners to the host
|
|
1244
1250
|
// since they would have been removed when disconnected
|
|
1245
1251
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1252
|
+
// fire off connectedCallback() on component instance
|
|
1253
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1246
1254
|
}
|
|
1247
1255
|
endConnected();
|
|
1248
1256
|
}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-baa7689a.js');
|
|
6
6
|
const appGlobals = require('./app-globals-53afb196.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -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
|
*
|
|
@@ -325,8 +325,7 @@ export class EzpPrinterSelection {
|
|
|
325
325
|
*
|
|
326
326
|
*/
|
|
327
327
|
/** Description... */
|
|
328
|
-
async
|
|
329
|
-
this.loading = true;
|
|
328
|
+
async connectedCallback() {
|
|
330
329
|
this.getPropertiesFromLocalStorage();
|
|
331
330
|
this.getUserInfo();
|
|
332
331
|
this.printService = new EzpPrintService(this.redirectURI, this.clientID);
|
|
@@ -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 [{
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
background: var(--ezp-upload-background, transparent);
|
|
9
9
|
border: 1px dashed var(--ezp-upload-border-color, var(--ezp-color-foreground-tertiary));
|
|
10
10
|
border-radius: 3px;
|
|
11
|
+
box-sizing: border-box;
|
|
11
12
|
color: var(--ezp-color-foreground-primary);
|
|
12
13
|
display: grid;
|
|
13
14
|
grid-template: auto/minmax(auto, 280px);
|
|
@@ -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
|
*
|
|
@@ -33037,8 +33031,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33037
33031
|
*
|
|
33038
33032
|
*/
|
|
33039
33033
|
/** Description... */
|
|
33040
|
-
async
|
|
33041
|
-
this.loading = true;
|
|
33034
|
+
async connectedCallback() {
|
|
33042
33035
|
this.getPropertiesFromLocalStorage();
|
|
33043
33036
|
this.getUserInfo();
|
|
33044
33037
|
this.printService = new EzpPrintService(this.redirectURI, this.clientID);
|
|
@@ -33287,6 +33280,14 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33287
33280
|
this.authOpen = true;
|
|
33288
33281
|
}
|
|
33289
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
|
+
}
|
|
33290
33291
|
checkAuth() {
|
|
33291
33292
|
const printService = new EzpPrintService(this.redirecturi, this.clientid);
|
|
33292
33293
|
let accessToken = authStore.state.accessToken;
|
|
@@ -33671,7 +33672,7 @@ let EzpTextButton$1 = class extends HTMLElement {
|
|
|
33671
33672
|
static get style() { return ezpTextButtonCss; }
|
|
33672
33673
|
};
|
|
33673
33674
|
|
|
33674
|
-
const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-color-foreground-tertiary));border-radius:3px;color:var(--ezp-color-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-color-theme-translucent);--ezp-upload-border-color:var(--ezp-color-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-color-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-color-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}";
|
|
33675
|
+
const ezpUploadCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-color-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-color-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-color-theme-translucent);--ezp-upload-border-color:var(--ezp-color-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-color-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-color-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}";
|
|
33675
33676
|
|
|
33676
33677
|
let EzpUpload$1 = class extends HTMLElement {
|
|
33677
33678
|
constructor() {
|
|
@@ -33768,7 +33769,11 @@ let EzpUserMenu$1 = class extends HTMLElement {
|
|
|
33768
33769
|
this.userMenuClosure.emit();
|
|
33769
33770
|
};
|
|
33770
33771
|
this.logOut = () => {
|
|
33771
|
-
localStorage.
|
|
33772
|
+
localStorage.removeItem('properties');
|
|
33773
|
+
localStorage.removeItem('refreshToken');
|
|
33774
|
+
localStorage.removeItem('access_token');
|
|
33775
|
+
localStorage.removeItem('printer');
|
|
33776
|
+
localStorage.removeItem('isAuthorized');
|
|
33772
33777
|
authStore.state.isAuthorized = false;
|
|
33773
33778
|
this.logoutEmitter.emit();
|
|
33774
33779
|
};
|
|
@@ -33829,7 +33834,7 @@ let EzpUserMenu$1 = class extends HTMLElement {
|
|
|
33829
33834
|
};
|
|
33830
33835
|
|
|
33831
33836
|
globalScripts();
|
|
33832
|
-
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"]]]);
|
|
33833
33838
|
const EzpBackdrop = /*@__PURE__*/proxyCustomElement(EzpBackdrop$1, [1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]]);
|
|
33834
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]}]);
|
|
33835
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-18d4bf15.js';
|
|
2
2
|
import { g as globalScripts } from './app-globals-28960cbc.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
@@ -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
|
});
|