@ezeep/ezeep-js 1.0.150 → 1.0.156
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 +118 -67
- 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 +119 -68
- package/dist/directives/proxies.ts +2 -2
- package/dist/esm/ezeep.js +3 -3
- package/dist/esm/ezp-auth_14.entry.js +118 -67
- 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-0b51d725.system.entry.js +21 -0
- package/dist/ezeep/{p-a7b7b386.entry.js → p-b6ec69dc.entry.js} +2 -2
- package/dist/ezeep/p-cc2bb341.system.js +1 -0
- package/dist/ezeep/p-d4dae139.system.js +1 -0
- 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 +3 -1
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/ezeep.js +1 -1
- package/www/build/p-0b51d725.system.entry.js +21 -0
- package/www/build/{p-a7b7b386.entry.js → p-b6ec69dc.entry.js} +2 -2
- package/www/build/p-cc2bb341.system.js +1 -0
- package/www/build/p-d4dae139.system.js +1 -0
- package/www/build/{p-f3065800.js → p-fa808a39.js} +0 -0
- package/www/data/locales/en.json +6 -1
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getRenderingRef, f as forceUpdate, r as registerInstance, c as createEvent, h, H as Host, a as getElement, d as getAssetPath, F as Fragment } from './index-
|
|
1
|
+
import { g as getRenderingRef, f as forceUpdate, r as registerInstance, c as createEvent, h, H as Host, a as getElement, d as getAssetPath, F as Fragment } from './index-485041ac.js';
|
|
2
2
|
|
|
3
3
|
const appendToMap = (map, propName, value) => {
|
|
4
4
|
const items = map.get(propName);
|
|
@@ -2922,6 +2922,9 @@ const printer_selection = {
|
|
|
2922
2922
|
orientation: "Orientation",
|
|
2923
2923
|
size: "Paper Size",
|
|
2924
2924
|
duplex: "Double-sided",
|
|
2925
|
+
duplex_none: "None",
|
|
2926
|
+
duplex_long: "Long edge binding",
|
|
2927
|
+
duplex_short: "Short edge binding",
|
|
2925
2928
|
quality: "Print Quality",
|
|
2926
2929
|
select_printer: "Select a printer",
|
|
2927
2930
|
select_color: "Select Color/Grayscale",
|
|
@@ -2934,7 +2937,8 @@ const printer_selection = {
|
|
|
2934
2937
|
orientation_portrait: "Portrait",
|
|
2935
2938
|
orientation_landscape: "Landscape",
|
|
2936
2939
|
unknown_location: "Unknown location",
|
|
2937
|
-
no_printers: "No printers found."
|
|
2940
|
+
no_printers: "No printers found.",
|
|
2941
|
+
copies: "Copies"
|
|
2938
2942
|
};
|
|
2939
2943
|
const button_actions = {
|
|
2940
2944
|
login: "Sign In",
|
|
@@ -2973,7 +2977,7 @@ function encodeFormData(data) {
|
|
|
2973
2977
|
.map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(data[key]))
|
|
2974
2978
|
.join('&');
|
|
2975
2979
|
}
|
|
2976
|
-
function initi18n() {
|
|
2980
|
+
function initi18n(language) {
|
|
2977
2981
|
const resources = {
|
|
2978
2982
|
en: {
|
|
2979
2983
|
translation: translationsEN,
|
|
@@ -2982,13 +2986,25 @@ function initi18n() {
|
|
|
2982
2986
|
translation: translationsDE,
|
|
2983
2987
|
},
|
|
2984
2988
|
};
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2989
|
+
// override browserlanguage if language is provided
|
|
2990
|
+
if (language != '') {
|
|
2991
|
+
i18next.init({
|
|
2992
|
+
resources,
|
|
2993
|
+
lng: language,
|
|
2994
|
+
// allow keys to be phrases having `:`, `.`
|
|
2995
|
+
nsSeparator: false,
|
|
2996
|
+
fallbackLng: 'en',
|
|
2997
|
+
});
|
|
2998
|
+
}
|
|
2999
|
+
else {
|
|
3000
|
+
i18next.init({
|
|
3001
|
+
resources,
|
|
3002
|
+
lng: navigator.language,
|
|
3003
|
+
// allow keys to be phrases having `:`, `.`
|
|
3004
|
+
nsSeparator: false,
|
|
3005
|
+
fallbackLng: 'en',
|
|
3006
|
+
});
|
|
3007
|
+
}
|
|
2992
3008
|
}
|
|
2993
3009
|
const poll = async ({ fn, validate, interval, maxAttempts }) => {
|
|
2994
3010
|
let attempts = 0;
|
|
@@ -3056,6 +3072,7 @@ class EzpAuthorizationService {
|
|
|
3056
3072
|
}
|
|
3057
3073
|
getAccessToken() {
|
|
3058
3074
|
return fetch(this.accessTokenURL, {
|
|
3075
|
+
credentials: 'include',
|
|
3059
3076
|
headers: {
|
|
3060
3077
|
Authorization: 'Basic ' + btoa(this.clientID + ':'),
|
|
3061
3078
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
@@ -3089,6 +3106,7 @@ class EzpAuthorizationService {
|
|
|
3089
3106
|
}
|
|
3090
3107
|
refreshTokens() {
|
|
3091
3108
|
fetch(this.accessTokenURL, {
|
|
3109
|
+
credentials: 'include',
|
|
3092
3110
|
headers: {
|
|
3093
3111
|
Authorization: 'Basic ' + btoa(this.clientID + ':'),
|
|
3094
3112
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
@@ -3189,13 +3207,12 @@ let EzpAuth = class {
|
|
|
3189
3207
|
}
|
|
3190
3208
|
receiveMessage(event) {
|
|
3191
3209
|
this.auth.code = event.data;
|
|
3192
|
-
this.auth.getAccessToken().
|
|
3210
|
+
this.auth.getAccessToken().then(() => {
|
|
3193
3211
|
this.authCancel.emit();
|
|
3194
3212
|
this.authSuccess.emit();
|
|
3195
3213
|
});
|
|
3196
3214
|
}
|
|
3197
3215
|
async componentWillLoad() {
|
|
3198
|
-
initi18n();
|
|
3199
3216
|
this.auth = new EzpAuthorizationService(this.redirectURI, this.clientID);
|
|
3200
3217
|
if (authStore.state.isAuthorized === false) {
|
|
3201
3218
|
this.auth.generateCodeVerifier();
|
|
@@ -3265,7 +3282,6 @@ let EzpDialog = class {
|
|
|
3265
3282
|
*
|
|
3266
3283
|
*/
|
|
3267
3284
|
componentWillLoad() {
|
|
3268
|
-
initi18n();
|
|
3269
3285
|
}
|
|
3270
3286
|
/**
|
|
3271
3287
|
*
|
|
@@ -32679,15 +32695,15 @@ let EzpPrinterSelection = class {
|
|
|
32679
32695
|
this.duplexOptions = [
|
|
32680
32696
|
{
|
|
32681
32697
|
id: 1,
|
|
32682
|
-
title: '
|
|
32698
|
+
title: i18next.t('printer_selection.duplex_none'),
|
|
32683
32699
|
},
|
|
32684
32700
|
{
|
|
32685
32701
|
id: 2,
|
|
32686
|
-
title: '
|
|
32702
|
+
title: i18next.t('printer_selection.duplex_long'),
|
|
32687
32703
|
},
|
|
32688
32704
|
{
|
|
32689
32705
|
id: 3,
|
|
32690
|
-
title: '
|
|
32706
|
+
title: i18next.t('printer_selection.duplex_short'),
|
|
32691
32707
|
},
|
|
32692
32708
|
];
|
|
32693
32709
|
this.hidemenu = false;
|
|
@@ -32725,16 +32741,6 @@ let EzpPrinterSelection = class {
|
|
|
32725
32741
|
copies: '',
|
|
32726
32742
|
resolution: '',
|
|
32727
32743
|
};
|
|
32728
|
-
this.previouslySelectedProperties = {
|
|
32729
|
-
paper: '',
|
|
32730
|
-
paperid: '',
|
|
32731
|
-
color: false,
|
|
32732
|
-
duplex: false,
|
|
32733
|
-
duplexmode: '',
|
|
32734
|
-
orientation: '',
|
|
32735
|
-
copies: '',
|
|
32736
|
-
resolution: '',
|
|
32737
|
-
};
|
|
32738
32744
|
/**
|
|
32739
32745
|
*
|
|
32740
32746
|
* Private methods
|
|
@@ -32779,6 +32785,10 @@ let EzpPrinterSelection = class {
|
|
|
32779
32785
|
}
|
|
32780
32786
|
})
|
|
32781
32787
|
.then((data) => {
|
|
32788
|
+
if (data.code === 804) {
|
|
32789
|
+
this.printFailed = true;
|
|
32790
|
+
this.printProcessing = false;
|
|
32791
|
+
}
|
|
32782
32792
|
if (data.jobid) {
|
|
32783
32793
|
printStore.state.jobID = data.jobid;
|
|
32784
32794
|
poll({
|
|
@@ -32788,15 +32798,19 @@ let EzpPrinterSelection = class {
|
|
|
32788
32798
|
maxAttempts: 10,
|
|
32789
32799
|
}).catch((err) => {
|
|
32790
32800
|
console.warn(err);
|
|
32801
|
+
this.printFailed = true;
|
|
32802
|
+
this.printProcessing = false;
|
|
32791
32803
|
});
|
|
32792
32804
|
}
|
|
32793
32805
|
else {
|
|
32794
32806
|
this.printFailed = true;
|
|
32807
|
+
this.printProcessing = false;
|
|
32795
32808
|
}
|
|
32796
32809
|
})
|
|
32797
32810
|
.catch((error) => {
|
|
32798
32811
|
console.log(error);
|
|
32799
32812
|
this.printFailed = true;
|
|
32813
|
+
this.printProcessing = false;
|
|
32800
32814
|
});
|
|
32801
32815
|
}
|
|
32802
32816
|
if (this.file) {
|
|
@@ -32804,7 +32818,6 @@ let EzpPrinterSelection = class {
|
|
|
32804
32818
|
}
|
|
32805
32819
|
localStorage.setItem('properties', JSON.stringify(this.selectedProperties));
|
|
32806
32820
|
localStorage.setItem('printer', JSON.stringify(this.selectedPrinter));
|
|
32807
|
-
localStorage.setItem('previouslySelectedProperties', JSON.stringify(this.previouslySelectedProperties));
|
|
32808
32821
|
this.printStopped = false;
|
|
32809
32822
|
};
|
|
32810
32823
|
this.handleUserMenu = () => {
|
|
@@ -32876,9 +32889,6 @@ let EzpPrinterSelection = class {
|
|
|
32876
32889
|
else {
|
|
32877
32890
|
this.selectedPrinter = { id: '', location: '', name: '' };
|
|
32878
32891
|
}
|
|
32879
|
-
if (localStorage.getItem('previouslySelectedProperties')) {
|
|
32880
|
-
this.previouslySelectedProperties = JSON.parse(localStorage.getItem('previouslySelectedProperties'));
|
|
32881
|
-
}
|
|
32882
32892
|
}
|
|
32883
32893
|
getUserInfo() {
|
|
32884
32894
|
const userService = new EzpUserService();
|
|
@@ -32895,24 +32905,20 @@ let EzpPrinterSelection = class {
|
|
|
32895
32905
|
await this.printService
|
|
32896
32906
|
.getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
|
|
32897
32907
|
.then((data) => (this.selectedPrinterConfig = data[0]));
|
|
32908
|
+
this.setDefaultPaperFormat();
|
|
32898
32909
|
break;
|
|
32899
32910
|
case 'color':
|
|
32900
32911
|
this.selectedProperties.color = !!eventDetails.id;
|
|
32901
|
-
this.previouslySelectedProperties.color = eventDetails.title;
|
|
32902
32912
|
break;
|
|
32903
32913
|
case 'orientation':
|
|
32904
32914
|
this.selectedProperties.orientation = eventDetails.id;
|
|
32905
|
-
this.previouslySelectedProperties.orientation = eventDetails.title;
|
|
32906
32915
|
break;
|
|
32907
32916
|
case 'format':
|
|
32908
32917
|
this.selectedProperties.paper = eventDetails.title;
|
|
32909
32918
|
this.selectedProperties.paperid = eventDetails.id;
|
|
32910
|
-
this.previouslySelectedProperties.paper = eventDetails.title;
|
|
32911
|
-
this.previouslySelectedProperties.paperid = eventDetails.id;
|
|
32912
32919
|
break;
|
|
32913
32920
|
case 'quality':
|
|
32914
32921
|
this.selectedProperties.resolution = eventDetails.title;
|
|
32915
|
-
this.previouslySelectedProperties.resolution = eventDetails.title;
|
|
32916
32922
|
break;
|
|
32917
32923
|
case 'duplex':
|
|
32918
32924
|
if (eventDetails.title === 'None') {
|
|
@@ -32922,7 +32928,6 @@ let EzpPrinterSelection = class {
|
|
|
32922
32928
|
this.selectedProperties.duplex = true;
|
|
32923
32929
|
}
|
|
32924
32930
|
this.selectedProperties.duplexmode = eventDetails.id;
|
|
32925
|
-
this.previouslySelectedProperties.duplexmode = eventDetails.id;
|
|
32926
32931
|
break;
|
|
32927
32932
|
}
|
|
32928
32933
|
}
|
|
@@ -32947,6 +32952,10 @@ let EzpPrinterSelection = class {
|
|
|
32947
32952
|
this.printService
|
|
32948
32953
|
.printByFileID(authStore.state.accessToken, this.fileid, this.filetype, this.selectedPrinter.id, this.selectedProperties, this.filename)
|
|
32949
32954
|
.then((data) => {
|
|
32955
|
+
if (data.code === 804) {
|
|
32956
|
+
this.printFailed = true;
|
|
32957
|
+
this.printProcessing = false;
|
|
32958
|
+
}
|
|
32950
32959
|
if (data.jobid) {
|
|
32951
32960
|
printStore.state.jobID = data.jobid;
|
|
32952
32961
|
poll({
|
|
@@ -32957,21 +32966,40 @@ let EzpPrinterSelection = class {
|
|
|
32957
32966
|
}).catch((err) => {
|
|
32958
32967
|
console.log(err);
|
|
32959
32968
|
this.printFailed = true;
|
|
32969
|
+
this.printProcessing = false;
|
|
32960
32970
|
});
|
|
32961
32971
|
}
|
|
32962
32972
|
else {
|
|
32963
32973
|
this.printFailed = true;
|
|
32974
|
+
this.printProcessing = false;
|
|
32964
32975
|
}
|
|
32965
32976
|
})
|
|
32966
32977
|
.catch((error) => {
|
|
32967
32978
|
console.log(error);
|
|
32968
32979
|
this.printFailed = true;
|
|
32980
|
+
this.printProcessing = false;
|
|
32969
32981
|
});
|
|
32970
32982
|
}
|
|
32971
32983
|
else {
|
|
32972
32984
|
this.printFailed = true;
|
|
32985
|
+
this.printProcessing = false;
|
|
32973
32986
|
}
|
|
32974
32987
|
}
|
|
32988
|
+
setDefaultPaperFormat() {
|
|
32989
|
+
let format;
|
|
32990
|
+
const language = navigator.language;
|
|
32991
|
+
if (language === 'en-US') {
|
|
32992
|
+
format = 'Letter';
|
|
32993
|
+
}
|
|
32994
|
+
else if (language === 'my') {
|
|
32995
|
+
format = 'Letter';
|
|
32996
|
+
}
|
|
32997
|
+
else {
|
|
32998
|
+
format = 'A4';
|
|
32999
|
+
}
|
|
33000
|
+
this.selectedProperties.paper = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name === format).Name;
|
|
33001
|
+
this.selectedProperties.paperid = this.selectedPrinterConfig.PaperFormats.find((el) => el.Name === format).Id;
|
|
33002
|
+
}
|
|
32975
33003
|
/**
|
|
32976
33004
|
*
|
|
32977
33005
|
* Lifecycle methods
|
|
@@ -32979,11 +33007,19 @@ let EzpPrinterSelection = class {
|
|
|
32979
33007
|
*/
|
|
32980
33008
|
/** Description... */
|
|
32981
33009
|
async componentWillLoad() {
|
|
32982
|
-
initi18n();
|
|
32983
33010
|
this.loading = true;
|
|
32984
33011
|
this.getPropertiesFromLocalStorage();
|
|
32985
33012
|
this.getUserInfo();
|
|
32986
33013
|
this.printService = new EzpPrintService(this.redirectURI, this.clientID);
|
|
33014
|
+
// if printer is stored from previous print, get the config to enable property selection
|
|
33015
|
+
if (this.selectedPrinter.id != '') {
|
|
33016
|
+
await this.printService
|
|
33017
|
+
.getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
|
|
33018
|
+
.then((data) => (this.selectedPrinterConfig = data[0]));
|
|
33019
|
+
if (this.selectedProperties.paper === '') {
|
|
33020
|
+
this.setDefaultPaperFormat();
|
|
33021
|
+
}
|
|
33022
|
+
}
|
|
32987
33023
|
await (await this.printService.getConfig(authStore.state.accessToken))
|
|
32988
33024
|
.json()
|
|
32989
33025
|
.then((response) => {
|
|
@@ -33028,7 +33064,9 @@ let EzpPrinterSelection = class {
|
|
|
33028
33064
|
? printer.location
|
|
33029
33065
|
: i18next.t('printer_selection.unknown_location'),
|
|
33030
33066
|
type: 'printer',
|
|
33031
|
-
})),
|
|
33067
|
+
})),
|
|
33068
|
+
// preSelected={this.selectedPrinter ? this.selectedPrinter.name : null}
|
|
33069
|
+
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
|
|
33032
33070
|
? [
|
|
33033
33071
|
{
|
|
33034
33072
|
id: 1,
|
|
@@ -33052,11 +33090,25 @@ let EzpPrinterSelection = class {
|
|
|
33052
33090
|
},
|
|
33053
33091
|
],
|
|
33054
33092
|
// preSelected={
|
|
33055
|
-
// this.
|
|
33056
|
-
//
|
|
33057
|
-
//
|
|
33058
|
-
//
|
|
33059
|
-
//
|
|
33093
|
+
// this.selectedProperties.color ?
|
|
33094
|
+
// [
|
|
33095
|
+
// {
|
|
33096
|
+
// id: 1,
|
|
33097
|
+
// title: i18next.t('printer_selection.color'),
|
|
33098
|
+
// meta: '',
|
|
33099
|
+
// type: 'color',
|
|
33100
|
+
// },
|
|
33101
|
+
// ]
|
|
33102
|
+
// : !this.selectedProperties.color ?
|
|
33103
|
+
// [
|
|
33104
|
+
// {
|
|
33105
|
+
// id: 0,
|
|
33106
|
+
// title: i18next.t('printer_selection.color_grayscale'),
|
|
33107
|
+
// meta: '',
|
|
33108
|
+
// type: 'color',
|
|
33109
|
+
// },
|
|
33110
|
+
// ]
|
|
33111
|
+
// : null
|
|
33060
33112
|
// }
|
|
33061
33113
|
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) => ({
|
|
33062
33114
|
id: option.id,
|
|
@@ -33065,10 +33117,10 @@ let EzpPrinterSelection = class {
|
|
|
33065
33117
|
type: 'duplex',
|
|
33066
33118
|
})),
|
|
33067
33119
|
// preSelected={
|
|
33068
|
-
// this.
|
|
33069
|
-
// ? this.
|
|
33070
|
-
// : this.selectedPrinterConfig.DuplexSupported
|
|
33071
|
-
// ? 'None'
|
|
33120
|
+
// this.selectedProperties.duplex
|
|
33121
|
+
// ? this.selectedProperties.duplex
|
|
33122
|
+
// // : this.selectedPrinterConfig.DuplexSupported
|
|
33123
|
+
// // ? 'None'
|
|
33072
33124
|
// : null
|
|
33073
33125
|
// }
|
|
33074
33126
|
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) => ({
|
|
@@ -33078,10 +33130,10 @@ let EzpPrinterSelection = class {
|
|
|
33078
33130
|
type: 'format',
|
|
33079
33131
|
})),
|
|
33080
33132
|
// preSelected={
|
|
33081
|
-
// this.
|
|
33082
|
-
// ? this.
|
|
33083
|
-
// : this.selectedPrinterConfig.PaperFormats.length > 0
|
|
33084
|
-
// ? this.selectedPrinterConfig.PaperFormats[0].Name
|
|
33133
|
+
// this.selectedProperties.paper
|
|
33134
|
+
// ? this.selectedProperties.paper
|
|
33135
|
+
// // : this.selectedPrinterConfig.PaperFormats.length > 0
|
|
33136
|
+
// // ? this.selectedPrinterConfig.PaperFormats[0].Name
|
|
33085
33137
|
// : null
|
|
33086
33138
|
// }
|
|
33087
33139
|
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) => ({
|
|
@@ -33091,12 +33143,12 @@ let EzpPrinterSelection = class {
|
|
|
33091
33143
|
type: 'orientation',
|
|
33092
33144
|
})),
|
|
33093
33145
|
// preSelected={
|
|
33094
|
-
// this.
|
|
33095
|
-
// ? this.
|
|
33096
|
-
// : this.selectedPrinterConfig.OrientationsSupported.length > 0
|
|
33097
|
-
// ? i18next.t(
|
|
33098
|
-
//
|
|
33099
|
-
//
|
|
33146
|
+
// this.selectedProperties.orientation
|
|
33147
|
+
// ? this.selectedProperties.orientation
|
|
33148
|
+
// // : this.selectedPrinterConfig.OrientationsSupported.length > 0
|
|
33149
|
+
// // ? i18next.t(
|
|
33150
|
+
// // `printer_selection.orientation_${this.selectedPrinterConfig.OrientationsSupported[0]}`
|
|
33151
|
+
// // )
|
|
33100
33152
|
// : null
|
|
33101
33153
|
// }
|
|
33102
33154
|
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) => ({
|
|
@@ -33106,13 +33158,13 @@ let EzpPrinterSelection = class {
|
|
|
33106
33158
|
type: 'quality',
|
|
33107
33159
|
})),
|
|
33108
33160
|
// preSelected={
|
|
33109
|
-
// this.
|
|
33110
|
-
// ? this.
|
|
33111
|
-
// : this.selectedPrinterConfig.Resolutions.length > 0
|
|
33112
|
-
// ? this.selectedPrinterConfig.Resolutions[0]
|
|
33161
|
+
// this.selectedProperties.resolution
|
|
33162
|
+
// ? this.selectedProperties.resolution
|
|
33163
|
+
// // : this.selectedPrinterConfig.Resolutions.length > 0
|
|
33164
|
+
// // ? this.selectedPrinterConfig.Resolutions[0]
|
|
33113
33165
|
// : null
|
|
33114
33166
|
// }
|
|
33115
|
-
disabled: !(this.selectedPrinterConfig.Resolutions.length > 0) })), h("ezp-stepper", { label:
|
|
33167
|
+
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 }))));
|
|
33116
33168
|
}
|
|
33117
33169
|
};
|
|
33118
33170
|
EzpPrinterSelection.style = ezpPrinterSelectionCss;
|
|
@@ -33129,9 +33181,11 @@ const ezpPrintingCss = ":host{font-family:\"Inter\", sans-serif;-webkit-font-fea
|
|
|
33129
33181
|
let EzpPrinting = class {
|
|
33130
33182
|
constructor(hostRef) {
|
|
33131
33183
|
registerInstance(this, hostRef);
|
|
33184
|
+
this.filename = '';
|
|
33132
33185
|
this.hidemenu = false;
|
|
33133
33186
|
this.theme = 'cyan';
|
|
33134
33187
|
this.appearance = 'system';
|
|
33188
|
+
this.language = '';
|
|
33135
33189
|
/**
|
|
33136
33190
|
*
|
|
33137
33191
|
* States
|
|
@@ -33160,7 +33214,7 @@ let EzpPrinting = class {
|
|
|
33160
33214
|
this.authOpen = false;
|
|
33161
33215
|
}
|
|
33162
33216
|
listenAuthSuccess() {
|
|
33163
|
-
if (this.filename) {
|
|
33217
|
+
if (this.filename != '') {
|
|
33164
33218
|
this.printOpen = true;
|
|
33165
33219
|
}
|
|
33166
33220
|
else {
|
|
@@ -33246,7 +33300,7 @@ let EzpPrinting = class {
|
|
|
33246
33300
|
else {
|
|
33247
33301
|
printStore.state.printApiHostUrl = config.printingApiHostUrl;
|
|
33248
33302
|
}
|
|
33249
|
-
initi18n();
|
|
33303
|
+
initi18n(this.language);
|
|
33250
33304
|
sendCodeToParentWindow();
|
|
33251
33305
|
this.checkAuth();
|
|
33252
33306
|
}
|
|
@@ -33445,7 +33499,6 @@ let EzpStatus = class {
|
|
|
33445
33499
|
*
|
|
33446
33500
|
*/
|
|
33447
33501
|
componentWillLoad() {
|
|
33448
|
-
initi18n();
|
|
33449
33502
|
}
|
|
33450
33503
|
/**
|
|
33451
33504
|
*
|
|
@@ -33626,7 +33679,6 @@ let EzpUpload = class {
|
|
|
33626
33679
|
*
|
|
33627
33680
|
*/
|
|
33628
33681
|
componentWillLoad() {
|
|
33629
|
-
initi18n();
|
|
33630
33682
|
}
|
|
33631
33683
|
/**
|
|
33632
33684
|
*
|
|
@@ -33708,7 +33760,6 @@ let EzpUserMenu = class {
|
|
|
33708
33760
|
*
|
|
33709
33761
|
*/
|
|
33710
33762
|
componentWillLoad() {
|
|
33711
|
-
initi18n();
|
|
33712
33763
|
this.container = this.component.closest('[data-backdrop-surface]');
|
|
33713
33764
|
this.backdrop.addEventListener('backdropHideStart', () => {
|
|
33714
33765
|
this.open = false;
|
|
@@ -911,6 +911,29 @@ const then = (promise, thenFn) => {
|
|
|
911
911
|
};
|
|
912
912
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
913
913
|
;
|
|
914
|
+
/**
|
|
915
|
+
* Parse a new property value for a given property type.
|
|
916
|
+
*
|
|
917
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
918
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
919
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
920
|
+
* 2. the type stored from `propType`.
|
|
921
|
+
*
|
|
922
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
923
|
+
*
|
|
924
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
925
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
926
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
927
|
+
* ```tsx
|
|
928
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
929
|
+
* ```
|
|
930
|
+
*
|
|
931
|
+
* HTML prop values on the other hand, will always a string
|
|
932
|
+
*
|
|
933
|
+
* @param propValue the new value to coerce to some type
|
|
934
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
935
|
+
* @returns the parsed/coerced value
|
|
936
|
+
*/
|
|
914
937
|
const parsePropertyValue = (propValue, propType) => {
|
|
915
938
|
// ensure this value is of the correct prop type
|
|
916
939
|
if (propValue != null && !isComplexType(propValue)) {
|
package/dist/esm/loader.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 Esm v2.
|
|
5
|
+
Stencil Client Patch Esm v2.14.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
const patchEsm = () => {
|
|
8
8
|
return promiseResolve();
|
|
@@ -12,7 +12,7 @@ const defineCustomElements = (win, options) => {
|
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
14
|
globalScripts();
|
|
15
|
-
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]
|
|
15
|
+
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);
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t=s.scopeId+"-"+this.count,o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
1
|
+
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
package/dist/esm-es5/ezeep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-485041ac.js";import{g as globalScripts}from"./app-globals-28960cbc.js";var patchBrowser=function(){var e=import.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return promiseResolve(i)};patchBrowser().then((function(e){globalScripts();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]}]]]],e)}));
|