@sankhyalabs/ezui 1.1.33 → 1.1.34
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/ez-button_16.cjs.entry.js +10 -9
- package/dist/cjs/ez-popup.cjs.entry.js +4 -4
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +2 -1
- package/dist/collection/components/ez-popup/ez-popup.css +1 -1
- package/dist/collection/components/ez-popup/ez-popup.js +5 -5
- package/dist/collection/components/ez-upload/ez-upload.js +9 -10
- package/dist/custom-elements/index.js +15 -14
- package/dist/esm/ez-button_16.entry.js +10 -9
- package/dist/esm/ez-popup.entry.js +4 -4
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-40fe4f51.entry.js +1 -0
- package/dist/ezui/{p-521112ac.entry.js → p-c2368320.entry.js} +1 -1
- package/dist/types/components/ez-popup/ez-popup.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/ezui/p-d16e63e6.entry.js +0 -1
|
@@ -2540,8 +2540,9 @@ const Field = ({ dataUnit, field, forceScroll }) => {
|
|
|
2540
2540
|
}, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
2541
2541
|
case 'FILE':
|
|
2542
2542
|
var target = properties.find(prop => prop.name === 'URL').value;
|
|
2543
|
+
const token = localStorage.getItem('token');
|
|
2543
2544
|
return (index.h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
|
|
2544
|
-
index.h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target })));
|
|
2545
|
+
index.h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target, headers: { 'Authorization': token } })));
|
|
2545
2546
|
case 'DATE':
|
|
2546
2547
|
return index.h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? index.h("place-holder", null) :
|
|
2547
2548
|
index.h("ez-date-input", { value: !value ? null : DateUtils.clearTime(value), label: formattedLabel, enabled: !readOnly, onEzChange: (event) => changeFieldHandler(event.target['value']), errormessage: errorMessage, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
@@ -3478,10 +3479,6 @@ let EzUpload = class {
|
|
|
3478
3479
|
this.initUploadEvent = index.createEvent(this, "initUploadEvent", 7);
|
|
3479
3480
|
this.finishedUploadEvent = index.createEvent(this, "finishedUploadEvent", 7);
|
|
3480
3481
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
3481
|
-
/**
|
|
3482
|
-
* Define a URL do servidor de destino
|
|
3483
|
-
*/
|
|
3484
|
-
this.target = "http://192.168.3.190:8080/2a3skw-graphql/uploadFiles";
|
|
3485
3482
|
/**
|
|
3486
3483
|
* Lista de arquivos que sera tráfegada entre cliente e servidor
|
|
3487
3484
|
*/
|
|
@@ -3492,11 +3489,17 @@ let EzUpload = class {
|
|
|
3492
3489
|
}
|
|
3493
3490
|
addFiles(files) {
|
|
3494
3491
|
Array.prototype.forEach.call(files, this.addFile.bind(this));
|
|
3495
|
-
console.log("Adicionou os arquivos");
|
|
3496
3492
|
}
|
|
3497
3493
|
addFile(file) {
|
|
3494
|
+
this.errorMessage = undefined;
|
|
3498
3495
|
if (this.validateFile(file)) {
|
|
3499
|
-
this.
|
|
3496
|
+
if (this.target) {
|
|
3497
|
+
this._uploadFile(file);
|
|
3498
|
+
}
|
|
3499
|
+
else {
|
|
3500
|
+
this.errorMessage = "Endereço de upload não informado";
|
|
3501
|
+
alert(this.errorMessage);
|
|
3502
|
+
}
|
|
3500
3503
|
}
|
|
3501
3504
|
else {
|
|
3502
3505
|
if (this.errorMessage && this.errorMessage.length > 0) {
|
|
@@ -3516,7 +3519,6 @@ let EzUpload = class {
|
|
|
3516
3519
|
}
|
|
3517
3520
|
_uploadFile(file) {
|
|
3518
3521
|
const xhr = (file.xhr = this._createXhr());
|
|
3519
|
-
console.log("iniciou o upload");
|
|
3520
3522
|
this.fileList.push({ name: file.name, size: file.size, xhr: file.xhr, strSize: this.formatBytes(file.size) });
|
|
3521
3523
|
let stalledId;
|
|
3522
3524
|
xhr.upload.onprogress = (e) => {
|
|
@@ -3580,7 +3582,6 @@ let EzUpload = class {
|
|
|
3580
3582
|
}
|
|
3581
3583
|
};
|
|
3582
3584
|
const formData = new FormData();
|
|
3583
|
-
console.log(typeof (file));
|
|
3584
3585
|
formData.append(this.formDataName, file, file.name);
|
|
3585
3586
|
xhr.open("POST", this.target, true);
|
|
3586
3587
|
this._configureXhr(xhr);
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0f668cc5.js');
|
|
6
6
|
|
|
7
|
-
const ezPopupCss = ":host{display:flex;--popup-title--primary:var(--title--primary, #2b3a54);--popup-font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--popup-text-weight--large:var(--text-weight--large, 600);--popup-space--small:var(--space--small, 6px);--popup-space--medium:var(--space--medium, 12px);--popup-space--large:var(--space--large, 24px);--popup-error--background-color:var(--color--alert-error-800, #BD0025);--popup-warning--background-color:var(--color--alert-warning-500, #EFB103);--popup-text-weight--medium:var(--text-weight--medium, 400);--popup-text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--popup-text--medium:var(--text--medium, 14px);--popup-text--primary:var(--text--primary, #626e82);--popup-z-index:var(--most-visible, 3);--popup--trash__image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"16px\"><path d=\"M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z\"/></svg>');--popup--close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--popup-title--primary);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--popup-space--large)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:flex;flex-wrap:wrap}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;width:100%;display:flex;flex-wrap:wrap;max-height:
|
|
7
|
+
const ezPopupCss = ":host{display:flex;--popup-title--primary:var(--title--primary, #2b3a54);--popup-font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--popup-text-weight--large:var(--text-weight--large, 600);--popup-space--small:var(--space--small, 6px);--popup-space--medium:var(--space--medium, 12px);--popup-space--large:var(--space--large, 24px);--popup-error--background-color:var(--color--alert-error-800, #BD0025);--popup-warning--background-color:var(--color--alert-warning-500, #EFB103);--popup-text-weight--medium:var(--text-weight--medium, 400);--popup-text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--popup-text--medium:var(--text--medium, 14px);--popup-text--primary:var(--text--primary, #626e82);--popup-z-index:var(--most-visible, 3);--popup--trash__image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"16px\"><path d=\"M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z\"/></svg>');--popup--close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--popup-title--primary);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--popup-space--large)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:flex;flex-wrap:wrap}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;width:100%;display:flex;flex-wrap:wrap;max-height:80vh;content-visibility:auto}.popup__header{padding-bottom:var(--popup-space--large);width:100%;display:flex}.popup__title{width:100%}.dialog__error--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--popup-error--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--popup-warning--background-color)}.message{font-weight:var(--popup-text-weight--medium)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--popup-title--primary);width:12px;height:12px;-webkit-mask-image:var(--popup--close__image);mask-image:var(--popup--close__image)}.btn-close--solo{width:100%}.title{display:flex;font-family:var(--popup-font-pattern);margin:0;font-weight:var(--popup-text-weight--large);line-height:1.3}.title--large{font-size:var(--popup-title--large)}.title__container{display:flex;align-items:center;padding-bottom:var(--popup-space--medium);align-self:center}.title--label{padding-left:var(--popup-space--small)}.text{font-family:var(--popup-font-pattern);text-shadow:var(--popup-text-shadow)}.text--medium{font-size:var(--popup-text--medium)}.text--primary{color:var(--popup-text--primary);text-shadow:var(--popup-text-shadow)}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
8
8
|
|
|
9
9
|
let EzPopup = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -17,17 +17,17 @@ let EzPopup = class {
|
|
|
17
17
|
/**
|
|
18
18
|
* Controla a exibição do componente.
|
|
19
19
|
*/
|
|
20
|
-
this.
|
|
20
|
+
this.opened = false;
|
|
21
21
|
/**
|
|
22
22
|
* Define o componente utilizará um cabeçalho com botão de fechamento.
|
|
23
23
|
*/
|
|
24
24
|
this.useHeader = false;
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
if (this.
|
|
27
|
+
if (this.opened) {
|
|
28
28
|
return (index.h(index.Host, null, index.h("div", { class: "overlay" }, index.h("div", { class: "popup col " + this.size }, index.h("div", { class: "popup__container" }, index.h("div", { class: "popup__content" }, index.h("div", { class: "popup__header" }, this.title ?
|
|
29
29
|
index.h("div", { class: "title popup__title" }, this.title)
|
|
30
|
-
: undefined, index.h("button", { class: this.title ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.
|
|
30
|
+
: undefined, index.h("button", { class: this.title ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezChange.emit("CANCEL"); } })), index.h("div", { class: "popup__expandable-content" }, index.h("slot", null))))))));
|
|
31
31
|
}
|
|
32
32
|
return null;
|
|
33
33
|
}
|
package/dist/cjs/ezui.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"title":[1025],"handleButtonClick":[64]}]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errormessage":[1537],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalsize":[1],"align":[1],"oppened":[4],"closeesc":[4],"closeoutsideclick":[4]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errormessage":[1537],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoclose":[516],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxwidth":[513],"isOpened":[1540,"is-opened"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"
|
|
18
|
+
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"title":[1025],"handleButtonClick":[64]}]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errormessage":[1537],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalsize":[1],"align":[1],"oppened":[4],"closeesc":[4],"closeoutsideclick":[4]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errormessage":[1537],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoclose":[516],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxwidth":[513],"isOpened":[1540,"is-opened"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"title":[1]}]]],["ez-button_16.cjs",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"validate":[64],"getChanges":[64],"changeFieldValue":[64]}],[1,"form-metadata",{"name":[1],"label":[1],"dataunit":[1025],"many":[4],"autoload":[4],"metadata":[1040]}],[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errormessage":[1537]}],[1,"ez-search",{"value":[1040],"label":[1537],"enabled":[1540],"errormessage":[1537],"optionloader":[16],"showselectedvalue":[4],"showoptionvalue":[4]}],[1,"ez-numeric-input",{"label":[513],"value":[1538],"enabled":[516],"errormessage":[1537],"precision":[8],"prettyprecision":[8]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-collapsable-box",{"value":[1540],"label":[513],"showHide":[64]}],[1,"ez-tabselector",{"selectedindex":[1537],"selectedtab":[1537],"tabs":[1]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errormessage":[1537],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"maxFileSize":[514,"max-file-size"],"headers":[16],"timeout":[514],"withCredentials":[516,"with-credentials"],"formDataName":[513,"form-data-name"],"target":[513],"fileList":[32],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1040],"label":[513],"enabled":[516],"options":[1040],"errormessage":[1537],"searchmode":[4],"showselectedvalue":[4],"showoptionvalue":[4],"optionloader":[16],"_preSelection":[32],"_visibleOptions":[32]}],[1,"ez-calendar",{"value":[1040],"floating":[516],"show":[64],"hide":[64]}],[1,"ez-icon",{"size":[513],"href":[513]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errormessage":[1537],"onlynumber":[516],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"title":[1025],"handleButtonClick":[64]}]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errormessage":[1537],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalsize":[1],"align":[1],"oppened":[4],"closeesc":[4],"closeoutsideclick":[4]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errormessage":[1537],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoclose":[516],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxwidth":[513],"isOpened":[1540,"is-opened"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"
|
|
17
|
+
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"title":[1025],"handleButtonClick":[64]}]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errormessage":[1537],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalsize":[1],"align":[1],"oppened":[4],"closeesc":[4],"closeoutsideclick":[4]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errormessage":[1537],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoclose":[516],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxwidth":[513],"isOpened":[1540,"is-opened"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"title":[1]}]]],["ez-button_16.cjs",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"validate":[64],"getChanges":[64],"changeFieldValue":[64]}],[1,"form-metadata",{"name":[1],"label":[1],"dataunit":[1025],"many":[4],"autoload":[4],"metadata":[1040]}],[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errormessage":[1537]}],[1,"ez-search",{"value":[1040],"label":[1537],"enabled":[1540],"errormessage":[1537],"optionloader":[16],"showselectedvalue":[4],"showoptionvalue":[4]}],[1,"ez-numeric-input",{"label":[513],"value":[1538],"enabled":[516],"errormessage":[1537],"precision":[8],"prettyprecision":[8]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-collapsable-box",{"value":[1540],"label":[513],"showHide":[64]}],[1,"ez-tabselector",{"selectedindex":[1537],"selectedtab":[1537],"tabs":[1]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errormessage":[1537],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"maxFileSize":[514,"max-file-size"],"headers":[16],"timeout":[514],"withCredentials":[516,"with-credentials"],"formDataName":[513,"form-data-name"],"target":[513],"fileList":[32],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1040],"label":[513],"enabled":[516],"options":[1040],"errormessage":[1537],"searchmode":[4],"showselectedvalue":[4],"showoptionvalue":[4],"optionloader":[16],"_preSelection":[32],"_visibleOptions":[32]}],[1,"ez-calendar",{"value":[1040],"floating":[516],"show":[64],"hide":[64]}],[1,"ez-icon",{"size":[513],"href":[513]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errormessage":[1537],"onlynumber":[516],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -64,8 +64,9 @@ export const Field = ({ dataUnit, field, forceScroll }) => {
|
|
|
64
64
|
}, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
65
65
|
case 'FILE':
|
|
66
66
|
var target = properties.find(prop => prop.name === 'URL').value;
|
|
67
|
+
const token = localStorage.getItem('token');
|
|
67
68
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
|
|
68
|
-
h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target })));
|
|
69
|
+
h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target, headers: { 'Authorization': token } })));
|
|
69
70
|
case 'DATE':
|
|
70
71
|
return h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? h("place-holder", null) :
|
|
71
72
|
h("ez-date-input", { value: !value ? null : DateUtils.clearTime(value), label: formattedLabel, enabled: !readOnly, onEzChange: (event) => changeFieldHandler(event.target['value']), errormessage: errorMessage, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
@@ -8,14 +8,14 @@ export class EzPopup {
|
|
|
8
8
|
/**
|
|
9
9
|
* Controla a exibição do componente.
|
|
10
10
|
*/
|
|
11
|
-
this.
|
|
11
|
+
this.opened = false;
|
|
12
12
|
/**
|
|
13
13
|
* Define o componente utilizará um cabeçalho com botão de fechamento.
|
|
14
14
|
*/
|
|
15
15
|
this.useHeader = false;
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
if (this.
|
|
18
|
+
if (this.opened) {
|
|
19
19
|
return (h(Host, null,
|
|
20
20
|
h("div", { class: "overlay" },
|
|
21
21
|
h("div", { class: "popup col " + this.size },
|
|
@@ -25,7 +25,7 @@ export class EzPopup {
|
|
|
25
25
|
this.title ?
|
|
26
26
|
h("div", { class: "title popup__title" }, this.title)
|
|
27
27
|
: undefined,
|
|
28
|
-
h("button", { class: this.title ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.
|
|
28
|
+
h("button", { class: this.title ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezChange.emit("CANCEL"); } })),
|
|
29
29
|
h("div", { class: "popup__expandable-content" },
|
|
30
30
|
h("slot", null))))))));
|
|
31
31
|
}
|
|
@@ -58,7 +58,7 @@ export class EzPopup {
|
|
|
58
58
|
"reflect": false,
|
|
59
59
|
"defaultValue": "\"col--sd-6\""
|
|
60
60
|
},
|
|
61
|
-
"
|
|
61
|
+
"opened": {
|
|
62
62
|
"type": "boolean",
|
|
63
63
|
"mutable": true,
|
|
64
64
|
"complexType": {
|
|
@@ -72,7 +72,7 @@ export class EzPopup {
|
|
|
72
72
|
"tags": [],
|
|
73
73
|
"text": "Controla a exibi\u00E7\u00E3o do componente."
|
|
74
74
|
},
|
|
75
|
-
"attribute": "
|
|
75
|
+
"attribute": "opened",
|
|
76
76
|
"reflect": true,
|
|
77
77
|
"defaultValue": "false"
|
|
78
78
|
},
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { Component, Host, h, Prop, State, Method, Event, Watch } from '@stencil/core';
|
|
2
2
|
export class EzUpload {
|
|
3
3
|
constructor() {
|
|
4
|
-
/**
|
|
5
|
-
* Define a URL do servidor de destino
|
|
6
|
-
*/
|
|
7
|
-
this.target = "http://192.168.3.190:8080/2a3skw-graphql/uploadFiles";
|
|
8
4
|
/**
|
|
9
5
|
* Lista de arquivos que sera tráfegada entre cliente e servidor
|
|
10
6
|
*/
|
|
@@ -15,11 +11,17 @@ export class EzUpload {
|
|
|
15
11
|
}
|
|
16
12
|
addFiles(files) {
|
|
17
13
|
Array.prototype.forEach.call(files, this.addFile.bind(this));
|
|
18
|
-
console.log("Adicionou os arquivos");
|
|
19
14
|
}
|
|
20
15
|
addFile(file) {
|
|
16
|
+
this.errorMessage = undefined;
|
|
21
17
|
if (this.validateFile(file)) {
|
|
22
|
-
this.
|
|
18
|
+
if (this.target) {
|
|
19
|
+
this._uploadFile(file);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this.errorMessage = "Endereço de upload não informado";
|
|
23
|
+
alert(this.errorMessage);
|
|
24
|
+
}
|
|
23
25
|
}
|
|
24
26
|
else {
|
|
25
27
|
if (this.errorMessage && this.errorMessage.length > 0) {
|
|
@@ -39,7 +41,6 @@ export class EzUpload {
|
|
|
39
41
|
}
|
|
40
42
|
_uploadFile(file) {
|
|
41
43
|
const xhr = (file.xhr = this._createXhr());
|
|
42
|
-
console.log("iniciou o upload");
|
|
43
44
|
this.fileList.push({ name: file.name, size: file.size, xhr: file.xhr, strSize: this.formatBytes(file.size) });
|
|
44
45
|
let stalledId;
|
|
45
46
|
xhr.upload.onprogress = (e) => {
|
|
@@ -108,7 +109,6 @@ export class EzUpload {
|
|
|
108
109
|
}
|
|
109
110
|
};
|
|
110
111
|
const formData = new FormData();
|
|
111
|
-
console.log(typeof (file));
|
|
112
112
|
formData.append(this.formDataName, file, file.name);
|
|
113
113
|
xhr.open("POST", this.target, true);
|
|
114
114
|
this._configureXhr(xhr);
|
|
@@ -370,8 +370,7 @@ export class EzUpload {
|
|
|
370
370
|
"text": "Define a URL do servidor de destino"
|
|
371
371
|
},
|
|
372
372
|
"attribute": "target",
|
|
373
|
-
"reflect": true
|
|
374
|
-
"defaultValue": "\"http://192.168.3.190:8080/2a3skw-graphql/uploadFiles\""
|
|
373
|
+
"reflect": true
|
|
375
374
|
},
|
|
376
375
|
"fileList": {
|
|
377
376
|
"type": "unknown",
|
|
@@ -3284,8 +3284,9 @@ const Field = ({ dataUnit, field, forceScroll }) => {
|
|
|
3284
3284
|
}, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
3285
3285
|
case 'FILE':
|
|
3286
3286
|
var target = properties.find(prop => prop.name === 'URL').value;
|
|
3287
|
+
const token = localStorage.getItem('token');
|
|
3287
3288
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
|
|
3288
|
-
h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target })));
|
|
3289
|
+
h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target, headers: { 'Authorization': token } })));
|
|
3289
3290
|
case 'DATE':
|
|
3290
3291
|
return h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? h("place-holder", null) :
|
|
3291
3292
|
h("ez-date-input", { value: !value ? null : DateUtils.clearTime(value), label: formattedLabel, enabled: !readOnly, onEzChange: (event) => changeFieldHandler(event.target['value']), errormessage: errorMessage, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
@@ -4272,7 +4273,7 @@ let EzPopover$1 = class extends HTMLElement {
|
|
|
4272
4273
|
static get style() { return ezPopoverCss; }
|
|
4273
4274
|
};
|
|
4274
4275
|
|
|
4275
|
-
const ezPopupCss = ":host{display:flex;--popup-title--primary:var(--title--primary, #2b3a54);--popup-font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--popup-text-weight--large:var(--text-weight--large, 600);--popup-space--small:var(--space--small, 6px);--popup-space--medium:var(--space--medium, 12px);--popup-space--large:var(--space--large, 24px);--popup-error--background-color:var(--color--alert-error-800, #BD0025);--popup-warning--background-color:var(--color--alert-warning-500, #EFB103);--popup-text-weight--medium:var(--text-weight--medium, 400);--popup-text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--popup-text--medium:var(--text--medium, 14px);--popup-text--primary:var(--text--primary, #626e82);--popup-z-index:var(--most-visible, 3);--popup--trash__image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"16px\"><path d=\"M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z\"/></svg>');--popup--close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--popup-title--primary);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--popup-space--large)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:flex;flex-wrap:wrap}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;width:100%;display:flex;flex-wrap:wrap;max-height:
|
|
4276
|
+
const ezPopupCss = ":host{display:flex;--popup-title--primary:var(--title--primary, #2b3a54);--popup-font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--popup-text-weight--large:var(--text-weight--large, 600);--popup-space--small:var(--space--small, 6px);--popup-space--medium:var(--space--medium, 12px);--popup-space--large:var(--space--large, 24px);--popup-error--background-color:var(--color--alert-error-800, #BD0025);--popup-warning--background-color:var(--color--alert-warning-500, #EFB103);--popup-text-weight--medium:var(--text-weight--medium, 400);--popup-text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--popup-text--medium:var(--text--medium, 14px);--popup-text--primary:var(--text--primary, #626e82);--popup-z-index:var(--most-visible, 3);--popup--trash__image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"16px\"><path d=\"M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z\"/></svg>');--popup--close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--popup-title--primary);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--popup-space--large)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:flex;flex-wrap:wrap}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;width:100%;display:flex;flex-wrap:wrap;max-height:80vh;content-visibility:auto}.popup__header{padding-bottom:var(--popup-space--large);width:100%;display:flex}.popup__title{width:100%}.dialog__error--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--popup-error--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--popup-warning--background-color)}.message{font-weight:var(--popup-text-weight--medium)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--popup-title--primary);width:12px;height:12px;-webkit-mask-image:var(--popup--close__image);mask-image:var(--popup--close__image)}.btn-close--solo{width:100%}.title{display:flex;font-family:var(--popup-font-pattern);margin:0;font-weight:var(--popup-text-weight--large);line-height:1.3}.title--large{font-size:var(--popup-title--large)}.title__container{display:flex;align-items:center;padding-bottom:var(--popup-space--medium);align-self:center}.title--label{padding-left:var(--popup-space--small)}.text{font-family:var(--popup-font-pattern);text-shadow:var(--popup-text-shadow)}.text--medium{font-size:var(--popup-text--medium)}.text--primary{color:var(--popup-text--primary);text-shadow:var(--popup-text-shadow)}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
4276
4277
|
|
|
4277
4278
|
let EzPopup$1 = class extends HTMLElement {
|
|
4278
4279
|
constructor() {
|
|
@@ -4287,17 +4288,17 @@ let EzPopup$1 = class extends HTMLElement {
|
|
|
4287
4288
|
/**
|
|
4288
4289
|
* Controla a exibição do componente.
|
|
4289
4290
|
*/
|
|
4290
|
-
this.
|
|
4291
|
+
this.opened = false;
|
|
4291
4292
|
/**
|
|
4292
4293
|
* Define o componente utilizará um cabeçalho com botão de fechamento.
|
|
4293
4294
|
*/
|
|
4294
4295
|
this.useHeader = false;
|
|
4295
4296
|
}
|
|
4296
4297
|
render() {
|
|
4297
|
-
if (this.
|
|
4298
|
+
if (this.opened) {
|
|
4298
4299
|
return (h(Host, null, h("div", { class: "overlay" }, h("div", { class: "popup col " + this.size }, h("div", { class: "popup__container" }, h("div", { class: "popup__content" }, h("div", { class: "popup__header" }, this.title ?
|
|
4299
4300
|
h("div", { class: "title popup__title" }, this.title)
|
|
4300
|
-
: undefined, h("button", { class: this.title ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.
|
|
4301
|
+
: undefined, h("button", { class: this.title ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezChange.emit("CANCEL"); } })), h("div", { class: "popup__expandable-content" }, h("slot", null))))))));
|
|
4301
4302
|
}
|
|
4302
4303
|
return null;
|
|
4303
4304
|
}
|
|
@@ -5040,10 +5041,6 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5040
5041
|
this.initUploadEvent = createEvent(this, "initUploadEvent", 7);
|
|
5041
5042
|
this.finishedUploadEvent = createEvent(this, "finishedUploadEvent", 7);
|
|
5042
5043
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
5043
|
-
/**
|
|
5044
|
-
* Define a URL do servidor de destino
|
|
5045
|
-
*/
|
|
5046
|
-
this.target = "http://192.168.3.190:8080/2a3skw-graphql/uploadFiles";
|
|
5047
5044
|
/**
|
|
5048
5045
|
* Lista de arquivos que sera tráfegada entre cliente e servidor
|
|
5049
5046
|
*/
|
|
@@ -5054,11 +5051,17 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5054
5051
|
}
|
|
5055
5052
|
addFiles(files) {
|
|
5056
5053
|
Array.prototype.forEach.call(files, this.addFile.bind(this));
|
|
5057
|
-
console.log("Adicionou os arquivos");
|
|
5058
5054
|
}
|
|
5059
5055
|
addFile(file) {
|
|
5056
|
+
this.errorMessage = undefined;
|
|
5060
5057
|
if (this.validateFile(file)) {
|
|
5061
|
-
this.
|
|
5058
|
+
if (this.target) {
|
|
5059
|
+
this._uploadFile(file);
|
|
5060
|
+
}
|
|
5061
|
+
else {
|
|
5062
|
+
this.errorMessage = "Endereço de upload não informado";
|
|
5063
|
+
alert(this.errorMessage);
|
|
5064
|
+
}
|
|
5062
5065
|
}
|
|
5063
5066
|
else {
|
|
5064
5067
|
if (this.errorMessage && this.errorMessage.length > 0) {
|
|
@@ -5078,7 +5081,6 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5078
5081
|
}
|
|
5079
5082
|
_uploadFile(file) {
|
|
5080
5083
|
const xhr = (file.xhr = this._createXhr());
|
|
5081
|
-
console.log("iniciou o upload");
|
|
5082
5084
|
this.fileList.push({ name: file.name, size: file.size, xhr: file.xhr, strSize: this.formatBytes(file.size) });
|
|
5083
5085
|
let stalledId;
|
|
5084
5086
|
xhr.upload.onprogress = (e) => {
|
|
@@ -5142,7 +5144,6 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5142
5144
|
}
|
|
5143
5145
|
};
|
|
5144
5146
|
const formData = new FormData();
|
|
5145
|
-
console.log(typeof (file));
|
|
5146
5147
|
formData.append(this.formDataName, file, file.name);
|
|
5147
5148
|
xhr.open("POST", this.target, true);
|
|
5148
5149
|
this._configureXhr(xhr);
|
|
@@ -5413,7 +5414,7 @@ const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modal
|
|
|
5413
5414
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(NumberInput, [1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errormessage":[1537],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513]}]);
|
|
5414
5415
|
const EzNumericInput = /*@__PURE__*/proxyCustomElement(EzNumericInput$1, [1,"ez-numeric-input",{"label":[513],"value":[1538],"enabled":[516],"errormessage":[1537],"precision":[8],"prettyprecision":[8]}]);
|
|
5415
5416
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoclose":[516],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxwidth":[513],"isOpened":[1540,"is-opened"]}]);
|
|
5416
|
-
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"
|
|
5417
|
+
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"title":[1]}]);
|
|
5417
5418
|
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1040],"label":[1537],"enabled":[1540],"errormessage":[1537],"optionloader":[16],"showselectedvalue":[4],"showoptionvalue":[4]}]);
|
|
5418
5419
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedindex":[1537],"selectedtab":[1537],"tabs":[1]}]);
|
|
5419
5420
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errormessage":[1537],"rows":[1538]}]);
|
|
@@ -2536,8 +2536,9 @@ const Field = ({ dataUnit, field, forceScroll }) => {
|
|
|
2536
2536
|
}, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
2537
2537
|
case 'FILE':
|
|
2538
2538
|
var target = properties.find(prop => prop.name === 'URL').value;
|
|
2539
|
+
const token = localStorage.getItem('token');
|
|
2539
2540
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
|
|
2540
|
-
h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target })));
|
|
2541
|
+
h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target, headers: { 'Authorization': token } })));
|
|
2541
2542
|
case 'DATE':
|
|
2542
2543
|
return h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? h("place-holder", null) :
|
|
2543
2544
|
h("ez-date-input", { value: !value ? null : DateUtils.clearTime(value), label: formattedLabel, enabled: !readOnly, onEzChange: (event) => changeFieldHandler(event.target['value']), errormessage: errorMessage, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
@@ -3474,10 +3475,6 @@ let EzUpload = class {
|
|
|
3474
3475
|
this.initUploadEvent = createEvent(this, "initUploadEvent", 7);
|
|
3475
3476
|
this.finishedUploadEvent = createEvent(this, "finishedUploadEvent", 7);
|
|
3476
3477
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
3477
|
-
/**
|
|
3478
|
-
* Define a URL do servidor de destino
|
|
3479
|
-
*/
|
|
3480
|
-
this.target = "http://192.168.3.190:8080/2a3skw-graphql/uploadFiles";
|
|
3481
3478
|
/**
|
|
3482
3479
|
* Lista de arquivos que sera tráfegada entre cliente e servidor
|
|
3483
3480
|
*/
|
|
@@ -3488,11 +3485,17 @@ let EzUpload = class {
|
|
|
3488
3485
|
}
|
|
3489
3486
|
addFiles(files) {
|
|
3490
3487
|
Array.prototype.forEach.call(files, this.addFile.bind(this));
|
|
3491
|
-
console.log("Adicionou os arquivos");
|
|
3492
3488
|
}
|
|
3493
3489
|
addFile(file) {
|
|
3490
|
+
this.errorMessage = undefined;
|
|
3494
3491
|
if (this.validateFile(file)) {
|
|
3495
|
-
this.
|
|
3492
|
+
if (this.target) {
|
|
3493
|
+
this._uploadFile(file);
|
|
3494
|
+
}
|
|
3495
|
+
else {
|
|
3496
|
+
this.errorMessage = "Endereço de upload não informado";
|
|
3497
|
+
alert(this.errorMessage);
|
|
3498
|
+
}
|
|
3496
3499
|
}
|
|
3497
3500
|
else {
|
|
3498
3501
|
if (this.errorMessage && this.errorMessage.length > 0) {
|
|
@@ -3512,7 +3515,6 @@ let EzUpload = class {
|
|
|
3512
3515
|
}
|
|
3513
3516
|
_uploadFile(file) {
|
|
3514
3517
|
const xhr = (file.xhr = this._createXhr());
|
|
3515
|
-
console.log("iniciou o upload");
|
|
3516
3518
|
this.fileList.push({ name: file.name, size: file.size, xhr: file.xhr, strSize: this.formatBytes(file.size) });
|
|
3517
3519
|
let stalledId;
|
|
3518
3520
|
xhr.upload.onprogress = (e) => {
|
|
@@ -3576,7 +3578,6 @@ let EzUpload = class {
|
|
|
3576
3578
|
}
|
|
3577
3579
|
};
|
|
3578
3580
|
const formData = new FormData();
|
|
3579
|
-
console.log(typeof (file));
|
|
3580
3581
|
formData.append(this.formDataName, file, file.name);
|
|
3581
3582
|
xhr.open("POST", this.target, true);
|
|
3582
3583
|
this._configureXhr(xhr);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-89fc9bfd.js';
|
|
2
2
|
|
|
3
|
-
const ezPopupCss = ":host{display:flex;--popup-title--primary:var(--title--primary, #2b3a54);--popup-font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--popup-text-weight--large:var(--text-weight--large, 600);--popup-space--small:var(--space--small, 6px);--popup-space--medium:var(--space--medium, 12px);--popup-space--large:var(--space--large, 24px);--popup-error--background-color:var(--color--alert-error-800, #BD0025);--popup-warning--background-color:var(--color--alert-warning-500, #EFB103);--popup-text-weight--medium:var(--text-weight--medium, 400);--popup-text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--popup-text--medium:var(--text--medium, 14px);--popup-text--primary:var(--text--primary, #626e82);--popup-z-index:var(--most-visible, 3);--popup--trash__image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"16px\"><path d=\"M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z\"/></svg>');--popup--close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--popup-title--primary);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--popup-space--large)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:flex;flex-wrap:wrap}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;width:100%;display:flex;flex-wrap:wrap;max-height:
|
|
3
|
+
const ezPopupCss = ":host{display:flex;--popup-title--primary:var(--title--primary, #2b3a54);--popup-font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--popup-text-weight--large:var(--text-weight--large, 600);--popup-space--small:var(--space--small, 6px);--popup-space--medium:var(--space--medium, 12px);--popup-space--large:var(--space--large, 24px);--popup-error--background-color:var(--color--alert-error-800, #BD0025);--popup-warning--background-color:var(--color--alert-warning-500, #EFB103);--popup-text-weight--medium:var(--text-weight--medium, 400);--popup-text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--popup-text--medium:var(--text--medium, 14px);--popup-text--primary:var(--text--primary, #626e82);--popup-z-index:var(--most-visible, 3);--popup--trash__image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"16px\"><path d=\"M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z\"/></svg>');--popup--close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--popup-title--primary);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--popup-space--large)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:flex;flex-wrap:wrap}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;width:100%;display:flex;flex-wrap:wrap;max-height:80vh;content-visibility:auto}.popup__header{padding-bottom:var(--popup-space--large);width:100%;display:flex}.popup__title{width:100%}.dialog__error--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--popup-error--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--popup-warning--background-color)}.message{font-weight:var(--popup-text-weight--medium)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--popup-title--primary);width:12px;height:12px;-webkit-mask-image:var(--popup--close__image);mask-image:var(--popup--close__image)}.btn-close--solo{width:100%}.title{display:flex;font-family:var(--popup-font-pattern);margin:0;font-weight:var(--popup-text-weight--large);line-height:1.3}.title--large{font-size:var(--popup-title--large)}.title__container{display:flex;align-items:center;padding-bottom:var(--popup-space--medium);align-self:center}.title--label{padding-left:var(--popup-space--small)}.text{font-family:var(--popup-font-pattern);text-shadow:var(--popup-text-shadow)}.text--medium{font-size:var(--popup-text--medium)}.text--primary{color:var(--popup-text--primary);text-shadow:var(--popup-text-shadow)}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
4
4
|
|
|
5
5
|
let EzPopup = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -13,17 +13,17 @@ let EzPopup = class {
|
|
|
13
13
|
/**
|
|
14
14
|
* Controla a exibição do componente.
|
|
15
15
|
*/
|
|
16
|
-
this.
|
|
16
|
+
this.opened = false;
|
|
17
17
|
/**
|
|
18
18
|
* Define o componente utilizará um cabeçalho com botão de fechamento.
|
|
19
19
|
*/
|
|
20
20
|
this.useHeader = false;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
if (this.
|
|
23
|
+
if (this.opened) {
|
|
24
24
|
return (h(Host, null, h("div", { class: "overlay" }, h("div", { class: "popup col " + this.size }, h("div", { class: "popup__container" }, h("div", { class: "popup__content" }, h("div", { class: "popup__header" }, this.title ?
|
|
25
25
|
h("div", { class: "title popup__title" }, this.title)
|
|
26
|
-
: undefined, h("button", { class: this.title ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.
|
|
26
|
+
: undefined, h("button", { class: this.title ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezChange.emit("CANCEL"); } })), h("div", { class: "popup__expandable-content" }, h("slot", null))))))));
|
|
27
27
|
}
|
|
28
28
|
return null;
|
|
29
29
|
}
|
package/dist/esm/ezui.js
CHANGED
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"title":[1025],"handleButtonClick":[64]}]]],["ez-label-chip",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errormessage":[1537],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-modal",[[1,"ez-modal",{"modalsize":[1],"align":[1],"oppened":[4],"closeesc":[4],"closeoutsideclick":[4]}]]],["ez-number-input",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errormessage":[1537],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoclose":[516],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxwidth":[513],"isOpened":[1540,"is-opened"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"
|
|
16
|
+
return bootstrapLazy([["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"title":[1025],"handleButtonClick":[64]}]]],["ez-label-chip",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errormessage":[1537],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-modal",[[1,"ez-modal",{"modalsize":[1],"align":[1],"oppened":[4],"closeesc":[4],"closeoutsideclick":[4]}]]],["ez-number-input",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errormessage":[1537],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoclose":[516],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxwidth":[513],"isOpened":[1540,"is-opened"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"title":[1]}]]],["ez-button_16",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"validate":[64],"getChanges":[64],"changeFieldValue":[64]}],[1,"form-metadata",{"name":[1],"label":[1],"dataunit":[1025],"many":[4],"autoload":[4],"metadata":[1040]}],[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errormessage":[1537]}],[1,"ez-search",{"value":[1040],"label":[1537],"enabled":[1540],"errormessage":[1537],"optionloader":[16],"showselectedvalue":[4],"showoptionvalue":[4]}],[1,"ez-numeric-input",{"label":[513],"value":[1538],"enabled":[516],"errormessage":[1537],"precision":[8],"prettyprecision":[8]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-collapsable-box",{"value":[1540],"label":[513],"showHide":[64]}],[1,"ez-tabselector",{"selectedindex":[1537],"selectedtab":[1537],"tabs":[1]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errormessage":[1537],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"maxFileSize":[514,"max-file-size"],"headers":[16],"timeout":[514],"withCredentials":[516,"with-credentials"],"formDataName":[513,"form-data-name"],"target":[513],"fileList":[32],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1040],"label":[513],"enabled":[516],"options":[1040],"errormessage":[1537],"searchmode":[4],"showselectedvalue":[4],"showoptionvalue":[4],"optionloader":[16],"_preSelection":[32],"_visibleOptions":[32]}],[1,"ez-calendar",{"value":[1040],"floating":[516],"show":[64],"hide":[64]}],[1,"ez-icon",{"size":[513],"href":[513]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errormessage":[1537],"onlynumber":[516],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]]], options);
|
|
17
17
|
});
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"title":[1025],"handleButtonClick":[64]}]]],["ez-label-chip",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errormessage":[1537],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-modal",[[1,"ez-modal",{"modalsize":[1],"align":[1],"oppened":[4],"closeesc":[4],"closeoutsideclick":[4]}]]],["ez-number-input",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errormessage":[1537],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoclose":[516],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxwidth":[513],"isOpened":[1540,"is-opened"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"
|
|
13
|
+
return bootstrapLazy([["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"title":[1025],"handleButtonClick":[64]}]]],["ez-label-chip",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errormessage":[1537],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-modal",[[1,"ez-modal",{"modalsize":[1],"align":[1],"oppened":[4],"closeesc":[4],"closeoutsideclick":[4]}]]],["ez-number-input",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errormessage":[1537],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoclose":[516],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxwidth":[513],"isOpened":[1540,"is-opened"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"title":[1]}]]],["ez-button_16",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"validate":[64],"getChanges":[64],"changeFieldValue":[64]}],[1,"form-metadata",{"name":[1],"label":[1],"dataunit":[1025],"many":[4],"autoload":[4],"metadata":[1040]}],[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errormessage":[1537]}],[1,"ez-search",{"value":[1040],"label":[1537],"enabled":[1540],"errormessage":[1537],"optionloader":[16],"showselectedvalue":[4],"showoptionvalue":[4]}],[1,"ez-numeric-input",{"label":[513],"value":[1538],"enabled":[516],"errormessage":[1537],"precision":[8],"prettyprecision":[8]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-collapsable-box",{"value":[1540],"label":[513],"showHide":[64]}],[1,"ez-tabselector",{"selectedindex":[1537],"selectedtab":[1537],"tabs":[1]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errormessage":[1537],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"maxFileSize":[514,"max-file-size"],"headers":[16],"timeout":[514],"withCredentials":[516,"with-credentials"],"formDataName":[513,"form-data-name"],"target":[513],"fileList":[32],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1040],"label":[513],"enabled":[516],"options":[1040],"errormessage":[1537],"searchmode":[4],"showselectedvalue":[4],"showoptionvalue":[4],"optionloader":[16],"_preSelection":[32],"_visibleOptions":[32]}],[1,"ez-calendar",{"value":[1040],"floating":[516],"show":[64],"hide":[64]}],[1,"ez-icon",{"size":[513],"href":[513]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errormessage":[1537],"onlynumber":[516],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|