@ezeep/ezeep-js 1.0.316 → 1.0.323
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_16.cjs.entry.js +137 -16
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ezp-auth/ezp-auth.js +99 -10
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.css +7 -0
- package/dist/collection/services/auth.js +21 -0
- package/dist/collection/services/print-job.js +14 -2
- package/dist/components/auth.js +1 -1
- package/dist/components/ezp-auth2.js +1 -1
- package/dist/components/ezp-printer-selection2.js +1 -1
- package/dist/components/ezp-user-menu2.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/ezp-auth_16.entry.js +137 -16
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_16.entry.js +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/{p-f348cbab.system.entry.js → p-5a755dc7.system.entry.js} +2 -2
- package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
- package/dist/ezeep/p-f567a8c5.entry.js +1 -0
- package/dist/types/components/ezp-auth/ezp-auth.d.ts +34 -0
- package/dist/types/services/auth.d.ts +13 -1
- package/package.json +3 -2
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/p-570b689d.js +1 -0
- package/www/build/{p-f348cbab.system.entry.js → p-5a755dc7.system.entry.js} +2 -2
- package/www/build/p-DCznw2Ee.system.js +1 -1
- package/www/build/p-f567a8c5.entry.js +1 -0
- package/www/data/locales/de.json +2 -2
- package/www/data/locales/en.json +2 -2
- package/www/index.html +1 -1
- package/dist/ezeep/p-98a77798.entry.js +0 -1
- package/www/build/p-4f218598.js +0 -1
- package/www/build/p-98a77798.entry.js +0 -1
|
@@ -11,6 +11,13 @@ export declare class EzpAuth {
|
|
|
11
11
|
accessToken: string;
|
|
12
12
|
/** True when the browser blocked the sign-in popup; shows the popup-blocked dialog. */
|
|
13
13
|
isPopupBlocked: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* True while a host-supplied `code` is still waiting to be exchanged because
|
|
16
|
+
* the attempt failed for a reason other than the code being refused. Until
|
|
17
|
+
* it is settled, nothing may proceed on a stored session: the code may be
|
|
18
|
+
* for a different account than the one stored.
|
|
19
|
+
*/
|
|
20
|
+
codeExchangePending: boolean;
|
|
14
21
|
authCancel: EventEmitter<MouseEvent>;
|
|
15
22
|
authSuccess: EventEmitter<void>;
|
|
16
23
|
userCancel: EventEmitter<void>;
|
|
@@ -35,6 +42,33 @@ export declare class EzpAuth {
|
|
|
35
42
|
/** "Try again" on the popup-blocked dialog: runs from a user gesture, so the popup may now open. */
|
|
36
43
|
handleRetry(): void;
|
|
37
44
|
receiveMessage: (event: MessageEvent) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Exchange the code in the auth store for tokens and, only if that worked,
|
|
47
|
+
* move on to the print step. A rejected code or an unreachable token
|
|
48
|
+
* endpoint leaves the sign-in screen up so the user can try again — moving
|
|
49
|
+
* on regardless opened the print options without a token, where every call
|
|
50
|
+
* failed and the user was told they had no printers.
|
|
51
|
+
*
|
|
52
|
+
* Resolves to what happened: `signed-in`; `rejected` when the endpoint
|
|
53
|
+
* refused the code itself; `failed` when the attempt did not get that far
|
|
54
|
+
* (network or server error), so the code is still unsettled.
|
|
55
|
+
*/
|
|
56
|
+
private exchangeCode;
|
|
57
|
+
/**
|
|
58
|
+
* Exchange the `code` handed in by the host.
|
|
59
|
+
*
|
|
60
|
+
* - Signed in: done, the events are out.
|
|
61
|
+
* - Rejected (`invalid_grant`): the code is dead. A stored session is kept —
|
|
62
|
+
* after a reload the host still passes the long-spent code that session
|
|
63
|
+
* came from, and that cannot be told apart from any other dead code.
|
|
64
|
+
* - Failed (token endpoint unreachable, server error): nothing is known. The
|
|
65
|
+
* code may be for a different account than a stored session, so carrying
|
|
66
|
+
* on with that session could let one person print as another. Sign-in
|
|
67
|
+
* stops on the dialog instead, where "Sign in" tries the code again.
|
|
68
|
+
*/
|
|
69
|
+
private exchangeHostCode;
|
|
70
|
+
/** "Sign in" while the host's code is unsettled: try the code again. */
|
|
71
|
+
private retryHostCode;
|
|
38
72
|
componentWillLoad(): Promise<void>;
|
|
39
73
|
render(): any;
|
|
40
74
|
}
|
|
@@ -23,12 +23,24 @@ export declare class EzpAuthorizationService {
|
|
|
23
23
|
* after a reload) and the isAuthorized hint are persisted.
|
|
24
24
|
*/
|
|
25
25
|
private persistTokens;
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Exchange the authorization code for tokens. Three outcomes, which callers
|
|
28
|
+
* must be able to tell apart:
|
|
29
|
+
*
|
|
30
|
+
* - resolves `true`: tokens were issued and stored;
|
|
31
|
+
* - resolves `false`: the endpoint refused *the code* (`invalid_grant` —
|
|
32
|
+
* expired, already used, wrong verifier). Trying again cannot help;
|
|
33
|
+
* - rejects: nothing is known about the code — the request never completed,
|
|
34
|
+
* or the endpoint answered with any other error. Trying again may work.
|
|
35
|
+
*/
|
|
36
|
+
getAccessToken(): Promise<boolean>;
|
|
27
37
|
refreshTokens(): Promise<void>;
|
|
28
38
|
revokeRefreshToken(): void;
|
|
29
39
|
}
|
|
30
40
|
declare const authStore: import("@stencil/store").ObservableMap<{
|
|
31
41
|
code: string;
|
|
42
|
+
/** The authorization code the current session was obtained with (in memory only). */
|
|
43
|
+
exchangedCode: string;
|
|
32
44
|
codeVerifier: string;
|
|
33
45
|
accessToken: string;
|
|
34
46
|
refreshToken: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezeep/ezeep-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.323",
|
|
4
4
|
"description": "A JavaScript library to enable easy and fast printing on any web application uising ezeep Blue.",
|
|
5
5
|
"author": "Thinprint GmbH",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"dist/",
|
|
21
21
|
"loader/",
|
|
22
|
-
"www/"
|
|
22
|
+
"www/",
|
|
23
|
+
"!dist/**/testing/"
|
|
23
24
|
],
|
|
24
25
|
"scripts": {
|
|
25
26
|
"build": "stencil build --docs",
|
package/www/build/ezeep.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,B as
|
|
1
|
+
import{p as e,B as n,c as t,w as i,N as l,H as a,b as r}from"./p-BButrLnB.js";export{s as setNonce}from"./p-BButrLnB.js";import{g as o}from"./p-C0WTlb31.js";var p=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const t=n.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&t.appendChild(i[e].cloneNode(!0));return t}};(()=>{n.isDev&&!n.isTesting&&t("Running in development mode."),n.cloneNodeFix&&p(a.prototype);const s=n.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${l}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===l)):null,r=import.meta.url,o=n.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)})().then((async e=>(await o(),r([["p-f567a8c5",[[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}],[1,"ezp-printer-selection",{clientID:[1,"client-i-d"],redirectURI:[1,"redirect-u-r-i"],filename:[1025],fileurl:[1],filetype:[1025],fileid:[1025],files:[16],hidemenu:[4],hideheader:[4],seamless:[4],loading:[32],printProcessing:[32],pageRangeInvalid:[32],uploading:[32],preparingUpload:[32],printSuccess:[32],printFailed:[32],printTimedOut:[32],notSupported:[32],noPrinters:[32],hubDriverError:[32],userMenuOpen:[32],printStopped:[32],firstVisibleFile:[32],userName:[32],printers:[32],selectedPrinter:[32],printerConfig:[32],selectedPrinterConfig:[32],selectedProperties:[32],loadingPrinterConfig:[32],paperid:[32],currentFileIndex:[32],totalFiles:[32],failedFiles:[32],successfulFiles:[32],partialSuccess:[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32],isPopupBlocked:[32],codeExchangePending:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{selectedFiles:[32],dragging:[32],firstVisibleFile:[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{heading:[1],description:[1],action:[1],iconName:[1,"icon-name"],iconSize:[1,"icon-size"],iconFramed:[4,"icon-framed"],instance:[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{name:[1],open:[1028]},null,{open:[{watchOpen:0}]}],[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]},null,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}],[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}],[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},null,{value:[{watchValue:0}]}],[1,"ezp-status",{description:[1],subtext:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}],[1,"ezp-file-name",{name:[1],level:[1],weight:[1],placement:[1],anchor:[1],expanded:[32],tooltipOpen:[32]},[[10,"keydown","handleKeyDown"]],{tooltipOpen:[{watchTooltipOpen:0}]}],[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],isTruncated:[64]}]]]],e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,B as n,c as t,w as i,N as l,H as a,b as r}from"./p-BButrLnB.js";export{s as setNonce}from"./p-BButrLnB.js";import{g as o}from"./p-C0WTlb31.js";var p=e=>{const n=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return n.call(this,e);const t=n.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&t.appendChild(i[e].cloneNode(!0));return t}};(()=>{n.isDev&&!n.isTesting&&t("Running in development mode."),n.cloneNodeFix&&p(a.prototype);const s=n.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${l}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===l)):null,r=import.meta.url,o=n.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)})().then((async e=>(await o(),r([["p-f567a8c5",[[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}],[1,"ezp-printer-selection",{clientID:[1,"client-i-d"],redirectURI:[1,"redirect-u-r-i"],filename:[1025],fileurl:[1],filetype:[1025],fileid:[1025],files:[16],hidemenu:[4],hideheader:[4],seamless:[4],loading:[32],printProcessing:[32],pageRangeInvalid:[32],uploading:[32],preparingUpload:[32],printSuccess:[32],printFailed:[32],printTimedOut:[32],notSupported:[32],noPrinters:[32],hubDriverError:[32],userMenuOpen:[32],printStopped:[32],firstVisibleFile:[32],userName:[32],printers:[32],selectedPrinter:[32],printerConfig:[32],selectedPrinterConfig:[32],selectedProperties:[32],loadingPrinterConfig:[32],paperid:[32],currentFileIndex:[32],totalFiles:[32],failedFiles:[32],successfulFiles:[32],partialSuccess:[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32],isPopupBlocked:[32],codeExchangePending:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{selectedFiles:[32],dragging:[32],firstVisibleFile:[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{heading:[1],description:[1],action:[1],iconName:[1,"icon-name"],iconSize:[1,"icon-size"],iconFramed:[4,"icon-framed"],instance:[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{name:[1],open:[1028]},null,{open:[{watchOpen:0}]}],[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]},null,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}],[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}],[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},null,{value:[{watchValue:0}]}],[1,"ezp-status",{description:[1],subtext:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}],[1,"ezp-file-name",{name:[1],level:[1],weight:[1],placement:[1],anchor:[1],expanded:[32],tooltipOpen:[32]},[[10,"keydown","handleKeyDown"]],{tooltipOpen:[{watchTooltipOpen:0}]}],[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],isTruncated:[64]}]]]],e))));
|