@ezeep/ezeep-js 1.0.225 → 1.0.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ezeep.cjs.js +1 -1
- package/dist/cjs/ezp-auth_15.cjs.entry.js +51 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ezp-input/ezp-input.js +22 -2
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +15 -4
- package/dist/collection/utils/utils.js +32 -0
- package/dist/custom-elements/index.js +53 -8
- package/dist/directives/proxies.ts +2 -2
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/ezp-auth_15.entry.js +51 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/p-84bd195a.system.js +1 -1
- package/dist/ezeep/{p-3139f35d.entry.js → p-dad00eb6.entry.js} +2 -2
- package/dist/ezeep/{p-a124be11.system.entry.js → p-f9804440.system.entry.js} +3 -3
- package/dist/types/components/ezp-input/ezp-input.d.ts +2 -0
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/shared/types.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/package.json +1 -1
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/p-84bd195a.system.js +1 -1
- package/www/build/{p-3139f35d.entry.js → p-dad00eb6.entry.js} +2 -2
- package/www/build/{p-a124be11.system.entry.js → p-f9804440.system.entry.js} +3 -3
- package/www/data/locales/de.json +2 -1
- package/www/data/locales/en.json +2 -1
package/dist/cjs/ezeep.cjs.js
CHANGED
|
@@ -17,5 +17,5 @@ const patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(options => {
|
|
19
19
|
appGlobals.globalScripts();
|
|
20
|
-
return index.bootstrapLazy([["ezp-auth_15.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"file":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"paperid":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"filename":[32],"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["ezp-auth_15.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"file":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"paperid":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"filename":[32],"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
21
21
|
});
|
|
@@ -2875,7 +2875,8 @@ const printer_selection$1 = {
|
|
|
2875
2875
|
duplex_short: "auf der kurzen Seite umdrehen",
|
|
2876
2876
|
pull_print_success: "Bereit zum Auslösen.",
|
|
2877
2877
|
width: "Breite",
|
|
2878
|
-
length: "Länge"
|
|
2878
|
+
length: "Länge",
|
|
2879
|
+
paper_ranges: "Papier-Ranges"
|
|
2879
2880
|
};
|
|
2880
2881
|
const button_actions$1 = {
|
|
2881
2882
|
login: "Anmelden",
|
|
@@ -2954,7 +2955,8 @@ const printer_selection = {
|
|
|
2954
2955
|
no_printers: "No printers found.",
|
|
2955
2956
|
copies: "Copies",
|
|
2956
2957
|
width: "Width",
|
|
2957
|
-
length: "Length"
|
|
2958
|
+
length: "Length",
|
|
2959
|
+
paper_ranges: "Paper Ranges"
|
|
2958
2960
|
};
|
|
2959
2961
|
const button_actions = {
|
|
2960
2962
|
login: "Sign In",
|
|
@@ -3061,6 +3063,38 @@ const managePaperDimensions = (properties) => {
|
|
|
3061
3063
|
}
|
|
3062
3064
|
return properties;
|
|
3063
3065
|
};
|
|
3066
|
+
const formatPageRange = (pageRange) => {
|
|
3067
|
+
return pageRange.replace(/,/g, ';');
|
|
3068
|
+
};
|
|
3069
|
+
const validatePageRange = (pageRange) => {
|
|
3070
|
+
if (!pageRange) {
|
|
3071
|
+
return true;
|
|
3072
|
+
}
|
|
3073
|
+
const regex = /^(\d+(-\d+)?(,\d+(-\d+)?)*|(\d+,\d+(-\d+)?(,\d+(-\d+)?)*)+)$/;
|
|
3074
|
+
const isValid = regex.test(pageRange);
|
|
3075
|
+
if (!isValid) {
|
|
3076
|
+
return false;
|
|
3077
|
+
}
|
|
3078
|
+
let ranges = pageRange.split(',');
|
|
3079
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
3080
|
+
let rng = ranges[i].trim();
|
|
3081
|
+
if (rng.includes('-')) {
|
|
3082
|
+
let [start, end] = rng.split('-');
|
|
3083
|
+
start = parseInt(start);
|
|
3084
|
+
end = parseInt(end);
|
|
3085
|
+
if (isNaN(start) || isNaN(end) || start > end || start <= 0) {
|
|
3086
|
+
return false;
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
else {
|
|
3090
|
+
let page = parseInt(rng);
|
|
3091
|
+
if (isNaN(page) || page <= 0) {
|
|
3092
|
+
return false;
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
return true;
|
|
3097
|
+
};
|
|
3064
3098
|
const PAPER_ID = 256;
|
|
3065
3099
|
|
|
3066
3100
|
class EzpAuthorizationService {
|
|
@@ -3445,6 +3479,8 @@ let EzpInput = class {
|
|
|
3445
3479
|
this.type = 'text';
|
|
3446
3480
|
/** Description... */
|
|
3447
3481
|
this.icon = 'color';
|
|
3482
|
+
/** Description... */
|
|
3483
|
+
this.placeholder = '';
|
|
3448
3484
|
/**
|
|
3449
3485
|
*
|
|
3450
3486
|
* States
|
|
@@ -3465,7 +3501,7 @@ let EzpInput = class {
|
|
|
3465
3501
|
if (this.timeout) {
|
|
3466
3502
|
clearTimeout(this.timeout);
|
|
3467
3503
|
}
|
|
3468
|
-
this.value = event.target.value ? event.target.value : 0;
|
|
3504
|
+
this.value = event.target.value ? event.target.value : this.type === 'number' ? 0 : '';
|
|
3469
3505
|
this.timeout = setTimeout(() => {
|
|
3470
3506
|
this.inputValueChanged.emit({
|
|
3471
3507
|
type: this.eventType.toLowerCase(),
|
|
@@ -3474,7 +3510,7 @@ let EzpInput = class {
|
|
|
3474
3510
|
}, 500);
|
|
3475
3511
|
}
|
|
3476
3512
|
render() {
|
|
3477
|
-
return (index.h(index.Host, { class: { focused: this.focused }, onClick: this.setFocus }, index.h("ezp-icon", { id: "icon", name: this.icon }), index.h("ezp-label", { id: "label", noWrap: true, level: "secondary", text: this.label }), index.h("input", { id: "input", type: this.type, value: this.value, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }), this.suffix ? index.h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
|
|
3513
|
+
return (index.h(index.Host, { class: { focused: this.focused }, onClick: this.setFocus }, index.h("ezp-icon", { id: "icon", name: this.icon }), index.h("ezp-label", { id: "label", noWrap: true, level: "secondary", text: this.label }), index.h("input", { id: "input", type: this.type, value: this.value, placeholder: this.placeholder, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }), this.suffix ? index.h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
|
|
3478
3514
|
}
|
|
3479
3515
|
};
|
|
3480
3516
|
EzpInput.style = ezpInputCss;
|
|
@@ -32744,6 +32780,7 @@ let EzpPrinterSelection = class {
|
|
|
32744
32780
|
*/
|
|
32745
32781
|
this.loading = true;
|
|
32746
32782
|
this.printProcessing = false;
|
|
32783
|
+
this.pageRangeInvalid = false;
|
|
32747
32784
|
this.uploading = false;
|
|
32748
32785
|
this.preparingUpload = false;
|
|
32749
32786
|
this.printSuccess = false;
|
|
@@ -32770,7 +32807,8 @@ let EzpPrinterSelection = class {
|
|
|
32770
32807
|
copies: '',
|
|
32771
32808
|
resolution: 0,
|
|
32772
32809
|
paperlength: 0,
|
|
32773
|
-
paperwidth: 0
|
|
32810
|
+
paperwidth: 0,
|
|
32811
|
+
PageRanges: '',
|
|
32774
32812
|
};
|
|
32775
32813
|
/**
|
|
32776
32814
|
*
|
|
@@ -32799,6 +32837,8 @@ let EzpPrinterSelection = class {
|
|
|
32799
32837
|
// but don't want to send any attributes with empty strings to the API
|
|
32800
32838
|
let cleanPrintProperties = removeEmptyStrings(this.selectedProperties);
|
|
32801
32839
|
cleanPrintProperties = managePaperDimensions(cleanPrintProperties);
|
|
32840
|
+
if (cleanPrintProperties.PageRanges)
|
|
32841
|
+
cleanPrintProperties.PageRanges = formatPageRange(cleanPrintProperties.PageRanges);
|
|
32802
32842
|
// put it in store for further use
|
|
32803
32843
|
printStore.state.fileUrl = this.fileurl;
|
|
32804
32844
|
printStore.state.fileID = this.fileid;
|
|
@@ -32990,6 +33030,11 @@ let EzpPrinterSelection = class {
|
|
|
32990
33030
|
this.selectedProperties.paperwidth = eventDetails.value;
|
|
32991
33031
|
// console.log(this.selectedProperties)
|
|
32992
33032
|
break;
|
|
33033
|
+
case 'paper_ranges':
|
|
33034
|
+
this.selectedProperties.PageRanges = eventDetails.value;
|
|
33035
|
+
this.pageRangeInvalid = !validatePageRange(this.selectedProperties.PageRanges);
|
|
33036
|
+
// console.log(this.selectedProperties.PageRanges)
|
|
33037
|
+
break;
|
|
32993
33038
|
case 'duplex':
|
|
32994
33039
|
if (eventDetails.title === 'None') {
|
|
32995
33040
|
this.selectedProperties.duplex = false;
|
|
@@ -33192,7 +33237,7 @@ let EzpPrinterSelection = class {
|
|
|
33192
33237
|
title: option,
|
|
33193
33238
|
meta: '',
|
|
33194
33239
|
type: 'quality',
|
|
33195
|
-
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) })), 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, 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 }))));
|
|
33240
|
+
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }), index.h("ezp-input", { icon: "width", 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 }))));
|
|
33196
33241
|
}
|
|
33197
33242
|
};
|
|
33198
33243
|
EzpPrinterSelection.style = ezpPrinterSelectionCss;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -16,7 +16,7 @@ const defineCustomElements = (win, options) => {
|
|
|
16
16
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
17
17
|
return patchEsm().then(() => {
|
|
18
18
|
appGlobals.globalScripts();
|
|
19
|
-
return index.bootstrapLazy([["ezp-auth_15.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"file":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"paperid":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"filename":[32],"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
19
|
+
return index.bootstrapLazy([["ezp-auth_15.cjs",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"file":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"paperid":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"filename":[32],"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -13,6 +13,8 @@ export class EzpInput {
|
|
|
13
13
|
this.type = 'text';
|
|
14
14
|
/** Description... */
|
|
15
15
|
this.icon = 'color';
|
|
16
|
+
/** Description... */
|
|
17
|
+
this.placeholder = '';
|
|
16
18
|
/**
|
|
17
19
|
*
|
|
18
20
|
* States
|
|
@@ -33,7 +35,7 @@ export class EzpInput {
|
|
|
33
35
|
if (this.timeout) {
|
|
34
36
|
clearTimeout(this.timeout);
|
|
35
37
|
}
|
|
36
|
-
this.value = event.target.value ? event.target.value : 0;
|
|
38
|
+
this.value = event.target.value ? event.target.value : this.type === 'number' ? 0 : '';
|
|
37
39
|
this.timeout = setTimeout(() => {
|
|
38
40
|
this.inputValueChanged.emit({
|
|
39
41
|
type: this.eventType.toLowerCase(),
|
|
@@ -45,7 +47,7 @@ export class EzpInput {
|
|
|
45
47
|
return (h(Host, { class: { focused: this.focused }, onClick: this.setFocus },
|
|
46
48
|
h("ezp-icon", { id: "icon", name: this.icon }),
|
|
47
49
|
h("ezp-label", { id: "label", noWrap: true, level: "secondary", text: this.label }),
|
|
48
|
-
h("input", { id: "input", type: this.type, value: this.value, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }),
|
|
50
|
+
h("input", { id: "input", type: this.type, value: this.value, placeholder: this.placeholder, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }),
|
|
49
51
|
this.suffix ? h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
|
|
50
52
|
}
|
|
51
53
|
static get is() { return "ezp-input"; }
|
|
@@ -166,6 +168,24 @@ export class EzpInput {
|
|
|
166
168
|
},
|
|
167
169
|
"attribute": "event-type",
|
|
168
170
|
"reflect": false
|
|
171
|
+
},
|
|
172
|
+
"placeholder": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"mutable": false,
|
|
175
|
+
"complexType": {
|
|
176
|
+
"original": "string",
|
|
177
|
+
"resolved": "string",
|
|
178
|
+
"references": {}
|
|
179
|
+
},
|
|
180
|
+
"required": false,
|
|
181
|
+
"optional": false,
|
|
182
|
+
"docs": {
|
|
183
|
+
"tags": [],
|
|
184
|
+
"text": "Description..."
|
|
185
|
+
},
|
|
186
|
+
"attribute": "placeholder",
|
|
187
|
+
"reflect": false,
|
|
188
|
+
"defaultValue": "''"
|
|
169
189
|
}
|
|
170
190
|
}; }
|
|
171
191
|
static get states() { return {
|
|
@@ -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 } from '../../utils/utils';
|
|
7
|
+
import { PAPER_ID, validatePageRange, formatPageRange } from '../../utils/utils';
|
|
8
8
|
export class EzpPrinterSelection {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.sasUri = '';
|
|
@@ -32,6 +32,7 @@ export class EzpPrinterSelection {
|
|
|
32
32
|
*/
|
|
33
33
|
this.loading = true;
|
|
34
34
|
this.printProcessing = false;
|
|
35
|
+
this.pageRangeInvalid = false;
|
|
35
36
|
this.uploading = false;
|
|
36
37
|
this.preparingUpload = false;
|
|
37
38
|
this.printSuccess = false;
|
|
@@ -58,7 +59,8 @@ export class EzpPrinterSelection {
|
|
|
58
59
|
copies: '',
|
|
59
60
|
resolution: 0,
|
|
60
61
|
paperlength: 0,
|
|
61
|
-
paperwidth: 0
|
|
62
|
+
paperwidth: 0,
|
|
63
|
+
PageRanges: '',
|
|
62
64
|
};
|
|
63
65
|
/**
|
|
64
66
|
*
|
|
@@ -87,6 +89,8 @@ export class EzpPrinterSelection {
|
|
|
87
89
|
// but don't want to send any attributes with empty strings to the API
|
|
88
90
|
let cleanPrintProperties = removeEmptyStrings(this.selectedProperties);
|
|
89
91
|
cleanPrintProperties = managePaperDimensions(cleanPrintProperties);
|
|
92
|
+
if (cleanPrintProperties.PageRanges)
|
|
93
|
+
cleanPrintProperties.PageRanges = formatPageRange(cleanPrintProperties.PageRanges);
|
|
90
94
|
// put it in store for further use
|
|
91
95
|
printStore.state.fileUrl = this.fileurl;
|
|
92
96
|
printStore.state.fileID = this.fileid;
|
|
@@ -278,6 +282,11 @@ export class EzpPrinterSelection {
|
|
|
278
282
|
this.selectedProperties.paperwidth = eventDetails.value;
|
|
279
283
|
// console.log(this.selectedProperties)
|
|
280
284
|
break;
|
|
285
|
+
case 'paper_ranges':
|
|
286
|
+
this.selectedProperties.PageRanges = eventDetails.value;
|
|
287
|
+
this.pageRangeInvalid = !validatePageRange(this.selectedProperties.PageRanges);
|
|
288
|
+
// console.log(this.selectedProperties.PageRanges)
|
|
289
|
+
break;
|
|
281
290
|
case 'duplex':
|
|
282
291
|
if (eventDetails.title === 'None') {
|
|
283
292
|
this.selectedProperties.duplex = false;
|
|
@@ -500,11 +509,12 @@ export class EzpPrinterSelection {
|
|
|
500
509
|
title: option,
|
|
501
510
|
meta: '',
|
|
502
511
|
type: 'quality',
|
|
503
|
-
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) })
|
|
512
|
+
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }),
|
|
513
|
+
h("ezp-input", { icon: "width", suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: i18next.t('printer_selection.paper_ranges') })),
|
|
504
514
|
h("ezp-stepper", { label: i18next.t('printer_selection.copies'), max: 10, icon: "copies" })),
|
|
505
515
|
h("div", { id: "footer" },
|
|
506
516
|
h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel'), class: "action", id: "cancel" }),
|
|
507
|
-
h("ezp-text-button", { disabled: this.selectedPrinter.id === '' || this.printProcessing, type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print'), ref: (button) => (this.printButton = button), class: "action", id: "print" })),
|
|
517
|
+
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" })),
|
|
508
518
|
!this.hidemenu && h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
|
|
509
519
|
}
|
|
510
520
|
static get is() { return "ezp-printer-selection"; }
|
|
@@ -694,6 +704,7 @@ export class EzpPrinterSelection {
|
|
|
694
704
|
static get states() { return {
|
|
695
705
|
"loading": {},
|
|
696
706
|
"printProcessing": {},
|
|
707
|
+
"pageRangeInvalid": {},
|
|
697
708
|
"uploading": {},
|
|
698
709
|
"preparingUpload": {},
|
|
699
710
|
"printSuccess": {},
|
|
@@ -75,4 +75,36 @@ export const managePaperDimensions = (properties) => {
|
|
|
75
75
|
}
|
|
76
76
|
return properties;
|
|
77
77
|
};
|
|
78
|
+
export const formatPageRange = (pageRange) => {
|
|
79
|
+
return pageRange.replace(/,/g, ';');
|
|
80
|
+
};
|
|
81
|
+
export const validatePageRange = (pageRange) => {
|
|
82
|
+
if (!pageRange) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
const regex = /^(\d+(-\d+)?(,\d+(-\d+)?)*|(\d+,\d+(-\d+)?(,\d+(-\d+)?)*)+)$/;
|
|
86
|
+
const isValid = regex.test(pageRange);
|
|
87
|
+
if (!isValid) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
let ranges = pageRange.split(',');
|
|
91
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
92
|
+
let rng = ranges[i].trim();
|
|
93
|
+
if (rng.includes('-')) {
|
|
94
|
+
let [start, end] = rng.split('-');
|
|
95
|
+
start = parseInt(start);
|
|
96
|
+
end = parseInt(end);
|
|
97
|
+
if (isNaN(start) || isNaN(end) || start > end || start <= 0) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
let page = parseInt(rng);
|
|
103
|
+
if (isNaN(page) || page <= 0) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
};
|
|
78
110
|
export const PAPER_ID = 256;
|
|
@@ -2884,7 +2884,8 @@ const printer_selection$1 = {
|
|
|
2884
2884
|
duplex_short: "auf der kurzen Seite umdrehen",
|
|
2885
2885
|
pull_print_success: "Bereit zum Auslösen.",
|
|
2886
2886
|
width: "Breite",
|
|
2887
|
-
length: "Länge"
|
|
2887
|
+
length: "Länge",
|
|
2888
|
+
paper_ranges: "Papier-Ranges"
|
|
2888
2889
|
};
|
|
2889
2890
|
const button_actions$1 = {
|
|
2890
2891
|
login: "Anmelden",
|
|
@@ -2963,7 +2964,8 @@ const printer_selection = {
|
|
|
2963
2964
|
no_printers: "No printers found.",
|
|
2964
2965
|
copies: "Copies",
|
|
2965
2966
|
width: "Width",
|
|
2966
|
-
length: "Length"
|
|
2967
|
+
length: "Length",
|
|
2968
|
+
paper_ranges: "Paper Ranges"
|
|
2967
2969
|
};
|
|
2968
2970
|
const button_actions = {
|
|
2969
2971
|
login: "Sign In",
|
|
@@ -3070,6 +3072,38 @@ const managePaperDimensions = (properties) => {
|
|
|
3070
3072
|
}
|
|
3071
3073
|
return properties;
|
|
3072
3074
|
};
|
|
3075
|
+
const formatPageRange = (pageRange) => {
|
|
3076
|
+
return pageRange.replace(/,/g, ';');
|
|
3077
|
+
};
|
|
3078
|
+
const validatePageRange = (pageRange) => {
|
|
3079
|
+
if (!pageRange) {
|
|
3080
|
+
return true;
|
|
3081
|
+
}
|
|
3082
|
+
const regex = /^(\d+(-\d+)?(,\d+(-\d+)?)*|(\d+,\d+(-\d+)?(,\d+(-\d+)?)*)+)$/;
|
|
3083
|
+
const isValid = regex.test(pageRange);
|
|
3084
|
+
if (!isValid) {
|
|
3085
|
+
return false;
|
|
3086
|
+
}
|
|
3087
|
+
let ranges = pageRange.split(',');
|
|
3088
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
3089
|
+
let rng = ranges[i].trim();
|
|
3090
|
+
if (rng.includes('-')) {
|
|
3091
|
+
let [start, end] = rng.split('-');
|
|
3092
|
+
start = parseInt(start);
|
|
3093
|
+
end = parseInt(end);
|
|
3094
|
+
if (isNaN(start) || isNaN(end) || start > end || start <= 0) {
|
|
3095
|
+
return false;
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
else {
|
|
3099
|
+
let page = parseInt(rng);
|
|
3100
|
+
if (isNaN(page) || page <= 0) {
|
|
3101
|
+
return false;
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
return true;
|
|
3106
|
+
};
|
|
3073
3107
|
const PAPER_ID = 256;
|
|
3074
3108
|
|
|
3075
3109
|
class EzpAuthorizationService {
|
|
@@ -3466,6 +3500,8 @@ let EzpInput$1 = class extends HTMLElement {
|
|
|
3466
3500
|
this.type = 'text';
|
|
3467
3501
|
/** Description... */
|
|
3468
3502
|
this.icon = 'color';
|
|
3503
|
+
/** Description... */
|
|
3504
|
+
this.placeholder = '';
|
|
3469
3505
|
/**
|
|
3470
3506
|
*
|
|
3471
3507
|
* States
|
|
@@ -3486,7 +3522,7 @@ let EzpInput$1 = class extends HTMLElement {
|
|
|
3486
3522
|
if (this.timeout) {
|
|
3487
3523
|
clearTimeout(this.timeout);
|
|
3488
3524
|
}
|
|
3489
|
-
this.value = event.target.value ? event.target.value : 0;
|
|
3525
|
+
this.value = event.target.value ? event.target.value : this.type === 'number' ? 0 : '';
|
|
3490
3526
|
this.timeout = setTimeout(() => {
|
|
3491
3527
|
this.inputValueChanged.emit({
|
|
3492
3528
|
type: this.eventType.toLowerCase(),
|
|
@@ -3495,7 +3531,7 @@ let EzpInput$1 = class extends HTMLElement {
|
|
|
3495
3531
|
}, 500);
|
|
3496
3532
|
}
|
|
3497
3533
|
render() {
|
|
3498
|
-
return (h(Host, { class: { focused: this.focused }, onClick: this.setFocus }, h("ezp-icon", { id: "icon", name: this.icon }), h("ezp-label", { id: "label", noWrap: true, level: "secondary", text: this.label }), h("input", { id: "input", type: this.type, value: this.value, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }), this.suffix ? h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
|
|
3534
|
+
return (h(Host, { class: { focused: this.focused }, onClick: this.setFocus }, h("ezp-icon", { id: "icon", name: this.icon }), h("ezp-label", { id: "label", noWrap: true, level: "secondary", text: this.label }), h("input", { id: "input", type: this.type, value: this.value, placeholder: this.placeholder, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }), this.suffix ? h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
|
|
3499
3535
|
}
|
|
3500
3536
|
static get style() { return ezpInputCss; }
|
|
3501
3537
|
};
|
|
@@ -32769,6 +32805,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32769
32805
|
*/
|
|
32770
32806
|
this.loading = true;
|
|
32771
32807
|
this.printProcessing = false;
|
|
32808
|
+
this.pageRangeInvalid = false;
|
|
32772
32809
|
this.uploading = false;
|
|
32773
32810
|
this.preparingUpload = false;
|
|
32774
32811
|
this.printSuccess = false;
|
|
@@ -32795,7 +32832,8 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32795
32832
|
copies: '',
|
|
32796
32833
|
resolution: 0,
|
|
32797
32834
|
paperlength: 0,
|
|
32798
|
-
paperwidth: 0
|
|
32835
|
+
paperwidth: 0,
|
|
32836
|
+
PageRanges: '',
|
|
32799
32837
|
};
|
|
32800
32838
|
/**
|
|
32801
32839
|
*
|
|
@@ -32824,6 +32862,8 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32824
32862
|
// but don't want to send any attributes with empty strings to the API
|
|
32825
32863
|
let cleanPrintProperties = removeEmptyStrings(this.selectedProperties);
|
|
32826
32864
|
cleanPrintProperties = managePaperDimensions(cleanPrintProperties);
|
|
32865
|
+
if (cleanPrintProperties.PageRanges)
|
|
32866
|
+
cleanPrintProperties.PageRanges = formatPageRange(cleanPrintProperties.PageRanges);
|
|
32827
32867
|
// put it in store for further use
|
|
32828
32868
|
printStore.state.fileUrl = this.fileurl;
|
|
32829
32869
|
printStore.state.fileID = this.fileid;
|
|
@@ -33015,6 +33055,11 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33015
33055
|
this.selectedProperties.paperwidth = eventDetails.value;
|
|
33016
33056
|
// console.log(this.selectedProperties)
|
|
33017
33057
|
break;
|
|
33058
|
+
case 'paper_ranges':
|
|
33059
|
+
this.selectedProperties.PageRanges = eventDetails.value;
|
|
33060
|
+
this.pageRangeInvalid = !validatePageRange(this.selectedProperties.PageRanges);
|
|
33061
|
+
// console.log(this.selectedProperties.PageRanges)
|
|
33062
|
+
break;
|
|
33018
33063
|
case 'duplex':
|
|
33019
33064
|
if (eventDetails.title === 'None') {
|
|
33020
33065
|
this.selectedProperties.duplex = false;
|
|
@@ -33217,7 +33262,7 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33217
33262
|
title: option,
|
|
33218
33263
|
meta: '',
|
|
33219
33264
|
type: 'quality',
|
|
33220
|
-
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) })), 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, 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 }))));
|
|
33265
|
+
})), preSelected: this.selectedPrinter.id ? this.selectedProperties.resolution : null, disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) }), h("ezp-input", { icon: "width", 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 }))));
|
|
33221
33266
|
}
|
|
33222
33267
|
static get style() { return ezpPrinterSelectionCss; }
|
|
33223
33268
|
};
|
|
@@ -33950,9 +33995,9 @@ const EzpBackdrop = /*@__PURE__*/proxyCustomElement(EzpBackdrop$1, [1,"ezp-backd
|
|
|
33950
33995
|
const EzpDialog = /*@__PURE__*/proxyCustomElement(EzpDialog$1, [1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}]);
|
|
33951
33996
|
const EzpIcon = /*@__PURE__*/proxyCustomElement(EzpIcon$1, [1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}]);
|
|
33952
33997
|
const EzpIconButton = /*@__PURE__*/proxyCustomElement(EzpIconButton$1, [1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}]);
|
|
33953
|
-
const EzpInput = /*@__PURE__*/proxyCustomElement(EzpInput$1, [1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"focused":[32]}]);
|
|
33998
|
+
const EzpInput = /*@__PURE__*/proxyCustomElement(EzpInput$1, [1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[32]}]);
|
|
33954
33999
|
const EzpLabel = /*@__PURE__*/proxyCustomElement(EzpLabel$1, [1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]);
|
|
33955
|
-
const EzpPrinterSelection = /*@__PURE__*/proxyCustomElement(EzpPrinterSelection$1, [1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"paperid":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]]);
|
|
34000
|
+
const EzpPrinterSelection = /*@__PURE__*/proxyCustomElement(EzpPrinterSelection$1, [1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"paperid":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]]);
|
|
33956
34001
|
const EzpPrinting = /*@__PURE__*/proxyCustomElement(EzpPrinting$1, [1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"file":[32]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]]);
|
|
33957
34002
|
const EzpSelect = /*@__PURE__*/proxyCustomElement(EzpSelect$1, [1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}]);
|
|
33958
34003
|
const EzpStatus = /*@__PURE__*/proxyCustomElement(EzpStatus$1, [1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}]);
|
|
@@ -122,13 +122,13 @@ export class EzpIconButton {
|
|
|
122
122
|
|
|
123
123
|
export declare interface EzpInput extends Components.EzpInput {}
|
|
124
124
|
@ProxyCmp({
|
|
125
|
-
inputs: ['eventType', 'icon', 'label', 'suffix', 'type', 'value']
|
|
125
|
+
inputs: ['eventType', 'icon', 'label', 'placeholder', 'suffix', 'type', 'value']
|
|
126
126
|
})
|
|
127
127
|
@Component({
|
|
128
128
|
selector: 'ezp-input',
|
|
129
129
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
130
130
|
template: '<ng-content></ng-content>',
|
|
131
|
-
inputs: ['eventType', 'icon', 'label', 'suffix', 'type', 'value'],
|
|
131
|
+
inputs: ['eventType', 'icon', 'label', 'placeholder', 'suffix', 'type', 'value'],
|
|
132
132
|
outputs: ['inputValueChanged']
|
|
133
133
|
})
|
|
134
134
|
export class EzpInput {
|
package/dist/esm/ezeep.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
17
|
globalScripts();
|
|
18
|
-
return bootstrapLazy([["ezp-auth_15",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"file":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"paperid":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"filename":[32],"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
18
|
+
return bootstrapLazy([["ezp-auth_15",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"file":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]]],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"file":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"notSupported":[32],"noPrinters":[32],"userMenuOpen":[32],"printStopped":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"paperid":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"filename":[32],"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]}],[1,"ezp-user-menu",{"name":[1],"open":[1028]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}],[1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]]]], options);
|
|
19
19
|
});
|