@ezeep/ezeep-js 1.0.306 → 1.0.316

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.
Files changed (37) hide show
  1. package/dist/cjs/ezeep.cjs.js +1 -1
  2. package/dist/cjs/ezp-auth_16.cjs.entry.js +66 -11
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/collection/collection-manifest.json +1 -1
  5. package/dist/collection/components/ezp-auth/ezp-auth.js +67 -9
  6. package/dist/collection/components/ezp-backdrop/ezp-backdrop.js +1 -1
  7. package/dist/collection/components/ezp-dialog/ezp-dialog.js +1 -1
  8. package/dist/collection/components/ezp-stepper/ezp-stepper.css +1 -2
  9. package/dist/components/ezp-auth2.js +1 -1
  10. package/dist/components/ezp-backdrop2.js +1 -1
  11. package/dist/components/ezp-dialog2.js +1 -1
  12. package/dist/components/ezp-stepper2.js +1 -1
  13. package/dist/components/utils.js +1 -1
  14. package/dist/directives/proxies.ts +7 -1
  15. package/dist/esm/ezeep.js +1 -1
  16. package/dist/esm/ezp-auth_16.entry.js +66 -11
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm-es5/ezeep.js +1 -1
  19. package/dist/esm-es5/ezp-auth_16.entry.js +2 -2
  20. package/dist/esm-es5/loader.js +1 -1
  21. package/dist/ezeep/ezeep.esm.js +1 -1
  22. package/dist/ezeep/p-98a77798.entry.js +1 -0
  23. package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
  24. package/dist/ezeep/{p-8e2d88a9.system.entry.js → p-f348cbab.system.entry.js} +2 -2
  25. package/dist/types/components/ezp-auth/ezp-auth.d.ts +16 -3
  26. package/dist/types/components.d.ts +5 -0
  27. package/package.json +1 -1
  28. package/www/build/ezeep.esm.js +1 -1
  29. package/www/build/{p-70951744.js → p-4f218598.js} +1 -1
  30. package/www/build/p-98a77798.entry.js +1 -0
  31. package/www/build/p-DCznw2Ee.system.js +1 -1
  32. package/www/build/{p-8e2d88a9.system.entry.js → p-f348cbab.system.entry.js} +2 -2
  33. package/www/data/locales/de.json +5 -0
  34. package/www/data/locales/en.json +5 -0
  35. package/www/index.html +1 -1
  36. package/dist/ezeep/p-646c1d42.entry.js +0 -1
  37. package/www/build/p-646c1d42.entry.js +0 -1
@@ -46,7 +46,7 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
46
46
 
47
47
  patchBrowser().then(async (options) => {
48
48
  await appGlobals.globalScripts();
49
- return index.bootstrapLazy([["ezp-auth_16.cjs",[[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]},[[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]}]]]], options);
49
+ return index.bootstrapLazy([["ezp-auth_16.cjs",[[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]},[[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]}]]]], options);
50
50
  });
51
51
 
52
52
  exports.setNonce = index.setNonce;
@@ -2519,6 +2519,11 @@ const login_dialog$1 = {
2519
2519
  description: "Melde dich mit deinem ezeep Blue-Konto an, um zu drucken.",
2520
2520
  action: "Anmelden"
2521
2521
  };
2522
+ const popup_blocked_dialog$1 = {
2523
+ heading: "Anmeldefenster wurde blockiert",
2524
+ description: "Dein Browser hat das Anmelde-Pop-up blockiert. Erlaube Pop-ups für diese Website und tippe dann auf Erneut versuchen. Auf dem iPhone oder iPad öffne Einstellungen → Safari und deaktiviere Pop-ups blockieren.",
2525
+ action: "Erneut versuchen"
2526
+ };
2522
2527
  const no_document_dialog$1 = {
2523
2528
  heading: "Keine Datei ausgewählt",
2524
2529
  description: "Wähle zunächst eine Datei zum Drucken aus.",
@@ -2598,6 +2603,7 @@ const user_menu$1 = {
2598
2603
  };
2599
2604
  var translationsDE = {
2600
2605
  login_dialog: login_dialog$1,
2606
+ popup_blocked_dialog: popup_blocked_dialog$1,
2601
2607
  no_document_dialog: no_document_dialog$1,
2602
2608
  printer_selection: printer_selection$1,
2603
2609
  button_actions: button_actions$1,
@@ -2610,6 +2616,11 @@ const login_dialog = {
2610
2616
  description: "Sign in with your ezeep Blue account to print.",
2611
2617
  action: "Sign in"
2612
2618
  };
2619
+ const popup_blocked_dialog = {
2620
+ heading: "Sign-in window was blocked",
2621
+ description: "Your browser blocked the sign-in pop-up. Allow pop-ups for this site, then tap Try again. On iPhone or iPad, open Settings → Safari and turn off Block Pop-ups.",
2622
+ action: "Try again"
2623
+ };
2613
2624
  const no_document_dialog = {
2614
2625
  heading: "No file selected",
2615
2626
  description: "Select a file first to print.",
@@ -2689,6 +2700,7 @@ const user_menu = {
2689
2700
  };
2690
2701
  var translationsEN = {
2691
2702
  login_dialog: login_dialog,
2703
+ popup_blocked_dialog: popup_blocked_dialog,
2692
2704
  no_document_dialog: no_document_dialog,
2693
2705
  printer_selection: printer_selection,
2694
2706
  button_actions: button_actions,
@@ -3149,6 +3161,9 @@ const EzpAuth = class {
3149
3161
  this.authCancel = index.createEvent(this, "authCancel", 7);
3150
3162
  this.authSuccess = index.createEvent(this, "authSuccess", 7);
3151
3163
  this.userCancel = index.createEvent(this, "userCancel", 7);
3164
+ this.popupBlocked = index.createEvent(this, "popupBlocked", 7);
3165
+ /** True when the browser blocked the sign-in popup; shows the popup-blocked dialog. */
3166
+ this.isPopupBlocked = false;
3152
3167
  this.oauthPopupWindow = null;
3153
3168
  this.previousUrl = null;
3154
3169
  // Bound once (arrow property) so add/removeEventListener share the same
@@ -3188,10 +3203,23 @@ const EzpAuth = class {
3188
3203
  });
3189
3204
  };
3190
3205
  }
3191
- listenDialogAction() {
3206
+ listenDialogAction(event) {
3207
+ if (event.detail === 'popup-blocked') {
3208
+ this.handleRetry();
3209
+ return;
3210
+ }
3192
3211
  this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login');
3193
3212
  }
3194
- listenDialogClose() {
3213
+ listenDialogClose(event) {
3214
+ if (event.detail === 'popup-blocked') {
3215
+ // Dismissing the blocked-popup dialog cancels like the screen it replaced:
3216
+ // the sign-in status (hidelogin) or the login dialog.
3217
+ this.isPopupBlocked = false;
3218
+ if (this.showsSignInStatus()) {
3219
+ this.listenStatusCancel();
3220
+ return;
3221
+ }
3222
+ }
3195
3223
  this.authCancel.emit();
3196
3224
  }
3197
3225
  listenStatusCancel() {
@@ -3229,16 +3257,24 @@ const EzpAuth = class {
3229
3257
  /* if the pointer to the window object in memory does not exist
3230
3258
  or if such pointer exists but the window was closed */
3231
3259
  this.oauthPopupWindow = window.open(url, name, windowFeatures);
3260
+ if (this.isWindowBlocked(this.oauthPopupWindow)) {
3261
+ this.handlePopupBlocked();
3262
+ return;
3263
+ }
3232
3264
  }
3233
3265
  else if (this.previousUrl !== this.auth.authURI.toString()) {
3234
3266
  /* if the resource to load is different,
3235
3267
  then we load it in the already opened secondary window and then
3236
3268
  we bring such window back on top/in front of its parent window. */
3269
+ const previousPopup = this.oauthPopupWindow;
3237
3270
  this.oauthPopupWindow = window.open(url, name, windowFeatures);
3238
- if (!this.oauthPopupWindow ||
3239
- this.oauthPopupWindow.closed ||
3240
- typeof this.oauthPopupWindow.closed == 'undefined') {
3241
- alert('popup blocked');
3271
+ if (this.isWindowBlocked(this.oauthPopupWindow)) {
3272
+ // The still-open popup carries the outdated auth URL (and PKCE
3273
+ // challenge), so finishing sign-in there could never succeed. Close it
3274
+ // so the user goes through the retry dialog with a fresh window.
3275
+ previousPopup === null || previousPopup === void 0 ? void 0 : previousPopup.close();
3276
+ this.handlePopupBlocked();
3277
+ return;
3242
3278
  }
3243
3279
  (_a = this.oauthPopupWindow) === null || _a === void 0 ? void 0 : _a.focus();
3244
3280
  }
@@ -3252,7 +3288,26 @@ const EzpAuth = class {
3252
3288
  // add the listener for receiving a message from the popup (same bound
3253
3289
  // reference used by removeEventListener above, so it never stacks)
3254
3290
  window.addEventListener('message', this.receiveMessage, false);
3255
- this.previousUrl = this.auth.authURI;
3291
+ // Store the string form: it is compared against authURI.toString() above.
3292
+ this.previousUrl = this.auth.authURI.toString();
3293
+ }
3294
+ showsSignInStatus() {
3295
+ return this.hidelogin && (this.trigger === 'button' || this.trigger === 'file');
3296
+ }
3297
+ /** A blocked window.open() returns null, or a window that is closed / has no `closed` flag. */
3298
+ isWindowBlocked(popup) {
3299
+ return !popup || popup.closed || typeof popup.closed === 'undefined';
3300
+ }
3301
+ handlePopupBlocked() {
3302
+ // Drop the dead reference so a retry goes through the fresh-open branch.
3303
+ this.oauthPopupWindow = null;
3304
+ this.isPopupBlocked = true;
3305
+ this.popupBlocked.emit();
3306
+ }
3307
+ /** "Try again" on the popup-blocked dialog: runs from a user gesture, so the popup may now open. */
3308
+ handleRetry() {
3309
+ this.isPopupBlocked = false;
3310
+ this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login');
3256
3311
  }
3257
3312
  async componentWillLoad() {
3258
3313
  this.auth = new EzpAuthorizationService(this.redirectURI, this.clientID);
@@ -3283,7 +3338,7 @@ const EzpAuth = class {
3283
3338
  }
3284
3339
  }
3285
3340
  render() {
3286
- return (index.h(index.Host, { key: 'c00096b96d6d21508d1a78d5ae5a7f552516d01f' }, this.hidelogin && (this.trigger === 'button' || this.trigger === 'file') ? (index.h("ezp-status", { description: instance.t('login_dialog.action'), processing: true, cancel: true })) : (index.h("ezp-dialog", { heading: instance.t('login_dialog.heading'), description: instance.t('login_dialog.description'), action: instance.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login" }))));
3341
+ return (index.h(index.Host, { key: 'b947c930b88083bbcde53215bcb6159f2d2a79ce' }, this.isPopupBlocked ? (index.h("ezp-dialog", { heading: instance.t('popup_blocked_dialog.heading'), description: instance.t('popup_blocked_dialog.description'), action: instance.t('popup_blocked_dialog.action'), iconName: "exclamation-mark", instance: "popup-blocked", key: "popup-blocked" })) : this.showsSignInStatus() ? (index.h("ezp-status", { description: instance.t('login_dialog.action'), processing: true, cancel: true })) : (index.h("ezp-dialog", { heading: instance.t('login_dialog.heading'), description: instance.t('login_dialog.description'), action: instance.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login", key: "login" }))));
3287
3342
  }
3288
3343
  };
3289
3344
  EzpAuth.style = ezpAuthCss();
@@ -3307,7 +3362,7 @@ const EzpBackdrop = class {
3307
3362
  }
3308
3363
  }
3309
3364
  render() {
3310
- return index.h(index.Host, { key: '723bc1fc67fbe5a491e80094ec2444f4d6f9ce32', class: { hide: !this.visible }, onClick: () => this.handleClick() });
3365
+ return index.h(index.Host, { key: '7a559a59b645ba3610c90c872a8bc60de2ce5645', class: { hide: !this.visible }, onClick: () => this.handleClick() });
3311
3366
  }
3312
3367
  get component() { return index.getElement(this); }
3313
3368
  };
@@ -3409,7 +3464,7 @@ const EzpDialog = class {
3409
3464
  *
3410
3465
  */
3411
3466
  render() {
3412
- return (index.h(index.Host, { key: '4f86872972538970ab0d3e6e15055ae558537f4d' }, index.h("div", { key: 'fd78a41cf3f37ecc2481e6fb11c9031dcb45a063', id: "box", role: "dialog", "aria-modal": "true", "aria-label": this.heading, tabindex: -1, ref: (el) => (this.box = el) }, index.h("div", { key: 'defd711c745edc2fd0be5349f67f6795659c4c80', id: "header" }, index.h("ezp-icon-button", { key: '7da94b33c02de9acca8e5a77bb74757d36e607fd', level: "tertiary", icon: "close", type: "button", onClick: this.handleClose })), index.h("div", { key: '092387310d14f01aea60d0e7750de470a5184fe4', id: "body" }, this.iconName && (index.h("ezp-icon", { key: 'a933e2cb2e686544d9fbb31e3b7ee1eee2766deb', name: this.iconName, size: this.iconSize, framed: this.iconFramed })), index.h("div", { key: '45cafccc90a14bc5993c0696eed9567e01ab62e7', id: "text" }, index.h("ezp-label", { key: 'ffbd56a50d2fb7f6d62309eadeeb0f1da7fc93b6', text: this.heading, weight: "heavy" }), index.h("ezp-label", { key: '7563c3d9085eee67361c4ff8220da5c9a5de9d5c', text: this.description }))), index.h("div", { key: '999423e06a1b5721cc8c3788471235759e50b14a', id: "footer" }, index.h("ezp-text-button", { key: '16c8a33207a06d3e1a436e08098bfd9b6587306e', type: "button", level: "primary", onClick: this.handleAction, label: this.action })))));
3467
+ return (index.h(index.Host, { key: '31add15a63c15bd40f88056c8db4b1621be8365c' }, index.h("div", { key: '4027e801bd98fea212c079282ace0e414cf23525', id: "box", role: "dialog", "aria-modal": "true", "aria-label": this.heading, tabindex: -1, ref: (el) => (this.box = el) }, index.h("div", { key: '8efa479a250d00b64400ca75c2fe7b1e490a5f78', id: "header" }, index.h("ezp-icon-button", { key: '492ca4802b7ddf20c37a0ce712f77cb0beea07d5', level: "tertiary", icon: "close", type: "button", onClick: this.handleClose })), index.h("div", { key: '65c7484b089a30b71f24014a5705a870522f4b65', id: "body" }, this.iconName && (index.h("ezp-icon", { key: '9d7689c2c5bc50196e7a4a7a25e9c314e0ca7372', name: this.iconName, size: this.iconSize, framed: this.iconFramed })), index.h("div", { key: 'd2d9418cef0d876f9a59200b6c4a0995e18b8624', id: "text" }, index.h("ezp-label", { key: 'cf5ac182ee507a4e558e6d77a8ceae2fcd33912e', text: this.heading, weight: "heavy" }), index.h("ezp-label", { key: 'b925e9c5e830cf2b42b36b1fc60903ddc6aa9613', text: this.description }))), index.h("div", { key: '9d5d1663b68c8187d4e1767eee3587486974e7c5', id: "footer" }, index.h("ezp-text-button", { key: '3093c085f0001afec6a57aadb5f6866b1f4f2d22', type: "button", level: "primary", onClick: this.handleAction, label: this.action })))));
3413
3468
  }
3414
3469
  };
3415
3470
  EzpDialog.style = ezpDialogCss();
@@ -40193,7 +40248,7 @@ const EzpStatus = class {
40193
40248
  };
40194
40249
  EzpStatus.style = ezpStatusCss();
40195
40250
 
40196
- const ezpStepperCss = () => `:host{-ms-flex-align:center;align-items:center;background:transparent;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-stepper-gridTemplate, auto/1fr auto);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:0}:host(.focused){--ezp-stepper-label-color:var(--ezp-core-foreground-primary)}:host(.has-icon){--ezp-stepper-gridTemplate:auto / auto 1fr auto}#toggle{background:transparent;border-radius:12px;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-stepper-icon-color, var(--ezp-theme-solid));pointer-events:none}#label{color:var(--ezp-stepper-label-color, var(--ezp-core-foreground-primary));pointer-events:none}#input{-moz-appearance:textfield;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:text;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:16px;font-weight:600;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0109597786em;margin:0;min-width:28px;outline:none;padding:0;text-align:center;width:28px}#input::-webkit-outer-spin-button,#input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.buttons{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3)}.button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-stepper-button-background, transparent);border:1px solid var(--ezp-stepper-button-border, var(--ezp-core-outline));border-radius:50%;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-stepper-button-color, var(--ezp-core-foreground-secondary));cursor:var(--ezp-stepper-button-cursor, pointer);display:-ms-flexbox;display:flex;height:32px;-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:0;-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:32px}.button ezp-icon{--ezp-icon-size:16px;--ezp-icon-gridTemplate:16px}@media (hover: hover){.button:not(:disabled):hover{--ezp-stepper-button-background:var(--ezp-theme-translucent);--ezp-stepper-button-border:var(--ezp-theme-solid);--ezp-stepper-button-color:var(--ezp-theme-solid)}.button:not(:disabled):active{--ezp-stepper-button-background:var(--ezp-core-shade-secondary)}}.button:disabled{--ezp-stepper-button-border:var(--ezp-core-shade-primary);--ezp-stepper-button-color:var(--ezp-core-foreground-tertiary);--ezp-stepper-button-cursor:default}`;
40251
+ const ezpStepperCss = () => `:host{-ms-flex-align:center;align-items:center;background:transparent;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-stepper-gridTemplate, auto/1fr auto);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:0}:host(.focused){--ezp-stepper-label-color:var(--ezp-core-foreground-primary)}:host(.has-icon){--ezp-stepper-gridTemplate:auto / auto 1fr auto}#toggle{background:transparent;border-radius:12px;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-stepper-icon-color, var(--ezp-theme-solid));pointer-events:none}#label{color:var(--ezp-stepper-label-color, var(--ezp-core-foreground-primary));pointer-events:none}#input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:text;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:16px;font-weight:600;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0109597786em;margin:0;min-width:28px;outline:none;padding:0;text-align:center;width:28px}#input::-webkit-outer-spin-button,#input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.buttons{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3)}.button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-stepper-button-background, transparent);border:1px solid var(--ezp-stepper-button-border, var(--ezp-core-outline));border-radius:50%;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-stepper-button-color, var(--ezp-core-foreground-secondary));cursor:var(--ezp-stepper-button-cursor, pointer);display:-ms-flexbox;display:flex;height:32px;-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:0;-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:32px}.button ezp-icon{--ezp-icon-size:16px;--ezp-icon-gridTemplate:16px}@media (hover: hover){.button:not(:disabled):hover{--ezp-stepper-button-background:var(--ezp-theme-translucent);--ezp-stepper-button-border:var(--ezp-theme-solid);--ezp-stepper-button-color:var(--ezp-theme-solid)}.button:not(:disabled):active{--ezp-stepper-button-background:var(--ezp-core-shade-secondary)}}.button:disabled{--ezp-stepper-button-border:var(--ezp-core-shade-primary);--ezp-stepper-button-color:var(--ezp-core-foreground-tertiary);--ezp-stepper-button-cursor:default}`;
40197
40252
 
40198
40253
  const EzpStepper = class {
40199
40254
  constructor(hostRef) {
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-L_3XPZxT.js');
6
6
  const defineCustomElements = async (win, options) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
8
  await appGlobals.globalScripts();
9
- return index.bootstrapLazy([["ezp-auth_16.cjs",[[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]},[[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]}]]]], options);
9
+ return index.bootstrapLazy([["ezp-auth_16.cjs",[[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]},[[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]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "entries": [
3
3
  "components/ezp-auth/ezp-auth.js",
4
- "components/ezp-backdrop/ezp-backdrop.js",
5
4
  "components/ezp-dialog/ezp-dialog.js",
5
+ "components/ezp-backdrop/ezp-backdrop.js",
6
6
  "components/ezp-file-name/ezp-file-name.js",
7
7
  "components/ezp-icon/ezp-icon.js",
8
8
  "components/ezp-icon-button/ezp-icon-button.js",
@@ -5,6 +5,8 @@ import { subscribeToLanguageChange } from "../../utils/utils";
5
5
  import i18next from "i18next";
6
6
  export class EzpAuth {
7
7
  constructor() {
8
+ /** True when the browser blocked the sign-in popup; shows the popup-blocked dialog. */
9
+ this.isPopupBlocked = false;
8
10
  this.oauthPopupWindow = null;
9
11
  this.previousUrl = null;
10
12
  // Bound once (arrow property) so add/removeEventListener share the same
@@ -44,10 +46,23 @@ export class EzpAuth {
44
46
  });
45
47
  };
46
48
  }
47
- listenDialogAction() {
49
+ listenDialogAction(event) {
50
+ if (event.detail === 'popup-blocked') {
51
+ this.handleRetry();
52
+ return;
53
+ }
48
54
  this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login');
49
55
  }
50
- listenDialogClose() {
56
+ listenDialogClose(event) {
57
+ if (event.detail === 'popup-blocked') {
58
+ // Dismissing the blocked-popup dialog cancels like the screen it replaced:
59
+ // the sign-in status (hidelogin) or the login dialog.
60
+ this.isPopupBlocked = false;
61
+ if (this.showsSignInStatus()) {
62
+ this.listenStatusCancel();
63
+ return;
64
+ }
65
+ }
51
66
  this.authCancel.emit();
52
67
  }
53
68
  listenStatusCancel() {
@@ -85,16 +100,24 @@ export class EzpAuth {
85
100
  /* if the pointer to the window object in memory does not exist
86
101
  or if such pointer exists but the window was closed */
87
102
  this.oauthPopupWindow = window.open(url, name, windowFeatures);
103
+ if (this.isWindowBlocked(this.oauthPopupWindow)) {
104
+ this.handlePopupBlocked();
105
+ return;
106
+ }
88
107
  }
89
108
  else if (this.previousUrl !== this.auth.authURI.toString()) {
90
109
  /* if the resource to load is different,
91
110
  then we load it in the already opened secondary window and then
92
111
  we bring such window back on top/in front of its parent window. */
112
+ const previousPopup = this.oauthPopupWindow;
93
113
  this.oauthPopupWindow = window.open(url, name, windowFeatures);
94
- if (!this.oauthPopupWindow ||
95
- this.oauthPopupWindow.closed ||
96
- typeof this.oauthPopupWindow.closed == 'undefined') {
97
- alert('popup blocked');
114
+ if (this.isWindowBlocked(this.oauthPopupWindow)) {
115
+ // The still-open popup carries the outdated auth URL (and PKCE
116
+ // challenge), so finishing sign-in there could never succeed. Close it
117
+ // so the user goes through the retry dialog with a fresh window.
118
+ previousPopup === null || previousPopup === void 0 ? void 0 : previousPopup.close();
119
+ this.handlePopupBlocked();
120
+ return;
98
121
  }
99
122
  (_a = this.oauthPopupWindow) === null || _a === void 0 ? void 0 : _a.focus();
100
123
  }
@@ -108,7 +131,26 @@ export class EzpAuth {
108
131
  // add the listener for receiving a message from the popup (same bound
109
132
  // reference used by removeEventListener above, so it never stacks)
110
133
  window.addEventListener('message', this.receiveMessage, false);
111
- this.previousUrl = this.auth.authURI;
134
+ // Store the string form: it is compared against authURI.toString() above.
135
+ this.previousUrl = this.auth.authURI.toString();
136
+ }
137
+ showsSignInStatus() {
138
+ return this.hidelogin && (this.trigger === 'button' || this.trigger === 'file');
139
+ }
140
+ /** A blocked window.open() returns null, or a window that is closed / has no `closed` flag. */
141
+ isWindowBlocked(popup) {
142
+ return !popup || popup.closed || typeof popup.closed === 'undefined';
143
+ }
144
+ handlePopupBlocked() {
145
+ // Drop the dead reference so a retry goes through the fresh-open branch.
146
+ this.oauthPopupWindow = null;
147
+ this.isPopupBlocked = true;
148
+ this.popupBlocked.emit();
149
+ }
150
+ /** "Try again" on the popup-blocked dialog: runs from a user gesture, so the popup may now open. */
151
+ handleRetry() {
152
+ this.isPopupBlocked = false;
153
+ this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login');
112
154
  }
113
155
  async componentWillLoad() {
114
156
  this.auth = new EzpAuthorizationService(this.redirectURI, this.clientID);
@@ -139,7 +181,7 @@ export class EzpAuth {
139
181
  }
140
182
  }
141
183
  render() {
142
- return (h(Host, { key: 'c00096b96d6d21508d1a78d5ae5a7f552516d01f' }, this.hidelogin && (this.trigger === 'button' || this.trigger === 'file') ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : (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" }))));
184
+ return (h(Host, { key: 'b947c930b88083bbcde53215bcb6159f2d2a79ce' }, this.isPopupBlocked ? (h("ezp-dialog", { heading: i18next.t('popup_blocked_dialog.heading'), description: i18next.t('popup_blocked_dialog.description'), action: i18next.t('popup_blocked_dialog.action'), iconName: "exclamation-mark", instance: "popup-blocked", key: "popup-blocked" })) : this.showsSignInStatus() ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : (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", key: "login" }))));
143
185
  }
144
186
  static get is() { return "ezp-auth"; }
145
187
  static get encapsulation() { return "shadow"; }
@@ -256,7 +298,8 @@ export class EzpAuth {
256
298
  return {
257
299
  "auth": {},
258
300
  "authURI": {},
259
- "accessToken": {}
301
+ "accessToken": {},
302
+ "isPopupBlocked": {}
260
303
  };
261
304
  }
262
305
  static get events() {
@@ -310,6 +353,21 @@ export class EzpAuth {
310
353
  "resolved": "void",
311
354
  "references": {}
312
355
  }
356
+ }, {
357
+ "method": "popupBlocked",
358
+ "name": "popupBlocked",
359
+ "bubbles": true,
360
+ "cancelable": true,
361
+ "composed": true,
362
+ "docs": {
363
+ "tags": [],
364
+ "text": "Emitted when the browser blocks the sign-in popup (e.g. iOS Safari with\n\"Block Pop-ups\" on). Host apps can listen to layer additional UI on top."
365
+ },
366
+ "complexType": {
367
+ "original": "void",
368
+ "resolved": "void",
369
+ "references": {}
370
+ }
313
371
  }];
314
372
  }
315
373
  static get listeners() {
@@ -13,7 +13,7 @@ export class EzpBackdrop {
13
13
  }
14
14
  }
15
15
  render() {
16
- return h(Host, { key: '723bc1fc67fbe5a491e80094ec2444f4d6f9ce32', class: { hide: !this.visible }, onClick: () => this.handleClick() });
16
+ return h(Host, { key: '7a559a59b645ba3610c90c872a8bc60de2ce5645', class: { hide: !this.visible }, onClick: () => this.handleClick() });
17
17
  }
18
18
  static get is() { return "ezp-backdrop"; }
19
19
  static get encapsulation() { return "shadow"; }
@@ -92,7 +92,7 @@ export class EzpDialog {
92
92
  *
93
93
  */
94
94
  render() {
95
- return (h(Host, { key: '4f86872972538970ab0d3e6e15055ae558537f4d' }, h("div", { key: 'fd78a41cf3f37ecc2481e6fb11c9031dcb45a063', id: "box", role: "dialog", "aria-modal": "true", "aria-label": this.heading, tabindex: -1, ref: (el) => (this.box = el) }, h("div", { key: 'defd711c745edc2fd0be5349f67f6795659c4c80', id: "header" }, h("ezp-icon-button", { key: '7da94b33c02de9acca8e5a77bb74757d36e607fd', level: "tertiary", icon: "close", type: "button", onClick: this.handleClose })), h("div", { key: '092387310d14f01aea60d0e7750de470a5184fe4', id: "body" }, this.iconName && (h("ezp-icon", { key: 'a933e2cb2e686544d9fbb31e3b7ee1eee2766deb', name: this.iconName, size: this.iconSize, framed: this.iconFramed })), h("div", { key: '45cafccc90a14bc5993c0696eed9567e01ab62e7', id: "text" }, h("ezp-label", { key: 'ffbd56a50d2fb7f6d62309eadeeb0f1da7fc93b6', text: this.heading, weight: "heavy" }), h("ezp-label", { key: '7563c3d9085eee67361c4ff8220da5c9a5de9d5c', text: this.description }))), h("div", { key: '999423e06a1b5721cc8c3788471235759e50b14a', id: "footer" }, h("ezp-text-button", { key: '16c8a33207a06d3e1a436e08098bfd9b6587306e', type: "button", level: "primary", onClick: this.handleAction, label: this.action })))));
95
+ return (h(Host, { key: '31add15a63c15bd40f88056c8db4b1621be8365c' }, h("div", { key: '4027e801bd98fea212c079282ace0e414cf23525', id: "box", role: "dialog", "aria-modal": "true", "aria-label": this.heading, tabindex: -1, ref: (el) => (this.box = el) }, h("div", { key: '8efa479a250d00b64400ca75c2fe7b1e490a5f78', id: "header" }, h("ezp-icon-button", { key: '492ca4802b7ddf20c37a0ce712f77cb0beea07d5', level: "tertiary", icon: "close", type: "button", onClick: this.handleClose })), h("div", { key: '65c7484b089a30b71f24014a5705a870522f4b65', id: "body" }, this.iconName && (h("ezp-icon", { key: '9d7689c2c5bc50196e7a4a7a25e9c314e0ca7372', name: this.iconName, size: this.iconSize, framed: this.iconFramed })), h("div", { key: 'd2d9418cef0d876f9a59200b6c4a0995e18b8624', id: "text" }, h("ezp-label", { key: 'cf5ac182ee507a4e558e6d77a8ceae2fcd33912e', text: this.heading, weight: "heavy" }), h("ezp-label", { key: 'b925e9c5e830cf2b42b36b1fc60903ddc6aa9613', text: this.description }))), h("div", { key: '9d5d1663b68c8187d4e1767eee3587486974e7c5', id: "footer" }, h("ezp-text-button", { key: '3093c085f0001afec6a57aadb5f6866b1f4f2d22', type: "button", level: "primary", onClick: this.handleAction, label: this.action })))));
96
96
  }
97
97
  static get is() { return "ezp-dialog"; }
98
98
  static get encapsulation() { return "shadow"; }
@@ -74,8 +74,7 @@
74
74
  }
75
75
 
76
76
  #input {
77
- -moz-appearance: textfield;
78
- appearance: none;
77
+ appearance: textfield;
79
78
  background: transparent;
80
79
  border: 0;
81
80
  border-radius: 3px;
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as i,Host as o,transformTag as n}from"@stencil/core/internal/client";import{a,E as l}from"./auth.js";import{s as c,i as h}from"./utils.js";import{d as r}from"./ezp-dialog2.js";import{d}from"./ezp-icon2.js";import{d as u}from"./ezp-icon-button2.js";import{d as p}from"./ezp-label2.js";import{d as m}from"./ezp-status2.js";import{d as g}from"./ezp-text-button2.js";const z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.authCancel=s(this,"authCancel",7),this.authSuccess=s(this,"authSuccess",7),this.userCancel=s(this,"userCancel",7),this.oauthPopupWindow=null,this.previousUrl=null,this.receiveMessage=t=>{if(this.oauthPopupWindow&&t.source&&t.source!==this.oauthPopupWindow)return void console.warn("[ezeep] Ignored auth message from an unexpected source window.");let e=null;try{e=new URL(this.redirectURI).origin}catch(t){e=null}e&&t.origin!==e?console.warn(`[ezeep] Ignored auth message from unexpected origin "${t.origin}" (expected "${e}").`):(a.state.code=t.data,this.auth.getAccessToken().then((()=>{this.authCancel.emit(),this.authSuccess.emit()})))}}listenDialogAction(){this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")}listenDialogClose(){this.authCancel.emit()}listenStatusCancel(){"file"===this.trigger?this.userCancel.emit():this.authCancel.emit()}connectedCallback(){this.unsubscribeLanguage=c(this)}disconnectedCallback(){var t;null===(t=this.unsubscribeLanguage)||void 0===t||t.call(this),window.removeEventListener("message",this.receiveMessage)}openSignInWindow(t,e){var s;if(a.state.isAuthorized)return this.authCancel.emit(),void this.authSuccess.emit();window.removeEventListener("message",this.receiveMessage);const i="toolbar=no, menubar=no, width=600, height=7000, top=100, left=100";null===this.oauthPopupWindow||this.oauthPopupWindow.closed?this.oauthPopupWindow=window.open(t,e,i):this.previousUrl!==this.auth.authURI.toString()?(this.oauthPopupWindow=window.open(t,e,i),this.oauthPopupWindow&&!this.oauthPopupWindow.closed&&void 0!==this.oauthPopupWindow.closed||alert("popup blocked"),null===(s=this.oauthPopupWindow)||void 0===s||s.focus()):this.oauthPopupWindow.focus(),window.addEventListener("message",this.receiveMessage,!1),this.previousUrl=this.auth.authURI}async componentWillLoad(){this.auth=new l(this.redirectURI,this.clientID),this.code&&(a.state.code=this.code,await this.auth.getAccessToken(),this.authCancel.emit(),this.authSuccess.emit()),!1===a.state.isAuthorized&&(this.auth.generateCodeVerifier(),await this.auth.generateCodeChallenge(a.state.codeVerifier),this.auth.buildAuthURI()),!this.hidelogin||"button"!==this.trigger&&"file"!==this.trigger||(a.state.isAuthorized?(this.authCancel.emit(),this.authSuccess.emit()):this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login"))}render(){return i(o,{key:"c00096b96d6d21508d1a78d5ae5a7f552516d01f"},!this.hidelogin||"button"!==this.trigger&&"file"!==this.trigger?i("ezp-dialog",{heading:h.t("login_dialog.heading"),description:h.t("login_dialog.description"),action:h.t("login_dialog.action"),iconName:"logo",iconSize:"huge",iconFramed:!1,instance:"login"}):i("ezp-status",{description:h.t("login_dialog.action"),processing:!0,cancel:!0}))}static get style(){return":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}"}},[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"]]]);function b(){"undefined"!=typeof customElements&&["ezp-auth","ezp-dialog","ezp-icon","ezp-icon-button","ezp-label","ezp-status","ezp-text-button"].forEach((t=>{switch(t){case"ezp-auth":customElements.get(n(t))||customElements.define(n(t),z);break;case"ezp-dialog":customElements.get(n(t))||r();break;case"ezp-icon":customElements.get(n(t))||d();break;case"ezp-icon-button":customElements.get(n(t))||u();break;case"ezp-label":customElements.get(n(t))||p();break;case"ezp-status":customElements.get(n(t))||m();break;case"ezp-text-button":customElements.get(n(t))||g()}}))}export{z as E,b as d}
1
+ import{proxyCustomElement as t,HTMLElement as i,createEvent as e,h as s,Host as o,transformTag as n}from"@stencil/core/internal/client";import{a,E as l}from"./auth.js";import{s as h,i as c}from"./utils.js";import{d as p}from"./ezp-dialog2.js";import{d}from"./ezp-icon2.js";import{d as r}from"./ezp-icon-button2.js";import{d as u}from"./ezp-label2.js";import{d as m}from"./ezp-status2.js";import{d as g}from"./ezp-text-button2.js";const b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.authCancel=e(this,"authCancel",7),this.authSuccess=e(this,"authSuccess",7),this.userCancel=e(this,"userCancel",7),this.popupBlocked=e(this,"popupBlocked",7),this.isPopupBlocked=!1,this.oauthPopupWindow=null,this.previousUrl=null,this.receiveMessage=t=>{if(this.oauthPopupWindow&&t.source&&t.source!==this.oauthPopupWindow)return void console.warn("[ezeep] Ignored auth message from an unexpected source window.");let i=null;try{i=new URL(this.redirectURI).origin}catch(t){i=null}i&&t.origin!==i?console.warn(`[ezeep] Ignored auth message from unexpected origin "${t.origin}" (expected "${i}").`):(a.state.code=t.data,this.auth.getAccessToken().then((()=>{this.authCancel.emit(),this.authSuccess.emit()})))}}listenDialogAction(t){"popup-blocked"!==t.detail?this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login"):this.handleRetry()}listenDialogClose(t){"popup-blocked"===t.detail&&(this.isPopupBlocked=!1,this.showsSignInStatus())?this.listenStatusCancel():this.authCancel.emit()}listenStatusCancel(){"file"===this.trigger?this.userCancel.emit():this.authCancel.emit()}connectedCallback(){this.unsubscribeLanguage=h(this)}disconnectedCallback(){var t;null===(t=this.unsubscribeLanguage)||void 0===t||t.call(this),window.removeEventListener("message",this.receiveMessage)}openSignInWindow(t,i){var e;if(a.state.isAuthorized)return this.authCancel.emit(),void this.authSuccess.emit();window.removeEventListener("message",this.receiveMessage);const s="toolbar=no, menubar=no, width=600, height=7000, top=100, left=100";if(null===this.oauthPopupWindow||this.oauthPopupWindow.closed){if(this.oauthPopupWindow=window.open(t,i,s),this.isWindowBlocked(this.oauthPopupWindow))return void this.handlePopupBlocked()}else if(this.previousUrl!==this.auth.authURI.toString()){const o=this.oauthPopupWindow;if(this.oauthPopupWindow=window.open(t,i,s),this.isWindowBlocked(this.oauthPopupWindow))return null==o||o.close(),void this.handlePopupBlocked();null===(e=this.oauthPopupWindow)||void 0===e||e.focus()}else this.oauthPopupWindow.focus();window.addEventListener("message",this.receiveMessage,!1),this.previousUrl=this.auth.authURI.toString()}showsSignInStatus(){return this.hidelogin&&("button"===this.trigger||"file"===this.trigger)}isWindowBlocked(t){return!t||t.closed||void 0===t.closed}handlePopupBlocked(){this.oauthPopupWindow=null,this.isPopupBlocked=!0,this.popupBlocked.emit()}handleRetry(){this.isPopupBlocked=!1,this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")}async componentWillLoad(){this.auth=new l(this.redirectURI,this.clientID),this.code&&(a.state.code=this.code,await this.auth.getAccessToken(),this.authCancel.emit(),this.authSuccess.emit()),!1===a.state.isAuthorized&&(this.auth.generateCodeVerifier(),await this.auth.generateCodeChallenge(a.state.codeVerifier),this.auth.buildAuthURI()),!this.hidelogin||"button"!==this.trigger&&"file"!==this.trigger||(a.state.isAuthorized?(this.authCancel.emit(),this.authSuccess.emit()):this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login"))}render(){return s(o,{key:"b947c930b88083bbcde53215bcb6159f2d2a79ce"},this.isPopupBlocked?s("ezp-dialog",{heading:c.t("popup_blocked_dialog.heading"),description:c.t("popup_blocked_dialog.description"),action:c.t("popup_blocked_dialog.action"),iconName:"exclamation-mark",instance:"popup-blocked",key:"popup-blocked"}):this.showsSignInStatus()?s("ezp-status",{description:c.t("login_dialog.action"),processing:!0,cancel:!0}):s("ezp-dialog",{heading:c.t("login_dialog.heading"),description:c.t("login_dialog.description"),action:c.t("login_dialog.action"),iconName:"logo",iconSize:"huge",iconFramed:!1,instance:"login",key:"login"}))}static get style(){return":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}"}},[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]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]]);function z(){"undefined"!=typeof customElements&&["ezp-auth","ezp-dialog","ezp-icon","ezp-icon-button","ezp-label","ezp-status","ezp-text-button"].forEach((t=>{switch(t){case"ezp-auth":customElements.get(n(t))||customElements.define(n(t),b);break;case"ezp-dialog":customElements.get(n(t))||p();break;case"ezp-icon":customElements.get(n(t))||d();break;case"ezp-icon-button":customElements.get(n(t))||r();break;case"ezp-label":customElements.get(n(t))||u();break;case"ezp-status":customElements.get(n(t))||m();break;case"ezp-text-button":customElements.get(n(t))||g()}}))}export{b as E,z as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as a,Host as o,transformTag as n}from"@stencil/core/internal/client";const s=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.backdropHideStart=i(this,"backdropHideStart",7),this.backdropHideEnd=i(this,"backdropHideEnd",7),this.visible=!0}handleClick(){this.visible=!1,this.backdropHideStart.emit()}listenAnimationEnd(){this.visible||this.backdropHideEnd.emit()}render(){return a(o,{key:"723bc1fc67fbe5a491e80094ec2444f4d6f9ce32",class:{hide:!this.visible},onClick:()=>this.handleClick()})}get component(){return this}static get style(){return":host{-webkit-animation:var(--ezp-backdrop-animation-name, host-in) var(--ezp-duration-3) forwards var(--ezp-easing-out-quart);animation:var(--ezp-backdrop-animation-name, host-in) var(--ezp-duration-3) forwards var(--ezp-easing-out-quart);background:var(--ezp-core-backdrop);border-radius:var(--ezp-backdrop-border-radius, 6px);display:block;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:4}:host(.hide){--ezp-backdrop-animation-name:host-out}@-webkit-keyframes host-in{0%{opacity:0}100%{opacity:1}}@keyframes host-in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes host-out{0%{opacity:1}100%{opacity:0}}@keyframes host-out{0%{opacity:1}100%{opacity:0}}"}},[1,"ezp-backdrop",{visible:[1028]},[[0,"animationend","listenAnimationEnd"]]]);function r(){"undefined"!=typeof customElements&&["ezp-backdrop"].forEach((t=>{"ezp-backdrop"===t&&(customElements.get(n(t))||customElements.define(n(t),s))}))}export{s as E,r as d}
1
+ import{proxyCustomElement as t,HTMLElement as i,createEvent as a,h as e,Host as o,transformTag as n}from"@stencil/core/internal/client";const s=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.backdropHideStart=a(this,"backdropHideStart",7),this.backdropHideEnd=a(this,"backdropHideEnd",7),this.visible=!0}handleClick(){this.visible=!1,this.backdropHideStart.emit()}listenAnimationEnd(){this.visible||this.backdropHideEnd.emit()}render(){return e(o,{key:"7a559a59b645ba3610c90c872a8bc60de2ce5645",class:{hide:!this.visible},onClick:()=>this.handleClick()})}get component(){return this}static get style(){return":host{-webkit-animation:var(--ezp-backdrop-animation-name, host-in) var(--ezp-duration-3) forwards var(--ezp-easing-out-quart);animation:var(--ezp-backdrop-animation-name, host-in) var(--ezp-duration-3) forwards var(--ezp-easing-out-quart);background:var(--ezp-core-backdrop);border-radius:var(--ezp-backdrop-border-radius, 6px);display:block;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:4}:host(.hide){--ezp-backdrop-animation-name:host-out}@-webkit-keyframes host-in{0%{opacity:0}100%{opacity:1}}@keyframes host-in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes host-out{0%{opacity:1}100%{opacity:0}}@keyframes host-out{0%{opacity:1}100%{opacity:0}}"}},[1,"ezp-backdrop",{visible:[1028]},[[0,"animationend","listenAnimationEnd"]]]);function r(){"undefined"!=typeof customElements&&["ezp-backdrop"].forEach((t=>{"ezp-backdrop"===t&&(customElements.get(n(t))||customElements.define(n(t),s))}))}export{s as E,r as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as a,Host as o,transformTag as c}from"@stencil/core/internal/client";import{i as n,s}from"./utils.js";import{d}from"./ezp-icon2.js";import{d as l}from"./ezp-icon-button2.js";import{d as r}from"./ezp-label2.js";import{d as p}from"./ezp-text-button2.js";const b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.dialogClose=i(this,"dialogClose",7),this.dialogAction=i(this,"dialogAction",7),this.action=n.t("button_actions.close"),this.iconSize="large",this.iconFramed=!0,this.handleClose=()=>{this.dialogClose.emit(this.instance)},this.handleAction=()=>{this.dialogAction.emit(this.instance)}}connectedCallback(){this.unsubscribeLanguage=s(this)}componentDidLoad(){var e;null===(e=this.box)||void 0===e||e.focus()}disconnectedCallback(){var e;null===(e=this.unsubscribeLanguage)||void 0===e||e.call(this)}handleKeydown(e){"Escape"!==e.key?"Tab"===e.key&&this.trapFocus(e):this.handleClose()}trapFocus(e){if(!this.box)return;const t=this.collectFocusable(this.box);if(0===t.length)return;const i=t[0],a=t[t.length-1],o=this.deepActiveElement();o&&t.includes(o)?e.shiftKey&&o===i?(e.preventDefault(),a.focus()):e.shiftKey||o!==a||(e.preventDefault(),i.focus()):(e.preventDefault(),i.focus())}collectFocusable(e){const t=[],i=e=>{e.querySelectorAll("*").forEach((e=>{e.tabIndex>=0&&!e.disabled&&t.push(e),e.shadowRoot&&i(e.shadowRoot)}))};return i(e),t}deepActiveElement(){var e;let t=document.activeElement;for(;null===(e=null==t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement;)t=t.shadowRoot.activeElement;return t}render(){return a(o,{key:"4f86872972538970ab0d3e6e15055ae558537f4d"},a("div",{key:"fd78a41cf3f37ecc2481e6fb11c9031dcb45a063",id:"box",role:"dialog","aria-modal":"true","aria-label":this.heading,tabindex:-1,ref:e=>this.box=e},a("div",{key:"defd711c745edc2fd0be5349f67f6795659c4c80",id:"header"},a("ezp-icon-button",{key:"7da94b33c02de9acca8e5a77bb74757d36e607fd",level:"tertiary",icon:"close",type:"button",onClick:this.handleClose})),a("div",{key:"092387310d14f01aea60d0e7750de470a5184fe4",id:"body"},this.iconName&&a("ezp-icon",{key:"a933e2cb2e686544d9fbb31e3b7ee1eee2766deb",name:this.iconName,size:this.iconSize,framed:this.iconFramed}),a("div",{key:"45cafccc90a14bc5993c0696eed9567e01ab62e7",id:"text"},a("ezp-label",{key:"ffbd56a50d2fb7f6d62309eadeeb0f1da7fc93b6",text:this.heading,weight:"heavy"}),a("ezp-label",{key:"7563c3d9085eee67361c4ff8220da5c9a5de9d5c",text:this.description}))),a("div",{key:"999423e06a1b5721cc8c3788471235759e50b14a",id:"footer"},a("ezp-text-button",{key:"16c8a33207a06d3e1a436e08098bfd9b6587306e",type:"button",level:"primary",onClick:this.handleAction,label:this.action}))))}static get style(){return":host{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-line-pack:center;align-content:center;background:var(--ezp-core-backdrop);display:grid;grid-template:auto/minmax(auto, 280px);height:100%;-ms-flex-pack:center;justify-content:center;left:0;position:fixed;top:0;width:100%}#box{background:var(--ezp-core-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--ezp-dialog-box-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-dialog-box-boxShadow, 0 0 0 1px var(--ezp-black-10))}#header{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;padding:var(--ezp-spacing-2) var(--ezp-spacing-3)}#body{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);padding:0 var(--ezp-spacing-5);text-align:center}#text{color:var(--ezp-core-foreground-primary);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4)}#footer{display:grid;grid-template:auto/minmax(144px, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-5)}"}},[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"]]]);function f(){"undefined"!=typeof customElements&&["ezp-dialog","ezp-icon","ezp-icon-button","ezp-label","ezp-text-button"].forEach((e=>{switch(e){case"ezp-dialog":customElements.get(c(e))||customElements.define(c(e),b);break;case"ezp-icon":customElements.get(c(e))||d();break;case"ezp-icon-button":customElements.get(c(e))||l();break;case"ezp-label":customElements.get(c(e))||r();break;case"ezp-text-button":customElements.get(c(e))||p()}}))}export{b as E,f as d}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as a,Host as o,transformTag as c}from"@stencil/core/internal/client";import{i as n,s}from"./utils.js";import{d}from"./ezp-icon2.js";import{d as l}from"./ezp-icon-button2.js";import{d as r}from"./ezp-label2.js";import{d as p}from"./ezp-text-button2.js";const b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.dialogClose=i(this,"dialogClose",7),this.dialogAction=i(this,"dialogAction",7),this.action=n.t("button_actions.close"),this.iconSize="large",this.iconFramed=!0,this.handleClose=()=>{this.dialogClose.emit(this.instance)},this.handleAction=()=>{this.dialogAction.emit(this.instance)}}connectedCallback(){this.unsubscribeLanguage=s(this)}componentDidLoad(){var e;null===(e=this.box)||void 0===e||e.focus()}disconnectedCallback(){var e;null===(e=this.unsubscribeLanguage)||void 0===e||e.call(this)}handleKeydown(e){"Escape"!==e.key?"Tab"===e.key&&this.trapFocus(e):this.handleClose()}trapFocus(e){if(!this.box)return;const t=this.collectFocusable(this.box);if(0===t.length)return;const i=t[0],a=t[t.length-1],o=this.deepActiveElement();o&&t.includes(o)?e.shiftKey&&o===i?(e.preventDefault(),a.focus()):e.shiftKey||o!==a||(e.preventDefault(),i.focus()):(e.preventDefault(),i.focus())}collectFocusable(e){const t=[],i=e=>{e.querySelectorAll("*").forEach((e=>{e.tabIndex>=0&&!e.disabled&&t.push(e),e.shadowRoot&&i(e.shadowRoot)}))};return i(e),t}deepActiveElement(){var e;let t=document.activeElement;for(;null===(e=null==t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement;)t=t.shadowRoot.activeElement;return t}render(){return a(o,{key:"31add15a63c15bd40f88056c8db4b1621be8365c"},a("div",{key:"4027e801bd98fea212c079282ace0e414cf23525",id:"box",role:"dialog","aria-modal":"true","aria-label":this.heading,tabindex:-1,ref:e=>this.box=e},a("div",{key:"8efa479a250d00b64400ca75c2fe7b1e490a5f78",id:"header"},a("ezp-icon-button",{key:"492ca4802b7ddf20c37a0ce712f77cb0beea07d5",level:"tertiary",icon:"close",type:"button",onClick:this.handleClose})),a("div",{key:"65c7484b089a30b71f24014a5705a870522f4b65",id:"body"},this.iconName&&a("ezp-icon",{key:"9d7689c2c5bc50196e7a4a7a25e9c314e0ca7372",name:this.iconName,size:this.iconSize,framed:this.iconFramed}),a("div",{key:"d2d9418cef0d876f9a59200b6c4a0995e18b8624",id:"text"},a("ezp-label",{key:"cf5ac182ee507a4e558e6d77a8ceae2fcd33912e",text:this.heading,weight:"heavy"}),a("ezp-label",{key:"b925e9c5e830cf2b42b36b1fc60903ddc6aa9613",text:this.description}))),a("div",{key:"9d5d1663b68c8187d4e1767eee3587486974e7c5",id:"footer"},a("ezp-text-button",{key:"3093c085f0001afec6a57aadb5f6866b1f4f2d22",type:"button",level:"primary",onClick:this.handleAction,label:this.action}))))}static get style(){return":host{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-line-pack:center;align-content:center;background:var(--ezp-core-backdrop);display:grid;grid-template:auto/minmax(auto, 280px);height:100%;-ms-flex-pack:center;justify-content:center;left:0;position:fixed;top:0;width:100%}#box{background:var(--ezp-core-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--ezp-dialog-box-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-dialog-box-boxShadow, 0 0 0 1px var(--ezp-black-10))}#header{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;padding:var(--ezp-spacing-2) var(--ezp-spacing-3)}#body{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);padding:0 var(--ezp-spacing-5);text-align:center}#text{color:var(--ezp-core-foreground-primary);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4)}#footer{display:grid;grid-template:auto/minmax(144px, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-5)}"}},[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"]]]);function f(){"undefined"!=typeof customElements&&["ezp-dialog","ezp-icon","ezp-icon-button","ezp-label","ezp-text-button"].forEach((e=>{switch(e){case"ezp-dialog":customElements.get(c(e))||customElements.define(c(e),b);break;case"ezp-icon":customElements.get(c(e))||d();break;case"ezp-icon-button":customElements.get(c(e))||l();break;case"ezp-label":customElements.get(c(e))||r();break;case"ezp-text-button":customElements.get(c(e))||p()}}))}export{b as E,f as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as r,Host as o,transformTag as a}from"@stencil/core/internal/client";import{d as n}from"./ezp-icon2.js";import{d as s}from"./ezp-label2.js";const p=e(class e extends t{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.stepperChanged=i(this,"stepperChanged",7),this.label="Label",this.min=1,this.canDecrease=!0,this.canIncrease=!0,this.focused=!1,this.value=1,this.handleDecrease=()=>{const e=this.value-1;e>=Number.MIN_SAFE_INTEGER&&(void 0===this.min||e>=this.min)&&(this.value=e)},this.handleIncrease=()=>{const e=this.value+1,t=void 0!==this.max?Math.min(this.max,Number.MAX_SAFE_INTEGER):Number.MAX_SAFE_INTEGER;e<=Number.MAX_SAFE_INTEGER&&e<=t&&(this.value=e)},this.handleInput=()=>{if(!this.input)return;const e=this.input.value.trim();if(""===e)return this.value=this.min,void(this.input.value=this.value.toString());const t=e.replace(/\D/g,"");if(""===t)return void(this.input.value=this.value.toString());const i=Number.MAX_SAFE_INTEGER.toString().length,r=t.slice(0,i);let o=Number(r);o>Number.MAX_SAFE_INTEGER&&(o=Number.MAX_SAFE_INTEGER),void 0!==this.min&&o<this.min&&(o=this.min);const a=void 0!==this.max?Math.min(this.max,Number.MAX_SAFE_INTEGER):Number.MAX_SAFE_INTEGER;o>a&&(o=a),this.value=o,this.input.value=o.toString()},this.setFocus=()=>{var e;null===(e=this.input)||void 0===e||e.focus()},this.handleBlur=()=>{this.focused=!1},this.handleFocus=()=>{this.focused=!0},this.handleKeyDown=t=>{e.ALLOWED_KEYS.includes(t.key)||(t.ctrlKey||t.metaKey)&&e.CTRL_CMD_KEYS.includes(t.key.toLowerCase())||/^\d$/.test(t.key)||t.preventDefault()}}watchValue(){const e=void 0!==this.max?Math.min(this.max,Number.MAX_SAFE_INTEGER):Number.MAX_SAFE_INTEGER;this.canIncrease=this.value<e,this.canDecrease=void 0===this.min||this.value>this.min,this.stepperChanged.emit(this.value)}componentWillLoad(){void 0!==this.min&&this.value<this.min&&(this.value=this.min),this.watchValue()}render(){return r(o,{key:"cbf3ded61537359ed280a204bb71240d0a34473a",class:`${this.focused?"focused":""} ${this.icon?"has-icon":""}`},r("div",{key:"1c7a265f60d06dbea4a80e19ecdaa4a10aed694c",id:"toggle",onClick:this.setFocus}),this.icon?r("ezp-icon",{id:"icon",name:this.icon}):null,r("ezp-label",{key:"9fd0e1128480dd9b288cb266542fd4e6b83ceebd",id:"label",noWrap:!0,text:this.label}),r("div",{key:"975fc0539e76750d7457c71d40f228cb5ebcaad8",class:"buttons"},r("button",{key:"db01d05fdcbc4eda2810751ace0194d9a1ec9eb7",class:"button",type:"button","aria-label":`Decrease ${this.label}`,disabled:!this.canDecrease,onClick:this.handleDecrease},r("ezp-icon",{key:"7d938efa8426caf292403e94e3565d20dc40d121",name:"minus"})),r("input",{key:"dbff518a5d1f28b3b23d597947c250bef71fd68a",id:"input",type:"number",ref:e=>this.input=e,min:this.min.toString(),max:void 0!==this.max?this.max.toString():void 0,value:this.value.toString(),"aria-label":this.label,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur}),r("button",{key:"b3001bb27f94f65fce51d3a69d7713e5da9ccdcc",class:"button",type:"button","aria-label":`Increase ${this.label}`,disabled:!this.canIncrease,onClick:this.handleIncrease},r("ezp-icon",{key:"534bb499fa2ced2591ccbc137186e59d22aa2f5f",name:"plus"}))))}static get watchers(){return{value:[{watchValue:0}]}}static get style(){return':host{-ms-flex-align:center;align-items:center;background:transparent;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-stepper-gridTemplate, auto/1fr auto);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:0}:host(.focused){--ezp-stepper-label-color:var(--ezp-core-foreground-primary)}:host(.has-icon){--ezp-stepper-gridTemplate:auto / auto 1fr auto}#toggle{background:transparent;border-radius:12px;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-stepper-icon-color, var(--ezp-theme-solid));pointer-events:none}#label{color:var(--ezp-stepper-label-color, var(--ezp-core-foreground-primary));pointer-events:none}#input{-moz-appearance:textfield;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:text;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:16px;font-weight:600;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0109597786em;margin:0;min-width:28px;outline:none;padding:0;text-align:center;width:28px}#input::-webkit-outer-spin-button,#input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.buttons{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3)}.button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-stepper-button-background, transparent);border:1px solid var(--ezp-stepper-button-border, var(--ezp-core-outline));border-radius:50%;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-stepper-button-color, var(--ezp-core-foreground-secondary));cursor:var(--ezp-stepper-button-cursor, pointer);display:-ms-flexbox;display:flex;height:32px;-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:0;-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:32px}.button ezp-icon{--ezp-icon-size:16px;--ezp-icon-gridTemplate:16px}@media (hover: hover){.button:not(:disabled):hover{--ezp-stepper-button-background:var(--ezp-theme-translucent);--ezp-stepper-button-border:var(--ezp-theme-solid);--ezp-stepper-button-color:var(--ezp-theme-solid)}.button:not(:disabled):active{--ezp-stepper-button-background:var(--ezp-core-shade-secondary)}}.button:disabled{--ezp-stepper-button-border:var(--ezp-core-shade-primary);--ezp-stepper-button-color:var(--ezp-core-foreground-tertiary);--ezp-stepper-button-cursor:default}'}},[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},void 0,{value:[{watchValue:0}]}]);function c(){"undefined"!=typeof customElements&&["ezp-stepper","ezp-icon","ezp-label"].forEach((e=>{switch(e){case"ezp-stepper":customElements.get(a(e))||customElements.define(a(e),p);break;case"ezp-icon":customElements.get(a(e))||n();break;case"ezp-label":customElements.get(a(e))||s()}}))}p.ALLOWED_KEYS=["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowUp","ArrowRight","ArrowDown"],p.CTRL_CMD_KEYS=["a","c","v","x"];export{p as E,c as d}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as r,Host as o,transformTag as a}from"@stencil/core/internal/client";import{d as n}from"./ezp-icon2.js";import{d as s}from"./ezp-label2.js";const p=e(class e extends t{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.stepperChanged=i(this,"stepperChanged",7),this.label="Label",this.min=1,this.canDecrease=!0,this.canIncrease=!0,this.focused=!1,this.value=1,this.handleDecrease=()=>{const e=this.value-1;e>=Number.MIN_SAFE_INTEGER&&(void 0===this.min||e>=this.min)&&(this.value=e)},this.handleIncrease=()=>{const e=this.value+1,t=void 0!==this.max?Math.min(this.max,Number.MAX_SAFE_INTEGER):Number.MAX_SAFE_INTEGER;e<=Number.MAX_SAFE_INTEGER&&e<=t&&(this.value=e)},this.handleInput=()=>{if(!this.input)return;const e=this.input.value.trim();if(""===e)return this.value=this.min,void(this.input.value=this.value.toString());const t=e.replace(/\D/g,"");if(""===t)return void(this.input.value=this.value.toString());const i=Number.MAX_SAFE_INTEGER.toString().length,r=t.slice(0,i);let o=Number(r);o>Number.MAX_SAFE_INTEGER&&(o=Number.MAX_SAFE_INTEGER),void 0!==this.min&&o<this.min&&(o=this.min);const a=void 0!==this.max?Math.min(this.max,Number.MAX_SAFE_INTEGER):Number.MAX_SAFE_INTEGER;o>a&&(o=a),this.value=o,this.input.value=o.toString()},this.setFocus=()=>{var e;null===(e=this.input)||void 0===e||e.focus()},this.handleBlur=()=>{this.focused=!1},this.handleFocus=()=>{this.focused=!0},this.handleKeyDown=t=>{e.ALLOWED_KEYS.includes(t.key)||(t.ctrlKey||t.metaKey)&&e.CTRL_CMD_KEYS.includes(t.key.toLowerCase())||/^\d$/.test(t.key)||t.preventDefault()}}watchValue(){const e=void 0!==this.max?Math.min(this.max,Number.MAX_SAFE_INTEGER):Number.MAX_SAFE_INTEGER;this.canIncrease=this.value<e,this.canDecrease=void 0===this.min||this.value>this.min,this.stepperChanged.emit(this.value)}componentWillLoad(){void 0!==this.min&&this.value<this.min&&(this.value=this.min),this.watchValue()}render(){return r(o,{key:"cbf3ded61537359ed280a204bb71240d0a34473a",class:`${this.focused?"focused":""} ${this.icon?"has-icon":""}`},r("div",{key:"1c7a265f60d06dbea4a80e19ecdaa4a10aed694c",id:"toggle",onClick:this.setFocus}),this.icon?r("ezp-icon",{id:"icon",name:this.icon}):null,r("ezp-label",{key:"9fd0e1128480dd9b288cb266542fd4e6b83ceebd",id:"label",noWrap:!0,text:this.label}),r("div",{key:"975fc0539e76750d7457c71d40f228cb5ebcaad8",class:"buttons"},r("button",{key:"db01d05fdcbc4eda2810751ace0194d9a1ec9eb7",class:"button",type:"button","aria-label":`Decrease ${this.label}`,disabled:!this.canDecrease,onClick:this.handleDecrease},r("ezp-icon",{key:"7d938efa8426caf292403e94e3565d20dc40d121",name:"minus"})),r("input",{key:"dbff518a5d1f28b3b23d597947c250bef71fd68a",id:"input",type:"number",ref:e=>this.input=e,min:this.min.toString(),max:void 0!==this.max?this.max.toString():void 0,value:this.value.toString(),"aria-label":this.label,onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur}),r("button",{key:"b3001bb27f94f65fce51d3a69d7713e5da9ccdcc",class:"button",type:"button","aria-label":`Increase ${this.label}`,disabled:!this.canIncrease,onClick:this.handleIncrease},r("ezp-icon",{key:"534bb499fa2ced2591ccbc137186e59d22aa2f5f",name:"plus"}))))}static get watchers(){return{value:[{watchValue:0}]}}static get style(){return':host{-ms-flex-align:center;align-items:center;background:transparent;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-stepper-gridTemplate, auto/1fr auto);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:0}:host(.focused){--ezp-stepper-label-color:var(--ezp-core-foreground-primary)}:host(.has-icon){--ezp-stepper-gridTemplate:auto / auto 1fr auto}#toggle{background:transparent;border-radius:12px;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-stepper-icon-color, var(--ezp-theme-solid));pointer-events:none}#label{color:var(--ezp-stepper-label-color, var(--ezp-core-foreground-primary));pointer-events:none}#input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:text;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:16px;font-weight:600;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0109597786em;margin:0;min-width:28px;outline:none;padding:0;text-align:center;width:28px}#input::-webkit-outer-spin-button,#input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.buttons{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3)}.button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-stepper-button-background, transparent);border:1px solid var(--ezp-stepper-button-border, var(--ezp-core-outline));border-radius:50%;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-stepper-button-color, var(--ezp-core-foreground-secondary));cursor:var(--ezp-stepper-button-cursor, pointer);display:-ms-flexbox;display:flex;height:32px;-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:0;-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart), border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:32px}.button ezp-icon{--ezp-icon-size:16px;--ezp-icon-gridTemplate:16px}@media (hover: hover){.button:not(:disabled):hover{--ezp-stepper-button-background:var(--ezp-theme-translucent);--ezp-stepper-button-border:var(--ezp-theme-solid);--ezp-stepper-button-color:var(--ezp-theme-solid)}.button:not(:disabled):active{--ezp-stepper-button-background:var(--ezp-core-shade-secondary)}}.button:disabled{--ezp-stepper-button-border:var(--ezp-core-shade-primary);--ezp-stepper-button-color:var(--ezp-core-foreground-tertiary);--ezp-stepper-button-cursor:default}'}},[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},void 0,{value:[{watchValue:0}]}]);function c(){"undefined"!=typeof customElements&&["ezp-stepper","ezp-icon","ezp-label"].forEach((e=>{switch(e){case"ezp-stepper":customElements.get(a(e))||customElements.define(a(e),p);break;case"ezp-icon":customElements.get(a(e))||n();break;case"ezp-label":customElements.get(a(e))||s()}}))}p.ALLOWED_KEYS=["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowUp","ArrowRight","ArrowDown"],p.CTRL_CMD_KEYS=["a","c","v","x"];export{p as E,c as d}