@ezeep/ezeep-js 1.0.226 → 1.0.228
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/ezp-auth_15.cjs.entry.js +34 -1
- package/dist/collection/components/ezp-dialog/ezp-dialog.js +1 -1
- package/dist/collection/components/ezp-icon/assets/glyph-paper_range.svg +1 -0
- package/dist/collection/components/ezp-icon/assets/glyph-trays.svg +1 -0
- package/dist/collection/components/ezp-icon/ezp-icon.js +1 -1
- package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +1 -1
- package/dist/collection/components/ezp-input/ezp-input.js +1 -1
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +27 -2
- package/dist/collection/components/ezp-select/ezp-select.js +1 -1
- package/dist/collection/components/ezp-status/ezp-status.js +1 -1
- package/dist/collection/components/ezp-stepper/ezp-stepper.js +1 -1
- package/dist/collection/utils/utils.js +3 -0
- package/dist/custom-elements/index.js +34 -1
- package/dist/esm/ezp-auth_15.entry.js +34 -1
- package/dist/esm-es5/ezp-auth_15.entry.js +3 -3
- package/dist/ezeep/assets/glyph-paper_range.svg +1 -0
- package/dist/ezeep/assets/glyph-trays.svg +1 -0
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/p-84bd195a.system.js +1 -1
- package/dist/ezeep/{p-f5a002c3.system.entry.js → p-c639744d.system.entry.js} +3 -3
- package/dist/ezeep/{p-0d6efa1d.entry.js → p-f60dd366.entry.js} +2 -2
- package/dist/types/shared/types.d.ts +12 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/www/build/assets/glyph-paper_range.svg +1 -0
- package/www/build/assets/glyph-trays.svg +1 -0
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/p-84bd195a.system.js +1 -1
- package/www/build/{p-f5a002c3.system.entry.js → p-c639744d.system.entry.js} +3 -3
- package/www/build/{p-0d6efa1d.entry.js → p-f60dd366.entry.js} +2 -2
- package/www/data/locales/de.json +3 -0
- package/www/data/locales/en.json +3 -0
|
@@ -2876,6 +2876,9 @@ const printer_selection$1 = {
|
|
|
2876
2876
|
pull_print_success: "Bereit zum Auslösen.",
|
|
2877
2877
|
width: "Breite",
|
|
2878
2878
|
length: "Länge",
|
|
2879
|
+
trays: "Trays",
|
|
2880
|
+
select_trays: "Wähle Trays",
|
|
2881
|
+
page_ranges: "Page Ranges",
|
|
2879
2882
|
paper_ranges: "Papier-Ranges"
|
|
2880
2883
|
};
|
|
2881
2884
|
const button_actions$1 = {
|
|
@@ -2956,6 +2959,9 @@ const printer_selection = {
|
|
|
2956
2959
|
copies: "Copies",
|
|
2957
2960
|
width: "Width",
|
|
2958
2961
|
length: "Length",
|
|
2962
|
+
trays: "Trays",
|
|
2963
|
+
select_trays: "Select Trays",
|
|
2964
|
+
page_ranges: "Page Ranges",
|
|
2959
2965
|
paper_ranges: "Paper Ranges"
|
|
2960
2966
|
};
|
|
2961
2967
|
const button_actions = {
|
|
@@ -3063,6 +3069,9 @@ const managePaperDimensions = (properties) => {
|
|
|
3063
3069
|
}
|
|
3064
3070
|
return properties;
|
|
3065
3071
|
};
|
|
3072
|
+
const formatPageRange = (pageRange) => {
|
|
3073
|
+
return pageRange.replace(/,/g, ';');
|
|
3074
|
+
};
|
|
3066
3075
|
const validatePageRange = (pageRange) => {
|
|
3067
3076
|
if (!pageRange) {
|
|
3068
3077
|
return true;
|
|
@@ -32792,6 +32801,7 @@ let EzpPrinterSelection = class {
|
|
|
32792
32801
|
Resolutions: [],
|
|
32793
32802
|
DuplexSupported: false,
|
|
32794
32803
|
Color: false,
|
|
32804
|
+
Trays: []
|
|
32795
32805
|
};
|
|
32796
32806
|
// needs to be initialised with empty strings
|
|
32797
32807
|
this.selectedProperties = {
|
|
@@ -32805,6 +32815,8 @@ let EzpPrinterSelection = class {
|
|
|
32805
32815
|
resolution: 0,
|
|
32806
32816
|
paperlength: 0,
|
|
32807
32817
|
paperwidth: 0,
|
|
32818
|
+
defaultSource: '',
|
|
32819
|
+
trayname: '',
|
|
32808
32820
|
PageRanges: '',
|
|
32809
32821
|
};
|
|
32810
32822
|
/**
|
|
@@ -32832,8 +32844,14 @@ let EzpPrinterSelection = class {
|
|
|
32832
32844
|
this.printProcessing = true;
|
|
32833
32845
|
// we have to initialse this obj with empty strings to display the select component
|
|
32834
32846
|
// but don't want to send any attributes with empty strings to the API
|
|
32847
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
|
|
32848
|
+
delete this.selectedProperties.trayname;
|
|
32849
|
+
delete this.selectedProperties.defaultSource;
|
|
32850
|
+
}
|
|
32835
32851
|
let cleanPrintProperties = removeEmptyStrings(this.selectedProperties);
|
|
32836
32852
|
cleanPrintProperties = managePaperDimensions(cleanPrintProperties);
|
|
32853
|
+
if (cleanPrintProperties.PageRanges)
|
|
32854
|
+
cleanPrintProperties.PageRanges = formatPageRange(cleanPrintProperties.PageRanges);
|
|
32837
32855
|
// put it in store for further use
|
|
32838
32856
|
printStore.state.fileUrl = this.fileurl;
|
|
32839
32857
|
printStore.state.fileID = this.fileid;
|
|
@@ -33025,6 +33043,16 @@ let EzpPrinterSelection = class {
|
|
|
33025
33043
|
this.selectedProperties.paperwidth = eventDetails.value;
|
|
33026
33044
|
// console.log(this.selectedProperties)
|
|
33027
33045
|
break;
|
|
33046
|
+
case 'tray':
|
|
33047
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
|
|
33048
|
+
delete this.selectedProperties.trayname;
|
|
33049
|
+
delete this.selectedProperties.defaultSource;
|
|
33050
|
+
}
|
|
33051
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null) {
|
|
33052
|
+
this.selectedProperties.trayname = eventDetails.title;
|
|
33053
|
+
this.selectedProperties.defaultSource = eventDetails.id;
|
|
33054
|
+
}
|
|
33055
|
+
break;
|
|
33028
33056
|
case 'paper_ranges':
|
|
33029
33057
|
this.selectedProperties.PageRanges = eventDetails.value;
|
|
33030
33058
|
this.pageRangeInvalid = !validatePageRange(this.selectedProperties.PageRanges);
|
|
@@ -33232,7 +33260,12 @@ let EzpPrinterSelection = class {
|
|
|
33232
33260
|
title: option,
|
|
33233
33261
|
meta: '',
|
|
33234
33262
|
type: 'quality',
|
|
33235
|
-
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }),
|
|
33263
|
+
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }), this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null ? (index.h("ezp-select", { label: i18next.t('printer_selection.trays'), icon: "trays", placeholder: i18next.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays.map((trays) => ({
|
|
33264
|
+
title: trays.Name,
|
|
33265
|
+
id: trays.Index,
|
|
33266
|
+
meta: '',
|
|
33267
|
+
type: 'tray',
|
|
33268
|
+
})) })) : null, index.h("ezp-input", { icon: "paper_range", suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: i18next.t('printer_selection.paper_ranges') })), index.h("ezp-stepper", { label: i18next.t('printer_selection.copies'), max: 10, icon: "copies" })), index.h("div", { id: "footer" }, index.h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel'), class: "action", id: "cancel" }), index.h("ezp-text-button", { disabled: this.selectedPrinter.id === '' || this.printProcessing || this.pageRangeInvalid, type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print'), ref: (button) => (this.printButton = button), class: "action", id: "print" })), !this.hidemenu && index.h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
|
|
33236
33269
|
}
|
|
33237
33270
|
};
|
|
33238
33271
|
EzpPrinterSelection.style = ezpPrinterSelectionCss;
|
|
@@ -107,7 +107,7 @@ export class EzpDialog {
|
|
|
107
107
|
"mutable": false,
|
|
108
108
|
"complexType": {
|
|
109
109
|
"original": "IconNameTypes",
|
|
110
|
-
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\"",
|
|
110
|
+
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\" | \"paper_range\" | \"trays\"",
|
|
111
111
|
"references": {
|
|
112
112
|
"IconNameTypes": {
|
|
113
113
|
"location": "import",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="#646464" height="200px" width="200px" version="1.2" baseProfile="tiny" id="_x31_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-63 65 128 128" xml:space="preserve" stroke="#646464"><g stroke-width="0"></g><g stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M-31.7,97.6h57.9v31.3h-57.9V97.6z M-31.7,136.8h57.3v5.2h-57.3V136.8z M-31.7,162.2h57.3v5.2h-57.3V162.2z M-31.7,149.2 h57.3v5.2h-57.3V149.2z M-33.1,70.8v10h-11.6v104.6h84.9v-10h11.6V70.8H-33.1z M34.9,170.2v5.2v4.8h-74.4V86h6.4h5.2H35L34.9,170.2 L34.9,170.2z M46.5,170.2h-6.4V80.8h-68V76h74.4V170.2z"></path> </g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="#646464" viewBox="0 0 56 56" xmlns="http://www.w3.org/2000/svg" stroke="#646464" stroke-width="0.00056"><g stroke-width="0"></g><g stroke-linecap="round" stroke-linejoin="round"></g><g><path d="M 7.7148 48.0039 L 48.2852 48.0039 C 53.1836 48.0039 55.6446 45.5664 55.6446 40.7383 L 55.6446 26.8633 C 55.6446 24.7539 55.3398 23.6992 54.3088 22.4102 L 46.1992 12.4023 C 43.4569 9.0274 42.2382 7.9961 38.0898 7.9961 L 17.9101 7.9961 C 13.7617 7.9961 12.5429 9.0274 9.8007 12.4023 L 1.6913 22.4102 C .6601 23.6992 .3554 24.7539 .3554 26.8633 L .3554 40.7383 C .3554 45.5898 2.8398 48.0039 7.7148 48.0039 Z M 27.9882 33.0274 C 24.6835 33.0274 22.5507 30.1445 22.5507 27.4258 L 22.5507 27.3555 C 22.5507 26.3711 21.9648 25.4570 20.7695 25.4570 L 5.3007 25.4570 C 4.5273 25.4570 4.3632 24.7774 4.7617 24.2852 L 13.4570 13.3164 C 14.6288 11.8633 15.9413 11.2774 17.6523 11.2774 L 38.3476 11.2774 C 40.0585 11.2774 41.3710 11.8633 42.5430 13.3164 L 51.2382 24.2852 C 51.6366 24.7774 51.4724 25.4570 50.6992 25.4570 L 35.2304 25.4570 C 34.0351 25.4570 33.4492 26.3711 33.4492 27.3555 L 33.4492 27.4258 C 33.4492 30.1445 31.3163 33.0274 27.9882 33.0274 Z M 7.7851 44.2305 C 5.4413 44.2305 4.1288 42.9883 4.1288 40.5508 L 4.1288 28.8789 L 18.9882 28.8789 C 19.5741 33.2617 23.2304 36.4961 27.9882 36.4961 C 32.7460 36.4961 36.4257 33.2383 36.9882 28.8789 L 51.8708 28.8789 L 51.8708 40.5508 C 51.8708 42.9883 50.5350 44.2305 48.2147 44.2305 Z"></path></g></svg>
|
|
@@ -43,7 +43,7 @@ export class EzpIcon {
|
|
|
43
43
|
"mutable": false,
|
|
44
44
|
"complexType": {
|
|
45
45
|
"original": "IconNameTypes",
|
|
46
|
-
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\"",
|
|
46
|
+
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\" | \"paper_range\" | \"trays\"",
|
|
47
47
|
"references": {
|
|
48
48
|
"IconNameTypes": {
|
|
49
49
|
"location": "import",
|
|
@@ -100,7 +100,7 @@ export class EzpIconButton {
|
|
|
100
100
|
"mutable": false,
|
|
101
101
|
"complexType": {
|
|
102
102
|
"original": "IconNameTypes",
|
|
103
|
-
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\"",
|
|
103
|
+
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\" | \"paper_range\" | \"trays\"",
|
|
104
104
|
"references": {
|
|
105
105
|
"IconNameTypes": {
|
|
106
106
|
"location": "import",
|
|
@@ -117,7 +117,7 @@ export class EzpInput {
|
|
|
117
117
|
"mutable": false,
|
|
118
118
|
"complexType": {
|
|
119
119
|
"original": "IconNameTypes",
|
|
120
|
-
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\"",
|
|
120
|
+
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\" | \"paper_range\" | \"trays\"",
|
|
121
121
|
"references": {
|
|
122
122
|
"IconNameTypes": {
|
|
123
123
|
"location": "import",
|
|
@@ -4,7 +4,7 @@ import authStore from '../../services/auth';
|
|
|
4
4
|
import printStore, { EzpPrintService } from '../../services/print';
|
|
5
5
|
import userStore, { EzpUserService } from '../../services/user';
|
|
6
6
|
import { managePaperDimensions, poll, removeEmptyStrings } from '../../utils/utils';
|
|
7
|
-
import { PAPER_ID, validatePageRange } from '../../utils/utils';
|
|
7
|
+
import { PAPER_ID, validatePageRange, formatPageRange } from '../../utils/utils';
|
|
8
8
|
export class EzpPrinterSelection {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.sasUri = '';
|
|
@@ -47,6 +47,7 @@ export class EzpPrinterSelection {
|
|
|
47
47
|
Resolutions: [],
|
|
48
48
|
DuplexSupported: false,
|
|
49
49
|
Color: false,
|
|
50
|
+
Trays: []
|
|
50
51
|
};
|
|
51
52
|
// needs to be initialised with empty strings
|
|
52
53
|
this.selectedProperties = {
|
|
@@ -60,6 +61,8 @@ export class EzpPrinterSelection {
|
|
|
60
61
|
resolution: 0,
|
|
61
62
|
paperlength: 0,
|
|
62
63
|
paperwidth: 0,
|
|
64
|
+
defaultSource: '',
|
|
65
|
+
trayname: '',
|
|
63
66
|
PageRanges: '',
|
|
64
67
|
};
|
|
65
68
|
/**
|
|
@@ -87,8 +90,14 @@ export class EzpPrinterSelection {
|
|
|
87
90
|
this.printProcessing = true;
|
|
88
91
|
// we have to initialse this obj with empty strings to display the select component
|
|
89
92
|
// but don't want to send any attributes with empty strings to the API
|
|
93
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
|
|
94
|
+
delete this.selectedProperties.trayname;
|
|
95
|
+
delete this.selectedProperties.defaultSource;
|
|
96
|
+
}
|
|
90
97
|
let cleanPrintProperties = removeEmptyStrings(this.selectedProperties);
|
|
91
98
|
cleanPrintProperties = managePaperDimensions(cleanPrintProperties);
|
|
99
|
+
if (cleanPrintProperties.PageRanges)
|
|
100
|
+
cleanPrintProperties.PageRanges = formatPageRange(cleanPrintProperties.PageRanges);
|
|
92
101
|
// put it in store for further use
|
|
93
102
|
printStore.state.fileUrl = this.fileurl;
|
|
94
103
|
printStore.state.fileID = this.fileid;
|
|
@@ -280,6 +289,16 @@ export class EzpPrinterSelection {
|
|
|
280
289
|
this.selectedProperties.paperwidth = eventDetails.value;
|
|
281
290
|
// console.log(this.selectedProperties)
|
|
282
291
|
break;
|
|
292
|
+
case 'tray':
|
|
293
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
|
|
294
|
+
delete this.selectedProperties.trayname;
|
|
295
|
+
delete this.selectedProperties.defaultSource;
|
|
296
|
+
}
|
|
297
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null) {
|
|
298
|
+
this.selectedProperties.trayname = eventDetails.title;
|
|
299
|
+
this.selectedProperties.defaultSource = eventDetails.id;
|
|
300
|
+
}
|
|
301
|
+
break;
|
|
283
302
|
case 'paper_ranges':
|
|
284
303
|
this.selectedProperties.PageRanges = eventDetails.value;
|
|
285
304
|
this.pageRangeInvalid = !validatePageRange(this.selectedProperties.PageRanges);
|
|
@@ -508,7 +527,13 @@ export class EzpPrinterSelection {
|
|
|
508
527
|
meta: '',
|
|
509
528
|
type: 'quality',
|
|
510
529
|
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }),
|
|
511
|
-
h("ezp-
|
|
530
|
+
this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null ? (h("ezp-select", { label: i18next.t('printer_selection.trays'), icon: "trays", placeholder: i18next.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays.map((trays) => ({
|
|
531
|
+
title: trays.Name,
|
|
532
|
+
id: trays.Index,
|
|
533
|
+
meta: '',
|
|
534
|
+
type: 'tray',
|
|
535
|
+
})) })) : null,
|
|
536
|
+
h("ezp-input", { icon: "paper_range", suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: i18next.t('printer_selection.paper_ranges') })),
|
|
512
537
|
h("ezp-stepper", { label: i18next.t('printer_selection.copies'), max: 10, icon: "copies" })),
|
|
513
538
|
h("div", { id: "footer" },
|
|
514
539
|
h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel'), class: "action", id: "cancel" }),
|
|
@@ -161,7 +161,7 @@ export class EzpSelect {
|
|
|
161
161
|
"mutable": false,
|
|
162
162
|
"complexType": {
|
|
163
163
|
"original": "IconNameTypes",
|
|
164
|
-
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\"",
|
|
164
|
+
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\" | \"paper_range\" | \"trays\"",
|
|
165
165
|
"references": {
|
|
166
166
|
"IconNameTypes": {
|
|
167
167
|
"location": "import",
|
|
@@ -116,7 +116,7 @@ export class EzpStatus {
|
|
|
116
116
|
"mutable": false,
|
|
117
117
|
"complexType": {
|
|
118
118
|
"original": "IconNameTypes",
|
|
119
|
-
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\"",
|
|
119
|
+
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\" | \"paper_range\" | \"trays\"",
|
|
120
120
|
"references": {
|
|
121
121
|
"IconNameTypes": {
|
|
122
122
|
"location": "import",
|
|
@@ -91,7 +91,7 @@ export class EzpStepper {
|
|
|
91
91
|
"mutable": false,
|
|
92
92
|
"complexType": {
|
|
93
93
|
"original": "IconNameTypes",
|
|
94
|
-
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\"",
|
|
94
|
+
"resolved": "\"account\" | \"checkmark-alt\" | \"checkmark\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"width\" | \"paper_range\" | \"trays\"",
|
|
95
95
|
"references": {
|
|
96
96
|
"IconNameTypes": {
|
|
97
97
|
"location": "import",
|
|
@@ -75,6 +75,9 @@ export const managePaperDimensions = (properties) => {
|
|
|
75
75
|
}
|
|
76
76
|
return properties;
|
|
77
77
|
};
|
|
78
|
+
export const formatPageRange = (pageRange) => {
|
|
79
|
+
return pageRange.replace(/,/g, ';');
|
|
80
|
+
};
|
|
78
81
|
export const validatePageRange = (pageRange) => {
|
|
79
82
|
if (!pageRange) {
|
|
80
83
|
return true;
|
|
@@ -2885,6 +2885,9 @@ const printer_selection$1 = {
|
|
|
2885
2885
|
pull_print_success: "Bereit zum Auslösen.",
|
|
2886
2886
|
width: "Breite",
|
|
2887
2887
|
length: "Länge",
|
|
2888
|
+
trays: "Trays",
|
|
2889
|
+
select_trays: "Wähle Trays",
|
|
2890
|
+
page_ranges: "Page Ranges",
|
|
2888
2891
|
paper_ranges: "Papier-Ranges"
|
|
2889
2892
|
};
|
|
2890
2893
|
const button_actions$1 = {
|
|
@@ -2965,6 +2968,9 @@ const printer_selection = {
|
|
|
2965
2968
|
copies: "Copies",
|
|
2966
2969
|
width: "Width",
|
|
2967
2970
|
length: "Length",
|
|
2971
|
+
trays: "Trays",
|
|
2972
|
+
select_trays: "Select Trays",
|
|
2973
|
+
page_ranges: "Page Ranges",
|
|
2968
2974
|
paper_ranges: "Paper Ranges"
|
|
2969
2975
|
};
|
|
2970
2976
|
const button_actions = {
|
|
@@ -3072,6 +3078,9 @@ const managePaperDimensions = (properties) => {
|
|
|
3072
3078
|
}
|
|
3073
3079
|
return properties;
|
|
3074
3080
|
};
|
|
3081
|
+
const formatPageRange = (pageRange) => {
|
|
3082
|
+
return pageRange.replace(/,/g, ';');
|
|
3083
|
+
};
|
|
3075
3084
|
const validatePageRange = (pageRange) => {
|
|
3076
3085
|
if (!pageRange) {
|
|
3077
3086
|
return true;
|
|
@@ -32817,6 +32826,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32817
32826
|
Resolutions: [],
|
|
32818
32827
|
DuplexSupported: false,
|
|
32819
32828
|
Color: false,
|
|
32829
|
+
Trays: []
|
|
32820
32830
|
};
|
|
32821
32831
|
// needs to be initialised with empty strings
|
|
32822
32832
|
this.selectedProperties = {
|
|
@@ -32830,6 +32840,8 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32830
32840
|
resolution: 0,
|
|
32831
32841
|
paperlength: 0,
|
|
32832
32842
|
paperwidth: 0,
|
|
32843
|
+
defaultSource: '',
|
|
32844
|
+
trayname: '',
|
|
32833
32845
|
PageRanges: '',
|
|
32834
32846
|
};
|
|
32835
32847
|
/**
|
|
@@ -32857,8 +32869,14 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32857
32869
|
this.printProcessing = true;
|
|
32858
32870
|
// we have to initialse this obj with empty strings to display the select component
|
|
32859
32871
|
// but don't want to send any attributes with empty strings to the API
|
|
32872
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
|
|
32873
|
+
delete this.selectedProperties.trayname;
|
|
32874
|
+
delete this.selectedProperties.defaultSource;
|
|
32875
|
+
}
|
|
32860
32876
|
let cleanPrintProperties = removeEmptyStrings(this.selectedProperties);
|
|
32861
32877
|
cleanPrintProperties = managePaperDimensions(cleanPrintProperties);
|
|
32878
|
+
if (cleanPrintProperties.PageRanges)
|
|
32879
|
+
cleanPrintProperties.PageRanges = formatPageRange(cleanPrintProperties.PageRanges);
|
|
32862
32880
|
// put it in store for further use
|
|
32863
32881
|
printStore.state.fileUrl = this.fileurl;
|
|
32864
32882
|
printStore.state.fileID = this.fileid;
|
|
@@ -33050,6 +33068,16 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33050
33068
|
this.selectedProperties.paperwidth = eventDetails.value;
|
|
33051
33069
|
// console.log(this.selectedProperties)
|
|
33052
33070
|
break;
|
|
33071
|
+
case 'tray':
|
|
33072
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
|
|
33073
|
+
delete this.selectedProperties.trayname;
|
|
33074
|
+
delete this.selectedProperties.defaultSource;
|
|
33075
|
+
}
|
|
33076
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null) {
|
|
33077
|
+
this.selectedProperties.trayname = eventDetails.title;
|
|
33078
|
+
this.selectedProperties.defaultSource = eventDetails.id;
|
|
33079
|
+
}
|
|
33080
|
+
break;
|
|
33053
33081
|
case 'paper_ranges':
|
|
33054
33082
|
this.selectedProperties.PageRanges = eventDetails.value;
|
|
33055
33083
|
this.pageRangeInvalid = !validatePageRange(this.selectedProperties.PageRanges);
|
|
@@ -33257,7 +33285,12 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33257
33285
|
title: option,
|
|
33258
33286
|
meta: '',
|
|
33259
33287
|
type: 'quality',
|
|
33260
|
-
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }),
|
|
33288
|
+
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }), this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null ? (h("ezp-select", { label: i18next.t('printer_selection.trays'), icon: "trays", placeholder: i18next.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays.map((trays) => ({
|
|
33289
|
+
title: trays.Name,
|
|
33290
|
+
id: trays.Index,
|
|
33291
|
+
meta: '',
|
|
33292
|
+
type: 'tray',
|
|
33293
|
+
})) })) : null, h("ezp-input", { icon: "paper_range", suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: i18next.t('printer_selection.paper_ranges') })), h("ezp-stepper", { label: i18next.t('printer_selection.copies'), max: 10, icon: "copies" })), h("div", { id: "footer" }, h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel'), class: "action", id: "cancel" }), h("ezp-text-button", { disabled: this.selectedPrinter.id === '' || this.printProcessing || this.pageRangeInvalid, type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print'), ref: (button) => (this.printButton = button), class: "action", id: "print" })), !this.hidemenu && h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
|
|
33261
33294
|
}
|
|
33262
33295
|
static get style() { return ezpPrinterSelectionCss; }
|
|
33263
33296
|
};
|
|
@@ -2872,6 +2872,9 @@ const printer_selection$1 = {
|
|
|
2872
2872
|
pull_print_success: "Bereit zum Auslösen.",
|
|
2873
2873
|
width: "Breite",
|
|
2874
2874
|
length: "Länge",
|
|
2875
|
+
trays: "Trays",
|
|
2876
|
+
select_trays: "Wähle Trays",
|
|
2877
|
+
page_ranges: "Page Ranges",
|
|
2875
2878
|
paper_ranges: "Papier-Ranges"
|
|
2876
2879
|
};
|
|
2877
2880
|
const button_actions$1 = {
|
|
@@ -2952,6 +2955,9 @@ const printer_selection = {
|
|
|
2952
2955
|
copies: "Copies",
|
|
2953
2956
|
width: "Width",
|
|
2954
2957
|
length: "Length",
|
|
2958
|
+
trays: "Trays",
|
|
2959
|
+
select_trays: "Select Trays",
|
|
2960
|
+
page_ranges: "Page Ranges",
|
|
2955
2961
|
paper_ranges: "Paper Ranges"
|
|
2956
2962
|
};
|
|
2957
2963
|
const button_actions = {
|
|
@@ -3059,6 +3065,9 @@ const managePaperDimensions = (properties) => {
|
|
|
3059
3065
|
}
|
|
3060
3066
|
return properties;
|
|
3061
3067
|
};
|
|
3068
|
+
const formatPageRange = (pageRange) => {
|
|
3069
|
+
return pageRange.replace(/,/g, ';');
|
|
3070
|
+
};
|
|
3062
3071
|
const validatePageRange = (pageRange) => {
|
|
3063
3072
|
if (!pageRange) {
|
|
3064
3073
|
return true;
|
|
@@ -32788,6 +32797,7 @@ let EzpPrinterSelection = class {
|
|
|
32788
32797
|
Resolutions: [],
|
|
32789
32798
|
DuplexSupported: false,
|
|
32790
32799
|
Color: false,
|
|
32800
|
+
Trays: []
|
|
32791
32801
|
};
|
|
32792
32802
|
// needs to be initialised with empty strings
|
|
32793
32803
|
this.selectedProperties = {
|
|
@@ -32801,6 +32811,8 @@ let EzpPrinterSelection = class {
|
|
|
32801
32811
|
resolution: 0,
|
|
32802
32812
|
paperlength: 0,
|
|
32803
32813
|
paperwidth: 0,
|
|
32814
|
+
defaultSource: '',
|
|
32815
|
+
trayname: '',
|
|
32804
32816
|
PageRanges: '',
|
|
32805
32817
|
};
|
|
32806
32818
|
/**
|
|
@@ -32828,8 +32840,14 @@ let EzpPrinterSelection = class {
|
|
|
32828
32840
|
this.printProcessing = true;
|
|
32829
32841
|
// we have to initialse this obj with empty strings to display the select component
|
|
32830
32842
|
// but don't want to send any attributes with empty strings to the API
|
|
32843
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
|
|
32844
|
+
delete this.selectedProperties.trayname;
|
|
32845
|
+
delete this.selectedProperties.defaultSource;
|
|
32846
|
+
}
|
|
32831
32847
|
let cleanPrintProperties = removeEmptyStrings(this.selectedProperties);
|
|
32832
32848
|
cleanPrintProperties = managePaperDimensions(cleanPrintProperties);
|
|
32849
|
+
if (cleanPrintProperties.PageRanges)
|
|
32850
|
+
cleanPrintProperties.PageRanges = formatPageRange(cleanPrintProperties.PageRanges);
|
|
32833
32851
|
// put it in store for further use
|
|
32834
32852
|
printStore.state.fileUrl = this.fileurl;
|
|
32835
32853
|
printStore.state.fileID = this.fileid;
|
|
@@ -33021,6 +33039,16 @@ let EzpPrinterSelection = class {
|
|
|
33021
33039
|
this.selectedProperties.paperwidth = eventDetails.value;
|
|
33022
33040
|
// console.log(this.selectedProperties)
|
|
33023
33041
|
break;
|
|
33042
|
+
case 'tray':
|
|
33043
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 0 && this.selectedPrinterConfig.Trays[0] == null) {
|
|
33044
|
+
delete this.selectedProperties.trayname;
|
|
33045
|
+
delete this.selectedProperties.defaultSource;
|
|
33046
|
+
}
|
|
33047
|
+
if (this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null) {
|
|
33048
|
+
this.selectedProperties.trayname = eventDetails.title;
|
|
33049
|
+
this.selectedProperties.defaultSource = eventDetails.id;
|
|
33050
|
+
}
|
|
33051
|
+
break;
|
|
33024
33052
|
case 'paper_ranges':
|
|
33025
33053
|
this.selectedProperties.PageRanges = eventDetails.value;
|
|
33026
33054
|
this.pageRangeInvalid = !validatePageRange(this.selectedProperties.PageRanges);
|
|
@@ -33228,7 +33256,12 @@ let EzpPrinterSelection = class {
|
|
|
33228
33256
|
title: option,
|
|
33229
33257
|
meta: '',
|
|
33230
33258
|
type: 'quality',
|
|
33231
|
-
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }),
|
|
33259
|
+
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }), this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays[0] != null ? (h("ezp-select", { label: i18next.t('printer_selection.trays'), icon: "trays", placeholder: i18next.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays.length >= 1 && this.selectedPrinterConfig.Trays.map((trays) => ({
|
|
33260
|
+
title: trays.Name,
|
|
33261
|
+
id: trays.Index,
|
|
33262
|
+
meta: '',
|
|
33263
|
+
type: 'tray',
|
|
33264
|
+
})) })) : null, h("ezp-input", { icon: "paper_range", suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: i18next.t('printer_selection.paper_ranges') })), h("ezp-stepper", { label: i18next.t('printer_selection.copies'), max: 10, icon: "copies" })), h("div", { id: "footer" }, h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel'), class: "action", id: "cancel" }), h("ezp-text-button", { disabled: this.selectedPrinter.id === '' || this.printProcessing || this.pageRangeInvalid, type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print'), ref: (button) => (this.printButton = button), class: "action", id: "print" })), !this.hidemenu && h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
|
|
33232
33265
|
}
|
|
33233
33266
|
};
|
|
33234
33267
|
EzpPrinterSelection.style = ezpPrinterSelectionCss;
|