@ezeep/ezeep-js 1.0.138 → 1.0.142
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 +3 -4
- 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
|
@@ -3170,7 +3170,7 @@ let EzpBackdrop = class {
|
|
|
3170
3170
|
};
|
|
3171
3171
|
EzpBackdrop.style = ezpBackdropCss;
|
|
3172
3172
|
|
|
3173
|
-
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%}";
|
|
3173
|
+
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%}";
|
|
3174
3174
|
|
|
3175
3175
|
let EzpIcon = class {
|
|
3176
3176
|
constructor(hostRef) {
|
|
@@ -4152,7 +4152,17 @@ class EzpPrintService {
|
|
|
4152
4152
|
'Content-Type': 'application/json',
|
|
4153
4153
|
},
|
|
4154
4154
|
body: JSON.stringify(Object.assign(Object.assign(Object.assign({ fileurl: fileUrl, type: fileType, printerid: printerID }, (filename && { alias: filename })), (printAndDelete && { printanddelete: printAndDelete })), { properties })),
|
|
4155
|
-
})
|
|
4155
|
+
});
|
|
4156
|
+
}
|
|
4157
|
+
printByFileID(accessToken, fileID, fileType, printerID, properties, filename, printAndDelete) {
|
|
4158
|
+
return fetch(`https://${this.printingApi}/sfapi/Print/`, {
|
|
4159
|
+
method: 'POST',
|
|
4160
|
+
headers: {
|
|
4161
|
+
Authorization: 'Bearer ' + accessToken,
|
|
4162
|
+
'Content-Type': 'application/json',
|
|
4163
|
+
},
|
|
4164
|
+
body: JSON.stringify(Object.assign(Object.assign(Object.assign({ fileid: fileID, type: fileType, printerid: printerID }, (filename && { alias: filename })), (printAndDelete && { printanddelete: printAndDelete })), { properties })),
|
|
4165
|
+
});
|
|
4156
4166
|
}
|
|
4157
4167
|
}
|
|
4158
4168
|
const printStore = createStore({
|
|
@@ -4160,6 +4170,12 @@ const printStore = createStore({
|
|
|
4160
4170
|
jobID: '',
|
|
4161
4171
|
printFinished: false,
|
|
4162
4172
|
printApiHostUrl: '',
|
|
4173
|
+
printerProperties: {},
|
|
4174
|
+
fileID: '',
|
|
4175
|
+
fileUrl: '',
|
|
4176
|
+
fileType: '',
|
|
4177
|
+
printerID: '',
|
|
4178
|
+
fileName: ''
|
|
4163
4179
|
});
|
|
4164
4180
|
|
|
4165
4181
|
class EzpUserService {
|
|
@@ -4178,6 +4194,7 @@ class EzpUserService {
|
|
|
4178
4194
|
const userStore = createStore({
|
|
4179
4195
|
user: null,
|
|
4180
4196
|
theme: '',
|
|
4197
|
+
appearance: '',
|
|
4181
4198
|
});
|
|
4182
4199
|
|
|
4183
4200
|
const colors = [
|
|
@@ -4258,7 +4275,7 @@ const options = {
|
|
|
4258
4275
|
sizes: sizes
|
|
4259
4276
|
};
|
|
4260
4277
|
|
|
4261
|
-
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
|
|
4278
|
+
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}";
|
|
4262
4279
|
|
|
4263
4280
|
let EzpPrinterSelection = class {
|
|
4264
4281
|
constructor(hostRef) {
|
|
@@ -4289,11 +4306,225 @@ let EzpPrinterSelection = class {
|
|
|
4289
4306
|
this.printInProgress = false;
|
|
4290
4307
|
this.userMenuOpen = false;
|
|
4291
4308
|
this.selectedPrinter = { id: '', location: '', name: '' };
|
|
4309
|
+
this.selectedPrinterConfig = {
|
|
4310
|
+
"Collate": true,
|
|
4311
|
+
"Color": true,
|
|
4312
|
+
"Driver": "TP Output Gateway",
|
|
4313
|
+
"DuplexMode": 1,
|
|
4314
|
+
"DuplexSupported": true,
|
|
4315
|
+
"Id": "f0c0f30c-e9ff-4e11-9181-2417fabeb23f",
|
|
4316
|
+
"Location": "",
|
|
4317
|
+
"MediaSupported": [
|
|
4318
|
+
"Auto",
|
|
4319
|
+
"Letter",
|
|
4320
|
+
"Legal",
|
|
4321
|
+
"Executive",
|
|
4322
|
+
"A4",
|
|
4323
|
+
"A5",
|
|
4324
|
+
"B5 (JIS)",
|
|
4325
|
+
"Umschlag 10",
|
|
4326
|
+
"Umschlag DL",
|
|
4327
|
+
"Umschlag C5",
|
|
4328
|
+
"Umschlag C6",
|
|
4329
|
+
"Umschlag Monarch",
|
|
4330
|
+
"Jap. Postkarte",
|
|
4331
|
+
"A6",
|
|
4332
|
+
"JIS Chou Nr. 2 119x277 mm",
|
|
4333
|
+
"4x6Zoll",
|
|
4334
|
+
"5x7 Zoll",
|
|
4335
|
+
"8x10Zoll",
|
|
4336
|
+
"Ofuku hagaki",
|
|
4337
|
+
"10x15 cm",
|
|
4338
|
+
"13x18 cm",
|
|
4339
|
+
"Karteikarte 3 x 5\"",
|
|
4340
|
+
"Karteikarte 4x6 Zoll"
|
|
4341
|
+
],
|
|
4342
|
+
"MediaSupportedId": [
|
|
4343
|
+
0,
|
|
4344
|
+
1,
|
|
4345
|
+
5,
|
|
4346
|
+
7,
|
|
4347
|
+
9,
|
|
4348
|
+
11,
|
|
4349
|
+
13,
|
|
4350
|
+
20,
|
|
4351
|
+
27,
|
|
4352
|
+
28,
|
|
4353
|
+
31,
|
|
4354
|
+
37,
|
|
4355
|
+
43,
|
|
4356
|
+
70,
|
|
4357
|
+
119,
|
|
4358
|
+
120,
|
|
4359
|
+
121,
|
|
4360
|
+
122,
|
|
4361
|
+
123,
|
|
4362
|
+
124,
|
|
4363
|
+
125,
|
|
4364
|
+
126,
|
|
4365
|
+
127
|
|
4366
|
+
],
|
|
4367
|
+
"Name": "HP DeskJet 3630 series",
|
|
4368
|
+
"OrientationsSupported": [
|
|
4369
|
+
"portrait",
|
|
4370
|
+
"landscape"
|
|
4371
|
+
],
|
|
4372
|
+
"OrientationsSupportedId": [
|
|
4373
|
+
1,
|
|
4374
|
+
2
|
|
4375
|
+
],
|
|
4376
|
+
"PaperFormats": [
|
|
4377
|
+
{
|
|
4378
|
+
"Id": 0,
|
|
4379
|
+
"Name": "Auto",
|
|
4380
|
+
"XRes": 0,
|
|
4381
|
+
"YRes": 0
|
|
4382
|
+
},
|
|
4383
|
+
{
|
|
4384
|
+
"Id": 1,
|
|
4385
|
+
"Name": "Letter",
|
|
4386
|
+
"XRes": 2159,
|
|
4387
|
+
"YRes": 2794
|
|
4388
|
+
},
|
|
4389
|
+
{
|
|
4390
|
+
"Id": 5,
|
|
4391
|
+
"Name": "Legal",
|
|
4392
|
+
"XRes": 2159,
|
|
4393
|
+
"YRes": 3556
|
|
4394
|
+
},
|
|
4395
|
+
{
|
|
4396
|
+
"Id": 7,
|
|
4397
|
+
"Name": "Executive",
|
|
4398
|
+
"XRes": 1841,
|
|
4399
|
+
"YRes": 2667
|
|
4400
|
+
},
|
|
4401
|
+
{
|
|
4402
|
+
"Id": 9,
|
|
4403
|
+
"Name": "A4",
|
|
4404
|
+
"XRes": 2100,
|
|
4405
|
+
"YRes": 2970
|
|
4406
|
+
},
|
|
4407
|
+
{
|
|
4408
|
+
"Id": 11,
|
|
4409
|
+
"Name": "A5",
|
|
4410
|
+
"XRes": 1480,
|
|
4411
|
+
"YRes": 2100
|
|
4412
|
+
},
|
|
4413
|
+
{
|
|
4414
|
+
"Id": 13,
|
|
4415
|
+
"Name": "B5 (JIS)",
|
|
4416
|
+
"XRes": 1820,
|
|
4417
|
+
"YRes": 2570
|
|
4418
|
+
},
|
|
4419
|
+
{
|
|
4420
|
+
"Id": 20,
|
|
4421
|
+
"Name": "Umschlag 10",
|
|
4422
|
+
"XRes": 1047,
|
|
4423
|
+
"YRes": 2413
|
|
4424
|
+
},
|
|
4425
|
+
{
|
|
4426
|
+
"Id": 27,
|
|
4427
|
+
"Name": "Umschlag DL",
|
|
4428
|
+
"XRes": 1100,
|
|
4429
|
+
"YRes": 2200
|
|
4430
|
+
},
|
|
4431
|
+
{
|
|
4432
|
+
"Id": 28,
|
|
4433
|
+
"Name": "Umschlag C5",
|
|
4434
|
+
"XRes": 1620,
|
|
4435
|
+
"YRes": 2290
|
|
4436
|
+
},
|
|
4437
|
+
{
|
|
4438
|
+
"Id": 31,
|
|
4439
|
+
"Name": "Umschlag C6",
|
|
4440
|
+
"XRes": 1140,
|
|
4441
|
+
"YRes": 1620
|
|
4442
|
+
},
|
|
4443
|
+
{
|
|
4444
|
+
"Id": 37,
|
|
4445
|
+
"Name": "Umschlag Monarch",
|
|
4446
|
+
"XRes": 984,
|
|
4447
|
+
"YRes": 1905
|
|
4448
|
+
},
|
|
4449
|
+
{
|
|
4450
|
+
"Id": 43,
|
|
4451
|
+
"Name": "Jap. Postkarte",
|
|
4452
|
+
"XRes": 1000,
|
|
4453
|
+
"YRes": 1480
|
|
4454
|
+
},
|
|
4455
|
+
{
|
|
4456
|
+
"Id": 70,
|
|
4457
|
+
"Name": "A6",
|
|
4458
|
+
"XRes": 1050,
|
|
4459
|
+
"YRes": 1480
|
|
4460
|
+
},
|
|
4461
|
+
{
|
|
4462
|
+
"Id": 119,
|
|
4463
|
+
"Name": "JIS Chou Nr. 2 119x277 mm",
|
|
4464
|
+
"XRes": 1109,
|
|
4465
|
+
"YRes": 1460
|
|
4466
|
+
},
|
|
4467
|
+
{
|
|
4468
|
+
"Id": 120,
|
|
4469
|
+
"Name": "4x6Zoll",
|
|
4470
|
+
"XRes": 1016,
|
|
4471
|
+
"YRes": 1524
|
|
4472
|
+
},
|
|
4473
|
+
{
|
|
4474
|
+
"Id": 121,
|
|
4475
|
+
"Name": "5x7 Zoll",
|
|
4476
|
+
"XRes": 1270,
|
|
4477
|
+
"YRes": 1778
|
|
4478
|
+
},
|
|
4479
|
+
{
|
|
4480
|
+
"Id": 122,
|
|
4481
|
+
"Name": "8x10Zoll",
|
|
4482
|
+
"XRes": 2032,
|
|
4483
|
+
"YRes": 2540
|
|
4484
|
+
},
|
|
4485
|
+
{
|
|
4486
|
+
"Id": 123,
|
|
4487
|
+
"Name": "Ofuku hagaki",
|
|
4488
|
+
"XRes": 2000,
|
|
4489
|
+
"YRes": 1479
|
|
4490
|
+
},
|
|
4491
|
+
{
|
|
4492
|
+
"Id": 124,
|
|
4493
|
+
"Name": "10x15 cm",
|
|
4494
|
+
"XRes": 1016,
|
|
4495
|
+
"YRes": 1524
|
|
4496
|
+
},
|
|
4497
|
+
{
|
|
4498
|
+
"Id": 125,
|
|
4499
|
+
"Name": "13x18 cm",
|
|
4500
|
+
"XRes": 1270,
|
|
4501
|
+
"YRes": 1778
|
|
4502
|
+
},
|
|
4503
|
+
{
|
|
4504
|
+
"Id": 126,
|
|
4505
|
+
"Name": "Karteikarte 3 x 5\"",
|
|
4506
|
+
"XRes": 762,
|
|
4507
|
+
"YRes": 1270
|
|
4508
|
+
},
|
|
4509
|
+
{
|
|
4510
|
+
"Id": 127,
|
|
4511
|
+
"Name": "Karteikarte 4x6 Zoll",
|
|
4512
|
+
"XRes": 1016,
|
|
4513
|
+
"YRes": 1524
|
|
4514
|
+
}
|
|
4515
|
+
],
|
|
4516
|
+
"Resolutions": [
|
|
4517
|
+
"Auto",
|
|
4518
|
+
"600",
|
|
4519
|
+
"1200"
|
|
4520
|
+
],
|
|
4521
|
+
"TPUID": 1
|
|
4522
|
+
};
|
|
4292
4523
|
// needs to be initialised with empty strings
|
|
4293
4524
|
this.selectedProperties = {
|
|
4294
4525
|
paper: '',
|
|
4295
4526
|
paperid: '',
|
|
4296
|
-
color:
|
|
4527
|
+
color: false,
|
|
4297
4528
|
duplex: false,
|
|
4298
4529
|
duplexmode: '',
|
|
4299
4530
|
orientation: '',
|
|
@@ -4303,7 +4534,7 @@ let EzpPrinterSelection = class {
|
|
|
4303
4534
|
this.previouslySelectedProperties = {
|
|
4304
4535
|
paper: '',
|
|
4305
4536
|
paperid: '',
|
|
4306
|
-
color:
|
|
4537
|
+
color: false,
|
|
4307
4538
|
duplex: false,
|
|
4308
4539
|
duplexmode: '',
|
|
4309
4540
|
orientation: '',
|
|
@@ -4321,39 +4552,88 @@ let EzpPrinterSelection = class {
|
|
|
4321
4552
|
};
|
|
4322
4553
|
/** Description... */
|
|
4323
4554
|
this.handlePrint = () => {
|
|
4555
|
+
const validateData = (data) => {
|
|
4556
|
+
if (data.jobstatus === 0) {
|
|
4557
|
+
this.printInProgress = false;
|
|
4558
|
+
return true;
|
|
4559
|
+
}
|
|
4560
|
+
return false;
|
|
4561
|
+
};
|
|
4562
|
+
const POLL_INTERVAL = 2000;
|
|
4324
4563
|
this.printInProgress = true;
|
|
4325
|
-
this.printService
|
|
4326
|
-
.printFileByUrl(authStore.state.accessToken, this.fileurl, this.filetype, this.selectedPrinter.id,
|
|
4327
4564
|
// we have to initialse this obj with empty strings to display the select component
|
|
4328
4565
|
// but don't want to send any attributes with empty strings to the API
|
|
4329
|
-
removeEmptyStrings(this.selectedProperties)
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4566
|
+
removeEmptyStrings(this.selectedProperties);
|
|
4567
|
+
// put it in store for further use
|
|
4568
|
+
printStore.state.fileUrl = this.fileurl;
|
|
4569
|
+
printStore.state.fileID = this.fileid;
|
|
4570
|
+
printStore.state.fileType = this.filetype;
|
|
4571
|
+
printStore.state.printerID = this.selectedPrinter.id;
|
|
4572
|
+
printStore.state.printerProperties = this.selectedProperties;
|
|
4573
|
+
printStore.state.fileName = this.filename;
|
|
4574
|
+
if (this.fileurl) {
|
|
4575
|
+
this.printService
|
|
4576
|
+
.printFileByUrl(authStore.state.accessToken, this.fileurl, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename)
|
|
4577
|
+
.then((response) => {
|
|
4578
|
+
if (response.status === 412) {
|
|
4579
|
+
response.json().then(data => this.fileid = data.fileid);
|
|
4580
|
+
this.printService.printByFileID(authStore.state.accessToken, this.fileid, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename).finally(() => this.printInProgress = false);
|
|
4581
|
+
}
|
|
4582
|
+
else {
|
|
4583
|
+
return response.json();
|
|
4584
|
+
}
|
|
4585
|
+
})
|
|
4586
|
+
.then((data) => {
|
|
4587
|
+
if (data.jobid) {
|
|
4588
|
+
printStore.state.jobID = data.jobid;
|
|
4589
|
+
poll({
|
|
4590
|
+
fn: this.printService.getPrintStatus,
|
|
4591
|
+
validate: validateData,
|
|
4592
|
+
interval: POLL_INTERVAL,
|
|
4593
|
+
maxAttempts: 10,
|
|
4594
|
+
})
|
|
4595
|
+
.then(data)
|
|
4596
|
+
.catch((err) => {
|
|
4597
|
+
console.warn(err);
|
|
4336
4598
|
this.printInProgress = false;
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
};
|
|
4341
|
-
poll({
|
|
4342
|
-
fn: this.printService.getPrintStatus,
|
|
4343
|
-
validate: validateData,
|
|
4344
|
-
interval: POLL_INTERVAL,
|
|
4345
|
-
maxAttempts: 10,
|
|
4346
|
-
})
|
|
4347
|
-
.then(data)
|
|
4348
|
-
.catch((err) => {
|
|
4349
|
-
console.warn(err);
|
|
4599
|
+
});
|
|
4600
|
+
}
|
|
4601
|
+
else {
|
|
4350
4602
|
this.printInProgress = false;
|
|
4351
|
-
}
|
|
4352
|
-
}
|
|
4353
|
-
|
|
4603
|
+
}
|
|
4604
|
+
})
|
|
4605
|
+
.catch(error => {
|
|
4606
|
+
console.log(error);
|
|
4354
4607
|
this.printInProgress = false;
|
|
4355
|
-
}
|
|
4356
|
-
}
|
|
4608
|
+
});
|
|
4609
|
+
}
|
|
4610
|
+
else if (this.fileid) {
|
|
4611
|
+
this.printService.printByFileID(authStore.state.accessToken, this.fileid, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename)
|
|
4612
|
+
.then((response) => response.json())
|
|
4613
|
+
.then((data) => {
|
|
4614
|
+
if (data.jobid) {
|
|
4615
|
+
printStore.state.jobID = data.jobid;
|
|
4616
|
+
poll({
|
|
4617
|
+
fn: this.printService.getPrintStatus,
|
|
4618
|
+
validate: validateData,
|
|
4619
|
+
interval: POLL_INTERVAL,
|
|
4620
|
+
maxAttempts: 10,
|
|
4621
|
+
})
|
|
4622
|
+
.then(data)
|
|
4623
|
+
.catch((err) => {
|
|
4624
|
+
console.warn(err);
|
|
4625
|
+
this.printInProgress = false;
|
|
4626
|
+
});
|
|
4627
|
+
}
|
|
4628
|
+
else {
|
|
4629
|
+
this.printInProgress = false;
|
|
4630
|
+
}
|
|
4631
|
+
})
|
|
4632
|
+
.catch(error => {
|
|
4633
|
+
console.log(error);
|
|
4634
|
+
this.printInProgress = false;
|
|
4635
|
+
});
|
|
4636
|
+
}
|
|
4357
4637
|
localStorage.setItem('properties', JSON.stringify(this.selectedProperties));
|
|
4358
4638
|
localStorage.setItem('printer', JSON.stringify(this.selectedPrinter));
|
|
4359
4639
|
localStorage.setItem('previouslySelectedProperties', JSON.stringify(this.previouslySelectedProperties));
|
|
@@ -4401,11 +4681,14 @@ let EzpPrinterSelection = class {
|
|
|
4401
4681
|
this.userName = userStore.state.user.display_name;
|
|
4402
4682
|
});
|
|
4403
4683
|
}
|
|
4404
|
-
setSelectedProperties(eventDetails) {
|
|
4684
|
+
async setSelectedProperties(eventDetails) {
|
|
4405
4685
|
switch (eventDetails.type) {
|
|
4406
4686
|
case 'printer':
|
|
4407
4687
|
this.selectedPrinter.id = eventDetails.id;
|
|
4408
4688
|
this.selectedPrinter.name = eventDetails.title;
|
|
4689
|
+
await this.printService.getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id).then(data => this.selectedPrinterConfig = data[0]);
|
|
4690
|
+
console.log('selected printer config:');
|
|
4691
|
+
console.log(this.selectedPrinterConfig);
|
|
4409
4692
|
break;
|
|
4410
4693
|
case 'color':
|
|
4411
4694
|
this.selectedProperties.color = !!eventDetails.id;
|
|
@@ -4457,7 +4740,8 @@ let EzpPrinterSelection = class {
|
|
|
4457
4740
|
await this.printService
|
|
4458
4741
|
.getAllPrinterProperties(authStore.state.accessToken)
|
|
4459
4742
|
.then((printerConfig) => {
|
|
4460
|
-
this.printerConfig = printerConfig
|
|
4743
|
+
this.printerConfig = printerConfig;
|
|
4744
|
+
console.log(this.printerConfig);
|
|
4461
4745
|
});
|
|
4462
4746
|
this.loading = false;
|
|
4463
4747
|
}
|
|
@@ -4474,7 +4758,7 @@ let EzpPrinterSelection = class {
|
|
|
4474
4758
|
? printer.location
|
|
4475
4759
|
: i18next.t('printer_selection.unknown_location'),
|
|
4476
4760
|
type: 'printer',
|
|
4477
|
-
})), preSelected: this.selectedPrinter.name })), index.h("div", { id: "options" }, index.h("ezp-select", { label: i18next.t('printer_selection.color'), icon: "color", placeholder: i18next.t('printer_selection.select_color'), toggleFlow: "horizontal", options: this.
|
|
4761
|
+
})), preSelected: this.selectedPrinter.name })), index.h("div", { id: "options" }, index.h("ezp-select", { label: i18next.t('printer_selection.color'), icon: "color", placeholder: i18next.t('printer_selection.select_color'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Color
|
|
4478
4762
|
? [
|
|
4479
4763
|
{
|
|
4480
4764
|
id: 1,
|
|
@@ -4495,25 +4779,25 @@ let EzpPrinterSelection = class {
|
|
|
4495
4779
|
title: i18next.t('printer_selection.color_grayscale'),
|
|
4496
4780
|
meta: '',
|
|
4497
4781
|
type: 'color',
|
|
4498
|
-
}
|
|
4499
|
-
], preSelected: this.previouslySelectedProperties.color }), index.h("ezp-select", { label: i18next.t('printer_selection.orientation'), icon: "orientation", placeholder: i18next.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: this.
|
|
4782
|
+
},
|
|
4783
|
+
], preSelected: this.previouslySelectedProperties.color }), index.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) => ({
|
|
4500
4784
|
id: index,
|
|
4501
4785
|
title: i18next.t(`printer_selection.orientation_${orientation}`),
|
|
4502
4786
|
meta: '',
|
|
4503
4787
|
type: 'orientation',
|
|
4504
|
-
})), preSelected: this.previouslySelectedProperties.orientation }), index.h("ezp-select", { label: i18next.t('printer_selection.size'), icon: "size", placeholder: i18next.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.
|
|
4788
|
+
})), preSelected: this.previouslySelectedProperties.orientation }), index.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) => ({
|
|
4505
4789
|
id: format.Id,
|
|
4506
4790
|
title: format.Name,
|
|
4507
4791
|
meta: `${format.XRes} x ${format.YRes}`,
|
|
4508
4792
|
type: 'format',
|
|
4509
|
-
})), preSelected: this.previouslySelectedProperties.paper }), index.h("ezp-select", { label: i18next.t('printer_selection.quality'), icon: "quality", toggleFlow: "horizontal", options: this.
|
|
4793
|
+
})), preSelected: this.previouslySelectedProperties.paper }), index.h("ezp-select", { label: i18next.t('printer_selection.quality'), icon: "quality", toggleFlow: "horizontal", options: this.selectedPrinterConfig.Resolutions.map((option, index) => ({
|
|
4510
4794
|
id: index,
|
|
4511
4795
|
title: option,
|
|
4512
4796
|
meta: '',
|
|
4513
4797
|
type: 'quality',
|
|
4514
4798
|
})), preSelected: !this.previouslySelectedProperties.resolution
|
|
4515
|
-
? this.
|
|
4516
|
-
: this.previouslySelectedProperties.resolution }), this.
|
|
4799
|
+
? this.selectedPrinterConfig.Resolutions[0]
|
|
4800
|
+
: this.previouslySelectedProperties.resolution }), this.selectedPrinterConfig.DuplexSupported ? (index.h("ezp-select", { label: i18next.t('printer_selection.duplex'), icon: "duplex", toggleFlow: "horizontal", options: this.duplexOptions.map((option) => ({
|
|
4517
4801
|
id: option.id,
|
|
4518
4802
|
title: option.title,
|
|
4519
4803
|
meta: '',
|
|
@@ -4532,12 +4816,13 @@ const config = {
|
|
|
4532
4816
|
printingApiHostUrl: printingApiHostUrl
|
|
4533
4817
|
};
|
|
4534
4818
|
|
|
4535
|
-
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)}";
|
|
4819
|
+
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)}";
|
|
4536
4820
|
|
|
4537
4821
|
let EzpPrinting = class {
|
|
4538
4822
|
constructor(hostRef) {
|
|
4539
4823
|
index.registerInstance(this, hostRef);
|
|
4540
4824
|
this.theme = 'cyan';
|
|
4825
|
+
this.appearance = 'system';
|
|
4541
4826
|
/**
|
|
4542
4827
|
*
|
|
4543
4828
|
* States
|
|
@@ -4601,6 +4886,7 @@ let EzpPrinting = class {
|
|
|
4601
4886
|
componentWillLoad() {
|
|
4602
4887
|
authStore.state.redirectUri = this.redirecturi;
|
|
4603
4888
|
userStore.state.theme = this.theme;
|
|
4889
|
+
userStore.state.appearance = this.appearance;
|
|
4604
4890
|
if (this.authapihosturl) {
|
|
4605
4891
|
authStore.state.authApiHostUrl = this.authapihosturl;
|
|
4606
4892
|
}
|
|
@@ -4622,12 +4908,12 @@ let EzpPrinting = class {
|
|
|
4622
4908
|
*
|
|
4623
4909
|
*/
|
|
4624
4910
|
render() {
|
|
4625
|
-
return (index.h(index.Host, { class: userStore.state.theme }, this.authOpen ? (index.h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin })) : this.printOpen ? (index.h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype })) : this.custom ? (index.h("slot", null)) : (index.h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))));
|
|
4911
|
+
return (index.h(index.Host, { class: `${userStore.state.theme} ${userStore.state.appearance}` }, this.authOpen ? (index.h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin })) : this.printOpen ? (index.h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid })) : this.custom ? (index.h("slot", null)) : (index.h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))));
|
|
4626
4912
|
}
|
|
4627
4913
|
};
|
|
4628
4914
|
EzpPrinting.style = ezpPrintingCss;
|
|
4629
4915
|
|
|
4630
|
-
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-
|
|
4916
|
+
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)}}";
|
|
4631
4917
|
|
|
4632
4918
|
let EzpProgress = class {
|
|
4633
4919
|
constructor(hostRef) {
|
|
@@ -4901,7 +5187,7 @@ let EzpTextButton = class {
|
|
|
4901
5187
|
};
|
|
4902
5188
|
EzpTextButton.style = ezpTextButtonCss;
|
|
4903
5189
|
|
|
4904
|
-
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{
|
|
5190
|
+
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)}}";
|
|
4905
5191
|
|
|
4906
5192
|
let EzpUserMenu = class {
|
|
4907
5193
|
constructor(hostRef) {
|
|
@@ -4922,6 +5208,11 @@ let EzpUserMenu = class {
|
|
|
4922
5208
|
},
|
|
4923
5209
|
];
|
|
4924
5210
|
this.themes = ['pink', 'red', 'orange', 'green', 'cyan', 'blue', 'violet'];
|
|
5211
|
+
this.appearances = [
|
|
5212
|
+
{ title: 'System', name: 'system' },
|
|
5213
|
+
{ title: 'Light', name: 'light' },
|
|
5214
|
+
{ title: 'Dark', name: 'dark' },
|
|
5215
|
+
];
|
|
4925
5216
|
this.name = 'John Doe';
|
|
4926
5217
|
this.open = false;
|
|
4927
5218
|
this.handleClose = () => {
|
|
@@ -4935,6 +5226,9 @@ let EzpUserMenu = class {
|
|
|
4935
5226
|
this.handleTheme = (theme) => {
|
|
4936
5227
|
userStore.state.theme = theme;
|
|
4937
5228
|
};
|
|
5229
|
+
this.handleAppearance = (appearance) => {
|
|
5230
|
+
userStore.state.appearance = appearance;
|
|
5231
|
+
};
|
|
4938
5232
|
}
|
|
4939
5233
|
/**
|
|
4940
5234
|
*
|
|
@@ -4976,7 +5270,7 @@ let EzpUserMenu = class {
|
|
|
4976
5270
|
*
|
|
4977
5271
|
*/
|
|
4978
5272
|
render() {
|
|
4979
|
-
return (index.h(index.Host, { class: this.open ? 'is-open' : '' }, index.h("div", { id: "header" }, index.h("ezp-label", { ellipsis: true, id: "name", weight: "strong", text: this.name }), index.h("ezp-icon-button", { id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), index.h("div", { id: "links" }, this.links.map((link) => (index.h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, index.h("ezp-icon", { class: "link__icon", name: link.icon }), index.h("ezp-label", { text: link.title })))), index.h("a", { class: "link", onClick: this.logOut }, index.h("ezp-icon", { class: "link__icon", name: "logout" }), index.h("ezp-label", { text: "Logout" }))), index.h("div", { id: "theme" }, index.h("ezp-label", { text: "Color Theme:" }), index.h("div", { id: "swatches" }, this.themes.map((theme) => (index.h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, index.h("span", { class: "dot" }))))))));
|
|
5273
|
+
return (index.h(index.Host, { class: this.open ? 'is-open' : '' }, index.h("div", { id: "header" }, index.h("ezp-label", { ellipsis: true, id: "name", weight: "strong", text: this.name }), index.h("ezp-icon-button", { id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), index.h("div", { id: "links" }, this.links.map((link) => (index.h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, index.h("ezp-icon", { class: "link__icon", name: link.icon }), index.h("ezp-label", { text: link.title })))), index.h("a", { class: "link", onClick: this.logOut }, index.h("ezp-icon", { class: "link__icon", name: "logout" }), index.h("ezp-label", { text: "Logout" }))), index.h("div", { id: "theme" }, index.h("ezp-label", { text: "Color Theme:", weight: "strong" }), index.h("div", { id: "swatches" }, this.themes.map((theme) => (index.h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, index.h("span", { class: "dot" })))))), index.h("div", { id: "appearance" }, index.h("ezp-label", { text: "Appearance:", weight: "strong" }), index.h("div", { id: "tabs" }, this.appearances.map((appearance) => (index.h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, index.h("ezp-icon", { name: appearance.name }), index.h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
|
|
4980
5274
|
}
|
|
4981
5275
|
get component() { return index.getElement(this); }
|
|
4982
5276
|
static get watchers() { return {
|