@ezeep/ezeep-js 1.0.151 → 1.0.157
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 +3 -3
- package/dist/cjs/ezp-auth_14.cjs.entry.js +126 -71
- package/dist/cjs/{index-62fc857c.js → index-d547be4e.js} +23 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ezp-auth/ezp-auth.js +1 -3
- package/dist/collection/components/ezp-dialog/ezp-dialog.js +0 -2
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +87 -52
- package/dist/collection/components/ezp-printing/ezp-printing.js +24 -3
- package/dist/collection/components/ezp-status/ezp-status.js +0 -2
- package/dist/collection/components/ezp-upload/ezp-upload.js +0 -2
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +0 -2
- package/dist/collection/services/auth.js +2 -0
- package/dist/collection/utils/utils.js +20 -8
- package/dist/custom-elements/index.js +127 -72
- package/dist/directives/proxies.ts +2 -2
- package/dist/esm/ezeep.js +3 -3
- package/dist/esm/ezp-auth_14.entry.js +126 -71
- package/dist/esm/{index-265d8cca.js → index-485041ac.js} +23 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_14.entry.js +3 -3
- package/dist/esm-es5/index-485041ac.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/ezeep.js +1 -1
- package/dist/ezeep/p-cc2bb341.system.js +1 -0
- package/dist/ezeep/p-d4dae139.system.js +1 -0
- package/dist/ezeep/p-e149771a.system.entry.js +21 -0
- package/dist/ezeep/{p-a7b7b386.entry.js → p-f310e367.entry.js} +2 -2
- package/dist/ezeep/{p-f3065800.js → p-fa808a39.js} +0 -0
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +1 -1
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +2 -2
- package/readme.md +2 -0
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/ezeep.js +1 -1
- package/www/build/p-cc2bb341.system.js +1 -0
- package/www/build/p-d4dae139.system.js +1 -0
- package/www/build/p-e149771a.system.entry.js +21 -0
- package/www/build/{p-a7b7b386.entry.js → p-f310e367.entry.js} +2 -2
- package/www/build/{p-f3065800.js → p-fa808a39.js} +0 -0
- package/www/data/locales/de.json +7 -3
- package/www/data/locales/en.json +6 -2
- package/www/index.html +1 -1
- package/dist/esm-es5/index-265d8cca.js +0 -1
- package/dist/ezeep/p-98ec6965.system.js +0 -1
- package/dist/ezeep/p-a1b0d17a.system.entry.js +0 -21
- package/dist/ezeep/p-f89804ee.system.js +0 -1
- package/www/build/p-98ec6965.system.js +0 -1
- package/www/build/p-a1b0d17a.system.entry.js +0 -21
- package/www/build/p-f89804ee.system.js +0 -1
|
@@ -2877,7 +2877,11 @@ const printer_selection$1 = {
|
|
|
2877
2877
|
unknown_location: "Unbekannter Standort",
|
|
2878
2878
|
no_printers: "Keine Drucker gefunden.",
|
|
2879
2879
|
prepare_upload: "Vorbereiten…",
|
|
2880
|
-
uploading: "Hochladen…"
|
|
2880
|
+
uploading: "Hochladen…",
|
|
2881
|
+
duplex_none: "Keine",
|
|
2882
|
+
copies: "Kopien",
|
|
2883
|
+
duplex_long: "auf der langen Seite umdrehen",
|
|
2884
|
+
duplex_short: "auf der kurzen Seite umdrehen"
|
|
2881
2885
|
};
|
|
2882
2886
|
const button_actions$1 = {
|
|
2883
2887
|
login: "Anmelden",
|
|
@@ -2894,12 +2898,12 @@ const upload$1 = {
|
|
|
2894
2898
|
};
|
|
2895
2899
|
const user_menu$1 = {
|
|
2896
2900
|
theme: "Farbschema",
|
|
2897
|
-
appearance: "
|
|
2901
|
+
appearance: "Darstellung",
|
|
2898
2902
|
system: "System",
|
|
2899
2903
|
light: "Hell",
|
|
2900
2904
|
dark: "Dunkel",
|
|
2901
2905
|
account: "Account verwalten",
|
|
2902
|
-
help: "Hilfe &
|
|
2906
|
+
help: "Hilfe & Unterstützung",
|
|
2903
2907
|
logout: "Ausloggen"
|
|
2904
2908
|
};
|
|
2905
2909
|
const translationsDE = {
|
|
@@ -2935,6 +2939,9 @@ const printer_selection = {
|
|
|
2935
2939
|
orientation: "Orientation",
|
|
2936
2940
|
size: "Paper Size",
|
|
2937
2941
|
duplex: "Double-sided",
|
|
2942
|
+
duplex_none: "None",
|
|
2943
|
+
duplex_long: "flip on long side",
|
|
2944
|
+
duplex_short: "flip on short side",
|
|
2938
2945
|
quality: "Print Quality",
|
|
2939
2946
|
select_printer: "Select a printer",
|
|
2940
2947
|
select_color: "Select Color/Grayscale",
|
|
@@ -2947,7 +2954,8 @@ const printer_selection = {
|
|
|
2947
2954
|
orientation_portrait: "Portrait",
|
|
2948
2955
|
orientation_landscape: "Landscape",
|
|
2949
2956
|
unknown_location: "Unknown location",
|
|
2950
|
-
no_printers: "No printers found."
|
|
2957
|
+
no_printers: "No printers found.",
|
|
2958
|
+
copies: "Copies"
|
|
2951
2959
|
};
|
|
2952
2960
|
const button_actions = {
|
|
2953
2961
|
login: "Sign In",
|
|
@@ -2969,7 +2977,7 @@ const user_menu = {
|
|
|
2969
2977
|
light: "Light",
|
|
2970
2978
|
dark: "Dark",
|
|
2971
2979
|
account: "Manage account",
|
|
2972
|
-
help: "Help &
|
|
2980
|
+
help: "Help & Support",
|
|
2973
2981
|
logout: "Logout"
|
|
2974
2982
|
};
|
|
2975
2983
|
const translationsEN = {
|
|
@@ -2986,7 +2994,7 @@ function encodeFormData(data) {
|
|
|
2986
2994
|
.map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(data[key]))
|
|
2987
2995
|
.join('&');
|
|
2988
2996
|
}
|
|
2989
|
-
function initi18n() {
|
|
2997
|
+
function initi18n(language) {
|
|
2990
2998
|
const resources = {
|
|
2991
2999
|
en: {
|
|
2992
3000
|
translation: translationsEN,
|
|
@@ -2995,13 +3003,25 @@ function initi18n() {
|
|
|
2995
3003
|
translation: translationsDE,
|
|
2996
3004
|
},
|
|
2997
3005
|
};
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3006
|
+
// override browserlanguage if language is provided
|
|
3007
|
+
if (language != '') {
|
|
3008
|
+
i18next.init({
|
|
3009
|
+
resources,
|
|
3010
|
+
lng: language,
|
|
3011
|
+
// allow keys to be phrases having `:`, `.`
|
|
3012
|
+
nsSeparator: false,
|
|
3013
|
+
fallbackLng: 'en',
|
|
3014
|
+
});
|
|
3015
|
+
}
|
|
3016
|
+
else {
|
|
3017
|
+
i18next.init({
|
|
3018
|
+
resources,
|
|
3019
|
+
lng: navigator.language,
|
|
3020
|
+
// allow keys to be phrases having `:`, `.`
|
|
3021
|
+
nsSeparator: false,
|
|
3022
|
+
fallbackLng: 'en',
|
|
3023
|
+
});
|
|
3024
|
+
}
|
|
3005
3025
|
}
|
|
3006
3026
|
const poll = async ({ fn, validate, interval, maxAttempts }) => {
|
|
3007
3027
|
let attempts = 0;
|
|
@@ -3069,6 +3089,7 @@ class EzpAuthorizationService {
|
|
|
3069
3089
|
}
|
|
3070
3090
|
getAccessToken() {
|
|
3071
3091
|
return fetch(this.accessTokenURL, {
|
|
3092
|
+
credentials: 'include',
|
|
3072
3093
|
headers: {
|
|
3073
3094
|
Authorization: 'Basic ' + btoa(this.clientID + ':'),
|
|
3074
3095
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
@@ -3102,6 +3123,7 @@ class EzpAuthorizationService {
|
|
|
3102
3123
|
}
|
|
3103
3124
|
refreshTokens() {
|
|
3104
3125
|
fetch(this.accessTokenURL, {
|
|
3126
|
+
credentials: 'include',
|
|
3105
3127
|
headers: {
|
|
3106
3128
|
Authorization: 'Basic ' + btoa(this.clientID + ':'),
|
|
3107
3129
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
@@ -3204,13 +3226,12 @@ let EzpAuth$1 = class extends HTMLElement {
|
|
|
3204
3226
|
}
|
|
3205
3227
|
receiveMessage(event) {
|
|
3206
3228
|
this.auth.code = event.data;
|
|
3207
|
-
this.auth.getAccessToken().
|
|
3229
|
+
this.auth.getAccessToken().then(() => {
|
|
3208
3230
|
this.authCancel.emit();
|
|
3209
3231
|
this.authSuccess.emit();
|
|
3210
3232
|
});
|
|
3211
3233
|
}
|
|
3212
3234
|
async componentWillLoad() {
|
|
3213
|
-
initi18n();
|
|
3214
3235
|
this.auth = new EzpAuthorizationService(this.redirectURI, this.clientID);
|
|
3215
3236
|
if (authStore.state.isAuthorized === false) {
|
|
3216
3237
|
this.auth.generateCodeVerifier();
|
|
@@ -3284,7 +3305,6 @@ let EzpDialog$1 = class extends HTMLElement {
|
|
|
3284
3305
|
*
|
|
3285
3306
|
*/
|
|
3286
3307
|
componentWillLoad() {
|
|
3287
|
-
initi18n();
|
|
3288
3308
|
}
|
|
3289
3309
|
/**
|
|
3290
3310
|
*
|
|
@@ -32706,15 +32726,15 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32706
32726
|
this.duplexOptions = [
|
|
32707
32727
|
{
|
|
32708
32728
|
id: 1,
|
|
32709
|
-
title: '
|
|
32729
|
+
title: i18next.t('printer_selection.duplex_none'),
|
|
32710
32730
|
},
|
|
32711
32731
|
{
|
|
32712
32732
|
id: 2,
|
|
32713
|
-
title: '
|
|
32733
|
+
title: i18next.t('printer_selection.duplex_long'),
|
|
32714
32734
|
},
|
|
32715
32735
|
{
|
|
32716
32736
|
id: 3,
|
|
32717
|
-
title: '
|
|
32737
|
+
title: i18next.t('printer_selection.duplex_short'),
|
|
32718
32738
|
},
|
|
32719
32739
|
];
|
|
32720
32740
|
this.hidemenu = false;
|
|
@@ -32752,16 +32772,6 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32752
32772
|
copies: '',
|
|
32753
32773
|
resolution: '',
|
|
32754
32774
|
};
|
|
32755
|
-
this.previouslySelectedProperties = {
|
|
32756
|
-
paper: '',
|
|
32757
|
-
paperid: '',
|
|
32758
|
-
color: false,
|
|
32759
|
-
duplex: false,
|
|
32760
|
-
duplexmode: '',
|
|
32761
|
-
orientation: '',
|
|
32762
|
-
copies: '',
|
|
32763
|
-
resolution: '',
|
|
32764
|
-
};
|
|
32765
32775
|
/**
|
|
32766
32776
|
*
|
|
32767
32777
|
* Private methods
|
|
@@ -32806,6 +32816,10 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32806
32816
|
}
|
|
32807
32817
|
})
|
|
32808
32818
|
.then((data) => {
|
|
32819
|
+
if (data.code === 804) {
|
|
32820
|
+
this.printFailed = true;
|
|
32821
|
+
this.printProcessing = false;
|
|
32822
|
+
}
|
|
32809
32823
|
if (data.jobid) {
|
|
32810
32824
|
printStore.state.jobID = data.jobid;
|
|
32811
32825
|
poll({
|
|
@@ -32815,15 +32829,19 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32815
32829
|
maxAttempts: 10,
|
|
32816
32830
|
}).catch((err) => {
|
|
32817
32831
|
console.warn(err);
|
|
32832
|
+
this.printFailed = true;
|
|
32833
|
+
this.printProcessing = false;
|
|
32818
32834
|
});
|
|
32819
32835
|
}
|
|
32820
32836
|
else {
|
|
32821
32837
|
this.printFailed = true;
|
|
32838
|
+
this.printProcessing = false;
|
|
32822
32839
|
}
|
|
32823
32840
|
})
|
|
32824
32841
|
.catch((error) => {
|
|
32825
32842
|
console.log(error);
|
|
32826
32843
|
this.printFailed = true;
|
|
32844
|
+
this.printProcessing = false;
|
|
32827
32845
|
});
|
|
32828
32846
|
}
|
|
32829
32847
|
if (this.file) {
|
|
@@ -32831,7 +32849,6 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32831
32849
|
}
|
|
32832
32850
|
localStorage.setItem('properties', JSON.stringify(this.selectedProperties));
|
|
32833
32851
|
localStorage.setItem('printer', JSON.stringify(this.selectedPrinter));
|
|
32834
|
-
localStorage.setItem('previouslySelectedProperties', JSON.stringify(this.previouslySelectedProperties));
|
|
32835
32852
|
this.printStopped = false;
|
|
32836
32853
|
};
|
|
32837
32854
|
this.handleUserMenu = () => {
|
|
@@ -32903,9 +32920,6 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32903
32920
|
else {
|
|
32904
32921
|
this.selectedPrinter = { id: '', location: '', name: '' };
|
|
32905
32922
|
}
|
|
32906
|
-
if (localStorage.getItem('previouslySelectedProperties')) {
|
|
32907
|
-
this.previouslySelectedProperties = JSON.parse(localStorage.getItem('previouslySelectedProperties'));
|
|
32908
|
-
}
|
|
32909
32923
|
}
|
|
32910
32924
|
getUserInfo() {
|
|
32911
32925
|
const userService = new EzpUserService();
|
|
@@ -32922,24 +32936,20 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32922
32936
|
await this.printService
|
|
32923
32937
|
.getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
|
|
32924
32938
|
.then((data) => (this.selectedPrinterConfig = data[0]));
|
|
32939
|
+
this.setDefaultPaperFormat();
|
|
32925
32940
|
break;
|
|
32926
32941
|
case 'color':
|
|
32927
32942
|
this.selectedProperties.color = !!eventDetails.id;
|
|
32928
|
-
this.previouslySelectedProperties.color = eventDetails.title;
|
|
32929
32943
|
break;
|
|
32930
32944
|
case 'orientation':
|
|
32931
32945
|
this.selectedProperties.orientation = eventDetails.id;
|
|
32932
|
-
this.previouslySelectedProperties.orientation = eventDetails.title;
|
|
32933
32946
|
break;
|
|
32934
32947
|
case 'format':
|
|
32935
32948
|
this.selectedProperties.paper = eventDetails.title;
|
|
32936
32949
|
this.selectedProperties.paperid = eventDetails.id;
|
|
32937
|
-
this.previouslySelectedProperties.paper = eventDetails.title;
|
|
32938
|
-
this.previouslySelectedProperties.paperid = eventDetails.id;
|
|
32939
32950
|
break;
|
|
32940
32951
|
case 'quality':
|
|
32941
32952
|
this.selectedProperties.resolution = eventDetails.title;
|
|
32942
|
-
this.previouslySelectedProperties.resolution = eventDetails.title;
|
|
32943
32953
|
break;
|
|
32944
32954
|
case 'duplex':
|
|
32945
32955
|
if (eventDetails.title === 'None') {
|
|
@@ -32949,7 +32959,6 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32949
32959
|
this.selectedProperties.duplex = true;
|
|
32950
32960
|
}
|
|
32951
32961
|
this.selectedProperties.duplexmode = eventDetails.id;
|
|
32952
|
-
this.previouslySelectedProperties.duplexmode = eventDetails.id;
|
|
32953
32962
|
break;
|
|
32954
32963
|
}
|
|
32955
32964
|
}
|
|
@@ -32974,6 +32983,10 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32974
32983
|
this.printService
|
|
32975
32984
|
.printByFileID(authStore.state.accessToken, this.fileid, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename)
|
|
32976
32985
|
.then((data) => {
|
|
32986
|
+
if (data.code === 804) {
|
|
32987
|
+
this.printFailed = true;
|
|
32988
|
+
this.printProcessing = false;
|
|
32989
|
+
}
|
|
32977
32990
|
if (data.jobid) {
|
|
32978
32991
|
printStore.state.jobID = data.jobid;
|
|
32979
32992
|
poll({
|
|
@@ -32984,21 +32997,40 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
32984
32997
|
}).catch((err) => {
|
|
32985
32998
|
console.log(err);
|
|
32986
32999
|
this.printFailed = true;
|
|
33000
|
+
this.printProcessing = false;
|
|
32987
33001
|
});
|
|
32988
33002
|
}
|
|
32989
33003
|
else {
|
|
32990
33004
|
this.printFailed = true;
|
|
33005
|
+
this.printProcessing = false;
|
|
32991
33006
|
}
|
|
32992
33007
|
})
|
|
32993
33008
|
.catch((error) => {
|
|
32994
33009
|
console.log(error);
|
|
32995
33010
|
this.printFailed = true;
|
|
33011
|
+
this.printProcessing = false;
|
|
32996
33012
|
});
|
|
32997
33013
|
}
|
|
32998
33014
|
else {
|
|
32999
33015
|
this.printFailed = true;
|
|
33016
|
+
this.printProcessing = false;
|
|
33000
33017
|
}
|
|
33001
33018
|
}
|
|
33019
|
+
setDefaultPaperFormat() {
|
|
33020
|
+
let format;
|
|
33021
|
+
const language = navigator.language;
|
|
33022
|
+
if (language === 'en-US') {
|
|
33023
|
+
format = 'Letter';
|
|
33024
|
+
}
|
|
33025
|
+
else if (language === 'my') {
|
|
33026
|
+
format = 'Letter';
|
|
33027
|
+
}
|
|
33028
|
+
else {
|
|
33029
|
+
format = 'A4';
|
|
33030
|
+
}
|
|
33031
|
+
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name === format).Name;
|
|
33032
|
+
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name === format).Id;
|
|
33033
|
+
}
|
|
33002
33034
|
/**
|
|
33003
33035
|
*
|
|
33004
33036
|
* Lifecycle methods
|
|
@@ -33006,11 +33038,19 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33006
33038
|
*/
|
|
33007
33039
|
/** Description... */
|
|
33008
33040
|
async componentWillLoad() {
|
|
33009
|
-
initi18n();
|
|
33010
33041
|
this.loading = true;
|
|
33011
33042
|
this.getPropertiesFromLocalStorage();
|
|
33012
33043
|
this.getUserInfo();
|
|
33013
33044
|
this.printService = new EzpPrintService(this.redirectURI, this.clientID);
|
|
33045
|
+
// if printer is stored from previous print, get the config to enable property selection
|
|
33046
|
+
if (this.selectedPrinter.id != '') {
|
|
33047
|
+
await this.printService
|
|
33048
|
+
.getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
|
|
33049
|
+
.then((data) => (this.selectedPrinterConfig = data[0]));
|
|
33050
|
+
if (this.selectedProperties.paper === '') {
|
|
33051
|
+
this.setDefaultPaperFormat();
|
|
33052
|
+
}
|
|
33053
|
+
}
|
|
33014
33054
|
await (await this.printService.getConfig(authStore.state.accessToken))
|
|
33015
33055
|
.json()
|
|
33016
33056
|
.then((response) => {
|
|
@@ -33055,7 +33095,9 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33055
33095
|
? printer.location
|
|
33056
33096
|
: i18next.t('printer_selection.unknown_location'),
|
|
33057
33097
|
type: 'printer',
|
|
33058
|
-
})),
|
|
33098
|
+
})),
|
|
33099
|
+
// preSelected={this.selectedPrinter ? this.selectedPrinter.name : null}
|
|
33100
|
+
disabled: !(this.printers.length > 0) })), h("div", { id: "options" }, h("ezp-select", { label: i18next.t('printer_selection.color'), icon: "color", placeholder: i18next.t('printer_selection.select_color'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Color
|
|
33059
33101
|
? [
|
|
33060
33102
|
{
|
|
33061
33103
|
id: 1,
|
|
@@ -33079,11 +33121,25 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33079
33121
|
},
|
|
33080
33122
|
],
|
|
33081
33123
|
// preSelected={
|
|
33082
|
-
// this.
|
|
33083
|
-
//
|
|
33084
|
-
//
|
|
33085
|
-
//
|
|
33086
|
-
//
|
|
33124
|
+
// this.selectedProperties.color ?
|
|
33125
|
+
// [
|
|
33126
|
+
// {
|
|
33127
|
+
// id: 1,
|
|
33128
|
+
// title: i18next.t('printer_selection.color'),
|
|
33129
|
+
// meta: '',
|
|
33130
|
+
// type: 'color',
|
|
33131
|
+
// },
|
|
33132
|
+
// ]
|
|
33133
|
+
// : !this.selectedProperties.color ?
|
|
33134
|
+
// [
|
|
33135
|
+
// {
|
|
33136
|
+
// id: 0,
|
|
33137
|
+
// title: i18next.t('printer_selection.color_grayscale'),
|
|
33138
|
+
// meta: '',
|
|
33139
|
+
// type: 'color',
|
|
33140
|
+
// },
|
|
33141
|
+
// ]
|
|
33142
|
+
// : null
|
|
33087
33143
|
// }
|
|
33088
33144
|
disabled: !this.selectedPrinterConfig.Color }), h("ezp-select", { label: i18next.t('printer_selection.duplex'), icon: "duplex", placeholder: i18next.t('printer_selection.select_duplex'), toggleFlow: "horizontal", options: this.duplexOptions.map((option) => ({
|
|
33089
33145
|
id: option.id,
|
|
@@ -33092,10 +33148,10 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33092
33148
|
type: 'duplex',
|
|
33093
33149
|
})),
|
|
33094
33150
|
// preSelected={
|
|
33095
|
-
// this.
|
|
33096
|
-
// ? this.
|
|
33097
|
-
// : this.selectedPrinterConfig.DuplexSupported
|
|
33098
|
-
// ? 'None'
|
|
33151
|
+
// this.selectedProperties.duplex
|
|
33152
|
+
// ? this.selectedProperties.duplex
|
|
33153
|
+
// // : this.selectedPrinterConfig.DuplexSupported
|
|
33154
|
+
// // ? 'None'
|
|
33099
33155
|
// : null
|
|
33100
33156
|
// }
|
|
33101
33157
|
disabled: !this.selectedPrinterConfig.DuplexSupported }), 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) => ({
|
|
@@ -33105,10 +33161,10 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33105
33161
|
type: 'format',
|
|
33106
33162
|
})),
|
|
33107
33163
|
// preSelected={
|
|
33108
|
-
// this.
|
|
33109
|
-
// ? this.
|
|
33110
|
-
// : this.selectedPrinterConfig.PaperFormats.length > 0
|
|
33111
|
-
// ? this.selectedPrinterConfig.PaperFormats[0].Name
|
|
33164
|
+
// this.selectedProperties.paper
|
|
33165
|
+
// ? this.selectedProperties.paper
|
|
33166
|
+
// // : this.selectedPrinterConfig.PaperFormats.length > 0
|
|
33167
|
+
// // ? this.selectedPrinterConfig.PaperFormats[0].Name
|
|
33112
33168
|
// : null
|
|
33113
33169
|
// }
|
|
33114
33170
|
disabled: !(this.selectedPrinterConfig.PaperFormats.length > 0) }), 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) => ({
|
|
@@ -33118,12 +33174,12 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33118
33174
|
type: 'orientation',
|
|
33119
33175
|
})),
|
|
33120
33176
|
// preSelected={
|
|
33121
|
-
// this.
|
|
33122
|
-
// ? this.
|
|
33123
|
-
// : this.selectedPrinterConfig.OrientationsSupported.length > 0
|
|
33124
|
-
// ? i18next.t(
|
|
33125
|
-
//
|
|
33126
|
-
//
|
|
33177
|
+
// this.selectedProperties.orientation
|
|
33178
|
+
// ? this.selectedProperties.orientation
|
|
33179
|
+
// // : this.selectedPrinterConfig.OrientationsSupported.length > 0
|
|
33180
|
+
// // ? i18next.t(
|
|
33181
|
+
// // `printer_selection.orientation_${this.selectedPrinterConfig.OrientationsSupported[0]}`
|
|
33182
|
+
// // )
|
|
33127
33183
|
// : null
|
|
33128
33184
|
// }
|
|
33129
33185
|
disabled: !(this.selectedPrinterConfig.OrientationsSupported.length > 0) }), h("ezp-select", { label: i18next.t('printer_selection.quality'), icon: "quality", placeholder: i18next.t('printer_selection.select_quality'), toggleFlow: "horizontal", options: this.selectedPrinterConfig.Resolutions.map((option, index) => ({
|
|
@@ -33133,13 +33189,13 @@ let EzpPrinterSelection$1 = class extends HTMLElement {
|
|
|
33133
33189
|
type: 'quality',
|
|
33134
33190
|
})),
|
|
33135
33191
|
// preSelected={
|
|
33136
|
-
// this.
|
|
33137
|
-
// ? this.
|
|
33138
|
-
// : this.selectedPrinterConfig.Resolutions.length > 0
|
|
33139
|
-
// ? this.selectedPrinterConfig.Resolutions[0]
|
|
33192
|
+
// this.selectedProperties.resolution
|
|
33193
|
+
// ? this.selectedProperties.resolution
|
|
33194
|
+
// // : this.selectedPrinterConfig.Resolutions.length > 0
|
|
33195
|
+
// // ? this.selectedPrinterConfig.Resolutions[0]
|
|
33140
33196
|
// : null
|
|
33141
33197
|
// }
|
|
33142
|
-
disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) })), h("ezp-stepper", { label:
|
|
33198
|
+
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') }), h("ezp-text-button", { disabled: this.selectedPrinter.id === '', type: "button", onClick: this.handlePrint, label: i18next.t('button_actions.print') })), !this.hidemenu && h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
|
|
33143
33199
|
}
|
|
33144
33200
|
static get style() { return ezpPrinterSelectionCss; }
|
|
33145
33201
|
};
|
|
@@ -33158,9 +33214,11 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33158
33214
|
super();
|
|
33159
33215
|
this.__registerHost();
|
|
33160
33216
|
this.__attachShadow();
|
|
33217
|
+
this.filename = '';
|
|
33161
33218
|
this.hidemenu = false;
|
|
33162
33219
|
this.theme = 'cyan';
|
|
33163
33220
|
this.appearance = 'system';
|
|
33221
|
+
this.language = '';
|
|
33164
33222
|
/**
|
|
33165
33223
|
*
|
|
33166
33224
|
* States
|
|
@@ -33189,7 +33247,7 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33189
33247
|
this.authOpen = false;
|
|
33190
33248
|
}
|
|
33191
33249
|
listenAuthSuccess() {
|
|
33192
|
-
if (this.filename) {
|
|
33250
|
+
if (this.filename != '') {
|
|
33193
33251
|
this.printOpen = true;
|
|
33194
33252
|
}
|
|
33195
33253
|
else {
|
|
@@ -33275,7 +33333,7 @@ let EzpPrinting$1 = class extends HTMLElement {
|
|
|
33275
33333
|
else {
|
|
33276
33334
|
printStore.state.printApiHostUrl = config.printingApiHostUrl;
|
|
33277
33335
|
}
|
|
33278
|
-
initi18n();
|
|
33336
|
+
initi18n(this.language);
|
|
33279
33337
|
sendCodeToParentWindow();
|
|
33280
33338
|
this.checkAuth();
|
|
33281
33339
|
}
|
|
@@ -33478,7 +33536,6 @@ let EzpStatus$1 = class extends HTMLElement {
|
|
|
33478
33536
|
*
|
|
33479
33537
|
*/
|
|
33480
33538
|
componentWillLoad() {
|
|
33481
|
-
initi18n();
|
|
33482
33539
|
}
|
|
33483
33540
|
/**
|
|
33484
33541
|
*
|
|
@@ -33665,7 +33722,6 @@ let EzpUpload$1 = class extends HTMLElement {
|
|
|
33665
33722
|
*
|
|
33666
33723
|
*/
|
|
33667
33724
|
componentWillLoad() {
|
|
33668
|
-
initi18n();
|
|
33669
33725
|
}
|
|
33670
33726
|
/**
|
|
33671
33727
|
*
|
|
@@ -33749,7 +33805,6 @@ let EzpUserMenu$1 = class extends HTMLElement {
|
|
|
33749
33805
|
*
|
|
33750
33806
|
*/
|
|
33751
33807
|
componentWillLoad() {
|
|
33752
|
-
initi18n();
|
|
33753
33808
|
this.container = this.component.closest('[data-backdrop-surface]');
|
|
33754
33809
|
this.backdrop.addEventListener('backdropHideStart', () => {
|
|
33755
33810
|
this.open = false;
|
|
@@ -33780,8 +33835,8 @@ const EzpDialog = /*@__PURE__*/proxyCustomElement(EzpDialog$1, [1,"ezp-dialog",{
|
|
|
33780
33835
|
const EzpIcon = /*@__PURE__*/proxyCustomElement(EzpIcon$1, [1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}]);
|
|
33781
33836
|
const EzpIconButton = /*@__PURE__*/proxyCustomElement(EzpIconButton$1, [1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}]);
|
|
33782
33837
|
const EzpLabel = /*@__PURE__*/proxyCustomElement(EzpLabel$1, [1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1]}]);
|
|
33783
|
-
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],"loading":[32],"options":[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]
|
|
33784
|
-
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],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]]);
|
|
33838
|
+
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],"loading":[32],"options":[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]},[[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]]);
|
|
33839
|
+
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],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]]);
|
|
33785
33840
|
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]}]);
|
|
33786
33841
|
const EzpStatus = /*@__PURE__*/proxyCustomElement(EzpStatus$1, [1,"ezp-status",{"description":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}]);
|
|
33787
33842
|
const EzpStepper = /*@__PURE__*/proxyCustomElement(EzpStepper$1, [1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]}]);
|
|
@@ -166,14 +166,14 @@ export class EzpPrinterSelection {
|
|
|
166
166
|
|
|
167
167
|
export declare interface EzpPrinting extends Components.EzpPrinting {}
|
|
168
168
|
@ProxyCmp({
|
|
169
|
-
inputs: ['appearance', 'authapihosturl', 'clientid', 'custom', 'fileid', 'filename', 'filetype', 'fileurl', 'hidelogin', 'hidemenu', 'printapihosturl', 'redirecturi', 'theme', 'trigger'],
|
|
169
|
+
inputs: ['appearance', 'authapihosturl', 'clientid', 'custom', 'fileid', 'filename', 'filetype', 'fileurl', 'hidelogin', 'hidemenu', 'language', 'printapihosturl', 'redirecturi', 'theme', 'trigger'],
|
|
170
170
|
methods: ['open']
|
|
171
171
|
})
|
|
172
172
|
@Component({
|
|
173
173
|
selector: 'ezp-printing',
|
|
174
174
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
175
175
|
template: '<ng-content></ng-content>',
|
|
176
|
-
inputs: ['appearance', 'authapihosturl', 'clientid', 'custom', 'fileid', 'filename', 'filetype', 'fileurl', 'hidelogin', 'hidemenu', 'printapihosturl', 'redirecturi', 'theme', 'trigger']
|
|
176
|
+
inputs: ['appearance', 'authapihosturl', 'clientid', 'custom', 'fileid', 'filename', 'filetype', 'fileurl', 'hidelogin', 'hidemenu', 'language', 'printapihosturl', 'redirecturi', 'theme', 'trigger']
|
|
177
177
|
})
|
|
178
178
|
export class EzpPrinting {
|
|
179
179
|
protected el: HTMLElement;
|
package/dist/esm/ezeep.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-485041ac.js';
|
|
2
2
|
import { g as globalScripts } from './app-globals-28960cbc.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v2.
|
|
5
|
+
Stencil Client Patch Browser v2.14.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchBrowser = () => {
|
|
8
8
|
const importMeta = import.meta.url;
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
17
|
globalScripts();
|
|
18
|
-
return bootstrapLazy([["ezp-auth_14",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[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],"loading":[32],"options":[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]
|
|
18
|
+
return bootstrapLazy([["ezp-auth_14",[[1,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"printOpen":[32],"authOpen":[32],"noDocumentOpen":[32],"systemAppearance":[32],"open":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"]]],[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],"loading":[32],"options":[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]},[[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],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"]]],[1,"ezp-upload",{"dragging":[32]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"]]],[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-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
|
});
|