@ezeep/ezeep-js 1.0.247 → 1.0.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ezeep.cjs.js +1 -1
- package/dist/cjs/ezp-auth_15.cjs.entry.js +80 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +1 -1
- package/dist/collection/components/ezp-printing/ezp-printing.js +27 -0
- package/dist/collection/components/ezp-stepper/ezp-stepper.js +71 -5
- package/dist/custom-elements/index.js +80 -6
- package/dist/directives/proxies.ts +1 -1
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/ezp-auth_15.entry.js +80 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_15.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/{p-51613df0.entry.js → p-2562e9cb.entry.js} +1 -1
- package/dist/ezeep/p-84bd195a.system.js +1 -1
- package/dist/ezeep/{p-8895ff9b.system.entry.js → p-aebf439e.system.entry.js} +3 -3
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +1 -0
- package/dist/types/components/ezp-stepper/ezp-stepper.d.ts +3 -0
- package/dist/types/components.d.ts +1 -0
- package/package.json +1 -1
- package/readme.md +41 -0
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/{p-51613df0.entry.js → p-2562e9cb.entry.js} +1 -1
- package/www/build/p-84bd195a.system.js +1 -1
- package/www/build/{p-8895ff9b.system.entry.js → p-aebf439e.system.entry.js} +3 -3
- package/dist/types/shared/types.d.ts +0 -140
|
@@ -69,6 +69,7 @@ export declare class EzpPrinting {
|
|
|
69
69
|
logOut(): Promise<void>;
|
|
70
70
|
getSasUri(): Promise<string>;
|
|
71
71
|
getAuthUri(): Promise<string>;
|
|
72
|
+
setAuthRefreshToken(refreshToken: string): Promise<void>;
|
|
72
73
|
checkAuth(): Promise<boolean>;
|
|
73
74
|
refreshTokensPeriodically(seconds: number): void;
|
|
74
75
|
componentWillLoad(): Promise<void>;
|
|
@@ -2,6 +2,8 @@ import { EventEmitter } from '../../stencil-public-runtime';
|
|
|
2
2
|
import { IconNameTypes } from '../../shared/types';
|
|
3
3
|
export declare class EzpStepper {
|
|
4
4
|
private input?;
|
|
5
|
+
private static readonly ALLOWED_KEYS;
|
|
6
|
+
private static readonly CTRL_CMD_KEYS;
|
|
5
7
|
/**
|
|
6
8
|
*
|
|
7
9
|
* Properties
|
|
@@ -51,6 +53,7 @@ export declare class EzpStepper {
|
|
|
51
53
|
private setFocus;
|
|
52
54
|
private handleBlur;
|
|
53
55
|
private handleFocus;
|
|
56
|
+
private handleKeyDown;
|
|
54
57
|
/**
|
|
55
58
|
*
|
|
56
59
|
* Lifecycle methods
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -182,6 +182,47 @@ If you want to bind the printing process to a custom html element, you can use t
|
|
|
182
182
|
</html>
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
+
### Example with Pre-Authentication (using refresh token)
|
|
186
|
+
|
|
187
|
+
If you already have a refresh token from a previous authentication session, you can pre-authenticate the user without requiring them to go through the OAuth login flow:
|
|
188
|
+
|
|
189
|
+
```html
|
|
190
|
+
<!DOCTYPE html>
|
|
191
|
+
<html dir="ltr" lang="en">
|
|
192
|
+
<head>
|
|
193
|
+
<meta charset="utf-8" />
|
|
194
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
|
|
195
|
+
<script type="module" src="https://cdn.ezeep.com/ezeep-js/ezeep.esm.js"></script>
|
|
196
|
+
<script nomodule src="https://cdn.ezeep.com/ezeep-js/ezeep.js"></script>
|
|
197
|
+
<title>ezeep-js</title>
|
|
198
|
+
</head>
|
|
199
|
+
<body>
|
|
200
|
+
<ezp-printing
|
|
201
|
+
clientid="your-client-id"
|
|
202
|
+
redirecturi="https://your-site.com/"
|
|
203
|
+
trigger="button"
|
|
204
|
+
fileurl="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
|
|
205
|
+
filename="dummypdf"
|
|
206
|
+
filetype="pdf"
|
|
207
|
+
>
|
|
208
|
+
</ezp-printing>
|
|
209
|
+
<script>
|
|
210
|
+
const ezpPrinting = document.querySelector('ezp-printing')
|
|
211
|
+
|
|
212
|
+
// Set the refresh token for pre-authentication
|
|
213
|
+
// This allows users to bypass the OAuth login flow
|
|
214
|
+
const refreshToken = 'your-refresh-token-here' // Get this from your backend/session storage
|
|
215
|
+
ezpPrinting.setAuthRefreshToken(refreshToken)
|
|
216
|
+
</script>
|
|
217
|
+
</body>
|
|
218
|
+
</html>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
This approach is useful when:
|
|
222
|
+
- You manage authentication through your own backend system
|
|
223
|
+
- You want to provide a seamless printing experience without additional login prompts
|
|
224
|
+
- You have stored refresh tokens from previous user sessions
|
|
225
|
+
|
|
185
226
|
## Contribution Guide
|
|
186
227
|
|
|
187
228
|
Make sure you follow the [GitHub flow](https://guides.github.com/introduction/flow/) if you want to contribute. Clone and create a branch for your contribution. When finished, create a pull request for the main branch.
|
package/www/build/ezeep.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as i}from"./p-312f40d7.js";import{g as t}from"./p-a4d37138.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>(t(),i([["p-
|
|
1
|
+
import{p as e,b as i}from"./p-312f40d7.js";import{g as t}from"./p-a4d37138.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then((e=>(t(),i([["p-2562e9cb",[[1,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]],[1,"ezp-printer-selection",{clientID:[1,"client-i-d"],redirectURI:[1,"redirect-u-r-i"],filename:[1025],fileurl:[1],filetype:[1025],fileid:[1025],files:[16],hidemenu:[4],hideheader:[4],seamless:[4],loading:[32],printProcessing:[32],pageRangeInvalid:[32],uploading:[32],preparingUpload:[32],printSuccess:[32],printFailed:[32],notSupported:[32],noPrinters:[32],hubDriverError:[32],userMenuOpen:[32],printStopped:[32],userName:[32],printers:[32],selectedPrinter:[32],printerConfig:[32],selectedPrinterConfig:[32],selectedProperties:[32],paperid:[32],currentFileIndex:[32],totalFiles:[32],failedFiles:[32],successfulFiles:[32],partialSuccess:[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{selectedFiles:[32],dragging:[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{heading:[1],description:[1],action:[1],iconName:[1,"icon-name"],iconSize:[1,"icon-size"],iconFramed:[4,"icon-framed"],instance:[1]}],[1,"ezp-user-menu",{name:[1],open:[1028]}],[1,"ezp-select",{icon:[1],label:[1],optionFlow:[1,"option-flow"],options:[16],placeholder:[1],preSelected:[8,"pre-selected"],toggleFlow:[1,"toggle-flow"],disabled:[4],expanded:[32],selected:[32]}],[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}],[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]}],[1,"ezp-status",{description:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}],[1,"ezp-backdrop",{visible:[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{blank:[4],disabled:[4],href:[1],icon:[1],level:[1],type:[1]}],[1,"ezp-text-button",{blank:[4],disabled:[4],href:[1],level:[1],label:[1],type:[1],small:[4]}],[1,"ezp-icon",{name:[1],size:[1],framed:[4]}],[1,"ezp-label",{ellipsis:[4],level:[1],noWrap:[4,"no-wrap"],text:[1],weight:[1]}]]]],e))));
|