@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-81596.0 → 0.0.0-bugfix-dev-KB-81596.1
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/{DataBinder-e92314c2.js → DataBinder-c2060474.js} +3 -2
- package/dist/cjs/FormLayout-c2451c7f.js +7 -0
- package/dist/cjs/{constants-2714478b.js → constants-569271bc.js} +4 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +2 -1
- package/dist/cjs/ez-card-item_2.cjs.entry.js +3 -1217
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -1
- package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +3 -2
- package/dist/cjs/ez-combo-box.cjs.entry.js +2 -7
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +18 -10
- package/dist/cjs/ez-form.cjs.entry.js +29 -3
- package/dist/cjs/ez-grid.cjs.entry.js +165 -28
- package/dist/cjs/ez-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +369 -0
- package/dist/cjs/ez-search-result-list.cjs.entry.js +98 -0
- package/dist/cjs/ez-search.cjs.entry.js +3 -2
- package/dist/cjs/ez-split-item.cjs.entry.js +2 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +20 -87
- package/dist/cjs/ez-tooltip.cjs.entry.js +104 -29
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/floating-ui.dom.esm-017acce4.js +1404 -0
- package/dist/cjs/index-a7b0c73d.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{ICustomRender-6fafffce.js → types-6a5df0c7.js} +8 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -8
- package/dist/collection/components/ez-date-input/ez-date-input.js +1 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +1 -1
- package/dist/collection/components/ez-form/ez-form.js +31 -4
- package/dist/collection/components/ez-form-view/ez-form-view.css +8 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js +21 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +3 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +6 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +96 -16
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +21 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +31 -7
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +2 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js +15 -0
- package/dist/collection/components/ez-list/ez-list.js +2 -2
- package/dist/collection/components/ez-modal/ez-modal.js +1 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -1
- package/dist/collection/components/ez-popup/ez-popup.js +1 -1
- package/dist/collection/components/ez-search-plus/ez-search-plus.css +373 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.js +952 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +227 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +279 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css +18 -2
- package/dist/collection/components/ez-text-input/ez-text-input.js +39 -60
- package/dist/collection/components/ez-tooltip/ez-tooltip.css +52 -12
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +217 -46
- package/dist/collection/utils/constants.js +2 -0
- package/dist/collection/utils/form/DataBinder.js +3 -2
- package/dist/collection/utils/form/interfaces/FormLayout.js +5 -0
- package/dist/collection/utils/form/interfaces/index.js +1 -1
- package/dist/collection/utils/index.js +2 -0
- package/dist/collection/utils/search/types.js +7 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +992 -170
- package/dist/esm/{DataBinder-9c877244.js → DataBinder-89946126.js} +3 -2
- package/dist/esm/FormLayout-54092963.js +7 -0
- package/dist/esm/constants-b036528f.js +7 -0
- package/dist/esm/ez-actions-button.entry.js +2 -1
- package/dist/esm/ez-card-item_2.entry.js +1 -1215
- package/dist/esm/ez-collapsible-box.entry.js +2 -1
- package/dist/esm/ez-combo-box-list_3.entry.js +2 -1
- package/dist/esm/ez-combo-box.entry.js +2 -7
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +19 -11
- package/dist/esm/ez-form.entry.js +30 -4
- package/dist/esm/ez-grid.entry.js +164 -27
- package/dist/esm/ez-list.entry.js +2 -2
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +365 -0
- package/dist/esm/ez-search-result-list.entry.js +94 -0
- package/dist/esm/ez-search.entry.js +3 -2
- package/dist/esm/ez-split-item.entry.js +2 -1
- package/dist/esm/ez-text-input.entry.js +20 -87
- package/dist/esm/ez-tooltip.entry.js +105 -30
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/floating-ui.dom.esm-5d3da819.js +1398 -0
- package/dist/esm/index-baa5e267.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{ICustomRender-875b5a40.js → types-6f6b2650.js} +9 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-0bffeffc.entry.js +1 -0
- package/dist/ezui/p-173f68ea.js +1 -0
- package/dist/ezui/p-1a060042.entry.js +1 -0
- package/dist/ezui/{p-cb5cd243.entry.js → p-1ec8bdd2.entry.js} +46 -46
- package/dist/ezui/p-248d4f54.entry.js +1 -0
- package/dist/ezui/p-3176a6ef.entry.js +1 -0
- package/dist/ezui/p-4e0628a7.entry.js +1 -0
- package/dist/ezui/p-5895e687.js +1 -0
- package/dist/ezui/p-5a14f506.entry.js +1 -0
- package/dist/ezui/p-5ec0ae79.entry.js +1 -0
- package/dist/ezui/p-5eea9886.js +1 -0
- package/dist/ezui/p-81145609.entry.js +1 -0
- package/dist/ezui/p-84b1c99e.entry.js +1 -0
- package/dist/ezui/p-8ac8093c.entry.js +1 -0
- package/dist/ezui/p-9142b27a.entry.js +1 -0
- package/dist/ezui/p-9567b31a.entry.js +1 -0
- package/dist/ezui/p-9f22e1dc.entry.js +1 -0
- package/dist/ezui/{p-acddfb2e.js → p-a64cfcfc.js} +1 -1
- package/dist/ezui/p-bf9dec89.entry.js +1 -0
- package/dist/ezui/p-c5df78be.entry.js +1 -0
- package/dist/ezui/p-cd07f8be.entry.js +1 -0
- package/dist/ezui/p-e07e4671.js +1 -0
- package/dist/ezui/p-e3544d23.entry.js +1 -0
- package/dist/ezui/p-ecaac11f.entry.js +1 -0
- package/dist/ezui/p-f4861c6a.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +0 -2
- package/dist/types/components/ez-form/ez-form.d.ts +5 -1
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +4 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +5 -2
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.d.ts +3 -0
- package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +184 -0
- package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +26 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +6 -9
- package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +37 -5
- package/dist/types/components.d.ts +338 -12
- package/dist/types/utils/constants.d.ts +2 -0
- package/dist/types/utils/form/interfaces/FormLayout.d.ts +4 -0
- package/dist/types/utils/form/interfaces/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/search/types.d.ts +12 -0
- package/package.json +3 -3
- package/react/components.d.ts +62 -60
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/react/react-component-lib/createComponent.d.ts +1 -1
- package/react/react-component-lib/createComponent.js.map +1 -1
- package/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/react/react-component-lib/interfaces.js +1 -0
- package/react/react-component-lib/utils/attachProps.d.ts +1 -1
- package/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/react/react-component-lib/utils/dev.js.map +1 -1
- package/react/react-component-lib/utils/index.d.ts +2 -2
- package/react/react-component-lib/utils/index.js.map +1 -1
- package/dist/collection/utils/ResponsiveInputUtils.js +0 -26
- package/dist/esm/constants-4e0d35b7.js +0 -5
- package/dist/ezui/p-05e1f4e7.js +0 -1
- package/dist/ezui/p-17eabf46.entry.js +0 -1
- package/dist/ezui/p-1ad6c61b.entry.js +0 -1
- package/dist/ezui/p-20cb13fa.entry.js +0 -1
- package/dist/ezui/p-23b6128c.entry.js +0 -1
- package/dist/ezui/p-3195a7a7.entry.js +0 -1
- package/dist/ezui/p-4607fb89.js +0 -1
- package/dist/ezui/p-556468d9.entry.js +0 -1
- package/dist/ezui/p-6cdd3e0a.entry.js +0 -1
- package/dist/ezui/p-788467fe.entry.js +0 -1
- package/dist/ezui/p-af1a478e.entry.js +0 -1
- package/dist/ezui/p-bbdc3996.entry.js +0 -1
- package/dist/ezui/p-c297aa52.entry.js +0 -1
- package/dist/ezui/p-cb1535f7.entry.js +0 -1
- package/dist/ezui/p-cf87aacb.entry.js +0 -1
- package/dist/ezui/p-dcf3c8e5.entry.js +0 -1
- package/dist/ezui/p-e347df9c.entry.js +0 -1
- package/dist/ezui/p-f5931caa.entry.js +0 -1
- package/dist/ezui/p-fd0a19d6.entry.js +0 -1
- package/dist/types/utils/ResponsiveInputUtils.d.ts +0 -6
|
@@ -817,8 +817,9 @@ class DataBinder {
|
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
819
|
bindSearchOptionsLoader(fieldName, field) {
|
|
820
|
-
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"] == undefined) {
|
|
821
|
-
const
|
|
820
|
+
if ((field.nodeName === "EZ-SEARCH" || field.nodeName === "EZ-SEARCH-PLUS") && field["optionLoader"] == undefined) {
|
|
821
|
+
const isSearchPlus = field.nodeName === "EZ-SEARCH-PLUS";
|
|
822
|
+
const loader = isSearchPlus ? ApplicationContext.getContextValue("__EZUI__SEARCH__PLUS__OPTION__LOADER__") : ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
822
823
|
if (loader) {
|
|
823
824
|
field["optionLoader"] = (arg, ctxOptions) => {
|
|
824
825
|
return loader(arg, fieldName, this._dataUnit, ctxOptions);
|
|
@@ -937,6 +938,20 @@ var CustomRenderSource;
|
|
|
937
938
|
CustomRenderSource["FORM"] = "FORM";
|
|
938
939
|
})(CustomRenderSource || (CustomRenderSource = {}));
|
|
939
940
|
|
|
941
|
+
var SearchMode$2;
|
|
942
|
+
(function (SearchMode) {
|
|
943
|
+
SearchMode["ADVANCED"] = "ADVANCED";
|
|
944
|
+
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
945
|
+
SearchMode["LOAD_DESCRIPTION"] = "LOAD_DESCRIPTION";
|
|
946
|
+
SearchMode["PRELOAD"] = "PRELOAD";
|
|
947
|
+
})(SearchMode$2 || (SearchMode$2 = {}));
|
|
948
|
+
|
|
949
|
+
var FormLayout;
|
|
950
|
+
(function (FormLayout) {
|
|
951
|
+
FormLayout[FormLayout["CASCADE"] = 0] = "CASCADE";
|
|
952
|
+
FormLayout[FormLayout["SIDE_BY_SIDE"] = 1] = "SIDE_BY_SIDE";
|
|
953
|
+
})(FormLayout || (FormLayout = {}));
|
|
954
|
+
|
|
940
955
|
const ezActionsButtonCss = ":host{--ez-actions-button__actions-list--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__actions-list--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__actions-list--background-color:var(--background--xlight, #fff);--ez-actions-button__actions-list--padding:var(--space--small, 6px);--ez-actions-button__actions-list--top-margin:var(--space-small, 6px);--ez-actions-button__actions-list--z-index:var(--ez-elevation--8, 8);--ez-actions-button__actions-max-height:415px;--ez-actions-button__btn-action--min-width:'auto';--ez-actions-button__btn-action--background-color:var(--background--xlight, #fff);display:flex;flex-direction:column;height:fit-content;user-select:none}.ez-actions-button__actions-list{display:flex;flex-direction:column;position:fixed;width:fit-content;height:fit-content;overflow-y:auto;scrollbar-width:thin;z-index:var(--ez-actions-button__actions-list--z-index);padding:var(--ez-actions-button__actions-list--padding);margin-top:var(--ez-actions-button__actions-list--top-margin);background-color:var(--ez-actions-button__actions-list--background-color);border-radius:var(--ez-actions-button__actions-list--border-radius);box-shadow:var(--ez-actions-button__actions-list--box-shadow)}.ez-actions-button__actions-list--max-height{max-height:var(--ez-actions-button__actions-max-height)}.ez-actions-button__actions-list--lowered{margin-top:calc(var(--ez-actions-button__actions-list--top-margin) + 6px)}.ez-actions-button__btn-action{--ez-button--justify-content:flex-start;--ez-button--width:100%;--ez-button--min-width:var(--ez-actions-button__btn-action--min-width);--ez-button--background-color:var(--ez-actions-button__btn-action--background-color);--ez-button--font-weight:var(--text-weight--medium, 400);--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__btn-action--spaced{--ez-button--padding-left:calc(var(--space--medium, 12px) + 24px)}.ez-actions-button__icon-right{margin-left:var(--space--small, 6px)}.ez-actions-button__icon-check,.ez-actions-button__icon-item{position:absolute;left:var(--space--medium, 12px)}.ez-actions-button__icon-check{color:var(--ez-button--hover-color)}.ez-actions-button__arrow{position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;width:0;height:0;z-index:calc(var(--ez-actions-button__actions-list--z-index) + 1);border-bottom:15px solid var(--ez-actions-button__btn-action--background-color)}.ez-actions-button__arrow--upped{margin-top:calc((var(--ez-actions-button__actions-list--top-margin) + 2px) * -1)}.ez-actions-button__arrow--small{margin-left:6px}.ez-actions-button__arrow--medium{margin-left:11px}.ez-actions-button__arrow--large{margin-left:13px}.ez-actions-button__arrow:only-child{display:none}.ez-actions-button__btn-transparent{--ez-button--background-color:transparent;--ez-button--hover--background-color:transparent;--ez-button--active--background-color:transparent;--ez-button--focus--border:none}.ez-actions-button__btn-label{--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__list-container{position:relative}.ez-actions-button--bottom-padding{padding-bottom:var(--space--small, 6px)}";
|
|
941
956
|
|
|
942
957
|
const EzActionsButton$1 = class extends HTMLElement$1 {
|
|
@@ -2923,7 +2938,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2923
2938
|
this._startLoading = false;
|
|
2924
2939
|
this._showLoading = true;
|
|
2925
2940
|
this._criteria = undefined;
|
|
2926
|
-
this._textInputReady = undefined;
|
|
2927
2941
|
this.limitCharsToSearch = 3;
|
|
2928
2942
|
this.value = undefined;
|
|
2929
2943
|
this.label = undefined;
|
|
@@ -3203,11 +3217,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3203
3217
|
//---------------------------------------------
|
|
3204
3218
|
// Lifecycle web component
|
|
3205
3219
|
//---------------------------------------------
|
|
3206
|
-
componentDidRender() {
|
|
3207
|
-
if (this._textInput) {
|
|
3208
|
-
this._textInputReady = true;
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3211
3220
|
componentWillLoad() {
|
|
3212
3221
|
if (this.options === undefined) {
|
|
3213
3222
|
this.options = [];
|
|
@@ -3805,7 +3814,7 @@ const EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
3805
3814
|
}
|
|
3806
3815
|
}
|
|
3807
3816
|
disconnectedCallback() {
|
|
3808
|
-
this.
|
|
3817
|
+
this._popover.hide();
|
|
3809
3818
|
}
|
|
3810
3819
|
componentDidLoad() {
|
|
3811
3820
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
@@ -4037,7 +4046,7 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
4037
4046
|
}
|
|
4038
4047
|
}
|
|
4039
4048
|
disconnectedCallback() {
|
|
4040
|
-
this.
|
|
4049
|
+
this._popover.hide();
|
|
4041
4050
|
}
|
|
4042
4051
|
componentDidLoad() {
|
|
4043
4052
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
@@ -5757,12 +5766,14 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
5757
5766
|
this.ezReady = createEvent(this, "ezReady", 7);
|
|
5758
5767
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
5759
5768
|
this._customEditors = new Map();
|
|
5769
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
5760
5770
|
this.onDataUnitAction = (action) => {
|
|
5761
5771
|
if (action.type === Action.METADATA_LOADED) {
|
|
5762
5772
|
this.processMetadata();
|
|
5763
5773
|
}
|
|
5764
5774
|
};
|
|
5765
5775
|
this._fieldsProps = new Map();
|
|
5776
|
+
this._singleColumn = true;
|
|
5766
5777
|
this.dataUnit = undefined;
|
|
5767
5778
|
this.config = undefined;
|
|
5768
5779
|
this.recordsValidator = undefined;
|
|
@@ -5825,7 +5836,7 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
5825
5836
|
}
|
|
5826
5837
|
this.ezFormSetFields.emit(fields);
|
|
5827
5838
|
const idFormSheet = `${StringUtils$1.replaceAccentuatedChars(StringUtils$1.toCamelCase(currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.label), false)}_selectorContainer`;
|
|
5828
|
-
return (h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, h("ez-form-view", { ref: (element) => (this._formView = element), class: "ez-row ez-padding-vertical--small", fields: fields, selectedRecord: this.dataUnit.getSelectedRecord() })));
|
|
5839
|
+
return (h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, h("ez-form-view", { ref: (element) => (this._formView = element), class: "ez-row ez-padding-vertical--small", fields: fields, singleColumn: this._singleColumn, selectedRecord: this.dataUnit.getSelectedRecord() })));
|
|
5829
5840
|
}
|
|
5830
5841
|
processMetadata() {
|
|
5831
5842
|
if (this.bindFields() && this.dataUnit && this._store) {
|
|
@@ -5840,7 +5851,8 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
5840
5851
|
bindFields() {
|
|
5841
5852
|
return !this.isStatic() || this.onlyStaticFields === false;
|
|
5842
5853
|
}
|
|
5843
|
-
componentWillLoad() {
|
|
5854
|
+
async componentWillLoad() {
|
|
5855
|
+
var _a;
|
|
5844
5856
|
if (this.dataUnit === undefined) {
|
|
5845
5857
|
this.dataUnit = new DataUnit("ez-form");
|
|
5846
5858
|
}
|
|
@@ -5853,6 +5865,28 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
5853
5865
|
this.processMetadata();
|
|
5854
5866
|
const dataInfo = { dataUnit: this.dataUnit };
|
|
5855
5867
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
5868
|
+
const layoutFormConfig = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getLayoutFormConfig());
|
|
5869
|
+
this.setSingleColumn(layoutFormConfig);
|
|
5870
|
+
this.registerNotifyListeners(layoutFormConfig);
|
|
5871
|
+
}
|
|
5872
|
+
async setSingleColumn(layoutFormConfig) {
|
|
5873
|
+
if (!(layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config)) {
|
|
5874
|
+
this._singleColumn = true;
|
|
5875
|
+
return;
|
|
5876
|
+
}
|
|
5877
|
+
this._singleColumn = layoutFormConfig.config === FormLayout.CASCADE ? true : false;
|
|
5878
|
+
}
|
|
5879
|
+
async registerNotifyListeners(layoutFormConfig) {
|
|
5880
|
+
if (!layoutFormConfig)
|
|
5881
|
+
return;
|
|
5882
|
+
layoutFormConfig.onConfigChange((config) => {
|
|
5883
|
+
if (config === FormLayout.CASCADE) {
|
|
5884
|
+
this._singleColumn = true;
|
|
5885
|
+
}
|
|
5886
|
+
else {
|
|
5887
|
+
this._singleColumn = false;
|
|
5888
|
+
}
|
|
5889
|
+
});
|
|
5856
5890
|
}
|
|
5857
5891
|
componentDidRender() {
|
|
5858
5892
|
const metadata = selectFormMetadata(this._store.getState());
|
|
@@ -5921,6 +5955,8 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
5921
5955
|
const REQUIRED_INFO = " (obrigatório) *";
|
|
5922
5956
|
const DISTINCT_FILTER_NAME_PREFIX = 'FILTRO_COLUNA_';
|
|
5923
5957
|
const EZ_GRID_LOADING_SOURCE = "EZ_GRID_LOADING_SOURCE";
|
|
5958
|
+
const PRESENTATION_COL_ID_PROP_NAME = "gridDescriptionColID";
|
|
5959
|
+
const PRESENTATION_FROM_COL_PROP_NAME = "presentationFieldFrom";
|
|
5924
5960
|
|
|
5925
5961
|
const buildSwitch$1 = (field) => {
|
|
5926
5962
|
return buildField(field.name, field.label, field.readOnly, field.contextName, true);
|
|
@@ -5992,12 +6028,6 @@ function buildNumeric$1(fieldName, fieldLabel, readOnly, precision, prettyPrecis
|
|
|
5992
6028
|
h("ez-number-input", { class: "ez-input__no-margin", enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
|
|
5993
6029
|
}
|
|
5994
6030
|
|
|
5995
|
-
const buildSearch$1 = ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }) => {
|
|
5996
|
-
var _a;
|
|
5997
|
-
return (h("div", { class: "ez-col ez-col--sd-12" },
|
|
5998
|
-
h("ez-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false })));
|
|
5999
|
-
};
|
|
6000
|
-
|
|
6001
6031
|
const buildTextArea = ({ name, label, readOnly, contextName, rows, canShowError }) => {
|
|
6002
6032
|
return (h("div", { class: "ez-col ez-col--sd-12", key: name },
|
|
6003
6033
|
h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, rows: rows, canShowError: canShowError })));
|
|
@@ -6008,6 +6038,18 @@ const buildTextInput$1 = ({ name, label, readOnly, contextName, canShowError, pr
|
|
|
6008
6038
|
h("ez-text-input", { class: "ez-input__no-margin", label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError, mask: props === null || props === void 0 ? void 0 : props.mask, "clean-value-mask": props === null || props === void 0 ? void 0 : props.cleanValueMask })));
|
|
6009
6039
|
};
|
|
6010
6040
|
|
|
6041
|
+
const buildSearchPlus$1 = ({ name, label, readOnly, contextName, canShowError, optionLoader, props }) => {
|
|
6042
|
+
const hasDescriptionField = !StringUtils$1.isEmpty(props === null || props === void 0 ? void 0 : props.DESCRIPTIONFIELD);
|
|
6043
|
+
return (h("div", { class: "ez-col ez-col--sd-12" },
|
|
6044
|
+
h("ez-search-plus", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, hideDescriptionInput: !hasDescriptionField })));
|
|
6045
|
+
};
|
|
6046
|
+
|
|
6047
|
+
const buildSearch$1 = ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }) => {
|
|
6048
|
+
var _a;
|
|
6049
|
+
return (h("div", { class: "ez-col ez-col--sd-12" },
|
|
6050
|
+
h("ez-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false })));
|
|
6051
|
+
};
|
|
6052
|
+
|
|
6011
6053
|
const uiBuilders$1 = new Map();
|
|
6012
6054
|
uiBuilders$1.set(UserInterface.CHECKBOX, buildCheckBox);
|
|
6013
6055
|
uiBuilders$1.set(UserInterface.SWITCH, buildSwitch$1);
|
|
@@ -6020,6 +6062,7 @@ uiBuilders$1.set(UserInterface.FILE, buildFile);
|
|
|
6020
6062
|
uiBuilders$1.set(UserInterface.DECIMALNUMBER, buildDecimal$1);
|
|
6021
6063
|
uiBuilders$1.set(UserInterface.INTEGERNUMBER, buildInteger$1);
|
|
6022
6064
|
uiBuilders$1.set(UserInterface.SEARCH, buildSearch$1);
|
|
6065
|
+
uiBuilders$1.set(UserInterface.SEARCHPLUS, buildSearchPlus$1);
|
|
6023
6066
|
uiBuilders$1.set(UserInterface.LONGTEXT, buildTextArea);
|
|
6024
6067
|
const fieldBuilder = (field) => {
|
|
6025
6068
|
const builder = uiBuilders$1.get(field.userInterface) || buildTextInput$1;
|
|
@@ -6065,7 +6108,7 @@ class FormItems {
|
|
|
6065
6108
|
}
|
|
6066
6109
|
}
|
|
6067
6110
|
|
|
6068
|
-
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-wrap:wrap;width:100%;--ez-form-view__item--min-width:220px;--ez-form-view__item--width:var(--space--small);--ez-form-view__item--padding:var(--space--small)}.form-view__content.sc-ez-form-view{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));gap:var(--ez-form-view__item--width);padding-inline:var(--ez-form-view__item--padding);width:100%}.input-full_width.sc-ez-form-view{grid-column:1 / -1;width:100%}";
|
|
6111
|
+
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-wrap:wrap;width:100%;--ez-form-view__item--min-width:220px;--ez-form-view__item--max-width:440px;--ez-form-view__item--width:var(--space--small);--ez-form-view__item--padding:var(--space--small)}.form-view__content.sc-ez-form-view{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));gap:var(--ez-form-view__item--width);padding-inline:var(--ez-form-view__item--padding);width:100%}.form-view__content--single-column.sc-ez-form-view{grid-template-columns:repeat(1, minmax(var(--ez-form-view__item--min-width), var(--ez-form-view__item--max-width)))}.input-full_width.sc-ez-form-view{grid-column:1 / -1;width:100%}";
|
|
6069
6112
|
|
|
6070
6113
|
const EzFormView$1 = class extends HTMLElement$1 {
|
|
6071
6114
|
constructor() {
|
|
@@ -6076,6 +6119,7 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
6076
6119
|
this._customEditors = new Map();
|
|
6077
6120
|
this.fields = undefined;
|
|
6078
6121
|
this.selectedRecord = undefined;
|
|
6122
|
+
this.singleColumn = true;
|
|
6079
6123
|
}
|
|
6080
6124
|
async showUp() {
|
|
6081
6125
|
this._element.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
@@ -6151,7 +6195,7 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
6151
6195
|
let nonArrayGrup = [];
|
|
6152
6196
|
let formContent = Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
|
|
6153
6197
|
if (Array.isArray(value)) {
|
|
6154
|
-
return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, h("div", { class: "form-view__content" }, value.map(fi => (this.buildFormItemElement(fi))))));
|
|
6198
|
+
return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, h("div", { class: `form-view__content ${this.singleColumn && "form-view__content--single-column"}` }, value.map(fi => (this.buildFormItemElement(fi))))));
|
|
6155
6199
|
}
|
|
6156
6200
|
else {
|
|
6157
6201
|
nonArrayGrup.push(value);
|
|
@@ -6159,7 +6203,7 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
6159
6203
|
});
|
|
6160
6204
|
// Filtra os elementos que não são arrays e os coloca dentro de uma única div
|
|
6161
6205
|
let nonArrayElements = nonArrayGrup.map((value) => this.buildFormItemElement(value));
|
|
6162
|
-
let groupedNonArrayElements = h("div", { class: "form-view__content" }, nonArrayElements);
|
|
6206
|
+
let groupedNonArrayElements = h("div", { class: `form-view__content ${this.singleColumn && "form-view__content--single-column"}` }, nonArrayElements);
|
|
6163
6207
|
return (h(Host, null, groupedNonArrayElements, formContent));
|
|
6164
6208
|
}
|
|
6165
6209
|
get _element() { return this; }
|
|
@@ -56403,14 +56447,20 @@ class DataSource {
|
|
|
56403
56447
|
return indexA - indexB;
|
|
56404
56448
|
});
|
|
56405
56449
|
this._dataUnit.metadata.fields.forEach(f => {
|
|
56406
|
-
var _a;
|
|
56450
|
+
var _a, _b;
|
|
56407
56451
|
if (f.visible !== false && f.name !== this.RECORD_ARCHIVE) {
|
|
56408
56452
|
const props = new Map();
|
|
56409
56453
|
const properties = this._dataUnit.getField(f.name).properties;
|
|
56410
56454
|
for (const value in properties) {
|
|
56411
56455
|
props.set(value, properties[value]);
|
|
56412
56456
|
}
|
|
56413
|
-
|
|
56457
|
+
const col = { label: f.label, name: f.name, userInterface: f.userInterface, options: (_a = this._dataUnit.getField(f.name).properties) === null || _a === void 0 ? void 0 : _a.options, props };
|
|
56458
|
+
columnDefs.push(col);
|
|
56459
|
+
if (f.userInterface === UserInterface.SEARCHPLUS && ((_b = f.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD)) {
|
|
56460
|
+
const descriptionCol = this.buildDescriptionColumn(f);
|
|
56461
|
+
columnDefs.push(descriptionCol);
|
|
56462
|
+
f.properties[PRESENTATION_COL_ID_PROP_NAME] = descriptionCol.name;
|
|
56463
|
+
}
|
|
56414
56464
|
}
|
|
56415
56465
|
});
|
|
56416
56466
|
}
|
|
@@ -56420,6 +56470,17 @@ class DataSource {
|
|
|
56420
56470
|
console.warn(error);
|
|
56421
56471
|
}
|
|
56422
56472
|
}
|
|
56473
|
+
buildDescriptionColumn(field) {
|
|
56474
|
+
var _a, _b, _c, _d;
|
|
56475
|
+
const props = new Map();
|
|
56476
|
+
props.set(PRESENTATION_FROM_COL_PROP_NAME, field.name);
|
|
56477
|
+
return {
|
|
56478
|
+
label: `${(_a = field.properties) === null || _a === void 0 ? void 0 : _a.DESCRIPTIONFIELDLABEL} (${(_b = field.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONENTITY})`,
|
|
56479
|
+
name: `${(_c = field.properties) === null || _c === void 0 ? void 0 : _c.ENTITYNAME}.${(_d = field.properties) === null || _d === void 0 ? void 0 : _d.DESCRIPTIONFIELD}`,
|
|
56480
|
+
userInterface: UserInterface.SHORTTEXT,
|
|
56481
|
+
props
|
|
56482
|
+
};
|
|
56483
|
+
}
|
|
56423
56484
|
}
|
|
56424
56485
|
|
|
56425
56486
|
class EzGridCustomHeader {
|
|
@@ -56830,6 +56891,21 @@ const buildSwitch = (fieldMetadata) => {
|
|
|
56830
56891
|
return combo;
|
|
56831
56892
|
};
|
|
56832
56893
|
|
|
56894
|
+
const buildSearchPlus = ({ name, required, readOnly, dataUnit }) => {
|
|
56895
|
+
const ezSearch = HTMLBuilder.parseElement(`<ez-search-plus
|
|
56896
|
+
class="ez-grid grid_editor"
|
|
56897
|
+
mode="slim"
|
|
56898
|
+
suppress-empty-option=${required}
|
|
56899
|
+
enabled=${!readOnly}
|
|
56900
|
+
hide-description-input=${true}
|
|
56901
|
+
/>`);
|
|
56902
|
+
const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__PLUS__OPTION__LOADER__");
|
|
56903
|
+
ezSearch.optionLoader = (argument) => loader(argument, name, dataUnit);
|
|
56904
|
+
ezSearch.autoFocus = true;
|
|
56905
|
+
ezSearch.valueGetter = () => ezSearch.getValueAsync();
|
|
56906
|
+
return ezSearch;
|
|
56907
|
+
};
|
|
56908
|
+
|
|
56833
56909
|
const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
|
|
56834
56910
|
var _a;
|
|
56835
56911
|
const ezSearch = HTMLBuilder.parseElement(`<ez-search
|
|
@@ -56862,6 +56938,7 @@ uiBuilders.set(UserInterface.CHECKBOX, buildSwitch);
|
|
|
56862
56938
|
uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
|
|
56863
56939
|
uiBuilders.set(UserInterface.LONGTEXT, buildTextAreaInput);
|
|
56864
56940
|
uiBuilders.set(UserInterface.SEARCH, buildSearch);
|
|
56941
|
+
uiBuilders.set(UserInterface.SEARCHPLUS, buildSearchPlus);
|
|
56865
56942
|
class EzCellEditor {
|
|
56866
56943
|
init(params) {
|
|
56867
56944
|
this._rowData = params.data;
|
|
@@ -57060,6 +57137,7 @@ class EzGridCustomCellRender extends EzCellRender {
|
|
|
57060
57137
|
|
|
57061
57138
|
class GridEditionManager {
|
|
57062
57139
|
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert, enableGridInsert, lockerId) {
|
|
57140
|
+
this._inProgressChanges = [];
|
|
57063
57141
|
this._dataUnit = dataUnit;
|
|
57064
57142
|
this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
57065
57143
|
getRequiredFields: () => this.getRequiredFields(),
|
|
@@ -57159,6 +57237,12 @@ class GridEditionManager {
|
|
|
57159
57237
|
return this._enableContinuousInsert && (this._dataUnit.records.length - 1) === ((_a = this._lastCellEdited) === null || _a === void 0 ? void 0 : _a.rowIndex);
|
|
57160
57238
|
}
|
|
57161
57239
|
async proceedAutoSave() {
|
|
57240
|
+
var _a;
|
|
57241
|
+
//Aguarda outras promises entrarem na fila
|
|
57242
|
+
await new Promise(resolve => setTimeout(resolve, 100));
|
|
57243
|
+
if (this._inProgressChanges.length) {
|
|
57244
|
+
await Promise.all((_a = this._inProgressChanges) === null || _a === void 0 ? void 0 : _a.map(({ promise }) => promise));
|
|
57245
|
+
}
|
|
57162
57246
|
if (!this._dataUnit.isDirty()) {
|
|
57163
57247
|
this.saveSuccess();
|
|
57164
57248
|
return true;
|
|
@@ -57229,7 +57313,9 @@ class GridEditionManager {
|
|
|
57229
57313
|
}
|
|
57230
57314
|
configureColumn(col) {
|
|
57231
57315
|
col.cellEditor = 'ezCellEditor';
|
|
57232
|
-
col.editable
|
|
57316
|
+
if (col.editable != false) {
|
|
57317
|
+
col.editable = params => this.canEdit(params);
|
|
57318
|
+
}
|
|
57233
57319
|
col.suppressKeyboardEvent = (params) => {
|
|
57234
57320
|
if (params.event.key === KeyCode.ESCAPE && params.editing) {
|
|
57235
57321
|
return this._dataUnit.isDirty();
|
|
@@ -57413,6 +57499,14 @@ class GridEditionManager {
|
|
|
57413
57499
|
return;
|
|
57414
57500
|
}
|
|
57415
57501
|
if (value instanceof Promise) {
|
|
57502
|
+
const progressChange = {
|
|
57503
|
+
promise: undefined,
|
|
57504
|
+
resolve: () => { }
|
|
57505
|
+
};
|
|
57506
|
+
progressChange.promise = new Promise((resolve) => {
|
|
57507
|
+
progressChange.resolve = resolve;
|
|
57508
|
+
});
|
|
57509
|
+
this._inProgressChanges.push(progressChange);
|
|
57416
57510
|
this.handlePromiseValue(event, value);
|
|
57417
57511
|
return;
|
|
57418
57512
|
}
|
|
@@ -57426,16 +57520,22 @@ class GridEditionManager {
|
|
|
57426
57520
|
const resolved = await value;
|
|
57427
57521
|
return this.updateCellValue(event, resolved);
|
|
57428
57522
|
}
|
|
57429
|
-
updateCellValue(event, newValue) {
|
|
57430
|
-
var _a;
|
|
57523
|
+
async updateCellValue(event, newValue) {
|
|
57524
|
+
var _a, _b, _c, _d;
|
|
57431
57525
|
const fieldName = event.colDef.field;
|
|
57432
|
-
|
|
57433
|
-
(_a = this.
|
|
57526
|
+
const newData = { [fieldName]: newValue };
|
|
57527
|
+
const descriptionColName = (_b = (_a = this._dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b[PRESENTATION_COL_ID_PROP_NAME];
|
|
57528
|
+
if (!StringUtils$1.isEmpty(descriptionColName)) {
|
|
57529
|
+
newData[descriptionColName] = newValue === null || newValue === void 0 ? void 0 : newValue.label;
|
|
57530
|
+
}
|
|
57531
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { newData }));
|
|
57532
|
+
(_c = this._currentEditLock) === null || _c === void 0 ? void 0 : _c.call(this);
|
|
57434
57533
|
if (event.oldValue !== newValue) {
|
|
57435
57534
|
this._isGridEdition = true;
|
|
57436
|
-
this._dataUnit.setFieldValue(fieldName, newValue, [event.data.__record__id__], { suppressCreateNewRecord: true });
|
|
57535
|
+
await this._dataUnit.setFieldValue(fieldName, newValue, [event.data.__record__id__], { suppressCreateNewRecord: true });
|
|
57437
57536
|
this._lastCellEdited = { rowIndex: event.rowIndex, column: event.column, rowPinned: undefined };
|
|
57438
57537
|
}
|
|
57538
|
+
(_d = this._inProgressChanges) === null || _d === void 0 ? void 0 : _d.forEach(({ resolve }) => resolve(newValue));
|
|
57439
57539
|
}
|
|
57440
57540
|
setCellEditors(customEditors) {
|
|
57441
57541
|
var _a;
|
|
@@ -70924,7 +71024,6 @@ class AgGridController {
|
|
|
70924
71024
|
this.DEFAULT_FONT_SIZE_HTML5 = 32;
|
|
70925
71025
|
this.DEFAULT_ICON_SIZE = 12;
|
|
70926
71026
|
this.DEFAULT_MAX_SIZE = 200;
|
|
70927
|
-
this.DOC_WIDTH = 800;
|
|
70928
71027
|
this._menuItems = [];
|
|
70929
71028
|
this._idAttribName = '__record__id__';
|
|
70930
71029
|
this._gridConfig = [];
|
|
@@ -70933,6 +71032,7 @@ class AgGridController {
|
|
|
70933
71032
|
this._customFormatters = new Map();
|
|
70934
71033
|
this._gridShowDom = false;
|
|
70935
71034
|
this.peddingExecutionsOnGridShow = [];
|
|
71035
|
+
this._lastColsConfig = undefined;
|
|
70936
71036
|
ModuleRegistry.registerModules([
|
|
70937
71037
|
EnterpriseCoreModule,
|
|
70938
71038
|
RangeSelectionModule,
|
|
@@ -71527,7 +71627,9 @@ class AgGridController {
|
|
|
71527
71627
|
}
|
|
71528
71628
|
}
|
|
71529
71629
|
isColumnEditable(rowIndex, column) {
|
|
71530
|
-
if (column.getColDef().headerName === ''
|
|
71630
|
+
if (column.getColDef().headerName === ''
|
|
71631
|
+
|| column.getColDef().headerName === this.CHECK_BOX_COL_ID
|
|
71632
|
+
|| rowIndex === -1)
|
|
71531
71633
|
return false;
|
|
71532
71634
|
const rowId = this._dataUnit.records[rowIndex][this._idAttribName];
|
|
71533
71635
|
const rowNode = this._gridOptions.api.getRowNode(rowId);
|
|
@@ -71545,7 +71647,7 @@ class AgGridController {
|
|
|
71545
71647
|
this._gridOptions.api.setFocusedCell(rowIndex, firstCell);
|
|
71546
71648
|
}
|
|
71547
71649
|
setColumnsDef(cols) {
|
|
71548
|
-
const checkBoxColumn = Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName:
|
|
71650
|
+
const checkBoxColumn = Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: this.CHECK_BOX_COL_ID, checkboxSelection: true, width: 29, suppressMovable: true, suppressAutoSize: true, suppressMenu: true, lockPosition: true, pinned: true }, (this._multipleSelection && { headerComponent: 'ezGridHeaderComponent', headerClass: 'ag-column-select-header' }));
|
|
71549
71651
|
const newColDefs = this._options.suppressCheckBoxCol ? [] : [checkBoxColumn];
|
|
71550
71652
|
if (this._statusResolver != undefined) {
|
|
71551
71653
|
newColDefs.push({
|
|
@@ -71573,8 +71675,39 @@ class AgGridController {
|
|
|
71573
71675
|
});
|
|
71574
71676
|
this._colDefs = newColDefs;
|
|
71575
71677
|
if (this._gridOptions && this._gridOptions.api) {
|
|
71678
|
+
this.setColsDefsWithStateIfNeeded(this._colDefs);
|
|
71679
|
+
}
|
|
71680
|
+
}
|
|
71681
|
+
setColsDefsWithStateIfNeeded(colDefs) {
|
|
71682
|
+
if (!this._lastColsConfig) {
|
|
71576
71683
|
this._gridOptions.api.setColumnDefs(this._colDefs);
|
|
71577
71684
|
}
|
|
71685
|
+
/*
|
|
71686
|
+
Caso a definição de colunas esteja sendo atualizada,
|
|
71687
|
+
e existe uma config aplicada, temos que considerar essa
|
|
71688
|
+
config ao adicionar nova definição de colunas.
|
|
71689
|
+
PS: Poderia apenas chamar o setColumnsState, porém,
|
|
71690
|
+
isso impactaria em performance, e o usuário ia perceber
|
|
71691
|
+
a mudança das colunas visualmente na grade, o que traria
|
|
71692
|
+
uma experiencia ruim.
|
|
71693
|
+
*/
|
|
71694
|
+
const colDefsWithConfigs = this.getColsDefWithConfigApplied(colDefs, this._lastColsConfig);
|
|
71695
|
+
this._gridOptions.api.setColumnDefs(colDefsWithConfigs);
|
|
71696
|
+
}
|
|
71697
|
+
getColsDefWithConfigApplied(colDefs, colsConfig) {
|
|
71698
|
+
//Cria map de colunas existentes na config e seu índice
|
|
71699
|
+
const orderMap = colsConfig.reduce((map, col, index) => {
|
|
71700
|
+
map[col.name] = index;
|
|
71701
|
+
return map;
|
|
71702
|
+
}, {});
|
|
71703
|
+
//Remove colunas que não existem na config
|
|
71704
|
+
const filteredColsDefs = colDefs.filter((col) => !orderMap.hasOwnProperty(col.colId));
|
|
71705
|
+
//Ordena colunas baseada na config aplicada
|
|
71706
|
+
const sortedColumnDefs = filteredColsDefs.sort((a, b) => {
|
|
71707
|
+
var _a, _b;
|
|
71708
|
+
return ((_a = orderMap[a.field]) !== null && _a !== void 0 ? _a : Number.MAX_VALUE) - ((_b = orderMap[b.field]) !== null && _b !== void 0 ? _b : Number.MAX_VALUE);
|
|
71709
|
+
});
|
|
71710
|
+
return sortedColumnDefs;
|
|
71578
71711
|
}
|
|
71579
71712
|
hideSelectionColumn() {
|
|
71580
71713
|
var _a, _b;
|
|
@@ -71608,6 +71741,7 @@ class AgGridController {
|
|
|
71608
71741
|
if (this._grid === undefined) {
|
|
71609
71742
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
71610
71743
|
}
|
|
71744
|
+
this._lastColsConfig = state;
|
|
71611
71745
|
const colDef = this._gridOptions.columnApi.getColumns();
|
|
71612
71746
|
let columns = this.getColumnsDef();
|
|
71613
71747
|
let visibleColumns = [];
|
|
@@ -71616,14 +71750,39 @@ class AgGridController {
|
|
|
71616
71750
|
const columnsOffset = colDef.length - columns.length;
|
|
71617
71751
|
this._gridConfig = state;
|
|
71618
71752
|
let sort = [];
|
|
71619
|
-
|
|
71753
|
+
let currentIndex = 0;
|
|
71754
|
+
state.forEach((cfgColumn) => {
|
|
71755
|
+
var _a, _b;
|
|
71620
71756
|
const colWidth = this.getColumnWidth(cfgColumn);
|
|
71621
|
-
this._gridOptions.columnApi.moveColumn(cfgColumn.name,
|
|
71757
|
+
this._gridOptions.columnApi.moveColumn(cfgColumn.name, currentIndex + columnsOffset);
|
|
71622
71758
|
this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, colWidth);
|
|
71623
71759
|
visibleColumns.push(cfgColumn.name);
|
|
71624
71760
|
if (cfgColumn.ascending !== undefined) {
|
|
71625
71761
|
sort.push({ colId: cfgColumn.name, sort: cfgColumn.ascending !== true ? 'desc' : 'asc', sortIndex: cfgColumn.orderIndex });
|
|
71626
71762
|
}
|
|
71763
|
+
currentIndex++;
|
|
71764
|
+
const fieldMD = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
|
|
71765
|
+
/*
|
|
71766
|
+
Migração para o SEARCHPLUS, caso de uso:
|
|
71767
|
+
- Agora existe uma coluna para o campo de descrição do relaciona
|
|
71768
|
+
- Essa col, não existe na config da grade que já foi salva pelo DS
|
|
71769
|
+
- Nesse caso, precisamos inserir a coluna de descrição automaticamente para que
|
|
71770
|
+
os usuários não percam a apresentação do campo de descrição.
|
|
71771
|
+
PS: Caso esteja herdando do HTML5, devemos manter a config como está la
|
|
71772
|
+
*/
|
|
71773
|
+
if (this.needToAddDescriptionColumn(cfgColumn, fieldMD, state)) {
|
|
71774
|
+
const descriptionColID = (_b = fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.properties) === null || _b === void 0 ? void 0 : _b[PRESENTATION_COL_ID_PROP_NAME];
|
|
71775
|
+
if (!descriptionColID)
|
|
71776
|
+
return;
|
|
71777
|
+
const descriptionCol = this._gridOptions.columnApi.getColumn(descriptionColID);
|
|
71778
|
+
const descriptionColDef = descriptionCol === null || descriptionCol === void 0 ? void 0 : descriptionCol.getColDef();
|
|
71779
|
+
const descriptionHeaderName = descriptionColDef === null || descriptionColDef === void 0 ? void 0 : descriptionColDef.headerName;
|
|
71780
|
+
const descriptionColSize = this.getColumnWidthByLabel(descriptionHeaderName);
|
|
71781
|
+
this._gridOptions.columnApi.moveColumn(descriptionColID, currentIndex + columnsOffset);
|
|
71782
|
+
this._gridOptions.columnApi.setColumnWidth(descriptionColID, descriptionColSize);
|
|
71783
|
+
visibleColumns.push(descriptionColID);
|
|
71784
|
+
currentIndex++;
|
|
71785
|
+
}
|
|
71627
71786
|
});
|
|
71628
71787
|
let invisibleColumns = columns.filter(column => !visibleColumns.includes(column.name)).map(column => column.name);
|
|
71629
71788
|
this._gridOptions.columnApi.setColumnsVisible(visibleColumns, true);
|
|
@@ -71633,10 +71792,15 @@ class AgGridController {
|
|
|
71633
71792
|
defaultState: { sort: null },
|
|
71634
71793
|
});
|
|
71635
71794
|
}
|
|
71636
|
-
|
|
71637
|
-
|
|
71638
|
-
|
|
71639
|
-
|
|
71795
|
+
needToAddDescriptionColumn(cfgColumn, fieldMD, stateConfig) {
|
|
71796
|
+
var _a, _b;
|
|
71797
|
+
if (!fieldMD) {
|
|
71798
|
+
return false;
|
|
71799
|
+
}
|
|
71800
|
+
const configVersion = ((_a = cfgColumn.configVersion) !== null && _a !== void 0 ? _a : 0);
|
|
71801
|
+
const isSearchPlus = (fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.userInterface) == UserInterface.SEARCHPLUS;
|
|
71802
|
+
const descriptionColID = (_b = fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.properties) === null || _b === void 0 ? void 0 : _b[PRESENTATION_COL_ID_PROP_NAME];
|
|
71803
|
+
return isSearchPlus && configVersion < 1 && stateConfig.find(col => col.name === descriptionColID) != undefined;
|
|
71640
71804
|
}
|
|
71641
71805
|
getColumnsState() {
|
|
71642
71806
|
if (this._grid === undefined) {
|
|
@@ -71647,7 +71811,7 @@ class AgGridController {
|
|
|
71647
71811
|
.map(s => {
|
|
71648
71812
|
const column = this._gridOptions.columnApi.getColumn(s.colId);
|
|
71649
71813
|
const def = column.getColDef();
|
|
71650
|
-
const width =
|
|
71814
|
+
const width = column.getActualWidth();
|
|
71651
71815
|
const label = def.headerName;
|
|
71652
71816
|
const name = def.checkboxSelection ? '__SELECTION__' : s.colId;
|
|
71653
71817
|
const colState = { label, name };
|
|
@@ -71697,7 +71861,7 @@ class AgGridController {
|
|
|
71697
71861
|
return filterOptions.map(item => item.check).includes(true);
|
|
71698
71862
|
}
|
|
71699
71863
|
buildColDef(source) {
|
|
71700
|
-
var _a, _b, _c;
|
|
71864
|
+
var _a, _b, _c, _d;
|
|
71701
71865
|
let tooltip = undefined;
|
|
71702
71866
|
const propSortable = StringUtils$1.getBooleanValue((_a = source.props) === null || _a === void 0 ? void 0 : _a.get('gridSortable'), true);
|
|
71703
71867
|
if ((_b = source.props) === null || _b === void 0 ? void 0 : _b.get('gridHeaderTooltip')) {
|
|
@@ -71719,6 +71883,11 @@ class AgGridController {
|
|
|
71719
71883
|
showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
|
|
71720
71884
|
},
|
|
71721
71885
|
valueFormatter: params => {
|
|
71886
|
+
var _a, _b, _c, _d;
|
|
71887
|
+
const presentationFrom = (_a = source === null || source === void 0 ? void 0 : source.props) === null || _a === void 0 ? void 0 : _a.get(PRESENTATION_FROM_COL_PROP_NAME);
|
|
71888
|
+
if (presentationFrom) {
|
|
71889
|
+
return (_d = (_c = (_b = params === null || params === void 0 ? void 0 : params.data) === null || _b === void 0 ? void 0 : _b[presentationFrom]) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : "";
|
|
71890
|
+
}
|
|
71722
71891
|
if (params.value === undefined || params.value === null) {
|
|
71723
71892
|
return "";
|
|
71724
71893
|
}
|
|
@@ -71738,6 +71907,7 @@ class AgGridController {
|
|
|
71738
71907
|
return this.getFormatterByColumn(params, source);
|
|
71739
71908
|
},
|
|
71740
71909
|
cellStyle: this.getStyleByColumn(source),
|
|
71910
|
+
editable: !((_d = source.props) === null || _d === void 0 ? void 0 : _d.has(PRESENTATION_FROM_COL_PROP_NAME))
|
|
71741
71911
|
});
|
|
71742
71912
|
}
|
|
71743
71913
|
setCustomFormatters(customFormatters) {
|
|
@@ -71753,8 +71923,11 @@ class AgGridController {
|
|
|
71753
71923
|
};
|
|
71754
71924
|
}
|
|
71755
71925
|
getStyleByColumn(source) {
|
|
71926
|
+
var _a;
|
|
71756
71927
|
let cellStyle = this.getInitCellStyle();
|
|
71757
|
-
|
|
71928
|
+
const primitiveUIType = (_a = source === null || source === void 0 ? void 0 : source.props) === null || _a === void 0 ? void 0 : _a.get("PRIMITIVETUIYPE");
|
|
71929
|
+
const uitype = source === null || source === void 0 ? void 0 : source.userInterface;
|
|
71930
|
+
switch (primitiveUIType !== null && primitiveUIType !== void 0 ? primitiveUIType : uitype) {
|
|
71758
71931
|
case UserInterface.DECIMALNUMBER:
|
|
71759
71932
|
case UserInterface.INTEGERNUMBER:
|
|
71760
71933
|
cellStyle['text-align'] = 'right';
|
|
@@ -71770,7 +71943,7 @@ class AgGridController {
|
|
|
71770
71943
|
return cellStyle;
|
|
71771
71944
|
}
|
|
71772
71945
|
getFormatterByColumn(params, source) {
|
|
71773
|
-
var _a;
|
|
71946
|
+
var _a, _b, _c, _d;
|
|
71774
71947
|
if ((source === null || source === void 0 ? void 0 : source.userInterface) === 'OPTIONSELECTOR' && source.options) {
|
|
71775
71948
|
const prop = source === null || source === void 0 ? void 0 : source.options;
|
|
71776
71949
|
let options;
|
|
@@ -71807,6 +71980,9 @@ class AgGridController {
|
|
|
71807
71980
|
return params === null || params === void 0 ? void 0 : params.value;
|
|
71808
71981
|
}
|
|
71809
71982
|
}
|
|
71983
|
+
if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.SEARCHPLUS) {
|
|
71984
|
+
return (_d = (_c = (_b = params === null || params === void 0 ? void 0 : params.value) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : params === null || params === void 0 ? void 0 : params.value) !== null && _d !== void 0 ? _d : "";
|
|
71985
|
+
}
|
|
71810
71986
|
if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.DECIMALNUMBER) {
|
|
71811
71987
|
if (params.value != undefined) {
|
|
71812
71988
|
const precision = Number(source.props.get('precision')) || 2;
|
|
@@ -71980,7 +72156,7 @@ class AgGridController {
|
|
|
71980
72156
|
this._gridOptions.api.stopEditing();
|
|
71981
72157
|
}
|
|
71982
72158
|
getColumnWidth(cfgColumn) {
|
|
71983
|
-
var _a, _b;
|
|
72159
|
+
var _a, _b, _c, _d, _e, _f;
|
|
71984
72160
|
if (cfgColumn == undefined) {
|
|
71985
72161
|
return;
|
|
71986
72162
|
}
|
|
@@ -71992,10 +72168,14 @@ class AgGridController {
|
|
|
71992
72168
|
return parseInt(cfgColumn.width) + this.DEFAULT_FONT_SIZE_HTML5;
|
|
71993
72169
|
}
|
|
71994
72170
|
const field = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
|
|
72171
|
+
const label = (_b = field === null || field === void 0 ? void 0 : field.label) !== null && _b !== void 0 ? _b : (_f = (_e = (_d = (_c = this._gridOptions) === null || _c === void 0 ? void 0 : _c.columnApi) === null || _d === void 0 ? void 0 : _d.getColumn(cfgColumn.name)) === null || _e === void 0 ? void 0 : _e.getColDef()) === null || _f === void 0 ? void 0 : _f.headerName;
|
|
71995
72172
|
if ((field === null || field === void 0 ? void 0 : field.userInterface) === UserInterface.SEARCH) {
|
|
71996
72173
|
return this.DEFAULT_MAX_SIZE;
|
|
71997
72174
|
}
|
|
71998
|
-
|
|
72175
|
+
return this.getColumnWidthByLabel(label);
|
|
72176
|
+
}
|
|
72177
|
+
getColumnWidthByLabel(label) {
|
|
72178
|
+
const labelSize = ((label === null || label === void 0 ? void 0 : label.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
|
|
71999
72179
|
return labelSize > this.DEFAULT_MAX_SIZE ? this.DEFAULT_MAX_SIZE : labelSize;
|
|
72000
72180
|
}
|
|
72001
72181
|
}
|
|
@@ -73527,7 +73707,7 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
73527
73707
|
return { id: item.id, label: item.label, check: evt.detail };
|
|
73528
73708
|
}
|
|
73529
73709
|
renderListWithGroups() {
|
|
73530
|
-
return h("div", { class: 'group-container', ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => this.keyDownHandler(event) }, this._listGroupItems.map(group => {
|
|
73710
|
+
return h("div", { class: 'group-container', ref: el => (this._groupContainer = el), tabIndex: this.ezSelectable ? 0 : undefined, onKeyDown: event => this.keyDownHandler(event) }, this._listGroupItems.map(group => {
|
|
73531
73711
|
return (h("div", { id: this.getDivGroupId(group.group), class: 'group', key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, h("label", { draggable: false, class: 'group-name', title: group.group }, group.group), h("section", { class: 'section-container', onDragOver: ev => ev.preventDefault() }, h("div", { class: 'group-items-container' }, h("div", { class: 'draggable-list' }, group.items.map((item, index) => (h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
73532
73712
|
'selectable-container': this.ezSelectable,
|
|
73533
73713
|
'hover-feedback': this.hoverFeedback,
|
|
@@ -73537,7 +73717,7 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
73537
73717
|
}));
|
|
73538
73718
|
}
|
|
73539
73719
|
renderList() {
|
|
73540
|
-
return h("div", { class: 'items-container', ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
73720
|
+
return h("div", { class: 'items-container', ref: el => (this._itemContainer = el), tabIndex: this.ezSelectable ? 0 : undefined, onKeyDown: event => {
|
|
73541
73721
|
this.keyDownHandler(event);
|
|
73542
73722
|
} }, h("div", { class: 'draggable-list' }, this._listItems.map((item, index) => (h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
73543
73723
|
'selectable-container': this.ezSelectable,
|
|
@@ -73610,7 +73790,7 @@ const EzModal$1 = class extends HTMLElement$1 {
|
|
|
73610
73790
|
}
|
|
73611
73791
|
componentDidLoad() {
|
|
73612
73792
|
this.observeOpened();
|
|
73613
|
-
new KeyboardManager({ propagate: false, element: this._element })
|
|
73793
|
+
new KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
|
|
73614
73794
|
.bind("Enter", this.ezModalAction.emit.bind("OK"))
|
|
73615
73795
|
.bind("Escape", () => this.closeModal())
|
|
73616
73796
|
.bind("Esc", () => this.closeModal());
|
|
@@ -73725,7 +73905,7 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
73725
73905
|
this._closeButton.focus();
|
|
73726
73906
|
}
|
|
73727
73907
|
render() {
|
|
73728
|
-
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", { ref: ref => this._modalRef = ref, tabIndex: -1, class: "ez-modal-container__header-container" }, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--medium" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), (this.showCloseButton && h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" })))))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
|
|
73908
|
+
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", { ref: ref => this._modalRef = ref, tabIndex: -1, class: "ez-modal-container__header-container" }, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--medium" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), (this.showCloseButton && h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" })))))), h("div", { tabIndex: -1, class: "ez-modal-container__content" }, h("slot", null)), h("div", { tabIndex: -1, class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
|
|
73729
73909
|
}
|
|
73730
73910
|
get _element() { return this; }
|
|
73731
73911
|
static get style() { return ezModalContainerCss; }
|
|
@@ -74599,6 +74779,88 @@ async function detectOverflow(state, options) {
|
|
|
74599
74779
|
};
|
|
74600
74780
|
}
|
|
74601
74781
|
|
|
74782
|
+
/**
|
|
74783
|
+
* Provides data to position an inner element of the floating element so that it
|
|
74784
|
+
* appears centered to the reference element.
|
|
74785
|
+
* @see https://floating-ui.com/docs/arrow
|
|
74786
|
+
*/
|
|
74787
|
+
const arrow$1 = options => ({
|
|
74788
|
+
name: 'arrow',
|
|
74789
|
+
options,
|
|
74790
|
+
async fn(state) {
|
|
74791
|
+
const {
|
|
74792
|
+
x,
|
|
74793
|
+
y,
|
|
74794
|
+
placement,
|
|
74795
|
+
rects,
|
|
74796
|
+
platform,
|
|
74797
|
+
elements,
|
|
74798
|
+
middlewareData
|
|
74799
|
+
} = state;
|
|
74800
|
+
// Since `element` is required, we don't Partial<> the type.
|
|
74801
|
+
const {
|
|
74802
|
+
element,
|
|
74803
|
+
padding = 0
|
|
74804
|
+
} = evaluate(options, state) || {};
|
|
74805
|
+
if (element == null) {
|
|
74806
|
+
return {};
|
|
74807
|
+
}
|
|
74808
|
+
const paddingObject = getPaddingObject(padding);
|
|
74809
|
+
const coords = {
|
|
74810
|
+
x,
|
|
74811
|
+
y
|
|
74812
|
+
};
|
|
74813
|
+
const axis = getAlignmentAxis(placement);
|
|
74814
|
+
const length = getAxisLength(axis);
|
|
74815
|
+
const arrowDimensions = await platform.getDimensions(element);
|
|
74816
|
+
const isYAxis = axis === 'y';
|
|
74817
|
+
const minProp = isYAxis ? 'top' : 'left';
|
|
74818
|
+
const maxProp = isYAxis ? 'bottom' : 'right';
|
|
74819
|
+
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
|
|
74820
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
74821
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
|
74822
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
74823
|
+
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
74824
|
+
|
|
74825
|
+
// DOM platform can return `window` as the `offsetParent`.
|
|
74826
|
+
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
|
|
74827
|
+
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
74828
|
+
}
|
|
74829
|
+
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
74830
|
+
|
|
74831
|
+
// If the padding is large enough that it causes the arrow to no longer be
|
|
74832
|
+
// centered, modify the padding so that it is centered.
|
|
74833
|
+
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
74834
|
+
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
74835
|
+
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
74836
|
+
|
|
74837
|
+
// Make sure the arrow doesn't overflow the floating element if the center
|
|
74838
|
+
// point is outside the floating element's bounds.
|
|
74839
|
+
const min$1 = minPadding;
|
|
74840
|
+
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
74841
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
74842
|
+
const offset = clamp(min$1, center, max);
|
|
74843
|
+
|
|
74844
|
+
// If the reference is small enough that the arrow's padding causes it to
|
|
74845
|
+
// to point to nothing for an aligned placement, adjust the offset of the
|
|
74846
|
+
// floating element itself. To ensure `shift()` continues to take action,
|
|
74847
|
+
// a single reset is performed when this is true.
|
|
74848
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
74849
|
+
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
|
|
74850
|
+
return {
|
|
74851
|
+
[axis]: coords[axis] + alignmentOffset,
|
|
74852
|
+
data: {
|
|
74853
|
+
[axis]: offset,
|
|
74854
|
+
centerOffset: center - offset - alignmentOffset,
|
|
74855
|
+
...(shouldAddOffset && {
|
|
74856
|
+
alignmentOffset
|
|
74857
|
+
})
|
|
74858
|
+
},
|
|
74859
|
+
reset: shouldAddOffset
|
|
74860
|
+
};
|
|
74861
|
+
}
|
|
74862
|
+
});
|
|
74863
|
+
|
|
74602
74864
|
/**
|
|
74603
74865
|
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
74604
74866
|
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
@@ -74725,6 +74987,90 @@ const flip$1 = function (options) {
|
|
|
74725
74987
|
};
|
|
74726
74988
|
};
|
|
74727
74989
|
|
|
74990
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
74991
|
+
// Derivable.
|
|
74992
|
+
|
|
74993
|
+
async function convertValueToCoords(state, options) {
|
|
74994
|
+
const {
|
|
74995
|
+
placement,
|
|
74996
|
+
platform,
|
|
74997
|
+
elements
|
|
74998
|
+
} = state;
|
|
74999
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
75000
|
+
const side = getSide(placement);
|
|
75001
|
+
const alignment = getAlignment(placement);
|
|
75002
|
+
const isVertical = getSideAxis(placement) === 'y';
|
|
75003
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
75004
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
75005
|
+
const rawValue = evaluate(options, state);
|
|
75006
|
+
|
|
75007
|
+
// eslint-disable-next-line prefer-const
|
|
75008
|
+
let {
|
|
75009
|
+
mainAxis,
|
|
75010
|
+
crossAxis,
|
|
75011
|
+
alignmentAxis
|
|
75012
|
+
} = typeof rawValue === 'number' ? {
|
|
75013
|
+
mainAxis: rawValue,
|
|
75014
|
+
crossAxis: 0,
|
|
75015
|
+
alignmentAxis: null
|
|
75016
|
+
} : {
|
|
75017
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
75018
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
75019
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
75020
|
+
};
|
|
75021
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
|
75022
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
75023
|
+
}
|
|
75024
|
+
return isVertical ? {
|
|
75025
|
+
x: crossAxis * crossAxisMulti,
|
|
75026
|
+
y: mainAxis * mainAxisMulti
|
|
75027
|
+
} : {
|
|
75028
|
+
x: mainAxis * mainAxisMulti,
|
|
75029
|
+
y: crossAxis * crossAxisMulti
|
|
75030
|
+
};
|
|
75031
|
+
}
|
|
75032
|
+
|
|
75033
|
+
/**
|
|
75034
|
+
* Modifies the placement by translating the floating element along the
|
|
75035
|
+
* specified axes.
|
|
75036
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
75037
|
+
* object may be passed.
|
|
75038
|
+
* @see https://floating-ui.com/docs/offset
|
|
75039
|
+
*/
|
|
75040
|
+
const offset$1 = function (options) {
|
|
75041
|
+
if (options === void 0) {
|
|
75042
|
+
options = 0;
|
|
75043
|
+
}
|
|
75044
|
+
return {
|
|
75045
|
+
name: 'offset',
|
|
75046
|
+
options,
|
|
75047
|
+
async fn(state) {
|
|
75048
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
|
75049
|
+
const {
|
|
75050
|
+
x,
|
|
75051
|
+
y,
|
|
75052
|
+
placement,
|
|
75053
|
+
middlewareData
|
|
75054
|
+
} = state;
|
|
75055
|
+
const diffCoords = await convertValueToCoords(state, options);
|
|
75056
|
+
|
|
75057
|
+
// If the placement is the same and the arrow caused an alignment offset
|
|
75058
|
+
// then we don't need to change the positioning coordinates.
|
|
75059
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
75060
|
+
return {};
|
|
75061
|
+
}
|
|
75062
|
+
return {
|
|
75063
|
+
x: x + diffCoords.x,
|
|
75064
|
+
y: y + diffCoords.y,
|
|
75065
|
+
data: {
|
|
75066
|
+
...diffCoords,
|
|
75067
|
+
placement
|
|
75068
|
+
}
|
|
75069
|
+
};
|
|
75070
|
+
}
|
|
75071
|
+
};
|
|
75072
|
+
};
|
|
75073
|
+
|
|
74728
75074
|
/**
|
|
74729
75075
|
* Optimizes the visibility of the floating element by shifting it in order to
|
|
74730
75076
|
* keep it in view when it will overflow the clipping boundary.
|
|
@@ -75432,6 +75778,15 @@ const platform = {
|
|
|
75432
75778
|
isRTL
|
|
75433
75779
|
};
|
|
75434
75780
|
|
|
75781
|
+
/**
|
|
75782
|
+
* Modifies the placement by translating the floating element along the
|
|
75783
|
+
* specified axes.
|
|
75784
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
75785
|
+
* object may be passed.
|
|
75786
|
+
* @see https://floating-ui.com/docs/offset
|
|
75787
|
+
*/
|
|
75788
|
+
const offset = offset$1;
|
|
75789
|
+
|
|
75435
75790
|
/**
|
|
75436
75791
|
* Optimizes the visibility of the floating element by shifting it in order to
|
|
75437
75792
|
* keep it in view when it will overflow the clipping boundary.
|
|
@@ -75447,6 +75802,13 @@ const shift = shift$1;
|
|
|
75447
75802
|
*/
|
|
75448
75803
|
const flip = flip$1;
|
|
75449
75804
|
|
|
75805
|
+
/**
|
|
75806
|
+
* Provides data to position an inner element of the floating element so that it
|
|
75807
|
+
* appears centered to the reference element.
|
|
75808
|
+
* @see https://floating-ui.com/docs/arrow
|
|
75809
|
+
*/
|
|
75810
|
+
const arrow = arrow$1;
|
|
75811
|
+
|
|
75450
75812
|
/**
|
|
75451
75813
|
* Computes the `x` and `y` coordinates that will place the floating element
|
|
75452
75814
|
* next to a given reference element.
|
|
@@ -75826,7 +76188,7 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
75826
76188
|
if (this.opened && this._popupRef) {
|
|
75827
76189
|
this._popupRef.focus();
|
|
75828
76190
|
}
|
|
75829
|
-
new KeyboardManager({ propagate: false, element: this._element })
|
|
76191
|
+
new KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
|
|
75830
76192
|
.bind("Enter", this.ezPopupAction.emit.bind("OK"))
|
|
75831
76193
|
.bind("Escape", () => this.closePopup())
|
|
75832
76194
|
.bind("Esc", () => this.closePopup());
|
|
@@ -76758,6 +77120,455 @@ var SearchMode;
|
|
|
76758
77120
|
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
76759
77121
|
})(SearchMode || (SearchMode = {}));
|
|
76760
77122
|
|
|
77123
|
+
const ezSearchPlusCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--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{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;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:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{width:107px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%}";
|
|
77124
|
+
|
|
77125
|
+
const EzSearchPlus$1 = class extends HTMLElement$1 {
|
|
77126
|
+
constructor() {
|
|
77127
|
+
super();
|
|
77128
|
+
this.__registerHost();
|
|
77129
|
+
this.__attachShadow();
|
|
77130
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
77131
|
+
this.SEARCH_DESCRIPTION_TIMEOUT = 300;
|
|
77132
|
+
this.INTERVAL_TO_RETRY_ASYNC_VALUE = 100;
|
|
77133
|
+
this.value = undefined;
|
|
77134
|
+
this.enabled = true;
|
|
77135
|
+
this.disableCodeInput = false;
|
|
77136
|
+
this.disableDescriptionInput = false;
|
|
77137
|
+
this.label = undefined;
|
|
77138
|
+
this.codLabel = undefined;
|
|
77139
|
+
this.hideDescriptionInput = false;
|
|
77140
|
+
this.canShowError = true;
|
|
77141
|
+
this.errorMessage = undefined;
|
|
77142
|
+
this.mode = "regular";
|
|
77143
|
+
this.contextProperties = undefined;
|
|
77144
|
+
this.optionLoader = undefined;
|
|
77145
|
+
this.showOptionValue = true;
|
|
77146
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
77147
|
+
this.autoFocus = false;
|
|
77148
|
+
this.showSelectedValue = true;
|
|
77149
|
+
this.suppressEmptyOption = false;
|
|
77150
|
+
this.hideErrorOnFocusOut = true;
|
|
77151
|
+
this.listOptionsPosition = undefined;
|
|
77152
|
+
this.isTextSearch = false;
|
|
77153
|
+
this.ignoreLimitCharsToSearch = false;
|
|
77154
|
+
this.suppressSearch = false;
|
|
77155
|
+
this.suppressPreLoad = true;
|
|
77156
|
+
this.ensureClearButtonVisible = false;
|
|
77157
|
+
this.descriptionValue = "";
|
|
77158
|
+
this.codeValue = "";
|
|
77159
|
+
this.isLoadingDescription = false;
|
|
77160
|
+
this.searchDescriptionIsOpen = false;
|
|
77161
|
+
this.visibleOptions = undefined;
|
|
77162
|
+
this.showLoading = true;
|
|
77163
|
+
}
|
|
77164
|
+
async observeValue(newValue, oldValue) {
|
|
77165
|
+
const newNormalizedValue = this.normalizeValueToCodeValue(newValue);
|
|
77166
|
+
const oldNormalizedValue = this.normalizeValueToCodeValue(oldValue);
|
|
77167
|
+
if (newNormalizedValue == oldNormalizedValue)
|
|
77168
|
+
return;
|
|
77169
|
+
if (newNormalizedValue == undefined) {
|
|
77170
|
+
this.codeValue = undefined;
|
|
77171
|
+
this.descriptionValue = undefined;
|
|
77172
|
+
this.ezChange.emit(undefined);
|
|
77173
|
+
return;
|
|
77174
|
+
}
|
|
77175
|
+
this.codeValue = newNormalizedValue;
|
|
77176
|
+
try {
|
|
77177
|
+
this.descriptionValue = await this.normalizeCodeToDescriptionValue(newValue);
|
|
77178
|
+
}
|
|
77179
|
+
catch (err) {
|
|
77180
|
+
this.value = undefined;
|
|
77181
|
+
console.warn("[EzSearchPlus] Erro ao obter descrição do registro.", err);
|
|
77182
|
+
throw err;
|
|
77183
|
+
}
|
|
77184
|
+
this.ezChange.emit(this.buildCurrentValue());
|
|
77185
|
+
}
|
|
77186
|
+
canShowLoadSpinDescription() {
|
|
77187
|
+
return this.isLoadingDescription;
|
|
77188
|
+
}
|
|
77189
|
+
/**
|
|
77190
|
+
* Aplica o foco no campo.
|
|
77191
|
+
*/
|
|
77192
|
+
async setFocus(options) {
|
|
77193
|
+
var _a;
|
|
77194
|
+
if (this.disableCodeInput) {
|
|
77195
|
+
(_a = this._textInputDescriptionValue) === null || _a === void 0 ? void 0 : _a.setFocus(options);
|
|
77196
|
+
return;
|
|
77197
|
+
}
|
|
77198
|
+
if (this._latestFocusedInputElement) {
|
|
77199
|
+
this._latestFocusedInputElement.setFocus(options);
|
|
77200
|
+
return;
|
|
77201
|
+
}
|
|
77202
|
+
this._textInputCodeValue.setFocus(options);
|
|
77203
|
+
}
|
|
77204
|
+
/**
|
|
77205
|
+
* Obtém o valor do componente só após a compo de apresentação
|
|
77206
|
+
* ter sido resolvido pelo option loader quando necessário
|
|
77207
|
+
*/
|
|
77208
|
+
async getValueAsync() {
|
|
77209
|
+
if (!this.isLoadingDescription) {
|
|
77210
|
+
const currentOpt = this.buildCurrentValue();
|
|
77211
|
+
return new Promise(resolve => resolve(currentOpt));
|
|
77212
|
+
}
|
|
77213
|
+
return new Promise(resolve => {
|
|
77214
|
+
let id = setInterval(() => {
|
|
77215
|
+
if (!this.isLoadingDescription) {
|
|
77216
|
+
clearInterval(id);
|
|
77217
|
+
const currentOpt = this.buildCurrentValue();
|
|
77218
|
+
resolve(currentOpt);
|
|
77219
|
+
}
|
|
77220
|
+
}, this.INTERVAL_TO_RETRY_ASYNC_VALUE);
|
|
77221
|
+
});
|
|
77222
|
+
}
|
|
77223
|
+
/**
|
|
77224
|
+
* Limpa o valor do campo de pesquisa
|
|
77225
|
+
*/
|
|
77226
|
+
async clearValue() {
|
|
77227
|
+
this.clearSearch();
|
|
77228
|
+
}
|
|
77229
|
+
/**
|
|
77230
|
+
* Remove o foco do campo.
|
|
77231
|
+
*/
|
|
77232
|
+
async setBlur() {
|
|
77233
|
+
var _a, _b;
|
|
77234
|
+
(_a = this._textInputCodeValue) === null || _a === void 0 ? void 0 : _a.setBlur();
|
|
77235
|
+
(_b = this._textInputDescriptionValue) === null || _b === void 0 ? void 0 : _b.setBlur();
|
|
77236
|
+
}
|
|
77237
|
+
/**
|
|
77238
|
+
* Retorna se o conteúdo é inválido.
|
|
77239
|
+
*/
|
|
77240
|
+
async isInvalid() {
|
|
77241
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
77242
|
+
}
|
|
77243
|
+
componentWillLoad() {
|
|
77244
|
+
if (this.value && StringUtils$1.isEmpty(this.codeValue)) {
|
|
77245
|
+
this.observeValue(this.value, undefined);
|
|
77246
|
+
}
|
|
77247
|
+
}
|
|
77248
|
+
componentDidLoad() {
|
|
77249
|
+
CSSVarsUtils.applyVarsTextInput(this.el, this._textInputCodeValue);
|
|
77250
|
+
CSSVarsUtils.applyVarsTextInput(this.el, this._textInputDescriptionValue);
|
|
77251
|
+
this.initKeyboardManager();
|
|
77252
|
+
if (this.autoFocus) {
|
|
77253
|
+
requestAnimationFrame(() => {
|
|
77254
|
+
this.setFocus({ selectText: true });
|
|
77255
|
+
});
|
|
77256
|
+
}
|
|
77257
|
+
}
|
|
77258
|
+
clearSearch() {
|
|
77259
|
+
this.value = null;
|
|
77260
|
+
}
|
|
77261
|
+
getCodLabel() {
|
|
77262
|
+
var _a;
|
|
77263
|
+
if (this.hideDescriptionInput) {
|
|
77264
|
+
return this.label;
|
|
77265
|
+
}
|
|
77266
|
+
return (_a = this.codLabel) !== null && _a !== void 0 ? _a : "Cód.";
|
|
77267
|
+
}
|
|
77268
|
+
async normalizeCodeToDescriptionValue(valueToNormalize) {
|
|
77269
|
+
if (!valueToNormalize) {
|
|
77270
|
+
return "";
|
|
77271
|
+
}
|
|
77272
|
+
if (typeof valueToNormalize == 'string') {
|
|
77273
|
+
try {
|
|
77274
|
+
valueToNormalize = JSON.parse(valueToNormalize);
|
|
77275
|
+
if ((valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.value) && !(valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.label)) {
|
|
77276
|
+
return await this.loadDescriptionValueByCode(valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.value);
|
|
77277
|
+
}
|
|
77278
|
+
}
|
|
77279
|
+
catch (e) {
|
|
77280
|
+
return await this.loadDescriptionValueByCode(valueToNormalize);
|
|
77281
|
+
}
|
|
77282
|
+
}
|
|
77283
|
+
//Se é diferente de objeto, temos que resolver a descrição
|
|
77284
|
+
if (typeof valueToNormalize != 'object') {
|
|
77285
|
+
return await this.loadDescriptionValueByCode(valueToNormalize);
|
|
77286
|
+
}
|
|
77287
|
+
return valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.label;
|
|
77288
|
+
}
|
|
77289
|
+
normalizeValueToCodeValue(valueToNormalize) {
|
|
77290
|
+
if (!valueToNormalize) {
|
|
77291
|
+
return undefined;
|
|
77292
|
+
}
|
|
77293
|
+
if (typeof valueToNormalize == 'string') {
|
|
77294
|
+
try {
|
|
77295
|
+
valueToNormalize = JSON.parse(valueToNormalize);
|
|
77296
|
+
}
|
|
77297
|
+
catch (e) {
|
|
77298
|
+
return valueToNormalize;
|
|
77299
|
+
}
|
|
77300
|
+
}
|
|
77301
|
+
if (typeof valueToNormalize != 'object') {
|
|
77302
|
+
return valueToNormalize;
|
|
77303
|
+
}
|
|
77304
|
+
return valueToNormalize === null || valueToNormalize === void 0 ? void 0 : valueToNormalize.value;
|
|
77305
|
+
}
|
|
77306
|
+
async loadDescriptionValueByCode(codeValue) {
|
|
77307
|
+
if (!this.optionLoader) {
|
|
77308
|
+
console.warn("optionLoader não definido");
|
|
77309
|
+
return "";
|
|
77310
|
+
}
|
|
77311
|
+
try {
|
|
77312
|
+
this.isLoadingDescription = true;
|
|
77313
|
+
const searchArgument = { mode: SearchMode$2.LOAD_DESCRIPTION, argument: codeValue };
|
|
77314
|
+
const loadedOption = await this.optionLoader(searchArgument);
|
|
77315
|
+
if (!loadedOption) {
|
|
77316
|
+
return "";
|
|
77317
|
+
}
|
|
77318
|
+
return loadedOption.label;
|
|
77319
|
+
}
|
|
77320
|
+
finally {
|
|
77321
|
+
this.isLoadingDescription = false;
|
|
77322
|
+
}
|
|
77323
|
+
}
|
|
77324
|
+
handleCodeInputFocusOut() {
|
|
77325
|
+
this.cancelSelection();
|
|
77326
|
+
if (this.codeValue == this._textInputCodeValue.value)
|
|
77327
|
+
return;
|
|
77328
|
+
this.value = this._textInputCodeValue.value;
|
|
77329
|
+
}
|
|
77330
|
+
handleSearchClick() {
|
|
77331
|
+
this.loadAdvancedSearch();
|
|
77332
|
+
}
|
|
77333
|
+
async loadAdvancedSearch() {
|
|
77334
|
+
if (!this.optionLoader) {
|
|
77335
|
+
console.warn("optionLoader não definido");
|
|
77336
|
+
return;
|
|
77337
|
+
}
|
|
77338
|
+
const searchArgument = { mode: SearchMode$2.ADVANCED, argument: "" };
|
|
77339
|
+
let selectedItem = undefined;
|
|
77340
|
+
try {
|
|
77341
|
+
selectedItem = await this.optionLoader(searchArgument, this.contextProperties);
|
|
77342
|
+
}
|
|
77343
|
+
catch (ignore) { }
|
|
77344
|
+
if (!selectedItem)
|
|
77345
|
+
return;
|
|
77346
|
+
this.value = selectedItem;
|
|
77347
|
+
}
|
|
77348
|
+
buildCurrentValue() {
|
|
77349
|
+
if (StringUtils$1.isEmpty(this.codeValue)) {
|
|
77350
|
+
return undefined;
|
|
77351
|
+
}
|
|
77352
|
+
return {
|
|
77353
|
+
value: this.codeValue,
|
|
77354
|
+
label: this.descriptionValue
|
|
77355
|
+
};
|
|
77356
|
+
}
|
|
77357
|
+
async handleTextInputChangeHandler(event) {
|
|
77358
|
+
if (!this.searchDescriptionIsOpen) {
|
|
77359
|
+
this._popover.show();
|
|
77360
|
+
}
|
|
77361
|
+
const argument = event.target.value;
|
|
77362
|
+
await this.debounceLoaderOptions(argument);
|
|
77363
|
+
}
|
|
77364
|
+
async debounceLoaderOptions(argument) {
|
|
77365
|
+
if (this._debounceSearch)
|
|
77366
|
+
clearTimeout(this._debounceSearch);
|
|
77367
|
+
return new Promise((resolve) => {
|
|
77368
|
+
this._debounceSearch = setTimeout(async () => {
|
|
77369
|
+
await this.processOptionsLoader(argument);
|
|
77370
|
+
resolve();
|
|
77371
|
+
}, this.SEARCH_DESCRIPTION_TIMEOUT);
|
|
77372
|
+
});
|
|
77373
|
+
}
|
|
77374
|
+
async processOptionsLoader(argument) {
|
|
77375
|
+
try {
|
|
77376
|
+
this.showLoading = true;
|
|
77377
|
+
const searchArgument = { mode: SearchMode$2.PREDICTIVE, argument };
|
|
77378
|
+
this.visibleOptions = await this.optionLoader(searchArgument);
|
|
77379
|
+
}
|
|
77380
|
+
finally {
|
|
77381
|
+
this.showLoading = false;
|
|
77382
|
+
}
|
|
77383
|
+
}
|
|
77384
|
+
handleSelectItem(evt) {
|
|
77385
|
+
const currentOpt = evt.detail;
|
|
77386
|
+
this.value = currentOpt;
|
|
77387
|
+
this._popover.hide();
|
|
77388
|
+
window.requestAnimationFrame(() => {
|
|
77389
|
+
var _a;
|
|
77390
|
+
(_a = this._textInputDescriptionValue) === null || _a === void 0 ? void 0 : _a.setFocus({ selectText: true });
|
|
77391
|
+
});
|
|
77392
|
+
}
|
|
77393
|
+
async handleArrowUp() {
|
|
77394
|
+
if (!this.isOptionsVisible()) {
|
|
77395
|
+
return;
|
|
77396
|
+
}
|
|
77397
|
+
await this._searchList.previousOption();
|
|
77398
|
+
}
|
|
77399
|
+
async handleArrowDown() {
|
|
77400
|
+
if (!this.isOptionsVisible()) {
|
|
77401
|
+
return;
|
|
77402
|
+
}
|
|
77403
|
+
await this._searchList.nextOption();
|
|
77404
|
+
}
|
|
77405
|
+
async selectCurrentItem() {
|
|
77406
|
+
var _a;
|
|
77407
|
+
await ((_a = this._searchList) === null || _a === void 0 ? void 0 : _a.selectCurrentItem());
|
|
77408
|
+
}
|
|
77409
|
+
async cancelSelection() {
|
|
77410
|
+
var _a, _b, _c, _d;
|
|
77411
|
+
if (this._textInputDescriptionValue && this._textInputDescriptionValue.value != ((_a = this.value) === null || _a === void 0 ? void 0 : _a.label)) {
|
|
77412
|
+
this._textInputDescriptionValue.value = (_b = this.value) === null || _b === void 0 ? void 0 : _b.label;
|
|
77413
|
+
}
|
|
77414
|
+
await ((_c = this._searchList) === null || _c === void 0 ? void 0 : _c.cancelSelection());
|
|
77415
|
+
(_d = this._popover) === null || _d === void 0 ? void 0 : _d.hide();
|
|
77416
|
+
}
|
|
77417
|
+
async handleInputTab() {
|
|
77418
|
+
await this.cancelSelection();
|
|
77419
|
+
}
|
|
77420
|
+
async handleInputEsc() {
|
|
77421
|
+
var _a;
|
|
77422
|
+
await this.cancelSelection();
|
|
77423
|
+
await ((_a = this._latestFocusedInputElement) === null || _a === void 0 ? void 0 : _a.setFocus({ selectText: true }));
|
|
77424
|
+
}
|
|
77425
|
+
async initKeyboardManager() {
|
|
77426
|
+
this._keyboardManager = new KeyboardManager();
|
|
77427
|
+
const opts = { element: this.el, propagate: true };
|
|
77428
|
+
this._keyboardManager
|
|
77429
|
+
.bind("ArrowUp", () => this.handleArrowUp(), opts)
|
|
77430
|
+
.bind("ArrowDown", () => this.handleArrowDown(), opts)
|
|
77431
|
+
.bind("Enter", () => this.selectCurrentItem(), opts)
|
|
77432
|
+
.bind("Tab", () => this.handleInputTab(), opts)
|
|
77433
|
+
.bind("Escape", () => this.handleInputEsc(), opts);
|
|
77434
|
+
}
|
|
77435
|
+
disconnectedCallback() {
|
|
77436
|
+
this._keyboardManager
|
|
77437
|
+
.unbind("ArrowUp")
|
|
77438
|
+
.unbind("ArrowDown")
|
|
77439
|
+
.unbind("Enter")
|
|
77440
|
+
.unbind("Tab")
|
|
77441
|
+
.unbind("Escape");
|
|
77442
|
+
}
|
|
77443
|
+
isOptionsVisible() {
|
|
77444
|
+
return this._popover.opened;
|
|
77445
|
+
}
|
|
77446
|
+
setLatestFocusedInputElement(el) {
|
|
77447
|
+
this._latestFocusedInputElement = el;
|
|
77448
|
+
}
|
|
77449
|
+
handleCodeInputFocus() {
|
|
77450
|
+
this.setLatestFocusedInputElement(this._textInputCodeValue);
|
|
77451
|
+
}
|
|
77452
|
+
handleDescriptionInputFocus() {
|
|
77453
|
+
this.setLatestFocusedInputElement(this._textInputDescriptionValue);
|
|
77454
|
+
}
|
|
77455
|
+
getRightIconElement() {
|
|
77456
|
+
var _a, _b;
|
|
77457
|
+
if (!this.ensureClearButtonVisible && (!this.value && !((_a = this._textInputCodeValue) === null || _a === void 0 ? void 0 : _a.value) && !((_b = this._textInputDescriptionValue) === null || _b === void 0 ? void 0 : _b.value))) {
|
|
77458
|
+
return null;
|
|
77459
|
+
}
|
|
77460
|
+
return h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }));
|
|
77461
|
+
}
|
|
77462
|
+
getLeftIconElement() {
|
|
77463
|
+
return h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handleSearchClick() }, this.canShowLoadSpinDescription() ? h("div", { class: "message__loading" }) : h("ez-icon", { iconName: "search" }));
|
|
77464
|
+
}
|
|
77465
|
+
render() {
|
|
77466
|
+
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
77467
|
+
return (h(Host, null, h("div", { class: "ez-search-plus__container" }, h("ez-text-input", { ref: elem => this._textInputCodeValue = elem, class: {
|
|
77468
|
+
"ez-search-plus__code-input": true,
|
|
77469
|
+
"ez-search-plus__code-input-no-border": !this.hideDescriptionInput,
|
|
77470
|
+
"ez-search-plus__code-input-full": this.hideDescriptionInput
|
|
77471
|
+
}, "data-element-id": ElementIDUtils.getInternalIDInfo("codeInput"), "data-slave-mode": "true", enabled: !this.disableCodeInput && this.enabled, mode: this.mode, label: this.getCodLabel(), hasInvalid: !StringUtils$1.isEmpty(this.errorMessage), errorMessage: this.hideDescriptionInput ? this.errorMessage : "", value: this.codeValue, onFocusout: () => this.handleCodeInputFocusOut(), onFocus: () => this.handleCodeInputFocus() }, this.getLeftIconElement()), !this.hideDescriptionInput && h("div", { class: "description-input-container" }, h("ez-text-input", { ref: elem => this._textInputDescriptionValue = elem, tabIndex: -1, class: "ez-search-plus__text-input", "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), "data-slave-mode": "true", enabled: !this.disableDescriptionInput && this.enabled, label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, value: this.descriptionValue, onInput: event => this.handleTextInputChangeHandler(event), onFocus: () => this.handleDescriptionInputFocus() }, this.getRightIconElement()), h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInputDescriptionValue, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', useAnchorSize: true, onEzVisibilityChange: event => this.searchDescriptionIsOpen = event.detail }, h("ez-search-result-list", { ref: (ref) => this._searchList = ref, showLoading: this.showLoading, visibleOptions: this.visibleOptions, value: this.value, showOptionValue: this.showOptionValue, onChangeValue: (evt) => this.handleSelectItem(evt) }))))));
|
|
77472
|
+
}
|
|
77473
|
+
get el() { return this; }
|
|
77474
|
+
static get watchers() { return {
|
|
77475
|
+
"value": ["observeValue"]
|
|
77476
|
+
}; }
|
|
77477
|
+
static get style() { return ezSearchPlusCss; }
|
|
77478
|
+
};
|
|
77479
|
+
|
|
77480
|
+
const ezSearchResultListCss = ":host{--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--small, 6px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px)}.list-options{position:relative;z-index:var(--more-visible, 2);margin:var(--space--small) 0px;padding:0px;padding-inline-start:0px;box-sizing:border-box;width:100%;height:100%;max-height:350px;min-width:150px;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;margin:var(--space--medium) 0px;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}";
|
|
77481
|
+
|
|
77482
|
+
const EzSearchResultList$1 = class extends HTMLElement$1 {
|
|
77483
|
+
constructor() {
|
|
77484
|
+
super();
|
|
77485
|
+
this.__registerHost();
|
|
77486
|
+
this.__attachShadow();
|
|
77487
|
+
this.changeValue = createEvent(this, "changeValue", 7);
|
|
77488
|
+
this._textEmptyList = "Nenhum resultado encontrado";
|
|
77489
|
+
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
77490
|
+
this._endHighlightTag = "</span>";
|
|
77491
|
+
this.showLoading = undefined;
|
|
77492
|
+
this.visibleOptions = [];
|
|
77493
|
+
this.value = undefined;
|
|
77494
|
+
this.showOptionValue = true;
|
|
77495
|
+
this._preSelection = undefined;
|
|
77496
|
+
}
|
|
77497
|
+
async nextOption() {
|
|
77498
|
+
const newPreSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this.visibleOptions.length - 1);
|
|
77499
|
+
this.preSelectItemByIndex(newPreSelection);
|
|
77500
|
+
}
|
|
77501
|
+
async previousOption() {
|
|
77502
|
+
const newPreSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
77503
|
+
this.preSelectItemByIndex(newPreSelection);
|
|
77504
|
+
}
|
|
77505
|
+
preSelectItemByIndex(newIndex) {
|
|
77506
|
+
this._preSelection = newIndex;
|
|
77507
|
+
const option = this.visibleOptions[newIndex];
|
|
77508
|
+
this.scrollToOption(option);
|
|
77509
|
+
}
|
|
77510
|
+
selectOption(newOption) {
|
|
77511
|
+
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: newOption === null || newOption === void 0 ? void 0 : newOption.value, label: newOption === null || newOption === void 0 ? void 0 : newOption.label });
|
|
77512
|
+
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value, label: newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label });
|
|
77513
|
+
this.changeValue.emit(newOptionsFormatted);
|
|
77514
|
+
}
|
|
77515
|
+
createAndSelectOption(detail) {
|
|
77516
|
+
let { key, title } = detail;
|
|
77517
|
+
key = String(key !== null && key !== void 0 ? key : "");
|
|
77518
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
77519
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
77520
|
+
title = StringUtils$1.decodeHtmlEntities(title);
|
|
77521
|
+
const option = {
|
|
77522
|
+
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
77523
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
77524
|
+
};
|
|
77525
|
+
this.selectOption(option);
|
|
77526
|
+
}
|
|
77527
|
+
scrollToOption(opt) {
|
|
77528
|
+
if (!(opt === null || opt === void 0 ? void 0 : opt.value) || !this._optionsList)
|
|
77529
|
+
return;
|
|
77530
|
+
window.requestAnimationFrame(() => {
|
|
77531
|
+
var _a;
|
|
77532
|
+
const currentValue = String((_a = opt === null || opt === void 0 ? void 0 : opt.value) !== null && _a !== void 0 ? _a : "");
|
|
77533
|
+
const liElem = currentValue
|
|
77534
|
+
? this._optionsList.querySelector(`div#item_${currentValue.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g, '\\$1')}`)
|
|
77535
|
+
: undefined;
|
|
77536
|
+
if (liElem) {
|
|
77537
|
+
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
77538
|
+
}
|
|
77539
|
+
});
|
|
77540
|
+
}
|
|
77541
|
+
buildItem(opt, index) {
|
|
77542
|
+
var _a;
|
|
77543
|
+
opt.label = opt.label || opt.value;
|
|
77544
|
+
const card = {
|
|
77545
|
+
key: String((_a = opt.presentationValue) !== null && _a !== void 0 ? _a : ""),
|
|
77546
|
+
title: opt.presentationLabel,
|
|
77547
|
+
details: opt.details
|
|
77548
|
+
};
|
|
77549
|
+
return h("div", { style: { "height": "100%" }, class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createAndSelectOption(card), onMouseOver: () => { this._preSelection = index; } }, h("ez-card-item", { item: card, compacted: true, enableKey: this.showOptionValue }));
|
|
77550
|
+
}
|
|
77551
|
+
async selectCurrentItem() {
|
|
77552
|
+
this.selectOption(this.visibleOptions[this._preSelection]);
|
|
77553
|
+
}
|
|
77554
|
+
async cancelSelection() {
|
|
77555
|
+
this.cancelPreselection();
|
|
77556
|
+
}
|
|
77557
|
+
cancelPreselection() {
|
|
77558
|
+
this._preSelection = undefined;
|
|
77559
|
+
}
|
|
77560
|
+
canShowListOptions() {
|
|
77561
|
+
return !this.showLoading && this.visibleOptions.length > 0;
|
|
77562
|
+
}
|
|
77563
|
+
render() {
|
|
77564
|
+
return (h(Host, null, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
|
|
77565
|
+
&& this.visibleOptions.length === 0
|
|
77566
|
+
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this.showLoading
|
|
77567
|
+
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.canShowListOptions() && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
|
|
77568
|
+
}
|
|
77569
|
+
static get style() { return ezSearchResultListCss; }
|
|
77570
|
+
};
|
|
77571
|
+
|
|
76761
77572
|
const ezSidebarButtonCss = ":host{position:relative;--ez-sidebar-button--width:6px;--ez-sidebar-button--hover--width:12px;--ez-sidebar-button--height:96px;--ez-sidebar-navigator-button--z-index:var(--elevation--20, 20);--ez-sidebar-button--background-color--xlight:var(--background--xlight, #fff);--ez-sidebar-button--background-color--primary:var(--color--primary);--ez-sidebar-button--space--small:var(--space--small, 6px);--ez-sidebar-button--space--medium:var(--space--medium, 12px);--ez-sidebar-button--box-shadow:var(--shadow--small, 0px 0px 16px rgba(0, 38, 111, 0.07));--ez-sidebar-button--hover--box-shadow:var(--shadow--hard, 0px 0px 16px rgba(43, 58, 84, 0.24));--ez-sidebar-button--border--radius-small:var(--border--radius-small);--ez-sidebar-button--border--radius-medium:var(--border--radius-medium)}button{z-index:var(--ez-sidebar-navigator-button--z-index);position:absolute;display:flex;background:var(--ez-sidebar-button--background-color--xlight);border:0;border-radius:0 var(--ez-sidebar-button--border--radius-medium) var(--ez-sidebar-button--border--radius-medium) 0;box-shadow:var(--ez-sidebar-button--box-shadow);padding:0;cursor:pointer;align-items:center}span{width:var(--ez-sidebar-button--width);height:var(--ez-sidebar-button--height);margin:var(--ez-sidebar-button--space--medium) 0 var(--ez-sidebar-button--space--medium) 0;background:var(--ez-sidebar-button--background-color--primary);border-radius:0 var(--ez-sidebar-button--border--radius-small) var(--ez-sidebar-button--border--radius-small) 0}ez-icon{--ez-icon--color:var(--ez-sidebar-button--background-color--primary)}button:hover{box-shadow:var(--ez-sidebar-button--hover--box-shadow)}button:hover span{width:var(--ez-sidebar-button--hover--width);margin:var(--ez-sidebar-button--space--medium) 0 var(--ez-sidebar-button--space--medium) 0}";
|
|
76762
77573
|
|
|
76763
77574
|
const EzSidebarButton$1 = class extends HTMLElement$1 {
|
|
@@ -78569,34 +79380,7 @@ const EzTextEdit$1 = class extends HTMLElement$1 {
|
|
|
78569
79380
|
static get style() { return ezTextEditCss; }
|
|
78570
79381
|
};
|
|
78571
79382
|
|
|
78572
|
-
|
|
78573
|
-
* Aplica comportamento de elipses a um input caso o texto ultrapasse o tamanho disponível.
|
|
78574
|
-
*
|
|
78575
|
-
* @param inputElement A referência ao elemento input (HTMLInputElement).
|
|
78576
|
-
*/
|
|
78577
|
-
const applyEllipsisToInput = (inputElement) => {
|
|
78578
|
-
if (!inputElement || !inputElement.style) {
|
|
78579
|
-
console.error('[applyEllipsisToInput] Referência ao elemento input é inválida.');
|
|
78580
|
-
return;
|
|
78581
|
-
}
|
|
78582
|
-
inputElement.style.textOverflow = 'ellipsis';
|
|
78583
|
-
inputElement.style.overflow = 'hidden';
|
|
78584
|
-
inputElement.style.whiteSpace = 'nowrap';
|
|
78585
|
-
const adjustEllipsis = () => {
|
|
78586
|
-
const value = inputElement.value || '';
|
|
78587
|
-
const isOverflowing = inputElement.scrollWidth > inputElement.clientWidth;
|
|
78588
|
-
if (isOverflowing) {
|
|
78589
|
-
inputElement.setAttribute('title', value);
|
|
78590
|
-
}
|
|
78591
|
-
else {
|
|
78592
|
-
inputElement.removeAttribute('title');
|
|
78593
|
-
}
|
|
78594
|
-
};
|
|
78595
|
-
inputElement.addEventListener('input', adjustEllipsis);
|
|
78596
|
-
adjustEllipsis();
|
|
78597
|
-
};
|
|
78598
|
-
|
|
78599
|
-
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__min-width:0px;--ez-text-input__max-width:100%;--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__margin-bottom:var(--space--small);--ez-text-input__input--background-color:var(--background--light, #ffffff);--ez-text-input__input--border:var(--border--small, 1px solid);--ez-text-input__input--border-color:var(--color--strokes,#DCE0E8);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--background--medium, #F0F3F7);--ez-text-input__input--disabled--color:var(--text--primary, #626E82);--ez-text-input__input--error--border-color:var(--color-alert--error-800,#BD0025);--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__placeholder--color:var(--text--secondary, #a2abb9);--ez-text-input__tooltip_icon--error--color:var(--color-alert--error-800,#BD0025);--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;--ez-text-input__input--focus--icon-color:var(--title--primary, #2B3A54);--ez-text-input__input--disabled--focus--icon-color:var(--text--primary, #626E82);--ez-text-input__tooltip-icon--spacing:var(--space--large);--ez-text-input__tooltip-icon---width:var(--space--large);--ez-text-input__tooltip-icon---horizontal-margin:var(--space--medium, 12px);--ez-text-input__tooltip-icon---vertical-margin:10px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width);min-width:var(--ez-text-input__min-width);max-width:var(--ez-text-input__max-width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;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);padding:var(--ez-text-input__input--padding);margin-bottom:var(--ez-text-input__margin-bottom)}input.no--margin{--ez-text-input__margin-bottom:0}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}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--left.hasError{padding-right:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.icon--right.hasError{padding-right:calc(var(--ez-text-input__icon--width) + var(--ez-text-input__tooltip-icon--spacing))}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color);padding-right:calc(var(--ez-text-input__tooltip-icon---width) + (2*var(--ez-text-input__tooltip-icon---horizontal-margin)))}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:disabled,input:read-only{cursor:not-allowed}.hasError{color:var(--ez-text-input__tooltip_icon--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.hasError{width:calc(100% - 2*(var(--ez-text-input__tooltip-icon--spacing)))}.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);cursor:not-allowed}.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--left.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.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--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder,.input--slim:-moz-placeholder,.input--slim::-moz-placeholder,.input--slim:-ms-input-placeholder,.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__placeholder--color)}.input--slim:disabled::-webkit-input-placeholder,.input--slim:disabled:-moz-placeholder,.input--slim:disabled::-moz-placeholder,.input--slim:disabled:-ms-input-placeholder,.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}ez-icon.tooltip-icon{position:absolute;display:flex;align-items:center;justify-content:center;overflow:hidden;width:var(--ez-text-input__tooltip-icon---width);height:22px;margin:var(--ez-text-input__tooltip-icon---vertical-margin) var(--ez-text-input__tooltip-icon---horizontal-margin);top:0;right:0;z-index:var(--elevation--4);border-radius:var(--ez-text-input--border-radius)}ez-icon.tooltip-icon.rightIconSlot{right:var(--ez-text-input__tooltip-icon--spacing)}ez-icon.tooltip-icon.hasError{--ez-icon--color:var(--ez-text-input__tooltip_icon--error--color)}";
|
|
79383
|
+
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:30px;--ez-text-input--height--slim:32px;--ez-text-input__min-width:0px;--ez-text-input__max-width:100%;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--border-top-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-top-right-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-right-radius:var(--ez-text-input--border-radius);--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__margin-bottom:var(--space--small);--ez-text-input__input--background-color:var(--background--light, #ffffff);--ez-text-input__input--border:var(--border--small, 1px solid);--ez-text-input__input--border-color:var(--color--strokes,#DCE0E8);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--background--medium, #F0F3F7);--ez-text-input__input--disabled--color:var(--text--primary, #626E82);--ez-text-input__input--error--border-color:var(--color-alert--error-800,#BD0025);--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__placeholder--color:var(--text--secondary, #a2abb9);--ez-text-input__tooltip_icon--error--color:var(--color-alert--error-800,#BD0025);--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;--ez-text-input__input--focus--icon-color:var(--title--primary, #2B3A54);--ez-text-input__input--disabled--focus--icon-color:var(--text--primary, #626E82);--ez-text-input__tooltip-icon--spacing:var(--space--large);--ez-text-input__tooltip-icon---width:var(--space--large);--ez-text-input__tooltip-icon---horizontal-margin:var(--space--medium, 12px);--ez-text-input__tooltip-icon---vertical-margin:10px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width);min-width:var(--ez-text-input__min-width);max-width:var(--ez-text-input__max-width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;height:var(--ez-text-input--height);border-top-left-radius:var(--ez-text-input--border-top-left-radius);border-bottom-left-radius:var(--ez-text-input--border-bottom-left-radius);border-top-right-radius:var(--ez-text-input--border-top-right-radius);border-bottom-right-radius:var(--ez-text-input--border-bottom-right-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);padding:var(--ez-text-input__input--padding);margin-bottom:var(--ez-text-input__margin-bottom)}input.no--margin{--ez-text-input__margin-bottom:0}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}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--left.hasError{padding-right:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.icon--right.hasError{padding-right:calc(var(--ez-text-input__icon--width) + var(--ez-text-input__tooltip-icon--spacing))}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color);padding-right:calc(var(--ez-text-input__tooltip-icon---width) + (2*var(--ez-text-input__tooltip-icon---horizontal-margin)))}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:disabled,input:read-only{cursor:not-allowed}.hasError{color:var(--ez-text-input__tooltip_icon--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.hasError{width:calc(100% - 2*(var(--ez-text-input__tooltip-icon--spacing)))}.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);cursor:not-allowed}.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--left.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.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--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder,.input--slim:-moz-placeholder,.input--slim::-moz-placeholder,.input--slim:-ms-input-placeholder,.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__placeholder--color)}.input--slim:disabled::-webkit-input-placeholder,.input--slim:disabled:-moz-placeholder,.input--slim:disabled::-moz-placeholder,.input--slim:disabled:-ms-input-placeholder,.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}ez-icon.tooltip-icon{position:absolute;display:flex;align-items:center;justify-content:center;overflow:hidden;width:var(--ez-text-input__tooltip-icon---width);height:22px;margin:var(--ez-text-input__tooltip-icon---vertical-margin) var(--ez-text-input__tooltip-icon---horizontal-margin);top:0;right:0;z-index:var(--elevation--4);border-radius:var(--ez-text-input--border-radius)}ez-icon.tooltip-icon.rightIconSlot{right:var(--ez-text-input__tooltip-icon--spacing)}ez-icon.tooltip-icon.hasError{--ez-icon--color:var(--ez-text-input__tooltip_icon--error--color)}";
|
|
78600
79384
|
|
|
78601
79385
|
const EzTextInput$1 = class extends HTMLElement$1 {
|
|
78602
79386
|
constructor() {
|
|
@@ -78608,6 +79392,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
78608
79392
|
this.value = undefined;
|
|
78609
79393
|
this.enabled = true;
|
|
78610
79394
|
this.errorMessage = undefined;
|
|
79395
|
+
this.hasInvalid = false;
|
|
78611
79396
|
this.mask = undefined;
|
|
78612
79397
|
this.cleanValueMask = false;
|
|
78613
79398
|
this.canShowError = true;
|
|
@@ -78618,17 +79403,26 @@ const EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
78618
79403
|
this.autoFocus = false;
|
|
78619
79404
|
this.hasRightSlotContent = false;
|
|
78620
79405
|
}
|
|
79406
|
+
observeHasInvalid() {
|
|
79407
|
+
if (!this._inputElem)
|
|
79408
|
+
return;
|
|
79409
|
+
if (this.hasInvalid) {
|
|
79410
|
+
this._inputElem.classList.add("hasError");
|
|
79411
|
+
}
|
|
79412
|
+
else {
|
|
79413
|
+
this._inputElem.classList.remove("hasError");
|
|
79414
|
+
}
|
|
79415
|
+
}
|
|
78621
79416
|
observeErrorMessage() {
|
|
78622
79417
|
if (this._inputElem) {
|
|
78623
79418
|
this.isInvalid().then((hasError) => {
|
|
78624
|
-
var _a;
|
|
78625
79419
|
if (hasError) {
|
|
78626
79420
|
this._inputElem.classList.add("hasError");
|
|
78627
|
-
|
|
79421
|
+
// this._tooltipPositioningObserver?.observe(this._inputElem);
|
|
78628
79422
|
}
|
|
78629
79423
|
else {
|
|
78630
79424
|
this._inputElem.classList.remove("hasError");
|
|
78631
|
-
this.removeGlobalTooltip();
|
|
79425
|
+
// this.removeGlobalTooltip();
|
|
78632
79426
|
}
|
|
78633
79427
|
});
|
|
78634
79428
|
}
|
|
@@ -78836,35 +79630,8 @@ const EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
78836
79630
|
}
|
|
78837
79631
|
this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)");
|
|
78838
79632
|
}
|
|
78839
|
-
|
|
78840
|
-
|
|
78841
|
-
tooltip.errorMessage = this.errorMessage;
|
|
78842
|
-
tooltip.anchoringElement = this._tooltipIconElem;
|
|
78843
|
-
document.body.appendChild(tooltip);
|
|
78844
|
-
this._tooltipElem = tooltip;
|
|
78845
|
-
}
|
|
78846
|
-
removeGlobalTooltip() {
|
|
78847
|
-
var _a;
|
|
78848
|
-
if (!this._tooltipElem)
|
|
78849
|
-
return;
|
|
78850
|
-
this._tooltipElem.remove();
|
|
78851
|
-
this._tooltipElem = undefined;
|
|
78852
|
-
(_a = this._tooltipPositioningObserver) === null || _a === void 0 ? void 0 : _a.unobserve(this._inputElem);
|
|
78853
|
-
}
|
|
78854
|
-
createTooltipPositioningObserver() {
|
|
78855
|
-
const observer = new ResizeObserver(() => {
|
|
78856
|
-
if (!this._tooltipElem)
|
|
78857
|
-
return;
|
|
78858
|
-
if (!this._tooltipIconElem)
|
|
78859
|
-
return;
|
|
78860
|
-
clearTimeout(this._observerDebounceTimeout);
|
|
78861
|
-
this._observerDebounceTimeout = setTimeout(async () => {
|
|
78862
|
-
if (this._tooltipElem) {
|
|
78863
|
-
await this._tooltipElem.positionTooltip();
|
|
78864
|
-
}
|
|
78865
|
-
}, 200);
|
|
78866
|
-
});
|
|
78867
|
-
this._tooltipPositioningObserver = observer;
|
|
79633
|
+
getValue() {
|
|
79634
|
+
return this.mask && this.cleanValueMask ? this.applyMask(this.value) : this.value;
|
|
78868
79635
|
}
|
|
78869
79636
|
//---------------------------------------------
|
|
78870
79637
|
// Lifecycle web component
|
|
@@ -78892,7 +79659,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
78892
79659
|
}
|
|
78893
79660
|
}
|
|
78894
79661
|
componentDidLoad() {
|
|
78895
|
-
var _a
|
|
79662
|
+
var _a;
|
|
78896
79663
|
this.observeErrorMessage();
|
|
78897
79664
|
this.observeMask();
|
|
78898
79665
|
this.adjustFloatingLabel();
|
|
@@ -78906,40 +79673,17 @@ const EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
78906
79673
|
var _a;
|
|
78907
79674
|
this._inputElem.setSelectionRange(0, (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value.length);
|
|
78908
79675
|
});
|
|
78909
|
-
this.createTooltipPositioningObserver();
|
|
78910
|
-
if (this._inputElem) {
|
|
78911
|
-
(_b = this._tooltipPositioningObserver) === null || _b === void 0 ? void 0 : _b.observe(this._inputElem);
|
|
78912
|
-
applyEllipsisToInput(this._inputElem);
|
|
78913
|
-
}
|
|
78914
|
-
}
|
|
78915
|
-
componentDidRender() {
|
|
78916
|
-
if (this._tooltipIconElem && !this._tooltipElem) {
|
|
78917
|
-
this.renderGlobalTooltip();
|
|
78918
|
-
}
|
|
78919
|
-
}
|
|
78920
|
-
componentDidUpdate() {
|
|
78921
|
-
if (this._tooltipIconElem && this._tooltipElem) {
|
|
78922
|
-
this._tooltipElem.positionTooltip();
|
|
78923
|
-
}
|
|
78924
|
-
}
|
|
78925
|
-
disconnectedCallback() {
|
|
78926
|
-
if (this._tooltipPositioningObserver) {
|
|
78927
|
-
this._tooltipPositioningObserver.disconnect();
|
|
78928
|
-
}
|
|
78929
|
-
if (this._observerDebounceTimeout) {
|
|
78930
|
-
clearTimeout(this._observerDebounceTimeout);
|
|
78931
|
-
}
|
|
78932
|
-
this.removeGlobalTooltip();
|
|
78933
79676
|
}
|
|
78934
79677
|
render() {
|
|
78935
79678
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
78936
79679
|
return (h(Host, { style: this._hostElement.classList.contains("grid_editor") ? { "height": "100%" } : null }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
78937
79680
|
h("label", { ref: (el) => this._labelElem = el, class: `${this.enabled ? "input__label" : "input__label input__label--disabled"} ${this.errorMessage ? "hasError" : ""}`, onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
78938
|
-
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: `${this.mode === "slim" ? "input--slim" : ""}`, placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.
|
|
78939
|
-
h("ez-icon", { class: `tooltip-icon ${this.errorMessage ? "hasError" : ""} ${this.hasRightSlotContent ? "rightIconSlot" : ""}`, "data-element-id": ElementIDUtils.getInternalIDInfo("tooltip-icon"), ref: (el) => this._tooltipIconElem = el, iconName: "alert-circle" }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }, " ")));
|
|
79681
|
+
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: `${this.mode === "slim" ? "input--slim" : ""}`, placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.getValue(), disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("ez-tooltip", { anchoringElement: this._hostElement, message: this.getValue(), minWidth: 30 }), this.canShowError && this.mode != "slim" && this.errorMessage &&
|
|
79682
|
+
h("ez-tooltip", { type: "error", message: this.errorMessage }, h("ez-icon", { class: `tooltip-icon ${this.errorMessage ? "hasError" : ""} ${this.hasRightSlotContent ? "rightIconSlot" : ""}`, "data-element-id": ElementIDUtils.getInternalIDInfo("tooltip-icon"), ref: (el) => this._tooltipIconElem = el, iconName: "alert-circle" })), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }, " ")));
|
|
78940
79683
|
}
|
|
78941
79684
|
get _hostElement() { return this; }
|
|
78942
79685
|
static get watchers() { return {
|
|
79686
|
+
"hasInvalid": ["observeHasInvalid"],
|
|
78943
79687
|
"errorMessage": ["observeErrorMessage"],
|
|
78944
79688
|
"mask": ["observeMask"],
|
|
78945
79689
|
"value": ["observeValue"]
|
|
@@ -79209,52 +79953,126 @@ const EzToast$1 = class extends HTMLElement$1 {
|
|
|
79209
79953
|
static get style() { return ezToastCss; }
|
|
79210
79954
|
};
|
|
79211
79955
|
|
|
79212
|
-
const ezTooltipCss = ":host{position:absolute;z-index:var(--elevation--24);
|
|
79956
|
+
const ezTooltipCss = ":host{--triangle-size:8px}.tooltip{position:absolute;z-index:var(--elevation--24);padding:var(--space--extra-small, 3px) var(--space--small, 6px);border-radius:var(--border--radius-small);box-sizing:border-box;font-family:var(--font-pattern\t, 'Roboto', sans-serif);font-size:var(--text--small, 12px);font-weight:var(--text-weight--medium, 400);text-align:center;display:none}.arrow{position:absolute;width:var(--triangle-size);height:var(--triangle-size);transform:rotate(45deg)}.default-tooltip{background:var(--title--primary, #2b3a54);color:var(--color--inverted)}.default-tooltip .arrow{background:var(--title--primary, #2b3a54)}.error-tooltip{background:var(--color-alert--error-800, #BD0025);color:var(--color--error-200, #F7E0E5)}.error-tooltip .arrow{background:var(--color-alert--error-800, #BD0025)}.success-tooltip{background:var(--color--success, #00cb94);color:var(--color--success-200, #EBFFFA)}.success-tooltip .arrow{background:var(--color--success, #00cb94)}.warning-tooltip{background:var(--color--warning, #f2d410);color:var(--color--warning-200, #FDF8D8)}.warning-tooltip .arrow{background:var(--color--warning, #f2d410)}";
|
|
79213
79957
|
|
|
79214
79958
|
const EzTooltip$1 = class extends HTMLElement$1 {
|
|
79215
79959
|
constructor() {
|
|
79216
79960
|
super();
|
|
79217
79961
|
this.__registerHost();
|
|
79218
79962
|
this.__attachShadow();
|
|
79219
|
-
this.
|
|
79963
|
+
this._opened = false;
|
|
79964
|
+
this.message = undefined;
|
|
79220
79965
|
this.anchoringElement = undefined;
|
|
79966
|
+
this.placement = 'bottom';
|
|
79967
|
+
this.gapOptions = { horizontalGap: 0, verticalGap: 0 };
|
|
79968
|
+
this.type = 'default';
|
|
79969
|
+
this.debouncingTime = 500;
|
|
79970
|
+
this.active = true;
|
|
79971
|
+
this.minWidth = 150;
|
|
79221
79972
|
}
|
|
79222
|
-
|
|
79223
|
-
|
|
79224
|
-
|
|
79225
|
-
|
|
79226
|
-
|
|
79227
|
-
* Reposiciona o tooltip de acordo com a posição do elemento de ancoragem.
|
|
79228
|
-
*/
|
|
79229
|
-
async positionTooltip() {
|
|
79230
|
-
const anchorRect = this.anchoringElement.getBoundingClientRect();
|
|
79231
|
-
const top = (anchorRect.bottom + window.scrollY);
|
|
79232
|
-
const left = (anchorRect.left + window.scrollX);
|
|
79233
|
-
this._element.style.top = `${top}px`;
|
|
79234
|
-
this._element.style.left = `${left}px`;
|
|
79973
|
+
watchAnchoringElement(newValue, oldValue) {
|
|
79974
|
+
if (newValue) {
|
|
79975
|
+
this.setEvents(newValue);
|
|
79976
|
+
this.removeEvents(oldValue);
|
|
79977
|
+
}
|
|
79235
79978
|
}
|
|
79236
|
-
|
|
79237
|
-
|
|
79238
|
-
this.
|
|
79239
|
-
|
|
79240
|
-
|
|
79241
|
-
|
|
79242
|
-
|
|
79243
|
-
|
|
79244
|
-
|
|
79979
|
+
watchMessage(newValue) {
|
|
79980
|
+
if (!newValue) {
|
|
79981
|
+
this.closeTooltip();
|
|
79982
|
+
return;
|
|
79983
|
+
}
|
|
79984
|
+
this.updatePosition();
|
|
79985
|
+
}
|
|
79986
|
+
openTooltip() {
|
|
79987
|
+
if (this.message && this.active) {
|
|
79988
|
+
if (this._debouncingTimeout) {
|
|
79989
|
+
clearTimeout(this._debouncingTimeout);
|
|
79990
|
+
}
|
|
79991
|
+
this._debouncingTimeout = setTimeout(() => {
|
|
79992
|
+
this._opened = true;
|
|
79993
|
+
this._tooltipElement.style.display = 'block';
|
|
79994
|
+
this.updatePosition();
|
|
79995
|
+
}, this.debouncingTime);
|
|
79996
|
+
}
|
|
79997
|
+
}
|
|
79998
|
+
closeTooltip() {
|
|
79999
|
+
clearTimeout(this._debouncingTimeout);
|
|
80000
|
+
this._tooltipElement.style.display = 'none';
|
|
80001
|
+
this._opened = false;
|
|
80002
|
+
}
|
|
80003
|
+
async updatePosition(element = this.anchoringElement) {
|
|
80004
|
+
if (!element || !this._opened) {
|
|
80005
|
+
return;
|
|
80006
|
+
}
|
|
80007
|
+
await computePosition(element, this._tooltipElement, {
|
|
80008
|
+
placement: this.placement,
|
|
80009
|
+
middleware: [
|
|
80010
|
+
offset(5),
|
|
80011
|
+
flip(),
|
|
80012
|
+
shift(),
|
|
80013
|
+
arrow({ element: this._arrowElement })
|
|
80014
|
+
],
|
|
80015
|
+
}).then(({ x, y, placement, middlewareData }) => {
|
|
80016
|
+
const newTop = placement.includes("bottom") ? y + this.gapOptions.verticalGap : y - this.gapOptions.verticalGap;
|
|
80017
|
+
const newLeft = placement.includes("start") ? x + this.gapOptions.horizontalGap : x - this.gapOptions.horizontalGap;
|
|
80018
|
+
Object.assign(this._tooltipElement.style, {
|
|
80019
|
+
top: `${newTop}px`,
|
|
80020
|
+
left: `${newLeft}px`,
|
|
80021
|
+
});
|
|
80022
|
+
if (middlewareData.arrow) {
|
|
80023
|
+
const { x } = middlewareData.arrow;
|
|
80024
|
+
const onBottom = placement.includes("bottom");
|
|
80025
|
+
Object.assign(this._arrowElement.style, {
|
|
80026
|
+
left: `${x}px`,
|
|
80027
|
+
top: onBottom ? `${-this._arrowElement.offsetHeight / 2}px` : '',
|
|
80028
|
+
bottom: !onBottom ? `${-this._arrowElement.offsetHeight / 2}px` : '',
|
|
80029
|
+
});
|
|
80030
|
+
}
|
|
79245
80031
|
});
|
|
79246
|
-
|
|
79247
|
-
|
|
80032
|
+
}
|
|
80033
|
+
handleSlotChange(ev) {
|
|
80034
|
+
const slot = ev.target;
|
|
80035
|
+
const content = slot.assignedElements()[0];
|
|
80036
|
+
this.anchoringElement = content;
|
|
80037
|
+
}
|
|
80038
|
+
setEvents(element = this.anchoringElement) {
|
|
80039
|
+
if (!element) {
|
|
80040
|
+
return;
|
|
80041
|
+
}
|
|
80042
|
+
element.addEventListener('mouseenter', () => {
|
|
80043
|
+
this.openTooltip();
|
|
80044
|
+
});
|
|
80045
|
+
element.addEventListener('mouseleave', () => {
|
|
80046
|
+
this.closeTooltip();
|
|
80047
|
+
});
|
|
80048
|
+
}
|
|
80049
|
+
removeEvents(element = this.anchoringElement) {
|
|
80050
|
+
if (!element) {
|
|
80051
|
+
return;
|
|
80052
|
+
}
|
|
80053
|
+
element.removeEventListener('mouseenter', () => {
|
|
80054
|
+
this.openTooltip();
|
|
80055
|
+
});
|
|
80056
|
+
element.removeEventListener('mouseleave', () => {
|
|
80057
|
+
this.closeTooltip();
|
|
79248
80058
|
});
|
|
79249
80059
|
}
|
|
79250
80060
|
componentDidLoad() {
|
|
79251
|
-
this.positionTooltip();
|
|
79252
80061
|
this.setEvents();
|
|
79253
80062
|
}
|
|
79254
80063
|
render() {
|
|
79255
|
-
return (h("div", {
|
|
80064
|
+
return (h(Fragment, null, h("div", Object.assign({ ref: ref => this._tooltipElement = ref }, { inert: true }, { class: {
|
|
80065
|
+
"tooltip": true,
|
|
80066
|
+
[`${this.type}-tooltip`]: true,
|
|
80067
|
+
}, style: {
|
|
80068
|
+
minWidth: `${this.minWidth}px`
|
|
80069
|
+
}, role: "tooltip", "data-element-id": ElementIDUtils.getInternalIDInfo("tooltip") }), this.message, h("div", { ref: ref => this._arrowElement = ref, class: "arrow" })), h("slot", { onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
|
|
79256
80070
|
}
|
|
79257
80071
|
get _element() { return this; }
|
|
80072
|
+
static get watchers() { return {
|
|
80073
|
+
"anchoringElement": ["watchAnchoringElement"],
|
|
80074
|
+
"message": ["watchMessage"]
|
|
80075
|
+
}; }
|
|
79258
80076
|
static get style() { return ezTooltipCss; }
|
|
79259
80077
|
};
|
|
79260
80078
|
|
|
@@ -80542,7 +81360,7 @@ const EzChart = /*@__PURE__*/proxyCustomElement(EzChart$1, [1,"ez-chart",{"type"
|
|
|
80542
81360
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
80543
81361
|
const EzChip = /*@__PURE__*/proxyCustomElement(EzChip$1, [1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"]}]);
|
|
80544
81362
|
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32]}]);
|
|
80545
|
-
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"autoFocus":[4,"auto-focus"],"isOpen":[32],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]
|
|
81363
|
+
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"autoFocus":[4,"auto-focus"],"isOpen":[32],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]}]);
|
|
80546
81364
|
const EzComboBoxList = /*@__PURE__*/proxyCustomElement(EzComboBoxList$1, [1,"ez-combo-box-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"],"maxWidth":[2,"max-width"],"width":[2],"onOptionSelect":[16],"onOptionHover":[16]},[[0,"keydown","handleKeyDown"]]]);
|
|
80547
81365
|
const EzCustomFormInput = /*@__PURE__*/proxyCustomElement(EzCustomFormInput$1, [2,"ez-custom-form-input",{"customEditor":[16],"formViewField":[16],"value":[1032],"detailContext":[1,"detail-context"],"builderFallback":[16],"selectedRecord":[16],"gui":[32]}]);
|
|
80548
81366
|
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"]}]);
|
|
@@ -80552,8 +81370,8 @@ const EzDoubleList = /*@__PURE__*/proxyCustomElement(EzDoubleList$1, [2,"ez-doub
|
|
|
80552
81370
|
const EzDropdown = /*@__PURE__*/proxyCustomElement(EzDropdown$1, [1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]]);
|
|
80553
81371
|
const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]);
|
|
80554
81372
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"]}]);
|
|
80555
|
-
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"_fieldsProps":[32]}]);
|
|
80556
|
-
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16],"selectedRecord":[16],"_customEditors":[32]}]);
|
|
81373
|
+
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"_fieldsProps":[32],"_singleColumn":[32]}]);
|
|
81374
|
+
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16],"selectedRecord":[16],"singleColumn":[4,"single-column"],"_customEditors":[32]}]);
|
|
80557
81375
|
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"suppressCheckboxColumn":[4,"suppress-checkbox-column"],"outlineMode":[4,"outline-mode"],"enableRowTableStriped":[4,"enable-row-table-striped"],"compact":[4],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32]},[[0,"ezSelectionChange","onSelectionChange"],[2,"click","handleClick"]]]);
|
|
80558
81376
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
80559
81377
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
@@ -80570,6 +81388,8 @@ const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size"
|
|
|
80570
81388
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
80571
81389
|
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
80572
81390
|
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"contextProperties":[8,"context-properties"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"autoFocus":[4,"auto-focus"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_showLoadingDescription":[32],"_criteria":[32]}]);
|
|
81391
|
+
const EzSearchPlus = /*@__PURE__*/proxyCustomElement(EzSearchPlus$1, [1,"ez-search-plus",{"value":[1544],"enabled":[1540],"disableCodeInput":[1540,"disable-code-input"],"disableDescriptionInput":[1540,"disable-description-input"],"label":[1537],"codLabel":[1537,"cod-label"],"hideDescriptionInput":[1540,"hide-description-input"],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"mode":[513],"contextProperties":[8,"context-properties"],"optionLoader":[16],"showOptionValue":[4,"show-option-value"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"autoFocus":[4,"auto-focus"],"showSelectedValue":[4,"show-selected-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"suppressSearch":[4,"suppress-search"],"suppressPreLoad":[4,"suppress-pre-load"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"descriptionValue":[32],"codeValue":[32],"isLoadingDescription":[32],"searchDescriptionIsOpen":[32],"visibleOptions":[32],"showLoading":[32]}]);
|
|
81392
|
+
const EzSearchResultList = /*@__PURE__*/proxyCustomElement(EzSearchResultList$1, [1,"ez-search-result-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"value":[1],"showOptionValue":[4,"show-option-value"],"_preSelection":[32]}]);
|
|
80573
81393
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
80574
81394
|
const EzSidebarNavigator = /*@__PURE__*/proxyCustomElement(EzSidebarNavigator$1, [1,"ez-sidebar-navigator",{"type":[1],"mode":[1025],"size":[1],"isResponsive":[4,"is-responsive"],"titleMenu":[1,"title-menu"],"showCollapseMenu":[4,"show-collapse-menu"],"showFixedButton":[4,"show-fixed-button"],"open":[32]}]);
|
|
80575
81395
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
@@ -80579,10 +81399,10 @@ const EzSplitPanel = /*@__PURE__*/proxyCustomElement(SplitPanel, [0,"ez-split-pa
|
|
|
80579
81399
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
80580
81400
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"],"autoRows":[516,"auto-rows"],"autoFocus":[4,"auto-focus"]}]);
|
|
80581
81401
|
const EzTextEdit = /*@__PURE__*/proxyCustomElement(EzTextEdit$1, [1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32]}]);
|
|
80582
|
-
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"cleanValueMask":[4,"clean-value-mask"],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4],"autoFocus":[4,"auto-focus"],"hasRightSlotContent":[32]}]);
|
|
81402
|
+
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"hasInvalid":[1540,"has-invalid"],"mask":[1],"cleanValueMask":[4,"clean-value-mask"],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4],"autoFocus":[4,"auto-focus"],"hasRightSlotContent":[32]}]);
|
|
80583
81403
|
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],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"]}]);
|
|
80584
81404
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"]}]);
|
|
80585
|
-
const EzTooltip = /*@__PURE__*/proxyCustomElement(EzTooltip$1, [1,"ez-tooltip",{"
|
|
81405
|
+
const EzTooltip = /*@__PURE__*/proxyCustomElement(EzTooltip$1, [1,"ez-tooltip",{"message":[1],"anchoringElement":[16],"placement":[1],"gapOptions":[16],"type":[1],"debouncingTime":[2,"debouncing-time"],"active":[4],"minWidth":[2,"min-width"]}]);
|
|
80586
81406
|
const EzTree = /*@__PURE__*/proxyCustomElement(EzTree$1, [1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32]},[[2,"keydown","onKeyDownListener"]]]);
|
|
80587
81407
|
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"subtitle":[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]}]);
|
|
80588
81408
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
@@ -80633,6 +81453,8 @@ const defineCustomElements = (opts) => {
|
|
|
80633
81453
|
EzRadioButton,
|
|
80634
81454
|
EzScroller,
|
|
80635
81455
|
EzSearch,
|
|
81456
|
+
EzSearchPlus,
|
|
81457
|
+
EzSearchResultList,
|
|
80636
81458
|
EzSidebarButton,
|
|
80637
81459
|
EzSidebarNavigator,
|
|
80638
81460
|
EzSkeleton,
|
|
@@ -80660,4 +81482,4 @@ const defineCustomElements = (opts) => {
|
|
|
80660
81482
|
}
|
|
80661
81483
|
};
|
|
80662
81484
|
|
|
80663
|
-
export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzChart, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzComboBoxList, EzCustomFormInput, EzDateInput, EzDateTimeInput, EzDialog, EzDoubleList, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopoverCore, EzPopoverPlus, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSidebarNavigator, EzSkeleton, EzSplitButton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTooltip, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, SearchList, defineCustomElements };
|
|
81485
|
+
export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzChart, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzComboBoxList, EzCustomFormInput, EzDateInput, EzDateTimeInput, EzDialog, EzDoubleList, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopoverCore, EzPopoverPlus, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSearchPlus, EzSearchResultList, EzSidebarButton, EzSidebarNavigator, EzSkeleton, EzSplitButton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTooltip, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, SearchList, defineCustomElements };
|