@sankhyalabs/ezui 1.1.43 → 1.1.47
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 +48 -14
- package/dist/cjs/ez-modal.cjs.entry.js +1 -5
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-calendar/ez-calendar.js +33 -0
- package/dist/collection/components/ez-date-input/ez-date-input.js +4 -3
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +1 -1
- package/dist/collection/components/ez-icon/ez-icon.js +10 -3
- package/dist/collection/components/ez-modal/ez-modal.js +1 -5
- package/dist/collection/components/ez-text-input/ez-text-input.css +1 -0
- package/dist/collection/components/ez-upload/ez-upload.css +19 -0
- package/dist/collection/components/ez-upload/ez-upload.js +28 -13
- package/dist/custom-elements/index.js +49 -19
- package/dist/esm/ez-button_16.entry.js +48 -14
- package/dist/esm/ez-modal.entry.js +1 -5
- 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-2fb1b3fd.entry.js +1 -0
- package/dist/ezui/p-b4b43048.entry.js +1 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +2 -0
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -0
- package/dist/types/components/ez-icon/ez-icon.d.ts +1 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +0 -1
- package/dist/types/components/ez-upload/ez-upload.d.ts +1 -0
- package/dist/types/components.d.ts +1 -0
- package/package.json +1 -1
- package/dist/ezui/p-06c7c4e3.entry.js +0 -1
- package/dist/ezui/p-c12beec1.entry.js +0 -1
|
@@ -127,6 +127,16 @@ let EzCalendar = class {
|
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
+
async fitVertical(topOffset, bottomOffset) {
|
|
131
|
+
const neededHeight = this._container.getBoundingClientRect().bottom + this._calendarHeight;
|
|
132
|
+
const availableBottom = (window.innerHeight || document.documentElement.clientHeight) > neededHeight;
|
|
133
|
+
if (availableBottom) {
|
|
134
|
+
this.show(topOffset + 'px', undefined, 'unset');
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
this.show('unset', undefined, bottomOffset + 'px');
|
|
138
|
+
}
|
|
139
|
+
}
|
|
130
140
|
/**
|
|
131
141
|
* Usado no modo floating. Faz com que o componente seja ocultado.
|
|
132
142
|
*/
|
|
@@ -161,6 +171,7 @@ let EzCalendar = class {
|
|
|
161
171
|
}
|
|
162
172
|
componentDidRender() {
|
|
163
173
|
if (this.floating && this._firstRender) {
|
|
174
|
+
this._calendarHeight = this._box.clientHeight;
|
|
164
175
|
this._box.remove();
|
|
165
176
|
this._firstRender = false;
|
|
166
177
|
}
|
|
@@ -564,8 +575,8 @@ let EzDateInput = class {
|
|
|
564
575
|
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
565
576
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
566
577
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
567
|
-
const top = this._textInput.errormessage ?
|
|
568
|
-
this._calendar.
|
|
578
|
+
const top = this._textInput.errormessage ? 0 : -17;
|
|
579
|
+
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
569
580
|
}
|
|
570
581
|
hideCalendar() {
|
|
571
582
|
this.changeValue(this._calendar.value);
|
|
@@ -595,6 +606,7 @@ let EzDateInput = class {
|
|
|
595
606
|
this.changeValue(new Date());
|
|
596
607
|
}, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errormessage: this.errormessage }, index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), index.h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
597
608
|
}
|
|
609
|
+
get _elem() { return index.getElement(this); }
|
|
598
610
|
static get watchers() { return {
|
|
599
611
|
"label": ["setLabel"],
|
|
600
612
|
"errormessage": ["setErrorMessage"],
|
|
@@ -2592,7 +2604,7 @@ const Field = ({ dataUnit, field, forceScroll, enabled }) => {
|
|
|
2592
2604
|
const strHeaders = getProp(properties, 'HEADERS');
|
|
2593
2605
|
const headers = strHeaders ? JSON.parse(strHeaders) : {};
|
|
2594
2606
|
const maxfiles = Number(getProp(properties, "maxfiles") || 0);
|
|
2595
|
-
return (index.h("div", { class: "col col--sd-12 padding--small" },
|
|
2607
|
+
return (index.h("div", { class: "col col--sd-12 padding--small" }, loadingData ? index.h("place-holder", null) :
|
|
2596
2608
|
index.h("ez-upload", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.detail), urlupload: target, requestheaders: headers, maxfiles: maxfiles })));
|
|
2597
2609
|
case 'DATE':
|
|
2598
2610
|
return index.h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? index.h("place-holder", null) :
|
|
@@ -2932,8 +2944,15 @@ let EzIcon = class {
|
|
|
2932
2944
|
/*Tamanho do icone*/
|
|
2933
2945
|
this.size = 'medium';
|
|
2934
2946
|
}
|
|
2947
|
+
isSprite() {
|
|
2948
|
+
return this.href && this.href.indexOf('#') > -1;
|
|
2949
|
+
}
|
|
2935
2950
|
render() {
|
|
2936
|
-
return (index.h(
|
|
2951
|
+
return (index.h(index.Host, null, this.isSprite()
|
|
2952
|
+
?
|
|
2953
|
+
index.h("svg", { class: this.size, role: "img" }, index.h("use", { xlinkHref: this.href }))
|
|
2954
|
+
:
|
|
2955
|
+
index.h("img", { class: this.size, src: this.href })));
|
|
2937
2956
|
}
|
|
2938
2957
|
};
|
|
2939
2958
|
EzIcon.style = ezIconCss;
|
|
@@ -3341,7 +3360,7 @@ function isValidNumber(strValue) {
|
|
|
3341
3360
|
return strValue && /^-?\d*[.,]?\d*$/.test(strValue);
|
|
3342
3361
|
}
|
|
3343
3362
|
|
|
3344
|
-
const ezTextInputCss = ":host{--it--height:42px;--it--width:100%;--it__icon--width:48px;--it--border-radius:var(--border--radius-medium, 12px);--it--font-size:var(--text--medium, 14px);--it--font-family:var(--font-pattern, Arial);--it--font-weight:var(--text-weight--large, 500);--it--color:var(--title--primary, #000);--it__input--background-color:var(--background--medium, #e0e0e0);--it__input--border:var(--border--medium, 2px solid);--it__input--border-color:var(--it__input--background-color);--it__input--focus--border-color:var(--color--primary, #008561);--it__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--it__input--disabled--color:var(--text--disable, #AFB6C0);--it__input--error--border-color:#CC2936;--it__message_box--font-size:var(--text--small, 12px);--it__message_box--info--color:var(--color--success, #22085d);--it__message_box--error--color:var(--color--error, #FF0000);--it__label--floating--top:6px;--it__label--padding-top:12px;--it__label--padding-left:14px;--it__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--it--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--it--height);border-radius:var(--it--border-radius);font-family:var(--it--font-family);font-size:var(--it--font-size);border:var(--it__input--border);border-color:var(--it__input--border-color);background-color:var(--it__input--background-color);color:var(--it--color)}input:disabled{background-color:var(--it__input--disabled--background-color);color:var(--it__input--disabled--color)}input:focus{outline:none;border-color:var(--it__input--focus--border-color)}input.icon--left{padding-left:var(--it__icon--width)}input.icon--right{padding-right:var(--it__icon--width)}input.hasError{color:var(--it--color);border-color:var(--it__input--error--border-color)}input.text--right{text-align:right}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--it--font-family);font-size:var(--it__message_box--font-size);color:var(--it__message_box--info--color)}.hasError{color:var(--it__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--it__label--padding-right));left:var(--it--space--medium);font-family:var(--it--font-family);font-size:var(--it--font-size);font-weight:var(--it--font-weight);color:var(--it--color);top:var(--it__label--padding-top);left:var(--it__label--padding-left);padding-right:var(--it__label--padding-right)}.input__label--floated{font-family:var(--it--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--it__label--floating--top)}.input__label--disabled{color:var(--it__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--it__icon--width) + 2px);width:calc(100% - var(--it__icon--width))}.input__label--right{right:var(--it__icon--width);width:calc(100% - var(--it__icon--width))}.input__label--left.input__label--right{left:calc(var(--it__icon--width) + 2px);width:calc(100% - var(--it__icon--width) * 2)}.input--with--label{padding-bottom:0}";
|
|
3363
|
+
const ezTextInputCss = ":host{--it--height:42px;--it--width:100%;--it__icon--width:48px;--it--border-radius:var(--border--radius-medium, 12px);--it--font-size:var(--text--medium, 14px);--it--font-family:var(--font-pattern, Arial);--it--font-weight:var(--text-weight--large, 500);--it--color:var(--title--primary, #000);--it__input--background-color:var(--background--medium, #e0e0e0);--it__input--border:var(--border--medium, 2px solid);--it__input--border-color:var(--it__input--background-color);--it__input--focus--border-color:var(--color--primary, #008561);--it__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--it__input--disabled--color:var(--text--disable, #AFB6C0);--it__input--error--border-color:#CC2936;--it__message_box--font-size:var(--text--small, 12px);--it__message_box--info--color:var(--color--success, #22085d);--it__message_box--error--color:var(--color--error, #FF0000);--it__label--floating--top:6px;--it__label--padding-top:12px;--it__label--padding-left:14px;--it__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--it--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--it--height);border-radius:var(--it--border-radius);font-family:var(--it--font-family);font-size:var(--it--font-size);border:var(--it__input--border);border-color:var(--it__input--border-color);background-color:var(--it__input--background-color);color:var(--it--color)}input:disabled{background-color:var(--it__input--disabled--background-color);color:var(--it__input--disabled--color)}input:focus{outline:none;border-color:var(--it__input--focus--border-color)}input.icon--left{padding-left:var(--it__icon--width)}input.icon--right{padding-right:var(--it__icon--width)}input.hasError{color:var(--it--color);border-color:var(--it__input--error--border-color)}input.text--right{text-align:right}.message-box{display:flex;min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--it--font-family);font-size:var(--it__message_box--font-size);color:var(--it__message_box--info--color)}.hasError{color:var(--it__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--it__label--padding-right));left:var(--it--space--medium);font-family:var(--it--font-family);font-size:var(--it--font-size);font-weight:var(--it--font-weight);color:var(--it--color);top:var(--it__label--padding-top);left:var(--it__label--padding-left);padding-right:var(--it__label--padding-right)}.input__label--floated{font-family:var(--it--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--it__label--floating--top)}.input__label--disabled{color:var(--it__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--it__icon--width) + 2px);width:calc(100% - var(--it__icon--width))}.input__label--right{right:var(--it__icon--width);width:calc(100% - var(--it__icon--width))}.input__label--left.input__label--right{left:calc(var(--it__icon--width) + 2px);width:calc(100% - var(--it__icon--width) * 2)}.input--with--label{padding-bottom:0}";
|
|
3345
3364
|
|
|
3346
3365
|
let EzTextInput = class {
|
|
3347
3366
|
constructor(hostRef) {
|
|
@@ -3622,7 +3641,7 @@ class RemoteFile {
|
|
|
3622
3641
|
}
|
|
3623
3642
|
}
|
|
3624
3643
|
|
|
3625
|
-
const ezUploadCss = ":host{--iu--height:42px;--iu--width:100%;--iu__icon--width:48px;--iu__container--background-color:var(--background--medium, #d2dce9);--iu__color--primary:var(--color--primary, #008561);--iu--padding--extra-small:var(--space--extra-small, 3px);--iu--padding--small:var(--space--small, 6px);--iu--padding--medium:var(--space--medium, 12px);--iu--padding--large:var(--space--large, 24px);--iu--border-radius:var(--border--radius-medium, 12px);--iu__border--color:var(--color-strokes, #DCE0E8);--iu__input--border:var(--border--medium, 2px solid);--iu--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--iu--text--primary:var(--text-primary, #626e82);--iu--font-size:var(--text--medium, 14px);--iu--font-family:var(--font-pattern, Arial);--iu--font-weight:var(--text-weight--large, 500);--iu__btn-cancel-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"8x\" width=\"8px\"><path d=\"M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z\"/></svg>');--iu__file-icon-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"11x\" width=\"9px\"><path d=\"M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z\"/></svg>');display:flex;flex-wrap:wrap;position:relative;font-family:var(--iu--font-family);font-size:var(--iu--font-size);width:var(--iu--width);font-weight:var(--iu--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--iu__container--background-color);padding:var(--iu--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--iu__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--iu--padding--medium) var(--iu--padding--medium) var(--iu--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--iu--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--iu__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--iu__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--iu__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--iu__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.text{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--iu--text--primary);text-shadow:var(--iu--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--iu__btn-cancel-image);mask-image:var(--iu__btn-cancel-image)}.iu__label{padding:var(--space--small);padding-top:0;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--iu--font-family);font-size:var(--text--extra-small);font-weight:var( --iu--font-weight);color:var(--iu--text--primary);text-shadow:var(--iu--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon::after{content:'';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--iu__file-icon-image);mask-image:var(--iu__file-icon-image)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;padding:var(--iu--padding--large) 0px;box-sizing:border-box}.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%}}";
|
|
3644
|
+
const ezUploadCss = ":host{--iu--height:42px;--iu--width:100%;--iu__icon--width:48px;--iu__container--background-color:var(--background--medium, #d2dce9);--iu__color--primary:var(--color--primary, #008561);--iu--padding--extra-small:var(--space--extra-small, 3px);--iu--padding--small:var(--space--small, 6px);--iu--padding--medium:var(--space--medium, 12px);--iu--padding--large:var(--space--large, 24px);--iu--border-radius:var(--border--radius-medium, 12px);--iu__border--color:var(--color-strokes, #DCE0E8);--iu__input--border:var(--border--medium, 2px solid);--iu--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--iu--text--primary:var(--text-primary, #626e82);--iu--font-size:var(--text--medium, 14px);--iu--font-family:var(--font-pattern, Arial);--iu--font-weight:var(--text-weight--large, 500);--iu__btn-cancel-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"8x\" width=\"8px\"><path d=\"M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z\"/></svg>');--iu__file-icon-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"11x\" width=\"9px\"><path d=\"M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z\"/></svg>');display:flex;flex-wrap:wrap;position:relative;font-family:var(--iu--font-family);font-size:var(--iu--font-size);width:var(--iu--width);font-weight:var(--iu--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--iu__container--background-color);padding:var(--iu--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--iu__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--iu--padding--medium) var(--iu--padding--medium) var(--iu--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--iu--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--iu__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--iu__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--iu__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--iu__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.text{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--iu--text--primary);text-shadow:var(--iu--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--iu__btn-cancel-image);mask-image:var(--iu__btn-cancel-image)}.iu__label{padding:var(--space--small);padding-top:0;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--iu--font-family);font-size:var(--text--extra-small);font-weight:var( --iu--font-weight);color:var(--iu--text--primary);text-shadow:var(--iu--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:'';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--iu__file-icon-image);mask-image:var(--iu__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;padding:var(--iu--padding--large) 0px;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:none}.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%}}";
|
|
3626
3645
|
|
|
3627
3646
|
let EzUpload = class {
|
|
3628
3647
|
constructor(hostRef) {
|
|
@@ -3786,15 +3805,17 @@ let EzUpload = class {
|
|
|
3786
3805
|
}
|
|
3787
3806
|
}
|
|
3788
3807
|
openFilesDialog() {
|
|
3789
|
-
if (this.
|
|
3790
|
-
this.
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3808
|
+
if (this.enabled) {
|
|
3809
|
+
if (this.maxfiles > 0 && this._filePointers.size >= this.maxfiles) {
|
|
3810
|
+
this.showError(`A quantidade máxima de arquivos é ${this.maxfiles}.`);
|
|
3811
|
+
}
|
|
3812
|
+
else {
|
|
3813
|
+
this._fileInput.click();
|
|
3814
|
+
}
|
|
3794
3815
|
}
|
|
3795
3816
|
}
|
|
3796
3817
|
componentDidLoad() {
|
|
3797
|
-
if (this._dropZone && window.FileList && window.File) {
|
|
3818
|
+
if (this.enabled && this._dropZone && window.FileList && window.File) {
|
|
3798
3819
|
this._dropZone.addEventListener('dragover', event => {
|
|
3799
3820
|
event.stopPropagation();
|
|
3800
3821
|
event.preventDefault();
|
|
@@ -3814,8 +3835,14 @@ let EzUpload = class {
|
|
|
3814
3835
|
}
|
|
3815
3836
|
}
|
|
3816
3837
|
}
|
|
3838
|
+
/*
|
|
3839
|
+
background--disabled
|
|
3840
|
+
text--disabled
|
|
3841
|
+
fill--disabled
|
|
3842
|
+
mouse-poiter--disabled
|
|
3843
|
+
*/
|
|
3817
3844
|
render() {
|
|
3818
|
-
return (index.h("div", { ref: (el) => this._dropZone = el, class:
|
|
3845
|
+
return (index.h("div", { ref: (el) => this._dropZone = el, class: this.evalDisabledClass('iu', 'background--disabled') }, this.label ? index.h("label", { class: this.evalDisabledClass('iu__label', 'text--disabled'), title: this.label }, this.label) : null, index.h("div", { class: "iu__container", onClick: () => this.openFilesDialog() }, index.h("div", { class: this.evalDisabledClass('iu__icon-label', 'mouse-pointer--disabled') }, index.h("button", { class: "iu__file-icon", disabled: !this.enabled }), index.h("div", { class: this.evalDisabledClass('text text--center text--medium text--primary', 'text--disabled') }, this.enabled ? 'Arraste e solte ou clique para adicionar arquivos' : 'Somente leitura')), this.buildFooter()), index.h("input", { ref: (el) => this._fileInput = el, onChange: (ev) => this.onFileInputChange(ev), type: "file", multiple: true, hidden: true })));
|
|
3819
3846
|
}
|
|
3820
3847
|
buildFooter() {
|
|
3821
3848
|
if (this._filePointers.size === 0) {
|
|
@@ -3834,7 +3861,14 @@ let EzUpload = class {
|
|
|
3834
3861
|
?
|
|
3835
3862
|
null
|
|
3836
3863
|
:
|
|
3837
|
-
index.h("div", { class: "col col--sd-4 col--stretch align--middle" }, index.h("progress", { id: this.buildProgressId(item), value: progress, max: "100" })),
|
|
3864
|
+
index.h("div", { class: "col col--sd-4 col--stretch align--middle" }, index.h("progress", { id: this.buildProgressId(item), value: progress, max: "100" })), this.enabled
|
|
3865
|
+
?
|
|
3866
|
+
index.h("div", { class: "col col--stretch align--middle" }, index.h("button", { class: "btn-cancel ", onClick: () => this.removeFile(fileName) }))
|
|
3867
|
+
:
|
|
3868
|
+
null));
|
|
3869
|
+
}
|
|
3870
|
+
evalDisabledClass(regularClasses, disabledClass) {
|
|
3871
|
+
return this.enabled ? regularClasses : `${regularClasses} ${disabledClass}`;
|
|
3838
3872
|
}
|
|
3839
3873
|
get _host() { return index.getElement(this); }
|
|
3840
3874
|
static get watchers() { return {
|
|
@@ -100,16 +100,12 @@ let EzModal = class {
|
|
|
100
100
|
this.closeModal();
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
onWeelHandler(event) {
|
|
104
|
-
event.stopPropagation();
|
|
105
|
-
event.preventDefault();
|
|
106
|
-
}
|
|
107
103
|
//Ainda teremos ajustes visuais
|
|
108
104
|
render() {
|
|
109
105
|
const positionSufix = this.align === "left" ? "left" : "right";
|
|
110
106
|
return (index.h(index.Host, null, this.oppened
|
|
111
107
|
?
|
|
112
|
-
index.h("div", { class: 'modal', onMouseDown: evt => this.onMouseDownHandler(evt)
|
|
108
|
+
index.h("div", { class: 'modal', onMouseDown: evt => this.onMouseDownHandler(evt) }, index.h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, index.h("div", { class: `modal__content modal__content--${positionSufix} ${this.modalsize}` }, index.h("slot", null))))
|
|
113
109
|
:
|
|
114
110
|
undefined));
|
|
115
111
|
}
|
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"],"ezTitle":[1025,"ez-title"],"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"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-button_16.cjs",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"enabled":[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":[1537],"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",{"label":[1],"enabled":[4],"maxfilesize":[2],"maxfiles":[2],"requestheaders":[8],"urlupload":[1],"urldelete":[1],"value":[1040],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1537],"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
|
+
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"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"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-button_16.cjs",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"enabled":[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":[1537],"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",{"label":[1],"enabled":[4],"maxfilesize":[2],"maxfiles":[2],"requestheaders":[8],"urlupload":[1],"urldelete":[1],"value":[1040],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1537],"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],"fitVertical":[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"],"ezTitle":[1025,"ez-title"],"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"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-button_16.cjs",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"enabled":[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":[1537],"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",{"label":[1],"enabled":[4],"maxfilesize":[2],"maxfiles":[2],"requestheaders":[8],"urlupload":[1],"urldelete":[1],"value":[1040],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1537],"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
|
+
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"oppened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"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"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-button_16.cjs",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"enabled":[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":[1537],"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",{"label":[1],"enabled":[4],"maxfilesize":[2],"maxfiles":[2],"requestheaders":[8],"urlupload":[1],"urldelete":[1],"value":[1040],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1537],"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],"fitVertical":[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
|
|
|
@@ -30,6 +30,16 @@ export class EzCalendar {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
async fitVertical(topOffset, bottomOffset) {
|
|
34
|
+
const neededHeight = this._container.getBoundingClientRect().bottom + this._calendarHeight;
|
|
35
|
+
const availableBottom = (window.innerHeight || document.documentElement.clientHeight) > neededHeight;
|
|
36
|
+
if (availableBottom) {
|
|
37
|
+
this.show(topOffset + 'px', undefined, 'unset');
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.show('unset', undefined, bottomOffset + 'px');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
33
43
|
/**
|
|
34
44
|
* Usado no modo floating. Faz com que o componente seja ocultado.
|
|
35
45
|
*/
|
|
@@ -64,6 +74,7 @@ export class EzCalendar {
|
|
|
64
74
|
}
|
|
65
75
|
componentDidRender() {
|
|
66
76
|
if (this.floating && this._firstRender) {
|
|
77
|
+
this._calendarHeight = this._box.clientHeight;
|
|
67
78
|
this._box.remove();
|
|
68
79
|
this._firstRender = false;
|
|
69
80
|
}
|
|
@@ -194,6 +205,28 @@ export class EzCalendar {
|
|
|
194
205
|
"tags": []
|
|
195
206
|
}
|
|
196
207
|
},
|
|
208
|
+
"fitVertical": {
|
|
209
|
+
"complexType": {
|
|
210
|
+
"signature": "(topOffset: number, bottomOffset: number) => Promise<void>",
|
|
211
|
+
"parameters": [{
|
|
212
|
+
"tags": [],
|
|
213
|
+
"text": ""
|
|
214
|
+
}, {
|
|
215
|
+
"tags": [],
|
|
216
|
+
"text": ""
|
|
217
|
+
}],
|
|
218
|
+
"references": {
|
|
219
|
+
"Promise": {
|
|
220
|
+
"location": "global"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"return": "Promise<void>"
|
|
224
|
+
},
|
|
225
|
+
"docs": {
|
|
226
|
+
"text": "",
|
|
227
|
+
"tags": []
|
|
228
|
+
}
|
|
229
|
+
},
|
|
197
230
|
"hide": {
|
|
198
231
|
"complexType": {
|
|
199
232
|
"signature": "() => Promise<void>",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, Watch, Event } from '@stencil/core';
|
|
1
|
+
import { Component, Element, Host, h, Prop, Watch, Event } from '@stencil/core';
|
|
2
2
|
import { DateUtils } from '@sankhyalabs/core';
|
|
3
3
|
export class EzDateInput {
|
|
4
4
|
constructor() {
|
|
@@ -30,8 +30,8 @@ export class EzDateInput {
|
|
|
30
30
|
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
31
31
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
32
32
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
33
|
-
const top = this._textInput.errormessage ?
|
|
34
|
-
this._calendar.
|
|
33
|
+
const top = this._textInput.errormessage ? 0 : -17;
|
|
34
|
+
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
35
35
|
}
|
|
36
36
|
hideCalendar() {
|
|
37
37
|
this.changeValue(this._calendar.value);
|
|
@@ -159,6 +159,7 @@ export class EzDateInput {
|
|
|
159
159
|
"references": {}
|
|
160
160
|
}
|
|
161
161
|
}]; }
|
|
162
|
+
static get elementRef() { return "_elem"; }
|
|
162
163
|
static get watchers() { return [{
|
|
163
164
|
"propName": "label",
|
|
164
165
|
"methodName": "setLabel"
|
|
@@ -68,7 +68,7 @@ export const Field = ({ dataUnit, field, forceScroll, enabled }) => {
|
|
|
68
68
|
const strHeaders = getProp(properties, 'HEADERS');
|
|
69
69
|
const headers = strHeaders ? JSON.parse(strHeaders) : {};
|
|
70
70
|
const maxfiles = Number(getProp(properties, "maxfiles") || 0);
|
|
71
|
-
return (h("div", { class: "col col--sd-12 padding--small" },
|
|
71
|
+
return (h("div", { class: "col col--sd-12 padding--small" }, loadingData ? h("place-holder", null) :
|
|
72
72
|
h("ez-upload", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.detail), urlupload: target, requestheaders: headers, maxfiles: maxfiles })));
|
|
73
73
|
case 'DATE':
|
|
74
74
|
return h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? h("place-holder", null) :
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import { Component, h, Prop } from '@stencil/core';
|
|
1
|
+
import { Component, h, Host, Prop } from '@stencil/core';
|
|
2
2
|
export class EzIcon {
|
|
3
3
|
constructor() {
|
|
4
4
|
/*Tamanho do icone*/
|
|
5
5
|
this.size = 'medium';
|
|
6
6
|
}
|
|
7
|
+
isSprite() {
|
|
8
|
+
return this.href && this.href.indexOf('#') > -1;
|
|
9
|
+
}
|
|
7
10
|
render() {
|
|
8
|
-
return (h(
|
|
9
|
-
|
|
11
|
+
return (h(Host, null, this.isSprite()
|
|
12
|
+
?
|
|
13
|
+
h("svg", { class: this.size, role: "img" },
|
|
14
|
+
h("use", { xlinkHref: this.href }))
|
|
15
|
+
:
|
|
16
|
+
h("img", { class: this.size, src: this.href })));
|
|
10
17
|
}
|
|
11
18
|
static get is() { return "ez-icon"; }
|
|
12
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -91,16 +91,12 @@ export class EzModal {
|
|
|
91
91
|
this.closeModal();
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
onWeelHandler(event) {
|
|
95
|
-
event.stopPropagation();
|
|
96
|
-
event.preventDefault();
|
|
97
|
-
}
|
|
98
94
|
//Ainda teremos ajustes visuais
|
|
99
95
|
render() {
|
|
100
96
|
const positionSufix = this.align === "left" ? "left" : "right";
|
|
101
97
|
return (h(Host, null, this.oppened
|
|
102
98
|
?
|
|
103
|
-
h("div", { class: 'modal', onMouseDown: evt => this.onMouseDownHandler(evt)
|
|
99
|
+
h("div", { class: 'modal', onMouseDown: evt => this.onMouseDownHandler(evt) },
|
|
104
100
|
h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref },
|
|
105
101
|
h("div", { class: `modal__content modal__content--${positionSufix} ${this.modalsize}` },
|
|
106
102
|
h("slot", null))))
|
|
@@ -225,6 +225,9 @@ progress[value]::-webkit-progress-value {
|
|
|
225
225
|
background-color: unset;
|
|
226
226
|
cursor: pointer;
|
|
227
227
|
}
|
|
228
|
+
.iu__file-icon:disabled {
|
|
229
|
+
cursor: unset;
|
|
230
|
+
}
|
|
228
231
|
|
|
229
232
|
.iu__file-icon::after {
|
|
230
233
|
content: '';
|
|
@@ -235,6 +238,9 @@ progress[value]::-webkit-progress-value {
|
|
|
235
238
|
-webkit-mask-image: var(--iu__file-icon-image);
|
|
236
239
|
mask-image: var(--iu__file-icon-image);
|
|
237
240
|
}
|
|
241
|
+
.iu__file-icon:disabled::after {
|
|
242
|
+
background-color: var(--text--disable, #AFB6C0);
|
|
243
|
+
}
|
|
238
244
|
|
|
239
245
|
.iu__icon-label {
|
|
240
246
|
justify-content: center;
|
|
@@ -244,6 +250,19 @@ progress[value]::-webkit-progress-value {
|
|
|
244
250
|
box-sizing: border-box;
|
|
245
251
|
}
|
|
246
252
|
|
|
253
|
+
.background--disabled {
|
|
254
|
+
background-color: var(--color--disable-secondary, #F2F5F8);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.text--disabled{
|
|
258
|
+
color: var(--text--disable, #AFB6C0);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.mouse-pointer--disabled{
|
|
262
|
+
cursor: none;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
|
|
247
266
|
/* //////// GRID SYSTEM //////// */
|
|
248
267
|
|
|
249
268
|
.row {
|
|
@@ -161,15 +161,17 @@ export class EzUpload {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
openFilesDialog() {
|
|
164
|
-
if (this.
|
|
165
|
-
this.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
164
|
+
if (this.enabled) {
|
|
165
|
+
if (this.maxfiles > 0 && this._filePointers.size >= this.maxfiles) {
|
|
166
|
+
this.showError(`A quantidade máxima de arquivos é ${this.maxfiles}.`);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
this._fileInput.click();
|
|
170
|
+
}
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
173
|
componentDidLoad() {
|
|
172
|
-
if (this._dropZone && window.FileList && window.File) {
|
|
174
|
+
if (this.enabled && this._dropZone && window.FileList && window.File) {
|
|
173
175
|
this._dropZone.addEventListener('dragover', event => {
|
|
174
176
|
event.stopPropagation();
|
|
175
177
|
event.preventDefault();
|
|
@@ -189,13 +191,19 @@ export class EzUpload {
|
|
|
189
191
|
}
|
|
190
192
|
}
|
|
191
193
|
}
|
|
194
|
+
/*
|
|
195
|
+
background--disabled
|
|
196
|
+
text--disabled
|
|
197
|
+
fill--disabled
|
|
198
|
+
mouse-poiter--disabled
|
|
199
|
+
*/
|
|
192
200
|
render() {
|
|
193
|
-
return (h("div", { ref: (el) => this._dropZone = el, class:
|
|
194
|
-
this.label ? h("label", { class:
|
|
201
|
+
return (h("div", { ref: (el) => this._dropZone = el, class: this.evalDisabledClass('iu', 'background--disabled') },
|
|
202
|
+
this.label ? h("label", { class: this.evalDisabledClass('iu__label', 'text--disabled'), title: this.label }, this.label) : null,
|
|
195
203
|
h("div", { class: "iu__container", onClick: () => this.openFilesDialog() },
|
|
196
|
-
h("div", { class:
|
|
197
|
-
h("button", { class: "iu__file-icon" }),
|
|
198
|
-
h("div", { class:
|
|
204
|
+
h("div", { class: this.evalDisabledClass('iu__icon-label', 'mouse-pointer--disabled') },
|
|
205
|
+
h("button", { class: "iu__file-icon", disabled: !this.enabled }),
|
|
206
|
+
h("div", { class: this.evalDisabledClass('text text--center text--medium text--primary', 'text--disabled') }, this.enabled ? 'Arraste e solte ou clique para adicionar arquivos' : 'Somente leitura')),
|
|
199
207
|
this.buildFooter()),
|
|
200
208
|
h("input", { ref: (el) => this._fileInput = el, onChange: (ev) => this.onFileInputChange(ev), type: "file", multiple: true, hidden: true })));
|
|
201
209
|
}
|
|
@@ -221,8 +229,15 @@ export class EzUpload {
|
|
|
221
229
|
:
|
|
222
230
|
h("div", { class: "col col--sd-4 col--stretch align--middle" },
|
|
223
231
|
h("progress", { id: this.buildProgressId(item), value: progress, max: "100" })),
|
|
224
|
-
|
|
225
|
-
|
|
232
|
+
this.enabled
|
|
233
|
+
?
|
|
234
|
+
h("div", { class: "col col--stretch align--middle" },
|
|
235
|
+
h("button", { class: "btn-cancel ", onClick: () => this.removeFile(fileName) }))
|
|
236
|
+
:
|
|
237
|
+
null));
|
|
238
|
+
}
|
|
239
|
+
evalDisabledClass(regularClasses, disabledClass) {
|
|
240
|
+
return this.enabled ? regularClasses : `${regularClasses} ${disabledClass}`;
|
|
226
241
|
}
|
|
227
242
|
static get is() { return "ez-upload"; }
|
|
228
243
|
static get encapsulation() { return "shadow"; }
|