@sankhyalabs/ezui 1.1.72 → 1.1.75
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-action-chip.cjs.entry.js +2 -2
- package/dist/cjs/ez-button_16.cjs.entry.js +54 -48
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-label-chip.cjs.entry.js +12 -12
- package/dist/cjs/ez-list.cjs.entry.js +174 -0
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-toast.cjs.entry.js +5 -2
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/{index-bb6cdd1a.js → index-4d2896bb.js} +5 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-action-chip/ez-action-chip.css +21 -21
- package/dist/collection/components/ez-action-chip/ez-action-chip.js +1 -1
- package/dist/collection/components/ez-calendar/ez-calendar.css +64 -64
- package/dist/collection/components/ez-calendar/ez-calendar.js +12 -9
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +2 -2
- package/dist/collection/components/ez-label-chip/ez-label-chip.css +49 -49
- package/dist/collection/components/ez-label-chip/ez-label-chip.js +11 -11
- package/dist/collection/components/ez-list/ez-list.css +131 -0
- package/dist/collection/components/ez-list/ez-list.js +252 -0
- package/dist/collection/components/ez-search/ez-search.js +9 -9
- package/dist/collection/components/ez-text-area/ez-text-area.css +48 -48
- package/dist/collection/components/ez-time-input/ez-time-input.js +1 -1
- package/dist/collection/components/ez-toast/ez-toast.css +9 -9
- package/dist/collection/components/ez-toast/ez-toast.js +4 -1
- package/dist/collection/components/ez-upload/ez-upload.css +41 -41
- package/dist/collection/components/ez-upload/ez-upload.js +53 -50
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +244 -64
- package/dist/esm/ez-action-chip.entry.js +2 -2
- package/dist/esm/ez-button_16.entry.js +54 -48
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-label-chip.entry.js +12 -12
- package/dist/esm/ez-list.entry.js +170 -0
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ez-toast.entry.js +5 -2
- package/dist/esm/ezui.js +2 -2
- package/dist/esm/{index-989e6e7d.js → index-33153059.js} +5 -1
- package/dist/esm/loader.js +2 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-061d21ba.entry.js +1 -0
- package/dist/ezui/p-0d476efb.entry.js +1 -0
- package/dist/ezui/{p-55003571.entry.js → p-15743b09.entry.js} +1 -1
- package/dist/ezui/p-34d288d0.entry.js +1 -0
- package/dist/ezui/{p-d01bcce1.entry.js → p-46d07e59.entry.js} +1 -1
- package/dist/ezui/p-47406a6e.entry.js +1 -0
- package/dist/ezui/{p-384f89f7.js → p-4df6f855.js} +1 -1
- package/dist/ezui/{p-edcc9e6f.entry.js → p-50464bdf.entry.js} +1 -1
- package/dist/ezui/{p-65ea9879.entry.js → p-67410dfa.entry.js} +1 -1
- package/dist/ezui/p-7be54779.entry.js +1 -0
- package/dist/ezui/{p-e2533df1.entry.js → p-7f3bc6d9.entry.js} +1 -1
- package/dist/ezui/{p-a6a87bc5.entry.js → p-8818da66.entry.js} +1 -1
- package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +2 -2
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +4 -1
- package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +2 -2
- package/dist/types/components/ez-list/ez-list.d.ts +34 -0
- package/dist/types/components/ez-search/ez-search.d.ts +5 -5
- package/dist/types/components/ez-toast/ez-toast.d.ts +3 -0
- package/dist/types/components/ez-upload/ez-upload.d.ts +10 -7
- package/dist/types/components.d.ts +71 -20
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-5c5ba099.entry.js +0 -1
- package/dist/ezui/p-889030b3.entry.js +0 -1
- package/dist/ezui/p-8b945611.entry.js +0 -1
- package/dist/ezui/p-f8f92f68.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createEvent, h, forceUpdate, Host, getAssetPath, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
3
|
|
|
4
|
-
const ezActionChipCss = ":host{--
|
|
4
|
+
const ezActionChipCss = ":host{--ez-action-chip--height:36px;--ez-action-chip--border-radius:var(--border--radius-large, 24px);--ez-action-chip__border:1px solid;--ez-action-chip__border-color-strokes:var(--color--strokes, #DCE0E8);--ez-action-chip--font-size:var(--text--medium, 14px);--ez-action-chip--font-family:var(--font-pattern, Arial);--ez-action-chip--font-weight:var(--text-weight--large, 500);--ez-action-chip__label--title--primary:var(--title--primary, #919191);--ez-action-chip__label-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-action-chip__label__default--background-color--hover:var(--color--primary-200, #f2faf8);--ez-action-chip__label__default--border-color--hover:var(--color--primary-600, #007a5a)}.label__container{width:fit-content;display:flex;flex-wrap:wrap;position:relative;background-color:#FFFFFF;align-items:center;align-self:center;cursor:pointer;color:var(--ez-action-chip__label--title--primary);fill:var(--ez-action-chip__label--title--primary);border:var(--ez-action-chip__border);border-radius:var(--ez-action-chip--border-radius);border-color:var(--ez-action-chip__border-color-strokes);padding-right:var(--space--medium, 12px);padding-left:var(--space--medium, 12px)}.label__container:hover{border-color:var(--ez-action-chip__label__default--border-color--hover);background-color:var(--ez-action-chip__label__default--background-color--hover)}label{display:flex;align-items:center;font-weight:var(--text-weight--large, 600);cursor:pointer;height:var(--ez-action-chip--height);font-family:var(--ez-action-chip--font-family);font-size:var(--ez-action-chip--font-size)}";
|
|
5
5
|
|
|
6
6
|
let EzLabelChip$2 = class extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -764,7 +764,7 @@ var Method;
|
|
|
764
764
|
Method[Method["DELETE"] = 3] = "DELETE";
|
|
765
765
|
})(Method || (Method = {}));
|
|
766
766
|
|
|
767
|
-
const ezCalendarCss = ":host{--
|
|
767
|
+
const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__body--padding:var(--space--medium, 12px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-calendar__header-line--stroke:2px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px var(--space--small, 12px);--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:var(--space--extra-small, 3px) 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--strokes, #C0C0C0);--ez-calendar__cell--outset--color:var(--color--strokes, #C0C0C0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--strokes, #C0C0C0);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--medium, 12px);margin:var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--large, 600);font-size:var(--title--medium, 16px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--small, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__body{padding:var(--space--small, 6px) 0px}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--small);padding:var(--space--extra-small, 6px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}";
|
|
768
768
|
|
|
769
769
|
let EzCalendar$1 = class extends HTMLElement {
|
|
770
770
|
constructor() {
|
|
@@ -773,9 +773,9 @@ let EzCalendar$1 = class extends HTMLElement {
|
|
|
773
773
|
this.__attachShadow();
|
|
774
774
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
775
775
|
this._firstRender = true;
|
|
776
|
-
this._todayLabel =
|
|
777
|
-
this._weekDayLabels = [
|
|
778
|
-
this._monthLabels = [
|
|
776
|
+
this._todayLabel = "Hoje";
|
|
777
|
+
this._weekDayLabels = ["D", "S", "T", "Q", "Q", "S", "S"];
|
|
778
|
+
this._monthLabels = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
|
779
779
|
/**
|
|
780
780
|
* A data selecionada no calendário
|
|
781
781
|
*/
|
|
@@ -796,18 +796,21 @@ let EzCalendar$1 = class extends HTMLElement {
|
|
|
796
796
|
if (this.floating) {
|
|
797
797
|
this._floatingID = FloatingManager.float(this._box, this._container, { autoClose: true, top, left, bottom, right });
|
|
798
798
|
window.requestAnimationFrame(() => {
|
|
799
|
-
this._box.scrollIntoView({ behavior:
|
|
799
|
+
this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
|
+
/**
|
|
804
|
+
* Método necessário para ajustar o posicionamento do calendar acima ou abaixo do ez-date-input conforme a disponibilidade de espaço.
|
|
805
|
+
*/
|
|
803
806
|
async fitVertical(topOffset, bottomOffset) {
|
|
804
807
|
const neededHeight = this._container.getBoundingClientRect().bottom + this._calendarHeight;
|
|
805
808
|
const availableBottom = (window.innerHeight || document.documentElement.clientHeight) > neededHeight;
|
|
806
809
|
if (availableBottom) {
|
|
807
|
-
this.show(topOffset +
|
|
810
|
+
this.show(topOffset + "px", undefined, "unset");
|
|
808
811
|
}
|
|
809
812
|
else {
|
|
810
|
-
this.show(
|
|
813
|
+
this.show("unset", undefined, bottomOffset + "px");
|
|
811
814
|
}
|
|
812
815
|
}
|
|
813
816
|
/**
|
|
@@ -3398,7 +3401,7 @@ const Field = ({ dataUnit, field, forceScroll, enabled }) => {
|
|
|
3398
3401
|
context['CRITERIA'] = criteriaList;
|
|
3399
3402
|
}
|
|
3400
3403
|
return h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? h("place-holder", null) :
|
|
3401
|
-
h("ez-search", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.target['value']), errorMessage: errorMessage,
|
|
3404
|
+
h("ez-search", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.target['value']), errorMessage: errorMessage, optionLoader: (argument) => {
|
|
3402
3405
|
if (form) {
|
|
3403
3406
|
return form.loadSearch(argument, context);
|
|
3404
3407
|
}
|
|
@@ -3409,7 +3412,7 @@ const Field = ({ dataUnit, field, forceScroll, enabled }) => {
|
|
|
3409
3412
|
const headers = strHeaders ? JSON.parse(strHeaders) : {};
|
|
3410
3413
|
const maxfiles = Number(getProp(properties, "maxfiles") || 0);
|
|
3411
3414
|
return (h("div", { class: "col col--sd-12 padding--small" }, loadingData ? h("place-holder", null) :
|
|
3412
|
-
h("ez-upload", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.detail),
|
|
3415
|
+
h("ez-upload", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.detail), urlUpload: target, requestHeaders: headers, maxFiles: maxfiles })));
|
|
3413
3416
|
case 'DATE':
|
|
3414
3417
|
return h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? h("place-holder", null) :
|
|
3415
3418
|
h("ez-date-input", { value: !value ? null : DateUtils.clearTime(value), label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.target['value']), errorMessage: errorMessage, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
@@ -3772,7 +3775,7 @@ let EzIcon$1 = class extends HTMLElement {
|
|
|
3772
3775
|
static get style() { return ezIconCss; }
|
|
3773
3776
|
};
|
|
3774
3777
|
|
|
3775
|
-
const ezLabelChipCss = ":host{--
|
|
3778
|
+
const ezLabelChipCss = ":host{--ez-label-chip--height:36px;--ez-label-chip__label--font-size:var(--text--medium, 14px);--ez-label-chip__label--font-family:var(--font-pattern, Arial);--ez-label-chip__label--font-weight:var(--text-weight--large, 600);--ez-label-chip__label--space--medium:var(--space--medium, 12px);--ez-label-chip__label--title--primary:var(--title--primary, #919191);--ez-label-chip__label__container--border-radius:var(--border--radius-large, 24px);--ez-label-chip__label__container--border:1px solid;--ez-label-chip__label__container--border-color-strokes:var(--color--strokes, #DCE0E8);--ez-label-chip__label__container--color-primary:var(--color--primary, #008561);--ez-label-chip__label__container-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-label-chip__label__container--background-color:#0085610F;--ez-label-chip__label__container--border-color:#0085610F;--ez-label-chip__label__container--default--border-color--hover:var(--color--primary-600, #007a5a);--ez-label-chip__label__container--default--background-color--hover:var(--color--primary-200, #f2faf8);--ez-label-chip__label__container--text--disabled:var(--text--disable, #AFB6C0);--ez-label-chip__btn__close--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"8\" viewBox=\"0 0 8 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 4.7098145,3.9968334 7.8535703,0.85318776 C 7.9473034,0.75946455 8,0.63233985 8,0.49978585 8,0.36723841 7.947304,0.24011361 7.8535703,0.14638378 7.7598354,0.05266059 7.6327257,6.48e-8 7.500152,6.48e-8 7.3676457,6.48e-8 7.2404691,0.0526608 7.1467354,0.14638378 L 4.00298,3.2900293 0.8591984,0.14638378 C 0.76546463,0.05266059 0.63834103,6.48e-8 0.50578123,6.48e-8 0.3732281,6.48e-8 0.24609783,0.05266059 0.15236397,0.14638378 0.05863012,0.24011361 0.00597395,0.36723841 0.00597395,0.49978585 c 0,0.132554 0.05265617,0.2596787 0.14639002,0.35340191 L 3.2961455,3.9968334 0.15236397,7.1411589 C 0.10466427,7.1872561 0.06663114,7.2424161 0.04046961,7.303371 0.01431473,7.3643212 5.6180845e-4,7.429943 1.6859246e-5,7.4962264 -5.2808998e-4,7.5625744 0.01214297,7.6283944 0.03729854,7.6897476 c 0.02514888,0.061416 0.06227604,0.1171794 0.1092096,0.1640783 0.0469402,0.046903 0.10274083,0.083936 0.16415749,0.1090508 0.0614166,0.025114 0.12721688,0.037703 0.19355667,0.037103 0.06634,-5.714e-4 0.13190027,-0.014457 0.19284393,-0.04064 0.0609507,-0.026246 0.11606474,-0.064351 0.16213217,-0.1120492 L 4.00298,4.7036374 7.1467354,7.8472967 c 0.093734,0.09373 0.2209103,0.1463572 0.3534166,0.1463572 0.1325737,0 0.2596834,-0.052623 0.3534183,-0.1463572 C 7.9473034,7.753567 8,7.6264624 8,7.493895 8,7.3613281 7.9473086,7.2342224 7.8535703,7.1404927 Z\"/></svg>')}.btn-close{align-items:flex-start;display:flex;outline:none;border:none;padding:0px 0px 0px 6px;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-label-chip__label__container--color-primary);width:8px;height:8px;-webkit-mask-image:var(--ez-label-chip__btn__close--image);mask-image:var(--ez-label-chip__btn__close--image)}.label__container{width:fit-content;display:flex;flex-wrap:wrap;position:relative;align-items:center;background-color:#FFFFFF;align-self:center;color:var(--ez-label-chip__label--title--primary);fill:var(--ez-label-chip__label--title--primary);border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);border-color:var(--ez-label-chip__label__container--border-color-strokes);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium)}.label__container:hover{border-color:var(--ez-label-chip__label__container--default--border-color--hover);background-color:var(--ez-label-chip__label__container--default--background-color--hover)}.label__container--active{width:fit-content;display:flex;flex-wrap:wrap;position:relative;align-items:center;align-self:center;border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium);fill:var(--ez-label-chip__label__container--color-primary);color:var(--ez-label-chip__label__container--color-primary);border-color:var(--ez-label-chip__label__container--border-color);background-color:var(--ez-label-chip__label__container--background-color)}.label__container--disabled{width:fit-content;display:flex;flex-wrap:wrap;position:relative;align-items:center;align-self:center;border:var(--ez-label-chip__label__container--border);border-color:var(--ez-label-chip__label__container-color--disable-secondary);border-radius:var(--ez-label-chip__label__container--border-radius);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);background-color:var(--ez-label-chip__label__container-color--disable-secondary)}label{display:flex;align-items:center;font-weight:var(--ez-label-chip__label--font-weight);cursor:pointer;height:var(--ez-label-chip--height);font-family:var(--ez-label-chip__label--font-family);font-size:var(--ez-label-chip__label--font-size)}.label__icon{display:flex;cursor:pointer}";
|
|
3776
3779
|
|
|
3777
3780
|
let EzLabelChip$1 = class extends HTMLElement {
|
|
3778
3781
|
constructor() {
|
|
@@ -3814,7 +3817,7 @@ let EzLabelChip$1 = class extends HTMLElement {
|
|
|
3814
3817
|
//---------------------------------------------
|
|
3815
3818
|
handleClick(ev) {
|
|
3816
3819
|
const target = ev.target;
|
|
3817
|
-
if (target.assignedSlot === null && !target.classList.contains(
|
|
3820
|
+
if (target.assignedSlot === null && !target.classList.contains("label__icon")) {
|
|
3818
3821
|
this.valueChange.emit(this.value);
|
|
3819
3822
|
this.swichState();
|
|
3820
3823
|
}
|
|
@@ -3826,13 +3829,13 @@ let EzLabelChip$1 = class extends HTMLElement {
|
|
|
3826
3829
|
}
|
|
3827
3830
|
reflectChange() {
|
|
3828
3831
|
if (this._divElem) {
|
|
3829
|
-
this._divElem.classList.remove(
|
|
3830
|
-
this._divElem.classList.remove(
|
|
3832
|
+
this._divElem.classList.remove("label__container--active");
|
|
3833
|
+
this._divElem.classList.remove("label__container");
|
|
3831
3834
|
if (this.value) {
|
|
3832
|
-
this._divElem.classList.add(
|
|
3835
|
+
this._divElem.classList.add("label__container--active");
|
|
3833
3836
|
}
|
|
3834
3837
|
else {
|
|
3835
|
-
this._divElem.classList.add(
|
|
3838
|
+
this._divElem.classList.add("label__container");
|
|
3836
3839
|
}
|
|
3837
3840
|
}
|
|
3838
3841
|
}
|
|
@@ -3842,7 +3845,7 @@ let EzLabelChip$1 = class extends HTMLElement {
|
|
|
3842
3845
|
componentDidLoad() {
|
|
3843
3846
|
if (this._divElem) {
|
|
3844
3847
|
if (this.value) {
|
|
3845
|
-
this._divElem.classList.add(
|
|
3848
|
+
this._divElem.classList.add("label__container--active");
|
|
3846
3849
|
}
|
|
3847
3850
|
else {
|
|
3848
3851
|
this.handleEnabledState();
|
|
@@ -3850,12 +3853,12 @@ let EzLabelChip$1 = class extends HTMLElement {
|
|
|
3850
3853
|
}
|
|
3851
3854
|
}
|
|
3852
3855
|
handleEnabledState() {
|
|
3853
|
-
this._divElem.classList.remove(
|
|
3856
|
+
this._divElem.classList.remove("label__container--disabled");
|
|
3854
3857
|
if (!this.enabled) {
|
|
3855
|
-
this._divElem.classList.remove(
|
|
3856
|
-
this._divElem.classList.add(
|
|
3858
|
+
this._divElem.classList.remove("label__container");
|
|
3859
|
+
this._divElem.classList.add("label__container--disabled");
|
|
3857
3860
|
if (this._labelElem) {
|
|
3858
|
-
this._labelElem.style.cursor =
|
|
3861
|
+
this._labelElem.style.cursor = "default";
|
|
3859
3862
|
}
|
|
3860
3863
|
}
|
|
3861
3864
|
}
|
|
@@ -3871,6 +3874,175 @@ let EzLabelChip$1 = class extends HTMLElement {
|
|
|
3871
3874
|
static get style() { return ezLabelChipCss; }
|
|
3872
3875
|
};
|
|
3873
3876
|
|
|
3877
|
+
const ezListCss = ":host{--list__host--border-radius:var(--border--radius-medium, 12px);--list__host--padding:var(--space--medium, 12px);--list__icon__padding:var(--space--small, 6px);--list__item__margin:0 var(--space--small, 6px);--list__item--color:var(--title--primary, #2b3a54);--list__item--border-bottom:var(--border--small, 1px solid);--list__item--border-color:var(--title--primary, #2b3a54);--list__item--font-family:var(--font-pattern, #2b3a54);--list__item--font-size:var(--text--medium, 14px);--list__draggable__icon--image:url('data:image/svg+xml;utf8,<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 12,16 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 m 0,-6 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 m 0,-6 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 z\"/></svg>');border-radius:var(--list__host--border-radius);padding:var(--list__host--padding);max-height:100%;width:100%;background-color:#fff;display:flex}.draggable{cursor:pointer;display:flex;align-items:center;justify-content:flex-start;flex:1}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%;overflow-y:auto}.draggable-list li{background-color:#fff;display:flex;margin:var(--list__item__margin);font-family:var(--list__item--font-family);font-size:var(--list__item--font-size);color:var(--list__item--color)}.draggable-list li:not(:last-of-type){border-bottom:var(--list__item--border-bottom)}.draggable-list li.over .draggable{background-color:var(--background--strong)}.draggable:hover{background-color:var(--background--medium)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:#f0f2f5}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--title--primary);border-radius:var(--space--extra-small)}.draggable-list::-webkit-scrollbar{background-color:#f0f2f5;height:6px;max-height:6px;min-height:6px;width:6px;max-width:6px;min-width:6px}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--list__item--color);width:24px;height:24px;-webkit-mask-image:var(--list__draggable__icon--image);mask-image:var(--list__draggable__icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}";
|
|
3878
|
+
|
|
3879
|
+
let EzList$1 = class extends HTMLElement {
|
|
3880
|
+
constructor() {
|
|
3881
|
+
super();
|
|
3882
|
+
this.__registerHost();
|
|
3883
|
+
this.__attachShadow();
|
|
3884
|
+
this._listItems = [];
|
|
3885
|
+
/**
|
|
3886
|
+
* Define a lista inicial do componente.
|
|
3887
|
+
*/
|
|
3888
|
+
this.initialList = [];
|
|
3889
|
+
/**
|
|
3890
|
+
* Define se o componente terá o comportamento de arrasto de linhas.
|
|
3891
|
+
*/
|
|
3892
|
+
this.draggable = true;
|
|
3893
|
+
/**
|
|
3894
|
+
* Define se é possível selecionar mais de um registro.
|
|
3895
|
+
*/
|
|
3896
|
+
this.isMultipleSelection = true;
|
|
3897
|
+
}
|
|
3898
|
+
createList() {
|
|
3899
|
+
[...this.initialList]
|
|
3900
|
+
.forEach((item, index) => {
|
|
3901
|
+
const listItem = document.createElement('li');
|
|
3902
|
+
listItem.setAttribute('data-index', index.toString());
|
|
3903
|
+
if (!this.isMultipleSelection)
|
|
3904
|
+
listItem.onclick = this.selectLine.bind(this);
|
|
3905
|
+
listItem.innerHTML = `
|
|
3906
|
+
<div class="draggable" ${this.draggable ? "draggable=true" : ""}>
|
|
3907
|
+
|
|
3908
|
+
${this.draggable ? '<span class="draggable-icon"></span>' : ""}
|
|
3909
|
+
|
|
3910
|
+
${this.isMultipleSelection ? `<ez-check class='checkbox' value=${item.checked}></ez-check>` : ''}
|
|
3911
|
+
<p title="${item.value}" class="person-name text--ellipsis">${item.value}</p>
|
|
3912
|
+
|
|
3913
|
+
</div>
|
|
3914
|
+
`;
|
|
3915
|
+
this._listItems.push(listItem);
|
|
3916
|
+
this._draggableList.appendChild(listItem);
|
|
3917
|
+
});
|
|
3918
|
+
if (this.draggable) {
|
|
3919
|
+
this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, false);
|
|
3920
|
+
}
|
|
3921
|
+
}
|
|
3922
|
+
selectLine(e) {
|
|
3923
|
+
var _a, _b, _c;
|
|
3924
|
+
this._listItems.forEach(item => { item.classList.remove('draggable-selected'); });
|
|
3925
|
+
if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === 'SPAN') {
|
|
3926
|
+
const span = e.target;
|
|
3927
|
+
this._selectedItem = { value: span.parentElement.getElementsByTagName('p')[0].textContent };
|
|
3928
|
+
span.parentElement.parentElement.classList.add('draggable-selected');
|
|
3929
|
+
}
|
|
3930
|
+
else if (((_b = e.target) === null || _b === void 0 ? void 0 : _b.tagName) === 'P') {
|
|
3931
|
+
const paragraph = e.target;
|
|
3932
|
+
this._selectedItem = { value: paragraph.textContent };
|
|
3933
|
+
paragraph.parentElement.parentElement.classList.add('draggable-selected');
|
|
3934
|
+
}
|
|
3935
|
+
else if (((_c = e.target) === null || _c === void 0 ? void 0 : _c.tagName) === 'DIV') {
|
|
3936
|
+
const draggable = e.target;
|
|
3937
|
+
this._selectedItem = { value: draggable.getElementsByTagName('p')[0].textContent };
|
|
3938
|
+
draggable.parentElement.classList.add('draggable-selected');
|
|
3939
|
+
}
|
|
3940
|
+
}
|
|
3941
|
+
handleEventListeners(listItems, dragableList, hostElement, removeEvents) {
|
|
3942
|
+
let _dragStartIndex;
|
|
3943
|
+
let _isItemOut = false;
|
|
3944
|
+
function dragStart(item) {
|
|
3945
|
+
_dragStartIndex = item.parentElement.getAttribute('data-index');
|
|
3946
|
+
}
|
|
3947
|
+
function dragEnter(item) {
|
|
3948
|
+
item.classList.add('over');
|
|
3949
|
+
}
|
|
3950
|
+
function dragLeave(item) {
|
|
3951
|
+
item.classList.remove('over');
|
|
3952
|
+
}
|
|
3953
|
+
function dragOver(e) {
|
|
3954
|
+
e.preventDefault();
|
|
3955
|
+
}
|
|
3956
|
+
function dragDrop(item) {
|
|
3957
|
+
if (_isItemOut) {
|
|
3958
|
+
let index = +item.getAttribute('data-index');
|
|
3959
|
+
const itemRemoved = listItems[index].querySelector('.draggable');
|
|
3960
|
+
listItems[index].removeChild(itemRemoved);
|
|
3961
|
+
}
|
|
3962
|
+
const dragEndIndex = +item.getAttribute('data-index');
|
|
3963
|
+
swapItems(+_dragStartIndex, dragEndIndex);
|
|
3964
|
+
item.classList.remove('over');
|
|
3965
|
+
}
|
|
3966
|
+
function swapItems(fromIndex, toIndex) {
|
|
3967
|
+
const itemOne = listItems[fromIndex].querySelector('.draggable');
|
|
3968
|
+
const itemTwo = listItems[toIndex].querySelector('.draggable');
|
|
3969
|
+
listItems[fromIndex].appendChild(itemTwo);
|
|
3970
|
+
listItems[toIndex].appendChild(itemOne);
|
|
3971
|
+
return listItems;
|
|
3972
|
+
}
|
|
3973
|
+
if (!removeEvents) {
|
|
3974
|
+
hostElement.addEventListener('dragenter', function () { _isItemOut = false; });
|
|
3975
|
+
hostElement.addEventListener('dragleave', function () { _isItemOut = true; });
|
|
3976
|
+
const draggables = dragableList.querySelectorAll("div.draggable");
|
|
3977
|
+
draggables.forEach(draggable => {
|
|
3978
|
+
draggable.addEventListener('dragstart', function () { dragStart(draggable); });
|
|
3979
|
+
});
|
|
3980
|
+
listItems.forEach(item => {
|
|
3981
|
+
item.addEventListener('dragover', function (event) { dragOver(event); });
|
|
3982
|
+
item.addEventListener('drop', function () { dragDrop(item); });
|
|
3983
|
+
item.addEventListener('dragenter', function () { dragEnter(item); });
|
|
3984
|
+
item.addEventListener('dragleave', function () { dragLeave(item); });
|
|
3985
|
+
});
|
|
3986
|
+
}
|
|
3987
|
+
else {
|
|
3988
|
+
hostElement.removeEventListener('dragenter', function () { _isItemOut = false; });
|
|
3989
|
+
hostElement.removeEventListener('dragleave', function () { _isItemOut = true; });
|
|
3990
|
+
const draggables = dragableList.querySelectorAll("div.draggable");
|
|
3991
|
+
draggables.forEach(draggable => {
|
|
3992
|
+
draggable.removeEventListener('dragstart', function () { dragStart(draggable); });
|
|
3993
|
+
});
|
|
3994
|
+
listItems.forEach(item => {
|
|
3995
|
+
item.removeEventListener('dragover', function (event) { dragOver(event); });
|
|
3996
|
+
item.removeEventListener('drop', function () { dragDrop(item); });
|
|
3997
|
+
item.removeEventListener('dragenter', function () { dragEnter(item); });
|
|
3998
|
+
item.removeEventListener('dragleave', function () { dragLeave(item); });
|
|
3999
|
+
});
|
|
4000
|
+
}
|
|
4001
|
+
}
|
|
4002
|
+
/**
|
|
4003
|
+
* Retorna uma promessa com o estado da atual lista composta por objetos do tipo {value: string, checked: boolean}.
|
|
4004
|
+
*/
|
|
4005
|
+
async getState() {
|
|
4006
|
+
let emitionList = [];
|
|
4007
|
+
this._listItems.forEach(item => {
|
|
4008
|
+
let emitionItem = {
|
|
4009
|
+
value: this.getValueItem(item),
|
|
4010
|
+
checked: this.getChecked(item)
|
|
4011
|
+
};
|
|
4012
|
+
emitionList.push(emitionItem);
|
|
4013
|
+
});
|
|
4014
|
+
return emitionList;
|
|
4015
|
+
}
|
|
4016
|
+
getChecked(item) {
|
|
4017
|
+
if (this.isMultipleSelection) {
|
|
4018
|
+
return item.children[0].children[1].value;
|
|
4019
|
+
}
|
|
4020
|
+
else {
|
|
4021
|
+
if (!this._selectedItem)
|
|
4022
|
+
return false;
|
|
4023
|
+
return (item.children[0].children[1].textContent === this._selectedItem.value);
|
|
4024
|
+
}
|
|
4025
|
+
}
|
|
4026
|
+
getValueItem(item) {
|
|
4027
|
+
if (this.isMultipleSelection) {
|
|
4028
|
+
return item.children[0].children[2].textContent;
|
|
4029
|
+
}
|
|
4030
|
+
return item.children[0].children[1].textContent;
|
|
4031
|
+
}
|
|
4032
|
+
componentDidLoad() {
|
|
4033
|
+
this.createList();
|
|
4034
|
+
}
|
|
4035
|
+
disconnectedCallback() {
|
|
4036
|
+
if (this.draggable) {
|
|
4037
|
+
this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, true);
|
|
4038
|
+
}
|
|
4039
|
+
}
|
|
4040
|
+
render() {
|
|
4041
|
+
return (h(Host, { ref: (el) => this._hostElement = el }, h("ul", { ref: (el) => this._draggableList = el, class: "draggable-list", id: "draggable-list" })));
|
|
4042
|
+
}
|
|
4043
|
+
static get style() { return ezListCss; }
|
|
4044
|
+
};
|
|
4045
|
+
|
|
3874
4046
|
const ezModalCss = ":host{--modal-z-index:var(--most-visible, 3);--modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.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%}}";
|
|
3875
4047
|
|
|
3876
4048
|
let EzModal$1 = class extends HTMLElement {
|
|
@@ -4405,11 +4577,11 @@ let EzSearch$1 = class extends HTMLElement {
|
|
|
4405
4577
|
/**
|
|
4406
4578
|
* Ajusta a opção de mostrar o "value" ao selecionar uma opção.
|
|
4407
4579
|
*/
|
|
4408
|
-
this.
|
|
4580
|
+
this.showSelectedValue = true;
|
|
4409
4581
|
/**
|
|
4410
4582
|
* Ajusta a opção de mostrar o "value" para cada opção.
|
|
4411
4583
|
*/
|
|
4412
|
-
this.
|
|
4584
|
+
this.showOptionValue = true;
|
|
4413
4585
|
}
|
|
4414
4586
|
updateValue() {
|
|
4415
4587
|
if (this._comboElement) {
|
|
@@ -4422,7 +4594,7 @@ let EzSearch$1 = class extends HTMLElement {
|
|
|
4422
4594
|
this.ezChange.emit(evt.detail);
|
|
4423
4595
|
}
|
|
4424
4596
|
render() {
|
|
4425
|
-
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.
|
|
4597
|
+
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: evt => this.onComboChange(evt), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue }));
|
|
4426
4598
|
}
|
|
4427
4599
|
;
|
|
4428
4600
|
static get watchers() { return {
|
|
@@ -4634,7 +4806,7 @@ class Tab {
|
|
|
4634
4806
|
}
|
|
4635
4807
|
}
|
|
4636
4808
|
|
|
4637
|
-
const ezTextAreaCss = ":host{--
|
|
4809
|
+
const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--large, 500);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-weight--large, 600);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.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(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__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(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}";
|
|
4638
4810
|
|
|
4639
4811
|
let EzTextArea$1 = class extends HTMLElement {
|
|
4640
4812
|
constructor() {
|
|
@@ -5030,7 +5202,7 @@ let EzTimeInput$1 = class extends HTMLElement {
|
|
|
5030
5202
|
}
|
|
5031
5203
|
}
|
|
5032
5204
|
render() {
|
|
5033
|
-
return (h(Host, null, h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage }, h("ez-icon", { slot: "leftIcon", href: getAssetPath("
|
|
5205
|
+
return (h(Host, null, h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage }, h("ez-icon", { slot: "leftIcon", href: getAssetPath("../assets/actions-sprite.svg") + "#timer-outline" }))));
|
|
5034
5206
|
}
|
|
5035
5207
|
static get assetsDirs() { return ["../assets"]; }
|
|
5036
5208
|
get _elem() { return this; }
|
|
@@ -5041,7 +5213,7 @@ let EzTimeInput$1 = class extends HTMLElement {
|
|
|
5041
5213
|
static get style() { return ezTimeInputCss; }
|
|
5042
5214
|
};
|
|
5043
5215
|
|
|
5044
|
-
const ezToastCss = ":host{--toast__btn__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>');--toast__container-z-index:var(--more-visible, 2);--toast__container--background-color:var(--color--secondary, #383c45);--toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;bottom:100px;z-index:var(--toast__container-z-index);left:100px;width:30%;box-sizing:border-box;background-color:var(--toast__container--background-color);border-radius:6px;align-items:center;padding:12px;visibility:hidden}.message__container{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.message__conteiner--icon{padding-left:var(--toast__icon--padding-left);width:80%}.btn-close{display:flex;justify-content:flex-end;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--toast__btn__close__image);mask-image:var(--toast__btn__close__image)}.toast__container--oppened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@-webkit-keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}@keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}";
|
|
5216
|
+
const ezToastCss = ":host{--ez-toast__btn__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>');--ez-toast__container-z-index:var(--more-visible, 2);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;bottom:100px;z-index:var(--ez-toast__container-z-index);left:100px;width:30%;box-sizing:border-box;background-color:var(--ez-toast__container--background-color);border-radius:6px;align-items:center;padding:12px;visibility:hidden}.message__container{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.message__conteiner--icon{padding-left:var(--ez-toast__icon--padding-left);width:80%}.btn-close{display:flex;justify-content:flex-end;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--oppened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@-webkit-keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}@keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}";
|
|
5045
5217
|
|
|
5046
5218
|
let EzToast$1 = class extends HTMLElement {
|
|
5047
5219
|
constructor() {
|
|
@@ -5057,6 +5229,9 @@ let EzToast$1 = class extends HTMLElement {
|
|
|
5057
5229
|
*/
|
|
5058
5230
|
this.useIcon = false;
|
|
5059
5231
|
}
|
|
5232
|
+
/**
|
|
5233
|
+
* Exibe o componente na tela.
|
|
5234
|
+
*/
|
|
5060
5235
|
async show() {
|
|
5061
5236
|
this.container.classList.add("toast__container--oppened");
|
|
5062
5237
|
this.container.style.animation = `fadein 0.5s, fadeout 0.5s ${this.fadeTime / 1000}s`;
|
|
@@ -5163,7 +5338,7 @@ class RemoteFile {
|
|
|
5163
5338
|
}
|
|
5164
5339
|
}
|
|
5165
5340
|
|
|
5166
|
-
const ezUploadCss = ":host{--
|
|
5341
|
+
const ezUploadCss = ":host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__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>');--ez-upload__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(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--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(--ez-upload__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(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--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(--ez-upload--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(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__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(--ez-upload__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(--ez-upload__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(--ez-upload--text--primary);text-shadow:var(--ez-upload--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(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--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(--ez-upload__file-icon-image);mask-image:var(--ez-upload__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(--ez-upload--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:unset}.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%}}";
|
|
5167
5342
|
|
|
5168
5343
|
let EzUpload$1 = class extends HTMLElement {
|
|
5169
5344
|
constructor() {
|
|
@@ -5196,28 +5371,31 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5196
5371
|
}
|
|
5197
5372
|
normalizeRequestHeaders() {
|
|
5198
5373
|
this._requestHeaders = new Map();
|
|
5199
|
-
if (typeof this.
|
|
5374
|
+
if (typeof this.requestHeaders == "string") {
|
|
5200
5375
|
try {
|
|
5201
|
-
this.
|
|
5376
|
+
this.requestHeaders = JSON.parse(this.requestHeaders);
|
|
5202
5377
|
}
|
|
5203
5378
|
catch (e) {
|
|
5204
|
-
this.
|
|
5379
|
+
this.requestHeaders = undefined;
|
|
5205
5380
|
}
|
|
5206
5381
|
}
|
|
5207
|
-
for (var key in this.
|
|
5208
|
-
this._requestHeaders.set(key, this.
|
|
5382
|
+
for (var key in this.requestHeaders) {
|
|
5383
|
+
this._requestHeaders.set(key, this.requestHeaders[key]);
|
|
5209
5384
|
}
|
|
5210
5385
|
}
|
|
5386
|
+
/**
|
|
5387
|
+
* Método responsável por adicionar um ou mais arquivos ao componente.
|
|
5388
|
+
*/
|
|
5211
5389
|
async addFiles(files) {
|
|
5212
|
-
if (this.
|
|
5390
|
+
if (this.maxFiles > 0) {
|
|
5213
5391
|
let countDistinctFiles = this._filePointers.size;
|
|
5214
5392
|
files.forEach(file => {
|
|
5215
5393
|
if (!this._filePointers.has(file.name)) {
|
|
5216
5394
|
countDistinctFiles++;
|
|
5217
5395
|
}
|
|
5218
5396
|
});
|
|
5219
|
-
if (countDistinctFiles > this.
|
|
5220
|
-
this.showError(`A quantidade máxima de arquivos é ${this.
|
|
5397
|
+
if (countDistinctFiles > this.maxFiles) {
|
|
5398
|
+
this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`);
|
|
5221
5399
|
return;
|
|
5222
5400
|
}
|
|
5223
5401
|
}
|
|
@@ -5244,7 +5422,7 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5244
5422
|
if (this.validateFile(file)) {
|
|
5245
5423
|
const uploadingFile = new RemoteFile(file);
|
|
5246
5424
|
this._filePointers.set(file.name, uploadingFile);
|
|
5247
|
-
uploadingFile.upload(this.
|
|
5425
|
+
uploadingFile.upload(this.urlUpload, this._requestHeaders, (file) => this.updateFeedback(file))
|
|
5248
5426
|
.then((files) => files.forEach(ezFile => this.finishUpload(ezFile)))
|
|
5249
5427
|
.catch(msg => this.showError(msg));
|
|
5250
5428
|
forceUpdate(this);
|
|
@@ -5265,13 +5443,13 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5265
5443
|
this.ezChange.emit(this.value);
|
|
5266
5444
|
}
|
|
5267
5445
|
buildProgressId(uploading) {
|
|
5268
|
-
let sanitizedName = uploading.name.replace(/[^a-z0-9_]/gi,
|
|
5446
|
+
let sanitizedName = uploading.name.replace(/[^a-z0-9_]/gi, "_");
|
|
5269
5447
|
return `PROGRESS_${sanitizedName}_${uploading.file.lastModified}`;
|
|
5270
5448
|
}
|
|
5271
5449
|
updateFeedback(uf) {
|
|
5272
5450
|
window.requestAnimationFrame(() => {
|
|
5273
5451
|
if (this._host) {
|
|
5274
|
-
const progress = this._host.shadowRoot.querySelector(
|
|
5452
|
+
const progress = this._host.shadowRoot.querySelector("#" + this.buildProgressId(uf));
|
|
5275
5453
|
if (progress) {
|
|
5276
5454
|
progress.value = uf.progress;
|
|
5277
5455
|
}
|
|
@@ -5279,20 +5457,20 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5279
5457
|
});
|
|
5280
5458
|
}
|
|
5281
5459
|
validateFile(file) {
|
|
5282
|
-
if (!this._filePointers.has(file.name) && this.
|
|
5283
|
-
this.showError(`A quantidade máxima de arquivos é ${this.
|
|
5460
|
+
if (!this._filePointers.has(file.name) && this.maxFiles > 0 && this._filePointers.size >= this.maxFiles) {
|
|
5461
|
+
this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`);
|
|
5284
5462
|
return false;
|
|
5285
5463
|
}
|
|
5286
5464
|
if (file.size === 0) {
|
|
5287
5465
|
this.showError(`Erro de permissão: O arquivo "${file.name}" não pode ser enviado.`);
|
|
5288
5466
|
return false;
|
|
5289
5467
|
}
|
|
5290
|
-
if (!this.
|
|
5468
|
+
if (!this.urlUpload) {
|
|
5291
5469
|
this.showError("Endereço de upload não informado");
|
|
5292
5470
|
return false;
|
|
5293
5471
|
}
|
|
5294
|
-
if (this.
|
|
5295
|
-
this.showError("O tamanho máximo dos arquivos é de " + this.formatBytes(this.
|
|
5472
|
+
if (this.maxFileSize >= 0 && file.size > this.maxFileSize) {
|
|
5473
|
+
this.showError("O tamanho máximo dos arquivos é de " + this.formatBytes(this.maxFileSize));
|
|
5296
5474
|
return false;
|
|
5297
5475
|
}
|
|
5298
5476
|
return true;
|
|
@@ -5302,17 +5480,17 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5302
5480
|
}
|
|
5303
5481
|
formatBytes(bytes, decimals = 1) {
|
|
5304
5482
|
if (bytes === 0)
|
|
5305
|
-
return
|
|
5483
|
+
return "0 Bytes";
|
|
5306
5484
|
const k = 1024;
|
|
5307
5485
|
const dm = decimals < 0 ? 0 : decimals;
|
|
5308
|
-
const sizes = [
|
|
5486
|
+
const sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
5309
5487
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
5310
|
-
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) +
|
|
5488
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
5311
5489
|
}
|
|
5312
5490
|
onFileInputChange(event) {
|
|
5313
5491
|
const input = event.target;
|
|
5314
5492
|
this.addFiles(Array.from(input.files));
|
|
5315
|
-
this._fileInput.value =
|
|
5493
|
+
this._fileInput.value = "";
|
|
5316
5494
|
}
|
|
5317
5495
|
isRemoteFile(item) {
|
|
5318
5496
|
return "file" in item;
|
|
@@ -5328,10 +5506,10 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5328
5506
|
this.removeFromList(name);
|
|
5329
5507
|
}
|
|
5330
5508
|
else {
|
|
5331
|
-
if (this.
|
|
5509
|
+
if (this.urlDelete) {
|
|
5332
5510
|
const uploadingFile = new RemoteFile(null);
|
|
5333
5511
|
this._filePointers.set(item.name, uploadingFile);
|
|
5334
|
-
uploadingFile.delete(item, this.
|
|
5512
|
+
uploadingFile.delete(item, this.urlDelete, null)
|
|
5335
5513
|
.then(_ok => this.removeFromList(name))
|
|
5336
5514
|
.catch(msg => this.showError(msg));
|
|
5337
5515
|
}
|
|
@@ -5347,20 +5525,20 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5347
5525
|
}
|
|
5348
5526
|
componentDidLoad() {
|
|
5349
5527
|
if (this.enabled && this._dropZone && window.FileList && window.File) {
|
|
5350
|
-
this._dropZone.addEventListener(
|
|
5528
|
+
this._dropZone.addEventListener("dragover", event => {
|
|
5351
5529
|
event.stopPropagation();
|
|
5352
5530
|
event.preventDefault();
|
|
5353
|
-
event.dataTransfer.dropEffect =
|
|
5354
|
-
this._dropZone.style.background =
|
|
5531
|
+
event.dataTransfer.dropEffect = "copy";
|
|
5532
|
+
this._dropZone.style.background = "#c2dbff";
|
|
5355
5533
|
});
|
|
5356
|
-
this._dropZone.addEventListener(
|
|
5534
|
+
this._dropZone.addEventListener("drop", event => {
|
|
5357
5535
|
event.stopPropagation();
|
|
5358
5536
|
event.preventDefault();
|
|
5359
5537
|
this.addFiles(Array.from(event.dataTransfer.files));
|
|
5360
|
-
this._dropZone.style.background =
|
|
5538
|
+
this._dropZone.style.background = "";
|
|
5361
5539
|
});
|
|
5362
|
-
this._dropZone.addEventListener(
|
|
5363
|
-
this._dropZone.style.background =
|
|
5540
|
+
this._dropZone.addEventListener("dragleave", _event => {
|
|
5541
|
+
this._dropZone.style.background = "";
|
|
5364
5542
|
});
|
|
5365
5543
|
}
|
|
5366
5544
|
}
|
|
@@ -5372,7 +5550,7 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5372
5550
|
}
|
|
5373
5551
|
}
|
|
5374
5552
|
render() {
|
|
5375
|
-
return (h("div", { ref: (el) => this._dropZone = el, class: this.evalDisabledClass(
|
|
5553
|
+
return (h("div", { ref: (el) => this._dropZone = el, class: this.evalDisabledClass("iu", "background--disabled") }, h("div", { class: "iu__container", onClick: () => this.openFilesDialog() }, h("div", { class: "iu_header" }, this.label ? h("label", { class: this.evalDisabledClass("iu__label", "text--disabled"), title: this.label }, this.label) : null, h("div", { class: this.evalDisabledClass("iu__icon-label", "mouse-pointer--disabled") }, h("button", { class: "iu__file-icon", disabled: !this.enabled }), 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()), h("input", { ref: (el) => this._fileInput = el, onChange: (ev) => this.onFileInputChange(ev), type: "file", multiple: true, hidden: true })));
|
|
5376
5554
|
}
|
|
5377
5555
|
buildFooter() {
|
|
5378
5556
|
if (this._filePointers.size === 0) {
|
|
@@ -5384,8 +5562,8 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5384
5562
|
}
|
|
5385
5563
|
buildFileItem(item) {
|
|
5386
5564
|
const fileName = item.name;
|
|
5387
|
-
const progress = Number(item[
|
|
5388
|
-
const downloadURL = item[
|
|
5565
|
+
const progress = Number(item["progress"]);
|
|
5566
|
+
const downloadURL = item["downloadURL"];
|
|
5389
5567
|
const label = `${fileName} (${this.formatBytes(item.size)})`;
|
|
5390
5568
|
return (h("div", { class: "iu__item", key: fileName, onClick: evt => evt.stopPropagation() }, h("div", { class: "iu__item-label modificador" }, h("div", { title: label, class: "col--stretch align--middle file__name text text--primary text--small text--ellipsis align--middle" }, downloadURL ? h("a", { href: downloadURL, download: true }, label) : label)), isNaN(progress)
|
|
5391
5569
|
?
|
|
@@ -5403,7 +5581,7 @@ let EzUpload$1 = class extends HTMLElement {
|
|
|
5403
5581
|
get _host() { return this; }
|
|
5404
5582
|
static get watchers() { return {
|
|
5405
5583
|
"value": ["changeValue"],
|
|
5406
|
-
"
|
|
5584
|
+
"requestHeaders": ["normalizeRequestHeaders"]
|
|
5407
5585
|
}; }
|
|
5408
5586
|
static get style() { return ezUploadCss; }
|
|
5409
5587
|
};
|
|
@@ -5555,18 +5733,19 @@ const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"co
|
|
|
5555
5733
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"enabled":[4],"loading":[1540]}]);
|
|
5556
5734
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513]}]);
|
|
5557
5735
|
const EzLabelChip = /*@__PURE__*/proxyCustomElement(EzLabelChip$1, [1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540]}]);
|
|
5736
|
+
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"initialList":[1040],"draggable":[4],"isMultipleSelection":[1540,"is-multiple-selection"]}]);
|
|
5558
5737
|
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[4],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]);
|
|
5559
5738
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(NumberInput, [1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errorMessage":[1537,"error-message"],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513]}]);
|
|
5560
5739
|
const EzNumericInput = /*@__PURE__*/proxyCustomElement(EzNumericInput$1, [1,"ez-numeric-input",{"label":[513],"value":[1538],"enabled":[516],"errorMessage":[1537,"error-message"],"precision":[8],"prettyprecision":[8]}]);
|
|
5561
5740
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540]}]);
|
|
5562
5741
|
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]);
|
|
5563
|
-
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"
|
|
5742
|
+
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"]}]);
|
|
5564
5743
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1537,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
|
|
5565
5744
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538]}]);
|
|
5566
5745
|
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1]}]);
|
|
5567
5746
|
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}]);
|
|
5568
5747
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"]}]);
|
|
5569
|
-
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"enabled":[4],"
|
|
5748
|
+
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040]}]);
|
|
5570
5749
|
const FormMetadata = /*@__PURE__*/proxyCustomElement(FormMetadata$1, [1,"form-metadata",{"name":[1],"label":[1],"dataunit":[1025],"many":[4],"autoload":[4],"metadata":[1040]}]);
|
|
5571
5750
|
const PlaceHolder = /*@__PURE__*/proxyCustomElement(PlaceHolder$1, [1,"place-holder"]);
|
|
5572
5751
|
const defineCustomElements = (opts) => {
|
|
@@ -5583,6 +5762,7 @@ const defineCustomElements = (opts) => {
|
|
|
5583
5762
|
EzForm,
|
|
5584
5763
|
EzIcon,
|
|
5585
5764
|
EzLabelChip,
|
|
5765
|
+
EzList,
|
|
5586
5766
|
EzModal,
|
|
5587
5767
|
EzNumberInput,
|
|
5588
5768
|
EzNumericInput,
|
|
@@ -5605,4 +5785,4 @@ const defineCustomElements = (opts) => {
|
|
|
5605
5785
|
}
|
|
5606
5786
|
};
|
|
5607
5787
|
|
|
5608
|
-
export { EzActionChip, EzButton, EzCalendar, EzCheck, EzCollapsibleBox, EzComboBox, EzDateInput, EzDialog, EzForm, EzIcon, EzLabelChip, EzModal, EzNumberInput, EzNumericInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, FormMetadata, PlaceHolder, defineCustomElements };
|
|
5788
|
+
export { EzActionChip, EzButton, EzCalendar, EzCheck, EzCollapsibleBox, EzComboBox, EzDateInput, EzDialog, EzForm, EzIcon, EzLabelChip, EzList, EzModal, EzNumberInput, EzNumericInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, FormMetadata, PlaceHolder, defineCustomElements };
|