@ezeep/ezeep-js 1.0.290 → 1.0.302
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 → ezp-auth_16.cjs.entry.js} +572 -139
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ezp-file-name/ezp-file-name.css +98 -0
- package/dist/collection/components/ezp-file-name/ezp-file-name.js +280 -0
- package/dist/collection/components/ezp-icon/ezp-icon.js +1 -1
- package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +1 -1
- package/dist/collection/components/ezp-input/ezp-input.css +11 -2
- package/dist/collection/components/ezp-input/ezp-input.js +3 -5
- package/dist/collection/components/ezp-label/ezp-label.js +39 -1
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +45 -17
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +220 -88
- package/dist/collection/components/ezp-printing/ezp-printing.js +1 -1
- package/dist/collection/components/ezp-select/ezp-select.css +9 -12
- package/dist/collection/components/ezp-select/ezp-select.js +1 -1
- package/dist/collection/components/ezp-status/ezp-status.js +2 -2
- package/dist/collection/components/ezp-stepper/ezp-stepper.js +1 -1
- package/dist/collection/components/ezp-text-button/ezp-text-button.css +3 -1
- package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
- package/dist/collection/components/ezp-upload/ezp-upload.css +176 -143
- package/dist/collection/components/ezp-upload/ezp-upload.js +56 -9
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +1 -1
- package/dist/collection/shared/storage.js +39 -9
- package/dist/collection/types/shared/types.d.ts +1 -0
- package/dist/collection/utils/printer.js +75 -1
- package/dist/components/auth.js +1 -1
- package/dist/components/ezp-file-name.d.ts +11 -0
- package/dist/components/ezp-file-name.js +1 -0
- package/dist/components/ezp-file-name2.js +1 -0
- package/dist/components/ezp-icon-button2.js +1 -1
- package/dist/components/ezp-icon2.js +1 -1
- package/dist/components/ezp-input2.js +1 -1
- package/dist/components/ezp-label2.js +1 -1
- package/dist/components/ezp-printer-selection2.js +1 -1
- package/dist/components/ezp-printing.js +1 -1
- package/dist/components/ezp-select2.js +1 -1
- package/dist/components/ezp-status2.js +1 -1
- package/dist/components/ezp-stepper2.js +1 -1
- package/dist/components/ezp-text-button2.js +1 -1
- package/dist/components/ezp-upload2.js +1 -1
- package/dist/components/ezp-user-menu2.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/directives/proxies.ts +26 -1
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/{ezp-auth_15.entry.js → ezp-auth_16.entry.js} +572 -140
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/{ezp-auth_15.entry.js → ezp-auth_16.entry.js} +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/{p-6a494b7b.system.entry.js → p-636e190f.system.entry.js} +2 -2
- package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
- package/dist/ezeep/p-ff075048.entry.js +1 -0
- package/dist/ezeep/types/shared/types.d.ts +1 -0
- package/dist/types/components/ezp-file-name/ezp-file-name.d.ts +83 -0
- package/dist/types/components/ezp-label/ezp-label.d.ts +10 -0
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +41 -1
- package/dist/types/components/ezp-upload/ezp-upload.d.ts +8 -1
- package/dist/types/components.d.ts +65 -4
- package/dist/types/shared/storage.d.ts +18 -4
- package/dist/types/shared/types.d.ts +1 -0
- package/dist/types/utils/printer.d.ts +18 -0
- package/package.json +1 -1
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/{p-6a494b7b.system.entry.js → p-636e190f.system.entry.js} +2 -2
- package/www/build/p-DCznw2Ee.system.js +1 -1
- package/www/build/p-a2a4f55b.js +1 -0
- package/www/build/p-ff075048.entry.js +1 -0
- package/www/data/locales/de.json +6 -9
- package/www/data/locales/en.json +6 -9
- package/www/index.html +1 -1
- package/dist/ezeep/p-0df147f4.entry.js +0 -1
- package/www/build/p-0df147f4.entry.js +0 -1
- package/www/build/p-67021add.js +0 -1
|
@@ -2575,16 +2575,13 @@ const button_actions$1 = {
|
|
|
2575
2575
|
select_printer: "Wähle Drucker"
|
|
2576
2576
|
};
|
|
2577
2577
|
const upload$1 = {
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
dropzone_title: "
|
|
2581
|
-
browse: "vom Gerät auswählen",
|
|
2578
|
+
choose_files: "Dateien auswählen",
|
|
2579
|
+
drag_hint: "oder Dateien hierher ziehen",
|
|
2580
|
+
dropzone_title: "Zum Hochladen ablegen",
|
|
2582
2581
|
file_type_fallback: "DATEI",
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
files_ready_one: "{{count}} Datei bereit",
|
|
2587
|
-
files_ready_other: "{{count}} Dateien bereit",
|
|
2582
|
+
add_more: "Weitere Dateien hinzufügen",
|
|
2583
|
+
remove_file: "Datei entfernen",
|
|
2584
|
+
remove_files: "Dateien entfernen",
|
|
2588
2585
|
"continue": "Weiter zu Druckoptionen"
|
|
2589
2586
|
};
|
|
2590
2587
|
const user_menu$1 = {
|
|
@@ -2669,16 +2666,13 @@ const button_actions = {
|
|
|
2669
2666
|
select_printer: "Select Printer"
|
|
2670
2667
|
};
|
|
2671
2668
|
const upload = {
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
dropzone_title: "Drop
|
|
2675
|
-
browse: "select from device",
|
|
2669
|
+
choose_files: "Choose files",
|
|
2670
|
+
drag_hint: "or drag files here",
|
|
2671
|
+
dropzone_title: "Drop to upload",
|
|
2676
2672
|
file_type_fallback: "FILE",
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
files_ready_one: "{{count}} file ready",
|
|
2681
|
-
files_ready_other: "{{count}} files ready",
|
|
2673
|
+
add_more: "Add more files",
|
|
2674
|
+
remove_file: "Remove file",
|
|
2675
|
+
remove_files: "Remove files",
|
|
2682
2676
|
"continue": "Continue to print options"
|
|
2683
2677
|
};
|
|
2684
2678
|
const user_menu = {
|
|
@@ -2886,8 +2880,10 @@ const KEY = {
|
|
|
2886
2880
|
accessToken: 'access_token',
|
|
2887
2881
|
refreshToken: 'refreshToken',
|
|
2888
2882
|
isAuthorized: 'isAuthorized',
|
|
2883
|
+
/** Legacy single-printer settings blob, read once to seed `printerSettings`. */
|
|
2889
2884
|
properties: 'properties',
|
|
2890
2885
|
printer: 'printer',
|
|
2886
|
+
printerSettings: 'printerSettings',
|
|
2891
2887
|
};
|
|
2892
2888
|
function getJSON(key) {
|
|
2893
2889
|
const raw = localStorage.getItem(key);
|
|
@@ -2918,32 +2914,60 @@ const storage = {
|
|
|
2918
2914
|
hasIsAuthorized() {
|
|
2919
2915
|
return localStorage.getItem(KEY.isAuthorized) !== null;
|
|
2920
2916
|
},
|
|
2921
|
-
|
|
2922
|
-
|
|
2917
|
+
/**
|
|
2918
|
+
* Settings the user last printed with on `printerId`, or null if that printer
|
|
2919
|
+
* has none yet. Kept per printer so switching printers never carries another
|
|
2920
|
+
* printer's paper size or tray over to one that may not have it.
|
|
2921
|
+
*/
|
|
2922
|
+
getPrinterSettings(printerId) {
|
|
2923
|
+
var _a;
|
|
2924
|
+
return (_a = readPrinterSettings()[printerId]) !== null && _a !== void 0 ? _a : null;
|
|
2923
2925
|
},
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
+
setPrinterSettings(printerId, properties) {
|
|
2927
|
+
const all = readPrinterSettings();
|
|
2928
|
+
all[printerId] = properties;
|
|
2929
|
+
localStorage.setItem(KEY.printerSettings, JSON.stringify(all));
|
|
2926
2930
|
},
|
|
2931
|
+
/** The printer used for the last print, preselected when the dialog reopens. */
|
|
2927
2932
|
getPrinter() {
|
|
2928
2933
|
return getJSON(KEY.printer);
|
|
2929
2934
|
},
|
|
2930
2935
|
setPrinter(printer) {
|
|
2931
2936
|
localStorage.setItem(KEY.printer, JSON.stringify(printer));
|
|
2932
2937
|
},
|
|
2933
|
-
/**
|
|
2938
|
+
/**
|
|
2939
|
+
* Remove everything tied to the current session (used on logout).
|
|
2940
|
+
*
|
|
2941
|
+
* Print settings and the last printer deliberately survive: they belong to
|
|
2942
|
+
* this browser profile rather than to the session, and are validated against
|
|
2943
|
+
* the signed-in user's printers on the next load (an unknown printer resets
|
|
2944
|
+
* the selection), so the next user never inherits a selection they can't use.
|
|
2945
|
+
*/
|
|
2934
2946
|
clearSession() {
|
|
2935
|
-
localStorage.removeItem(KEY.properties);
|
|
2936
2947
|
localStorage.removeItem(KEY.refreshToken);
|
|
2937
2948
|
localStorage.removeItem(KEY.accessToken);
|
|
2938
|
-
localStorage.removeItem(KEY.printer);
|
|
2939
2949
|
localStorage.removeItem(KEY.isAuthorized);
|
|
2940
2950
|
},
|
|
2941
|
-
/**
|
|
2951
|
+
/** Forget which printer was last used (when it is gone from the user's list).
|
|
2952
|
+
* Its settings stay put, ready in case that printer comes back. */
|
|
2942
2953
|
clearSavedPrinter() {
|
|
2943
2954
|
localStorage.removeItem(KEY.printer);
|
|
2944
|
-
localStorage.removeItem(KEY.properties);
|
|
2945
2955
|
},
|
|
2946
2956
|
};
|
|
2957
|
+
/**
|
|
2958
|
+
* Read the per-printer settings map, seeding it once from the pre-upgrade
|
|
2959
|
+
* single-printer blob so a user who already printed keeps those settings.
|
|
2960
|
+
*/
|
|
2961
|
+
function readPrinterSettings() {
|
|
2962
|
+
const stored = getJSON(KEY.printerSettings);
|
|
2963
|
+
if (stored)
|
|
2964
|
+
return stored;
|
|
2965
|
+
const legacy = getJSON(KEY.properties);
|
|
2966
|
+
const legacyPrinter = getJSON(KEY.printer);
|
|
2967
|
+
if (legacy && (legacyPrinter === null || legacyPrinter === void 0 ? void 0 : legacyPrinter.id))
|
|
2968
|
+
return { [legacyPrinter.id]: legacy };
|
|
2969
|
+
return {};
|
|
2970
|
+
}
|
|
2947
2971
|
|
|
2948
2972
|
class EzpAuthorizationService {
|
|
2949
2973
|
constructor(redirectURI, clientID) {
|
|
@@ -3359,6 +3383,158 @@ const EzpDialog = class {
|
|
|
3359
3383
|
};
|
|
3360
3384
|
EzpDialog.style = ezpDialogCss();
|
|
3361
3385
|
|
|
3386
|
+
const ezpFileNameCss = () => `@charset "UTF-8";:host{display:block;min-width:0}#trigger{-ms-flex-align:baseline;align-items:baseline;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:4px;color:inherit;cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;margin:0;max-width:100%;min-width:0;outline-color:var(--ezp-theme-solid);outline-offset:2px;padding:0;text-align:left}.head{-ms-flex:0 1 auto;flex:0 1 auto;min-width:0}.tail{-ms-flex:0 0 auto;flex:0 0 auto}:host(:not(.expanded)) .head,:host(:not(.expanded)) .tail{--ezp-label-whiteSpace:pre}:host(.expanded) .head{--ezp-label-whiteSpace:pre-wrap}:host(.expanded) #trigger{word-break:break-all}#tooltip{background:var(--ezp-core-surface-tertiary);border-radius:8px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop);color:var(--ezp-core-foreground-primary);font-size:12px;font-weight:500;left:0;line-height:18px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);pointer-events:auto;position:absolute;right:0;word-break:break-all;z-index:10}:host(.place-top) #tooltip{bottom:calc(100% + var(--ezp-spacing-2))}:host(.place-bottom) #tooltip{top:calc(100% + var(--ezp-spacing-2))}`;
|
|
3387
|
+
|
|
3388
|
+
/**
|
|
3389
|
+
* Characters kept at the end of a truncated name. Uploads often differ only in
|
|
3390
|
+
* a suffix like `_DE.pdf`, which a plain end-ellipsis would be the first thing
|
|
3391
|
+
* to hide, so that tail is held back and the middle gives way instead.
|
|
3392
|
+
*/
|
|
3393
|
+
const TAIL_LENGTH = 8;
|
|
3394
|
+
/** Hovering across a list shouldn't flash a tooltip over every row in passing. */
|
|
3395
|
+
const OPEN_DELAY_MS = 300;
|
|
3396
|
+
/** Grace period for crossing the gap between the name and the bubble, so the
|
|
3397
|
+
* tooltip can be hovered rather than vanishing on the way (WCAG 1.4.13). */
|
|
3398
|
+
const CLOSE_DELAY_MS = 200;
|
|
3399
|
+
const EzpFileName = class {
|
|
3400
|
+
constructor(hostRef) {
|
|
3401
|
+
registerInstance(this, hostRef);
|
|
3402
|
+
/** Invalidates an in-flight open when the pointer leaves. */
|
|
3403
|
+
this.openGeneration = 0;
|
|
3404
|
+
/**
|
|
3405
|
+
*
|
|
3406
|
+
* Properties
|
|
3407
|
+
*
|
|
3408
|
+
*/
|
|
3409
|
+
/** The full file name. Always present in the DOM, so screen readers and
|
|
3410
|
+
* copy-paste get it in full however it is truncated on screen. */
|
|
3411
|
+
this.name = '';
|
|
3412
|
+
/** Type scale of the rendered name, passed through to `ezp-label`. */
|
|
3413
|
+
this.level = 'secondary';
|
|
3414
|
+
/** Font weight of the rendered name, passed through to `ezp-label`. */
|
|
3415
|
+
this.weight = 'soft';
|
|
3416
|
+
/** Side the tooltip opens on. Consumers point it away from the edge their
|
|
3417
|
+
* row sits against — `bottom` for the first row of a list, `top` below it. */
|
|
3418
|
+
this.placement = 'top';
|
|
3419
|
+
/**
|
|
3420
|
+
*
|
|
3421
|
+
* States
|
|
3422
|
+
*
|
|
3423
|
+
*/
|
|
3424
|
+
/** Set by tapping the name: shows it in full, wrapped over several lines.
|
|
3425
|
+
* This is the touch counterpart of the tooltip, which needs a pointer. */
|
|
3426
|
+
this.expanded = false;
|
|
3427
|
+
this.tooltipOpen = false;
|
|
3428
|
+
this.openTooltip = () => {
|
|
3429
|
+
if (!this.hasHover || this.expanded)
|
|
3430
|
+
return;
|
|
3431
|
+
clearTimeout(this.openTimeout);
|
|
3432
|
+
const generation = ++this.openGeneration;
|
|
3433
|
+
this.openTimeout = setTimeout(async () => {
|
|
3434
|
+
const clipped = await this.isClipped();
|
|
3435
|
+
// Measuring yields, and the pointer may have moved on in the meantime —
|
|
3436
|
+
// opening now would leave a tooltip behind with nothing to dismiss it.
|
|
3437
|
+
if (clipped && generation === this.openGeneration)
|
|
3438
|
+
this.tooltipOpen = true;
|
|
3439
|
+
}, OPEN_DELAY_MS);
|
|
3440
|
+
};
|
|
3441
|
+
this.closeTooltip = () => {
|
|
3442
|
+
this.openGeneration++;
|
|
3443
|
+
clearTimeout(this.openTimeout);
|
|
3444
|
+
clearTimeout(this.closeTimeout);
|
|
3445
|
+
this.tooltipOpen = false;
|
|
3446
|
+
};
|
|
3447
|
+
/** Leaves the tooltip up briefly so the pointer can reach it. */
|
|
3448
|
+
this.scheduleClose = () => {
|
|
3449
|
+
clearTimeout(this.openTimeout);
|
|
3450
|
+
clearTimeout(this.closeTimeout);
|
|
3451
|
+
this.closeTimeout = setTimeout(this.closeTooltip, CLOSE_DELAY_MS);
|
|
3452
|
+
};
|
|
3453
|
+
this.cancelScheduledClose = () => {
|
|
3454
|
+
clearTimeout(this.closeTimeout);
|
|
3455
|
+
};
|
|
3456
|
+
this.toggleExpanded = () => {
|
|
3457
|
+
this.expanded = !this.expanded;
|
|
3458
|
+
// The full name is on screen now; a tooltip repeating it is just in the way.
|
|
3459
|
+
if (this.expanded)
|
|
3460
|
+
this.closeTooltip();
|
|
3461
|
+
};
|
|
3462
|
+
}
|
|
3463
|
+
/**
|
|
3464
|
+
*
|
|
3465
|
+
* Lifecycle methods
|
|
3466
|
+
*
|
|
3467
|
+
*/
|
|
3468
|
+
disconnectedCallback() {
|
|
3469
|
+
clearTimeout(this.openTimeout);
|
|
3470
|
+
clearTimeout(this.closeTimeout);
|
|
3471
|
+
}
|
|
3472
|
+
/**
|
|
3473
|
+
*
|
|
3474
|
+
* Listeners
|
|
3475
|
+
*
|
|
3476
|
+
*/
|
|
3477
|
+
/**
|
|
3478
|
+
* Escape dismisses the tooltip, and only the tooltip.
|
|
3479
|
+
*
|
|
3480
|
+
* Listening globally catches the key however the tooltip was opened,
|
|
3481
|
+
* including by hover, when nothing here has focus. It has to run in the
|
|
3482
|
+
* capture phase: stopping propagation on the way back up happens after every
|
|
3483
|
+
* ancestor has already seen the key, so a host app that closes its dialog on
|
|
3484
|
+
* Escape would close it as the tooltip was dismissed.
|
|
3485
|
+
*
|
|
3486
|
+
* `window` rather than `document`, because dialog libraries capture on the
|
|
3487
|
+
* document themselves — Radix's `DismissableLayer` does — and register before
|
|
3488
|
+
* a component mounted inside them, so they would still see the key first.
|
|
3489
|
+
* Capture runs window before document, so this transient layer consumes the
|
|
3490
|
+
* key first, and only while it is actually open.
|
|
3491
|
+
*/
|
|
3492
|
+
handleKeyDown(event) {
|
|
3493
|
+
if (event.key === 'Escape' && this.tooltipOpen) {
|
|
3494
|
+
event.stopPropagation();
|
|
3495
|
+
this.closeTooltip();
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
/**
|
|
3499
|
+
*
|
|
3500
|
+
* Private methods
|
|
3501
|
+
*
|
|
3502
|
+
*/
|
|
3503
|
+
/** Tooltips need a pointer; touch devices get the tap-to-expand path instead.
|
|
3504
|
+
* Tapping fires a synthetic `mouseenter` in most mobile browsers, so without
|
|
3505
|
+
* this check a tooltip would open on every tap. */
|
|
3506
|
+
get hasHover() {
|
|
3507
|
+
var _a, _b;
|
|
3508
|
+
return (_b = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(hover: hover)').matches) !== null && _b !== void 0 ? _b : false;
|
|
3509
|
+
}
|
|
3510
|
+
/** Whether anything is actually hidden. A name that fits needs no tooltip —
|
|
3511
|
+
* repeating text the reader can already see is just noise in the way. */
|
|
3512
|
+
async isClipped() {
|
|
3513
|
+
var _a, _b;
|
|
3514
|
+
const head = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.head');
|
|
3515
|
+
if (!head)
|
|
3516
|
+
return false;
|
|
3517
|
+
await ((_b = head.componentOnReady) === null || _b === void 0 ? void 0 : _b.call(head));
|
|
3518
|
+
return head.isTruncated();
|
|
3519
|
+
}
|
|
3520
|
+
/**
|
|
3521
|
+
*
|
|
3522
|
+
* Render method
|
|
3523
|
+
*
|
|
3524
|
+
*/
|
|
3525
|
+
render() {
|
|
3526
|
+
// Splitting is a rendering device only: `head` holds everything but the last
|
|
3527
|
+
// few characters and is the part CSS is allowed to clip, so the two labels
|
|
3528
|
+
// together still spell out the whole name.
|
|
3529
|
+
const split = !this.expanded && this.name.length > TAIL_LENGTH;
|
|
3530
|
+
const head = split ? this.name.slice(0, -TAIL_LENGTH) : this.name;
|
|
3531
|
+
const tail = split ? this.name.slice(-TAIL_LENGTH) : '';
|
|
3532
|
+
return (h(Host, { key: '4e84aca15abf4d1e59f2418fff0fdc13efd2a7b2', class: { expanded: this.expanded, [`place-${this.placement}`]: true } }, h("button", { key: '61de272bffc87cd440cd307ba49bee1f9795f8ae', type: "button", id: "trigger", "aria-label": this.name, "aria-expanded": this.expanded ? 'true' : 'false', onClick: this.toggleExpanded, onMouseEnter: this.openTooltip, onMouseLeave: this.scheduleClose, onFocus: this.openTooltip, onBlur: this.closeTooltip }, h("ezp-label", { key: 'd8120b13f24c5921d688431f90f7967b60fe4878', class: "head", ellipsis: split, level: this.level, weight: this.weight, text: head }), split && h("ezp-label", { key: '9129bedf96a55bd650efca46a3f2e7e599af2776', class: "tail", level: this.level, weight: this.weight, text: tail })), this.tooltipOpen && (h("div", { key: 'fb710729e9262fca148c342bf99c001fd5a760c3', id: "tooltip", "aria-hidden": "true", onMouseEnter: this.cancelScheduledClose, onMouseLeave: this.closeTooltip }, this.name))));
|
|
3533
|
+
}
|
|
3534
|
+
get host() { return getElement(this); }
|
|
3535
|
+
};
|
|
3536
|
+
EzpFileName.style = ezpFileNameCss();
|
|
3537
|
+
|
|
3362
3538
|
const ezpIconCss = () => `:host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-icon-background, transparent);border-radius:var(--ezp-icon-borderRadius, 0);display:grid;grid-template:var(--ezp-icon-gridTemplate)/var(--ezp-icon-gridTemplate);height:var(--ezp-icon-height, var(--ezp-icon-size));-ms-flex-pack:center;justify-content:center;padding:var(--ezp-icon-padding, 0);width:var(--ezp-icon-width, var(--ezp-icon-size))}:host(.framed){--ezp-icon-background:var(--ezp-core-shade-primary);--ezp-icon-borderRadius:50%;--ezp-icon-padding:var(--ezp-icon-frame)}:host(.normal){--ezp-icon-size:18px;--ezp-icon-gridTemplate:24px;--ezp-icon-frame:var(--ezp-spacing-3)}:host(.large){--ezp-icon-size:36px;--ezp-icon-gridTemplate:48px;--ezp-icon-frame:var(--ezp-spacing-4)}:host(.huge){--ezp-icon-size:54px;--ezp-icon-gridTemplate:72px;--ezp-icon-frame:var(--ezp-spacing-5)}svg{display:block;fill:var(--ezp-icon-fill, currentColor);height:100%;width:100%}`;
|
|
3363
3539
|
|
|
3364
3540
|
const EzpIcon = class {
|
|
@@ -3393,7 +3569,7 @@ const EzpIcon = class {
|
|
|
3393
3569
|
return (
|
|
3394
3570
|
// Decorative: icons here always sit next to a label or live-region text,
|
|
3395
3571
|
// so hide them from the accessibility tree to avoid double announcements.
|
|
3396
|
-
h(Host, { key: '
|
|
3572
|
+
h(Host, { key: 'f1a45d38b75ccf4e0c5e6200d9d04c7e5766bfbc', class: `${this.size} ${this.framed ? 'framed' : ''}`, "aria-hidden": "true" }, h("div", { key: '70f6963181d31089fefb662079e1e075540d2fe7', id: "glyph", innerHTML: this.glyph })));
|
|
3397
3573
|
}
|
|
3398
3574
|
static get assetsDirs() { return ["assets"]; }
|
|
3399
3575
|
};
|
|
@@ -3435,12 +3611,12 @@ const EzpIconButton = class {
|
|
|
3435
3611
|
// Icon-only control: derive an accessible name from the icon so screen
|
|
3436
3612
|
// readers announce something meaningful (e.g. "menu", "printer").
|
|
3437
3613
|
const label = this.icon.replace(/[-_]/g, ' ');
|
|
3438
|
-
return (h(Host, { key: '
|
|
3614
|
+
return (h(Host, { key: 'd67a43c2b91eaa4fa79dd8559824f3ffc23757b2', class: `${this.level}` }, h(TagType, Object.assign({ key: '3b11b4e0c40c8f900496ae03a4eee11f0980cd80', id: "button", "aria-label": label }, attributes), h("ezp-icon", { key: '14a35e8f779628197f7dd89219792d7809990631', name: this.icon }))));
|
|
3439
3615
|
}
|
|
3440
3616
|
};
|
|
3441
3617
|
EzpIconButton.style = ezpIconButtonCss();
|
|
3442
3618
|
|
|
3443
|
-
const ezpInputCss = () => `:host{-ms-flex-align:center;align-items:center;background:transparent;cursor:text;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-input-grid-template, auto/auto
|
|
3619
|
+
const ezpInputCss = () => `:host{-ms-flex-align:center;align-items:center;background:transparent;cursor:text;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-input-grid-template, auto/auto 1fr);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:var(--ezp-input-z-index, 3)}:host(.has-icon){--ezp-input-grid-template:auto / auto auto 1fr}:host([suffix]){--ezp-input-grid-template:auto / auto 1fr auto;--ezp-input-input-padding-right:0}:host([suffix].has-icon){--ezp-input-grid-template:auto / auto auto 1fr auto;--ezp-input-input-padding-right:0}:host(.focused){--ezp-input-label-color:var(--ezp-core-foreground-primary)}#label{color:var(--ezp-input-label-color, var(--ezp-core-foreground-primary))}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-input-icon-color, var(--ezp-theme-solid))}#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:14px;-webkit-font-smoothing:antialiased;font-weight:600;height:30px;letter-spacing:-0.0062235443em;margin:0;outline:none;padding:0 var(--ezp-input-input-padding-right, var(--ezp-spacing-1)) 0 0;text-align:right;width:100%}#input::-webkit-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-moz-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input:-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input[type=number]::-webkit-inner-spin-button,#input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}#suffix{color:var(--ezp-core-foreground-tertiary)}`;
|
|
3444
3620
|
|
|
3445
3621
|
const EzpInput = class {
|
|
3446
3622
|
constructor(hostRef) {
|
|
@@ -3457,8 +3633,6 @@ const EzpInput = class {
|
|
|
3457
3633
|
/** Description... */
|
|
3458
3634
|
this.type = 'text';
|
|
3459
3635
|
/** Description... */
|
|
3460
|
-
this.icon = 'color';
|
|
3461
|
-
/** Description... */
|
|
3462
3636
|
this.placeholder = '';
|
|
3463
3637
|
/**
|
|
3464
3638
|
*
|
|
@@ -3491,7 +3665,8 @@ const EzpInput = class {
|
|
|
3491
3665
|
}, 500);
|
|
3492
3666
|
}
|
|
3493
3667
|
render() {
|
|
3494
|
-
|
|
3668
|
+
const hasIcon = !!this.icon;
|
|
3669
|
+
return (h(Host, { key: 'f36f5811ba4e86b0aa3f53be916220136a1d2443', class: { focused: this.focused, 'has-icon': hasIcon }, onClick: this.setFocus }, hasIcon ? h("ezp-icon", { id: "icon", name: this.icon }) : null, h("ezp-label", { key: '88f93411e1463b23ca4ae88d278a69df5038509d', id: "label", noWrap: true, level: "secondary", text: this.label }), h("input", { key: 'b23ba3c8fea465a559e9c6d7b3da50152b412a1c', id: "input", type: this.type, value: this.value, placeholder: this.placeholder, "aria-label": this.label, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }), this.suffix ? h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
|
|
3495
3670
|
}
|
|
3496
3671
|
};
|
|
3497
3672
|
EzpInput.style = ezpInputCss();
|
|
@@ -3517,14 +3692,31 @@ const EzpLabel = class {
|
|
|
3517
3692
|
/** Description... */
|
|
3518
3693
|
this.weight = 'soft';
|
|
3519
3694
|
}
|
|
3695
|
+
/**
|
|
3696
|
+
*
|
|
3697
|
+
* Public methods
|
|
3698
|
+
*
|
|
3699
|
+
*/
|
|
3700
|
+
/** Whether the text is currently clipped — `ellipsis` only bites when the
|
|
3701
|
+
* text outgrows the space it was given, which callers cannot tell from the
|
|
3702
|
+
* props alone. Lets a caller offer the full text only when it is needed. */
|
|
3703
|
+
async isTruncated() {
|
|
3704
|
+
var _a;
|
|
3705
|
+
const text = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('#text');
|
|
3706
|
+
if (!text)
|
|
3707
|
+
return false;
|
|
3708
|
+
// A pixel of slack: sub-pixel layout rounds scrollWidth up on its own.
|
|
3709
|
+
return text.scrollWidth > text.clientWidth + 1;
|
|
3710
|
+
}
|
|
3520
3711
|
/**
|
|
3521
3712
|
*
|
|
3522
3713
|
* Render method
|
|
3523
3714
|
*
|
|
3524
3715
|
*/
|
|
3525
3716
|
render() {
|
|
3526
|
-
return (h(Host, { key: '
|
|
3717
|
+
return (h(Host, { key: '42139679511e711132912a1f762d345951fd1774', class: `${this.level} ${this.weight} ${this.ellipsis ? 'ellipsis' : ''} ${this.noWrap ? 'no-wrap' : ''}` }, h("div", { key: '5e54e8142d274cacb375cce8d5ef52ccdeaeec84', id: "text" }, this.text)));
|
|
3527
3718
|
}
|
|
3719
|
+
get host() { return getElement(this); }
|
|
3528
3720
|
};
|
|
3529
3721
|
EzpLabel.style = ezpLabelCss();
|
|
3530
3722
|
|
|
@@ -38102,6 +38294,8 @@ const userStore = createStore({
|
|
|
38102
38294
|
appearance: '',
|
|
38103
38295
|
});
|
|
38104
38296
|
|
|
38297
|
+
/** Duplex modes the dialog offers: none, long edge, short edge. */
|
|
38298
|
+
const DUPLEX_MODES = [1, 2, 3];
|
|
38105
38299
|
/**
|
|
38106
38300
|
* Derive the default print properties for a printer from its configuration.
|
|
38107
38301
|
*
|
|
@@ -38144,6 +38338,78 @@ function applyPrinterDefaults(config, properties) {
|
|
|
38144
38338
|
delete properties.PageRanges;
|
|
38145
38339
|
return properties;
|
|
38146
38340
|
}
|
|
38341
|
+
/**
|
|
38342
|
+
* Carry the settings the user last printed with on this printer over the
|
|
38343
|
+
* printer's own defaults, dropping anything the printer can no longer do.
|
|
38344
|
+
*
|
|
38345
|
+
* Capabilities change between sessions — a printer loses a tray, an admin
|
|
38346
|
+
* swaps the paper formats — and a stale value would otherwise be sent to the
|
|
38347
|
+
* API or shown as a selection that isn't in the list. Each field is therefore
|
|
38348
|
+
* only restored if the current config still offers it; everything else stays
|
|
38349
|
+
* on the default `applyPrinterDefaults` just put in place. Copies and page
|
|
38350
|
+
* ranges are never part of `saved`, so they are never restored.
|
|
38351
|
+
*/
|
|
38352
|
+
function applySavedProperties(config, saved, properties) {
|
|
38353
|
+
var _a, _b, _c, _d, _e;
|
|
38354
|
+
applyPrinterDefaults(config, properties);
|
|
38355
|
+
if (!saved)
|
|
38356
|
+
return properties;
|
|
38357
|
+
if (config.ColorSupported && typeof saved.color === 'boolean') {
|
|
38358
|
+
properties.color = saved.color;
|
|
38359
|
+
}
|
|
38360
|
+
if (config.DuplexSupported && DUPLEX_MODES.includes(Number(saved.duplexmode))) {
|
|
38361
|
+
properties.duplex = true;
|
|
38362
|
+
properties.duplexmode = Number(saved.duplexmode);
|
|
38363
|
+
}
|
|
38364
|
+
const paper = (_a = config.PaperFormats) === null || _a === void 0 ? void 0 : _a.find((format) => format.Id === Number(saved.paperid));
|
|
38365
|
+
if (paper) {
|
|
38366
|
+
properties.paper = paper.Name;
|
|
38367
|
+
properties.paperid = paper.Id;
|
|
38368
|
+
// Only meaningful for the custom format, which carries its own dimensions.
|
|
38369
|
+
if (paper.Id === PAPER_ID) {
|
|
38370
|
+
properties.paperwidth = saved.paperwidth;
|
|
38371
|
+
properties.paperlength = saved.paperlength;
|
|
38372
|
+
}
|
|
38373
|
+
}
|
|
38374
|
+
// Orientations are offered as 1-based positions in `OrientationsSupported`.
|
|
38375
|
+
const orientation = Number(saved.orientation);
|
|
38376
|
+
if (orientation >= 1 && orientation <= ((_c = (_b = config.OrientationsSupported) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0)) {
|
|
38377
|
+
properties.orientation = orientation;
|
|
38378
|
+
}
|
|
38379
|
+
if (typeof saved.resolution === 'string' && ((_d = config.Resolutions) === null || _d === void 0 ? void 0 : _d.includes(saved.resolution))) {
|
|
38380
|
+
properties.resolution = saved.resolution;
|
|
38381
|
+
}
|
|
38382
|
+
if (hasTrays(config)) {
|
|
38383
|
+
const tray = (_e = config.Trays) === null || _e === void 0 ? void 0 : _e.find((option) => (option === null || option === void 0 ? void 0 : option.Index) === Number(saved.defaultSource));
|
|
38384
|
+
if (tray) {
|
|
38385
|
+
properties.trayname = tray.Name;
|
|
38386
|
+
properties.defaultSource = tray.Index;
|
|
38387
|
+
}
|
|
38388
|
+
}
|
|
38389
|
+
return properties;
|
|
38390
|
+
}
|
|
38391
|
+
/**
|
|
38392
|
+
* The slice of the current selection worth remembering for next time: what the
|
|
38393
|
+
* print dialog offers per printer, minus copies and page ranges, which belong
|
|
38394
|
+
* to the one document being printed rather than to the printer.
|
|
38395
|
+
*/
|
|
38396
|
+
function pickRememberedProperties(properties) {
|
|
38397
|
+
const { color, duplex, duplexmode, paper, paperid, paperwidth, paperlength } = properties;
|
|
38398
|
+
const { orientation, resolution, trayname, defaultSource } = properties;
|
|
38399
|
+
return {
|
|
38400
|
+
color,
|
|
38401
|
+
duplex,
|
|
38402
|
+
duplexmode,
|
|
38403
|
+
paper,
|
|
38404
|
+
paperid,
|
|
38405
|
+
paperwidth,
|
|
38406
|
+
paperlength,
|
|
38407
|
+
orientation,
|
|
38408
|
+
resolution,
|
|
38409
|
+
trayname,
|
|
38410
|
+
defaultSource,
|
|
38411
|
+
};
|
|
38412
|
+
}
|
|
38147
38413
|
/** Does this printer config report an explicit "no usable trays" state? */
|
|
38148
38414
|
function hasNoTrays(config) {
|
|
38149
38415
|
return !!config.Trays && config.Trays.length >= 0 && config.Trays[0] == null;
|
|
@@ -38241,7 +38507,7 @@ async function uploadAndPrintFile(ctx, file, hooks = {}) {
|
|
|
38241
38507
|
}
|
|
38242
38508
|
}
|
|
38243
38509
|
|
|
38244
|
-
const ezpPrinterSelectionCss = () => `:host{--ezp-
|
|
38510
|
+
const ezpPrinterSelectionCss = () => `:host{--ezp-status-border-radius:16px;background:var(--ezp-printerSelection-background, var(--ezp-core-backdrop));-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;inset:var(--ezp-printerSelection-inset, 0);overflow-y:auto;padding:var(--ezp-printerSelection-padding, var(--ezp-spacing-5));position:var(--ezp-printerSelection-position, fixed);z-index:1}:host(.seamless){--ezp-printerSelection-background:transparent;--ezp-printerSelection-box-background:transparent;--ezp-printerSelection-box-boxShadow:none;--ezp-printerSelection-box-margin:0;--ezp-printerSelection-box-padding:0;--ezp-printerSelection-inset:auto;--ezp-printerSelection-padding:0;--ezp-printerSelection-position:static;--ezp-printerSelection-width:100%}#box{background:var(--ezp-printerSelection-box-background, var(--ezp-core-surface-tertiary));border-radius:16px;-webkit-box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));color:var(--ezp-core-foreground-primary);margin:var(--ezp-printerSelection-box-margin, auto);padding:var(--ezp-printerSelection-box-padding, 0);position:relative;width:var(--ezp-printerSelection-width, 384px)}#header{-ms-flex-align:center;align-items:center;border-bottom:1px solid var(--ezp-core-outline);color:var(--ezp-core-foreground-primary);display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);-ms-flex-pack:justify;justify-content:space-between;padding:var(--ezp-spacing-4);position:relative;z-index:3}#title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0}#title ezp-label{--ezp-label-fontSize:20px;--ezp-label-lineHeight:26px}#files-badge{background:var(--ezp-theme-translucent);border-radius:999px;color:var(--ezp-theme-solid);font-size:12px;font-weight:600;line-height:1;padding:5px 10px;white-space:nowrap}#header-actions{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2)}#body{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-tertiary));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-4)}#files-card{background:var(--ezp-core-surface-secondary);border-radius:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);padding:var(--ezp-spacing-3) var(--ezp-spacing-4)}.file-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0;position:relative}.file-row ezp-file-name{-ms-flex:0 1 auto;flex:0 1 auto}.file-row-icon{--ezp-icon-size:18px;--ezp-icon-gridTemplate:18px;color:var(--ezp-theme-solid);-ms-flex-negative:0;flex-shrink:0}#printer-caption{color:var(--ezp-core-foreground-secondary);letter-spacing:0.08em;padding:0 var(--ezp-spacing-1);text-transform:uppercase}#printer-card{border-radius:12px;-webkit-box-shadow:inset 0 0 0 1px var(--ezp-core-outline);box-shadow:inset 0 0 0 1px var(--ezp-core-outline);position:relative}#printer{--ezp-select-label-display:none;--ezp-select-toggle-gridTemplateAreas:'icon value accessory';--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-textAlign:left}#print{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-theme-solid);border:0;border-radius:8px;color:var(--ezp-white-100);cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;gap:var(--ezp-spacing-3);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:13px var(--ezp-spacing-4);-webkit-transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);width:100%}#print ezp-icon{--ezp-icon-size:20px;--ezp-icon-gridTemplate:20px}@media (hover: hover){#print:not(:disabled):hover{opacity:0.9}#print:not(:disabled):active{opacity:0.8}}#print:disabled{background:var(--ezp-core-shade-primary);color:var(--ezp-core-foreground-tertiary);cursor:default}#options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#options>*{-webkit-box-shadow:inset 0 -1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 -1px 0 0 var(--ezp-core-outline)}#options>*:last-child{-webkit-box-shadow:none;box-shadow:none}#footer{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-tertiary));border-radius:0 0 16px 16px;border-top:1px solid var(--ezp-core-outline);bottom:0;display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr;padding:var(--ezp-spacing-4);position:-webkit-sticky;position:sticky;z-index:3}#cancel{--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-borderRadius:8px;--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-color-init:var(--ezp-core-foreground-primary);--ezp-textButton-padding:13px var(--ezp-spacing-3)}`;
|
|
38245
38511
|
|
|
38246
38512
|
const EzpPrinterSelection = class {
|
|
38247
38513
|
constructor(hostRef) {
|
|
@@ -38294,6 +38560,10 @@ const EzpPrinterSelection = class {
|
|
|
38294
38560
|
this.hubDriverError = false;
|
|
38295
38561
|
this.userMenuOpen = false;
|
|
38296
38562
|
this.printStopped = false;
|
|
38563
|
+
/** Starts empty so the dialog can still render if the list never arrives. */
|
|
38564
|
+
this.printers = [];
|
|
38565
|
+
/** Starts empty so the dialog renders even if the list never loads. */
|
|
38566
|
+
this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
|
|
38297
38567
|
this.selectedPrinterConfig = {
|
|
38298
38568
|
Default: {
|
|
38299
38569
|
Color: '',
|
|
@@ -38326,6 +38596,8 @@ const EzpPrinterSelection = class {
|
|
|
38326
38596
|
trayname: '',
|
|
38327
38597
|
PageRanges: '',
|
|
38328
38598
|
};
|
|
38599
|
+
/** True while a printer's capabilities are being fetched. */
|
|
38600
|
+
this.loadingPrinterConfig = false;
|
|
38329
38601
|
this.currentFileIndex = 0;
|
|
38330
38602
|
this.totalFiles = 0;
|
|
38331
38603
|
this.failedFiles = [];
|
|
@@ -38516,8 +38788,7 @@ const EzpPrinterSelection = class {
|
|
|
38516
38788
|
if (hubTimeout)
|
|
38517
38789
|
clearTimeout(hubTimeout);
|
|
38518
38790
|
}
|
|
38519
|
-
|
|
38520
|
-
storage.setPrinter(this.selectedPrinter);
|
|
38791
|
+
this.rememberSelection();
|
|
38521
38792
|
this.printStopped = false;
|
|
38522
38793
|
};
|
|
38523
38794
|
this.handleUserMenu = () => {
|
|
@@ -38610,20 +38881,45 @@ const EzpPrinterSelection = class {
|
|
|
38610
38881
|
break;
|
|
38611
38882
|
}
|
|
38612
38883
|
}
|
|
38613
|
-
|
|
38614
|
-
|
|
38615
|
-
|
|
38616
|
-
|
|
38617
|
-
|
|
38884
|
+
/** Print needs a printer with its capabilities in hand, no job in flight and
|
|
38885
|
+
* a valid page range. The config matters: between picking a printer and its
|
|
38886
|
+
* properties arriving, the selection is set but the properties still hold
|
|
38887
|
+
* blank defaults, and printing then saves those as that printer's settings. */
|
|
38888
|
+
get printDisabled() {
|
|
38889
|
+
return (this.selectedPrinter.id === '' ||
|
|
38890
|
+
this.loadingPrinterConfig ||
|
|
38891
|
+
this.printProcessing ||
|
|
38892
|
+
this.pageRangeInvalid);
|
|
38893
|
+
}
|
|
38894
|
+
/** Keep this printer and its settings for the next print. Stored per printer,
|
|
38895
|
+
* so each one keeps its own and no setting follows the user to a printer
|
|
38896
|
+
* that cannot do it. */
|
|
38897
|
+
rememberSelection() {
|
|
38898
|
+
if (!this.selectedPrinter.id)
|
|
38899
|
+
return;
|
|
38900
|
+
storage.setPrinterSettings(this.selectedPrinter.id, pickRememberedProperties(this.selectedProperties));
|
|
38901
|
+
storage.setPrinter(this.selectedPrinter);
|
|
38902
|
+
}
|
|
38903
|
+
/**
|
|
38904
|
+
* Decide which printer the dialog opens on: the one last printed to, or the
|
|
38905
|
+
* user's only printer when there is nothing to choose between. Its settings
|
|
38906
|
+
* follow once its config is in, since they can only be validated against the
|
|
38907
|
+
* printer's capabilities.
|
|
38908
|
+
*/
|
|
38909
|
+
selectInitialPrinter() {
|
|
38910
|
+
var _a, _b;
|
|
38618
38911
|
const savedPrinter = storage.getPrinter();
|
|
38619
|
-
|
|
38620
|
-
|
|
38621
|
-
|
|
38622
|
-
|
|
38623
|
-
|
|
38624
|
-
|
|
38625
|
-
|
|
38626
|
-
|
|
38912
|
+
const savedIsAvailable = (_a = this.printers) === null || _a === void 0 ? void 0 : _a.some((printer) => printer.id === (savedPrinter === null || savedPrinter === void 0 ? void 0 : savedPrinter.id));
|
|
38913
|
+
// A printer the user no longer has must not stay preselected.
|
|
38914
|
+
if (savedPrinter && !savedIsAvailable)
|
|
38915
|
+
storage.clearSavedPrinter();
|
|
38916
|
+
if (savedPrinter && savedIsAvailable) {
|
|
38917
|
+
this.selectedPrinter = savedPrinter;
|
|
38918
|
+
}
|
|
38919
|
+
else if (((_b = this.printers) === null || _b === void 0 ? void 0 : _b.length) === 1) {
|
|
38920
|
+
// Nothing to pick between: opening a dropdown with one entry in it is
|
|
38921
|
+
// busywork, so start on it.
|
|
38922
|
+
this.selectedPrinter = this.printers[0];
|
|
38627
38923
|
}
|
|
38628
38924
|
else {
|
|
38629
38925
|
this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
|
|
@@ -38642,17 +38938,22 @@ const EzpPrinterSelection = class {
|
|
|
38642
38938
|
}
|
|
38643
38939
|
async setSelectedProperties(eventDetails) {
|
|
38644
38940
|
switch (eventDetails.type) {
|
|
38645
|
-
case 'printer':
|
|
38646
|
-
this.
|
|
38647
|
-
this.selectedPrinter
|
|
38648
|
-
|
|
38649
|
-
|
|
38650
|
-
|
|
38651
|
-
.
|
|
38652
|
-
|
|
38653
|
-
|
|
38654
|
-
|
|
38941
|
+
case 'printer': {
|
|
38942
|
+
const picked = this.printers.find((printer) => printer.id === eventDetails.id);
|
|
38943
|
+
this.selectedPrinter = picked !== null && picked !== void 0 ? picked : {
|
|
38944
|
+
id: eventDetails.id,
|
|
38945
|
+
name: eventDetails.title,
|
|
38946
|
+
location: '',
|
|
38947
|
+
is_queue: eventDetails.is_queue,
|
|
38948
|
+
};
|
|
38949
|
+
// Same guard as the initial load. Without it a failed fetch left the
|
|
38950
|
+
// printer selected while the config still described the *previous*
|
|
38951
|
+
// one: Print stayed enabled, the job went out with settings nothing
|
|
38952
|
+
// had checked against this printer, and those settings were then
|
|
38953
|
+
// saved under its id and restored on later opens.
|
|
38954
|
+
await this.loadSelectedPrinterConfig();
|
|
38655
38955
|
break;
|
|
38956
|
+
}
|
|
38656
38957
|
case 'color':
|
|
38657
38958
|
this.selectedProperties.color =
|
|
38658
38959
|
eventDetails.title == instance.t('printer_selection.color_color') ? true : false;
|
|
@@ -38717,6 +39018,55 @@ const EzpPrinterSelection = class {
|
|
|
38717
39018
|
onJobId: (jobId) => (printStore.state.jobID = jobId),
|
|
38718
39019
|
});
|
|
38719
39020
|
}
|
|
39021
|
+
/**
|
|
39022
|
+
* What a dropdown should show: the current selection — restored from the last
|
|
39023
|
+
* print, or just made by the user — and otherwise the printer's own default.
|
|
39024
|
+
*
|
|
39025
|
+
* The fallbacks matter because a config may describe its default only by name
|
|
39026
|
+
* (`Default.Duplex`, `Default.Paper`, `Default.Tray`) without flagging the
|
|
39027
|
+
* matching entry, which is all these dropdowns had to go on before settings
|
|
39028
|
+
* were remembered.
|
|
39029
|
+
*/
|
|
39030
|
+
duplexPreSelection() {
|
|
39031
|
+
var _a;
|
|
39032
|
+
if (!this.selectedPrinter.id)
|
|
39033
|
+
return null;
|
|
39034
|
+
const mode = Number(this.selectedProperties.duplexmode);
|
|
39035
|
+
if (mode)
|
|
39036
|
+
return mode;
|
|
39037
|
+
switch ((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Duplex) {
|
|
39038
|
+
case 'duplex_simplex':
|
|
39039
|
+
return instance.t('printer_selection.duplex_none');
|
|
39040
|
+
case 'duplex_vertical':
|
|
39041
|
+
return instance.t('printer_selection.duplex_long');
|
|
39042
|
+
case 'duplex_horizontal':
|
|
39043
|
+
return instance.t('printer_selection.duplex_short');
|
|
39044
|
+
default:
|
|
39045
|
+
return null;
|
|
39046
|
+
}
|
|
39047
|
+
}
|
|
39048
|
+
paperPreSelection() {
|
|
39049
|
+
var _a, _b;
|
|
39050
|
+
if (!this.selectedPrinter.id)
|
|
39051
|
+
return null;
|
|
39052
|
+
if (this.selectedProperties.paper)
|
|
39053
|
+
return this.selectedProperties.paper;
|
|
39054
|
+
const name = (_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Paper;
|
|
39055
|
+
return name && ((_b = this.selectedPrinterConfig.PaperFormats) === null || _b === void 0 ? void 0 : _b.some((el) => el.Name.includes(name)))
|
|
39056
|
+
? name
|
|
39057
|
+
: null;
|
|
39058
|
+
}
|
|
39059
|
+
trayPreSelection() {
|
|
39060
|
+
var _a, _b;
|
|
39061
|
+
if (!this.selectedPrinter.id)
|
|
39062
|
+
return null;
|
|
39063
|
+
if (this.selectedProperties.trayname)
|
|
39064
|
+
return this.selectedProperties.trayname;
|
|
39065
|
+
const name = (_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Tray;
|
|
39066
|
+
return name && ((_b = this.selectedPrinterConfig.Trays) === null || _b === void 0 ? void 0 : _b.some((el) => el === null || el === void 0 ? void 0 : el.Name.includes(name)))
|
|
39067
|
+
? name
|
|
39068
|
+
: null;
|
|
39069
|
+
}
|
|
38720
39070
|
setDefaultPaperFormat() {
|
|
38721
39071
|
var _a, _b, _c, _d, _e;
|
|
38722
39072
|
let format;
|
|
@@ -38785,46 +39135,105 @@ const EzpPrinterSelection = class {
|
|
|
38785
39135
|
this.unsubscribeLanguage = subscribeToLanguageChange(this);
|
|
38786
39136
|
this.printService = new EzpPrintService(this.redirectURI, this.clientID);
|
|
38787
39137
|
this.printService.registerFetchInterceptor();
|
|
38788
|
-
|
|
38789
|
-
|
|
38790
|
-
.
|
|
38791
|
-
|
|
38792
|
-
|
|
38793
|
-
|
|
39138
|
+
try {
|
|
39139
|
+
// A missing display name must not stop the user from printing.
|
|
39140
|
+
await this.getUserInfo().catch(() => undefined);
|
|
39141
|
+
let printersLoaded = false;
|
|
39142
|
+
try {
|
|
39143
|
+
const printers = await this.printService.getPrinterList(authStore.state.accessToken);
|
|
39144
|
+
// A failed request still resolves: the API answers with a `{code,
|
|
39145
|
+
// message}` body, which would survive `?? []` and break on `.some`.
|
|
39146
|
+
if (!Array.isArray(printers))
|
|
39147
|
+
throw new Error('Unexpected printer list payload');
|
|
39148
|
+
this.printers = printers;
|
|
39149
|
+
printersLoaded = true;
|
|
39150
|
+
}
|
|
39151
|
+
catch (_a) {
|
|
39152
|
+
this.printers = [];
|
|
39153
|
+
}
|
|
39154
|
+
if (!printersLoaded) {
|
|
39155
|
+
// Nothing is known about this user's printers, so the saved printer is
|
|
39156
|
+
// left untouched: treating it as gone would clear it from storage and
|
|
39157
|
+
// lose the settings that are only reachable through it.
|
|
38794
39158
|
this.noPrinters = true;
|
|
38795
39159
|
}
|
|
38796
|
-
|
|
38797
|
-
|
|
38798
|
-
|
|
38799
|
-
|
|
38800
|
-
|
|
38801
|
-
|
|
38802
|
-
|
|
38803
|
-
this.
|
|
38804
|
-
|
|
38805
|
-
|
|
39160
|
+
else {
|
|
39161
|
+
if (this.printers.length === 0) {
|
|
39162
|
+
this.noPrinters = true;
|
|
39163
|
+
}
|
|
39164
|
+
this.selectInitialPrinter();
|
|
39165
|
+
// A printer carried over from a previous print, or the only one the
|
|
39166
|
+
// user has, needs its config before its properties can be offered.
|
|
39167
|
+
if (this.selectedPrinter.id != '') {
|
|
39168
|
+
await this.loadSelectedPrinterConfig();
|
|
39169
|
+
}
|
|
39170
|
+
}
|
|
39171
|
+
let supportedExtensionsLoaded = false;
|
|
39172
|
+
try {
|
|
39173
|
+
const response = await (await this.printService.getConfig(authStore.state.accessToken)).json();
|
|
39174
|
+
printStore.state.supportedFileExtensions = response.System.FILEEXT;
|
|
39175
|
+
supportedExtensionsLoaded = true;
|
|
39176
|
+
}
|
|
39177
|
+
catch (_b) {
|
|
39178
|
+
// Handled below: without the list, nothing can be validated against it.
|
|
39179
|
+
}
|
|
39180
|
+
try {
|
|
39181
|
+
await this.printService
|
|
39182
|
+
.getAllPrinterProperties(authStore.state.accessToken)
|
|
39183
|
+
.then((printerConfig) => {
|
|
39184
|
+
this.printerConfig = printerConfig;
|
|
39185
|
+
});
|
|
39186
|
+
}
|
|
39187
|
+
catch (_c) {
|
|
39188
|
+
// Only used to describe other printers; the dialog works without it.
|
|
39189
|
+
}
|
|
39190
|
+
// Skipped when the list never arrived: every file would compare as
|
|
39191
|
+
// unsupported and the user would be told their document cannot be
|
|
39192
|
+
// printed when nothing is actually wrong with it.
|
|
39193
|
+
if (supportedExtensionsLoaded && this.files && this.files.length > 0) {
|
|
39194
|
+
// Validate all files
|
|
39195
|
+
const validationPromises = this.files.map((file) => this.validateFileType(file.name));
|
|
39196
|
+
const validationResults = await Promise.all(validationPromises);
|
|
39197
|
+
const allValid = validationResults.every((valid) => valid);
|
|
39198
|
+
this.notSupported = !allValid;
|
|
39199
|
+
}
|
|
39200
|
+
}
|
|
39201
|
+
finally {
|
|
39202
|
+
// Whatever failed above, the dialog has to become usable: the loading
|
|
39203
|
+
// status carries no close button, so throwing out of here would strand
|
|
39204
|
+
// the user on "Loading My Printers…" with no way back.
|
|
39205
|
+
this.loading = false;
|
|
39206
|
+
}
|
|
39207
|
+
}
|
|
39208
|
+
/**
|
|
39209
|
+
* Fetch the selected printer's capabilities and restore its saved settings.
|
|
39210
|
+
*
|
|
39211
|
+
* A failure drops the selection rather than keeping a printer the dialog
|
|
39212
|
+
* cannot describe: the options would stay disabled while Print stayed
|
|
39213
|
+
* enabled, so the job would go out with properties nothing has verified.
|
|
39214
|
+
* With no selection the user picks from the list, which fetches again.
|
|
39215
|
+
*/
|
|
39216
|
+
async loadSelectedPrinterConfig() {
|
|
39217
|
+
this.loadingPrinterConfig = true;
|
|
39218
|
+
try {
|
|
39219
|
+
const data = await this.printService.getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id);
|
|
39220
|
+
// An empty list or an error body leaves nothing to configure from.
|
|
39221
|
+
const config = data === null || data === void 0 ? void 0 : data[0];
|
|
39222
|
+
if (!config)
|
|
39223
|
+
throw new Error('No properties returned for the selected printer');
|
|
39224
|
+
this.selectedPrinterConfig = config;
|
|
39225
|
+
applySavedProperties(config, storage.getPrinterSettings(this.selectedPrinter.id), this.selectedProperties);
|
|
39226
|
+
this.setPaperid();
|
|
38806
39227
|
if (this.selectedProperties.paper === '') {
|
|
38807
39228
|
this.setDefaultPaperFormat();
|
|
38808
39229
|
}
|
|
38809
39230
|
}
|
|
38810
|
-
|
|
38811
|
-
.
|
|
38812
|
-
|
|
38813
|
-
|
|
38814
|
-
|
|
38815
|
-
await this.printService
|
|
38816
|
-
.getAllPrinterProperties(authStore.state.accessToken)
|
|
38817
|
-
.then((printerConfig) => {
|
|
38818
|
-
this.printerConfig = printerConfig;
|
|
38819
|
-
});
|
|
38820
|
-
if (this.files && this.files.length > 0) {
|
|
38821
|
-
// Validate all files
|
|
38822
|
-
const validationPromises = this.files.map((file) => this.validateFileType(file.name));
|
|
38823
|
-
const validationResults = await Promise.all(validationPromises);
|
|
38824
|
-
const allValid = validationResults.every((valid) => valid);
|
|
38825
|
-
this.notSupported = !allValid;
|
|
39231
|
+
catch (_a) {
|
|
39232
|
+
this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
|
|
39233
|
+
}
|
|
39234
|
+
finally {
|
|
39235
|
+
this.loadingPrinterConfig = false;
|
|
38826
39236
|
}
|
|
38827
|
-
this.loading = false;
|
|
38828
39237
|
}
|
|
38829
39238
|
disconnectedCallback() {
|
|
38830
39239
|
var _a;
|
|
@@ -38910,14 +39319,14 @@ const EzpPrinterSelection = class {
|
|
|
38910
39319
|
return null;
|
|
38911
39320
|
}
|
|
38912
39321
|
render() {
|
|
38913
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
39322
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
38914
39323
|
const fileNames = this.files && this.files.length > 0
|
|
38915
39324
|
? this.files.map((file) => file.name)
|
|
38916
39325
|
: this.filename
|
|
38917
39326
|
? [this.filename]
|
|
38918
39327
|
: [];
|
|
38919
39328
|
const fileCount = fileNames.length;
|
|
38920
|
-
return this.loading ? (h("ezp-status", { processing: true, description: instance.t('printer_selection.loading'), instance: "loading" })) : (h(Host, { class: { seamless: this.seamless } }, h("div", { id: "box", "data-backdrop-surface": true }, !this.printStopped && this.renderStatus(), !this.hideheader && (h("div", { id: "header" }, h("div", { id: "title" }, h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }), !this.notSupported && fileCount > 0 && (h("span", { id: "files-badge" }, instance.t('printer_selection.file_count', { count: fileCount })))), h("div", { id: "header-actions" }, !this.hidemenu && (h("ezp-icon-button", { level: "tertiary", icon: "menu", id: "toggle-menu", type: "button", onClick: this.handleUserMenu })), h("ezp-icon-button", { level: "tertiary", icon: "close", id: "close", type: "button", onClick: this.handleCancel })))), h("div", { id: "body" }, !this.notSupported && fileNames.length > 0 && (h("div", { id: "files-card" }, fileNames.map((name, index) => (h("div", { class: "file-row", key: index }, h("ezp-icon", { name: "file", class: "file-row-icon" }), h("ezp-
|
|
39329
|
+
return this.loading ? (h("ezp-status", { processing: true, description: instance.t('printer_selection.loading'), instance: "loading" })) : (h(Host, { class: { seamless: this.seamless } }, h("div", { id: "box", "data-backdrop-surface": true }, !this.printStopped && this.renderStatus(), !this.hideheader && (h("div", { id: "header" }, h("div", { id: "title" }, h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }), !this.notSupported && fileCount > 0 && (h("span", { id: "files-badge" }, instance.t('printer_selection.file_count', { count: fileCount })))), h("div", { id: "header-actions" }, !this.hidemenu && (h("ezp-icon-button", { level: "tertiary", icon: "menu", id: "toggle-menu", type: "button", onClick: this.handleUserMenu })), h("ezp-icon-button", { level: "tertiary", icon: "close", id: "close", type: "button", onClick: this.handleCancel })))), h("div", { id: "body" }, !this.notSupported && fileNames.length > 0 && (h("div", { id: "files-card" }, fileNames.map((name, index) => (h("div", { class: "file-row", key: index }, h("ezp-icon", { name: "file", class: "file-row-icon" }), h("ezp-file-name", { name: name, placement: index === 0 ? 'bottom' : 'top' })))))), h("ezp-label", { id: "printer-caption", level: "tertiary", weight: "heavy", text: instance.t('printer_selection.printer') }), h("div", { id: "printer-card" }, h("ezp-select", { id: "printer", label: instance.t('printer_selection.printer'), icon: "printer", placeholder: this.printers.length > 0
|
|
38921
39330
|
? instance.t('printer_selection.select_printer')
|
|
38922
39331
|
: instance.t('printer_selection.no_printers'), toggleFlow: "vertical", optionFlow: "vertical", options: this.printers.map((printer) => ({
|
|
38923
39332
|
id: printer.id,
|
|
@@ -38925,60 +39334,48 @@ const EzpPrinterSelection = class {
|
|
|
38925
39334
|
meta: printer.location !== '' ? printer.location : '',
|
|
38926
39335
|
type: 'printer',
|
|
38927
39336
|
is_queue: printer.is_queue,
|
|
38928
|
-
})), preSelected: this.selectedPrinter.id ? this.selectedPrinter.name : null, disabled: !(this.printers.length > 0) })
|
|
39337
|
+
})), preSelected: this.selectedPrinter.id ? this.selectedPrinter.name : null, disabled: !(this.printers.length > 0) })), h("div", { id: "options" }, h("ezp-stepper", { label: instance.t('printer_selection.copies') }), h("ezp-select", { label: instance.t('printer_selection.color'), placeholder: instance.t('printer_selection.select_color'), toggleFlow: "horizontal", options: (_a = this.ColorOptions) === null || _a === void 0 ? void 0 : _a.map((option) => ({
|
|
38929
39338
|
id: option.id,
|
|
38930
39339
|
title: option.title,
|
|
38931
39340
|
meta: '',
|
|
38932
39341
|
type: 'color',
|
|
38933
|
-
})), preSelected: this.selectedPrinter.id
|
|
38934
|
-
?
|
|
38935
|
-
|
|
39342
|
+
})), preSelected: this.selectedPrinter.id
|
|
39343
|
+
? this.selectedProperties.color
|
|
39344
|
+
? instance.t('printer_selection.color_color')
|
|
39345
|
+
: instance.t('printer_selection.color_grayscale')
|
|
39346
|
+
: null, disabled: !this.selectedPrinterConfig.ColorSupported }), h("ezp-select", { label: instance.t('printer_selection.duplex'), placeholder: instance.t('printer_selection.select_duplex'), toggleFlow: "horizontal", options: (_b = this.duplexOptions) === null || _b === void 0 ? void 0 : _b.map((option) => ({
|
|
38936
39347
|
id: option.id,
|
|
38937
39348
|
title: option.title,
|
|
38938
39349
|
meta: '',
|
|
38939
39350
|
type: 'duplex',
|
|
38940
|
-
})), preSelected: this.
|
|
38941
|
-
((_d = this.selectedPrinterConfig.Default) === null || _d === void 0 ? void 0 : _d.Duplex) == 'duplex_simplex'
|
|
38942
|
-
? instance.t('printer_selection.duplex_none')
|
|
38943
|
-
: ((_e = this.selectedPrinterConfig.Default) === null || _e === void 0 ? void 0 : _e.Duplex) == 'duplex_vertical'
|
|
38944
|
-
? instance.t('printer_selection.duplex_long')
|
|
38945
|
-
: ((_f = this.selectedPrinterConfig.Default) === null || _f === void 0 ? void 0 : _f.Duplex) == 'duplex_horizontal'
|
|
38946
|
-
? instance.t('printer_selection.duplex_short')
|
|
38947
|
-
: null, disabled: !this.selectedPrinterConfig.DuplexSupported }), h("ezp-select", { label: instance.t('printer_selection.size'), icon: "size", placeholder: instance.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.PaperFormats &&
|
|
39351
|
+
})), preSelected: this.duplexPreSelection(), disabled: !this.selectedPrinterConfig.DuplexSupported }), h("ezp-select", { label: instance.t('printer_selection.size'), placeholder: instance.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.PaperFormats &&
|
|
38948
39352
|
this.selectedPrinterConfig.PaperFormats.map((format) => ({
|
|
38949
39353
|
id: format.Id,
|
|
38950
39354
|
title: format.Name,
|
|
38951
39355
|
meta: `${format.XRes} x ${format.YRes}`,
|
|
38952
39356
|
type: 'format',
|
|
38953
|
-
})), preSelected: this.
|
|
38954
|
-
((_g = this.selectedPrinterConfig.PaperFormats) === null || _g === void 0 ? void 0 : _g.find((el) => { var _a; return el.Name.includes((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Paper); }))
|
|
38955
|
-
? (_h = this.selectedPrinterConfig.Default) === null || _h === void 0 ? void 0 : _h.Paper
|
|
38956
|
-
: null, disabled: !(((_k = (_j = this.selectedPrinterConfig.PaperFormats) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0) > 0) }), this.paperid == PAPER_ID ? (h(Fragment, null, h("ezp-input", { icon: "width", suffix: "mm", value: this.selectedProperties.paperwidth, eventType: "width", type: "number", label: instance.t('printer_selection.width') }), h("ezp-input", { icon: "height", suffix: "mm", value: this.selectedProperties.paperlength, eventType: "length", type: "number", label: instance.t('printer_selection.length') }))) : null, h("ezp-select", { label: instance.t('printer_selection.orientation'), icon: "orientation", placeholder: instance.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: (_l = this.selectedPrinterConfig.OrientationsSupported) === null || _l === void 0 ? void 0 : _l.map((orientation, index) => ({
|
|
39357
|
+
})), preSelected: this.paperPreSelection(), disabled: !(((_d = (_c = this.selectedPrinterConfig.PaperFormats) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0) }), this.paperid == PAPER_ID ? (h(Fragment, null, h("ezp-input", { suffix: "mm", value: this.selectedProperties.paperwidth, eventType: "width", type: "number", label: instance.t('printer_selection.width') }), h("ezp-input", { suffix: "mm", value: this.selectedProperties.paperlength, eventType: "length", type: "number", label: instance.t('printer_selection.length') }))) : null, h("ezp-select", { label: instance.t('printer_selection.orientation'), placeholder: instance.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: (_e = this.selectedPrinterConfig.OrientationsSupported) === null || _e === void 0 ? void 0 : _e.map((orientation, index) => ({
|
|
38957
39358
|
id: index + 1,
|
|
38958
39359
|
title: instance.t(`printer_selection.orientation_${orientation}`),
|
|
38959
39360
|
meta: '',
|
|
38960
39361
|
type: 'orientation',
|
|
38961
|
-
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.orientation : null, disabled: !(((
|
|
39362
|
+
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.orientation : null, disabled: !(((_g = (_f = this.selectedPrinterConfig.OrientationsSupported) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0) > 0) }), h("ezp-select", { label: instance.t('printer_selection.quality'), placeholder: instance.t('printer_selection.select_quality'), toggleFlow: "horizontal", options: (_h = this.selectedPrinterConfig.Resolutions) === null || _h === void 0 ? void 0 : _h.map((option, index) => ({
|
|
38962
39363
|
id: index,
|
|
38963
39364
|
title: option,
|
|
38964
39365
|
meta: '',
|
|
38965
39366
|
type: 'quality',
|
|
38966
|
-
})), preSelected: this.selectedPrinter.id
|
|
38967
|
-
|
|
38968
|
-
|
|
38969
|
-
: null, disabled: !(((_u = (_t = this.selectedPrinterConfig.Resolutions) === null || _t === void 0 ? void 0 : _t.length) !== null && _u !== void 0 ? _u : 0) > 0) }), this.selectedPrinterConfig.Trays &&
|
|
39367
|
+
})), preSelected: this.selectedPrinter.id
|
|
39368
|
+
? this.selectedProperties.resolution || null
|
|
39369
|
+
: null, disabled: !(((_k = (_j = this.selectedPrinterConfig.Resolutions) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0) > 0) }), this.selectedPrinterConfig.Trays &&
|
|
38970
39370
|
this.selectedPrinterConfig.Trays.length >= 1 &&
|
|
38971
|
-
this.selectedPrinterConfig.Trays[0] != null ? (h("ezp-select", { label: instance.t('printer_selection.trays'),
|
|
39371
|
+
this.selectedPrinterConfig.Trays[0] != null ? (h("ezp-select", { label: instance.t('printer_selection.trays'), placeholder: instance.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1
|
|
38972
39372
|
? this.selectedPrinterConfig.Trays.map((trays) => ({
|
|
38973
39373
|
title: trays.Name,
|
|
38974
39374
|
id: trays.Index,
|
|
38975
39375
|
meta: '',
|
|
38976
39376
|
type: 'tray',
|
|
38977
39377
|
}))
|
|
38978
|
-
: undefined, preSelected: this.
|
|
38979
|
-
((_v = this.selectedPrinterConfig.Trays) === null || _v === void 0 ? void 0 : _v.find((el) => { var _a; return el.Name.includes((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Tray); }))
|
|
38980
|
-
? (_w = this.selectedPrinterConfig.Default) === null || _w === void 0 ? void 0 : _w.Tray
|
|
38981
|
-
: null })) : null, h("ezp-input", { icon: "paper_range", suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: instance.t('printer_selection.page_ranges') }))), h("div", { id: "footer" }, h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: instance.t('button_actions.cancel'), class: "action", id: "cancel" })), !this.hidemenu && h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
|
|
39378
|
+
: undefined, preSelected: this.trayPreSelection() })) : null, h("ezp-input", { suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: instance.t('printer_selection.page_ranges') }))), h("div", { id: "footer" }, h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: instance.t('button_actions.cancel'), class: "action", id: "cancel" }), h("button", { id: "print", type: "button", disabled: this.printDisabled, onClick: this.handlePrint, ref: (button) => (this.printButton = button) }, h("ezp-icon", { name: "printer" }), h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }))), !this.hidemenu && h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
|
|
38982
39379
|
}
|
|
38983
39380
|
};
|
|
38984
39381
|
EzpPrinterSelection.style = ezpPrinterSelectionCss();
|
|
@@ -39328,7 +39725,7 @@ const EzpPrinting = class {
|
|
|
39328
39725
|
*
|
|
39329
39726
|
*/
|
|
39330
39727
|
render() {
|
|
39331
|
-
return (h(Host, { key: '
|
|
39728
|
+
return (h(Host, { key: '988a7acf819e139fe6d103b122bf9181e848be82', class: `${userStore.state.theme} ${userStore.state.appearance === 'system'
|
|
39332
39729
|
? this.systemAppearance
|
|
39333
39730
|
: userStore.state.appearance} ${this.seamless ? 'seamless' : ''}` }, this.trigger === 'custom' ? (h("slot", null)) : this.trigger === 'file' ? (h("ezp-upload", null)) : (this.trigger === 'button' && (h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))), this.authOpen ? (h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin, trigger: this.trigger, code: this.code })) : this.printOpen ? (h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid, files: this.files, hidemenu: this.hidemenu, hideheader: this.hideheader, seamless: this.seamless })) : this.noDocumentOpen ? (h("ezp-dialog", { heading: instance.t('no_document_dialog.heading'), description: instance.t('no_document_dialog.description'), action: instance.t('no_document_dialog.action'), iconName: "question-mark", instance: "no-document-selected" })) : null));
|
|
39334
39731
|
}
|
|
@@ -39349,7 +39746,7 @@ const EzpPrinting = class {
|
|
|
39349
39746
|
};
|
|
39350
39747
|
EzpPrinting.style = ezpPrintingCss();
|
|
39351
39748
|
|
|
39352
|
-
const ezpSelectCss = () => `:host{--ezp-select-duration:var(--ezp-duration-3)
|
|
39749
|
+
const ezpSelectCss = () => `:host{--ezp-select-duration:var(--ezp-duration-3);display:block;height:var(--ezp-select-toggle-height);position:relative;-webkit-transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));z-index:var(--ezp-select-zIndex, 3)}:host(.toggle-horizontal){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:'label value accessory';--ezp-select-toggle-gridTemplateColumns:1fr repeat(2, auto);--ezp-select-toggle-height:56px;--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-alignSelf:center}:host(.toggle-horizontal.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr repeat(2, auto)}:host(.toggle-vertical){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:'label accessory' 'value accessory';--ezp-select-toggle-gridTemplateColumns:1fr auto;--ezp-select-toggle-height:64px;--ezp-select-toggle-gridTemplateRows:repeat(2, auto);--ezp-select-value-alignSelf:center}:host(.toggle-vertical.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label accessory' 'icon value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr auto}:host(.option-horizontal){--ezp-select-details-gridTemplateColumns:repeat(2, 1fr);--ezp-select-details-gridTemplateRows:auto;--ezp-select-option-height:44px}:host(.option-vertical){--ezp-select-details-gridTemplateColumns:1fr;--ezp-select-details-gridTemplateRows:repeat(2, auto);--ezp-select-option-height:52px}:host(.toggle-vertical.has-icon){--ezp-select-badge-borderRadius:10px;--ezp-select-badge-height:40px;--ezp-select-badge-width:40px;--ezp-select-label-textTransform:uppercase;--ezp-select-label-letterSpacing:0.08em;--ezp-select-label-fontSize:11px;--ezp-select-value-fontSize:16px;--ezp-select-value-fontWeight:600;--ezp-select-value-color:var(--ezp-core-foreground-primary)}:host(.is-expanded){--ezp-select-accessory-color:var(--ezp-theme-solid);--ezp-select-transition:z-index 0s 0s;--ezp-select-zIndex:9999;--ezp-select-label-color:var(--ezp-theme-solid);--ezp-select-toggle-background:var(--ezp-theme-translucent);--ezp-select-wrap-background:var(--ezp-core-surface-tertiary);--ezp-select-wrap-borderRadius:12px;--ezp-select-wrap-boxShadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop)}:host(.disabled){--ezp-select-accessory-color:var(--ezp-core-foreground-tertiary);--ezp-select-badge-background:var(--ezp-core-shade-primary);--ezp-select-badge-color:var(--ezp-core-foreground-tertiary);--ezp-select-label-color:var(--ezp-core-foreground-tertiary);--ezp-select-toggle-background-hover:transparent;--ezp-select-toggle-cursor:default;--ezp-select-value-color:var(--ezp-core-foreground-tertiary);--value-color:var(--ezp-core-foreground-tertiary)}#wrap{background:var(--ezp-select-wrap-background, transparent);border-radius:var(--ezp-select-wrap-borderRadius, 12px);-webkit-box-shadow:var(--ezp-select-wrap-boxShadow, none);box-shadow:var(--ezp-select-wrap-boxShadow, none);-webkit-transform:translateY(var(--ezp-select-wrap-translateY, 0));transform:translateY(var(--ezp-select-wrap-translateY, 0));-webkit-transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart)}#toggle{background:var(--ezp-select-toggle-background, transparent);border-radius:var(--ezp-select-wrap-borderRadius, 12px);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:var(--ezp-select-toggle-cursor, pointer);display:grid;gap:2px var(--ezp-spacing-3);grid-template-areas:var(--ezp-select-toggle-gridTemplateAreas, none);grid-template-columns:var(--ezp-select-toggle-gridTemplateColumns, none);grid-template-rows:var(--ezp-select-toggle-gridTemplateRows, auto);height:var(--ezp-select-toggle-height, auto);padding:var(--ezp-spacing-2) var(--ezp-spacing-3);-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart)}#toggle:hover{--ezp-select-toggle-background:var( --ezp-select-toggle-background-hover, var(--ezp-core-shade-primary) )}#icon{--ezp-icon-background:var(--ezp-select-badge-background, var(--ezp-theme-translucent));--ezp-icon-borderRadius:var(--ezp-select-badge-borderRadius, 50%);--ezp-icon-height:var(--ezp-select-badge-height, 40px);--ezp-icon-width:var(--ezp-select-badge-width, 40px);align-self:center;color:var(--ezp-select-badge-color, var(--ezp-theme-solid));grid-area:icon}#label{--ezp-label-fontSize:var(--ezp-select-label-fontSize, 14px);--ezp-label-letterSpacing:var(--ezp-select-label-letterSpacing, normal);align-self:var(--ezp-select-label-alignSelf, auto);color:var(--ezp-select-label-color, var(--ezp-core-foreground-primary));display:var(--ezp-select-label-display, block);grid-area:label;text-transform:var(--ezp-select-label-textTransform, none)}#value{--ezp-label-fontSize:var(--ezp-select-value-fontSize, 14px);--ezp-label-fontWeight:var(--ezp-select-value-fontWeight, 400);align-self:var(--ezp-select-value-alignSelf, auto);color:var(--ezp-select-value-color, var(--value-color, var(--ezp-core-foreground-secondary)));grid-area:value;text-align:var(--ezp-select-value-textAlign, right)}#accessory{align-self:center;color:var(--ezp-select-accessory-color, var(--ezp-core-foreground-tertiary));grid-area:accessory}#list{-webkit-box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);height:var(--ezp-select-list-height, 0);overflow:auto;-webkit-transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart)}.option{background:var(--ezp-select-option-background);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;height:var(--ezp-select-option-height, auto);padding:0 0 0 var(--ezp-spacing-3)}.option:not(:last-child){--ezp-select-details-boxShadow:inset 0 -1px 0 0 var(--ezp-core-outline)}.option:hover{--ezp-select-option-background:var(--ezp-core-shade-primary)}.option:active{--ezp-select-option-background:var(--ezp-core-shade-secondary)}.option.is-selected{--ezp-select-indicator-opacity:1;--ezp-select-indicator-transform:translateX(0);--ezp-select-indicator-transition:opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-select-indicator-visibility:visible}.indicator{-ms-flex-item-align:center;align-self:center;color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0;opacity:var(--ezp-select-indicator-opacity, 0);-webkit-transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));-webkit-transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));visibility:var(--ezp-select-indicator-visibility, hidden)}.details{-webkit-box-shadow:var(--ezp-select-details-boxShadow);box-shadow:var(--ezp-select-details-boxShadow);display:grid;gap:var(--ezp-spacing-2);grid-template-columns:var(--ezp-select-details-gridTemplateColumns, 1fr);grid-template-rows:var(--ezp-select-details-gridTemplateRows, auto);padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) 0}.title{-ms-flex-item-align:start;align-self:start;color:var(--ezp-core-foreground-primary)}.meta{-ms-flex-item-align:end;align-self:end;color:var(--ezp-core-foreground-secondary)}`;
|
|
39353
39750
|
|
|
39354
39751
|
/**
|
|
39355
39752
|
* The "nothing selected" sentinel. Its empty `title` makes the toggle fall back
|
|
@@ -39564,7 +39961,7 @@ const EzpSelect = class {
|
|
|
39564
39961
|
this.disabled ? 'disabled' : '',
|
|
39565
39962
|
];
|
|
39566
39963
|
const labelLevel = this.toggleFlow === 'horizontal' ? 'secondary' : 'tertiary';
|
|
39567
|
-
return (h(Host, { key: '
|
|
39964
|
+
return (h(Host, { key: '7dd328df209e8906917c97b8002bdcd9e2fafa0b', class: hostClasses.join(' ') }, h("div", { key: '522bbbfea1ef111af7bd7317cc6054138eca020d', id: "wrap" }, h("div", { key: 'd1c2c06a33f629d589e2247342467ebbd7283d1b', id: "toggle", role: "combobox", "aria-haspopup": "listbox", "aria-controls": "list", "aria-expanded": this.expanded ? 'true' : 'false', "aria-label": this.label, "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, ref: (el) => (this.toggleEl = el), onClick: () => !this.disabled && this.toggle(), onKeyDown: this.handleToggleKeydown }, this.icon ? h("ezp-icon", { id: "icon", name: this.icon }) : null, h("ezp-label", { key: 'c60d6dd802424b2502d1b9c9066732ef02909779', id: "label", noWrap: true, level: labelLevel, text: this.label }), h("ezp-label", { key: 'c92c91c848aec5b6ff386f32beb41bdaf4407613', id: "value", ellipsis: true, text: ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.title) !== '' ? (_b = this.selected) === null || _b === void 0 ? void 0 : _b.title : this.placeholder }), h("ezp-icon", { key: '7c653c97c7da8471e7db51c1ba04718842a9991b', id: "accessory", name: "expand" })), h("div", { key: '5c1aeeb45f4cbf1c4e26653312d6cc0a7e7084ce', id: "list", role: "listbox", "aria-label": this.label, ref: (element) => (this.list = element) }, (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => {
|
|
39568
39965
|
var _a, _b;
|
|
39569
39966
|
if (option.title !== '') {
|
|
39570
39967
|
return (h("div", { class: `option ${option.id === ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) ? 'is-selected' : ''} ${option.meta !== '' ? 'has-meta' : ''} `, role: "option", "aria-selected": option.id === ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.id) ? 'true' : 'false', tabindex: this.expanded ? 0 : -1, onClick: () => this.select(option.id), onKeyDown: (event) => this.handleOptionKeydown(event, option.id) }, h("ezp-icon", { name: "checkmark", class: "indicator" }), h("div", { class: "details" }, h("ezp-label", { class: "title", ellipsis: true, text: option.title }), option.meta !== '' ? (h("ezp-label", { level: "tertiary", class: "meta", text: option.meta, ellipsis: true })) : null)));
|
|
@@ -39634,9 +40031,9 @@ const EzpStatus = class {
|
|
|
39634
40031
|
return (
|
|
39635
40032
|
// Live region so screen readers announce status changes (loading,
|
|
39636
40033
|
// processing, success, error) as they render.
|
|
39637
|
-
h(Host, { key: '
|
|
40034
|
+
h(Host, { key: 'db32e5667bf9438a6d3d80807519ad2c158549ff', role: "status", "aria-live": "polite" }, h("div", { key: '815ecfbd3b272f206764ca852b8d865d7bc3cb8d', id: "box" }, this.processing ? (h("svg", { id: "indicator", viewBox: "0 0 42 42", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("circle", { id: "track", cx: "21", cy: "21", r: "18" }), h("circle", { id: "value", cx: "21", cy: "21", r: "18" }))) : this.icon ? (h("div", { id: "icon" }, h("div", { id: "icon-inner" }, h("ezp-icon", { name: this.icon })))) : null, h("ezp-label", { key: '385d4fbbd7ed1b7a4aa2334d6d2145c2f5207508', id: "description", weight: "heavy", text: this.description }), this.subtext && (h("ezp-label", { key: 'c6a243dd4ddc428f3e34021430d6b935f0a9e1a6', id: "subtext", level: "secondary", text: this.subtext })), (this.cancel || this.close || this.retry) && (h("div", { key: '0dfc5f86b6366b3631ac74c15e9d467a884feb52', id: "footer" }, this.cancel && (h("ezp-text-button", { key: 'a89289163ac7d630d35e887deead462c6dc29af4', class: "action secondary", level: "secondary", onClick: this.handleCancel, label: typeof this.cancel === 'string'
|
|
39638
40035
|
? this.cancel
|
|
39639
|
-
: instance.t('button_actions.cancel') })), this.close && (h("ezp-text-button", { key: '
|
|
40036
|
+
: instance.t('button_actions.cancel') })), this.close && (h("ezp-text-button", { key: 'd2e3814f2a81ce03f4e0f4bbcf7cc734ade37aa9', class: `action ${this.retry ? 'secondary' : 'primary'}`, level: this.retry ? 'secondary' : 'primary', onClick: this.handleClose, label: typeof this.close === 'string' ? this.close : instance.t('button_actions.close') })), this.retry && (h("ezp-text-button", { key: '6e53e77afc6c3954435b08c6daaa65dd829ce9ad', class: "action primary", level: "primary", onClick: this.handleRetry, label: typeof this.retry === 'string' ? this.retry : instance.t('button_actions.retry') })))))));
|
|
39640
40037
|
}
|
|
39641
40038
|
};
|
|
39642
40039
|
EzpStatus.style = ezpStatusCss();
|
|
@@ -39773,7 +40170,7 @@ const EzpStepper = class {
|
|
|
39773
40170
|
*
|
|
39774
40171
|
*/
|
|
39775
40172
|
render() {
|
|
39776
|
-
return (h(Host, { key: '
|
|
40173
|
+
return (h(Host, { key: 'cbf3ded61537359ed280a204bb71240d0a34473a', class: `${this.focused ? 'focused' : ''} ${this.icon ? 'has-icon' : ''}` }, h("div", { key: '1c7a265f60d06dbea4a80e19ecdaa4a10aed694c', id: "toggle", onClick: this.setFocus }), this.icon ? h("ezp-icon", { id: "icon", name: this.icon }) : null, h("ezp-label", { key: '9fd0e1128480dd9b288cb266542fd4e6b83ceebd', id: "label", noWrap: true, text: this.label }), h("div", { key: '975fc0539e76750d7457c71d40f228cb5ebcaad8', class: "buttons" }, h("button", { key: 'db01d05fdcbc4eda2810751ace0194d9a1ec9eb7', class: "button", type: "button", "aria-label": `Decrease ${this.label}`, disabled: !this.canDecrease, onClick: this.handleDecrease }, h("ezp-icon", { key: '7d938efa8426caf292403e94e3565d20dc40d121', name: "minus" })), h("input", { key: 'dbff518a5d1f28b3b23d597947c250bef71fd68a', id: "input", type: "number", ref: (input) => (this.input = input), min: this.min.toString(), max: this.max !== undefined ? this.max.toString() : undefined, value: this.value.toString(), "aria-label": this.label, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }), h("button", { key: 'b3001bb27f94f65fce51d3a69d7713e5da9ccdcc', class: "button", type: "button", "aria-label": `Increase ${this.label}`, disabled: !this.canIncrease, onClick: this.handleIncrease }, h("ezp-icon", { key: '534bb499fa2ced2591ccbc137186e59d22aa2f5f', name: "plus" })))));
|
|
39777
40174
|
}
|
|
39778
40175
|
static get watchers() { return {
|
|
39779
40176
|
"value": [{
|
|
@@ -39795,7 +40192,7 @@ EzpStepper.ALLOWED_KEYS = [
|
|
|
39795
40192
|
EzpStepper.CTRL_CMD_KEYS = ['a', 'c', 'v', 'x'];
|
|
39796
40193
|
EzpStepper.style = ezpStepperCss();
|
|
39797
40194
|
|
|
39798
|
-
const ezpTextButtonCss = () => `:host{display:-ms-flexbox;display:flex}:host(.primary){--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-init:var(--ezp-theme-solid);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-white-100);--ezp-textButton-opacity-active:0.74;--ezp-textButton-opacity-hover:0.84}:host(.secondary){--ezp-textButton-background-active:var(--ezp-core-shade-tertiary);--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-hover:var(--ezp-core-shade-secondary);--ezp-textButton-background-init:var(--ezp-core-shade-primary);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}:host(.tertiary){--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-disabled:transparent;--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}#button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-textButton-background, var(--ezp-textButton-background-init));border:0;border-radius:var(--ezp-textButton-borderRadius, 3px);-webkit-box-shadow:var(--ezp-textButton-boxShadow, none);box-shadow:var(--ezp-textButton-boxShadow, none);color:var(--ezp-textButton-color, var(--ezp-textButton-color-init));cursor:var(--ezp-textButton-cursor, pointer);display:-ms-flexbox;display:flex;font-family:inherit;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-textButton-opacity, 1);outline:none;padding:var(--ezp-textButton-padding, var(--ezp-spacing-3));white-space:nowrap;width:100%}@media (hover: hover){#button:not(:disabled):hover{--ezp-textButton-background:var( --ezp-textButton-background-hover, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-hover, 1)}#button:not(:disabled):active{--ezp-textButton-background:var( --ezp-textButton-background-active, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-active, 1)}}#button:disabled{--ezp-textButton-background:var(--ezp-textButton-background-disabled);--ezp-textButton-color:var(--ezp-textButton-color-disabled);--ezp-textButton-cursor:default}#label{pointer-events:none}`;
|
|
40195
|
+
const ezpTextButtonCss = () => `:host{display:-ms-flexbox;display:flex}:host(.primary){--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-init:var(--ezp-theme-solid);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-white-100);--ezp-textButton-opacity-active:0.74;--ezp-textButton-opacity-hover:0.84}:host(.secondary){--ezp-textButton-background-active:var(--ezp-core-shade-tertiary);--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-hover:var(--ezp-core-shade-secondary);--ezp-textButton-background-init:var(--ezp-core-shade-primary);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}:host(.tertiary){--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-disabled:transparent;--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}#button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-textButton-background, var(--ezp-textButton-background-init));border:0;border-radius:var(--ezp-textButton-borderRadius, 3px);-webkit-box-shadow:var(--ezp-textButton-boxShadow, none);box-shadow:var(--ezp-textButton-boxShadow, none);color:var(--ezp-textButton-color, var(--ezp-textButton-color-init));cursor:var(--ezp-textButton-cursor, pointer);display:-ms-flexbox;display:flex;font-family:inherit;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-textButton-opacity, 1);outline:none;padding:var(--ezp-textButton-padding, var(--ezp-spacing-3));white-space:var(--ezp-textButton-whiteSpace, nowrap);width:100%}@media (hover: hover){#button:not(:disabled):hover{--ezp-textButton-background:var( --ezp-textButton-background-hover, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-hover, 1)}#button:not(:disabled):active{--ezp-textButton-background:var( --ezp-textButton-background-active, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-active, 1)}}#button:disabled{--ezp-textButton-background:var(--ezp-textButton-background-disabled);--ezp-textButton-boxShadow:none;--ezp-textButton-color:var(--ezp-textButton-color-disabled);--ezp-textButton-cursor:default}#label{pointer-events:none}`;
|
|
39799
40196
|
|
|
39800
40197
|
const EzpTextButton = class {
|
|
39801
40198
|
constructor(hostRef) {
|
|
@@ -39830,12 +40227,12 @@ const EzpTextButton = class {
|
|
|
39830
40227
|
href: this.href,
|
|
39831
40228
|
target: this.blank ? '_blank' : '_self',
|
|
39832
40229
|
};
|
|
39833
|
-
return (h(Host, { key: '
|
|
40230
|
+
return (h(Host, { key: '31c3726d82b340fad817eec01f597b58702ff292', class: `${this.level}` }, h(TagType, Object.assign({ key: '5e26c8e81ab49575b1a29c309f7792a2286ee455', id: "button", "aria-label": this.label }, attributes), h("ezp-label", { key: 'b21b121c9da908b6cba286a528f8e6772c179a36', id: "label", weight: "heavy", text: this.label, level: this.small ? 'tertiary' : 'secondary' }))));
|
|
39834
40231
|
}
|
|
39835
40232
|
};
|
|
39836
40233
|
EzpTextButton.style = ezpTextButtonCss();
|
|
39837
40234
|
|
|
39838
|
-
const ezpUploadCss = () =>
|
|
40235
|
+
const ezpUploadCss = () => `@charset "UTF-8";:host{-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:block;height:var(--ezp-upload-height, auto);width:var(--ezp-upload-width, auto)}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}#form{display:block;height:100%}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#modal{background:var(--ezp-core-surface-tertiary);border-radius:16px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;overflow:hidden}:host(.dragging) #modal *{pointer-events:none}#body-frame{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;min-height:0;position:relative}#body{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;min-height:0;overflow-y:auto;padding:var(--ezp-spacing-4);scrollbar-width:thin}#dropzone{-ms-flex-align:center;align-items:center;background:var(--ezp-theme-translucent);border:1.5px dashed var(--ezp-theme-solid);border-radius:12px;-webkit-box-shadow:var(--ezp-upload-dropzone-boxShadow, none);box-shadow:var(--ezp-upload-dropzone-boxShadow, none);display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;min-height:160px;padding:var(--ezp-spacing-6) var(--ezp-spacing-4);text-align:center;-webkit-transition:-webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:-webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart)}:host(.dragging){--ezp-upload-dropzone-boxShadow:0 0 0 4px var(--ezp-theme-translucent)}:host(:not(.dragging)) #dropzone-title,:host(.dragging) #dropzone-prompt{display:none}#drop-overlay{-ms-flex-align:center;align-items:center;background:-webkit-gradient(linear, left top, left bottom, from(var(--ezp-theme-translucent)), to(var(--ezp-theme-translucent))), var(--ezp-core-surface-tertiary);background:linear-gradient(var(--ezp-theme-translucent), var(--ezp-theme-translucent)), var(--ezp-core-surface-tertiary);border:1.5px dashed var(--ezp-theme-solid);border-radius:12px;-webkit-box-shadow:0 0 0 4px var(--ezp-theme-translucent);box-shadow:0 0 0 4px var(--ezp-theme-translucent);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);inset:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;pointer-events:none;position:absolute;text-align:center;z-index:1}#dropzone-icon{--ezp-icon-size:32px;--ezp-icon-gridTemplate:32px;color:var(--ezp-theme-solid)}#dropzone-prompt{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3)}#choose{--ezp-textButton-borderRadius:8px;--ezp-textButton-padding:13px var(--ezp-spacing-5)}#drag-hint{color:var(--ezp-core-foreground-primary)}#formats{color:var(--ezp-core-foreground-secondary)}#files{border:1px solid var(--ezp-core-outline);border-radius:12px}.file{-ms-flex-align:center;align-items:center;display:grid;gap:var(--ezp-spacing-3);grid-template-columns:auto minmax(0, 1fr) auto;padding:var(--ezp-spacing-3) var(--ezp-spacing-4);position:relative}.file+.file{border-top:1px solid var(--ezp-core-outline)}.file-type{background:var(--ezp-theme-translucent);border-radius:6px;color:var(--ezp-theme-solid);font-size:11px;font-weight:600;letter-spacing:0.02em;line-height:1;overflow:hidden;padding:8px 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:56px}.file-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);min-width:0}.file-size{color:var(--ezp-core-foreground-secondary)}.file-remove{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:6px;color:var(--ezp-core-foreground-tertiary);cursor:pointer;display:-ms-flexbox;display:flex;height:28px;-ms-flex-pack:center;justify-content:center;padding:0;-webkit-transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:28px}.file-remove ezp-icon{--ezp-icon-size:16px;--ezp-icon-gridTemplate:16px}@media (hover: hover){.file-remove:hover{color:var(--ezp-core-foreground-primary)}}#add-more{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-upload-addMore-background, transparent);border:0;border-radius:0 0 11px 11px;border-top:1px solid var(--ezp-core-outline);color:var(--ezp-theme-solid);cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;gap:4px;-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:100%}#add-more ezp-icon{--ezp-icon-size:18px;--ezp-icon-gridTemplate:18px}@media (hover: hover){#add-more:hover{--ezp-upload-addMore-background:var(--ezp-core-shade-primary)}}#footer{border-top:1px solid var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr;padding:var(--ezp-spacing-4)}.action{--ezp-textButton-borderRadius:8px;--ezp-textButton-padding:13px var(--ezp-spacing-3);--ezp-textButton-whiteSpace:normal;text-align:center}#clear{--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-color-init:var(--ezp-core-foreground-primary)}`;
|
|
39839
40236
|
|
|
39840
40237
|
/** File formats advertised to the user as supported for printing. */
|
|
39841
40238
|
const SUPPORTED_FORMATS = ['PDF', 'DOCX', 'PNG', 'JPG', 'XLSX'];
|
|
@@ -39852,11 +40249,32 @@ const EzpUpload = class {
|
|
|
39852
40249
|
*/
|
|
39853
40250
|
this.selectedFiles = [];
|
|
39854
40251
|
this.dragging = false;
|
|
40252
|
+
/**
|
|
40253
|
+
*
|
|
40254
|
+
* Listeners
|
|
40255
|
+
*
|
|
40256
|
+
*/
|
|
40257
|
+
// dragenter/dragleave bubble from every child the pointer crosses, and the
|
|
40258
|
+
// next child's enter fires before the previous one's leave, so count depth
|
|
40259
|
+
// instead of toggling. This only balances if every entered element stays
|
|
40260
|
+
// connected until its dragleave fires, so the render never removes anything
|
|
40261
|
+
// while `dragging` flips (see the drop overlay below).
|
|
40262
|
+
this.dragDepth = 0;
|
|
39855
40263
|
/**
|
|
39856
40264
|
*
|
|
39857
40265
|
* Private methods
|
|
39858
40266
|
*
|
|
39859
40267
|
*/
|
|
40268
|
+
// Stable per-File keys, so removing a row doesn't make Stencil reuse the
|
|
40269
|
+
// following rows' DOM. Keyed by identity: the same file picked twice still
|
|
40270
|
+
// gets two distinct rows.
|
|
40271
|
+
this.fileKeys = new WeakMap();
|
|
40272
|
+
this.nextFileKey = 0;
|
|
40273
|
+
/** Opens the native file picker from our own buttons. */
|
|
40274
|
+
this.openPicker = () => {
|
|
40275
|
+
var _a;
|
|
40276
|
+
(_a = this.input) === null || _a === void 0 ? void 0 : _a.click();
|
|
40277
|
+
};
|
|
39860
40278
|
this.handleInput = () => {
|
|
39861
40279
|
var _a, _b;
|
|
39862
40280
|
const files = Array.from((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : []);
|
|
@@ -39899,12 +40317,11 @@ const EzpUpload = class {
|
|
|
39899
40317
|
var _a;
|
|
39900
40318
|
(_a = this.unsubscribeLanguage) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
39901
40319
|
}
|
|
39902
|
-
|
|
39903
|
-
|
|
39904
|
-
|
|
39905
|
-
|
|
39906
|
-
|
|
39907
|
-
handleDragEnter() {
|
|
40320
|
+
handleDragEnter(event) {
|
|
40321
|
+
// Accept here as well as on dragover: when the element under the pointer
|
|
40322
|
+
// changes, the browser takes the drop effect from dragenter alone.
|
|
40323
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
40324
|
+
this.dragDepth++;
|
|
39908
40325
|
this.dragging = true;
|
|
39909
40326
|
}
|
|
39910
40327
|
handleDragOver(event) {
|
|
@@ -39915,22 +40332,37 @@ const EzpUpload = class {
|
|
|
39915
40332
|
}
|
|
39916
40333
|
}
|
|
39917
40334
|
handleDragLeave() {
|
|
39918
|
-
this.
|
|
40335
|
+
this.dragDepth = Math.max(0, this.dragDepth - 1);
|
|
40336
|
+
this.dragging = this.dragDepth > 0;
|
|
39919
40337
|
}
|
|
39920
40338
|
handleDrop(event) {
|
|
39921
40339
|
var _a, _b;
|
|
39922
40340
|
event.stopPropagation();
|
|
39923
40341
|
event.preventDefault();
|
|
40342
|
+
this.dragDepth = 0;
|
|
39924
40343
|
this.dragging = false;
|
|
39925
40344
|
const files = Array.from((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : []);
|
|
39926
40345
|
// Add new files to existing selection instead of replacing
|
|
39927
40346
|
this.selectedFiles = [...this.selectedFiles, ...files];
|
|
39928
40347
|
this.uploadFile.emit(this.selectedFiles);
|
|
39929
40348
|
}
|
|
40349
|
+
// A drag that ends anywhere else (dropped elsewhere on the page, or
|
|
40350
|
+
// cancelled) must not leave the card stuck in its drop state.
|
|
40351
|
+
resetDrag() {
|
|
40352
|
+
this.dragDepth = 0;
|
|
40353
|
+
this.dragging = false;
|
|
40354
|
+
}
|
|
39930
40355
|
listenPrintCancel() {
|
|
39931
40356
|
var _a;
|
|
39932
40357
|
(_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
|
|
39933
40358
|
this.selectedFiles = [];
|
|
40359
|
+
this.resetDrag();
|
|
40360
|
+
}
|
|
40361
|
+
fileKey(file) {
|
|
40362
|
+
if (!this.fileKeys.has(file)) {
|
|
40363
|
+
this.fileKeys.set(file, this.nextFileKey++);
|
|
40364
|
+
}
|
|
40365
|
+
return this.fileKeys.get(file);
|
|
39934
40366
|
}
|
|
39935
40367
|
/** Extract a short, upper-cased file-type label from the file name. */
|
|
39936
40368
|
fileType(name) {
|
|
@@ -39957,7 +40389,7 @@ const EzpUpload = class {
|
|
|
39957
40389
|
*/
|
|
39958
40390
|
render() {
|
|
39959
40391
|
const hasFiles = this.selectedFiles.length > 0;
|
|
39960
|
-
return (h(Host, { key: '
|
|
40392
|
+
return (h(Host, { key: 'f20f756ca7522ab7d27e5c9fff743db9ba26b101', class: { dragging: this.dragging } }, h("form", { key: 'abafb9a19d3dff7da26c8250ea94bbc7876cbc3a', id: "form", ref: (form) => (this.form = form) }, h("input", { key: '09397ebf4641190fdd1af13af537cde9f87257d2', type: "file", name: "input", id: "input", multiple: true, "aria-label": instance.t('upload.choose_files'), ref: (input) => (this.input = input), onInput: this.handleInput }), h("div", { key: '0365f750bc55d98a95008bcf404f77b247480d81', id: "modal" }, h("div", { key: '82d8d8ff21977d36a3f18c704002d1a8cdad9016', id: "body-frame" }, h("div", { key: 'ef05d508f0341f92d5e987deb469b2759ee28f1b', id: "body" }, !hasFiles && (h("div", { key: '7885aad8082bedf42ef824ad06a388ed3a083987', id: "dropzone" }, h("ezp-icon", { key: '25707aa1f7018c7942ca5c82a35c4a74f73f5e70', id: "dropzone-icon", name: "cloud-upload" }), h("ezp-label", { key: '2dfb59ce766671396164fcd63d25ef9b04981d01', id: "dropzone-title", level: "primary", weight: "heavy", text: instance.t('upload.dropzone_title') }), h("div", { key: 'b831d79aab06973e47666e129e89ba23d3e8a3a4', id: "dropzone-prompt" }, h("ezp-text-button", { key: '2ade7d526019a71b493e00e6737ca13769cccd29', id: "choose", type: "button", onClick: this.openPicker, label: instance.t('upload.choose_files') }), h("ezp-label", { key: '79903c44e2a82b39c97606aa1ccbe9cb28a42c48', id: "drag-hint", level: "secondary", weight: "strong", text: instance.t('upload.drag_hint') }), h("ezp-label", { key: '895d43cada83fade39b8d67e70782b9b9fea747c', id: "formats", level: "tertiary", text: SUPPORTED_FORMATS.join(', ') })))), hasFiles && (h("div", { key: '6c825ac2791e82271669a7824ed720b127290242', id: "files" }, this.selectedFiles.map((file, index) => (h("div", { key: this.fileKey(file), class: "file" }, h("span", { class: "file-type", "aria-hidden": "true" }, this.fileType(file.name)), h("div", { class: "file-details" }, h("ezp-file-name", { class: "file-name", weight: "heavy", name: file.name, placement: index === 0 ? 'bottom' : 'top' }), h("ezp-label", { class: "file-size", level: "tertiary", text: this.formatSize(file.size) })), h("button", { type: "button", class: "file-remove", "aria-label": instance.t('upload.remove_file'), onClick: (event) => this.removeFile(event, index) }, h("ezp-icon", { name: "close" }))))), h("button", { key: 'da8562e56c4006952efa239e8076f333ae27b1be', type: "button", id: "add-more", onClick: this.openPicker }, h("ezp-icon", { key: '6b2565bb3a9d4eca02079923ffdee36d5184d10f', name: "plus" }), h("ezp-label", { key: '59ecc6b13ca9fa66b8f04944c57ba680e3bab0f8', level: "secondary", weight: "heavy", text: instance.t('upload.add_more') }))))), hasFiles && this.dragging && (h("div", { key: '26e2552f69637448b3663f9342c421ec29abcca8', id: "drop-overlay", "aria-hidden": "true" }, h("ezp-icon", { key: '0f409daf2c6fc5f3f103f4d4450970aea7edb0c7', id: "dropzone-icon", name: "cloud-upload" }), h("ezp-label", { key: '1e19c3e44aac998ad35671435cfe96a27633b170', level: "primary", weight: "heavy", text: instance.t('upload.dropzone_title') })))), h("div", { key: '31d0106aea747008bf2c2760e4cd8ab0e637144b', id: "footer" }, h("ezp-text-button", { key: '24c6c9f25de785443402ac3aa08975c58779faea', id: "clear", type: "button", level: "secondary", disabled: !hasFiles, onClick: this.handleCancel, label: instance.t('upload.remove_files'), class: "action" }), h("ezp-text-button", { key: 'cd0fb877a2a7a756cfbe6aa2fdbacaedbe4c8efb', id: "continue", type: "button", disabled: !hasFiles, onClick: this.handleContinue, label: instance.t('upload.continue'), class: "action" }))))));
|
|
39961
40393
|
}
|
|
39962
40394
|
};
|
|
39963
40395
|
EzpUpload.style = ezpUploadCss();
|
|
@@ -40047,7 +40479,7 @@ const EzpUserMenu = class {
|
|
|
40047
40479
|
*
|
|
40048
40480
|
*/
|
|
40049
40481
|
render() {
|
|
40050
|
-
return (h(Host, { key: '
|
|
40482
|
+
return (h(Host, { key: 'cd2505f64646e8f23d534896c01fcd246d974c2f', class: this.open ? 'is-open' : '' }, h("div", { key: '65df837d1eee8b2275f8c0ef72b039c7ae6d08cd', id: "header" }, h("ezp-label", { key: '3ca9bc9d616de1e4efc686f77bcdaa39dab3f18d', ellipsis: true, id: "name", weight: "heavy", text: this.name }), h("ezp-icon-button", { key: '119abe7450937b7cf2e70ff3ed96d01f3f0aff9d', id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), h("div", { key: '90f40d22672bc65cbf988cf2ab57cbc088218cfd', id: "links" }, this.links.map((link) => (h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, h("ezp-icon", { class: "link__icon", name: link.icon }), h("ezp-label", { text: link.title })))), h("a", { key: '94df9033da5697739c690a180ed2df318f803511', class: "link", onClick: this.logOut }, h("ezp-icon", { key: '609044f6d8255e4378aee226e16c29e9242c8259', class: "link__icon", name: "logout" }), h("ezp-label", { key: '20953a49845a8c4e75081c597d8e916c3b159b51', text: instance.t('user_menu.logout') }))), h("div", { key: '4b96f92ceb1047c4a88f0b33406a297323eded75', id: "theme" }, h("ezp-label", { key: '156893ed3703f63ee826e4887fa711469603b6c8', class: "caption", text: `${instance.t('user_menu.theme')}:`, weight: "heavy" }), h("div", { key: '2ee3ec8725a98d5dc7d7f792fed969c2dea357f4', id: "swatches" }, this.themes.map((theme) => (h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, h("span", { class: "dot" })))))), h("div", { key: 'd78d2b935d9cdb15df66d761dd9290a68db09e9c', id: "appearance" }, h("ezp-label", { key: 'f290affaf49bd01a06f576a4d52b3d1936dbdb23', class: "caption", text: `${instance.t('user_menu.appearance')}:`, weight: "heavy" }), h("div", { key: '8087488313dbd2898280d3abb6244485b97e4ee4', id: "tabs" }, this.appearances.map((appearance) => (h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, h("ezp-icon", { name: appearance.name }), h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
|
|
40051
40483
|
}
|
|
40052
40484
|
get component() { return getElement(this); }
|
|
40053
40485
|
static get watchers() { return {
|
|
@@ -40058,4 +40490,4 @@ const EzpUserMenu = class {
|
|
|
40058
40490
|
};
|
|
40059
40491
|
EzpUserMenu.style = ezpUserMenuCss();
|
|
40060
40492
|
|
|
40061
|
-
export { EzpAuth as ezp_auth, EzpBackdrop as ezp_backdrop, EzpDialog as ezp_dialog, EzpIcon as ezp_icon, EzpIconButton as ezp_icon_button, EzpInput as ezp_input, EzpLabel as ezp_label, EzpPrinterSelection as ezp_printer_selection, EzpPrinting as ezp_printing, EzpSelect as ezp_select, EzpStatus as ezp_status, EzpStepper as ezp_stepper, EzpTextButton as ezp_text_button, EzpUpload as ezp_upload, EzpUserMenu as ezp_user_menu };
|
|
40493
|
+
export { EzpAuth as ezp_auth, EzpBackdrop as ezp_backdrop, EzpDialog as ezp_dialog, EzpFileName as ezp_file_name, EzpIcon as ezp_icon, EzpIconButton as ezp_icon_button, EzpInput as ezp_input, EzpLabel as ezp_label, EzpPrinterSelection as ezp_printer_selection, EzpPrinting as ezp_printing, EzpSelect as ezp_select, EzpStatus as ezp_status, EzpStepper as ezp_stepper, EzpTextButton as ezp_text_button, EzpUpload as ezp_upload, EzpUserMenu as ezp_user_menu };
|