@sankhyalabs/ezui 1.1.159 → 1.1.161
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-combo-box.cjs.entry.js +63 -28
- package/dist/cjs/ez-date-input.cjs.entry.js +71 -25
- package/dist/cjs/ez-date-time-input.cjs.entry.js +94 -31
- package/dist/cjs/ez-filter-input.cjs.entry.js +10 -4
- package/dist/cjs/ez-form.cjs.entry.js +54 -9
- package/dist/cjs/{grid-config.cjs.entry.js → ez-grid-config.cjs.entry.js} +6 -6
- package/dist/cjs/ez-grid.cjs.entry.js +16 -9
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +69 -25
- package/dist/cjs/ez-search.cjs.entry.js +20 -5
- package/dist/cjs/{select-box.cjs.entry.js → ez-select-box.cjs.entry.js} +3 -3
- package/dist/cjs/ez-text-area.cjs.entry.js +8 -2
- package/dist/cjs/ez-text-input.cjs.entry.js +30 -21
- package/dist/cjs/ez-time-input.cjs.entry.js +75 -40
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +10 -4
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +81 -28
- package/dist/collection/components/ez-date-input/ez-date-input.js +87 -25
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +108 -31
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +26 -4
- package/dist/collection/components/ez-form/DataBinder.js +12 -3
- package/dist/collection/components/ez-form/ez-form.js +43 -6
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +7 -3
- package/dist/collection/components/ez-grid/ez-grid.css +4 -0
- package/dist/collection/components/ez-grid/ez-grid.js +21 -14
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.css → ez-grid-config/ez-grid-config.css} +46 -20
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.js → ez-grid-config/ez-grid-config.js} +12 -12
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.css → ez-select-box/ez-select-box.css} +3 -4
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.js → ez-select-box/ez-select-box.js} +3 -3
- package/dist/collection/components/ez-list/ez-list.css +84 -46
- package/dist/collection/components/ez-modal/ez-modal.css +2 -2
- package/dist/collection/components/ez-number-input/ez-number-input.js +83 -25
- package/dist/collection/components/ez-search/ez-search.js +38 -5
- package/dist/collection/components/ez-text-area/ez-text-area.css +1 -1
- package/dist/collection/components/ez-text-area/ez-text-area.js +23 -1
- package/dist/collection/components/ez-text-input/ez-text-input.css +1 -1
- package/dist/collection/components/ez-text-input/ez-text-input.js +45 -38
- package/dist/collection/components/ez-time-input/ez-time-input.js +95 -59
- package/dist/custom-elements/index.d.ts +12 -12
- package/dist/custom-elements/index.js +1121 -810
- package/dist/esm/ez-combo-box.entry.js +63 -28
- package/dist/esm/ez-date-input.entry.js +71 -25
- package/dist/esm/ez-date-time-input.entry.js +94 -31
- package/dist/esm/ez-filter-input.entry.js +10 -4
- package/dist/esm/ez-form.entry.js +54 -9
- package/dist/esm/{grid-config.entry.js → ez-grid-config.entry.js} +6 -6
- package/dist/esm/ez-grid.entry.js +16 -9
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +69 -25
- package/dist/esm/ez-search.entry.js +20 -5
- package/dist/esm/{select-box.entry.js → ez-select-box.entry.js} +3 -3
- package/dist/esm/ez-text-area.entry.js +8 -2
- package/dist/esm/ez-text-input.entry.js +30 -21
- package/dist/esm/ez-time-input.entry.js +76 -41
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-003d53b1.entry.js +1 -0
- package/dist/ezui/p-1fecaeb8.entry.js +1 -0
- package/dist/ezui/p-267fa515.entry.js +1 -0
- package/dist/ezui/p-2acf7d59.entry.js +1 -0
- package/dist/ezui/p-403de0a4.entry.js +1 -0
- package/dist/ezui/p-4c3d136c.entry.js +1 -0
- package/dist/ezui/p-53bbba8e.entry.js +1 -0
- package/dist/ezui/p-6668c3b0.entry.js +1 -0
- package/dist/ezui/p-7fd6deec.entry.js +1 -0
- package/dist/ezui/p-8c1b9fe0.entry.js +1 -0
- package/dist/ezui/{p-be87ac5e.entry.js → p-8d73594f.entry.js} +1 -1
- package/dist/ezui/p-988ff301.entry.js +1 -0
- package/dist/ezui/p-cf56d3e8.entry.js +1 -0
- package/dist/ezui/{p-727a39e5.entry.js → p-fd6f3bf9.entry.js} +1 -1
- package/dist/ezui/p-ff7b4b13.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +13 -7
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -3
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +15 -7
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +5 -1
- package/dist/types/components/ez-form/DataBinder.d.ts +1 -1
- package/dist/types/components/ez-form/ez-form.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +9 -6
- package/dist/types/components/ez-grid/subcomponents/{gridconfig/grid-config.d.ts → ez-grid-config/ez-grid-config.d.ts} +4 -4
- package/dist/types/components/ez-grid/subcomponents/{select-box/select-box.d.ts → ez-select-box/ez-select-box.d.ts} +0 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +14 -5
- package/dist/types/components/ez-search/ez-search.d.ts +6 -1
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +7 -6
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +17 -13
- package/dist/types/components.d.ts +84 -61
- package/package.json +1 -1
- package/react/components.d.ts +2 -2
- package/react/components.js +2 -2
- package/react/components.js.map +1 -1
- package/dist/ezui/p-1859a3d8.entry.js +0 -1
- package/dist/ezui/p-49fdfa4b.entry.js +0 -1
- package/dist/ezui/p-4fdceb7d.entry.js +0 -1
- package/dist/ezui/p-6d4b1628.entry.js +0 -1
- package/dist/ezui/p-8f4fac31.entry.js +0 -1
- package/dist/ezui/p-91377c65.entry.js +0 -1
- package/dist/ezui/p-b524dfca.entry.js +0 -1
- package/dist/ezui/p-bc8aa27f.entry.js +0 -1
- package/dist/ezui/p-bea6f8a6.entry.js +0 -1
- package/dist/ezui/p-c2de757f.entry.js +0 -1
- package/dist/ezui/p-ec21ecce.entry.js +0 -1
- package/dist/ezui/p-ecee9d8d.entry.js +0 -1
- package/dist/ezui/p-fc9b9487.entry.js +0 -1
|
@@ -631,7 +631,7 @@ class CSSVarsUtils {
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
|
|
634
|
-
const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__list-scrollbar--background-color:var(--
|
|
634
|
+
const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__list-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-combo-box__list-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-combo-box__list-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__list-scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--ez-combo-box__list-scrollbar--background-color-primary) var(--ez-combo-box__list-scrollbar--background-color-secondary)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__list-scrollbar--background-color-primary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);width:var(--ez-combo-box__list-scrollbar--width);max-width:var(--ez-combo-box__list-scrollbar--width);min-width:var(--ez-combo-box__list-scrollbar--width)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary)}.item__value--hidden{visibility:hidden;position:absolute;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:calc(var(--ez-combo-box__list-height) * 1.5)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:16px;height:16px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
635
635
|
|
|
636
636
|
let EzComboBox$1 = class extends HTMLElement$1 {
|
|
637
637
|
constructor() {
|
|
@@ -676,40 +676,66 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
676
676
|
*/
|
|
677
677
|
this.mode = "regular";
|
|
678
678
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
679
|
+
observeErrorMessage() {
|
|
680
|
+
var _a;
|
|
681
|
+
if (this._textInput) {
|
|
682
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
683
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
684
|
+
this.setInputValue();
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
observeValue(newValue, oldValue) {
|
|
689
|
+
var _a, _b, _c, _d;
|
|
690
|
+
if (this._textInput && newValue != oldValue) {
|
|
691
|
+
const newValueSelected = this.getSelectedOption(newValue);
|
|
692
|
+
const oldValueSelected = this.getSelectedOption(oldValue);
|
|
693
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
694
|
+
if (((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) != ((_b = newValueSelected === null || newValueSelected === void 0 ? void 0 : newValueSelected.value) === null || _b === void 0 ? void 0 : _b.toString())) {
|
|
695
|
+
this.value = newValueSelected;
|
|
696
|
+
}
|
|
697
|
+
if (((_c = newValueSelected === null || newValueSelected === void 0 ? void 0 : newValueSelected.value) === null || _c === void 0 ? void 0 : _c.toString()) !== ((_d = oldValueSelected === null || oldValueSelected === void 0 ? void 0 : oldValueSelected.value) === null || _d === void 0 ? void 0 : _d.toString())) {
|
|
698
|
+
this.setInputValue();
|
|
699
|
+
const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
|
|
700
|
+
this.ezChange.emit(valueEmitted);
|
|
701
|
+
}
|
|
702
|
+
this.hideOptions();
|
|
703
|
+
this._criteria = undefined;
|
|
704
|
+
this._preSelection = undefined;
|
|
705
|
+
this.updateVisibleOptions();
|
|
682
706
|
}
|
|
683
|
-
this.hideOptions();
|
|
684
|
-
this._criteria = undefined;
|
|
685
|
-
this._preSelection = undefined;
|
|
686
|
-
this.updateVisibleOptions();
|
|
687
707
|
}
|
|
688
708
|
/**
|
|
689
709
|
* Realiza o foco no componente de seleção
|
|
690
710
|
*/
|
|
691
711
|
async setFocus() {
|
|
692
|
-
this.
|
|
712
|
+
this._textInput.setFocus();
|
|
693
713
|
}
|
|
694
714
|
/**
|
|
695
715
|
* Remove o foco no componente de seleção
|
|
696
716
|
*/
|
|
697
717
|
async setBlur() {
|
|
698
|
-
this.
|
|
718
|
+
this._textInput.setBlur();
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
722
|
+
*/
|
|
723
|
+
async isInvalid() {
|
|
724
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
699
725
|
}
|
|
700
726
|
getText() {
|
|
701
727
|
let text = "";
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
704
|
-
text = this.showSelectedValue ? `${
|
|
728
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
729
|
+
if (currentValue) {
|
|
730
|
+
text = this.showSelectedValue ? `${currentValue.value} - ${currentValue.label}` : currentValue.label;
|
|
705
731
|
}
|
|
706
732
|
return text;
|
|
707
733
|
}
|
|
708
|
-
getSelectedOption() {
|
|
709
|
-
if (typeof
|
|
710
|
-
return this._visibleOptions.find(o => o.value ===
|
|
734
|
+
getSelectedOption(value) {
|
|
735
|
+
if (typeof value === "string" || value instanceof String) {
|
|
736
|
+
return this._visibleOptions.find(o => o.value === value);
|
|
711
737
|
}
|
|
712
|
-
return
|
|
738
|
+
return value;
|
|
713
739
|
}
|
|
714
740
|
updateVisibleOptions() {
|
|
715
741
|
let opts = this._source || [];
|
|
@@ -764,7 +790,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
764
790
|
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
765
791
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
766
792
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
767
|
-
const top = (this.errorMessage || !this.canShowError || this.mode
|
|
793
|
+
const top = (this.errorMessage || !this.canShowError || this.mode === "slim") ? "0px" : "-19px";
|
|
768
794
|
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, top });
|
|
769
795
|
window.requestAnimationFrame(() => {
|
|
770
796
|
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
@@ -847,15 +873,13 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
847
873
|
}
|
|
848
874
|
selectOption(newOption) {
|
|
849
875
|
var _a, _b;
|
|
850
|
-
const
|
|
851
|
-
if (((_a =
|
|
876
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
877
|
+
if (((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString())) {
|
|
852
878
|
const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
|
|
853
879
|
this.value = adjustedOpt;
|
|
854
|
-
this.errorMessage = "";
|
|
855
|
-
this.ezChange.emit(this.value);
|
|
856
880
|
}
|
|
857
881
|
else {
|
|
858
|
-
this.
|
|
882
|
+
this.setInputValue();
|
|
859
883
|
}
|
|
860
884
|
if (this.searchMode) {
|
|
861
885
|
this._visibleOptions = [];
|
|
@@ -872,11 +896,20 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
872
896
|
}
|
|
873
897
|
}
|
|
874
898
|
cancelPreselection() {
|
|
875
|
-
if (!this.
|
|
899
|
+
if (!this._textInput.value && this.value) {
|
|
876
900
|
this.selectOption(undefined);
|
|
877
901
|
}
|
|
878
902
|
else {
|
|
879
|
-
this.
|
|
903
|
+
this.setInputValue();
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
setInputValue(clearError = true) {
|
|
907
|
+
const textValue = this.getText();
|
|
908
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
909
|
+
this._textInput.value = textValue;
|
|
910
|
+
if (clearError) {
|
|
911
|
+
this.errorMessage = "";
|
|
912
|
+
}
|
|
880
913
|
}
|
|
881
914
|
}
|
|
882
915
|
clearSearch() {
|
|
@@ -934,7 +967,8 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
934
967
|
}
|
|
935
968
|
}
|
|
936
969
|
componentDidLoad() {
|
|
937
|
-
CSSVarsUtils.applyVarsTextInput(this.el, this.
|
|
970
|
+
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
971
|
+
this.setInputValue(false);
|
|
938
972
|
}
|
|
939
973
|
//---------------------------------------------
|
|
940
974
|
// Event handlers
|
|
@@ -954,7 +988,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
954
988
|
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
955
989
|
const argumentNumber = Number(argument || undefined);
|
|
956
990
|
if (!this._criteria) {
|
|
957
|
-
this.
|
|
991
|
+
this._textInput.value = event.data || argument;
|
|
958
992
|
}
|
|
959
993
|
this._criteria = argument;
|
|
960
994
|
if (argument && (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch)) {
|
|
@@ -1012,7 +1046,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
1012
1046
|
}
|
|
1013
1047
|
render() {
|
|
1014
1048
|
var _a;
|
|
1015
|
-
return (h(Host, null, h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this.
|
|
1049
|
+
return (h(Host, null, h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
|
|
1016
1050
|
? h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
1017
1051
|
: undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("div", { class: "list-options", ref: elem => this._optionsList = elem }, this._visibleOptions.length === 0
|
|
1018
1052
|
&& h("div", { class: "message" }, !this._showLoading && h("span", { class: "message__no-result" }, this._textEmptyList), this._showLoading && h("div", { class: "message__loading" })), this.showOptionValue
|
|
@@ -1021,6 +1055,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
1021
1055
|
}
|
|
1022
1056
|
get el() { return this; }
|
|
1023
1057
|
static get watchers() { return {
|
|
1058
|
+
"errorMessage": ["observeErrorMessage"],
|
|
1024
1059
|
"value": ["observeValue"]
|
|
1025
1060
|
}; }
|
|
1026
1061
|
static get style() { return ezComboBoxCss; }
|
|
@@ -1036,6 +1071,7 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
1036
1071
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
1037
1072
|
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
1038
1073
|
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
1074
|
+
this._focused = false;
|
|
1039
1075
|
/**
|
|
1040
1076
|
* Deixa o campo disponível ou não para uso.
|
|
1041
1077
|
*/
|
|
@@ -1046,18 +1082,33 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
1046
1082
|
this.mode = "regular";
|
|
1047
1083
|
}
|
|
1048
1084
|
observeLabel() {
|
|
1049
|
-
this._textInput
|
|
1085
|
+
if (this._textInput) {
|
|
1086
|
+
this._textInput.label = this.label;
|
|
1087
|
+
}
|
|
1050
1088
|
}
|
|
1051
1089
|
observeErrorMessage() {
|
|
1090
|
+
var _a;
|
|
1052
1091
|
if (this._textInput) {
|
|
1053
1092
|
this._textInput.errorMessage = this.errorMessage;
|
|
1093
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
1094
|
+
this.setInputValue();
|
|
1095
|
+
}
|
|
1054
1096
|
}
|
|
1055
1097
|
}
|
|
1056
1098
|
observeValue(newValue, oldValue) {
|
|
1057
|
-
if (newValue != oldValue) {
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1099
|
+
if (this._textInput && newValue != oldValue) {
|
|
1100
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1101
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
1102
|
+
if ((newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime()) !== (oldValueValidated === null || oldValueValidated === void 0 ? void 0 : oldValueValidated.getTime())) {
|
|
1103
|
+
const textValue = this.getTextValue(newValueValidated) || '';
|
|
1104
|
+
const parsedDate = DateUtils.strToDate(textValue);
|
|
1105
|
+
if ((parsedDate || !this._focused) && (this._textInput.value || '') !== textValue) {
|
|
1106
|
+
this._textInput.value = textValue;
|
|
1107
|
+
this._focused = false;
|
|
1108
|
+
this.errorMessage = "";
|
|
1109
|
+
}
|
|
1110
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
1111
|
+
this.ezChange.emit(valueEmitted);
|
|
1061
1112
|
}
|
|
1062
1113
|
}
|
|
1063
1114
|
}
|
|
@@ -1073,59 +1124,89 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
1073
1124
|
async setBlur() {
|
|
1074
1125
|
this._textInput.setBlur();
|
|
1075
1126
|
}
|
|
1127
|
+
/**
|
|
1128
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
1129
|
+
*/
|
|
1130
|
+
async isInvalid() {
|
|
1131
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
1132
|
+
}
|
|
1076
1133
|
changeValue(newValue) {
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
if ((newValue === null || newValue === void 0 ? void 0 : newValue.toString()) !== ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString())) {
|
|
1082
|
-
this.value = newValue;
|
|
1083
|
-
this.ezChange.emit(this.value);
|
|
1134
|
+
const currentValue = this.validateValue(this.value);
|
|
1135
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1136
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1137
|
+
this.value = newValueValidated;
|
|
1084
1138
|
}
|
|
1085
1139
|
}
|
|
1086
1140
|
showCalendar() {
|
|
1087
|
-
this.
|
|
1141
|
+
this.handleBlur();
|
|
1088
1142
|
this._calendar.value = this.value;
|
|
1089
1143
|
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
1090
1144
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
1091
1145
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
1092
|
-
const top = this.
|
|
1146
|
+
const top = this.errorMessage || this.mode === "slim" ? 0 : -19;
|
|
1093
1147
|
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
1094
1148
|
}
|
|
1095
1149
|
hideCalendar() {
|
|
1096
1150
|
this.changeValue(this._calendar.value);
|
|
1097
1151
|
this._calendar.hide();
|
|
1098
1152
|
}
|
|
1099
|
-
|
|
1153
|
+
handleBlur() {
|
|
1100
1154
|
const strValue = this._textInput.value;
|
|
1101
|
-
const
|
|
1102
|
-
if (
|
|
1103
|
-
|
|
1104
|
-
|
|
1155
|
+
const newValue = DateUtils.strToDate(strValue);
|
|
1156
|
+
if (newValue || !strValue) {
|
|
1157
|
+
this.errorMessage = "";
|
|
1158
|
+
const currentValue = this.validateValue(this.value);
|
|
1159
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1160
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1161
|
+
if (newValueValidated) {
|
|
1162
|
+
this._textInput.value = this.getTextValue(newValueValidated) || '';
|
|
1163
|
+
this._focused = false;
|
|
1164
|
+
}
|
|
1165
|
+
this.ezCancelWaitingChange.emit();
|
|
1105
1166
|
}
|
|
1106
1167
|
else {
|
|
1107
|
-
this.changeValue(
|
|
1168
|
+
this.changeValue(newValueValidated);
|
|
1108
1169
|
}
|
|
1109
1170
|
}
|
|
1110
1171
|
else {
|
|
1172
|
+
this.changeValue(undefined);
|
|
1111
1173
|
this.ezCancelWaitingChange.emit();
|
|
1112
|
-
this.
|
|
1174
|
+
this.errorMessage = "O valor digitado não é uma data válida";
|
|
1113
1175
|
}
|
|
1114
1176
|
}
|
|
1115
1177
|
getTextValue(d) {
|
|
1116
1178
|
return d ? new Intl.DateTimeFormat("pt-BR").format(d) : undefined;
|
|
1117
1179
|
}
|
|
1118
|
-
|
|
1119
|
-
this.
|
|
1180
|
+
handleInput() {
|
|
1181
|
+
const strValue = this._textInput.value;
|
|
1182
|
+
const newValue = DateUtils.strToDate(strValue);
|
|
1183
|
+
const currentValue = this.validateValue(this.value);
|
|
1184
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1185
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1186
|
+
this._focused = true;
|
|
1187
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
validateValue(value) {
|
|
1191
|
+
return value instanceof Date && !isNaN(value.valueOf())
|
|
1192
|
+
? DateUtils.clearTime(value)
|
|
1193
|
+
: undefined;
|
|
1194
|
+
}
|
|
1195
|
+
setInputValue() {
|
|
1196
|
+
const textValue = this.getTextValue(this.value) || '';
|
|
1197
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
1198
|
+
this._textInput.value = textValue;
|
|
1199
|
+
}
|
|
1120
1200
|
}
|
|
1121
1201
|
componentDidLoad() {
|
|
1122
1202
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
1203
|
+
this.setInputValue();
|
|
1123
1204
|
}
|
|
1124
1205
|
render() {
|
|
1125
|
-
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem,
|
|
1206
|
+
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", onKeyDown: event => {
|
|
1126
1207
|
if (event.key === "H" || event.key === "h")
|
|
1127
1208
|
this.changeValue(new Date());
|
|
1128
|
-
}, label: this.label,
|
|
1209
|
+
}, label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }, 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 })));
|
|
1129
1210
|
}
|
|
1130
1211
|
get _elem() { return this; }
|
|
1131
1212
|
static get watchers() { return {
|
|
@@ -1146,6 +1227,7 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1146
1227
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
1147
1228
|
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
1148
1229
|
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
1230
|
+
this._focused = false;
|
|
1149
1231
|
/**
|
|
1150
1232
|
* Deixa o campo disponível ou não para uso.
|
|
1151
1233
|
*/
|
|
@@ -1160,14 +1242,34 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1160
1242
|
this.mode = "regular";
|
|
1161
1243
|
}
|
|
1162
1244
|
observeLabel() {
|
|
1163
|
-
this._textInput
|
|
1245
|
+
if (this._textInput) {
|
|
1246
|
+
this._textInput.label = this.label;
|
|
1247
|
+
}
|
|
1164
1248
|
}
|
|
1165
1249
|
observeErrorMessage() {
|
|
1166
|
-
|
|
1167
|
-
}
|
|
1168
|
-
observeValue() {
|
|
1250
|
+
var _a;
|
|
1169
1251
|
if (this._textInput) {
|
|
1170
|
-
this._textInput.
|
|
1252
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
1253
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
1254
|
+
this.setInputValue();
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
observeValue(newValue, oldValue) {
|
|
1259
|
+
if (this._textInput && newValue != oldValue) {
|
|
1260
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1261
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
1262
|
+
if ((newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime()) !== (oldValueValidated === null || oldValueValidated === void 0 ? void 0 : oldValueValidated.getTime())) {
|
|
1263
|
+
const textValue = this.getTextValue(newValueValidated) || '';
|
|
1264
|
+
const parsedDate = this.getParsedDateTime(textValue);
|
|
1265
|
+
if ((parsedDate || !this._focused) && (this._textInput.value || '') !== textValue) {
|
|
1266
|
+
this._textInput.value = textValue;
|
|
1267
|
+
this._focused = false;
|
|
1268
|
+
this.errorMessage = "";
|
|
1269
|
+
}
|
|
1270
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
1271
|
+
this.ezChange.emit(valueEmitted);
|
|
1272
|
+
}
|
|
1171
1273
|
}
|
|
1172
1274
|
}
|
|
1173
1275
|
/**
|
|
@@ -1182,30 +1284,36 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1182
1284
|
async setBlur() {
|
|
1183
1285
|
this._textInput.setBlur();
|
|
1184
1286
|
}
|
|
1185
|
-
|
|
1287
|
+
/**
|
|
1288
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
1289
|
+
*/
|
|
1290
|
+
async isInvalid() {
|
|
1291
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
1292
|
+
}
|
|
1293
|
+
handleKeyDown(event) {
|
|
1186
1294
|
const input = this._textInput.shadowRoot.querySelector('input');
|
|
1187
|
-
if (
|
|
1295
|
+
if (event.key === "H" || event.key === "h") {
|
|
1188
1296
|
this.changeValue(new Date());
|
|
1189
1297
|
}
|
|
1190
|
-
else if (
|
|
1298
|
+
else if (event.shiftKey && event.key === "Tab") {
|
|
1191
1299
|
if (input.selectionStart > 0) {
|
|
1192
1300
|
let selectIni = input.value.lastIndexOf(" ", input.selectionStart);
|
|
1193
1301
|
if (selectIni !== -1) {
|
|
1194
1302
|
input.setSelectionRange(0, selectIni);
|
|
1195
|
-
|
|
1303
|
+
event.preventDefault();
|
|
1196
1304
|
}
|
|
1197
1305
|
}
|
|
1198
1306
|
}
|
|
1199
|
-
else if (
|
|
1307
|
+
else if (event.key === "Tab") {
|
|
1200
1308
|
if (input.value.length !== input.selectionEnd) {
|
|
1201
1309
|
let selectIni = input.value.indexOf(" ", input.selectionEnd);
|
|
1202
1310
|
selectIni = selectIni === -1 ? input.selectionEnd : selectIni + 1;
|
|
1203
1311
|
input.setSelectionRange(selectIni, input.value.length);
|
|
1204
|
-
|
|
1312
|
+
event.preventDefault();
|
|
1205
1313
|
}
|
|
1206
1314
|
}
|
|
1207
1315
|
}
|
|
1208
|
-
|
|
1316
|
+
handleFocus() {
|
|
1209
1317
|
const input = this._textInput.shadowRoot.querySelector('input');
|
|
1210
1318
|
if (input.selectionStart !== input.selectionEnd) {
|
|
1211
1319
|
let selectIni = input.value.indexOf(" ", input.selectionStart);
|
|
@@ -1213,7 +1321,7 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1213
1321
|
input.setSelectionRange(0, selectIni);
|
|
1214
1322
|
}
|
|
1215
1323
|
}
|
|
1216
|
-
|
|
1324
|
+
handleClick() {
|
|
1217
1325
|
const input = this._textInput.shadowRoot.querySelector('input');
|
|
1218
1326
|
let selectIni = input.value.lastIndexOf(" ", input.selectionEnd);
|
|
1219
1327
|
selectIni = selectIni === -1 ? 0 : selectIni + 1;
|
|
@@ -1222,37 +1330,55 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1222
1330
|
input.setSelectionRange(selectIni, selectFin);
|
|
1223
1331
|
}
|
|
1224
1332
|
changeValue(newValue) {
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
if ((
|
|
1228
|
-
this.value =
|
|
1229
|
-
this.ezChange.emit(this.value);
|
|
1333
|
+
const currentValue = this.validateValue(this.value);
|
|
1334
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1335
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1336
|
+
this.value = newValueValidated;
|
|
1230
1337
|
}
|
|
1231
1338
|
}
|
|
1232
1339
|
showCalendar() {
|
|
1233
|
-
const top = this.
|
|
1340
|
+
const top = this.errorMessage || this.mode === "slim" ? 0 : -19;
|
|
1234
1341
|
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
1235
1342
|
this._calendar.style.visibility = 'inherit';
|
|
1236
1343
|
}
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1344
|
+
getParsedDateTime(strValue) {
|
|
1345
|
+
var _a, _b;
|
|
1346
|
+
if (strValue === void 0) {
|
|
1347
|
+
strValue = (((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "");
|
|
1348
|
+
}
|
|
1349
|
+
if (!strValue) {
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
const partsDateTime = strValue.split(" ");
|
|
1240
1353
|
const onlyDate = partsDateTime.length > 0 ? partsDateTime[0] : strValue;
|
|
1241
1354
|
const onlyTime = partsDateTime[1] ? partsDateTime[1] : "";
|
|
1242
1355
|
const parsedTime = TimeFormatter.prepareValue(onlyTime, this.showSeconds);
|
|
1243
1356
|
const strDateTime = onlyDate + (parsedTime && " " + parsedTime);
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1357
|
+
return DateUtils.strToDate(strDateTime);
|
|
1358
|
+
}
|
|
1359
|
+
handleBlur() {
|
|
1360
|
+
var _a, _b;
|
|
1361
|
+
const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
|
|
1362
|
+
const newValue = this.getParsedDateTime();
|
|
1363
|
+
if (newValue || !strValue) {
|
|
1364
|
+
this.errorMessage = "";
|
|
1365
|
+
const currentValue = this.validateValue(this.value);
|
|
1366
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1367
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1368
|
+
if (newValueValidated) {
|
|
1369
|
+
this._textInput.value = this.getTextValue(newValueValidated) || '';
|
|
1370
|
+
this._focused = false;
|
|
1371
|
+
}
|
|
1372
|
+
this.ezCancelWaitingChange.emit();
|
|
1248
1373
|
}
|
|
1249
1374
|
else {
|
|
1250
|
-
this.changeValue(
|
|
1375
|
+
this.changeValue(newValueValidated);
|
|
1251
1376
|
}
|
|
1252
1377
|
}
|
|
1253
1378
|
else {
|
|
1379
|
+
this.changeValue(undefined);
|
|
1254
1380
|
this.ezCancelWaitingChange.emit();
|
|
1255
|
-
this.
|
|
1381
|
+
this.errorMessage = "O valor digitado não é uma data válida";
|
|
1256
1382
|
}
|
|
1257
1383
|
}
|
|
1258
1384
|
getTextValue(d) {
|
|
@@ -1266,14 +1392,32 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1266
1392
|
};
|
|
1267
1393
|
return d ? (new Intl.DateTimeFormat('pt-BR', this.showSeconds ? optionsSecond : options).format(d)) : undefined;
|
|
1268
1394
|
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1395
|
+
validateValue(value) {
|
|
1396
|
+
return value instanceof Date && !isNaN(value.valueOf())
|
|
1397
|
+
? value
|
|
1398
|
+
: undefined;
|
|
1399
|
+
}
|
|
1400
|
+
handleInput() {
|
|
1401
|
+
const newValue = this.getParsedDateTime();
|
|
1402
|
+
const currentValue = this.validateValue(this.value);
|
|
1403
|
+
const newValueValidated = this.validateValue(newValue);
|
|
1404
|
+
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
1405
|
+
this._focused = true;
|
|
1406
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
setInputValue() {
|
|
1410
|
+
const textValue = this.getTextValue(this.value) || '';
|
|
1411
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
1412
|
+
this._textInput.value = textValue;
|
|
1413
|
+
}
|
|
1271
1414
|
}
|
|
1272
1415
|
componentDidLoad() {
|
|
1273
1416
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
1417
|
+
this.setInputValue();
|
|
1274
1418
|
}
|
|
1275
1419
|
render() {
|
|
1276
|
-
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem,
|
|
1420
|
+
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), onFocus: () => this.handleFocus(), onClick: () => this.handleClick() }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
1277
1421
|
}
|
|
1278
1422
|
get _elem() { return this; }
|
|
1279
1423
|
static get watchers() { return {
|
|
@@ -1399,9 +1543,10 @@ let EzFilterInput$1 = class extends HTMLElement$1 {
|
|
|
1399
1543
|
this._textInput.errorMessage = this.errorMessage;
|
|
1400
1544
|
}
|
|
1401
1545
|
}
|
|
1402
|
-
observeValue() {
|
|
1403
|
-
if (this._textInput) {
|
|
1404
|
-
this._textInput.value =
|
|
1546
|
+
observeValue(newValue, oldValue) {
|
|
1547
|
+
if (this._textInput && newValue != oldValue) {
|
|
1548
|
+
this._textInput.value = newValue;
|
|
1549
|
+
this.ezChange.emit(newValue);
|
|
1405
1550
|
}
|
|
1406
1551
|
}
|
|
1407
1552
|
/**
|
|
@@ -1416,12 +1561,17 @@ let EzFilterInput$1 = class extends HTMLElement$1 {
|
|
|
1416
1561
|
async setBlur() {
|
|
1417
1562
|
this._textInput.setBlur();
|
|
1418
1563
|
}
|
|
1564
|
+
/**
|
|
1565
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
1566
|
+
*/
|
|
1567
|
+
async isInvalid() {
|
|
1568
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
1569
|
+
}
|
|
1419
1570
|
changeValue(evt) {
|
|
1420
1571
|
const newValue = evt.detail;
|
|
1421
1572
|
this.errorMessage = "";
|
|
1422
1573
|
if (newValue !== this.value) {
|
|
1423
1574
|
this.value = newValue;
|
|
1424
|
-
this.ezChange.emit(this.value);
|
|
1425
1575
|
}
|
|
1426
1576
|
}
|
|
1427
1577
|
componentDidLoad() {
|
|
@@ -2068,7 +2218,7 @@ class DataBinder {
|
|
|
2068
2218
|
case Action.NEXT_SELECTED:
|
|
2069
2219
|
case Action.PREVIOUS_SELECTED:
|
|
2070
2220
|
(_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
|
|
2071
|
-
this.updateValue(field.fieldName, field.field);
|
|
2221
|
+
this.updateValue(field.fieldName, field.field, action.type === Action.EDITION_CANCELED);
|
|
2072
2222
|
});
|
|
2073
2223
|
break;
|
|
2074
2224
|
}
|
|
@@ -2086,15 +2236,24 @@ class DataBinder {
|
|
|
2086
2236
|
onDisconnectedCallback() {
|
|
2087
2237
|
this._dataUnit.unsubscribe(this.onDataUnitEvent);
|
|
2088
2238
|
}
|
|
2089
|
-
updateValue(fieldName, field) {
|
|
2239
|
+
updateValue(fieldName, field, actionCanceled = false) {
|
|
2240
|
+
var _a;
|
|
2090
2241
|
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
2242
|
+
/**
|
|
2243
|
+
* FIXME: Campo já salvo com undefined, ao inserir valor inválido e cancelar,
|
|
2244
|
+
* o campo não é limpo e atualizado automaticamente, pois o value não mudou,
|
|
2245
|
+
* assim, não dispara o Watch do value, que é o responsável por limpar o errorMessage.
|
|
2246
|
+
*/
|
|
2247
|
+
if (actionCanceled && ((_a = field["errorMessage"]) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
2248
|
+
field["errorMessage"] = "";
|
|
2249
|
+
}
|
|
2091
2250
|
}
|
|
2092
2251
|
updateBind(fieldName, field) {
|
|
2093
2252
|
const oldBind = this._fields.get(fieldName);
|
|
2094
2253
|
if (oldBind) {
|
|
2095
2254
|
oldBind.destroy();
|
|
2096
2255
|
}
|
|
2097
|
-
|
|
2256
|
+
this.updateValue(fieldName, field);
|
|
2098
2257
|
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName) => this.cancelWaitingChange(fieldName), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
2099
2258
|
this.bindSearchOptionsLoader(fieldName, field);
|
|
2100
2259
|
this.applyEzUploadContext(fieldName, field);
|
|
@@ -2226,25 +2385,58 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2226
2385
|
return Promise.resolve();
|
|
2227
2386
|
}
|
|
2228
2387
|
validate() {
|
|
2229
|
-
return new Promise((accept, reject) => {
|
|
2388
|
+
return new Promise(async (accept, reject) => {
|
|
2230
2389
|
const metadata = selectFormMetadata(this._store.getState());
|
|
2231
2390
|
const requiredFields = this._staticFields
|
|
2232
2391
|
.filter(f => f.dataset.required)
|
|
2233
2392
|
.map(f => f.dataset.fieldName)
|
|
2234
2393
|
.concat(metadata.getRequiredFields());
|
|
2394
|
+
let isReject = false;
|
|
2235
2395
|
const records = this.dataUnit.getModifiedRecords();
|
|
2236
2396
|
for (let i = 0; i < records.length; i++) {
|
|
2237
2397
|
if (!this.validateRequired(requiredFields, records[i])) {
|
|
2238
|
-
|
|
2398
|
+
isReject = true;
|
|
2239
2399
|
break;
|
|
2240
2400
|
}
|
|
2241
2401
|
}
|
|
2242
|
-
|
|
2402
|
+
if (!isReject) {
|
|
2403
|
+
const validateError = await this.validateError();
|
|
2404
|
+
if (!validateError) {
|
|
2405
|
+
isReject = true;
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
if (isReject) {
|
|
2409
|
+
reject();
|
|
2410
|
+
}
|
|
2411
|
+
else {
|
|
2412
|
+
accept();
|
|
2413
|
+
}
|
|
2243
2414
|
});
|
|
2244
2415
|
}
|
|
2245
2416
|
observeConfig() {
|
|
2246
2417
|
this.processMetadata();
|
|
2247
2418
|
}
|
|
2419
|
+
async validateError() {
|
|
2420
|
+
var _a;
|
|
2421
|
+
const invalidFields = [];
|
|
2422
|
+
const dataFields = (_a = this._element) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[data-field-name]");
|
|
2423
|
+
if (dataFields && dataFields.length > 0) {
|
|
2424
|
+
for (let i = 0; i < dataFields.length; i++) {
|
|
2425
|
+
const fieldElem = dataFields[i];
|
|
2426
|
+
if (fieldElem && fieldElem['isInvalid']) {
|
|
2427
|
+
const hasError = await fieldElem['isInvalid']();
|
|
2428
|
+
if (hasError && fieldElem['dataset']) {
|
|
2429
|
+
invalidFields.push(fieldElem['dataset'].fieldName);
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
const isValid = invalidFields.length === 0;
|
|
2435
|
+
if (!isValid) {
|
|
2436
|
+
ApplicationUtils.info("Há pelo menos um campo com conteúdo inválido.");
|
|
2437
|
+
}
|
|
2438
|
+
return isValid;
|
|
2439
|
+
}
|
|
2248
2440
|
validateRequired(requiredFields, record) {
|
|
2249
2441
|
const invalidFields = [];
|
|
2250
2442
|
requiredFields.forEach(field => {
|
|
@@ -2257,13 +2449,16 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2257
2449
|
* na aba, isso será tratado no card: https://sankhya.atlassian.net/browse/SKA-44182
|
|
2258
2450
|
*/
|
|
2259
2451
|
if (fieldElem) {
|
|
2452
|
+
/**
|
|
2453
|
+
* Devido o StencilJS não possuir Getter e Setter, para casos que o Watch não for chamado,
|
|
2454
|
+
* é necessário limpar a propriedade antes de setar o valor novamente, para que o Watch seja disparado novamente,
|
|
2455
|
+
* solução necessária para controlar componentes com herança (Exemplo: EzSearch -> EzComboBox -> EzTextInput).
|
|
2456
|
+
*/
|
|
2457
|
+
fieldElem["errorMessage"] = "";
|
|
2260
2458
|
if (value === null || value === undefined || value === "") {
|
|
2261
2459
|
invalidFields.push(field);
|
|
2262
2460
|
fieldElem["errorMessage"] = "Essa informação é obrigatória";
|
|
2263
2461
|
}
|
|
2264
|
-
else {
|
|
2265
|
-
fieldElem["errorMessage"] = "";
|
|
2266
|
-
}
|
|
2267
2462
|
}
|
|
2268
2463
|
});
|
|
2269
2464
|
const isValid = invalidFields.length === 0;
|
|
@@ -112432,7 +112627,7 @@ class DataSource {
|
|
|
112432
112627
|
|
|
112433
112628
|
class AgGridController {
|
|
112434
112629
|
constructor(enterprise) {
|
|
112435
|
-
this.DEFAULT_ROW_HEIGHT =
|
|
112630
|
+
this.DEFAULT_ROW_HEIGHT = 30;
|
|
112436
112631
|
this.CHECK_BOX_COL_ID = "checkBoxColumn";
|
|
112437
112632
|
this.RECORD_ARCHIVE_COL_ID = "__RECORD_ARCHIVE__";
|
|
112438
112633
|
this.BLOCK_LOAD_DEBOUNCE = 400;
|
|
@@ -112495,7 +112690,7 @@ class AgGridController {
|
|
|
112495
112690
|
//dos blocos, então, quando removemos uma linha, a altura do bloco não é recalculada.
|
|
112496
112691
|
//Descobri que setando manualmente a altura das linhas, apesar do bloco ficar com
|
|
112497
112692
|
//tamanho errado, isso afeta menos o componente.
|
|
112498
|
-
|
|
112693
|
+
getRowHeight: this.getRowHeight.bind(this)
|
|
112499
112694
|
};
|
|
112500
112695
|
this.setOptionsEvents(this._gridOptions);
|
|
112501
112696
|
this.setOptionsPagination(this._gridOptions);
|
|
@@ -112509,8 +112704,12 @@ class AgGridController {
|
|
|
112509
112704
|
this._lastPageStatus = this.getPaginationStatus();
|
|
112510
112705
|
//Atualiza estado da seleção inicial
|
|
112511
112706
|
this.onSelectionChange();
|
|
112707
|
+
this._gridOptions.api.setHeaderHeight(this.getRowHeight());
|
|
112512
112708
|
}
|
|
112513
112709
|
}
|
|
112710
|
+
getRowHeight() {
|
|
112711
|
+
return this.DEFAULT_ROW_HEIGHT;
|
|
112712
|
+
}
|
|
112514
112713
|
setOptionsEvents(opt) {
|
|
112515
112714
|
opt.onSortChanged = e => this.onCallStateChange("sort", e);
|
|
112516
112715
|
opt.onColumnResized = e => this.onCallStateChange("columnResize", e);
|
|
@@ -112638,7 +112837,7 @@ class AgGridController {
|
|
|
112638
112837
|
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
112639
112838
|
}
|
|
112640
112839
|
const colDef = this._gridOptions.columnApi.getAllColumns();
|
|
112641
|
-
return colDef.map(c => {
|
|
112840
|
+
return colDef.filter(c => c.getColId() !== "checkBoxColumn").map(c => {
|
|
112642
112841
|
const def = c.getColDef();
|
|
112643
112842
|
const colDef = { name: def.field, label: def.headerName };
|
|
112644
112843
|
this.conditionalSet(colDef, "sortable", def.sortable);
|
|
@@ -113135,6 +113334,14 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
113135
113334
|
async hasPreviousRecord() {
|
|
113136
113335
|
return Promise.resolve(this._gridController.hasPreviousRecord());
|
|
113137
113336
|
}
|
|
113337
|
+
/**
|
|
113338
|
+
* Método para abrir a configuração da grid.
|
|
113339
|
+
*/
|
|
113340
|
+
async openGridConfig() {
|
|
113341
|
+
this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
|
|
113342
|
+
this._gridConfig.selectedTab = "Colunas";
|
|
113343
|
+
this._popUpGridConfig = true;
|
|
113344
|
+
}
|
|
113138
113345
|
componentWillLoad() {
|
|
113139
113346
|
if (this.dataUnit) {
|
|
113140
113347
|
this._dataUnitBridge = new DataUnitBridge(this._gridController, this.dataUnit);
|
|
@@ -113252,13 +113459,8 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
113252
113459
|
closeGridConfig() {
|
|
113253
113460
|
this._popUpGridConfig = false;
|
|
113254
113461
|
}
|
|
113255
|
-
openGridConfig() {
|
|
113256
|
-
this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
|
|
113257
|
-
this._gridConfig.selectedTab = "Colunas";
|
|
113258
|
-
this._popUpGridConfig = true;
|
|
113259
|
-
}
|
|
113260
113462
|
render() {
|
|
113261
|
-
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.observeConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeGridConfig() }))));
|
|
113463
|
+
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("ez-grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.observeConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeGridConfig() }))));
|
|
113262
113464
|
}
|
|
113263
113465
|
static get assetsDirs() { return ["../assets"]; }
|
|
113264
113466
|
static get watchers() { return {
|
|
@@ -113267,196 +113469,624 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
113267
113469
|
static get style() { return ezGridCss; }
|
|
113268
113470
|
};
|
|
113269
113471
|
|
|
113270
|
-
const
|
|
113472
|
+
const ezGridConfigCss = ".sc-ez-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid-config__group--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__group--font-size:var(--text--medium, 14px);--ez-grid-config__group--font-weight:var(--text-weight--large, 600);--ez-grid-config__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-ez-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-ez-grid-config{padding-right:var(--space--medium)}ez-list.sc-ez-grid-config{height:100%}.height-calc.sc-ez-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-ez-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--ez-grid-config__footer--padding-top)}.hidden.sc-ez-grid-config{display:none}.grid-config__main.sc-ez-grid-config{overflow-y:auto;padding-right:var(--ez-grid-config__main--padding-right)}.tabselector-container.sc-ez-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-ez-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-ez-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.subtitle.sc-ez-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-ez-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary);font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__scrollbar--background-color);border-radius:var(--ez-grid-config__scrollbar--border-radius)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-ez-grid-config{font-family:var(--ez-grid-config__group--font-family);font-size:var(--ez-grid-config__group--font-size);font-weight:var(--ez-grid-config__group--font-weight);padding-bottom:var(--ez-grid-config__group--padding-bottom)}";
|
|
113271
113473
|
|
|
113272
|
-
let
|
|
113474
|
+
let EzGridConfig$1 = class extends HTMLElement$1 {
|
|
113273
113475
|
constructor() {
|
|
113274
113476
|
super();
|
|
113275
113477
|
this.__registerHost();
|
|
113276
|
-
this.
|
|
113277
|
-
|
|
113278
|
-
|
|
113279
|
-
|
|
113280
|
-
this.
|
|
113281
|
-
|
|
113282
|
-
|
|
113283
|
-
|
|
113478
|
+
this.configFinish = createEvent(this, "configFinish", 7);
|
|
113479
|
+
this.configCancel = createEvent(this, "configCancel", 7);
|
|
113480
|
+
this._orderListItems = [];
|
|
113481
|
+
this._orderPriorityList = [];
|
|
113482
|
+
this._columListItems = [];
|
|
113483
|
+
this._selectedIndex = -1;
|
|
113484
|
+
this._dataChanged = false;
|
|
113485
|
+
this._componenteInternalKey = Date.now();
|
|
113486
|
+
this.selectedTab = "Colunas";
|
|
113284
113487
|
}
|
|
113285
|
-
|
|
113286
|
-
|
|
113488
|
+
/* Creation Methods */
|
|
113489
|
+
createOrderList() {
|
|
113490
|
+
let newList = [];
|
|
113491
|
+
this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach(column => {
|
|
113492
|
+
var _a;
|
|
113493
|
+
let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find(item => item.name === column.name);
|
|
113494
|
+
let item = { name: column.name, label: column.label };
|
|
113495
|
+
if (configItem) {
|
|
113496
|
+
item['orderIndex'] = configItem.orderIndex;
|
|
113497
|
+
item['ascending'] = configItem.ascending;
|
|
113498
|
+
}
|
|
113499
|
+
if (!column.hidden) {
|
|
113500
|
+
newList.push(item);
|
|
113501
|
+
}
|
|
113502
|
+
});
|
|
113503
|
+
newList.sort((a, b) => {
|
|
113504
|
+
//OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
|
|
113505
|
+
if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
|
|
113506
|
+
if (a.ascending != undefined)
|
|
113507
|
+
return -1;
|
|
113508
|
+
if (b.ascending != undefined)
|
|
113509
|
+
return 1;
|
|
113510
|
+
return 0;
|
|
113511
|
+
//Pelo menos um deles tem order index diferente de 0 e os dois tem orientação de ordenação.
|
|
113512
|
+
}
|
|
113513
|
+
else if (a.ascending != undefined && b.ascending != undefined) {
|
|
113514
|
+
return (a.orderIndex - b.orderIndex);
|
|
113515
|
+
//Pelo menos um deles tem order index diferente de 0 e pelo menos um deles tem orientação de ordenação.
|
|
113516
|
+
}
|
|
113517
|
+
else if (a.ascending != undefined || b.ascending != undefined) {
|
|
113518
|
+
if (a.ascending != undefined)
|
|
113519
|
+
return -1;
|
|
113520
|
+
if (b.ascending != undefined)
|
|
113521
|
+
return 1;
|
|
113522
|
+
return 0;
|
|
113523
|
+
}
|
|
113524
|
+
return (a.orderIndex - b.orderIndex);
|
|
113525
|
+
});
|
|
113526
|
+
this._orderListItems = newList;
|
|
113287
113527
|
}
|
|
113288
|
-
|
|
113289
|
-
|
|
113290
|
-
|
|
113291
|
-
|
|
113292
|
-
|
|
113293
|
-
|
|
113294
|
-
|
|
113295
|
-
|
|
113296
|
-
|
|
113297
|
-
}
|
|
113528
|
+
createColumnList() {
|
|
113529
|
+
let visibleGroup = {
|
|
113530
|
+
group: 'Visíveis',
|
|
113531
|
+
items: [],
|
|
113532
|
+
};
|
|
113533
|
+
let hiddenGroup = {
|
|
113534
|
+
group: 'Ocultas',
|
|
113535
|
+
items: [],
|
|
113536
|
+
sort: 'ASC'
|
|
113537
|
+
};
|
|
113538
|
+
this.columns.forEach(column => {
|
|
113539
|
+
let item = { label: column.label };
|
|
113540
|
+
if (column.hidden) {
|
|
113541
|
+
hiddenGroup.items.push(item);
|
|
113542
|
+
}
|
|
113543
|
+
else {
|
|
113544
|
+
visibleGroup.items.push(item);
|
|
113545
|
+
}
|
|
113546
|
+
});
|
|
113547
|
+
this._columListItems = [visibleGroup, hiddenGroup];
|
|
113298
113548
|
}
|
|
113299
|
-
|
|
113300
|
-
return (h(
|
|
113549
|
+
buildColumnListSlot(item, group) {
|
|
113550
|
+
return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + item + group, value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
|
|
113301
113551
|
}
|
|
113302
|
-
|
|
113303
|
-
|
|
113304
|
-
|
|
113305
|
-
|
|
113306
|
-
|
|
113307
|
-
|
|
113308
|
-
constructor() {
|
|
113309
|
-
super();
|
|
113310
|
-
this.__registerHost();
|
|
113311
|
-
this.__attachShadow();
|
|
113312
|
-
this.ezChange = createEvent(this, "ezChange", 7);
|
|
113313
|
-
this._listItems = [];
|
|
113314
|
-
this._listGroupItems = [];
|
|
113315
|
-
this._listItemsHistory = [];
|
|
113316
|
-
/**
|
|
113317
|
-
* Define a lista inicial do componente.
|
|
113318
|
-
*/
|
|
113319
|
-
this.dataSource = [];
|
|
113320
|
-
/**
|
|
113321
|
-
* Define se o componente renderizará os itens separados em grupos..
|
|
113322
|
-
*/
|
|
113323
|
-
this.useGroups = false;
|
|
113324
|
-
/**
|
|
113325
|
-
* Define se o componente terá o comportamento de arrasto de linhas.
|
|
113326
|
-
*/
|
|
113327
|
-
this.ezDraggable = false;
|
|
113328
|
-
/**
|
|
113329
|
-
* Define se os items da lista serão selecionáveis.
|
|
113330
|
-
*/
|
|
113331
|
-
this.ezSelectable = false;
|
|
113552
|
+
buildOrderListSlot(item) {
|
|
113553
|
+
let selectedOption = "na";
|
|
113554
|
+
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
|
113555
|
+
selectedOption = item.ascending == true ? 'asc' : 'desc';
|
|
113556
|
+
}
|
|
113557
|
+
return (h("div", null, h("ez-select-box", { selectedOption: selectedOption, key: 'ez-select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
|
|
113332
113558
|
}
|
|
113333
|
-
|
|
113334
|
-
|
|
113335
|
-
|
|
113336
|
-
|
|
113337
|
-
|
|
113559
|
+
updateOrder(sortOrder, updatedItemLabel) {
|
|
113560
|
+
var _a;
|
|
113561
|
+
this._dataChanged = true;
|
|
113562
|
+
let newList = [...this.columns];
|
|
113563
|
+
let newItem = newList.find(item => item.label === updatedItemLabel);
|
|
113564
|
+
if (newItem) {
|
|
113565
|
+
newItem.sort = sortOrder.value === "na" ? undefined : sortOrder.value;
|
|
113566
|
+
}
|
|
113567
|
+
let orderArray;
|
|
113568
|
+
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
113569
|
+
this._orderPriorityList.find(item => item.label === newItem.label).sort = sortOrder;
|
|
113570
|
+
this._orderPriorityList.filter(item => item.sort).map((item, index) => {
|
|
113571
|
+
if (item.label === newItem.label) {
|
|
113572
|
+
newItem.sortIndex = index;
|
|
113573
|
+
}
|
|
113338
113574
|
});
|
|
113339
|
-
this._listGroupItems = list;
|
|
113340
113575
|
}
|
|
113341
113576
|
else {
|
|
113342
|
-
|
|
113577
|
+
orderArray = newList.filter(item => item.sort && item.hidden !== true).map((item, index) => {
|
|
113578
|
+
return { label: item.label, orderIndex: index };
|
|
113579
|
+
});
|
|
113580
|
+
orderArray.forEach(element => {
|
|
113581
|
+
newList.find(item => item.label === element.label).sortIndex = element.orderIndex;
|
|
113582
|
+
});
|
|
113343
113583
|
}
|
|
113584
|
+
this.columns = newList;
|
|
113344
113585
|
}
|
|
113345
|
-
|
|
113346
|
-
|
|
113347
|
-
|
|
113348
|
-
|
|
113349
|
-
|
|
113350
|
-
|
|
113351
|
-
|
|
113586
|
+
/* Actions Methods */
|
|
113587
|
+
switchColumnGroup(ev, switchedItem) {
|
|
113588
|
+
ev.stopPropagation();
|
|
113589
|
+
let newList = [...this._columListItems];
|
|
113590
|
+
this._dataChanged = true;
|
|
113591
|
+
if (ev.detail === true) {
|
|
113592
|
+
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
113593
|
+
let index = hiddenGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
113594
|
+
if (index >= 0) {
|
|
113595
|
+
hiddenGroup.items.splice(index, 1);
|
|
113352
113596
|
}
|
|
113597
|
+
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
113598
|
+
visibleGroup.items.push(switchedItem);
|
|
113599
|
+
this._columListItems = newList;
|
|
113600
|
+
this.createOrderList();
|
|
113601
|
+
}
|
|
113602
|
+
else if (ev.detail === false) {
|
|
113603
|
+
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
113604
|
+
let index = visibleGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
113605
|
+
if (index >= 0) {
|
|
113606
|
+
visibleGroup.items.splice(index, 1);
|
|
113607
|
+
}
|
|
113608
|
+
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
113609
|
+
hiddenGroup.items.push(switchedItem);
|
|
113610
|
+
this._columListItems = newList;
|
|
113611
|
+
this.createOrderList();
|
|
113353
113612
|
}
|
|
113354
113613
|
}
|
|
113355
|
-
|
|
113356
|
-
|
|
113357
|
-
|
|
113358
|
-
|
|
113359
|
-
|
|
113614
|
+
finish() {
|
|
113615
|
+
let newColumnList = [];
|
|
113616
|
+
this._columListItems.forEach(group => {
|
|
113617
|
+
group.items.forEach(item => {
|
|
113618
|
+
const baseColumn = this.columns.find(column => column.label === item.label);
|
|
113619
|
+
let newColumnItem = Object.assign({}, baseColumn);
|
|
113620
|
+
if (group.group === "Ocultas") {
|
|
113621
|
+
newColumnItem.hidden = true;
|
|
113622
|
+
}
|
|
113623
|
+
else {
|
|
113624
|
+
newColumnItem.hidden = false;
|
|
113625
|
+
}
|
|
113626
|
+
newColumnList.push(newColumnItem);
|
|
113627
|
+
});
|
|
113628
|
+
});
|
|
113629
|
+
this.columns = newColumnList;
|
|
113630
|
+
this._dataChanged = false;
|
|
113631
|
+
this.closeConfig();
|
|
113632
|
+
ApplicationUtils.info("As configurações foram salvas com sucesso!");
|
|
113633
|
+
this.save();
|
|
113360
113634
|
}
|
|
113361
|
-
|
|
113362
|
-
|
|
113363
|
-
|
|
113364
|
-
|
|
113365
|
-
|
|
113366
|
-
this._element.shadowRoot.querySelector('.group-container').scrollTop = 0;
|
|
113635
|
+
save() {
|
|
113636
|
+
var _a;
|
|
113637
|
+
let _newConfig;
|
|
113638
|
+
if (this.config) {
|
|
113639
|
+
_newConfig = this.config;
|
|
113367
113640
|
}
|
|
113368
113641
|
else {
|
|
113369
|
-
this.
|
|
113642
|
+
_newConfig = this.createConfigFromState(this.columns);
|
|
113370
113643
|
}
|
|
113371
|
-
|
|
113372
|
-
|
|
113373
|
-
|
|
113374
|
-
|
|
113375
|
-
|
|
113376
|
-
|
|
113377
|
-
|
|
113378
|
-
|
|
113379
|
-
|
|
113380
|
-
|
|
113381
|
-
|
|
113382
|
-
|
|
113383
|
-
|
|
113384
|
-
|
|
113385
|
-
|
|
113386
|
-
|
|
113387
|
-
|
|
113388
|
-
|
|
113389
|
-
this._listGroupItems = newList;
|
|
113644
|
+
let _newColumnConfigList = [];
|
|
113645
|
+
let orderArray;
|
|
113646
|
+
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
113647
|
+
orderArray = this.columns.filter(item => item.sort && item.hidden !== true).map((item) => {
|
|
113648
|
+
return { label: item.label, orderIndex: 0 };
|
|
113649
|
+
});
|
|
113650
|
+
let indexCount = 0;
|
|
113651
|
+
let newOrderArray = [];
|
|
113652
|
+
this._orderPriorityList.forEach((orderPriorityItem) => {
|
|
113653
|
+
let item = orderArray.find(column => column.label === orderPriorityItem.label);
|
|
113654
|
+
if (item) {
|
|
113655
|
+
item.orderIndex = indexCount;
|
|
113656
|
+
newOrderArray.push(item);
|
|
113657
|
+
indexCount++;
|
|
113658
|
+
}
|
|
113659
|
+
});
|
|
113660
|
+
if (newOrderArray.length > 0) {
|
|
113661
|
+
orderArray = newOrderArray;
|
|
113390
113662
|
}
|
|
113391
|
-
|
|
113392
|
-
|
|
113393
|
-
|
|
113394
|
-
|
|
113395
|
-
|
|
113663
|
+
}
|
|
113664
|
+
for (let i = 0; i < this.columns.length; i++) {
|
|
113665
|
+
const column = this.columns[i];
|
|
113666
|
+
let _newColumnConfig = _newConfig.columns.find(_newColumnConfig => column.name === _newColumnConfig.name);
|
|
113667
|
+
if (column.hidden === true && _newColumnConfig) {
|
|
113668
|
+
continue;
|
|
113669
|
+
}
|
|
113670
|
+
if (_newColumnConfig) {
|
|
113671
|
+
_newColumnConfig.width = column.width;
|
|
113672
|
+
}
|
|
113673
|
+
else if (column.hidden === false) {
|
|
113674
|
+
_newColumnConfig = { name: column.name, width: column.width, orderIndex: 0 };
|
|
113675
|
+
}
|
|
113676
|
+
if (_newColumnConfig) {
|
|
113677
|
+
if (column.sort) {
|
|
113678
|
+
_newColumnConfig.ascending = column.sort.toUpperCase() === "ASC" ? true : false;
|
|
113679
|
+
if (orderArray) {
|
|
113680
|
+
adjustPriorityOrder(column, _newColumnConfig);
|
|
113396
113681
|
}
|
|
113397
113682
|
else {
|
|
113398
|
-
|
|
113683
|
+
_newColumnConfig.orderIndex = column.sortIndex;
|
|
113399
113684
|
}
|
|
113400
|
-
});
|
|
113401
|
-
this._listItems = newList;
|
|
113402
|
-
}
|
|
113403
|
-
if (scrollToOption) {
|
|
113404
|
-
let liElem = this.useGroups ?
|
|
113405
|
-
this._groupContainer.querySelector('li#item_' + this.getItemId(selectedItem.label))
|
|
113406
|
-
: this._itemContainer.querySelector('li#item_' + this.getItemId(selectedItem.label));
|
|
113407
|
-
if (liElem) {
|
|
113408
|
-
liElem.scrollIntoView();
|
|
113409
113685
|
}
|
|
113686
|
+
else {
|
|
113687
|
+
delete _newColumnConfig.ascending;
|
|
113688
|
+
_newColumnConfig.orderIndex = 0;
|
|
113689
|
+
}
|
|
113690
|
+
_newColumnConfigList.push(_newColumnConfig);
|
|
113410
113691
|
}
|
|
113411
113692
|
}
|
|
113412
|
-
|
|
113413
|
-
|
|
113414
|
-
|
|
113415
|
-
|
|
113416
|
-
|
|
113417
|
-
|
|
113418
|
-
|
|
113419
|
-
|
|
113420
|
-
|
|
113421
|
-
|
|
113422
|
-
});
|
|
113423
|
-
});
|
|
113424
|
-
this._listGroupItems = newList;
|
|
113425
|
-
}
|
|
113426
|
-
else {
|
|
113427
|
-
let newList = [...this._listItems];
|
|
113428
|
-
newList.forEach(item => {
|
|
113429
|
-
item.selected = false;
|
|
113430
|
-
});
|
|
113431
|
-
this._listItems = newList;
|
|
113693
|
+
_newConfig.columns = _newColumnConfigList;
|
|
113694
|
+
this.configFinish.emit(_newConfig);
|
|
113695
|
+
this._orderList.clearHistory();
|
|
113696
|
+
function adjustPriorityOrder(column, _newColumnConfig) {
|
|
113697
|
+
if (orderArray) {
|
|
113698
|
+
let orderItem = orderArray.find(item => item.label === column.label);
|
|
113699
|
+
if (orderItem) {
|
|
113700
|
+
_newColumnConfig.orderIndex = orderItem.orderIndex;
|
|
113701
|
+
}
|
|
113702
|
+
}
|
|
113432
113703
|
}
|
|
113433
113704
|
}
|
|
113434
|
-
|
|
113435
|
-
|
|
113436
|
-
|
|
113437
|
-
|
|
113438
|
-
|
|
113439
|
-
|
|
113440
|
-
|
|
113441
|
-
let item = group.items.find((item) => item.selected == true);
|
|
113442
|
-
if (item) {
|
|
113443
|
-
selectedItem = item;
|
|
113444
|
-
return false;
|
|
113705
|
+
createConfigFromState(state) {
|
|
113706
|
+
let newConfig = { columns: [] };
|
|
113707
|
+
state.forEach(columnState => {
|
|
113708
|
+
if (!columnState.hidden) {
|
|
113709
|
+
let newConfigColumn = { name: columnState.name };
|
|
113710
|
+
if (columnState.width) {
|
|
113711
|
+
newConfigColumn['width'] = columnState.width;
|
|
113445
113712
|
}
|
|
113446
|
-
|
|
113447
|
-
|
|
113448
|
-
|
|
113449
|
-
|
|
113450
|
-
|
|
113451
|
-
|
|
113452
|
-
|
|
113713
|
+
if (columnState.sort) {
|
|
113714
|
+
newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === 'ASC');
|
|
113715
|
+
newConfigColumn['orderIndex'] = columnState.sortIndex;
|
|
113716
|
+
}
|
|
113717
|
+
else {
|
|
113718
|
+
newConfigColumn['orderIndex'] = 0;
|
|
113719
|
+
}
|
|
113720
|
+
if (newConfigColumn) {
|
|
113721
|
+
newConfig.columns.push(newConfigColumn);
|
|
113722
|
+
}
|
|
113723
|
+
}
|
|
113724
|
+
});
|
|
113725
|
+
return newConfig;
|
|
113453
113726
|
}
|
|
113454
|
-
|
|
113455
|
-
|
|
113456
|
-
|
|
113457
|
-
|
|
113458
|
-
|
|
113459
|
-
|
|
113727
|
+
async locateColumn(evt, searchingText) {
|
|
113728
|
+
var _a;
|
|
113729
|
+
const hitEnter = evt.key === "Enter";
|
|
113730
|
+
if (!searchingText) {
|
|
113731
|
+
searchingText = (_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
113732
|
+
}
|
|
113733
|
+
let newSelected = -1;
|
|
113734
|
+
if (this.selectedTab === "Ordenação das linhas") {
|
|
113735
|
+
if (searchingText) {
|
|
113736
|
+
const matchedIndexes = [];
|
|
113737
|
+
let orderListDatasource;
|
|
113738
|
+
await this._orderList.getList().then(listGroup => {
|
|
113739
|
+
orderListDatasource = listGroup;
|
|
113740
|
+
orderListDatasource.forEach((column, index) => {
|
|
113741
|
+
if (this.compareWords(column, searchingText)) {
|
|
113742
|
+
matchedIndexes.push(index);
|
|
113743
|
+
}
|
|
113744
|
+
});
|
|
113745
|
+
});
|
|
113746
|
+
if (matchedIndexes.length > 0) {
|
|
113747
|
+
if (hitEnter) {
|
|
113748
|
+
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
113749
|
+
if (matchedIndexes[j] > this._selectedIndex) {
|
|
113750
|
+
newSelected = matchedIndexes[j];
|
|
113751
|
+
break;
|
|
113752
|
+
}
|
|
113753
|
+
}
|
|
113754
|
+
}
|
|
113755
|
+
if (newSelected === -1) {
|
|
113756
|
+
newSelected = matchedIndexes[0];
|
|
113757
|
+
}
|
|
113758
|
+
}
|
|
113759
|
+
this._selectedIndex = newSelected;
|
|
113760
|
+
let selectedColumn;
|
|
113761
|
+
selectedColumn = orderListDatasource[newSelected];
|
|
113762
|
+
if (selectedColumn) {
|
|
113763
|
+
this._orderList.setSelection({ label: selectedColumn.label }, true);
|
|
113764
|
+
}
|
|
113765
|
+
else {
|
|
113766
|
+
this._orderList.setSelection(undefined);
|
|
113767
|
+
}
|
|
113768
|
+
}
|
|
113769
|
+
else {
|
|
113770
|
+
this._orderList.setSelection(undefined);
|
|
113771
|
+
}
|
|
113772
|
+
}
|
|
113773
|
+
else {
|
|
113774
|
+
if (searchingText) {
|
|
113775
|
+
const matchedIndexes = [];
|
|
113776
|
+
this.columns.forEach((column, index) => {
|
|
113777
|
+
if (this.compareWords(column, searchingText)) {
|
|
113778
|
+
matchedIndexes.push(index);
|
|
113779
|
+
}
|
|
113780
|
+
});
|
|
113781
|
+
if (matchedIndexes.length > 0) {
|
|
113782
|
+
if (hitEnter) {
|
|
113783
|
+
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
113784
|
+
if (matchedIndexes[j] > this._selectedIndex) {
|
|
113785
|
+
newSelected = matchedIndexes[j];
|
|
113786
|
+
break;
|
|
113787
|
+
}
|
|
113788
|
+
}
|
|
113789
|
+
}
|
|
113790
|
+
if (newSelected === -1) {
|
|
113791
|
+
newSelected = matchedIndexes[0];
|
|
113792
|
+
}
|
|
113793
|
+
}
|
|
113794
|
+
this._selectedIndex = newSelected;
|
|
113795
|
+
let selectedColumn = this.columns[newSelected];
|
|
113796
|
+
if (selectedColumn) {
|
|
113797
|
+
this._columnList.setSelection({ label: selectedColumn.label }, true);
|
|
113798
|
+
}
|
|
113799
|
+
else {
|
|
113800
|
+
this._columnList.setSelection(undefined);
|
|
113801
|
+
}
|
|
113802
|
+
}
|
|
113803
|
+
else {
|
|
113804
|
+
this._columnList.setSelection(undefined);
|
|
113805
|
+
}
|
|
113806
|
+
}
|
|
113807
|
+
}
|
|
113808
|
+
compareWords(column, searchingText) {
|
|
113809
|
+
if (StringUtils.replaceAccentuatedChars(column.label).indexOf(StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
|
|
113810
|
+
return true;
|
|
113811
|
+
}
|
|
113812
|
+
return false;
|
|
113813
|
+
}
|
|
113814
|
+
closeConfig() {
|
|
113815
|
+
this._orderList.scrollToTop();
|
|
113816
|
+
this._columnList.scrollToTop();
|
|
113817
|
+
this._searchElement.value = "";
|
|
113818
|
+
if (this._dataChanged) {
|
|
113819
|
+
let options = {
|
|
113820
|
+
canClose: false,
|
|
113821
|
+
labelCancel: "Descartar",
|
|
113822
|
+
labelConfirm: "Salvar",
|
|
113823
|
+
btnConfirmDanger: false
|
|
113824
|
+
};
|
|
113825
|
+
ApplicationUtils.confirm("Aviso", "As alterações realizadas serão descartadas. Gostaria de salvar antes de sair?", null, false, options)
|
|
113826
|
+
.then(response => {
|
|
113827
|
+
if (!response) {
|
|
113828
|
+
this._dataChanged = false;
|
|
113829
|
+
this.configCancel.emit();
|
|
113830
|
+
this._orderList.clearHistory();
|
|
113831
|
+
this._componenteInternalKey = Date.now();
|
|
113832
|
+
}
|
|
113833
|
+
else {
|
|
113834
|
+
this.finish();
|
|
113835
|
+
}
|
|
113836
|
+
});
|
|
113837
|
+
}
|
|
113838
|
+
else {
|
|
113839
|
+
this.configCancel.emit();
|
|
113840
|
+
this._orderList.clearHistory();
|
|
113841
|
+
}
|
|
113842
|
+
}
|
|
113843
|
+
/* Handlers */
|
|
113844
|
+
handleTabChange(ev) {
|
|
113845
|
+
var _a;
|
|
113846
|
+
if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
|
|
113847
|
+
if (this.selectedTab !== ev.target.selectedTab) {
|
|
113848
|
+
if (ev.target.selectedTab === "Colunas") {
|
|
113849
|
+
this._orderList.scrollToTop();
|
|
113850
|
+
}
|
|
113851
|
+
else if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
113852
|
+
this._columnList.scrollToTop();
|
|
113853
|
+
}
|
|
113854
|
+
this._searchElement.value = "";
|
|
113855
|
+
}
|
|
113856
|
+
if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
113857
|
+
this.createOrderList();
|
|
113858
|
+
}
|
|
113859
|
+
this.selectedTab = ev.target.selectedTab;
|
|
113860
|
+
}
|
|
113861
|
+
}
|
|
113862
|
+
handleColumnListChange(ev) {
|
|
113863
|
+
var _a;
|
|
113864
|
+
if (ev.detail) {
|
|
113865
|
+
let visibleItems = (_a = ev.detail.find(group => group.group === "Visíveis")) === null || _a === void 0 ? void 0 : _a.items;
|
|
113866
|
+
if (visibleItems) {
|
|
113867
|
+
this._dataChanged = true;
|
|
113868
|
+
this._orderListItems = visibleItems;
|
|
113869
|
+
}
|
|
113870
|
+
}
|
|
113871
|
+
}
|
|
113872
|
+
handleOrderListChange(ev) {
|
|
113873
|
+
if (ev.detail) {
|
|
113874
|
+
let orderPriorityList = ev.detail;
|
|
113875
|
+
if (orderPriorityList) {
|
|
113876
|
+
this._dataChanged = true;
|
|
113877
|
+
this._orderPriorityList = orderPriorityList;
|
|
113878
|
+
}
|
|
113879
|
+
}
|
|
113880
|
+
}
|
|
113881
|
+
componentWillRender() {
|
|
113882
|
+
var _a;
|
|
113883
|
+
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
113884
|
+
this.createColumnList();
|
|
113885
|
+
}
|
|
113886
|
+
}
|
|
113887
|
+
componentDidRender() {
|
|
113888
|
+
var _a;
|
|
113889
|
+
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
113890
|
+
this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
|
|
113891
|
+
}
|
|
113892
|
+
}
|
|
113893
|
+
render() {
|
|
113894
|
+
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: ev => this.handleOrderListChange(ev), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "ez-button--primary", onClick: () => this.finish() }))));
|
|
113895
|
+
}
|
|
113896
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
113897
|
+
static get style() { return ezGridConfigCss; }
|
|
113898
|
+
};
|
|
113899
|
+
|
|
113900
|
+
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{color:var(--ez-icon--color)}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-account-outline:before{content:\"\\ea01\"}.ez-icon-account:before{content:\"\\ea02\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea03\"}.ez-icon-alert-circle:before{content:\"\\ea04\"}.ez-icon-alert-mail:before{content:\"\\ea05\"}.ez-icon-alert-outline:before{content:\"\\ea06\"}.ez-icon-alert-popup:before{content:\"\\ea07\"}.ez-icon-apps:before{content:\"\\ea08\"}.ez-icon-arrow_back:before{content:\"\\ea09\"}.ez-icon-bell-inverted:before{content:\"\\ea0a\"}.ez-icon-bell:before{content:\"\\ea0b\"}.ez-icon-business-center:before{content:\"\\ea0c\"}.ez-icon-calendar-text:before{content:\"\\ea0d\"}.ez-icon-calendar:before{content:\"\\ea0e\"}.ez-icon-check-circle-inverted:before{content:\"\\ea0f\"}.ez-icon-check-circle:before{content:\"\\ea10\"}.ez-icon-check:before{content:\"\\ea11\"}.ez-icon-chevron-down:before{content:\"\\ea12\"}.ez-icon-chevron-left:before{content:\"\\ea13\"}.ez-icon-chevron-right:before{content:\"\\ea14\"}.ez-icon-chevron-up:before{content:\"\\ea15\"}.ez-icon-circle--medium:before{content:\"\\ea16\"}.ez-icon-circle:before{content:\"\\ea17\"}.ez-icon-clipboard:before{content:\"\\ea18\"}.ez-icon-close-circle-inverted:before{content:\"\\ea19\"}.ez-icon-close-circle:before{content:\"\\ea1a\"}.ez-icon-close:before{content:\"\\ea1b\"}.ez-icon-comment-inverted:before{content:\"\\ea1c\"}.ez-icon-comment:before{content:\"\\ea1d\"}.ez-icon-configuration:before{content:\"\\ea1e\"}.ez-icon-copy:before{content:\"\\ea1f\"}.ez-icon-crop:before{content:\"\\ea20\"}.ez-icon-delete:before{content:\"\\ea21\"}.ez-icon-description:before{content:\"\\ea22\"}.ez-icon-dot-notification:before{content:\"\\ea23\"}.ez-icon-dots-horizontal:before{content:\"\\ea24\"}.ez-icon-dots-vertical:before{content:\"\\ea25\"}.ez-icon-drag-indicator:before{content:\"\\ea26\"}.ez-icon-edit-file:before{content:\"\\ea27\"}.ez-icon-edit-table:before{content:\"\\ea28\"}.ez-icon-edit-time:before{content:\"\\ea29\"}.ez-icon-edit:before{content:\"\\ea2a\"}.ez-icon-email-inverted:before{content:\"\\ea2b\"}.ez-icon-email:before{content:\"\\ea2c\"}.ez-icon-error-octagon:before{content:\"\\ea2d\"}.ez-icon-expand:before{content:\"\\ea2e\"}.ez-icon-eye-off:before{content:\"\\ea2f\"}.ez-icon-eye:before{content:\"\\ea30\"}.ez-icon-favorite:before{content:\"\\ea31\"}.ez-icon-file-download:before{content:\"\\ea32\"}.ez-icon-file-upload:before{content:\"\\ea33\"}.ez-icon-filter:before{content:\"\\ea34\"}.ez-icon-find-file:before{content:\"\\ea35\"}.ez-icon-find-page:before{content:\"\\ea36\"}.ez-icon-format-color-fill:before{content:\"\\ea37\"}.ez-icon-help-circle-outline:before{content:\"\\ea38\"}.ez-icon-help-inverted:before{content:\"\\ea39\"}.ez-icon-help:before{content:\"\\ea3a\"}.ez-icon-home:before{content:\"\\ea3b\"}.ez-icon-language:before{content:\"\\ea3c\"}.ez-icon-launch:before{content:\"\\ea3d\"}.ez-icon-lightbulb:before{content:\"\\ea3e\"}.ez-icon-list:before{content:\"\\ea3f\"}.ez-icon-loading:before{content:\"\\ea40\"}.ez-icon-lock-outline:before{content:\"\\ea41\"}.ez-icon-lock:before{content:\"\\ea42\"}.ez-icon-menu:before{content:\"\\ea43\"}.ez-icon-minus-circle-inverted:before{content:\"\\ea44\"}.ez-icon-minus:before{content:\"\\ea45\"}.ez-icon-money-off:before{content:\"\\ea46\"}.ez-icon-money:before{content:\"\\ea47\"}.ez-icon-north-west:before{content:\"\\ea48\"}.ez-icon-pause:before{content:\"\\ea49\"}.ez-icon-payments:before{content:\"\\ea4a\"}.ez-icon-play:before{content:\"\\ea4b\"}.ez-icon-plus-circle-inverted:before{content:\"\\ea4c\"}.ez-icon-plus-circle:before{content:\"\\ea4d\"}.ez-icon-plus:before{content:\"\\ea4e\"}.ez-icon-power:before{content:\"\\ea4f\"}.ez-icon-push-pin:before{content:\"\\ea50\"}.ez-icon-restore:before{content:\"\\ea51\"}.ez-icon-return:before{content:\"\\ea52\"}.ez-icon-rotate:before{content:\"\\ea53\"}.ez-icon-save:before{content:\"\\ea54\"}.ez-icon-search:before{content:\"\\ea55\"}.ez-icon-settings-inverted:before{content:\"\\ea56\"}.ez-icon-settings:before{content:\"\\ea57\"}.ez-icon-share:before{content:\"\\ea58\"}.ez-icon-shield:before{content:\"\\ea59\"}.ez-icon-south-east:before{content:\"\\ea5a\"}.ez-icon-success-circle:before{content:\"\\ea5b\"}.ez-icon-sync:before{content:\"\\ea5c\"}.ez-icon-table:before{content:\"\\ea5d\"}.ez-icon-timer-outline:before{content:\"\\ea5e\"}.ez-icon-user-circle:before{content:\"\\ea5f\"}.ez-icon-warning-minus:before{content:\"\\ea60\"}.ez-icon-warning-triangle:before{content:\"\\ea61\"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}";
|
|
113901
|
+
|
|
113902
|
+
let EzIcon$1 = class extends HTMLElement$1 {
|
|
113903
|
+
constructor() {
|
|
113904
|
+
super();
|
|
113905
|
+
this.__registerHost();
|
|
113906
|
+
this.__attachShadow();
|
|
113907
|
+
/**
|
|
113908
|
+
* Tamanho do ícone
|
|
113909
|
+
*/
|
|
113910
|
+
this.size = 'medium';
|
|
113911
|
+
}
|
|
113912
|
+
isSprite() {
|
|
113913
|
+
return this.href && this.href.indexOf('#') > -1;
|
|
113914
|
+
}
|
|
113915
|
+
getIconClassName() {
|
|
113916
|
+
return `ez-icon-${this.iconName}`;
|
|
113917
|
+
}
|
|
113918
|
+
getIconContent() {
|
|
113919
|
+
if (this.isSprite()) {
|
|
113920
|
+
return h("svg", { class: this.size, role: "img" }, h("use", { xlinkHref: this.href }));
|
|
113921
|
+
}
|
|
113922
|
+
else if (!StringUtils.isEmpty(this.iconName)) {
|
|
113923
|
+
return h("span", { class: `icon-content ${this.getIconClassName()} ${this.size}--font` });
|
|
113924
|
+
}
|
|
113925
|
+
else {
|
|
113926
|
+
return h("img", { class: this.size, src: this.href });
|
|
113927
|
+
}
|
|
113928
|
+
}
|
|
113929
|
+
render() {
|
|
113930
|
+
return (h(Host, null, this.getIconContent()));
|
|
113931
|
+
}
|
|
113932
|
+
static get style() { return ezIconCss; }
|
|
113933
|
+
};
|
|
113934
|
+
|
|
113935
|
+
const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon--padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item--margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Sora\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Sora\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group-overlay--font-family:var(--font-pattern, \"Sora\");--ez-list__group-overlay--font-size:var(--text--medium, 14px);--ez-list__group-container-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__group-container-scrollbar--width:var(--space--medium, 12px);--ez-list__group-container-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-list__group-container-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__draggable-scrollbar--width:var(--space--medium, 12px);--ez-list__draggable-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-list__draggable-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-list__draggable-list--padding-bottom:var(--space--small, 6px);--ez-list__draggable-icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{display:flex;align-items:center;border-top:1px dashed #fff;justify-content:space-between;background-color:#fff;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);flex:1;width:100%}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.item-content{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 41px)}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__draggable-scrollbar--background-color-primary) var(--ez-list__draggable-scrollbar--background-color-secondary)}.draggable-list li{background-color:#fff;display:flex;margin:var(--ez-list__item--margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);height:32px}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.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:var(--ez-list__draggable-scrollbar--background-color-secondary)}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable-scrollbar--background-color-primary);border-radius:var(--ez-list__draggable-scrollbar--border-radius)}.draggable-list::-webkit-scrollbar{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary);width:var(--ez-list__draggable-scrollbar--width);max-width:var(--ez-list__draggable-scrollbar--width);min-width:var(--ez-list__draggable-scrollbar--width)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--ez-list__icon--color);width:18px;height:18px;-webkit-mask-image:var(--ez-list__draggable-icon--image);mask-image:var(--ez-list__draggable-icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__group-container-scrollbar--background-color-primary) var(--ez-list__group-container-scrollbar--background-color-secondary)}.group-name{font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom);-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar-track{background-color:var(--ez-list__group-container-scrollbar--background-color-secondary)}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__group-container-scrollbar--background-color-primary);border-radius:var(--ez-list__group-container-scrollbar--border-radius)}.group-container::-webkit-scrollbar{background-color:var(--ez-list__group-container-scrollbar--background-color-secondary);width:var(--ez-list__group-container-scrollbar--width);max-width:var(--ez-list__group-container-scrollbar--width);min-width:var(--ez-list__group-container-scrollbar--width)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;overflow-y:auto;outline:none;scrollbar-width:thin;scrollbar-color:var(--ez-list__draggable-scrollbar--background-color-primary) var(--ez-list__draggable-scrollbar--background-color-secondary)}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar-track{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary)}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable-scrollbar--background-color-primary);border-radius:var(--ez-list__draggable-scrollbar--border-radius)}.items-container::-webkit-scrollbar{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary);width:var(--ez-list__draggable-scrollbar--width);max-width:var(--ez-list__draggable-scrollbar--width);min-width:var(--ez-list__draggable-scrollbar--width)}.group-overlay{font-family:var(--ez-list__group-overlay--font-family);font-size:var(--ez-list__group-overlay--font-size);background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
|
|
113936
|
+
|
|
113937
|
+
let EzList$1 = class extends HTMLElement$1 {
|
|
113938
|
+
constructor() {
|
|
113939
|
+
super();
|
|
113940
|
+
this.__registerHost();
|
|
113941
|
+
this.__attachShadow();
|
|
113942
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
113943
|
+
this._listItems = [];
|
|
113944
|
+
this._listGroupItems = [];
|
|
113945
|
+
this._listItemsHistory = [];
|
|
113946
|
+
/**
|
|
113947
|
+
* Define a lista inicial do componente.
|
|
113948
|
+
*/
|
|
113949
|
+
this.dataSource = [];
|
|
113950
|
+
/**
|
|
113951
|
+
* Define se o componente renderizará os itens separados em grupos..
|
|
113952
|
+
*/
|
|
113953
|
+
this.useGroups = false;
|
|
113954
|
+
/**
|
|
113955
|
+
* Define se o componente terá o comportamento de arrasto de linhas.
|
|
113956
|
+
*/
|
|
113957
|
+
this.ezDraggable = false;
|
|
113958
|
+
/**
|
|
113959
|
+
* Define se os items da lista serão selecionáveis.
|
|
113960
|
+
*/
|
|
113961
|
+
this.ezSelectable = false;
|
|
113962
|
+
}
|
|
113963
|
+
createList() {
|
|
113964
|
+
if (this.useGroups) {
|
|
113965
|
+
let list = [...this.dataSource];
|
|
113966
|
+
list.forEach(itemGroup => {
|
|
113967
|
+
this.sortGroup(itemGroup);
|
|
113968
|
+
});
|
|
113969
|
+
this._listGroupItems = list;
|
|
113970
|
+
}
|
|
113971
|
+
else {
|
|
113972
|
+
this._listItems = this._listItemsHistory.length > 0 ? this._listItemsHistory : [...this.dataSource];
|
|
113973
|
+
}
|
|
113974
|
+
}
|
|
113975
|
+
sortGroup(itemGroup) {
|
|
113976
|
+
if (itemGroup.sort) {
|
|
113977
|
+
itemGroup.items.sort(function (a, b) {
|
|
113978
|
+
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
113979
|
+
});
|
|
113980
|
+
if (itemGroup.sort === "DSC") {
|
|
113981
|
+
itemGroup.items.reverse();
|
|
113982
|
+
}
|
|
113983
|
+
}
|
|
113984
|
+
}
|
|
113985
|
+
/**
|
|
113986
|
+
* Responsável por limpar a lista de histórico do componente.
|
|
113987
|
+
*/
|
|
113988
|
+
async clearHistory() {
|
|
113989
|
+
this._listItemsHistory = [];
|
|
113990
|
+
}
|
|
113991
|
+
/**
|
|
113992
|
+
* Responsável por dar um scroll top no componente da lista.
|
|
113993
|
+
*/
|
|
113994
|
+
async scrollToTop() {
|
|
113995
|
+
if (this.useGroups) {
|
|
113996
|
+
this._element.shadowRoot.querySelector('.group-container').scrollTop = 0;
|
|
113997
|
+
}
|
|
113998
|
+
else {
|
|
113999
|
+
this._element.shadowRoot.querySelector('.items-container').scrollTop = 0;
|
|
114000
|
+
}
|
|
114001
|
+
}
|
|
114002
|
+
/**
|
|
114003
|
+
* Recebe como argumento um ListItem {label: string} e um booleano que define se o componente deve fazer scroll para exibir o item específico (opcional).
|
|
114004
|
+
*/
|
|
114005
|
+
async setSelection(selectedItem, scrollToOption) {
|
|
114006
|
+
if (selectedItem && this.ezSelectable) {
|
|
114007
|
+
if (this.useGroups) {
|
|
114008
|
+
let newList = [...this._listGroupItems];
|
|
114009
|
+
newList.forEach(groupItem => {
|
|
114010
|
+
groupItem.items.forEach(item => {
|
|
114011
|
+
if (item.label == selectedItem.label) {
|
|
114012
|
+
item.selected = true;
|
|
114013
|
+
}
|
|
114014
|
+
else {
|
|
114015
|
+
item.selected = false;
|
|
114016
|
+
}
|
|
114017
|
+
});
|
|
114018
|
+
});
|
|
114019
|
+
this._listGroupItems = newList;
|
|
114020
|
+
}
|
|
114021
|
+
else {
|
|
114022
|
+
let newList = [...this._listItems];
|
|
114023
|
+
newList.forEach(item => {
|
|
114024
|
+
if (item.label === selectedItem.label) {
|
|
114025
|
+
item.selected = true;
|
|
114026
|
+
}
|
|
114027
|
+
else {
|
|
114028
|
+
item.selected = false;
|
|
114029
|
+
}
|
|
114030
|
+
});
|
|
114031
|
+
this._listItems = newList;
|
|
114032
|
+
}
|
|
114033
|
+
if (scrollToOption) {
|
|
114034
|
+
let liElem = this.useGroups ?
|
|
114035
|
+
this._groupContainer.querySelector('li#item_' + this.getItemId(selectedItem.label))
|
|
114036
|
+
: this._itemContainer.querySelector('li#item_' + this.getItemId(selectedItem.label));
|
|
114037
|
+
if (liElem) {
|
|
114038
|
+
liElem.scrollIntoView();
|
|
114039
|
+
}
|
|
114040
|
+
}
|
|
114041
|
+
}
|
|
114042
|
+
else {
|
|
114043
|
+
this.removeSelection();
|
|
114044
|
+
}
|
|
114045
|
+
}
|
|
114046
|
+
removeSelection() {
|
|
114047
|
+
if (this.useGroups) {
|
|
114048
|
+
let newList = [...this._listGroupItems];
|
|
114049
|
+
newList.forEach(groupItem => {
|
|
114050
|
+
groupItem.items.forEach(item => {
|
|
114051
|
+
item.selected = false;
|
|
114052
|
+
});
|
|
114053
|
+
});
|
|
114054
|
+
this._listGroupItems = newList;
|
|
114055
|
+
}
|
|
114056
|
+
else {
|
|
114057
|
+
let newList = [...this._listItems];
|
|
114058
|
+
newList.forEach(item => {
|
|
114059
|
+
item.selected = false;
|
|
114060
|
+
});
|
|
114061
|
+
this._listItems = newList;
|
|
114062
|
+
}
|
|
114063
|
+
}
|
|
114064
|
+
/**
|
|
114065
|
+
* Retorna o item selecionado.
|
|
114066
|
+
*/
|
|
114067
|
+
async getSelection() {
|
|
114068
|
+
let selectedItem;
|
|
114069
|
+
if (this.useGroups) {
|
|
114070
|
+
this._listGroupItems.every(group => {
|
|
114071
|
+
let item = group.items.find((item) => item.selected == true);
|
|
114072
|
+
if (item) {
|
|
114073
|
+
selectedItem = item;
|
|
114074
|
+
return false;
|
|
114075
|
+
}
|
|
114076
|
+
return true;
|
|
114077
|
+
});
|
|
114078
|
+
}
|
|
114079
|
+
else {
|
|
114080
|
+
selectedItem = this._listItems.find((item) => item.selected == true);
|
|
114081
|
+
}
|
|
114082
|
+
return selectedItem;
|
|
114083
|
+
}
|
|
114084
|
+
/**
|
|
114085
|
+
* Retorna a lista de items conforme o modo de uso.
|
|
114086
|
+
*/
|
|
114087
|
+
async getList() {
|
|
114088
|
+
if (this.useGroups) {
|
|
114089
|
+
return this._listGroupItems;
|
|
113460
114090
|
}
|
|
113461
114091
|
return this._listItems;
|
|
113462
114092
|
}
|
|
@@ -113838,7 +114468,7 @@ let EzLoadingBar$1 = class extends HTMLElement$1 {
|
|
|
113838
114468
|
static get style() { return ezLoadingBarCss; }
|
|
113839
114469
|
};
|
|
113840
114470
|
|
|
113841
|
-
const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-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:
|
|
114471
|
+
const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-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;box-sizing:border-box;max-height:100%;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%}}";
|
|
113842
114472
|
|
|
113843
114473
|
let EzModal$1 = class extends HTMLElement$1 {
|
|
113844
114474
|
constructor() {
|
|
@@ -113914,6 +114544,7 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113914
114544
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
113915
114545
|
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
113916
114546
|
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
114547
|
+
this._focused = false;
|
|
113917
114548
|
/**
|
|
113918
114549
|
* Deixa o campo disponível ou não para uso.
|
|
113919
114550
|
*/
|
|
@@ -113935,66 +114566,109 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113935
114566
|
async setBlur() {
|
|
113936
114567
|
this._textInput.setBlur();
|
|
113937
114568
|
}
|
|
114569
|
+
/**
|
|
114570
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
114571
|
+
*/
|
|
114572
|
+
async isInvalid() {
|
|
114573
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
114574
|
+
}
|
|
113938
114575
|
observeLabel() {
|
|
113939
114576
|
if (this._textInput) {
|
|
113940
114577
|
this._textInput.label = this.label;
|
|
113941
114578
|
}
|
|
113942
114579
|
}
|
|
113943
114580
|
observeErrorMessage() {
|
|
114581
|
+
var _a;
|
|
113944
114582
|
if (this._textInput) {
|
|
113945
114583
|
this._textInput.errorMessage = this.errorMessage;
|
|
114584
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
114585
|
+
this.setInputValue();
|
|
114586
|
+
}
|
|
113946
114587
|
}
|
|
113947
114588
|
}
|
|
113948
|
-
observeValue() {
|
|
113949
|
-
if (this._textInput) {
|
|
113950
|
-
|
|
114589
|
+
observeValue(newValue, oldValue) {
|
|
114590
|
+
if (this._textInput && newValue != oldValue) {
|
|
114591
|
+
const newValueValidated = this.validateValue(newValue);
|
|
114592
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
114593
|
+
if (newValueValidated != oldValueValidated) {
|
|
114594
|
+
const textValue = this.getTextValue(newValueValidated) || '';
|
|
114595
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
114596
|
+
const parsedNumber = this.getParsedNumber(textValue);
|
|
114597
|
+
if (parsedNumber !== undefined || !this._focused) {
|
|
114598
|
+
this._textInput.value = textValue;
|
|
114599
|
+
this._focused = false;
|
|
114600
|
+
this.errorMessage = "";
|
|
114601
|
+
}
|
|
114602
|
+
}
|
|
114603
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
114604
|
+
this.ezChange.emit(valueEmitted);
|
|
114605
|
+
}
|
|
113951
114606
|
}
|
|
113952
114607
|
}
|
|
114608
|
+
validateValue(value) {
|
|
114609
|
+
return isNaN(value) || value === undefined ? null : value;
|
|
114610
|
+
}
|
|
114611
|
+
getTextValue(value) {
|
|
114612
|
+
if (value != undefined) {
|
|
114613
|
+
return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
|
|
114614
|
+
}
|
|
114615
|
+
return undefined;
|
|
114616
|
+
}
|
|
113953
114617
|
changeValue(newValue) {
|
|
113954
114618
|
this.errorMessage = "";
|
|
113955
|
-
if (
|
|
113956
|
-
this.value = newValue;
|
|
113957
|
-
this.ezChange.emit(this.value);
|
|
113958
|
-
return true;
|
|
114619
|
+
if (this.value != newValue) {
|
|
114620
|
+
this.value = newValue === undefined ? null : newValue;
|
|
113959
114621
|
}
|
|
113960
114622
|
else {
|
|
113961
|
-
this.
|
|
114623
|
+
this.ezCancelWaitingChange.emit();
|
|
113962
114624
|
}
|
|
113963
|
-
return false;
|
|
113964
114625
|
}
|
|
113965
|
-
|
|
113966
|
-
|
|
114626
|
+
setError(msg) {
|
|
114627
|
+
this.value = null;
|
|
114628
|
+
this.errorMessage = msg;
|
|
114629
|
+
this.ezCancelWaitingChange.emit();
|
|
114630
|
+
}
|
|
114631
|
+
handleBlur() {
|
|
114632
|
+
const parsedNumber = this.getParsedNumber();
|
|
113967
114633
|
if (parsedNumber !== undefined && isNaN(parsedNumber)) {
|
|
113968
|
-
this.
|
|
113969
|
-
this.errorMessage = "O valor digitado não é um número válido";
|
|
114634
|
+
this.setError("O valor digitado não é um número válido");
|
|
113970
114635
|
}
|
|
113971
114636
|
else {
|
|
113972
114637
|
try {
|
|
113973
|
-
|
|
113974
|
-
this.ezCancelWaitingChange.emit();
|
|
113975
|
-
}
|
|
114638
|
+
this.changeValue(parsedNumber);
|
|
113976
114639
|
}
|
|
113977
114640
|
catch (e) {
|
|
113978
|
-
this.
|
|
113979
|
-
this.errorMessage = e.message;
|
|
114641
|
+
this.setError(e.message);
|
|
113980
114642
|
return;
|
|
113981
114643
|
}
|
|
113982
114644
|
}
|
|
113983
114645
|
}
|
|
113984
|
-
|
|
113985
|
-
|
|
113986
|
-
|
|
114646
|
+
handleInput() {
|
|
114647
|
+
const parsedNumber = this.getParsedNumber();
|
|
114648
|
+
if (parsedNumber !== this.value) {
|
|
114649
|
+
this._focused = true;
|
|
114650
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
113987
114651
|
}
|
|
113988
|
-
return undefined;
|
|
113989
114652
|
}
|
|
113990
|
-
|
|
113991
|
-
|
|
114653
|
+
getParsedNumber(value) {
|
|
114654
|
+
var _a;
|
|
114655
|
+
if (value === void 0) {
|
|
114656
|
+
value = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value;
|
|
114657
|
+
}
|
|
114658
|
+
return (value === null || value === void 0 ? void 0 : value.trim()) ? NumberUtils.stringToNumber(value) : undefined;
|
|
114659
|
+
}
|
|
114660
|
+
setInputValue() {
|
|
114661
|
+
const textValue = this.getTextValue(this.value) || '';
|
|
114662
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
114663
|
+
this._textInput.value = textValue;
|
|
114664
|
+
}
|
|
113992
114665
|
}
|
|
113993
114666
|
componentDidLoad() {
|
|
113994
114667
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
114668
|
+
this.setInputValue();
|
|
113995
114669
|
}
|
|
113996
114670
|
render() {
|
|
113997
|
-
return (h("ez-text-input", { ref: elem => this._textInput = elem,
|
|
114671
|
+
return (h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }));
|
|
113998
114672
|
}
|
|
113999
114673
|
get _elem() { return this; }
|
|
114000
114674
|
static get watchers() { return {
|
|
@@ -114216,6 +114890,11 @@ let EzSearch$1 = class extends HTMLElement$1 {
|
|
|
114216
114890
|
*/
|
|
114217
114891
|
this.mode = "regular";
|
|
114218
114892
|
}
|
|
114893
|
+
observeErrorMessage() {
|
|
114894
|
+
if (this._comboElement) {
|
|
114895
|
+
this._comboElement.errorMessage = this.errorMessage;
|
|
114896
|
+
}
|
|
114897
|
+
}
|
|
114219
114898
|
observeValue() {
|
|
114220
114899
|
if (this._comboElement) {
|
|
114221
114900
|
this._comboElement.value = this.value;
|
|
@@ -114233,25 +114912,52 @@ let EzSearch$1 = class extends HTMLElement$1 {
|
|
|
114233
114912
|
async setBlur() {
|
|
114234
114913
|
this._comboElement.setBlur();
|
|
114235
114914
|
}
|
|
114236
|
-
|
|
114237
|
-
|
|
114238
|
-
|
|
114239
|
-
|
|
114915
|
+
/**
|
|
114916
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
114917
|
+
*/
|
|
114918
|
+
async isInvalid() {
|
|
114919
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
114920
|
+
}
|
|
114921
|
+
onComboChange(event) {
|
|
114922
|
+
event.stopPropagation();
|
|
114923
|
+
this.value = event.detail;
|
|
114924
|
+
this.ezChange.emit(event.detail);
|
|
114925
|
+
if (this.errorMessage !== this._comboElement.errorMessage) {
|
|
114926
|
+
this.errorMessage = this._comboElement.errorMessage;
|
|
114927
|
+
}
|
|
114240
114928
|
}
|
|
114241
114929
|
componentDidLoad() {
|
|
114242
114930
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
|
|
114243
114931
|
}
|
|
114244
114932
|
render() {
|
|
114245
|
-
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:
|
|
114933
|
+
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: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode }));
|
|
114246
114934
|
}
|
|
114247
114935
|
;
|
|
114248
114936
|
get _elem() { return this; }
|
|
114249
114937
|
static get watchers() { return {
|
|
114938
|
+
"errorMessage": ["observeErrorMessage"],
|
|
114250
114939
|
"value": ["observeValue"]
|
|
114251
114940
|
}; }
|
|
114252
114941
|
static get style() { return ezSearchCss; }
|
|
114253
114942
|
};
|
|
114254
114943
|
|
|
114944
|
+
const ezSelectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
|
|
114945
|
+
|
|
114946
|
+
let SelectBox = class extends HTMLElement$1 {
|
|
114947
|
+
constructor() {
|
|
114948
|
+
super();
|
|
114949
|
+
this.__registerHost();
|
|
114950
|
+
this.__attachShadow();
|
|
114951
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
114952
|
+
this.selectedOption = { value: "na", label: "N/A" };
|
|
114953
|
+
}
|
|
114954
|
+
render() {
|
|
114955
|
+
return (h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, h("option", { value: "na" }, "N/A"), h("option", { value: "asc" }, "A-Z"), h("option", { value: "desc" }, "Z-A")));
|
|
114956
|
+
}
|
|
114957
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
114958
|
+
static get style() { return ezSelectBoxCss; }
|
|
114959
|
+
};
|
|
114960
|
+
|
|
114255
114961
|
const ezTabselectorCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon: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>');--tabselector--forward-icon: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>')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, \"Sora, Algerian\");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:\"\";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}";
|
|
114256
114962
|
|
|
114257
114963
|
let EzTabselector$1 = class extends HTMLElement$1 {
|
|
@@ -114445,7 +115151,7 @@ let EzTabselector$1 = class extends HTMLElement$1 {
|
|
|
114445
115151
|
static get style() { return ezTabselectorCss; }
|
|
114446
115152
|
};
|
|
114447
115153
|
|
|
114448
|
-
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--medium, 400);--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
|
|
115154
|
+
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--medium, 400);--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-area--font-weight);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:3px;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)}.textarea--slim{margin-top:var(--space--small, 6px)}.textarea--slim::-webkit-input-placeholder{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)}.textarea--slim:-moz-placeholder{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)}.textarea--slim::-moz-placeholder{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)}.textarea--slim:-ms-input-placeholder{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)}.textarea--slim::placeholder{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)}.textarea--slim:disabled::-webkit-input-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-ms-input-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::placeholder{color:var(--text-area__input--disabled--color)}";
|
|
114449
115155
|
|
|
114450
115156
|
let EzTextArea$1 = class extends HTMLElement$1 {
|
|
114451
115157
|
constructor() {
|
|
@@ -114525,6 +115231,12 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114525
115231
|
async setBlur() {
|
|
114526
115232
|
this._inputElem.blur();
|
|
114527
115233
|
}
|
|
115234
|
+
/**
|
|
115235
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
115236
|
+
*/
|
|
115237
|
+
async isInvalid() {
|
|
115238
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
115239
|
+
}
|
|
114528
115240
|
//---------------------------------------------
|
|
114529
115241
|
// Private methods
|
|
114530
115242
|
//---------------------------------------------
|
|
@@ -114583,7 +115295,7 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114583
115295
|
render() {
|
|
114584
115296
|
return (h(Host, null, h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
|
|
114585
115297
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "textarea__label" : "textarea__label textarea__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
114586
|
-
: null, h("textarea", { onFocus: () => this.handleFocus(), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: this.mode
|
|
115298
|
+
: null, h("textarea", { onFocus: () => this.handleFocus(), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: this.mode === "slim" ? "textarea--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, onKeyDown: event => event.stopPropagation(), rows: this.rows })), this.canShowError && this.mode != "slim" &&
|
|
114587
115299
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
114588
115300
|
}
|
|
114589
115301
|
get _hostElement() { return this; }
|
|
@@ -114596,7 +115308,7 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114596
115308
|
static get style() { return ezTextAreaCss; }
|
|
114597
115309
|
};
|
|
114598
115310
|
|
|
114599
|
-
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);
|
|
115311
|
+
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}";
|
|
114600
115312
|
|
|
114601
115313
|
let EzTextInput$1 = class extends HTMLElement$1 {
|
|
114602
115314
|
constructor() {
|
|
@@ -114616,23 +115328,20 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114616
115328
|
* Define o modo do tamanho do campo; opções: slim e regular.
|
|
114617
115329
|
*/
|
|
114618
115330
|
this.mode = "regular";
|
|
114619
|
-
/**
|
|
114620
|
-
* Define se o controle de change do value será controlado por um componente pai.
|
|
114621
|
-
*/
|
|
114622
|
-
this.slaveMode = false;
|
|
114623
115331
|
}
|
|
114624
115332
|
observeErrorMessage() {
|
|
114625
|
-
var _a, _b;
|
|
114626
115333
|
if (this._inputElem) {
|
|
114627
|
-
|
|
114628
|
-
|
|
114629
|
-
|
|
114630
|
-
|
|
114631
|
-
|
|
114632
|
-
|
|
114633
|
-
|
|
114634
|
-
|
|
114635
|
-
|
|
115334
|
+
this.isInvalid().then((hasError) => {
|
|
115335
|
+
var _a, _b;
|
|
115336
|
+
if (hasError) {
|
|
115337
|
+
this._inputElem.classList.add("hasError");
|
|
115338
|
+
(_a = this._messageBoxElem) === null || _a === void 0 ? void 0 : _a.classList.add("hasError");
|
|
115339
|
+
}
|
|
115340
|
+
else {
|
|
115341
|
+
this._inputElem.classList.remove("hasError");
|
|
115342
|
+
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove("hasError");
|
|
115343
|
+
}
|
|
115344
|
+
});
|
|
114636
115345
|
}
|
|
114637
115346
|
}
|
|
114638
115347
|
observeMask() {
|
|
@@ -114651,14 +115360,16 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114651
115360
|
this._inputElem.value = this.value || "";
|
|
114652
115361
|
this.handleChange();
|
|
114653
115362
|
this.adjustFloatingLabel();
|
|
114654
|
-
if (this.
|
|
114655
|
-
|
|
115363
|
+
if (!this.isSlaveMode()) {
|
|
115364
|
+
this.errorMessage = "";
|
|
115365
|
+
this.ezChange.emit(this.value);
|
|
114656
115366
|
}
|
|
114657
|
-
this.errorMessage = "";
|
|
114658
|
-
this.ezChange.emit(this.value);
|
|
114659
115367
|
}
|
|
114660
115368
|
}
|
|
114661
115369
|
}
|
|
115370
|
+
//---------------------------------------------
|
|
115371
|
+
// Private methods
|
|
115372
|
+
//---------------------------------------------
|
|
114662
115373
|
adjustFloatingLabel() {
|
|
114663
115374
|
if (this.label && this._labelElem) {
|
|
114664
115375
|
if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
|
|
@@ -114681,6 +115392,10 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114681
115392
|
isFocused() {
|
|
114682
115393
|
return this._hostElement.shadowRoot.activeElement !== null;
|
|
114683
115394
|
}
|
|
115395
|
+
isSlaveMode() {
|
|
115396
|
+
var _a, _b;
|
|
115397
|
+
return ((_b = (_a = this._hostElement) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.slaveMode) === "true";
|
|
115398
|
+
}
|
|
114684
115399
|
adjustColorContentSlot(color = "") {
|
|
114685
115400
|
if (this._contentLeftSlot) {
|
|
114686
115401
|
this._contentLeftSlot.style.color = color;
|
|
@@ -114701,6 +115416,12 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114701
115416
|
async setBlur() {
|
|
114702
115417
|
this._inputElem.blur();
|
|
114703
115418
|
}
|
|
115419
|
+
/**
|
|
115420
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
115421
|
+
*/
|
|
115422
|
+
async isInvalid() {
|
|
115423
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
115424
|
+
}
|
|
114704
115425
|
//---------------------------------------------
|
|
114705
115426
|
// Event handlers
|
|
114706
115427
|
//---------------------------------------------
|
|
@@ -114725,7 +115446,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114725
115446
|
return true;
|
|
114726
115447
|
}
|
|
114727
115448
|
controlChangeValue() {
|
|
114728
|
-
if ((this.value || '') !== this._inputElem.value) {
|
|
115449
|
+
if (this._inputElem && (this.value || '') !== this._inputElem.value) {
|
|
114729
115450
|
this.value = this._inputElem.value;
|
|
114730
115451
|
}
|
|
114731
115452
|
}
|
|
@@ -114808,7 +115529,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114808
115529
|
render() {
|
|
114809
115530
|
return (h(Host, null, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
114810
115531
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
114811
|
-
: null, h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode
|
|
115532
|
+
: null, h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
114812
115533
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
114813
115534
|
}
|
|
114814
115535
|
get _hostElement() { return this; }
|
|
@@ -114835,7 +115556,7 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114835
115556
|
*/
|
|
114836
115557
|
this.enabled = true;
|
|
114837
115558
|
/**
|
|
114838
|
-
* Define se o componente irá ou não considerar os segundos
|
|
115559
|
+
* Define se o componente irá ou não considerar os segundos.
|
|
114839
115560
|
*/
|
|
114840
115561
|
this.showSeconds = false;
|
|
114841
115562
|
/**
|
|
@@ -114843,6 +115564,18 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114843
115564
|
*/
|
|
114844
115565
|
this.mode = "regular";
|
|
114845
115566
|
}
|
|
115567
|
+
observeErrorMessage() {
|
|
115568
|
+
var _a;
|
|
115569
|
+
if (this._textInput) {
|
|
115570
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
115571
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
115572
|
+
this.prepareValue(this._viewValue);
|
|
115573
|
+
if ((this._textInput.value || '') !== this._viewValue) {
|
|
115574
|
+
this._textInput.value = this._viewValue;
|
|
115575
|
+
}
|
|
115576
|
+
}
|
|
115577
|
+
}
|
|
115578
|
+
}
|
|
114846
115579
|
observeShowSeconds() {
|
|
114847
115580
|
if (this.showSeconds) {
|
|
114848
115581
|
this.prepareMask("##:##:##");
|
|
@@ -114851,9 +115584,23 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114851
115584
|
this.prepareMask("##:##");
|
|
114852
115585
|
}
|
|
114853
115586
|
}
|
|
114854
|
-
observeValue() {
|
|
114855
|
-
if (
|
|
114856
|
-
|
|
115587
|
+
observeValue(newValue, oldValue) {
|
|
115588
|
+
if (this._textInput && newValue != oldValue) {
|
|
115589
|
+
let newValueValidated = this.validateValue(newValue);
|
|
115590
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
115591
|
+
if (newValueValidated != oldValueValidated) {
|
|
115592
|
+
this._viewValue = newValueValidated == undefined ? "" : newValueValidated.toString();
|
|
115593
|
+
this.prepareValue(this._viewValue);
|
|
115594
|
+
if (this._viewValue && !TimeFormatter.validateTime(this._viewValue, this.showSeconds)) {
|
|
115595
|
+
this.setError("Favor inserir um horário válido.");
|
|
115596
|
+
newValueValidated = undefined;
|
|
115597
|
+
}
|
|
115598
|
+
else {
|
|
115599
|
+
this.setError("");
|
|
115600
|
+
}
|
|
115601
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
115602
|
+
this.ezChange.emit(valueEmitted);
|
|
115603
|
+
}
|
|
114857
115604
|
}
|
|
114858
115605
|
}
|
|
114859
115606
|
//---------------------------------------------
|
|
@@ -114867,79 +115614,88 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114867
115614
|
this._maskFormatter.mask = mask;
|
|
114868
115615
|
}
|
|
114869
115616
|
}
|
|
115617
|
+
validateValue(value) {
|
|
115618
|
+
return isNaN(value) || value === undefined ? null : value;
|
|
115619
|
+
}
|
|
115620
|
+
setError(msg) {
|
|
115621
|
+
this.errorMessage = msg;
|
|
115622
|
+
if (this._textInput && (msg === null || msg === void 0 ? void 0 : msg.trim())) {
|
|
115623
|
+
this.ezCancelWaitingChange.emit();
|
|
115624
|
+
}
|
|
115625
|
+
}
|
|
114870
115626
|
//---------------------------------------------
|
|
114871
115627
|
// Public methods
|
|
114872
115628
|
//---------------------------------------------
|
|
115629
|
+
getViewValue() {
|
|
115630
|
+
return this._viewValue;
|
|
115631
|
+
}
|
|
115632
|
+
prepareValue(value) {
|
|
115633
|
+
try {
|
|
115634
|
+
this._viewValue = TimeFormatter.prepareValue(value, this.showSeconds);
|
|
115635
|
+
if (this._textInput && this._textInput.value !== this._viewValue) {
|
|
115636
|
+
this._textInput.value = this._viewValue;
|
|
115637
|
+
}
|
|
115638
|
+
}
|
|
115639
|
+
catch (e) {
|
|
115640
|
+
this.setError(e.message);
|
|
115641
|
+
}
|
|
115642
|
+
}
|
|
114873
115643
|
/**
|
|
114874
115644
|
* Faz o foco no componente de input
|
|
114875
115645
|
*/
|
|
114876
115646
|
async setFocus() {
|
|
114877
|
-
this.
|
|
115647
|
+
this._textInput.setFocus();
|
|
114878
115648
|
}
|
|
114879
115649
|
/**
|
|
114880
115650
|
* Remove o foco no componente de input
|
|
114881
115651
|
*/
|
|
114882
115652
|
async setBlur() {
|
|
114883
|
-
this.
|
|
115653
|
+
this._textInput.setBlur();
|
|
115654
|
+
}
|
|
115655
|
+
/**
|
|
115656
|
+
* Retorna informando se o campo está inválido (true | false)
|
|
115657
|
+
*/
|
|
115658
|
+
async isInvalid() {
|
|
115659
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
114884
115660
|
}
|
|
114885
115661
|
//---------------------------------------------
|
|
114886
115662
|
// Event handlers
|
|
114887
115663
|
//---------------------------------------------
|
|
114888
|
-
|
|
114889
|
-
this.
|
|
114890
|
-
|
|
114891
|
-
|
|
114892
|
-
this.
|
|
114893
|
-
this.ezCancelWaitingChange.emit();
|
|
114894
|
-
this.errorMessage = "Favor inserir um horário válido.";
|
|
114895
|
-
}
|
|
114896
|
-
else {
|
|
114897
|
-
if (this.viewValue === this._oldViewValue) {
|
|
114898
|
-
this.ezCancelWaitingChange.emit();
|
|
114899
|
-
return;
|
|
114900
|
-
}
|
|
114901
|
-
this._oldViewValue = this.viewValue;
|
|
114902
|
-
if (this.viewValue === "00:00" && this.value == undefined) {
|
|
114903
|
-
this.value = 0;
|
|
114904
|
-
}
|
|
114905
|
-
this.ezChange.emit(this.value);
|
|
115664
|
+
handleBlur() {
|
|
115665
|
+
if (this._textInput) {
|
|
115666
|
+
this._viewValue = this._textInput.value;
|
|
115667
|
+
this.prepareValue(this._viewValue);
|
|
115668
|
+
this.value = NumberUtils.stringToNumber(this._viewValue.replace(/\D/g, ""));
|
|
114906
115669
|
}
|
|
114907
115670
|
}
|
|
114908
|
-
|
|
114909
|
-
|
|
114910
|
-
|
|
114911
|
-
|
|
114912
|
-
catch (e) {
|
|
114913
|
-
this.errorMessage = e.message;
|
|
115671
|
+
handleInput() {
|
|
115672
|
+
const parsedNumber = NumberUtils.stringToNumber(this._textInput.value.replace(/\D/g, ""));
|
|
115673
|
+
if (parsedNumber !== this.value) {
|
|
115674
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
114914
115675
|
}
|
|
114915
115676
|
}
|
|
114916
|
-
handleChange() {
|
|
114917
|
-
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
114918
|
-
this.viewValue = this._inputElem.value;
|
|
114919
|
-
this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
114920
|
-
}
|
|
114921
115677
|
//---------------------------------------------
|
|
114922
115678
|
// Lifecycle web component
|
|
114923
115679
|
//---------------------------------------------
|
|
114924
115680
|
componentDidLoad() {
|
|
114925
|
-
this.
|
|
114926
|
-
CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
|
|
115681
|
+
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
114927
115682
|
}
|
|
114928
115683
|
componentWillLoad() {
|
|
114929
115684
|
this.observeShowSeconds();
|
|
114930
115685
|
if (this.value) {
|
|
114931
115686
|
this.prepareValue(this.value.toString());
|
|
114932
115687
|
}
|
|
114933
|
-
else if (this.
|
|
114934
|
-
this.prepareValue(this.
|
|
115688
|
+
else if (this._viewValue) {
|
|
115689
|
+
this.prepareValue(this._viewValue);
|
|
114935
115690
|
}
|
|
114936
115691
|
}
|
|
114937
115692
|
render() {
|
|
114938
|
-
return (h(Host, null, h("ez-text-input", { ref: (el) => this.
|
|
115693
|
+
return (h(Host, null, h("ez-text-input", { ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
114939
115694
|
}
|
|
114940
115695
|
static get assetsDirs() { return ["../assets"]; }
|
|
114941
115696
|
get _elem() { return this; }
|
|
114942
115697
|
static get watchers() { return {
|
|
115698
|
+
"errorMessage": ["observeErrorMessage"],
|
|
114943
115699
|
"showSeconds": ["observeShowSeconds"],
|
|
114944
115700
|
"value": ["observeValue"]
|
|
114945
115701
|
}; }
|
|
@@ -115476,451 +116232,6 @@ let EzViewStack$1 = class extends HTMLElement$1 {
|
|
|
115476
116232
|
static get style() { return ezViewStackCss; }
|
|
115477
116233
|
};
|
|
115478
116234
|
|
|
115479
|
-
const gridConfigCss = ".sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid__group--font-family:var(--font-pattern, \"Sora\");--ez-grid__group--font-size:var(--text--medium, 14px);--ez-grid__group--font-weight:var(--text-weight--large, 600);--ez-grid__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.heigth-calc.sc-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:space-between;align-items:center;width:359px}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-grid-config{display:flex;margin:0;font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight);line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary)}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-grid-config{font-family:var(--ez-grid__group--font-family);font-size:var(--ez-grid__group--font-size);font-weight:var(--ez-grid__group--font-weight);padding-bottom:var(--ez-grid__group--padding-bottom)}";
|
|
115480
|
-
|
|
115481
|
-
let GridConfig$1 = class extends HTMLElement$1 {
|
|
115482
|
-
constructor() {
|
|
115483
|
-
super();
|
|
115484
|
-
this.__registerHost();
|
|
115485
|
-
this.configFinish = createEvent(this, "configFinish", 7);
|
|
115486
|
-
this.configCancel = createEvent(this, "configCancel", 7);
|
|
115487
|
-
this._orderListItems = [];
|
|
115488
|
-
this._orderPriorityList = [];
|
|
115489
|
-
this._columListItems = [];
|
|
115490
|
-
this._selectedIndex = -1;
|
|
115491
|
-
this._dataChanged = false;
|
|
115492
|
-
this._componenteInternalKey = Date.now();
|
|
115493
|
-
this.selectedTab = "Colunas";
|
|
115494
|
-
}
|
|
115495
|
-
/* Creation Methods */
|
|
115496
|
-
createOrderList() {
|
|
115497
|
-
let newList = [];
|
|
115498
|
-
this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach(column => {
|
|
115499
|
-
var _a;
|
|
115500
|
-
let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find(item => item.name === column.name);
|
|
115501
|
-
let item = { name: column.name, label: column.label };
|
|
115502
|
-
if (configItem) {
|
|
115503
|
-
item['orderIndex'] = configItem.orderIndex;
|
|
115504
|
-
item['ascending'] = configItem.ascending;
|
|
115505
|
-
}
|
|
115506
|
-
if (!column.hidden) {
|
|
115507
|
-
newList.push(item);
|
|
115508
|
-
}
|
|
115509
|
-
});
|
|
115510
|
-
newList.sort((a, b) => {
|
|
115511
|
-
//OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
|
|
115512
|
-
if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
|
|
115513
|
-
if (a.ascending != undefined)
|
|
115514
|
-
return -1;
|
|
115515
|
-
if (b.ascending != undefined)
|
|
115516
|
-
return 1;
|
|
115517
|
-
return 0;
|
|
115518
|
-
//Pelo menos um deles tem order index diferente de 0 e os dois tem orientação de ordenação.
|
|
115519
|
-
}
|
|
115520
|
-
else if (a.ascending != undefined && b.ascending != undefined) {
|
|
115521
|
-
return (a.orderIndex - b.orderIndex);
|
|
115522
|
-
//Pelo menos um deles tem order index diferente de 0 e pelo menos um deles tem orientação de ordenação.
|
|
115523
|
-
}
|
|
115524
|
-
else if (a.ascending != undefined || b.ascending != undefined) {
|
|
115525
|
-
if (a.ascending != undefined)
|
|
115526
|
-
return -1;
|
|
115527
|
-
if (b.ascending != undefined)
|
|
115528
|
-
return 1;
|
|
115529
|
-
return 0;
|
|
115530
|
-
}
|
|
115531
|
-
return (a.orderIndex - b.orderIndex);
|
|
115532
|
-
});
|
|
115533
|
-
this._orderListItems = newList;
|
|
115534
|
-
}
|
|
115535
|
-
createColumnList() {
|
|
115536
|
-
let visibleGroup = {
|
|
115537
|
-
group: 'Visíveis',
|
|
115538
|
-
items: [],
|
|
115539
|
-
};
|
|
115540
|
-
let hiddenGroup = {
|
|
115541
|
-
group: 'Ocultas',
|
|
115542
|
-
items: [],
|
|
115543
|
-
sort: 'ASC'
|
|
115544
|
-
};
|
|
115545
|
-
this.columns.forEach(column => {
|
|
115546
|
-
let item = { label: column.label };
|
|
115547
|
-
if (column.hidden) {
|
|
115548
|
-
hiddenGroup.items.push(item);
|
|
115549
|
-
}
|
|
115550
|
-
else {
|
|
115551
|
-
visibleGroup.items.push(item);
|
|
115552
|
-
}
|
|
115553
|
-
});
|
|
115554
|
-
this._columListItems = [visibleGroup, hiddenGroup];
|
|
115555
|
-
}
|
|
115556
|
-
buildColumnListSlot(item, group) {
|
|
115557
|
-
return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + item + group, value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
|
|
115558
|
-
}
|
|
115559
|
-
buildOrderListSlot(item) {
|
|
115560
|
-
let selectedOption = "na";
|
|
115561
|
-
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
|
115562
|
-
selectedOption = item.ascending == true ? 'asc' : 'desc';
|
|
115563
|
-
}
|
|
115564
|
-
return (h("div", null, h("select-box", { selectedOption: selectedOption, key: 'select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
|
|
115565
|
-
}
|
|
115566
|
-
updateOrder(sortOrder, updatedItemLabel) {
|
|
115567
|
-
var _a;
|
|
115568
|
-
this._dataChanged = true;
|
|
115569
|
-
let newList = [...this.columns];
|
|
115570
|
-
let newItem = newList.find(item => item.label === updatedItemLabel);
|
|
115571
|
-
if (newItem) {
|
|
115572
|
-
newItem.sort = sortOrder.value === "na" ? undefined : sortOrder.value;
|
|
115573
|
-
}
|
|
115574
|
-
let orderArray;
|
|
115575
|
-
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
115576
|
-
this._orderPriorityList.find(item => item.label === newItem.label).sort = sortOrder;
|
|
115577
|
-
this._orderPriorityList.filter(item => item.sort).map((item, index) => {
|
|
115578
|
-
if (item.label === newItem.label) {
|
|
115579
|
-
newItem.sortIndex = index;
|
|
115580
|
-
}
|
|
115581
|
-
});
|
|
115582
|
-
}
|
|
115583
|
-
else {
|
|
115584
|
-
orderArray = newList.filter(item => item.sort && item.hidden !== true).map((item, index) => {
|
|
115585
|
-
return { label: item.label, orderIndex: index };
|
|
115586
|
-
});
|
|
115587
|
-
orderArray.forEach(element => {
|
|
115588
|
-
newList.find(item => item.label === element.label).sortIndex = element.orderIndex;
|
|
115589
|
-
});
|
|
115590
|
-
}
|
|
115591
|
-
this.columns = newList;
|
|
115592
|
-
}
|
|
115593
|
-
/* Actions Methods */
|
|
115594
|
-
switchColumnGroup(ev, switchedItem) {
|
|
115595
|
-
ev.stopPropagation();
|
|
115596
|
-
let newList = [...this._columListItems];
|
|
115597
|
-
this._dataChanged = true;
|
|
115598
|
-
if (ev.detail === true) {
|
|
115599
|
-
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
115600
|
-
let index = hiddenGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
115601
|
-
if (index >= 0) {
|
|
115602
|
-
hiddenGroup.items.splice(index, 1);
|
|
115603
|
-
}
|
|
115604
|
-
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
115605
|
-
visibleGroup.items.push(switchedItem);
|
|
115606
|
-
this._columListItems = newList;
|
|
115607
|
-
this.createOrderList();
|
|
115608
|
-
}
|
|
115609
|
-
else if (ev.detail === false) {
|
|
115610
|
-
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
115611
|
-
let index = visibleGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
115612
|
-
if (index >= 0) {
|
|
115613
|
-
visibleGroup.items.splice(index, 1);
|
|
115614
|
-
}
|
|
115615
|
-
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
115616
|
-
hiddenGroup.items.push(switchedItem);
|
|
115617
|
-
this._columListItems = newList;
|
|
115618
|
-
this.createOrderList();
|
|
115619
|
-
}
|
|
115620
|
-
}
|
|
115621
|
-
finish() {
|
|
115622
|
-
let newColumnList = [];
|
|
115623
|
-
this._columListItems.forEach(group => {
|
|
115624
|
-
group.items.forEach(item => {
|
|
115625
|
-
const baseColumn = this.columns.find(column => column.label === item.label);
|
|
115626
|
-
let newColumnItem = Object.assign({}, baseColumn);
|
|
115627
|
-
if (group.group === "Ocultas") {
|
|
115628
|
-
newColumnItem.hidden = true;
|
|
115629
|
-
}
|
|
115630
|
-
else {
|
|
115631
|
-
newColumnItem.hidden = false;
|
|
115632
|
-
}
|
|
115633
|
-
newColumnList.push(newColumnItem);
|
|
115634
|
-
});
|
|
115635
|
-
});
|
|
115636
|
-
this.columns = newColumnList;
|
|
115637
|
-
this._dataChanged = false;
|
|
115638
|
-
this.closeConfig();
|
|
115639
|
-
ApplicationUtils.info("As configurações foram salvas com sucesso!");
|
|
115640
|
-
this.save();
|
|
115641
|
-
}
|
|
115642
|
-
save() {
|
|
115643
|
-
var _a;
|
|
115644
|
-
let _newConfig;
|
|
115645
|
-
if (this.config) {
|
|
115646
|
-
_newConfig = this.config;
|
|
115647
|
-
}
|
|
115648
|
-
else {
|
|
115649
|
-
_newConfig = this.createConfigFromState(this.columns);
|
|
115650
|
-
}
|
|
115651
|
-
let _newColumnConfigList = [];
|
|
115652
|
-
let orderArray;
|
|
115653
|
-
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
115654
|
-
orderArray = this.columns.filter(item => item.sort && item.hidden !== true).map((item) => {
|
|
115655
|
-
return { label: item.label, orderIndex: 0 };
|
|
115656
|
-
});
|
|
115657
|
-
let indexCount = 0;
|
|
115658
|
-
let newOrderArray = [];
|
|
115659
|
-
this._orderPriorityList.forEach((orderPriorityItem) => {
|
|
115660
|
-
let item = orderArray.find(column => column.label === orderPriorityItem.label);
|
|
115661
|
-
if (item) {
|
|
115662
|
-
item.orderIndex = indexCount;
|
|
115663
|
-
newOrderArray.push(item);
|
|
115664
|
-
indexCount++;
|
|
115665
|
-
}
|
|
115666
|
-
});
|
|
115667
|
-
if (newOrderArray.length > 0) {
|
|
115668
|
-
orderArray = newOrderArray;
|
|
115669
|
-
}
|
|
115670
|
-
}
|
|
115671
|
-
for (let i = 0; i < this.columns.length; i++) {
|
|
115672
|
-
const column = this.columns[i];
|
|
115673
|
-
let _newColumnConfig = _newConfig.columns.find(_newColumnConfig => column.name === _newColumnConfig.name);
|
|
115674
|
-
if (column.hidden === true && _newColumnConfig) {
|
|
115675
|
-
continue;
|
|
115676
|
-
}
|
|
115677
|
-
if (_newColumnConfig) {
|
|
115678
|
-
_newColumnConfig.width = column.width;
|
|
115679
|
-
}
|
|
115680
|
-
else if (column.hidden === false) {
|
|
115681
|
-
_newColumnConfig = { name: column.name, width: column.width, orderIndex: 0 };
|
|
115682
|
-
}
|
|
115683
|
-
if (_newColumnConfig) {
|
|
115684
|
-
if (column.sort) {
|
|
115685
|
-
_newColumnConfig.ascending = column.sort.toUpperCase() === "ASC" ? true : false;
|
|
115686
|
-
if (orderArray) {
|
|
115687
|
-
adjustPriorityOrder(column, _newColumnConfig);
|
|
115688
|
-
}
|
|
115689
|
-
else {
|
|
115690
|
-
_newColumnConfig.orderIndex = column.sortIndex;
|
|
115691
|
-
}
|
|
115692
|
-
}
|
|
115693
|
-
else {
|
|
115694
|
-
delete _newColumnConfig.ascending;
|
|
115695
|
-
_newColumnConfig.orderIndex = 0;
|
|
115696
|
-
}
|
|
115697
|
-
_newColumnConfigList.push(_newColumnConfig);
|
|
115698
|
-
}
|
|
115699
|
-
}
|
|
115700
|
-
_newConfig.columns = _newColumnConfigList;
|
|
115701
|
-
this.configFinish.emit(_newConfig);
|
|
115702
|
-
this._orderList.clearHistory();
|
|
115703
|
-
function adjustPriorityOrder(column, _newColumnConfig) {
|
|
115704
|
-
if (orderArray) {
|
|
115705
|
-
let orderItem = orderArray.find(item => item.label === column.label);
|
|
115706
|
-
if (orderItem) {
|
|
115707
|
-
_newColumnConfig.orderIndex = orderItem.orderIndex;
|
|
115708
|
-
}
|
|
115709
|
-
}
|
|
115710
|
-
}
|
|
115711
|
-
}
|
|
115712
|
-
createConfigFromState(state) {
|
|
115713
|
-
let newConfig = { columns: [] };
|
|
115714
|
-
state.forEach(columnState => {
|
|
115715
|
-
if (!columnState.hidden) {
|
|
115716
|
-
let newConfigColumn = { name: columnState.name };
|
|
115717
|
-
if (columnState.width) {
|
|
115718
|
-
newConfigColumn['width'] = columnState.width;
|
|
115719
|
-
}
|
|
115720
|
-
if (columnState.sort) {
|
|
115721
|
-
newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === 'ASC');
|
|
115722
|
-
newConfigColumn['orderIndex'] = columnState.sortIndex;
|
|
115723
|
-
}
|
|
115724
|
-
else {
|
|
115725
|
-
newConfigColumn['orderIndex'] = 0;
|
|
115726
|
-
}
|
|
115727
|
-
if (newConfigColumn) {
|
|
115728
|
-
newConfig.columns.push(newConfigColumn);
|
|
115729
|
-
}
|
|
115730
|
-
}
|
|
115731
|
-
});
|
|
115732
|
-
return newConfig;
|
|
115733
|
-
}
|
|
115734
|
-
async locateColumn(evt, searchingText) {
|
|
115735
|
-
var _a;
|
|
115736
|
-
const hitEnter = evt.key === "Enter";
|
|
115737
|
-
if (!searchingText) {
|
|
115738
|
-
searchingText = (_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
115739
|
-
}
|
|
115740
|
-
let newSelected = -1;
|
|
115741
|
-
if (this.selectedTab === "Ordenação das linhas") {
|
|
115742
|
-
if (searchingText) {
|
|
115743
|
-
const matchedIndexes = [];
|
|
115744
|
-
let orderListDatasource;
|
|
115745
|
-
await this._orderList.getList().then(listGroup => {
|
|
115746
|
-
orderListDatasource = listGroup;
|
|
115747
|
-
orderListDatasource.forEach((column, index) => {
|
|
115748
|
-
if (this.compareWords(column, searchingText)) {
|
|
115749
|
-
matchedIndexes.push(index);
|
|
115750
|
-
}
|
|
115751
|
-
});
|
|
115752
|
-
});
|
|
115753
|
-
if (matchedIndexes.length > 0) {
|
|
115754
|
-
if (hitEnter) {
|
|
115755
|
-
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
115756
|
-
if (matchedIndexes[j] > this._selectedIndex) {
|
|
115757
|
-
newSelected = matchedIndexes[j];
|
|
115758
|
-
break;
|
|
115759
|
-
}
|
|
115760
|
-
}
|
|
115761
|
-
}
|
|
115762
|
-
if (newSelected === -1) {
|
|
115763
|
-
newSelected = matchedIndexes[0];
|
|
115764
|
-
}
|
|
115765
|
-
}
|
|
115766
|
-
this._selectedIndex = newSelected;
|
|
115767
|
-
let selectedColumn;
|
|
115768
|
-
selectedColumn = orderListDatasource[newSelected];
|
|
115769
|
-
if (selectedColumn) {
|
|
115770
|
-
this._orderList.setSelection({ label: selectedColumn.label }, true);
|
|
115771
|
-
}
|
|
115772
|
-
else {
|
|
115773
|
-
this._orderList.setSelection(undefined);
|
|
115774
|
-
}
|
|
115775
|
-
}
|
|
115776
|
-
else {
|
|
115777
|
-
this._orderList.setSelection(undefined);
|
|
115778
|
-
}
|
|
115779
|
-
}
|
|
115780
|
-
else {
|
|
115781
|
-
if (searchingText) {
|
|
115782
|
-
const matchedIndexes = [];
|
|
115783
|
-
this.columns.forEach((column, index) => {
|
|
115784
|
-
if (this.compareWords(column, searchingText)) {
|
|
115785
|
-
matchedIndexes.push(index);
|
|
115786
|
-
}
|
|
115787
|
-
});
|
|
115788
|
-
if (matchedIndexes.length > 0) {
|
|
115789
|
-
if (hitEnter) {
|
|
115790
|
-
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
115791
|
-
if (matchedIndexes[j] > this._selectedIndex) {
|
|
115792
|
-
newSelected = matchedIndexes[j];
|
|
115793
|
-
break;
|
|
115794
|
-
}
|
|
115795
|
-
}
|
|
115796
|
-
}
|
|
115797
|
-
if (newSelected === -1) {
|
|
115798
|
-
newSelected = matchedIndexes[0];
|
|
115799
|
-
}
|
|
115800
|
-
}
|
|
115801
|
-
this._selectedIndex = newSelected;
|
|
115802
|
-
let selectedColumn = this.columns[newSelected];
|
|
115803
|
-
if (selectedColumn) {
|
|
115804
|
-
this._columnList.setSelection({ label: selectedColumn.label }, true);
|
|
115805
|
-
}
|
|
115806
|
-
else {
|
|
115807
|
-
this._columnList.setSelection(undefined);
|
|
115808
|
-
}
|
|
115809
|
-
}
|
|
115810
|
-
else {
|
|
115811
|
-
this._columnList.setSelection(undefined);
|
|
115812
|
-
}
|
|
115813
|
-
}
|
|
115814
|
-
}
|
|
115815
|
-
compareWords(column, searchingText) {
|
|
115816
|
-
if (StringUtils.replaceAccentuatedChars(column.label).indexOf(StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
|
|
115817
|
-
return true;
|
|
115818
|
-
}
|
|
115819
|
-
return false;
|
|
115820
|
-
}
|
|
115821
|
-
closeConfig() {
|
|
115822
|
-
this._orderList.scrollToTop();
|
|
115823
|
-
this._columnList.scrollToTop();
|
|
115824
|
-
this._searchElement.value = "";
|
|
115825
|
-
if (this._dataChanged) {
|
|
115826
|
-
let options = {
|
|
115827
|
-
canClose: false,
|
|
115828
|
-
labelCancel: "Descartar",
|
|
115829
|
-
labelConfirm: "Salvar",
|
|
115830
|
-
btnConfirmDanger: false
|
|
115831
|
-
};
|
|
115832
|
-
ApplicationUtils.confirm("Aviso", "As alterações realizadas serão descartadas. Gostaria de salvar antes de sair?", null, false, options)
|
|
115833
|
-
.then(response => {
|
|
115834
|
-
if (!response) {
|
|
115835
|
-
this._dataChanged = false;
|
|
115836
|
-
this.configCancel.emit();
|
|
115837
|
-
this._orderList.clearHistory();
|
|
115838
|
-
this._componenteInternalKey = Date.now();
|
|
115839
|
-
}
|
|
115840
|
-
else {
|
|
115841
|
-
this.finish();
|
|
115842
|
-
}
|
|
115843
|
-
});
|
|
115844
|
-
}
|
|
115845
|
-
else {
|
|
115846
|
-
this.configCancel.emit();
|
|
115847
|
-
this._orderList.clearHistory();
|
|
115848
|
-
}
|
|
115849
|
-
}
|
|
115850
|
-
/* Handlers */
|
|
115851
|
-
handleTabChange(ev) {
|
|
115852
|
-
var _a;
|
|
115853
|
-
if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
|
|
115854
|
-
if (this.selectedTab !== ev.target.selectedTab) {
|
|
115855
|
-
if (ev.target.selectedTab === "Colunas") {
|
|
115856
|
-
this._orderList.scrollToTop();
|
|
115857
|
-
}
|
|
115858
|
-
else if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
115859
|
-
this._columnList.scrollToTop();
|
|
115860
|
-
}
|
|
115861
|
-
this._searchElement.value = "";
|
|
115862
|
-
}
|
|
115863
|
-
if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
115864
|
-
this.createOrderList();
|
|
115865
|
-
}
|
|
115866
|
-
this.selectedTab = ev.target.selectedTab;
|
|
115867
|
-
}
|
|
115868
|
-
}
|
|
115869
|
-
handleColumnListChange(ev) {
|
|
115870
|
-
var _a;
|
|
115871
|
-
if (ev.detail) {
|
|
115872
|
-
let visibleItems = (_a = ev.detail.find(group => group.group === "Visíveis")) === null || _a === void 0 ? void 0 : _a.items;
|
|
115873
|
-
if (visibleItems) {
|
|
115874
|
-
this._dataChanged = true;
|
|
115875
|
-
this._orderListItems = visibleItems;
|
|
115876
|
-
}
|
|
115877
|
-
}
|
|
115878
|
-
}
|
|
115879
|
-
handleOrderListChange(ev) {
|
|
115880
|
-
if (ev.detail) {
|
|
115881
|
-
let orderPriorityList = ev.detail;
|
|
115882
|
-
if (orderPriorityList) {
|
|
115883
|
-
this._dataChanged = true;
|
|
115884
|
-
this._orderPriorityList = orderPriorityList;
|
|
115885
|
-
}
|
|
115886
|
-
}
|
|
115887
|
-
}
|
|
115888
|
-
componentWillRender() {
|
|
115889
|
-
var _a;
|
|
115890
|
-
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
115891
|
-
this.createColumnList();
|
|
115892
|
-
}
|
|
115893
|
-
}
|
|
115894
|
-
componentDidRender() {
|
|
115895
|
-
var _a;
|
|
115896
|
-
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
115897
|
-
this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
|
|
115898
|
-
}
|
|
115899
|
-
}
|
|
115900
|
-
render() {
|
|
115901
|
-
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "heigth-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: ev => this.handleOrderListChange(ev), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "ez-button--primary", onClick: () => this.finish() }))));
|
|
115902
|
-
}
|
|
115903
|
-
static get assetsDirs() { return ["../assets"]; }
|
|
115904
|
-
static get style() { return gridConfigCss; }
|
|
115905
|
-
};
|
|
115906
|
-
|
|
115907
|
-
const selectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
|
|
115908
|
-
|
|
115909
|
-
let SelectBox$1 = class extends HTMLElement$1 {
|
|
115910
|
-
constructor() {
|
|
115911
|
-
super();
|
|
115912
|
-
this.__registerHost();
|
|
115913
|
-
this.__attachShadow();
|
|
115914
|
-
this.ezChange = createEvent(this, "ezChange", 7);
|
|
115915
|
-
this.selectedOption = { value: "na", label: "N/A" };
|
|
115916
|
-
}
|
|
115917
|
-
render() {
|
|
115918
|
-
return (h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, h("option", { value: "na" }, "N/A"), h("option", { value: "asc" }, "A-Z"), h("option", { value: "desc" }, "Z-A")));
|
|
115919
|
-
}
|
|
115920
|
-
static get assetsDirs() { return ["../assets"]; }
|
|
115921
|
-
static get style() { return selectBoxCss; }
|
|
115922
|
-
};
|
|
115923
|
-
|
|
115924
116235
|
const testDuCss = ":host{display:block}";
|
|
115925
116236
|
|
|
115926
116237
|
let TestDu$1 = class extends HTMLElement$1 {
|
|
@@ -116030,6 +116341,7 @@ const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"co
|
|
|
116030
116341
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513]}]);
|
|
116031
116342
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [0,"ez-form",{"dataUnit":[1040],"config":[16]}]);
|
|
116032
116343
|
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32]}]);
|
|
116344
|
+
const EzGridConfig = /*@__PURE__*/proxyCustomElement(EzGridConfig$1, [2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]);
|
|
116033
116345
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
116034
116346
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
116035
116347
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
@@ -116038,15 +116350,14 @@ const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-nu
|
|
|
116038
116350
|
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],"innerElement":[1537,"inner-element"]}]);
|
|
116039
116351
|
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]);
|
|
116040
116352
|
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"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513]}]);
|
|
116353
|
+
const EzSelectBox = /*@__PURE__*/proxyCustomElement(SelectBox, [1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]);
|
|
116041
116354
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
|
|
116042
116355
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513]}]);
|
|
116043
|
-
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513]
|
|
116044
|
-
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"
|
|
116356
|
+
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513]}]);
|
|
116357
|
+
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513]}]);
|
|
116045
116358
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"]}]);
|
|
116046
116359
|
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]}]);
|
|
116047
116360
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
116048
|
-
const GridConfig = /*@__PURE__*/proxyCustomElement(GridConfig$1, [2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]);
|
|
116049
|
-
const SelectBox = /*@__PURE__*/proxyCustomElement(SelectBox$1, [1,"select-box",{"selectedOption":[1,"selected-option"]}]);
|
|
116050
116361
|
const TestDu = /*@__PURE__*/proxyCustomElement(TestDu$1, [0,"test-du",{"isDirty":[32]}]);
|
|
116051
116362
|
const defineCustomElements = (opts) => {
|
|
116052
116363
|
if (typeof customElements !== 'undefined') {
|
|
@@ -116065,6 +116376,7 @@ const defineCustomElements = (opts) => {
|
|
|
116065
116376
|
EzFilterInput,
|
|
116066
116377
|
EzForm,
|
|
116067
116378
|
EzGrid,
|
|
116379
|
+
EzGridConfig,
|
|
116068
116380
|
EzIcon,
|
|
116069
116381
|
EzList,
|
|
116070
116382
|
EzLoadingBar,
|
|
@@ -116073,6 +116385,7 @@ const defineCustomElements = (opts) => {
|
|
|
116073
116385
|
EzPopover,
|
|
116074
116386
|
EzPopup,
|
|
116075
116387
|
EzSearch,
|
|
116388
|
+
EzSelectBox,
|
|
116076
116389
|
EzTabselector,
|
|
116077
116390
|
EzTextArea,
|
|
116078
116391
|
EzTextInput,
|
|
@@ -116080,8 +116393,6 @@ const defineCustomElements = (opts) => {
|
|
|
116080
116393
|
EzToast,
|
|
116081
116394
|
EzUpload,
|
|
116082
116395
|
EzViewStack,
|
|
116083
|
-
GridConfig,
|
|
116084
|
-
SelectBox,
|
|
116085
116396
|
TestDu
|
|
116086
116397
|
].forEach(cmp => {
|
|
116087
116398
|
if (!customElements.get(cmp.is)) {
|
|
@@ -116091,4 +116402,4 @@ const defineCustomElements = (opts) => {
|
|
|
116091
116402
|
}
|
|
116092
116403
|
};
|
|
116093
116404
|
|
|
116094
|
-
export { EzApplication, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzLoadingBar, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, EzViewStack,
|
|
116405
|
+
export { EzApplication, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzGridConfig, EzIcon, EzList, EzLoadingBar, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzSelectBox, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, EzViewStack, TestDu, defineCustomElements };
|