@sankhyalabs/ezui 1.1.71 → 1.1.74
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/assets/actions-sprite.svg +257 -0
- package/dist/cjs/CSSVarsUtils-f8827674.js +18 -0
- package/dist/cjs/ez-action-chip.cjs.entry.js +2 -2
- package/dist/cjs/ez-button_16.cjs.entry.js +12 -8
- 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 +7 -70
- package/dist/cjs/ez-toast.cjs.entry.js +5 -2
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/{index-0f668cc5.js → index-4d2896bb.js} +10 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/assets/actions-sprite.svg +257 -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-date-input/ez-date-input.css +0 -9
- package/dist/collection/components/ez-date-input/ez-date-input.js +5 -1
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +1 -1
- 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.css +0 -168
- package/dist/collection/components/ez-time-input/ez-time-input.js +8 -75
- 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/utils/CSSVarsUtils.js +14 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +220 -92
- package/dist/esm/CSSVarsUtils-e0128b01.js +16 -0
- package/dist/esm/ez-action-chip.entry.js +2 -2
- package/dist/esm/ez-button_16.entry.js +12 -8
- 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 +7 -70
- package/dist/esm/ez-toast.entry.js +5 -2
- package/dist/esm/ezui.js +2 -2
- package/dist/esm/{index-89fc9bfd.js → index-33153059.js} +10 -2
- 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-a88ee12f.entry.js → p-15743b09.entry.js} +1 -1
- package/dist/ezui/p-25953d44.entry.js +1 -0
- package/dist/ezui/p-34d288d0.entry.js +1 -0
- package/dist/ezui/p-47406a6e.entry.js +1 -0
- package/dist/ezui/p-4df6f855.js +1 -0
- package/dist/ezui/{p-a7e23f65.entry.js → p-50464bdf.entry.js} +1 -1
- package/dist/ezui/{p-1bc9ddad.entry.js → p-67410dfa.entry.js} +1 -1
- package/dist/ezui/{p-74e4415e.entry.js → p-7f3bc6d9.entry.js} +1 -1
- package/dist/ezui/{p-b692a0ab.entry.js → p-8818da66.entry.js} +1 -1
- package/dist/ezui/p-907de194.entry.js +1 -0
- package/dist/ezui/p-d1889704.js +1 -0
- package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +2 -2
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -0
- 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-time-input/ez-time-input.d.ts +1 -8
- package/dist/types/components/ez-toast/ez-toast.d.ts +3 -0
- package/dist/types/components.d.ts +51 -6
- package/dist/types/utils/CSSVarsUtils.d.ts +4 -0
- 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-1c33a56d.entry.js +0 -1
- package/dist/ezui/p-5aa8871e.entry.js +0 -1
- package/dist/ezui/p-762ac7a0.js +0 -1
- package/dist/ezui/p-8d547517.entry.js +0 -1
- package/dist/ezui/p-9702db61.entry.js +0 -1
- package/dist/ezui/p-f7d7fb7f.entry.js +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, h, c as createEvent, f as forceUpdate, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, c as createEvent, f as forceUpdate, H as Host, g as getElement } from './index-33153059.js';
|
|
2
2
|
import { N as NumberUtils, M as MaskFormatter } from './RequestMetadata-c265c9d5.js';
|
|
3
3
|
import { F as FloatingManager } from './FloatingManager-bb90ef41.js';
|
|
4
|
+
import { C as CSSVarsUtils } from './CSSVarsUtils-e0128b01.js';
|
|
4
5
|
|
|
5
6
|
const ezButtonCss = ":host{--button--min-width:100px;--button--height:42px;--button__icon--width:18px;--button__inline__icon--padding:12px;--button--padding-top:var(--space--medium, 12px);--button--padding-bottom:var(--space--medium, 12px);--button--padding-right:var(--space--large, 24px);--button--padding-left:var(--space--large, 24px);--button--color:var(--text--primary, #FFF);--button--font-size:var(--text--medium, 14px);--button--font-family:var(--font-pattern, Arial);--button--font-weight:var(--text-weight--large);--button--background-color:var(--background--medium, #c0c0c0);--button--border-radius:var(--border--radius-large, 12px);--button--border:none;--button--hover--background-color:var(--background--strong, var(--button--background-color));--button--disabled-color:var(--text--disable);--button--disabled--background-color:var(--color--disable-secondary);--button--focus--border:var(--button--border);--button--focus--box-shadow:none;--button--link-color:var(--title--primary, '#C0C0C0')}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--button--min-width);height:var(--button--height);font-family:var(--button--font-family);font-size:var(--button--font-size);font-weight:var(--button--font-weight);padding:var(--button--padding-top) var(--button--padding-right) var(--button--padding-bottom) var(--button--padding-left);border-radius:var(--button--border-radius);background-color:var(--button--background-color);color:var(--button--color);fill:var(--button--color);border:var(--button--border)}button:hover{background-color:var(--button--hover--background-color)}button:focus{outline:none;border:var(--button--focus--border);box-shadow:var(--button--focus--box-shadow)}button:disabled{background-color:var(--button--disabled--background-color);color:var(--button--disabled-color);fill:var(--button--disabled-color);border:none;cursor:no-drop}button.icon{width:42px;min-width:42px;height:42px;padding:0px}a{font-family:var(--button--font-family);font-size:var(--button--font-size);font-weight:var(--button--font-weight);color:var(--button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}";
|
|
6
7
|
|
|
@@ -550,7 +551,7 @@ let EzComboBox = class {
|
|
|
550
551
|
};
|
|
551
552
|
EzComboBox.style = ezComboBoxCss;
|
|
552
553
|
|
|
553
|
-
const ezDateInputCss = ":host{display:block;width:100%;--
|
|
554
|
+
const ezDateInputCss = ":host{display:block;width:100%;--di__calendar-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"15px\"><path d=\"M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z\"/></svg>')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--di__calendar-image);mask-image:var(--di__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}";
|
|
554
555
|
|
|
555
556
|
let EzDateInput = class {
|
|
556
557
|
constructor(hostRef) {
|
|
@@ -611,8 +612,11 @@ let EzDateInput = class {
|
|
|
611
612
|
getTextValue(d) {
|
|
612
613
|
return d ? new Intl.DateTimeFormat('pt-BR').format(d) : null;
|
|
613
614
|
}
|
|
615
|
+
componentDidLoad() {
|
|
616
|
+
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
617
|
+
}
|
|
614
618
|
render() {
|
|
615
|
-
return (h(Host, null, h("ez-text-input", {
|
|
619
|
+
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => {
|
|
616
620
|
if (event.key === 'H' || event.key === 'h')
|
|
617
621
|
this.changeValue(new Date());
|
|
618
622
|
}, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
@@ -2614,7 +2618,7 @@ const Field = ({ dataUnit, field, forceScroll, enabled }) => {
|
|
|
2614
2618
|
context['CRITERIA'] = criteriaList;
|
|
2615
2619
|
}
|
|
2616
2620
|
return h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? h("place-holder", null) :
|
|
2617
|
-
h("ez-search", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.target['value']), errorMessage: errorMessage,
|
|
2621
|
+
h("ez-search", { value: value, label: formattedLabel, enabled: isEnabled, onEzChange: (event) => changeFieldHandler(event.target['value']), errorMessage: errorMessage, optionLoader: (argument) => {
|
|
2618
2622
|
if (form) {
|
|
2619
2623
|
return form.loadSearch(argument, context);
|
|
2620
2624
|
}
|
|
@@ -3054,11 +3058,11 @@ let EzSearch = class {
|
|
|
3054
3058
|
/**
|
|
3055
3059
|
* Ajusta a opção de mostrar o "value" ao selecionar uma opção.
|
|
3056
3060
|
*/
|
|
3057
|
-
this.
|
|
3061
|
+
this.showSelectedValue = true;
|
|
3058
3062
|
/**
|
|
3059
3063
|
* Ajusta a opção de mostrar o "value" para cada opção.
|
|
3060
3064
|
*/
|
|
3061
|
-
this.
|
|
3065
|
+
this.showOptionValue = true;
|
|
3062
3066
|
}
|
|
3063
3067
|
updateValue() {
|
|
3064
3068
|
if (this._comboElement) {
|
|
@@ -3071,7 +3075,7 @@ let EzSearch = class {
|
|
|
3071
3075
|
this.ezChange.emit(evt.detail);
|
|
3072
3076
|
}
|
|
3073
3077
|
render() {
|
|
3074
|
-
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.
|
|
3078
|
+
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 }));
|
|
3075
3079
|
}
|
|
3076
3080
|
;
|
|
3077
3081
|
static get watchers() { return {
|
|
@@ -3281,7 +3285,7 @@ class Tab {
|
|
|
3281
3285
|
}
|
|
3282
3286
|
EzTabselector.style = ezTabselectorCss;
|
|
3283
3287
|
|
|
3284
|
-
const ezTextAreaCss = ":host{--
|
|
3288
|
+
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)}";
|
|
3285
3289
|
|
|
3286
3290
|
let EzTextArea = class {
|
|
3287
3291
|
constructor(hostRef) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h } from './index-33153059.js';
|
|
2
2
|
|
|
3
3
|
const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__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>');--dialog__title--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{width:15px;height:15px}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:1.3}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title--label{padding-left:var(--dialog__title--padding-left)}.title-icon{outline:none;border:none;background-color:var(--dialog__warning--background-color);width:26px;height:26px;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.title-icon--critical::after{content:'';display:flex;background-color:#FFFF;width:13px;height:13px;-webkit-mask-image:var(--dialog--critical__image);mask-image:var(--dialog--critical__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__no{padding-right:var(--dialog__btn__no--padding-right)}.button__ok--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-33153059.js';
|
|
2
2
|
|
|
3
|
-
const ezLabelChipCss = ":host{--
|
|
3
|
+
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}";
|
|
4
4
|
|
|
5
5
|
let EzLabelChip = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -40,7 +40,7 @@ let EzLabelChip = class {
|
|
|
40
40
|
//---------------------------------------------
|
|
41
41
|
handleClick(ev) {
|
|
42
42
|
const target = ev.target;
|
|
43
|
-
if (target.assignedSlot === null && !target.classList.contains(
|
|
43
|
+
if (target.assignedSlot === null && !target.classList.contains("label__icon")) {
|
|
44
44
|
this.valueChange.emit(this.value);
|
|
45
45
|
this.swichState();
|
|
46
46
|
}
|
|
@@ -52,13 +52,13 @@ let EzLabelChip = class {
|
|
|
52
52
|
}
|
|
53
53
|
reflectChange() {
|
|
54
54
|
if (this._divElem) {
|
|
55
|
-
this._divElem.classList.remove(
|
|
56
|
-
this._divElem.classList.remove(
|
|
55
|
+
this._divElem.classList.remove("label__container--active");
|
|
56
|
+
this._divElem.classList.remove("label__container");
|
|
57
57
|
if (this.value) {
|
|
58
|
-
this._divElem.classList.add(
|
|
58
|
+
this._divElem.classList.add("label__container--active");
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
|
-
this._divElem.classList.add(
|
|
61
|
+
this._divElem.classList.add("label__container");
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -68,7 +68,7 @@ let EzLabelChip = class {
|
|
|
68
68
|
componentDidLoad() {
|
|
69
69
|
if (this._divElem) {
|
|
70
70
|
if (this.value) {
|
|
71
|
-
this._divElem.classList.add(
|
|
71
|
+
this._divElem.classList.add("label__container--active");
|
|
72
72
|
}
|
|
73
73
|
else {
|
|
74
74
|
this.handleEnabledState();
|
|
@@ -76,12 +76,12 @@ let EzLabelChip = class {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
handleEnabledState() {
|
|
79
|
-
this._divElem.classList.remove(
|
|
79
|
+
this._divElem.classList.remove("label__container--disabled");
|
|
80
80
|
if (!this.enabled) {
|
|
81
|
-
this._divElem.classList.remove(
|
|
82
|
-
this._divElem.classList.add(
|
|
81
|
+
this._divElem.classList.remove("label__container");
|
|
82
|
+
this._divElem.classList.add("label__container--disabled");
|
|
83
83
|
if (this._labelElem) {
|
|
84
|
-
this._labelElem.style.cursor =
|
|
84
|
+
this._labelElem.style.cursor = "default";
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-33153059.js';
|
|
2
|
+
|
|
3
|
+
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}";
|
|
4
|
+
|
|
5
|
+
let EzList = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this._listItems = [];
|
|
9
|
+
/**
|
|
10
|
+
* Define a lista inicial do componente.
|
|
11
|
+
*/
|
|
12
|
+
this.initialList = [];
|
|
13
|
+
/**
|
|
14
|
+
* Define se o componente terá o comportamento de arrasto de linhas.
|
|
15
|
+
*/
|
|
16
|
+
this.draggable = true;
|
|
17
|
+
/**
|
|
18
|
+
* Define se é possível selecionar mais de um registro.
|
|
19
|
+
*/
|
|
20
|
+
this.isMultipleSelection = true;
|
|
21
|
+
}
|
|
22
|
+
createList() {
|
|
23
|
+
[...this.initialList]
|
|
24
|
+
.forEach((item, index) => {
|
|
25
|
+
const listItem = document.createElement('li');
|
|
26
|
+
listItem.setAttribute('data-index', index.toString());
|
|
27
|
+
if (!this.isMultipleSelection)
|
|
28
|
+
listItem.onclick = this.selectLine.bind(this);
|
|
29
|
+
listItem.innerHTML = `
|
|
30
|
+
<div class="draggable" ${this.draggable ? "draggable=true" : ""}>
|
|
31
|
+
|
|
32
|
+
${this.draggable ? '<span class="draggable-icon"></span>' : ""}
|
|
33
|
+
|
|
34
|
+
${this.isMultipleSelection ? `<ez-check class='checkbox' value=${item.checked}></ez-check>` : ''}
|
|
35
|
+
<p title="${item.value}" class="person-name text--ellipsis">${item.value}</p>
|
|
36
|
+
|
|
37
|
+
</div>
|
|
38
|
+
`;
|
|
39
|
+
this._listItems.push(listItem);
|
|
40
|
+
this._draggableList.appendChild(listItem);
|
|
41
|
+
});
|
|
42
|
+
if (this.draggable) {
|
|
43
|
+
this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, false);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
selectLine(e) {
|
|
47
|
+
var _a, _b, _c;
|
|
48
|
+
this._listItems.forEach(item => { item.classList.remove('draggable-selected'); });
|
|
49
|
+
if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === 'SPAN') {
|
|
50
|
+
const span = e.target;
|
|
51
|
+
this._selectedItem = { value: span.parentElement.getElementsByTagName('p')[0].textContent };
|
|
52
|
+
span.parentElement.parentElement.classList.add('draggable-selected');
|
|
53
|
+
}
|
|
54
|
+
else if (((_b = e.target) === null || _b === void 0 ? void 0 : _b.tagName) === 'P') {
|
|
55
|
+
const paragraph = e.target;
|
|
56
|
+
this._selectedItem = { value: paragraph.textContent };
|
|
57
|
+
paragraph.parentElement.parentElement.classList.add('draggable-selected');
|
|
58
|
+
}
|
|
59
|
+
else if (((_c = e.target) === null || _c === void 0 ? void 0 : _c.tagName) === 'DIV') {
|
|
60
|
+
const draggable = e.target;
|
|
61
|
+
this._selectedItem = { value: draggable.getElementsByTagName('p')[0].textContent };
|
|
62
|
+
draggable.parentElement.classList.add('draggable-selected');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
handleEventListeners(listItems, dragableList, hostElement, removeEvents) {
|
|
66
|
+
let _dragStartIndex;
|
|
67
|
+
let _isItemOut = false;
|
|
68
|
+
function dragStart(item) {
|
|
69
|
+
_dragStartIndex = item.parentElement.getAttribute('data-index');
|
|
70
|
+
}
|
|
71
|
+
function dragEnter(item) {
|
|
72
|
+
item.classList.add('over');
|
|
73
|
+
}
|
|
74
|
+
function dragLeave(item) {
|
|
75
|
+
item.classList.remove('over');
|
|
76
|
+
}
|
|
77
|
+
function dragOver(e) {
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
}
|
|
80
|
+
function dragDrop(item) {
|
|
81
|
+
if (_isItemOut) {
|
|
82
|
+
let index = +item.getAttribute('data-index');
|
|
83
|
+
const itemRemoved = listItems[index].querySelector('.draggable');
|
|
84
|
+
listItems[index].removeChild(itemRemoved);
|
|
85
|
+
}
|
|
86
|
+
const dragEndIndex = +item.getAttribute('data-index');
|
|
87
|
+
swapItems(+_dragStartIndex, dragEndIndex);
|
|
88
|
+
item.classList.remove('over');
|
|
89
|
+
}
|
|
90
|
+
function swapItems(fromIndex, toIndex) {
|
|
91
|
+
const itemOne = listItems[fromIndex].querySelector('.draggable');
|
|
92
|
+
const itemTwo = listItems[toIndex].querySelector('.draggable');
|
|
93
|
+
listItems[fromIndex].appendChild(itemTwo);
|
|
94
|
+
listItems[toIndex].appendChild(itemOne);
|
|
95
|
+
return listItems;
|
|
96
|
+
}
|
|
97
|
+
if (!removeEvents) {
|
|
98
|
+
hostElement.addEventListener('dragenter', function () { _isItemOut = false; });
|
|
99
|
+
hostElement.addEventListener('dragleave', function () { _isItemOut = true; });
|
|
100
|
+
const draggables = dragableList.querySelectorAll("div.draggable");
|
|
101
|
+
draggables.forEach(draggable => {
|
|
102
|
+
draggable.addEventListener('dragstart', function () { dragStart(draggable); });
|
|
103
|
+
});
|
|
104
|
+
listItems.forEach(item => {
|
|
105
|
+
item.addEventListener('dragover', function (event) { dragOver(event); });
|
|
106
|
+
item.addEventListener('drop', function () { dragDrop(item); });
|
|
107
|
+
item.addEventListener('dragenter', function () { dragEnter(item); });
|
|
108
|
+
item.addEventListener('dragleave', function () { dragLeave(item); });
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
hostElement.removeEventListener('dragenter', function () { _isItemOut = false; });
|
|
113
|
+
hostElement.removeEventListener('dragleave', function () { _isItemOut = true; });
|
|
114
|
+
const draggables = dragableList.querySelectorAll("div.draggable");
|
|
115
|
+
draggables.forEach(draggable => {
|
|
116
|
+
draggable.removeEventListener('dragstart', function () { dragStart(draggable); });
|
|
117
|
+
});
|
|
118
|
+
listItems.forEach(item => {
|
|
119
|
+
item.removeEventListener('dragover', function (event) { dragOver(event); });
|
|
120
|
+
item.removeEventListener('drop', function () { dragDrop(item); });
|
|
121
|
+
item.removeEventListener('dragenter', function () { dragEnter(item); });
|
|
122
|
+
item.removeEventListener('dragleave', function () { dragLeave(item); });
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Retorna uma promessa com o estado da atual lista composta por objetos do tipo {value: string, checked: boolean}.
|
|
128
|
+
*/
|
|
129
|
+
async getState() {
|
|
130
|
+
let emitionList = [];
|
|
131
|
+
this._listItems.forEach(item => {
|
|
132
|
+
let emitionItem = {
|
|
133
|
+
value: this.getValueItem(item),
|
|
134
|
+
checked: this.getChecked(item)
|
|
135
|
+
};
|
|
136
|
+
emitionList.push(emitionItem);
|
|
137
|
+
});
|
|
138
|
+
return emitionList;
|
|
139
|
+
}
|
|
140
|
+
getChecked(item) {
|
|
141
|
+
if (this.isMultipleSelection) {
|
|
142
|
+
return item.children[0].children[1].value;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
if (!this._selectedItem)
|
|
146
|
+
return false;
|
|
147
|
+
return (item.children[0].children[1].textContent === this._selectedItem.value);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
getValueItem(item) {
|
|
151
|
+
if (this.isMultipleSelection) {
|
|
152
|
+
return item.children[0].children[2].textContent;
|
|
153
|
+
}
|
|
154
|
+
return item.children[0].children[1].textContent;
|
|
155
|
+
}
|
|
156
|
+
componentDidLoad() {
|
|
157
|
+
this.createList();
|
|
158
|
+
}
|
|
159
|
+
disconnectedCallback() {
|
|
160
|
+
if (this.draggable) {
|
|
161
|
+
this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, true);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
render() {
|
|
165
|
+
return (h(Host, { ref: (el) => this._hostElement = el }, h("ul", { ref: (el) => this._draggableList = el, class: "draggable-list", id: "draggable-list" })));
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
EzList.style = ezListCss;
|
|
169
|
+
|
|
170
|
+
export { EzList as ez_list };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-33153059.js';
|
|
2
2
|
|
|
3
3
|
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%}}";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-33153059.js';
|
|
2
2
|
import { N as NumberUtils } from './RequestMetadata-c265c9d5.js';
|
|
3
3
|
|
|
4
4
|
const ezNumberInputCss = ":host{--ni--height:42px;--ni--width:100%;--ni__icon--width:48px;--ni--border-radius:var(--border--radius-medium, 12px);--ni--font-size:var(--text--medium, 14px);--ni--font-family:var(--font-pattern, Arial);--ni__input--background-color:var(--background--medium, #e0e0e0);--ni__input--border:var(--border--medium, 2px solid);--ni__input--border-color:var(--ni__input--background-color);--ni__input--focus--border-color:var(--color--primary, #008561);--ni__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ni__input--disabled--color:var(--text--disable, #AFB6C0);--ni__input--error--border-color:#CC2936;--ni__placeholder--disabled--color:var(--text--disable, #AFB6C0);--ni__placeholder--color:var(--title--primary, #919191);--ni__placeholder--font-weight:var(--text-weight--large, 500);--ni__message_box--font-size:var(--text--small, 12px);--ni__message_box--info--color:var(--color--success, #22085d);--ni__message_box--error--color:var(--color--error, #FF0000);display:flex;flex-wrap:wrap;position:relative;width:var(--ni--width)}.invisible{visibility:hidden}input{width:100%;box-sizing:border-box;padding:var(--space--medium);height:var(--ni--height);border-radius:var(--ni--border-radius);font-family:var(--ni--font-family);font-size:var(--ni--font-size);border:var(--ni__input--border);border-color:var(--ni__input--border-color);background-color:var(--ni__input--background-color);font-weight:var(--text-weight--large)}input:disabled{background-color:var(--ni__input--disabled--background-color);color:var(--ni__input--disabled--color)}input:focus{outline:none;border-color:var(--ni__input--focus--border-color)}input.icon--left{padding-left:var(--ni__icon--width)}input.icon--right{padding-right:var(--ni__icon--width)}input::placeholder{color:var(--ni__placeholder--color);font-weight:var(--ni__placeholder--font-weight)}input:disabled::placeholder{color:var(--ni__placeholder--disabled--color)}input.hasError{color:inherit;border-color:var(--ni__input--error--border-color)}input.text--right{text-align:right}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;font-family:var(--ni--font-family);font-size:var(--ni__message_box--font-size);color:var(--ni__message_box--info--color)}.hasError{color:var(--ni__message_box--error--color)}.input__label{font-size:var(--text--medium);font-weight:var(--text-weight--large);left:var(--space--medium);position:absolute;color:var(--title--primary);top:var(--space--medium);font-family:var(--ni--font-family);-webkit-transition:font-size .3s, top .3s;transition:font-size .3s, top .3s;z-index:var(--visible)}.input__label--floated{font-family:var(--ni--font-family);font-size:var(--text--extra-small);top:var(--space--small);color:var(--text--primary)}.input__label--left{left:var(--ni__icon--width)}.input--with--label{padding-bottom:0}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-33153059.js';
|
|
2
2
|
import './RequestMetadata-c265c9d5.js';
|
|
3
3
|
import { F as FloatingManager } from './FloatingManager-bb90ef41.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-33153059.js';
|
|
2
2
|
|
|
3
3
|
const ezPopupCss = ":host{display:flex;--popup-z-index:var(--most-visible, 3);--popup__container--color:var(--title--primary, #2b3a54);--popup__container--padding:var(--space--large, 24px);--popup__header--padding-bottom:var(--space--medium, 12px);--popup__title--font-family:var(--font-pattern, \"'Sora', 'Algerian'\");--popup__title--font-size:var(--title--extra-large, 24px);--popup__title--color:var(--title--primary, #2b3a54);--popup__title--font-weight:var(--text-weight--large, 600);--popup__btn__close--icon-color:var(--title--primary, #2b3a54);--popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--popup__container--padding)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:flex;flex-wrap:wrap}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;width:100%;display:flex;flex-wrap:wrap;max-height:80vh;content-visibility:auto}.popup__header{padding-bottom:var(--popup__header--padding-bottom);width:100%;display:flex}.popup__title{display:flex;margin:0;width:100%;font-family:var(--popup__title--font-family);font-size:var(--popup__title--font-size);font-weight:var(--popup__title--font-weight);color:var(--popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--popup__btn__close--icon);mask-image:var(--popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
4
4
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as getAssetPath, H as Host, g as getElement } from './index-33153059.js';
|
|
2
2
|
import { M as MaskFormatter, T as TimeFormatter, N as NumberUtils } from './RequestMetadata-c265c9d5.js';
|
|
3
|
+
import { C as CSSVarsUtils } from './CSSVarsUtils-e0128b01.js';
|
|
3
4
|
|
|
4
|
-
const ezTimeInputCss = ":host{
|
|
5
|
+
const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";
|
|
5
6
|
|
|
6
7
|
let EzTimeInput = class {
|
|
7
8
|
constructor(hostRef) {
|
|
@@ -15,17 +16,6 @@ let EzTimeInput = class {
|
|
|
15
16
|
*/
|
|
16
17
|
this.showSeconds = false;
|
|
17
18
|
}
|
|
18
|
-
showError() {
|
|
19
|
-
const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
|
|
20
|
-
if (hasError) {
|
|
21
|
-
this._inputElem.classList.add('hasError');
|
|
22
|
-
this._messageBoxElem.classList.add('hasError');
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
this._inputElem.classList.remove('hasError');
|
|
26
|
-
this._messageBoxElem.classList.remove('hasError');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
19
|
prepareMask() {
|
|
30
20
|
if (this.showSeconds) {
|
|
31
21
|
if (this._maskFormatter == undefined) {
|
|
@@ -44,23 +34,6 @@ let EzTimeInput = class {
|
|
|
44
34
|
}
|
|
45
35
|
}
|
|
46
36
|
}
|
|
47
|
-
adjustFloatingLabel() {
|
|
48
|
-
if (this.label) {
|
|
49
|
-
if (!this._inputElem.classList.contains("input--with--label")) {
|
|
50
|
-
this._inputElem.classList.add("input--with--label");
|
|
51
|
-
}
|
|
52
|
-
if (this.viewValue && this.viewValue.toString().length > 0) {
|
|
53
|
-
if (!this._labelElem.classList.contains("input__label--floated")) {
|
|
54
|
-
this._labelElem.classList.add("input__label--floated");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
if (this._labelElem.classList.contains("input__label--floated")) {
|
|
59
|
-
this._labelElem.classList.remove("input__label--floated");
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
37
|
onValueChanged() {
|
|
65
38
|
if (this.value === NaN) {
|
|
66
39
|
this.value = undefined;
|
|
@@ -83,12 +56,6 @@ let EzTimeInput = class {
|
|
|
83
56
|
this._inputElem.blur();
|
|
84
57
|
}
|
|
85
58
|
//---------------------------------------------
|
|
86
|
-
// Test Methods
|
|
87
|
-
//---------------------------------------------
|
|
88
|
-
setInputElemnt(input) {
|
|
89
|
-
this._iconElement = input;
|
|
90
|
-
}
|
|
91
|
-
//---------------------------------------------
|
|
92
59
|
// Event handlers
|
|
93
60
|
//---------------------------------------------
|
|
94
61
|
handleFocusout() {
|
|
@@ -98,7 +65,6 @@ let EzTimeInput = class {
|
|
|
98
65
|
this.clearField();
|
|
99
66
|
this.errorMessage = "Favor inserir um horário válido.";
|
|
100
67
|
}
|
|
101
|
-
this.adjustFloatingLabel();
|
|
102
68
|
}
|
|
103
69
|
prepareValue(value) {
|
|
104
70
|
try {
|
|
@@ -116,40 +82,12 @@ let EzTimeInput = class {
|
|
|
116
82
|
this.viewValue = this._inputElem.value;
|
|
117
83
|
this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
118
84
|
}
|
|
119
|
-
adjustIconStyle() {
|
|
120
|
-
if (this._iconElement) {
|
|
121
|
-
this._iconElement.style.position = "absolute";
|
|
122
|
-
this._iconElement.style.display = "flex";
|
|
123
|
-
this._iconElement.style.alignItems = "center";
|
|
124
|
-
this._iconElement.style.justifyContent = "center";
|
|
125
|
-
this._iconElement.style.overflow = "hidden";
|
|
126
|
-
this._iconElement.style.top = "0px";
|
|
127
|
-
this._iconElement.style.width = "var(--eztime__icon--width)";
|
|
128
|
-
this._iconElement.style.height = "var(--eztime--height)";
|
|
129
|
-
this._iconElement.style.left = "0px";
|
|
130
|
-
this._iconElement.style.borderRadius = "var(--eztime--border-radius) 0 0 var(--eztime--border-radius)";
|
|
131
|
-
this._inputElem.classList.add('icon--left');
|
|
132
|
-
if (this._labelElem) {
|
|
133
|
-
this._labelElem.classList.add("input__label--left");
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
this.showError();
|
|
137
|
-
}
|
|
138
|
-
doFocus() {
|
|
139
|
-
if (this.label && this._labelElem) {
|
|
140
|
-
if (!this._labelElem.classList.contains("input__label--floated")) {
|
|
141
|
-
this._labelElem.classList.add("input__label--floated");
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
85
|
//---------------------------------------------
|
|
146
86
|
// Lifecycle web component
|
|
147
87
|
//---------------------------------------------
|
|
148
88
|
componentDidLoad() {
|
|
149
89
|
this.onValueChanged();
|
|
150
|
-
this.
|
|
151
|
-
this.adjustFloatingLabel();
|
|
152
|
-
this.showError();
|
|
90
|
+
CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
|
|
153
91
|
}
|
|
154
92
|
componentWillLoad() {
|
|
155
93
|
this.prepareMask();
|
|
@@ -161,12 +99,11 @@ let EzTimeInput = class {
|
|
|
161
99
|
}
|
|
162
100
|
}
|
|
163
101
|
render() {
|
|
164
|
-
return (h(Host, null, h("ez-
|
|
165
|
-
h("label", { onClick: () => this._inputElem.focus(), class: this.value ? "input__label input__label--floated" : "input__label", ref: (el) => this._labelElem = el, title: this.label }, this.label)
|
|
166
|
-
: null, h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.viewValue, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.errorMessage)));
|
|
102
|
+
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" }))));
|
|
167
103
|
}
|
|
104
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
105
|
+
get _elem() { return getElement(this); }
|
|
168
106
|
static get watchers() { return {
|
|
169
|
-
"errorMessage": ["showError"],
|
|
170
107
|
"showSeconds": ["prepareMask"],
|
|
171
108
|
"value": ["onValueChanged"]
|
|
172
109
|
}; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-33153059.js';
|
|
2
2
|
|
|
3
|
-
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}}";
|
|
3
|
+
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}}";
|
|
4
4
|
|
|
5
5
|
let EzToast = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -14,6 +14,9 @@ let EzToast = class {
|
|
|
14
14
|
*/
|
|
15
15
|
this.useIcon = false;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Exibe o componente na tela.
|
|
19
|
+
*/
|
|
17
20
|
async show() {
|
|
18
21
|
this.container.classList.add("toast__container--oppened");
|
|
19
22
|
this.container.style.animation = `fadein 0.5s, fadeout 0.5s ${this.fadeTime / 1000}s`;
|