@ezeep/ezeep-js 1.0.137 → 1.0.141
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_12.cjs.entry.js +340 -46
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ezp-icon/assets/glyph-dark.svg +3 -0
- package/dist/collection/components/ezp-icon/assets/glyph-light.svg +3 -0
- package/dist/collection/components/ezp-icon/assets/glyph-system.svg +3 -0
- package/dist/collection/components/ezp-icon/ezp-icon.css +2 -2
- 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-printer-selection/ezp-printer-selection.css +2 -3
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +323 -38
- package/dist/collection/components/ezp-printing/ezp-printing.css +211 -120
- package/dist/collection/components/ezp-printing/ezp-printing.js +43 -1
- package/dist/collection/components/ezp-progress/ezp-progress.css +1 -1
- package/dist/collection/components/ezp-select/ezp-select.js +1 -1
- package/dist/collection/components/ezp-stepper/ezp-stepper.js +1 -1
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.css +45 -1
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +15 -2
- package/dist/collection/services/print.js +17 -1
- package/dist/collection/services/user.js +1 -0
- package/dist/custom-elements/index.js +342 -48
- package/dist/directives/proxies.ts +4 -4
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/ezp-auth_12.entry.js +340 -46
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_12.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/assets/glyph-dark.svg +3 -0
- package/dist/ezeep/assets/glyph-light.svg +3 -0
- package/dist/ezeep/assets/glyph-system.svg +3 -0
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/p-c488ee3f.system.js +1 -1
- package/dist/ezeep/p-c7eac982.system.entry.js +1 -0
- package/dist/ezeep/p-c9ef1ce0.entry.js +1 -0
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +3 -1
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +3 -1
- package/dist/types/components/ezp-user-menu/ezp-user-menu.d.ts +2 -0
- package/dist/types/components.d.ts +7 -1
- package/dist/types/services/print.d.ts +8 -1
- package/dist/types/services/user.d.ts +1 -0
- package/dist/types/shared/types.d.ts +4 -0
- package/package.json +1 -1
- package/readme.md +4 -3
- package/www/build/assets/glyph-dark.svg +3 -0
- package/www/build/assets/glyph-light.svg +3 -0
- package/www/build/assets/glyph-system.svg +3 -0
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/p-c488ee3f.system.js +1 -1
- package/www/build/p-c7eac982.system.entry.js +1 -0
- package/www/build/p-c9ef1ce0.entry.js +1 -0
- package/www/index.html +1 -1
- package/dist/ezeep/p-12ca28b7.system.entry.js +0 -1
- package/dist/ezeep/p-f4d2e700.entry.js +0 -1
- package/www/build/p-12ca28b7.system.entry.js +0 -1
- package/www/build/p-f4d2e700.entry.js +0 -1
|
@@ -3183,7 +3183,7 @@ let EzpBackdrop$1 = class extends HTMLElement {
|
|
|
3183
3183
|
static get style() { return ezpBackdropCss; }
|
|
3184
3184
|
};
|
|
3185
3185
|
|
|
3186
|
-
const ezpIconCss = ":host{-ms-flex-line-pack:center;align-content:center;display:block;display:grid;grid-template:var(--host-gridTemplate)/var(--host-gridTemplate);height:var(--host-size);-ms-flex-pack:center;justify-content:center;width:var(--host-size)}:host(.normal){--host-size:18px;--host-gridTemplate:22px}:host(.large){--host-size:36px;--host-gridTemplate:44px}svg{display:block;fill:currentColor;height:100%;width:100%}";
|
|
3186
|
+
const ezpIconCss = ":host{-ms-flex-line-pack:center;align-content:center;display:block;display:grid;grid-template:var(--host-gridTemplate)/var(--host-gridTemplate);height:var(--icon-height, var(--host-size));-ms-flex-pack:center;justify-content:center;width:var(--icon-width, var(--host-size))}:host(.normal){--host-size:18px;--host-gridTemplate:22px}:host(.large){--host-size:36px;--host-gridTemplate:44px}svg{display:block;fill:currentColor;height:100%;width:100%}";
|
|
3187
3187
|
|
|
3188
3188
|
let EzpIcon$1 = class extends HTMLElement {
|
|
3189
3189
|
constructor() {
|
|
@@ -4171,7 +4171,17 @@ class EzpPrintService {
|
|
|
4171
4171
|
'Content-Type': 'application/json',
|
|
4172
4172
|
},
|
|
4173
4173
|
body: JSON.stringify(Object.assign(Object.assign(Object.assign({ fileurl: fileUrl, type: fileType, printerid: printerID }, (filename && { alias: filename })), (printAndDelete && { printanddelete: printAndDelete })), { properties })),
|
|
4174
|
-
})
|
|
4174
|
+
});
|
|
4175
|
+
}
|
|
4176
|
+
printByFileID(accessToken, fileID, fileType, printerID, properties, filename, printAndDelete) {
|
|
4177
|
+
return fetch(`https://${this.printingApi}/sfapi/Print/`, {
|
|
4178
|
+
method: 'POST',
|
|
4179
|
+
headers: {
|
|
4180
|
+
Authorization: 'Bearer ' + accessToken,
|
|
4181
|
+
'Content-Type': 'application/json',
|
|
4182
|
+
},
|
|
4183
|
+
body: JSON.stringify(Object.assign(Object.assign(Object.assign({ fileid: fileID, type: fileType, printerid: printerID }, (filename && { alias: filename })), (printAndDelete && { printanddelete: printAndDelete })), { properties })),
|
|
4184
|
+
});
|
|
4175
4185
|
}
|
|
4176
4186
|
}
|
|
4177
4187
|
const printStore = createStore({
|
|
@@ -4179,6 +4189,12 @@ const printStore = createStore({
|
|
|
4179
4189
|
jobID: '',
|
|
4180
4190
|
printFinished: false,
|
|
4181
4191
|
printApiHostUrl: '',
|
|
4192
|
+
printerProperties: {},
|
|
4193
|
+
fileID: '',
|
|
4194
|
+
fileUrl: '',
|
|
4195
|
+
fileType: '',
|
|
4196
|
+
printerID: '',
|
|
4197
|
+
fileName: ''
|
|
4182
4198
|
});
|
|
4183
4199
|
|
|
4184
4200
|
class EzpUserService {
|
|
@@ -4197,6 +4213,7 @@ class EzpUserService {
|
|
|
4197
4213
|
const userStore = createStore({
|
|
4198
4214
|
user: null,
|
|
4199
4215
|
theme: '',
|
|
4216
|
+
appearance: '',
|
|
4200
4217
|
});
|
|
4201
4218
|
|
|
4202
4219
|
const colors = [
|
|
@@ -4277,7 +4294,7 @@ const options = {
|
|
|
4277
4294
|
sizes: sizes
|
|
4278
4295
|
};
|
|
4279
4296
|
|
|
4280
|
-
const ezpPrinterSelectionCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--color-overlay);display:grid;grid-template:auto/320px;height:100vh;-ms-flex-pack:center;justify-content:center;left:0;position:fixed;top:0;width:100vw}@media (prefers-color-scheme: dark){:host{--content-boxShadow:inset var(--hairline-width-positive) 0 0 0 var(--hairline-color),\n inset var(--hairline-width-negative) 0 0 0 var(--hairline-color);--container-separator-position:inset 0 0 0 var(--hairline-width-positive);--footer-separator-position:inset 0 var(--hairline-width-positive) 0 0;--header-separator-position:inset 0 var(--hairline-width-negative) 0 0}}#container{background:var(--color-surface-tertiary);border-radius:6px
|
|
4297
|
+
const ezpPrinterSelectionCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--color-overlay);display:grid;grid-template:auto/320px;height:100vh;-ms-flex-pack:center;justify-content:center;left:0;position:fixed;top:0;width:100vw}@media (prefers-color-scheme: dark){:host{--content-boxShadow:inset var(--hairline-width-positive) 0 0 0 var(--hairline-color),\n inset var(--hairline-width-negative) 0 0 0 var(--hairline-color);--container-separator-position:inset 0 0 0 var(--hairline-width-positive);--footer-separator-position:inset 0 var(--hairline-width-positive) 0 0;--header-separator-position:inset 0 var(--hairline-width-negative) 0 0}}#container{background:var(--color-surface-tertiary);border-radius:6px;position:relative}#header{-webkit-box-shadow:inset 0 var(--hairline-width-negative) 0 0 var(--hairline-color);box-shadow:inset 0 var(--hairline-width-negative) 0 0 var(--hairline-color);color:var(--color-foreground-primary);display:grid;grid-column-gap:var(--spacing-1);grid-template-columns:auto 1fr auto;padding:var(--spacing-4) var(--spacing-3) var(--spacing-4) var(--spacing-4);position:relative;z-index:3}#toggle-menu{margin:calc(var(--spacing-3) * -1) 0;position:relative;z-index:2}#content{background:var(--color-surface-secondary);-webkit-box-shadow:var(--content-boxShadow, none);box-shadow:var(--content-boxShadow, none);display:grid;grid-row-gap:var(--spacing-2);grid-template-rows:repeat(2, auto);padding:var(--spacing-2)}#footer{-webkit-box-shadow:inset 0 var(--hairline-width-positive) 0 0 var(--hairline-color);box-shadow:inset 0 var(--hairline-width-positive) 0 0 var(--hairline-color);display:grid;grid-column-gap:var(--spacing-2);grid-template-columns:repeat(2, 1fr);padding:var(--spacing-2);position:relative;z-index:3}";
|
|
4281
4298
|
|
|
4282
4299
|
let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
4283
4300
|
constructor() {
|
|
@@ -4310,11 +4327,225 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
4310
4327
|
this.printInProgress = false;
|
|
4311
4328
|
this.userMenuOpen = false;
|
|
4312
4329
|
this.selectedPrinter = { id: '', location: '', name: '' };
|
|
4330
|
+
this.selectedPrinterConfig = {
|
|
4331
|
+
"Collate": true,
|
|
4332
|
+
"Color": true,
|
|
4333
|
+
"Driver": "TP Output Gateway",
|
|
4334
|
+
"DuplexMode": 1,
|
|
4335
|
+
"DuplexSupported": true,
|
|
4336
|
+
"Id": "f0c0f30c-e9ff-4e11-9181-2417fabeb23f",
|
|
4337
|
+
"Location": "",
|
|
4338
|
+
"MediaSupported": [
|
|
4339
|
+
"Auto",
|
|
4340
|
+
"Letter",
|
|
4341
|
+
"Legal",
|
|
4342
|
+
"Executive",
|
|
4343
|
+
"A4",
|
|
4344
|
+
"A5",
|
|
4345
|
+
"B5 (JIS)",
|
|
4346
|
+
"Umschlag 10",
|
|
4347
|
+
"Umschlag DL",
|
|
4348
|
+
"Umschlag C5",
|
|
4349
|
+
"Umschlag C6",
|
|
4350
|
+
"Umschlag Monarch",
|
|
4351
|
+
"Jap. Postkarte",
|
|
4352
|
+
"A6",
|
|
4353
|
+
"JIS Chou Nr. 2 119x277 mm",
|
|
4354
|
+
"4x6Zoll",
|
|
4355
|
+
"5x7 Zoll",
|
|
4356
|
+
"8x10Zoll",
|
|
4357
|
+
"Ofuku hagaki",
|
|
4358
|
+
"10x15 cm",
|
|
4359
|
+
"13x18 cm",
|
|
4360
|
+
"Karteikarte 3 x 5\"",
|
|
4361
|
+
"Karteikarte 4x6 Zoll"
|
|
4362
|
+
],
|
|
4363
|
+
"MediaSupportedId": [
|
|
4364
|
+
0,
|
|
4365
|
+
1,
|
|
4366
|
+
5,
|
|
4367
|
+
7,
|
|
4368
|
+
9,
|
|
4369
|
+
11,
|
|
4370
|
+
13,
|
|
4371
|
+
20,
|
|
4372
|
+
27,
|
|
4373
|
+
28,
|
|
4374
|
+
31,
|
|
4375
|
+
37,
|
|
4376
|
+
43,
|
|
4377
|
+
70,
|
|
4378
|
+
119,
|
|
4379
|
+
120,
|
|
4380
|
+
121,
|
|
4381
|
+
122,
|
|
4382
|
+
123,
|
|
4383
|
+
124,
|
|
4384
|
+
125,
|
|
4385
|
+
126,
|
|
4386
|
+
127
|
|
4387
|
+
],
|
|
4388
|
+
"Name": "HP DeskJet 3630 series",
|
|
4389
|
+
"OrientationsSupported": [
|
|
4390
|
+
"portrait",
|
|
4391
|
+
"landscape"
|
|
4392
|
+
],
|
|
4393
|
+
"OrientationsSupportedId": [
|
|
4394
|
+
1,
|
|
4395
|
+
2
|
|
4396
|
+
],
|
|
4397
|
+
"PaperFormats": [
|
|
4398
|
+
{
|
|
4399
|
+
"Id": 0,
|
|
4400
|
+
"Name": "Auto",
|
|
4401
|
+
"XRes": 0,
|
|
4402
|
+
"YRes": 0
|
|
4403
|
+
},
|
|
4404
|
+
{
|
|
4405
|
+
"Id": 1,
|
|
4406
|
+
"Name": "Letter",
|
|
4407
|
+
"XRes": 2159,
|
|
4408
|
+
"YRes": 2794
|
|
4409
|
+
},
|
|
4410
|
+
{
|
|
4411
|
+
"Id": 5,
|
|
4412
|
+
"Name": "Legal",
|
|
4413
|
+
"XRes": 2159,
|
|
4414
|
+
"YRes": 3556
|
|
4415
|
+
},
|
|
4416
|
+
{
|
|
4417
|
+
"Id": 7,
|
|
4418
|
+
"Name": "Executive",
|
|
4419
|
+
"XRes": 1841,
|
|
4420
|
+
"YRes": 2667
|
|
4421
|
+
},
|
|
4422
|
+
{
|
|
4423
|
+
"Id": 9,
|
|
4424
|
+
"Name": "A4",
|
|
4425
|
+
"XRes": 2100,
|
|
4426
|
+
"YRes": 2970
|
|
4427
|
+
},
|
|
4428
|
+
{
|
|
4429
|
+
"Id": 11,
|
|
4430
|
+
"Name": "A5",
|
|
4431
|
+
"XRes": 1480,
|
|
4432
|
+
"YRes": 2100
|
|
4433
|
+
},
|
|
4434
|
+
{
|
|
4435
|
+
"Id": 13,
|
|
4436
|
+
"Name": "B5 (JIS)",
|
|
4437
|
+
"XRes": 1820,
|
|
4438
|
+
"YRes": 2570
|
|
4439
|
+
},
|
|
4440
|
+
{
|
|
4441
|
+
"Id": 20,
|
|
4442
|
+
"Name": "Umschlag 10",
|
|
4443
|
+
"XRes": 1047,
|
|
4444
|
+
"YRes": 2413
|
|
4445
|
+
},
|
|
4446
|
+
{
|
|
4447
|
+
"Id": 27,
|
|
4448
|
+
"Name": "Umschlag DL",
|
|
4449
|
+
"XRes": 1100,
|
|
4450
|
+
"YRes": 2200
|
|
4451
|
+
},
|
|
4452
|
+
{
|
|
4453
|
+
"Id": 28,
|
|
4454
|
+
"Name": "Umschlag C5",
|
|
4455
|
+
"XRes": 1620,
|
|
4456
|
+
"YRes": 2290
|
|
4457
|
+
},
|
|
4458
|
+
{
|
|
4459
|
+
"Id": 31,
|
|
4460
|
+
"Name": "Umschlag C6",
|
|
4461
|
+
"XRes": 1140,
|
|
4462
|
+
"YRes": 1620
|
|
4463
|
+
},
|
|
4464
|
+
{
|
|
4465
|
+
"Id": 37,
|
|
4466
|
+
"Name": "Umschlag Monarch",
|
|
4467
|
+
"XRes": 984,
|
|
4468
|
+
"YRes": 1905
|
|
4469
|
+
},
|
|
4470
|
+
{
|
|
4471
|
+
"Id": 43,
|
|
4472
|
+
"Name": "Jap. Postkarte",
|
|
4473
|
+
"XRes": 1000,
|
|
4474
|
+
"YRes": 1480
|
|
4475
|
+
},
|
|
4476
|
+
{
|
|
4477
|
+
"Id": 70,
|
|
4478
|
+
"Name": "A6",
|
|
4479
|
+
"XRes": 1050,
|
|
4480
|
+
"YRes": 1480
|
|
4481
|
+
},
|
|
4482
|
+
{
|
|
4483
|
+
"Id": 119,
|
|
4484
|
+
"Name": "JIS Chou Nr. 2 119x277 mm",
|
|
4485
|
+
"XRes": 1109,
|
|
4486
|
+
"YRes": 1460
|
|
4487
|
+
},
|
|
4488
|
+
{
|
|
4489
|
+
"Id": 120,
|
|
4490
|
+
"Name": "4x6Zoll",
|
|
4491
|
+
"XRes": 1016,
|
|
4492
|
+
"YRes": 1524
|
|
4493
|
+
},
|
|
4494
|
+
{
|
|
4495
|
+
"Id": 121,
|
|
4496
|
+
"Name": "5x7 Zoll",
|
|
4497
|
+
"XRes": 1270,
|
|
4498
|
+
"YRes": 1778
|
|
4499
|
+
},
|
|
4500
|
+
{
|
|
4501
|
+
"Id": 122,
|
|
4502
|
+
"Name": "8x10Zoll",
|
|
4503
|
+
"XRes": 2032,
|
|
4504
|
+
"YRes": 2540
|
|
4505
|
+
},
|
|
4506
|
+
{
|
|
4507
|
+
"Id": 123,
|
|
4508
|
+
"Name": "Ofuku hagaki",
|
|
4509
|
+
"XRes": 2000,
|
|
4510
|
+
"YRes": 1479
|
|
4511
|
+
},
|
|
4512
|
+
{
|
|
4513
|
+
"Id": 124,
|
|
4514
|
+
"Name": "10x15 cm",
|
|
4515
|
+
"XRes": 1016,
|
|
4516
|
+
"YRes": 1524
|
|
4517
|
+
},
|
|
4518
|
+
{
|
|
4519
|
+
"Id": 125,
|
|
4520
|
+
"Name": "13x18 cm",
|
|
4521
|
+
"XRes": 1270,
|
|
4522
|
+
"YRes": 1778
|
|
4523
|
+
},
|
|
4524
|
+
{
|
|
4525
|
+
"Id": 126,
|
|
4526
|
+
"Name": "Karteikarte 3 x 5\"",
|
|
4527
|
+
"XRes": 762,
|
|
4528
|
+
"YRes": 1270
|
|
4529
|
+
},
|
|
4530
|
+
{
|
|
4531
|
+
"Id": 127,
|
|
4532
|
+
"Name": "Karteikarte 4x6 Zoll",
|
|
4533
|
+
"XRes": 1016,
|
|
4534
|
+
"YRes": 1524
|
|
4535
|
+
}
|
|
4536
|
+
],
|
|
4537
|
+
"Resolutions": [
|
|
4538
|
+
"Auto",
|
|
4539
|
+
"600",
|
|
4540
|
+
"1200"
|
|
4541
|
+
],
|
|
4542
|
+
"TPUID": 1
|
|
4543
|
+
};
|
|
4313
4544
|
// needs to be initialised with empty strings
|
|
4314
4545
|
this.selectedProperties = {
|
|
4315
4546
|
paper: '',
|
|
4316
4547
|
paperid: '',
|
|
4317
|
-
color:
|
|
4548
|
+
color: false,
|
|
4318
4549
|
duplex: false,
|
|
4319
4550
|
duplexmode: '',
|
|
4320
4551
|
orientation: '',
|
|
@@ -4324,7 +4555,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
4324
4555
|
this.previouslySelectedProperties = {
|
|
4325
4556
|
paper: '',
|
|
4326
4557
|
paperid: '',
|
|
4327
|
-
color:
|
|
4558
|
+
color: false,
|
|
4328
4559
|
duplex: false,
|
|
4329
4560
|
duplexmode: '',
|
|
4330
4561
|
orientation: '',
|
|
@@ -4342,39 +4573,88 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
4342
4573
|
};
|
|
4343
4574
|
/** Description... */
|
|
4344
4575
|
this.handlePrint = () => {
|
|
4576
|
+
const validateData = (data) => {
|
|
4577
|
+
if (data.jobstatus === 0) {
|
|
4578
|
+
this.printInProgress = false;
|
|
4579
|
+
return true;
|
|
4580
|
+
}
|
|
4581
|
+
return false;
|
|
4582
|
+
};
|
|
4583
|
+
const POLL_INTERVAL = 2000;
|
|
4345
4584
|
this.printInProgress = true;
|
|
4346
|
-
this.printService
|
|
4347
|
-
.printFileByUrl(authStore.state.accessToken, this.fileurl, this.filetype, this.selectedPrinter.id,
|
|
4348
4585
|
// we have to initialse this obj with empty strings to display the select component
|
|
4349
4586
|
// but don't want to send any attributes with empty strings to the API
|
|
4350
|
-
removeEmptyStrings(this.selectedProperties)
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4587
|
+
removeEmptyStrings(this.selectedProperties);
|
|
4588
|
+
// put it in store for further use
|
|
4589
|
+
printStore.state.fileUrl = this.fileurl;
|
|
4590
|
+
printStore.state.fileID = this.fileid;
|
|
4591
|
+
printStore.state.fileType = this.filetype;
|
|
4592
|
+
printStore.state.printerID = this.selectedPrinter.id;
|
|
4593
|
+
printStore.state.printerProperties = this.selectedProperties;
|
|
4594
|
+
printStore.state.fileName = this.filename;
|
|
4595
|
+
if (this.fileurl) {
|
|
4596
|
+
this.printService
|
|
4597
|
+
.printFileByUrl(authStore.state.accessToken, this.fileurl, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename)
|
|
4598
|
+
.then((response) => {
|
|
4599
|
+
if (response.status === 412) {
|
|
4600
|
+
response.json().then(data => this.fileid = data.fileid);
|
|
4601
|
+
this.printService.printByFileID(authStore.state.accessToken, this.fileid, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename).finally(() => this.printInProgress = false);
|
|
4602
|
+
}
|
|
4603
|
+
else {
|
|
4604
|
+
return response.json();
|
|
4605
|
+
}
|
|
4606
|
+
})
|
|
4607
|
+
.then((data) => {
|
|
4608
|
+
if (data.jobid) {
|
|
4609
|
+
printStore.state.jobID = data.jobid;
|
|
4610
|
+
poll({
|
|
4611
|
+
fn: this.printService.getPrintStatus,
|
|
4612
|
+
validate: validateData,
|
|
4613
|
+
interval: POLL_INTERVAL,
|
|
4614
|
+
maxAttempts: 10,
|
|
4615
|
+
})
|
|
4616
|
+
.then(data)
|
|
4617
|
+
.catch((err) => {
|
|
4618
|
+
console.warn(err);
|
|
4357
4619
|
this.printInProgress = false;
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
};
|
|
4362
|
-
poll({
|
|
4363
|
-
fn: this.printService.getPrintStatus,
|
|
4364
|
-
validate: validateData,
|
|
4365
|
-
interval: POLL_INTERVAL,
|
|
4366
|
-
maxAttempts: 10,
|
|
4367
|
-
})
|
|
4368
|
-
.then(data)
|
|
4369
|
-
.catch((err) => {
|
|
4370
|
-
console.warn(err);
|
|
4620
|
+
});
|
|
4621
|
+
}
|
|
4622
|
+
else {
|
|
4371
4623
|
this.printInProgress = false;
|
|
4372
|
-
}
|
|
4373
|
-
}
|
|
4374
|
-
|
|
4624
|
+
}
|
|
4625
|
+
})
|
|
4626
|
+
.catch(error => {
|
|
4627
|
+
console.log(error);
|
|
4375
4628
|
this.printInProgress = false;
|
|
4376
|
-
}
|
|
4377
|
-
}
|
|
4629
|
+
});
|
|
4630
|
+
}
|
|
4631
|
+
else if (this.fileid) {
|
|
4632
|
+
this.printService.printByFileID(authStore.state.accessToken, this.fileid, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename)
|
|
4633
|
+
.then((response) => response.json())
|
|
4634
|
+
.then((data) => {
|
|
4635
|
+
if (data.jobid) {
|
|
4636
|
+
printStore.state.jobID = data.jobid;
|
|
4637
|
+
poll({
|
|
4638
|
+
fn: this.printService.getPrintStatus,
|
|
4639
|
+
validate: validateData,
|
|
4640
|
+
interval: POLL_INTERVAL,
|
|
4641
|
+
maxAttempts: 10,
|
|
4642
|
+
})
|
|
4643
|
+
.then(data)
|
|
4644
|
+
.catch((err) => {
|
|
4645
|
+
console.warn(err);
|
|
4646
|
+
this.printInProgress = false;
|
|
4647
|
+
});
|
|
4648
|
+
}
|
|
4649
|
+
else {
|
|
4650
|
+
this.printInProgress = false;
|
|
4651
|
+
}
|
|
4652
|
+
})
|
|
4653
|
+
.catch(error => {
|
|
4654
|
+
console.log(error);
|
|
4655
|
+
this.printInProgress = false;
|
|
4656
|
+
});
|
|
4657
|
+
}
|
|
4378
4658
|
localStorage.setItem('properties', JSON.stringify(this.selectedProperties));
|
|
4379
4659
|
localStorage.setItem('printer', JSON.stringify(this.selectedPrinter));
|
|
4380
4660
|
localStorage.setItem('previouslySelectedProperties', JSON.stringify(this.previouslySelectedProperties));
|
|
@@ -4422,11 +4702,14 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
4422
4702
|
this.userName = userStore.state.user.display_name;
|
|
4423
4703
|
});
|
|
4424
4704
|
}
|
|
4425
|
-
setSelectedProperties(eventDetails) {
|
|
4705
|
+
async setSelectedProperties(eventDetails) {
|
|
4426
4706
|
switch (eventDetails.type) {
|
|
4427
4707
|
case 'printer':
|
|
4428
4708
|
this.selectedPrinter.id = eventDetails.id;
|
|
4429
4709
|
this.selectedPrinter.name = eventDetails.title;
|
|
4710
|
+
await this.printService.getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id).then(data => this.selectedPrinterConfig = data[0]);
|
|
4711
|
+
console.log('selected printer config:');
|
|
4712
|
+
console.log(this.selectedPrinterConfig);
|
|
4430
4713
|
break;
|
|
4431
4714
|
case 'color':
|
|
4432
4715
|
this.selectedProperties.color = !!eventDetails.id;
|
|
@@ -4478,7 +4761,8 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
4478
4761
|
await this.printService
|
|
4479
4762
|
.getAllPrinterProperties(authStore.state.accessToken)
|
|
4480
4763
|
.then((printerConfig) => {
|
|
4481
|
-
this.printerConfig = printerConfig
|
|
4764
|
+
this.printerConfig = printerConfig;
|
|
4765
|
+
console.log(this.printerConfig);
|
|
4482
4766
|
});
|
|
4483
4767
|
this.loading = false;
|
|
4484
4768
|
}
|
|
@@ -4495,7 +4779,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
4495
4779
|
? printer.location
|
|
4496
4780
|
: i18next.t('printer_selection.unknown_location'),
|
|
4497
4781
|
type: 'printer',
|
|
4498
|
-
})), preSelected: this.selectedPrinter.name })), h("div", { id: "options" }, h("ezp-select", { label: i18next.t('printer_selection.color'), icon: "color", placeholder: i18next.t('printer_selection.select_color'), toggleFlow: "horizontal", options: this.
|
|
4782
|
+
})), preSelected: this.selectedPrinter.name })), h("div", { id: "options" }, h("ezp-select", { label: i18next.t('printer_selection.color'), icon: "color", placeholder: i18next.t('printer_selection.select_color'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Color
|
|
4499
4783
|
? [
|
|
4500
4784
|
{
|
|
4501
4785
|
id: 1,
|
|
@@ -4516,25 +4800,25 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
4516
4800
|
title: i18next.t('printer_selection.color_grayscale'),
|
|
4517
4801
|
meta: '',
|
|
4518
4802
|
type: 'color',
|
|
4519
|
-
}
|
|
4520
|
-
], preSelected: this.previouslySelectedProperties.color }), h("ezp-select", { label: i18next.t('printer_selection.orientation'), icon: "orientation", placeholder: i18next.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: this.
|
|
4803
|
+
},
|
|
4804
|
+
], preSelected: this.previouslySelectedProperties.color }), h("ezp-select", { label: i18next.t('printer_selection.orientation'), icon: "orientation", placeholder: i18next.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.OrientationsSupported.map((orientation, index) => ({
|
|
4521
4805
|
id: index,
|
|
4522
4806
|
title: i18next.t(`printer_selection.orientation_${orientation}`),
|
|
4523
4807
|
meta: '',
|
|
4524
4808
|
type: 'orientation',
|
|
4525
|
-
})), preSelected: this.previouslySelectedProperties.orientation }), h("ezp-select", { label: i18next.t('printer_selection.size'), icon: "size", placeholder: i18next.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.
|
|
4809
|
+
})), preSelected: this.previouslySelectedProperties.orientation }), h("ezp-select", { label: i18next.t('printer_selection.size'), icon: "size", placeholder: i18next.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.PaperFormats.map((format) => ({
|
|
4526
4810
|
id: format.Id,
|
|
4527
4811
|
title: format.Name,
|
|
4528
4812
|
meta: `${format.XRes} x ${format.YRes}`,
|
|
4529
4813
|
type: 'format',
|
|
4530
|
-
})), preSelected: this.previouslySelectedProperties.paper }), h("ezp-select", { label: i18next.t('printer_selection.quality'), icon: "quality", toggleFlow: "horizontal", options: this.
|
|
4814
|
+
})), preSelected: this.previouslySelectedProperties.paper }), h("ezp-select", { label: i18next.t('printer_selection.quality'), icon: "quality", toggleFlow: "horizontal", options: this.selectedPrinterConfig.Resolutions.map((option, index) => ({
|
|
4531
4815
|
id: index,
|
|
4532
4816
|
title: option,
|
|
4533
4817
|
meta: '',
|
|
4534
4818
|
type: 'quality',
|
|
4535
4819
|
})), preSelected: !this.previouslySelectedProperties.resolution
|
|
4536
|
-
? this.
|
|
4537
|
-
: this.previouslySelectedProperties.resolution }), this.
|
|
4820
|
+
? this.selectedPrinterConfig.Resolutions[0]
|
|
4821
|
+
: this.previouslySelectedProperties.resolution }), this.selectedPrinterConfig.DuplexSupported ? (h("ezp-select", { label: i18next.t('printer_selection.duplex'), icon: "duplex", toggleFlow: "horizontal", options: this.duplexOptions.map((option) => ({
|
|
4538
4822
|
id: option.id,
|
|
4539
4823
|
title: option.title,
|
|
4540
4824
|
meta: '',
|
|
@@ -4553,7 +4837,7 @@ const config = {
|
|
|
4553
4837
|
printingApiHostUrl: printingApiHostUrl
|
|
4554
4838
|
};
|
|
4555
4839
|
|
|
4556
|
-
const ezpPrintingCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--color-surface-primary);color:var(--color-foreground-primary);display:grid;font-family:\"Inter\", sans-serif;-webkit-font-feature-settings:\"calt\", \"liga\", \"ss03\", \"zero\", \"cv05\", \"cv10\";font-feature-settings:\"calt\", \"liga\", \"ss03\", \"zero\", \"cv05\", \"cv10\";-webkit-font-kerning:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;grid-template:auto/auto;-ms-flex-pack:center;justify-content:center;margin:0;min-height:100vh;-webkit-tap-highlight-color:transparent;text-rendering:optimizeLegibility;-webkit-text-size-adjust:none;--color-theme-pink-solid:#f23267;--color-theme-red-solid:#f23b22;--color-theme-orange-solid:#fe7200;--color-theme-green-solid:#5d9200;--color-theme-cyan-solid:#0091b4;--color-theme-blue-solid:#4e81f3;--color-theme-violet-solid:#ae5ef3;--color-theme-pink-translucent:rgba(242, 50, 103, 0.16);--color-theme-red-translucent:rgba(242, 59, 34, 0.16);--color-theme-orange-translucent:rgba(254, 114, 0, 0.16);--color-theme-green-translucent:rgba(93, 146, 0, 0.16);--color-theme-cyan-translucent:rgba(0, 145, 180, 0.16);--color-theme-blue-translucent:rgba(78, 129, 243, 0.16);--color-theme-violet-translucent:rgba(174, 94, 243, 0.16);--color-on-theme:white;--color-surface-primary:white;--color-surface-secondary:#f3f3f3;--color-surface-tertiary:white;--color-shade-primary:rgba(119, 119, 119, 0.1);--color-shade-secondary:rgba(119, 119, 119, 0.16);--color-shade-tertiary:rgba(119, 119, 119, 0.22);--color-foreground-primary:rgba(0, 0, 0, 0.94);--color-foreground-secondary:rgba(99, 99, 99, 0.9);--color-foreground-tertiary:rgba(99, 99, 99, 0.58);--color-outline-primary:rgba(119, 119, 119, 0.16);--color-outline-secondary:rgba(119, 119, 119, 0.26);--color-overlay:rgba(0, 0, 0, 0.26);--color-shadow:rgba(0, 0, 0, 0.06);--duration-1:0.1s;--duration-2:0.16s;--duration-3:0.26s;--duration-4:0.42s;--duration-5:0.68s;--duration-6:1s;--spacing-1:4px;--spacing-2:6px;--spacing-3:10px;--spacing-4:16px;--spacing-5:26px;--spacing-6:42px;--spacing-7:68px;--spacing-8:110px;--easing-in-quart:cubic-bezier(0.11, 0, 0.5, 0);--easing-in-out-quart:cubic-bezier(0.76, 0, 0.24, 1);--easing-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--easing-in-expo:cubic-bezier(0.7, 0, 0.84, 0);--easing-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--easing-out-expo:cubic-bezier(0.16, 1, 0.3, 1);--hairline-color:var(--color-outline-primary)}@supports (color: color(display-p3 1 1 1)){:host{--color-theme-pink-solid:color(display-p3 0.9490196078 0.1960784314 0.4039215686/100%);--color-theme-red-solid:color(display-p3 0.9490196078 0.231372549 0.1333333333/100%);--color-theme-orange-solid:color(display-p3 0.9960784314 0.4470588235 0/100%);--color-theme-green-solid:color(display-p3 0.3647058824 0.5725490196 0/100%);--color-theme-cyan-solid:color(display-p3 0 0.568627451 0.7058823529/100%);--color-theme-blue-solid:color(display-p3 0.3058823529 0.5058823529 0.9529411765/100%);--color-theme-violet-solid:color(display-p3 0.6823529412 0.368627451 0.9529411765/100%);--color-theme-pink-translucent:color(display-p3 0.9490196078 0.1960784314 0.4039215686/16%);--color-theme-red-translucent:color(display-p3 0.9490196078 0.231372549 0.1333333333/16%);--color-theme-orange-translucent:color(display-p3 0.9960784314 0.4470588235 0/16%);--color-theme-green-translucent:color(display-p3 0.3647058824 0.5725490196 0/16%);--color-theme-cyan-translucent:color(display-p3 0 0.568627451 0.7058823529/16%);--color-theme-blue-translucent:color(display-p3 0.3058823529 0.5058823529 0.9529411765/16%);--color-theme-violet-translucent:color(display-p3 0.6823529412 0.368627451 0.9529411765/16%);--color-on-theme:color(display-p3 1 1 1/100%);--color-surface-primary:color(display-p3 1 1 1/100%);--color-surface-secondary:color(display-p3 0.9529411765 0.9529411765 0.9529411765/100%);--color-surface-tertiary:color(display-p3 1 1 1/100%);--color-shade-primary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/10%);--color-shade-secondary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/16%);--color-shade-tertiary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/22%);--color-foreground-primary:color(display-p3 0 0 0/94%);--color-foreground-secondary:color(display-p3 0.3882352941 0.3882352941 0.3882352941/90%);--color-foreground-tertiary:color(display-p3 0.3882352941 0.3882352941 0.3882352941/58%);--color-outline-primary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/16%);--color-outline-secondary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/26%);--color-overlay:color(display-p3 0 0 0/26%);--color-shadow:color(display-p3 0 0 0/6%)}}@media (-webkit-min-device-pixel-ratio: 1), (min-device-pixel-ratio: 1){:host{--hairline-width-positive:calc(1px / 1);--hairline-width-negative:calc(-1px / 1)}}@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2){:host{--hairline-width-positive:calc(1px / 2);--hairline-width-negative:calc(-1px / 2)}}@media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3){:host{--hairline-width-positive:calc(1px / 3);--hairline-width-negative:calc(-1px / 3)}}@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2){:host{--hairline-color:var(--color-outline-secondary)}}@media (prefers-color-scheme: dark){:host{--color-theme-pink-solid:#ff4171;--color-theme-red-solid:#ff482c;--color-theme-orange-solid:#ff811c;--color-theme-green-solid:#679c15;--color-theme-cyan-solid:#209bbf;--color-theme-blue-solid:#5b8bff;--color-theme-violet-solid:#ba69ff;--color-theme-pink-translucent:rgba(255, 65, 113, 0.26);--color-theme-red-translucent:rgba(255, 72, 44, 0.26);--color-theme-orange-translucent:rgba(255, 129, 28, 0.26);--color-theme-green-translucent:rgba(103, 156, 21, 0.26);--color-theme-cyan-translucent:rgba(32, 155, 191, 0.26);--color-theme-blue-translucent:rgba(91, 139, 255, 0.26);--color-theme-violet-translucent:rgba(186, 105, 255, 0.26);--color-on-theme:black;--color-surface-primary:black;--color-surface-secondary:#1b1b1b;--color-surface-tertiary:#282828;--color-shade-primary:rgba(119, 119, 119, 0.28);--color-shade-secondary:rgba(119, 119, 119, 0.34);--color-shade-tertiary:rgba(119, 119, 119, 0.4);--color-foreground-primary:rgba(255, 255, 255, 0.94);--color-foreground-secondary:rgba(139, 139, 139, 0.9);--color-foreground-tertiary:rgba(139, 139, 139, 0.58);--color-outline-primary:rgba(119, 119, 119, 0.26);--color-outline-secondary:rgba(119, 119, 119, 0.32);--color-overlay:rgba(0, 0, 0, 0.68);--color-shadow:rgba(0, 0, 0, 0.1)}@supports (color: color(display-p3 1 1 1)){:host{--color-theme-pink-solid:color(display-p3 1 0.2549019608 0.4431372549/100%);--color-theme-red-solid:color(display-p3 1 0.2823529412 0.1725490196/100%);--color-theme-orange-solid:color(display-p3 1 0.5058823529 0.1098039216/100%);--color-theme-green-solid:color(display-p3 0.4039215686 0.6117647059 0.0823529412/100%);--color-theme-cyan-solid:color(display-p3 0.1254901961 0.6078431373 0.7490196078/100%);--color-theme-blue-solid:color(display-p3 0.3568627451 0.5450980392 1/100%);--color-theme-violet-solid:color(display-p3 0.7294117647 0.4117647059 1/100%);--color-theme-pink-translucent:color(display-p3 1 0.2549019608 0.4431372549/26%);--color-theme-red-translucent:color(display-p3 1 0.2823529412 0.1725490196/26%);--color-theme-orange-translucent:color(display-p3 1 0.5058823529 0.1098039216/26%);--color-theme-green-translucent:color(display-p3 0.4039215686 0.6117647059 0.0823529412/26%);--color-theme-cyan-translucent:color(display-p3 0.1254901961 0.6078431373 0.7490196078/26%);--color-theme-blue-translucent:color(display-p3 0.3568627451 0.5450980392 1/26%);--color-theme-violet-translucent:color(display-p3 0.7294117647 0.4117647059 1/26%);--color-on-theme:color(display-p3 0 0 0/100%);--color-surface-primary:color(display-p3 0 0 0/100%);--color-surface-secondary:color(display-p3 0.1058823529 0.1058823529 0.1058823529/100%);--color-surface-tertiary:color(display-p3 0.1568627451 0.1568627451 0.1568627451/100%);--color-shade-primary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/28%);--color-shade-secondary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/34%);--color-shade-tertiary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/40%);--color-foreground-primary:color(display-p3 1 1 1/94%);--color-foreground-secondary:color(display-p3 0.5450980392 0.5450980392 0.5450980392/90%);--color-foreground-tertiary:color(display-p3 0.5450980392 0.5450980392 0.5450980392/58%);--color-outline-primary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/26%);--color-outline-secondary:color(display-p3 0.4666666667 0.4666666667 0.4666666667/32%);--color-overlay:color(display-p3 0 0 0/68%);--color-shadow:color(display-p3 0 0 0/10%)}}}:host(.blue){--color-theme-solid:var(--color-theme-blue-solid);--color-theme-translucent:var(--color-theme-blue-translucent)}:host(.cyan){--color-theme-solid:var(--color-theme-cyan-solid);--color-theme-translucent:var(--color-theme-cyan-translucent)}:host(.green){--color-theme-solid:var(--color-theme-green-solid);--color-theme-translucent:var(--color-theme-green-translucent)}:host(.orange){--color-theme-solid:var(--color-theme-orange-solid);--color-theme-translucent:var(--color-theme-orange-translucent)}:host(.pink){--color-theme-solid:var(--color-theme-pink-solid);--color-theme-translucent:var(--color-theme-pink-translucent)}:host(.red){--color-theme-solid:var(--color-theme-red-solid);--color-theme-translucent:var(--color-theme-red-translucent)}:host(.violet){--color-theme-solid:var(--color-theme-violet-solid);--color-theme-translucent:var(--color-theme-violet-translucent)}";
|
|
4840
|
+
const ezpPrintingCss = ":host{-ms-flex-line-pack:center;align-content:center;background:var(--color-surface-primary);color:var(--color-foreground-primary);display:grid;font-family:\"Inter\", sans-serif;-webkit-font-feature-settings:\"calt\", \"liga\", \"ss03\", \"zero\", \"cv05\", \"cv10\";font-feature-settings:\"calt\", \"liga\", \"ss03\", \"zero\", \"cv05\", \"cv10\";-webkit-font-kerning:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;grid-template:auto/auto;-ms-flex-pack:center;justify-content:center;margin:0;min-height:100vh;-webkit-tap-highlight-color:transparent;text-rendering:optimizeLegibility;-webkit-text-size-adjust:none;--duration-1:0.1s;--duration-2:0.16s;--duration-3:0.26s;--duration-4:0.42s;--duration-5:0.68s;--duration-6:1s;--spacing-1:4px;--spacing-2:6px;--spacing-3:10px;--spacing-4:16px;--spacing-5:26px;--spacing-6:42px;--spacing-7:68px;--spacing-8:110px;--easing-in-quart:cubic-bezier(0.11, 0, 0.5, 0);--easing-in-out-quart:cubic-bezier(0.76, 0, 0.24, 1);--easing-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--easing-in-expo:cubic-bezier(0.7, 0, 0.84, 0);--easing-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--easing-out-expo:cubic-bezier(0.16, 1, 0.3, 1);--hairline-color:var(--color-outline-primary);--color-theme-pink-solid-light:#f23267;--color-theme-red-solid-light:#f23b22;--color-theme-orange-solid-light:#fe7200;--color-theme-green-solid-light:#5d9200;--color-theme-cyan-solid-light:#0091b4;--color-theme-blue-solid-light:#4e81f3;--color-theme-violet-solid-light:#ae5ef3;--color-theme-pink-translucent-light:rgba(242, 50, 103, 0.16);--color-theme-red-translucent-light:rgba(242, 59, 34, 0.16);--color-theme-orange-translucent-light:rgba(254, 114, 0, 0.16);--color-theme-green-translucent-light:rgba(93, 146, 0, 0.16);--color-theme-cyan-translucent-light:rgba(0, 145, 180, 0.16);--color-theme-blue-translucent-light:rgba(78, 129, 243, 0.16);--color-theme-violet-translucent-light:rgba(174, 94, 243, 0.16);--color-on-theme-light:white;--color-surface-primary-light:white;--color-surface-secondary-light:#f3f3f3;--color-surface-tertiary-light:white;--color-shade-primary-light:rgba(119, 119, 119, 0.1);--color-shade-secondary-light:rgba(119, 119, 119, 0.16);--color-shade-tertiary-light:rgba(119, 119, 119, 0.22);--color-foreground-primary-light:rgba(0, 0, 0, 0.94);--color-foreground-secondary-light:rgba(99, 99, 99, 0.9);--color-foreground-tertiary-light:rgba(99, 99, 99, 0.58);--color-outline-primary-light:#e2e2e2;--color-outline-secondary-light:#d1d1d1;--color-overlay-light:rgba(0, 0, 0, 0.26);--color-shadow-light:rgba(0, 0, 0, 0.06);--color-theme-pink-solid-dark:#ff4171;--color-theme-red-solid-dark:#ff482c;--color-theme-orange-solid-dark:#ff811c;--color-theme-green-solid-dark:#679c15;--color-theme-cyan-solid-dark:#209bbf;--color-theme-blue-solid-dark:#5b8bff;--color-theme-violet-solid-dark:#ba69ff;--color-theme-pink-translucent-dark:rgba(255, 65, 113, 0.26);--color-theme-red-translucent-dark:rgba(255, 72, 44, 0.26);--color-theme-orange-translucent-dark:rgba(255, 129, 28, 0.26);--color-theme-green-translucent-dark:rgba(103, 156, 21, 0.26);--color-theme-cyan-translucent-dark:rgba(32, 155, 191, 0.26);--color-theme-blue-translucent-dark:rgba(91, 139, 255, 0.26);--color-theme-violet-translucent-dark:rgba(186, 105, 255, 0.26);--color-on-theme-dark:black;--color-surface-primary-dark:black;--color-surface-secondary-dark:#1b1b1b;--color-surface-tertiary-dark:#282828;--color-shade-primary-dark:rgba(119, 119, 119, 0.28);--color-shade-secondary-dark:rgba(119, 119, 119, 0.34);--color-shade-tertiary-dark:rgba(119, 119, 119, 0.4);--color-foreground-primary-dark:rgba(255, 255, 255, 0.94);--color-foreground-secondary-dark:rgba(139, 139, 139, 0.9);--color-foreground-tertiary-dark:rgba(139, 139, 139, 0.58);--color-outline-primary-dark:#3e3e3e;--color-outline-secondary-dark:#4b4b4b;--color-overlay-dark:rgba(0, 0, 0, 0.68);--color-shadow-dark:rgba(0, 0, 0, 0.1)}@media (-webkit-min-device-pixel-ratio: 1), (min-device-pixel-ratio: 1){:host{--hairline-width-positive:calc(1px / 1);--hairline-width-negative:calc(-1px / 1)}}@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2){:host{--hairline-width-positive:calc(1px / 2);--hairline-width-negative:calc(-1px / 2)}}@media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3){:host{--hairline-width-positive:calc(1px / 3);--hairline-width-negative:calc(-1px / 3)}}@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2){:host{--hairline-color:var(--color-outline-secondary)}}@supports (color: color(display-p3 1 1 1)){:host{--color-theme-pink-solid-light:color(display-p3 0.9490196078 0.1960784314 0.4039215686/100%);--color-theme-red-solid-light:color(display-p3 0.9490196078 0.231372549 0.1333333333/100%);--color-theme-orange-solid-light:color(display-p3 0.9960784314 0.4470588235 0/100%);--color-theme-green-solid-light:color(display-p3 0.3647058824 0.5725490196 0/100%);--color-theme-cyan-solid-light:color(display-p3 0 0.568627451 0.7058823529/100%);--color-theme-blue-solid-light:color(display-p3 0.3058823529 0.5058823529 0.9529411765/100%);--color-theme-violet-solid-light:color(display-p3 0.6823529412 0.368627451 0.9529411765/100%);--color-theme-pink-translucent-light:color(display-p3 0.9490196078 0.1960784314 0.4039215686/16%);--color-theme-red-translucent-light:color(display-p3 0.9490196078 0.231372549 0.1333333333/16%);--color-theme-orange-translucent-light:color(display-p3 0.9960784314 0.4470588235 0/16%);--color-theme-green-translucent-light:color(display-p3 0.3647058824 0.5725490196 0/16%);--color-theme-cyan-translucent-light:color(display-p3 0 0.568627451 0.7058823529/16%);--color-theme-blue-translucent-light:color(display-p3 0.3058823529 0.5058823529 0.9529411765/16%);--color-theme-violet-translucent-light:color(display-p3 0.6823529412 0.368627451 0.9529411765/16%);--color-on-theme-light:color(display-p3 1 1 1/100%);--color-surface-primary-light:color(display-p3 1 1 1/100%);--color-surface-secondary-light:color(display-p3 0.9529411765 0.9529411765 0.9529411765/100%);--color-surface-tertiary-light:color(display-p3 1 1 1/100%);--color-shade-primary-light:color(display-p3 0.4666666667 0.4666666667 0.4666666667/10%);--color-shade-secondary-light:color(display-p3 0.4666666667 0.4666666667 0.4666666667/16%);--color-shade-tertiary-light:color(display-p3 0.4666666667 0.4666666667 0.4666666667/22%);--color-foreground-primary-light:color(display-p3 0 0 0/94%);--color-foreground-secondary-light:color(display-p3 0.3882352941 0.3882352941 0.3882352941/90%);--color-foreground-tertiary-light:color(display-p3 0.3882352941 0.3882352941 0.3882352941/58%);--color-outline-primary-light:color(display-p3 0.8862745098 0.8862745098 0.8862745098/100%);--color-outline-secondary-light:color(display-p3 0.8196078431 0.8196078431 0.8196078431/100%);--color-overlay-light:color(display-p3 0 0 0/26%);--color-shadow-light:color(display-p3 0 0 0/6%)}}@supports (color: color(display-p3 1 1 1)){:host{--color-theme-pink-solid-dark:color(display-p3 1 0.2549019608 0.4431372549/100%);--color-theme-red-solid-dark:color(display-p3 1 0.2823529412 0.1725490196/100%);--color-theme-orange-solid-dark:color(display-p3 1 0.5058823529 0.1098039216/100%);--color-theme-green-solid-dark:color(display-p3 0.4039215686 0.6117647059 0.0823529412/100%);--color-theme-cyan-solid-dark:color(display-p3 0.1254901961 0.6078431373 0.7490196078/100%);--color-theme-blue-solid-dark:color(display-p3 0.3568627451 0.5450980392 1/100%);--color-theme-violet-solid-dark:color(display-p3 0.7294117647 0.4117647059 1/100%);--color-theme-pink-translucent-dark:color(display-p3 1 0.2549019608 0.4431372549/26%);--color-theme-red-translucent-dark:color(display-p3 1 0.2823529412 0.1725490196/26%);--color-theme-orange-translucent-dark:color(display-p3 1 0.5058823529 0.1098039216/26%);--color-theme-green-translucent-dark:color(display-p3 0.4039215686 0.6117647059 0.0823529412/26%);--color-theme-cyan-translucent-dark:color(display-p3 0.1254901961 0.6078431373 0.7490196078/26%);--color-theme-blue-translucent-dark:color(display-p3 0.3568627451 0.5450980392 1/26%);--color-theme-violet-translucent-dark:color(display-p3 0.7294117647 0.4117647059 1/26%);--color-on-theme-dark:color(display-p3 0 0 0/100%);--color-surface-primary-dark:color(display-p3 0 0 0/100%);--color-surface-secondary-dark:color(display-p3 0.1058823529 0.1058823529 0.1058823529/100%);--color-surface-tertiary-dark:color(display-p3 0.1568627451 0.1568627451 0.1568627451/100%);--color-shade-primary-dark:color(display-p3 0.4666666667 0.4666666667 0.4666666667/28%);--color-shade-secondary-dark:color(display-p3 0.4666666667 0.4666666667 0.4666666667/34%);--color-shade-tertiary-dark:color(display-p3 0.4666666667 0.4666666667 0.4666666667/40%);--color-foreground-primary-dark:color(display-p3 1 1 1/94%);--color-foreground-secondary-dark:color(display-p3 0.5450980392 0.5450980392 0.5450980392/90%);--color-foreground-tertiary-dark:color(display-p3 0.5450980392 0.5450980392 0.5450980392/58%);--color-outline-primary-dark:color(display-p3 0.2431372549 0.2431372549 0.2431372549/100%);--color-outline-secondary-dark:color(display-p3 0.2941176471 0.2941176471 0.2941176471/100%);--color-overlay-dark:color(display-p3 0 0 0/68%);--color-shadow-dark:color(display-p3 0 0 0/10%)}}:host,:host(.light){--color-theme-pink-solid:var(--color-theme-pink-solid-light);--color-theme-red-solid:var(--color-theme-red-solid-light);--color-theme-orange-solid:var(--color-theme-orange-solid-light);--color-theme-green-solid:var(--color-theme-green-solid-light);--color-theme-cyan-solid:var(--color-theme-cyan-solid-light);--color-theme-blue-solid:var(--color-theme-blue-solid-light);--color-theme-violet-solid:var(--color-theme-violet-solid-light);--color-theme-pink-translucent:var(--color-theme-pink-translucent-light);--color-theme-red-translucent:var(--color-theme-red-translucent-light);--color-theme-orange-translucent:var(--color-theme-orange-translucent-light);--color-theme-green-translucent:var(--color-theme-green-translucent-light);--color-theme-cyan-translucent:var(--color-theme-cyan-translucent-light);--color-theme-blue-translucent:var(--color-theme-blue-translucent-light);--color-theme-violet-translucent:var(--color-theme-violet-translucent-light);--color-on-theme:var(--color-on-theme-light);--color-surface-primary:var(--color-surface-primary-light);--color-surface-secondary:var(--color-surface-secondary-light);--color-surface-tertiary:var(--color-surface-tertiary-light);--color-shade-primary:var(--color-shade-primary-light);--color-shade-secondary:var(--color-shade-secondary-light);--color-shade-tertiary:var(--color-shade-tertiary-light);--color-foreground-primary:var(--color-foreground-primary-light);--color-foreground-secondary:var(--color-foreground-secondary-light);--color-foreground-tertiary:var(--color-foreground-tertiary-light);--color-outline-primary:var(--color-outline-primary-light);--color-outline-secondary:var(--color-outline-secondary-light);--color-overlay:var(--color-overlay-light);--color-shadow:var(--color-shadow-light)}:host(.dark){--color-theme-pink-solid:var(--color-theme-pink-solid-dark);--color-theme-red-solid:var(--color-theme-red-solid-dark);--color-theme-orange-solid:var(--color-theme-orange-solid-dark);--color-theme-green-solid:var(--color-theme-green-solid-dark);--color-theme-cyan-solid:var(--color-theme-cyan-solid-dark);--color-theme-blue-solid:var(--color-theme-blue-solid-dark);--color-theme-violet-solid:var(--color-theme-violet-solid-dark);--color-theme-pink-translucent:var(--color-theme-pink-translucent-dark);--color-theme-red-translucent:var(--color-theme-red-translucent-dark);--color-theme-orange-translucent:var(--color-theme-orange-translucent-dark);--color-theme-green-translucent:var(--color-theme-green-translucent-dark);--color-theme-cyan-translucent:var(--color-theme-cyan-translucent-dark);--color-theme-blue-translucent:var(--color-theme-blue-translucent-dark);--color-theme-violet-translucent:var(--color-theme-violet-translucent-dark);--color-on-theme:var(--color-on-theme-dark);--color-surface-primary:var(--color-surface-primary-dark);--color-surface-secondary:var(--color-surface-secondary-dark);--color-surface-tertiary:var(--color-surface-tertiary-dark);--color-shade-primary:var(--color-shade-primary-dark);--color-shade-secondary:var(--color-shade-secondary-dark);--color-shade-tertiary:var(--color-shade-tertiary-dark);--color-foreground-primary:var(--color-foreground-primary-dark);--color-foreground-secondary:var(--color-foreground-secondary-dark);--color-foreground-tertiary:var(--color-foreground-tertiary-dark);--color-outline-primary:var(--color-outline-primary-dark);--color-outline-secondary:var(--color-outline-secondary-dark);--color-overlay:var(--color-overlay-dark);--color-shadow:var(--color-shadow-dark)}@media (prefers-color-scheme: dark){:host{--color-theme-pink-solid:var(--color-theme-pink-solid-dark);--color-theme-red-solid:var(--color-theme-red-solid-dark);--color-theme-orange-solid:var(--color-theme-orange-solid-dark);--color-theme-green-solid:var(--color-theme-green-solid-dark);--color-theme-cyan-solid:var(--color-theme-cyan-solid-dark);--color-theme-blue-solid:var(--color-theme-blue-solid-dark);--color-theme-violet-solid:var(--color-theme-violet-solid-dark);--color-theme-pink-translucent:var(--color-theme-pink-translucent-dark);--color-theme-red-translucent:var(--color-theme-red-translucent-dark);--color-theme-orange-translucent:var(--color-theme-orange-translucent-dark);--color-theme-green-translucent:var(--color-theme-green-translucent-dark);--color-theme-cyan-translucent:var(--color-theme-cyan-translucent-dark);--color-theme-blue-translucent:var(--color-theme-blue-translucent-dark);--color-theme-violet-translucent:var(--color-theme-violet-translucent-dark);--color-on-theme:var(--color-on-theme-dark);--color-surface-primary:var(--color-surface-primary-dark);--color-surface-secondary:var(--color-surface-secondary-dark);--color-surface-tertiary:var(--color-surface-tertiary-dark);--color-shade-primary:var(--color-shade-primary-dark);--color-shade-secondary:var(--color-shade-secondary-dark);--color-shade-tertiary:var(--color-shade-tertiary-dark);--color-foreground-primary:var(--color-foreground-primary-dark);--color-foreground-secondary:var(--color-foreground-secondary-dark);--color-foreground-tertiary:var(--color-foreground-tertiary-dark);--color-outline-primary:var(--color-outline-primary-dark);--color-outline-secondary:var(--color-outline-secondary-dark);--color-overlay:var(--color-overlay-dark);--color-shadow:var(--color-shadow-dark)}}:host(.blue){--color-theme-solid:var(--color-theme-blue-solid);--color-theme-translucent:var(--color-theme-blue-translucent)}:host(.cyan){--color-theme-solid:var(--color-theme-cyan-solid);--color-theme-translucent:var(--color-theme-cyan-translucent)}:host(.green){--color-theme-solid:var(--color-theme-green-solid);--color-theme-translucent:var(--color-theme-green-translucent)}:host(.orange){--color-theme-solid:var(--color-theme-orange-solid);--color-theme-translucent:var(--color-theme-orange-translucent)}:host(.pink){--color-theme-solid:var(--color-theme-pink-solid);--color-theme-translucent:var(--color-theme-pink-translucent)}:host(.red){--color-theme-solid:var(--color-theme-red-solid);--color-theme-translucent:var(--color-theme-red-translucent)}:host(.violet){--color-theme-solid:var(--color-theme-violet-solid);--color-theme-translucent:var(--color-theme-violet-translucent)}";
|
|
4557
4841
|
|
|
4558
4842
|
let EzpPrinting$1 = class extends HTMLElement {
|
|
4559
4843
|
constructor() {
|
|
@@ -4561,6 +4845,7 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
4561
4845
|
this.__registerHost();
|
|
4562
4846
|
this.__attachShadow();
|
|
4563
4847
|
this.theme = 'cyan';
|
|
4848
|
+
this.appearance = 'system';
|
|
4564
4849
|
/**
|
|
4565
4850
|
*
|
|
4566
4851
|
* States
|
|
@@ -4624,6 +4909,7 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
4624
4909
|
componentWillLoad() {
|
|
4625
4910
|
authStore.state.redirectUri = this.redirecturi;
|
|
4626
4911
|
userStore.state.theme = this.theme;
|
|
4912
|
+
userStore.state.appearance = this.appearance;
|
|
4627
4913
|
if (this.authapihosturl) {
|
|
4628
4914
|
authStore.state.authApiHostUrl = this.authapihosturl;
|
|
4629
4915
|
}
|
|
@@ -4645,12 +4931,12 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
4645
4931
|
*
|
|
4646
4932
|
*/
|
|
4647
4933
|
render() {
|
|
4648
|
-
return (h(Host, { class: userStore.state.theme }, this.authOpen ? (h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin })) : this.printOpen ? (h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype })) : this.custom ? (h("slot", null)) : (h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))));
|
|
4934
|
+
return (h(Host, { class: `${userStore.state.theme} ${userStore.state.appearance}` }, this.authOpen ? (h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin })) : this.printOpen ? (h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid })) : this.custom ? (h("slot", null)) : (h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))));
|
|
4649
4935
|
}
|
|
4650
4936
|
static get style() { return ezpPrintingCss; }
|
|
4651
4937
|
};
|
|
4652
4938
|
|
|
4653
|
-
const ezpProgressCss = ":host{--stroke-width:4;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center;background:var(--color-overlay);border-radius:6px;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-template:auto/auto;height:100%;-ms-flex-pack:center;justify-content:center;justify-items:center;left:0;padding:var(--spacing-6);position:absolute;top:0;width:100%;z-index:9999}@media (prefers-color-scheme: dark){:host{--box-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#box{background:var(--color-surface-tertiary);border-radius:3px;-webkit-box-shadow:var(--box-separator-position, 0 0 0 var(--hairline-width-positive)) var(--hairline-color);box-shadow:var(--box-separator-position, 0 0 0 var(--hairline-width-positive)) var(--hairline-color);display:grid;grid-row-gap:var(--spacing-2);grid-template-columns:1fr;grid-template-rows:repeat(2, auto);justify-items:center;padding:var(--spacing-4)}#indicator{-webkit-animation:rotate var(--duration-6) linear infinite;animation:rotate var(--duration-6) linear infinite;display:block;height:44px;-webkit-transform:rotate(0);transform:rotate(0);width:44px}#track{fill:none;stroke:var(--color-outline-
|
|
4939
|
+
const ezpProgressCss = ":host{--stroke-width:4;-ms-flex-line-pack:center;align-content:center;-ms-flex-align:center;align-items:center;background:var(--color-overlay);border-radius:6px;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-template:auto/auto;height:100%;-ms-flex-pack:center;justify-content:center;justify-items:center;left:0;padding:var(--spacing-6);position:absolute;top:0;width:100%;z-index:9999}@media (prefers-color-scheme: dark){:host{--box-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#box{background:var(--color-surface-tertiary);border-radius:3px;-webkit-box-shadow:var(--box-separator-position, 0 0 0 var(--hairline-width-positive)) var(--hairline-color);box-shadow:var(--box-separator-position, 0 0 0 var(--hairline-width-positive)) var(--hairline-color);display:grid;grid-row-gap:var(--spacing-2);grid-template-columns:1fr;grid-template-rows:repeat(2, auto);justify-items:center;padding:var(--spacing-4)}#indicator{-webkit-animation:rotate var(--duration-6) linear infinite;animation:rotate var(--duration-6) linear infinite;display:block;height:44px;-webkit-transform:rotate(0);transform:rotate(0);width:44px}#track{fill:none;stroke:var(--color-outline-primary);stroke-width:var(--stroke-width)}#value{-webkit-animation:offset var(--duration-6) linear alternate infinite;animation:offset var(--duration-6) linear alternate infinite;fill:none;stroke:var(--color-theme-solid);stroke-dasharray:100;stroke-dashoffset:100;stroke-linecap:round;stroke-width:var(--stroke-width)}#status{color:var(--color-foreground-primary)}@-webkit-keyframes offset{100%{stroke-dashoffset:50}}@keyframes offset{100%{stroke-dashoffset:50}}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";
|
|
4654
4940
|
|
|
4655
4941
|
let EzpProgress$1 = class extends HTMLElement {
|
|
4656
4942
|
constructor() {
|
|
@@ -4932,7 +5218,7 @@ let EzpTextButton$1 = class extends HTMLElement {
|
|
|
4932
5218
|
static get style() { return ezpTextButtonCss; }
|
|
4933
5219
|
};
|
|
4934
5220
|
|
|
4935
|
-
const ezpUserMenuCss = ":host{background:var(--color-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--host-separator-position, 0 0 0 var(--hairline-width-positive)) var(--hairline-color);box-shadow:var(--host-separator-position, 0 0 0 var(--hairline-width-positive)) var(--hairline-color);display:block;opacity:var(--host-opacity, 0);position:absolute;right:0;top:0;-webkit-transform:scale(var(--host-scale, 0.94, 0.94));transform:scale(var(--host-scale, 0.94, 0.94));-webkit-transform-origin:right top;transform-origin:right top;-webkit-transition:var(--host-transition, opacity var(--duration-3) var(--easing-out-quart), transform var(--duration-3) var(--easing-out-quart), visibility 0s var(--duration-3));transition:var(--host-transition, opacity var(--duration-3) var(--easing-out-quart), transform var(--duration-3) var(--easing-out-quart), visibility 0s var(--duration-3));visibility:var(--host-visibility, hidden);z-index:5}:host(.is-open){--host-opacity:1;--host-scale:1, 1;--host-transition:opacity var(--duration-3) var(--easing-out-quart),\n transform var(--duration-3) var(--easing-out-quart), visibility 0s 0s;--host-visibility:visible}@media (prefers-color-scheme: dark){:host{--host-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#header{-ms-flex-align:center;align-items:center;-webkit-box-shadow:0 var(--hairline-width-positive) 0 0 var(--hairline-color);box-shadow:0 var(--hairline-width-positive) 0 0 var(--hairline-color);-webkit-box-shadow:0;box-shadow:0;display:grid;grid-template:auto/1fr auto;padding:var(--spacing-4) var(--spacing-3) var(--spacing-4) var(--spacing-4)}#name{color:var(--color-foreground-primary)}#close{margin:calc(var(--spacing-3) * -1) 0}#links{
|
|
5221
|
+
const ezpUserMenuCss = ":host{background:var(--color-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--host-separator-position, 0 0 0 var(--hairline-width-positive)) var(--hairline-color);box-shadow:var(--host-separator-position, 0 0 0 var(--hairline-width-positive)) var(--hairline-color);display:block;opacity:var(--host-opacity, 0);position:absolute;right:0;top:0;-webkit-transform:scale(var(--host-scale, 0.94, 0.94));transform:scale(var(--host-scale, 0.94, 0.94));-webkit-transform-origin:right top;transform-origin:right top;-webkit-transition:var(--host-transition, opacity var(--duration-3) var(--easing-out-quart), transform var(--duration-3) var(--easing-out-quart), visibility 0s var(--duration-3));transition:var(--host-transition, opacity var(--duration-3) var(--easing-out-quart), transform var(--duration-3) var(--easing-out-quart), visibility 0s var(--duration-3));visibility:var(--host-visibility, hidden);z-index:5}:host(.is-open){--host-opacity:1;--host-scale:1, 1;--host-transition:opacity var(--duration-3) var(--easing-out-quart),\n transform var(--duration-3) var(--easing-out-quart), visibility 0s 0s;--host-visibility:visible}@media (prefers-color-scheme: dark){:host{--host-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#header{-ms-flex-align:center;align-items:center;-webkit-box-shadow:0 var(--hairline-width-positive) 0 0 var(--hairline-color);box-shadow:0 var(--hairline-width-positive) 0 0 var(--hairline-color);-webkit-box-shadow:0;box-shadow:0;display:grid;grid-template:auto/1fr auto;padding:var(--spacing-4) var(--spacing-3) var(--spacing-4) var(--spacing-4)}#name{color:var(--color-foreground-primary)}#close{margin:calc(var(--spacing-3) * -1) 0}#links{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:var(--spacing-2)}.link{-ms-flex-align:center;align-items:center;background:var(--link-background, transparent);border-radius:3px;color:var(--color-foreground-primary);cursor:pointer;display:grid;gap:var(--spacing-3);grid-template:auto/auto 1fr;padding:var(--spacing-3);text-decoration:none}.link:hover{--link-background:var(--color-shade-primary)}.link__icon{color:var(--color-theme-solid);margin:calc(var(--spacing-2) * -1) 0}#theme{-webkit-box-shadow:inset 0 var(--hairline-width-positive) 0 0 var(--hairline-color);box-shadow:inset 0 var(--hairline-width-positive) 0 0 var(--hairline-color);display:grid;gap:var(--spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--spacing-4) var(--spacing-4) var(--spacing-3)}#swatches{display:-ms-flexbox;display:flex;margin:0 calc(var(--spacing-2) * -1)}.swatch{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--swatch-background, transparent);border:0;border-radius:50%;color:var(--swatch-color);cursor:var(--swatch-cursor, pointer);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--swatch-opacity, 1);outline:none;padding:var(--spacing-2)}@media (hover: hover){.swatch:not(.selected):hover{--swatch-background:var(--swatch-theme-translucent)}.swatch:not(.selected):active{--swatch-opacity:0.74}}.swatch.selected{--dot-boxShadowSize:10px;--swatch-background:var(--swatch-theme-translucent);--swatch-cursor:normal}.swatch.selected>.dot{-webkit-animation:dot-bounce var(--duration-2) ease-in-out;animation:dot-bounce var(--duration-2) ease-in-out}.swatch--blue{--swatch-theme-solid:var(--color-theme-blue-solid);--swatch-theme-translucent:var(--color-theme-blue-translucent)}.swatch--cyan{--swatch-theme-solid:var(--color-theme-cyan-solid);--swatch-theme-translucent:var(--color-theme-cyan-translucent)}.swatch--green{--swatch-theme-solid:var(--color-theme-green-solid);--swatch-theme-translucent:var(--color-theme-green-translucent)}.swatch--orange{--swatch-theme-solid:var(--color-theme-orange-solid);--swatch-theme-translucent:var(--color-theme-orange-translucent)}.swatch--pink{--swatch-theme-solid:var(--color-theme-pink-solid);--swatch-theme-translucent:var(--color-theme-pink-translucent)}.swatch--red{--swatch-theme-solid:var(--color-theme-red-solid);--swatch-theme-translucent:var(--color-theme-red-translucent)}.swatch--violet{--swatch-theme-solid:var(--color-theme-violet-solid);--swatch-theme-translucent:var(--color-theme-violet-translucent)}.dot{background:var(--dot-background, transparent);border-radius:50%;-webkit-box-shadow:inset 0 0 0 var(--dot-boxShadowSize, 4px) var(--swatch-theme-solid);box-shadow:inset 0 0 0 var(--dot-boxShadowSize, 4px) var(--swatch-theme-solid);height:18px;-webkit-transition:-webkit-box-shadow var(--duration-2);transition:-webkit-box-shadow var(--duration-2);transition:box-shadow var(--duration-2);transition:box-shadow var(--duration-2), -webkit-box-shadow var(--duration-2);width:18px}#appearance{-webkit-box-shadow:inset 0 var(--hairline-width-positive) 0 0 var(--hairline-color);box-shadow:inset 0 var(--hairline-width-positive) 0 0 var(--hairline-color);display:grid;gap:var(--spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--spacing-4) var(--spacing-4) var(--spacing-3)}#tabs{display:grid;grid-template:auto/repeat(3, 1fr);margin:0 calc(var(--spacing-2) * -1)}.tab{--icon-height:8px;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--tab-background, transparent);border:0;border-radius:14px;color:var(--tab-color, var(--color-foreground-secondary));cursor:var(--tab-cursor, pointer);display:-ms-flexbox;display:flex;gap:var(--spacing-2);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:var(--spacing-3) var(--spacing-3) var(--spacing-3) var(--spacing-2)}@media (hover: hover){.tab:not(.selected):hover{--tab-background:var(--color-shade-primary)}.tab:not(.selected):active{--tab-background:var(--color-shade-secondary)}}.tab.selected{--tab-background:var(--color-theme-translucent);--tab-color:var(--color-theme-solid);--tab-cursor:normal}@-webkit-keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}";
|
|
4936
5222
|
|
|
4937
5223
|
let EzpUserMenu$1 = class extends HTMLElement {
|
|
4938
5224
|
constructor() {
|
|
@@ -4955,6 +5241,11 @@ let EzpUserMenu$1 = class extends HTMLElement {
|
|
|
4955
5241
|
},
|
|
4956
5242
|
];
|
|
4957
5243
|
this.themes = ['pink', 'red', 'orange', 'green', 'cyan', 'blue', 'violet'];
|
|
5244
|
+
this.appearances = [
|
|
5245
|
+
{ title: 'System', name: 'system' },
|
|
5246
|
+
{ title: 'Light', name: 'light' },
|
|
5247
|
+
{ title: 'Dark', name: 'dark' },
|
|
5248
|
+
];
|
|
4958
5249
|
this.name = 'John Doe';
|
|
4959
5250
|
this.open = false;
|
|
4960
5251
|
this.handleClose = () => {
|
|
@@ -4968,6 +5259,9 @@ let EzpUserMenu$1 = class extends HTMLElement {
|
|
|
4968
5259
|
this.handleTheme = (theme) => {
|
|
4969
5260
|
userStore.state.theme = theme;
|
|
4970
5261
|
};
|
|
5262
|
+
this.handleAppearance = (appearance) => {
|
|
5263
|
+
userStore.state.appearance = appearance;
|
|
5264
|
+
};
|
|
4971
5265
|
}
|
|
4972
5266
|
/**
|
|
4973
5267
|
*
|
|
@@ -5009,7 +5303,7 @@ let EzpUserMenu$1 = class extends HTMLElement {
|
|
|
5009
5303
|
*
|
|
5010
5304
|
*/
|
|
5011
5305
|
render() {
|
|
5012
|
-
return (h(Host, { class: this.open ? 'is-open' : '' }, h("div", { id: "header" }, h("ezp-label", { ellipsis: true, id: "name", weight: "strong", text: this.name }), h("ezp-icon-button", { id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), h("div", { 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", { class: "link", onClick: this.logOut }, h("ezp-icon", { class: "link__icon", name: "logout" }), h("ezp-label", { text: "Logout" }))), h("div", { id: "theme" }, h("ezp-label", { text: "Color Theme:" }), h("div", { 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" }))))))));
|
|
5306
|
+
return (h(Host, { class: this.open ? 'is-open' : '' }, h("div", { id: "header" }, h("ezp-label", { ellipsis: true, id: "name", weight: "strong", text: this.name }), h("ezp-icon-button", { id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), h("div", { 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", { class: "link", onClick: this.logOut }, h("ezp-icon", { class: "link__icon", name: "logout" }), h("ezp-label", { text: "Logout" }))), h("div", { id: "theme" }, h("ezp-label", { text: "Color Theme:", weight: "strong" }), h("div", { 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", { id: "appearance" }, h("ezp-label", { text: "Appearance:", weight: "strong" }), h("div", { 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" }))))))));
|
|
5013
5307
|
}
|
|
5014
5308
|
get component() { return this; }
|
|
5015
5309
|
static get watchers() { return {
|
|
@@ -5024,8 +5318,8 @@ const EzpBackdrop = /*@__PURE__*/proxyCustomElement(EzpBackdrop$1, [1,"ezp-backd
|
|
|
5024
5318
|
const EzpIcon = /*@__PURE__*/proxyCustomElement(EzpIcon$1, [1,"ezp-icon",{"name":[1],"size":[1]}]);
|
|
5025
5319
|
const EzpIconButton = /*@__PURE__*/proxyCustomElement(EzpIconButton$1, [1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}]);
|
|
5026
5320
|
const EzpLabel = /*@__PURE__*/proxyCustomElement(EzpLabel$1, [1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]);
|
|
5027
|
-
const EzpPrinterSelection = /*@__PURE__*/proxyCustomElement(EzpPrinterSelection$1, [1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1],"fileurl":[1],"filetype":[1],"loading":[32],"options":[32],"printInProgress":[32],"userMenuOpen":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedProperties":[32],"previouslySelectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"]]]);
|
|
5028
|
-
const EzpPrinting = /*@__PURE__*/proxyCustomElement(EzpPrinting$1, [1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"printOpen":[32],"authOpen":[32]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authShow","listenAuthShow"],[0,"printShow","listenPrintShow"]]]);
|
|
5321
|
+
const EzpPrinterSelection = /*@__PURE__*/proxyCustomElement(EzpPrinterSelection$1, [1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1],"fileurl":[1],"filetype":[1],"fileid":[1],"loading":[32],"options":[32],"printInProgress":[32],"userMenuOpen":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"previouslySelectedProperties":[32]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"]]]);
|
|
5322
|
+
const EzpPrinting = /*@__PURE__*/proxyCustomElement(EzpPrinting$1, [1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"printOpen":[32],"authOpen":[32]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authShow","listenAuthShow"],[0,"printShow","listenPrintShow"]]]);
|
|
5029
5323
|
const EzpProgress = /*@__PURE__*/proxyCustomElement(EzpProgress$1, [1,"ezp-progress",{"status":[1]}]);
|
|
5030
5324
|
const EzpSelect = /*@__PURE__*/proxyCustomElement(EzpSelect$1, [1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"expanded":[32],"selected":[32]}]);
|
|
5031
5325
|
const EzpStepper = /*@__PURE__*/proxyCustomElement(EzpStepper$1, [1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}]);
|