@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-76625.0 → 0.0.0-bugfix-dev-KB-83282.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-card-item_2.cjs.entry.js +7 -1415
- package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +387 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +58 -184
- package/dist/cjs/ez-grid.cjs.entry.js +58 -0
- package/dist/cjs/ez-popover-core_2.cjs.entry.js +1504 -0
- package/dist/cjs/ez-search.cjs.entry.js +158 -28
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +6 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ez-card-item/ez-card-item.css +3 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css +205 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +426 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -250
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +61 -194
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +3 -0
- package/dist/collection/components/ez-grid/ez-grid.js +56 -1
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +27 -33
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +2 -2
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +18 -77
- package/dist/collection/components/ez-search/ez-search.css +219 -0
- package/dist/collection/components/ez-search/ez-search.js +167 -28
- package/dist/custom-elements/index.d.ts +6 -6
- package/dist/custom-elements/index.js +468 -359
- package/dist/esm/ez-card-item_2.entry.js +7 -1415
- package/dist/esm/ez-combo-box-list_3.entry.js +381 -0
- package/dist/esm/ez-combo-box.entry.js +59 -185
- package/dist/esm/ez-grid.entry.js +59 -1
- package/dist/esm/ez-popover-core_2.entry.js +1499 -0
- package/dist/esm/ez-search.entry.js +159 -29
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-3a009184.entry.js +1 -0
- package/dist/ezui/{p-a5950a0d.entry.js → p-53116373.entry.js} +46 -46
- package/dist/ezui/p-58783dcf.entry.js +1 -0
- package/dist/ezui/p-65f471bc.entry.js +1 -0
- package/dist/ezui/p-7bd15498.entry.js +1 -0
- package/dist/ezui/p-f5931caa.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +104 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +7 -16
- package/dist/types/components/ez-grid/ez-grid.d.ts +5 -0
- package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +4 -5
- package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +2 -12
- package/dist/types/components/ez-search/ez-search.d.ts +13 -3
- package/dist/types/components.d.ts +127 -66
- package/package.json +1 -1
- package/react/components.d.ts +1 -1
- package/react/components.js +1 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +0 -236
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +0 -184
- package/dist/cjs/searchFormatters-b7e1ed1e.js +0 -23
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css +0 -227
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js +0 -289
- package/dist/collection/components/ez-search/utils/searchFormatters.js +0 -18
- package/dist/esm/ez-custom-form-input_2.entry.js +0 -231
- package/dist/esm/ez-popover-plus_3.entry.js +0 -178
- package/dist/esm/searchFormatters-8229207e.js +0 -20
- package/dist/ezui/p-31da1b57.entry.js +0 -1
- package/dist/ezui/p-37201156.entry.js +0 -1
- package/dist/ezui/p-40a60148.js +0 -1
- package/dist/ezui/p-64b461b3.entry.js +0 -1
- package/dist/ezui/p-b7706b43.entry.js +0 -1
- package/dist/ezui/p-dc8b36c3.entry.js +0 -1
- package/dist/types/components/ez-search/subcomponent/search-list/search-list.d.ts +0 -23
- package/dist/types/components/ez-search/utils/searchFormatters.d.ts +0 -2
|
@@ -2084,7 +2084,7 @@ const EzCalendar$1 = class extends HTMLElement$1 {
|
|
|
2084
2084
|
static get style() { return ezCalendarCss; }
|
|
2085
2085
|
};
|
|
2086
2086
|
|
|
2087
|
-
const ezCardItemCss = ":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: var(--opacity--soft);\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--
|
|
2087
|
+
const ezCardItemCss = ":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: var(--opacity--soft);\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--medium);\n padding-bottom: 0px;\n padding-right: 0px;\n}\n\n.card-item__detail-label-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__detail-value-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__title-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__details-container__left-compacted{\n width: 100%;\n}\n\n.card-item__details-container__right-compacted {\n width: 100%;\n}\n\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";
|
|
2088
2088
|
|
|
2089
2089
|
const EzCardItem$1 = class extends HTMLElement$1 {
|
|
2090
2090
|
constructor() {
|
|
@@ -2891,7 +2891,7 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
2891
2891
|
static get style() { return ezCollapsibleBoxCss; }
|
|
2892
2892
|
};
|
|
2893
2893
|
|
|
2894
|
-
const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-
|
|
2894
|
+
const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
2895
2895
|
|
|
2896
2896
|
const EzComboBox$1 = class extends HTMLElement$1 {
|
|
2897
2897
|
constructor() {
|
|
@@ -2905,11 +2905,13 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2905
2905
|
this._tabPressed = false;
|
|
2906
2906
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
2907
2907
|
this._lookupMode = false;
|
|
2908
|
+
this.isOpen = false;
|
|
2908
2909
|
this._preSelection = undefined;
|
|
2909
2910
|
this._visibleOptions = undefined;
|
|
2910
2911
|
this._startLoading = false;
|
|
2911
2912
|
this._showLoading = true;
|
|
2912
2913
|
this._criteria = undefined;
|
|
2914
|
+
this._textInputReady = undefined;
|
|
2913
2915
|
this.limitCharsToSearch = 3;
|
|
2914
2916
|
this.value = undefined;
|
|
2915
2917
|
this.label = undefined;
|
|
@@ -3015,63 +3017,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3015
3017
|
async clearValue() {
|
|
3016
3018
|
this.clearSearch();
|
|
3017
3019
|
}
|
|
3018
|
-
scrollListener() {
|
|
3019
|
-
var _a;
|
|
3020
|
-
if (this._floatingID == undefined) {
|
|
3021
|
-
return;
|
|
3022
|
-
}
|
|
3023
|
-
if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
|
|
3024
|
-
this.hideOptions();
|
|
3025
|
-
}
|
|
3026
|
-
else {
|
|
3027
|
-
window.requestAnimationFrame(() => {
|
|
3028
|
-
this.updateListPosition();
|
|
3029
|
-
});
|
|
3030
|
-
}
|
|
3031
|
-
}
|
|
3032
|
-
updateListPosition() {
|
|
3033
|
-
let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
|
|
3034
|
-
const elementRect = this._listWrapper.getBoundingClientRect();
|
|
3035
|
-
const containerRect = this._listContainer.getBoundingClientRect();
|
|
3036
|
-
const textInputRect = this._textInput.getBoundingClientRect();
|
|
3037
|
-
const limitHeight = bottomLimit || window.innerHeight;
|
|
3038
|
-
const neededHeight = containerRect.bottom + elementRect.height;
|
|
3039
|
-
if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
|
|
3040
|
-
fromBottom = true;
|
|
3041
|
-
}
|
|
3042
|
-
if (!hardPosition) {
|
|
3043
|
-
verticalPosition = verticalPosition || 0;
|
|
3044
|
-
horizontalPosition = horizontalPosition || 0;
|
|
3045
|
-
if (fromBottom) {
|
|
3046
|
-
verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
|
|
3047
|
-
}
|
|
3048
|
-
else {
|
|
3049
|
-
verticalPosition += containerRect.top;
|
|
3050
|
-
}
|
|
3051
|
-
if (fromRight) {
|
|
3052
|
-
horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
|
|
3053
|
-
}
|
|
3054
|
-
else {
|
|
3055
|
-
horizontalPosition += containerRect.left;
|
|
3056
|
-
}
|
|
3057
|
-
}
|
|
3058
|
-
if (verticalPosition != undefined) {
|
|
3059
|
-
this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
|
|
3060
|
-
this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
|
|
3061
|
-
}
|
|
3062
|
-
if (horizontalPosition != undefined) {
|
|
3063
|
-
this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
|
|
3064
|
-
this._listWrapper.style[fromRight ? "left" : "right"] = "";
|
|
3065
|
-
}
|
|
3066
|
-
}
|
|
3067
|
-
getListPosition() {
|
|
3068
|
-
if (this.listOptionsPosition) {
|
|
3069
|
-
return this.listOptionsPosition;
|
|
3070
|
-
}
|
|
3071
|
-
return {
|
|
3072
|
-
verticalPosition: 6
|
|
3073
|
-
};
|
|
3074
|
-
}
|
|
3075
3020
|
isDifferentValues(firstValue, secondValue) {
|
|
3076
3021
|
return ObjectUtils$1.objectToString(firstValue || {}) !== ObjectUtils$1.objectToString(secondValue || {});
|
|
3077
3022
|
}
|
|
@@ -3144,85 +3089,24 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3144
3089
|
}
|
|
3145
3090
|
return 0;
|
|
3146
3091
|
}
|
|
3147
|
-
buildItem(opt, index) {
|
|
3148
|
-
const widthValue = this.showOptionValue && this._maxWidthValue > 0 ? `${this._maxWidthValue}px` : '';
|
|
3149
|
-
opt.label = opt.label || opt.value;
|
|
3150
|
-
return h("li", { class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection = index }, this.showOptionValue
|
|
3151
|
-
? h("span", { class: "item__value", title: opt.value, style: { width: widthValue, minWidth: widthValue, maxWidth: widthValue } }, opt.value)
|
|
3152
|
-
: undefined, h("span", { class: "item__label " + (this.showOptionValue ? "item__label--bold" : ""), title: opt.label }, opt.label));
|
|
3153
|
-
}
|
|
3154
3092
|
showOptions() {
|
|
3155
3093
|
var _a, _b;
|
|
3156
3094
|
if (!this.enabled)
|
|
3157
3095
|
return;
|
|
3158
|
-
|
|
3159
|
-
return;
|
|
3160
|
-
}
|
|
3096
|
+
this.openPopover();
|
|
3161
3097
|
const valueString = (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.value;
|
|
3162
3098
|
const indexValue = this._visibleOptions.findIndex(option => option.value === valueString);
|
|
3163
3099
|
this._preSelection = indexValue === -1 ? 0 : indexValue;
|
|
3164
3100
|
if (!!this._resizeObserver)
|
|
3165
3101
|
this._resizeObserver.observe(this._textInput);
|
|
3166
|
-
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true, backClickListener: () => this.hideOptions() });
|
|
3167
3102
|
this.setFocus();
|
|
3168
|
-
window.requestAnimationFrame(() => {
|
|
3169
|
-
this.updateListPosition();
|
|
3170
|
-
if (!this.listOptionsPosition) {
|
|
3171
|
-
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
3172
|
-
}
|
|
3173
|
-
});
|
|
3174
3103
|
}
|
|
3175
3104
|
hideOptions() {
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
}
|
|
3179
|
-
this._floatingID = undefined;
|
|
3105
|
+
var _a;
|
|
3106
|
+
(_a = this._popover) === null || _a === void 0 ? void 0 : _a.hide();
|
|
3180
3107
|
if (!!this._resizeObserver)
|
|
3181
3108
|
this._resizeObserver.unobserve(this._textInput);
|
|
3182
3109
|
}
|
|
3183
|
-
isOptionsVisible() {
|
|
3184
|
-
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
3185
|
-
}
|
|
3186
|
-
nextOption() {
|
|
3187
|
-
if (!this.isOptionsVisible()) {
|
|
3188
|
-
return;
|
|
3189
|
-
}
|
|
3190
|
-
this.showOptions();
|
|
3191
|
-
this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
|
|
3192
|
-
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
3193
|
-
}
|
|
3194
|
-
previousOption() {
|
|
3195
|
-
this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
3196
|
-
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
3197
|
-
}
|
|
3198
|
-
scrollToOption(opt) {
|
|
3199
|
-
window.requestAnimationFrame(() => {
|
|
3200
|
-
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
|
|
3201
|
-
if (liElem)
|
|
3202
|
-
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
3203
|
-
});
|
|
3204
|
-
}
|
|
3205
|
-
selectCurrentOption(focusOnInput = true) {
|
|
3206
|
-
if (this._preSelection !== undefined) {
|
|
3207
|
-
this.selectOption(this._visibleOptions[this._preSelection], focusOnInput);
|
|
3208
|
-
this._preSelection = undefined;
|
|
3209
|
-
}
|
|
3210
|
-
else {
|
|
3211
|
-
this.controlListWithOnlyOne(focusOnInput);
|
|
3212
|
-
}
|
|
3213
|
-
}
|
|
3214
|
-
controlListWithOnlyOne(focusOnInput = true) {
|
|
3215
|
-
var _a;
|
|
3216
|
-
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
3217
|
-
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
3218
|
-
let title = StringUtils$1.decodeHtmlEntities(source[0].label);
|
|
3219
|
-
const option = {
|
|
3220
|
-
value: source[0].value,
|
|
3221
|
-
label: title,
|
|
3222
|
-
};
|
|
3223
|
-
this.selectOption(option, focusOnInput);
|
|
3224
|
-
}
|
|
3225
|
-
}
|
|
3226
3110
|
updateSource(source) {
|
|
3227
3111
|
this._startLoading = false;
|
|
3228
3112
|
if (source instanceof Promise) {
|
|
@@ -3248,12 +3132,13 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3248
3132
|
}
|
|
3249
3133
|
}
|
|
3250
3134
|
selectOption(newOption, focusOnInput = true) {
|
|
3251
|
-
var _a, _b;
|
|
3135
|
+
var _a, _b, _c;
|
|
3252
3136
|
const currentValue = this.getSelectedOption(this.value);
|
|
3253
3137
|
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
3254
3138
|
|| (currentValue == undefined && newOption != undefined && "value" in newOption)) {
|
|
3255
3139
|
const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
|
|
3256
3140
|
this.value = adjustedOpt;
|
|
3141
|
+
(_c = this._popover) === null || _c === void 0 ? void 0 : _c.hide();
|
|
3257
3142
|
}
|
|
3258
3143
|
else {
|
|
3259
3144
|
this.resetOptions();
|
|
@@ -3306,6 +3191,11 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3306
3191
|
//---------------------------------------------
|
|
3307
3192
|
// Lifecycle web component
|
|
3308
3193
|
//---------------------------------------------
|
|
3194
|
+
componentDidRender() {
|
|
3195
|
+
if (this._textInput) {
|
|
3196
|
+
this._textInputReady = true;
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3309
3199
|
componentWillLoad() {
|
|
3310
3200
|
if (this.options === undefined) {
|
|
3311
3201
|
this.options = [];
|
|
@@ -3324,15 +3214,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3324
3214
|
}
|
|
3325
3215
|
this.loadOptions(SearchMode$1.PRELOAD);
|
|
3326
3216
|
}
|
|
3327
|
-
componentDidRender() {
|
|
3328
|
-
var _a;
|
|
3329
|
-
if (this._floatingID === undefined) {
|
|
3330
|
-
this._listWrapper.remove();
|
|
3331
|
-
}
|
|
3332
|
-
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
3333
|
-
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
3334
|
-
});
|
|
3335
|
-
}
|
|
3336
3217
|
componentDidLoad() {
|
|
3337
3218
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
3338
3219
|
this.setInputValue(false);
|
|
@@ -3340,10 +3221,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3340
3221
|
window.requestAnimationFrame(() => {
|
|
3341
3222
|
if (!Array.isArray(entries) || !entries.length)
|
|
3342
3223
|
return;
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3224
|
+
if (!this._textInput)
|
|
3225
|
+
return;
|
|
3226
|
+
if (!this._comboBoxList)
|
|
3227
|
+
return;
|
|
3228
|
+
const textInputWidth = this._textInput.clientWidth;
|
|
3229
|
+
this._comboBoxList.width = textInputWidth;
|
|
3347
3230
|
});
|
|
3348
3231
|
});
|
|
3349
3232
|
if (this.autoFocus) {
|
|
@@ -3352,6 +3235,13 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3352
3235
|
});
|
|
3353
3236
|
}
|
|
3354
3237
|
}
|
|
3238
|
+
disconnectedCallback() {
|
|
3239
|
+
var _a;
|
|
3240
|
+
(_a = this._popover) === null || _a === void 0 ? void 0 : _a.remove();
|
|
3241
|
+
if (this._resizeObserver) {
|
|
3242
|
+
this._resizeObserver.disconnect();
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3355
3245
|
//---------------------------------------------
|
|
3356
3246
|
// Event handlers
|
|
3357
3247
|
//---------------------------------------------
|
|
@@ -3391,65 +3281,48 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3391
3281
|
this.showOptions();
|
|
3392
3282
|
}
|
|
3393
3283
|
keyDownHandler(event) {
|
|
3394
|
-
|
|
3395
|
-
if (event.ctrlKey) {
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
//não é interessante deixar o evento propagar;
|
|
3401
|
-
event.stopPropagation();
|
|
3402
|
-
event.stopImmediatePropagation();
|
|
3403
|
-
event.preventDefault();
|
|
3404
|
-
}
|
|
3284
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3285
|
+
if (event.ctrlKey && (event.key === "f" || event.key === "F")) {
|
|
3286
|
+
this.loadOptions(SearchMode$1.ADVANCED);
|
|
3287
|
+
event.preventDefault();
|
|
3288
|
+
event.stopPropagation();
|
|
3289
|
+
return;
|
|
3405
3290
|
}
|
|
3406
3291
|
switch (event.key) {
|
|
3407
3292
|
case "ArrowDown":
|
|
3408
|
-
event.
|
|
3409
|
-
if (this.canShowListOptions())
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3293
|
+
event.preventDefault();
|
|
3294
|
+
if (this.canShowListOptions()) {
|
|
3295
|
+
this.showOptions();
|
|
3296
|
+
(_a = this._comboBoxList) === null || _a === void 0 ? void 0 : _a.nextOption();
|
|
3297
|
+
}
|
|
3413
3298
|
break;
|
|
3414
3299
|
case "ArrowUp":
|
|
3415
|
-
event.
|
|
3416
|
-
if (this.canShowListOptions())
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3300
|
+
event.preventDefault();
|
|
3301
|
+
if (this.canShowListOptions()) {
|
|
3302
|
+
this.showOptions();
|
|
3303
|
+
(_b = this._comboBoxList) === null || _b === void 0 ? void 0 : _b.previousOption();
|
|
3304
|
+
}
|
|
3420
3305
|
break;
|
|
3421
3306
|
case "Enter":
|
|
3422
|
-
this.
|
|
3423
|
-
|
|
3424
|
-
this.selectCurrentOption();
|
|
3307
|
+
if (this.isOpen) {
|
|
3308
|
+
event.preventDefault();
|
|
3309
|
+
(_c = this._comboBoxList) === null || _c === void 0 ? void 0 : _c.selectCurrentOption();
|
|
3425
3310
|
}
|
|
3426
3311
|
break;
|
|
3427
3312
|
case "Escape":
|
|
3428
|
-
if (this.
|
|
3429
|
-
event.
|
|
3313
|
+
if (this.isOpen) {
|
|
3314
|
+
event.preventDefault();
|
|
3315
|
+
(_d = this._popover) === null || _d === void 0 ? void 0 : _d.hide();
|
|
3430
3316
|
}
|
|
3431
|
-
this.cancelPreselection();
|
|
3432
|
-
this.resetOptions();
|
|
3433
3317
|
break;
|
|
3434
3318
|
case "Tab":
|
|
3435
3319
|
this._tabPressed = true;
|
|
3436
|
-
if (this.
|
|
3437
|
-
this.selectCurrentOption(
|
|
3320
|
+
if (this.isOpen) {
|
|
3321
|
+
(_e = this._comboBoxList) === null || _e === void 0 ? void 0 : _e.selectCurrentOption();
|
|
3322
|
+
(_f = this._popover) === null || _f === void 0 ? void 0 : _f.hide();
|
|
3438
3323
|
}
|
|
3439
|
-
this.resetOptions();
|
|
3440
3324
|
break;
|
|
3441
3325
|
}
|
|
3442
|
-
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
3443
|
-
//Por exemplo, quando o usuário dá um Enter, além de selecionar
|
|
3444
|
-
//um valor, também significa que a ateração finalizou,
|
|
3445
|
-
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
3446
|
-
//event.stopPropagation();
|
|
3447
|
-
}
|
|
3448
|
-
//O evento deve ter sua propagação interrompida, apenas se a lista de opções estiver sendo exibida.
|
|
3449
|
-
handleEventPropagation(event) {
|
|
3450
|
-
if (this._listContainer.hasChildNodes() && this.stopPropagateEnterKeyEvent) {
|
|
3451
|
-
event.stopPropagation();
|
|
3452
|
-
}
|
|
3453
3326
|
}
|
|
3454
3327
|
onTextInputFocusOutHandler() {
|
|
3455
3328
|
if (this.hideErrorOnFocusOut)
|
|
@@ -3458,14 +3331,15 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3458
3331
|
canShowListOptions() {
|
|
3459
3332
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
3460
3333
|
}
|
|
3334
|
+
openPopover() {
|
|
3335
|
+
var _a;
|
|
3336
|
+
this.isOpen = true;
|
|
3337
|
+
(_a = this._popover) === null || _a === void 0 ? void 0 : _a.show();
|
|
3338
|
+
}
|
|
3461
3339
|
render() {
|
|
3340
|
+
var _a;
|
|
3462
3341
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
3463
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: `text-input-slot-container ${this.suppressSearch ? "suppressed-search-input" : ""}`, ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "chevron-down" }))), h("
|
|
3464
|
-
&& this._visibleOptions.length === 0
|
|
3465
|
-
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
3466
|
-
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
|
|
3467
|
-
? h("span", { class: "item__value item__value--hidden", ref: elem => this._itemValueBasis = elem })
|
|
3468
|
-
: undefined, this.canShowListOptions() && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
|
|
3342
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: `text-input-slot-container ${this.suppressSearch ? "suppressed-search-input" : ""}`, ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "chevron-down" }))), h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInput, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', onEzVisibilityChange: event => this.isOpen = event.detail }, h("ez-combo-box-list", { ref: ref => this._comboBoxList = ref, showLoading: this._showLoading, visibleOptions: this._visibleOptions, textEmptyList: this._textEmptyList, showOptionValue: this.showOptionValue, preSelection: this._preSelection, maxWidth: this._maxWidthValue, width: (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.clientWidth, onOptionSelect: (opt) => this.selectOption(opt), onOptionHover: (index) => this._preSelection = index }))));
|
|
3469
3343
|
}
|
|
3470
3344
|
get el() { return this; }
|
|
3471
3345
|
static get watchers() { return {
|
|
@@ -3482,6 +3356,158 @@ var SearchMode$1;
|
|
|
3482
3356
|
SearchMode["PREDICTIVE"] = "PREDICTIVE";
|
|
3483
3357
|
})(SearchMode$1 || (SearchMode$1 = {}));
|
|
3484
3358
|
|
|
3359
|
+
const ezComboBoxListCss = ":host{--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);--ez-combo-box__list-container--padding:var(--space--extra-small, 3px)}.list-container{padding-top:var(--ez-combo-box__list-container--padding)}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow--medium, 0 8px 24px 0 rgba(43, 58, 84, 0.10));padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__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-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--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-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
3360
|
+
|
|
3361
|
+
const EzComboBoxList$1 = class extends HTMLElement$1 {
|
|
3362
|
+
constructor() {
|
|
3363
|
+
super();
|
|
3364
|
+
this.__registerHost();
|
|
3365
|
+
this.__attachShadow();
|
|
3366
|
+
this.showLoading = undefined;
|
|
3367
|
+
this.visibleOptions = undefined;
|
|
3368
|
+
this.textEmptyList = "Nenhum resultado encontrado";
|
|
3369
|
+
this.showOptionValue = undefined;
|
|
3370
|
+
this.preSelection = undefined;
|
|
3371
|
+
this.maxWidth = undefined;
|
|
3372
|
+
this.width = undefined;
|
|
3373
|
+
this.onOptionSelect = undefined;
|
|
3374
|
+
this.onOptionHover = undefined;
|
|
3375
|
+
}
|
|
3376
|
+
/**
|
|
3377
|
+
* Move a seleção para a próxima opção na lista.
|
|
3378
|
+
*/
|
|
3379
|
+
async nextOption() {
|
|
3380
|
+
var _a;
|
|
3381
|
+
if (!this.visibleOptions || this.visibleOptions.length === 0)
|
|
3382
|
+
return;
|
|
3383
|
+
const isAtLastOption = this.preSelection !== undefined && this.preSelection >= this.visibleOptions.length - 1;
|
|
3384
|
+
if (!isAtLastOption) {
|
|
3385
|
+
this.preSelection = this.preSelection === undefined ? 0 : this.preSelection + 1;
|
|
3386
|
+
this.scrollToOption(this.visibleOptions[this.preSelection]);
|
|
3387
|
+
(_a = this.onOptionHover) === null || _a === void 0 ? void 0 : _a.call(this, this.preSelection);
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
/**
|
|
3391
|
+
* Move a seleção para a opção anterior na lista, sem ultrapassar o início.
|
|
3392
|
+
*/
|
|
3393
|
+
async previousOption() {
|
|
3394
|
+
var _a;
|
|
3395
|
+
if (!this.visibleOptions || this.visibleOptions.length === 0)
|
|
3396
|
+
return;
|
|
3397
|
+
const isAtFirstOption = this.preSelection !== undefined && this.preSelection <= 0;
|
|
3398
|
+
if (!isAtFirstOption) {
|
|
3399
|
+
this.preSelection = this.preSelection === undefined ? this.visibleOptions.length - 1 : this.preSelection - 1;
|
|
3400
|
+
this.scrollToOption(this.visibleOptions[this.preSelection]);
|
|
3401
|
+
(_a = this.onOptionHover) === null || _a === void 0 ? void 0 : _a.call(this, this.preSelection);
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
/**
|
|
3405
|
+
* Seleciona a opção atualmente pré-selecionada.
|
|
3406
|
+
*/
|
|
3407
|
+
async selectCurrentOption() {
|
|
3408
|
+
if (this.preSelection !== undefined) {
|
|
3409
|
+
this.onOptionSelect(this.visibleOptions[this.preSelection]);
|
|
3410
|
+
this.preSelection = undefined;
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
/**
|
|
3414
|
+
* Observa mudanças na propriedade `width` e ajusta a largura da lista.
|
|
3415
|
+
*
|
|
3416
|
+
* @param newValue O novo valor da largura.
|
|
3417
|
+
* @param oldValue O valor anterior da largura.
|
|
3418
|
+
*/
|
|
3419
|
+
observeWidth(newValue, oldValue) {
|
|
3420
|
+
if (newValue === oldValue)
|
|
3421
|
+
return;
|
|
3422
|
+
if (!this._listWrapper)
|
|
3423
|
+
return;
|
|
3424
|
+
this._listWrapper.style.width = `${this.width}px`;
|
|
3425
|
+
}
|
|
3426
|
+
/**
|
|
3427
|
+
* Observa mudanças na propriedade `maxWidth` e ajusta a largura máxima da lista.
|
|
3428
|
+
*
|
|
3429
|
+
* @param newValue O novo valor da largura máxima.
|
|
3430
|
+
* @param oldValue O valor anterior da largura máxima.
|
|
3431
|
+
*/
|
|
3432
|
+
observeMaxWidth(newValue, oldValue) {
|
|
3433
|
+
if (newValue === oldValue)
|
|
3434
|
+
return;
|
|
3435
|
+
if (!this._listWrapper)
|
|
3436
|
+
return;
|
|
3437
|
+
this._listWrapper.style.maxWidth = this.maxWidth ? `${this.maxWidth}px` : '';
|
|
3438
|
+
}
|
|
3439
|
+
/**
|
|
3440
|
+
* Gerencia a navegação por teclado na lista do combo box.
|
|
3441
|
+
*
|
|
3442
|
+
* - `ArrowDown`: Move para a próxima opção.
|
|
3443
|
+
* - `ArrowUp`: Move para a opção anterior.
|
|
3444
|
+
* - `Enter`: Seleciona a opção atual.
|
|
3445
|
+
* - `Escape`: Limpa a pré-seleção.
|
|
3446
|
+
*
|
|
3447
|
+
* @param event O evento de teclado.
|
|
3448
|
+
*/
|
|
3449
|
+
handleKeyDown(event) {
|
|
3450
|
+
switch (event.key) {
|
|
3451
|
+
case "ArrowDown":
|
|
3452
|
+
event.preventDefault();
|
|
3453
|
+
event.stopPropagation();
|
|
3454
|
+
this.nextOption();
|
|
3455
|
+
break;
|
|
3456
|
+
case "ArrowUp":
|
|
3457
|
+
event.preventDefault();
|
|
3458
|
+
event.stopPropagation();
|
|
3459
|
+
this.previousOption();
|
|
3460
|
+
break;
|
|
3461
|
+
case "Enter":
|
|
3462
|
+
this.selectCurrentOption();
|
|
3463
|
+
break;
|
|
3464
|
+
case "Escape":
|
|
3465
|
+
this.preSelection = undefined;
|
|
3466
|
+
break;
|
|
3467
|
+
}
|
|
3468
|
+
}
|
|
3469
|
+
buildItem(opt, index) {
|
|
3470
|
+
const widthValue = this.showOptionValue && this.maxWidth > 0 ? `${this.maxWidth}px` : '';
|
|
3471
|
+
opt.label = opt.label || opt.value;
|
|
3472
|
+
return h("li", { tabIndex: 1, class: index === this.preSelection ? "item preselected" : "item", id: `item_${opt.value}_${index}`, key: `item_${opt.value}_${index}`, onMouseDown: () => this.onOptionSelect(opt), onMouseOver: () => this.preSelection = index }, this.showOptionValue
|
|
3473
|
+
? h("span", { class: "item__value", title: opt.value, style: { width: widthValue, minWidth: widthValue, maxWidth: widthValue } }, opt.value)
|
|
3474
|
+
: undefined, h("span", { class: "item__label " + (this.showOptionValue ? "item__label--bold" : ""), title: opt.label }, opt.label));
|
|
3475
|
+
}
|
|
3476
|
+
scrollToOption(opt) {
|
|
3477
|
+
if (!opt || !opt.value || !this._optionsList)
|
|
3478
|
+
return;
|
|
3479
|
+
const index = this.visibleOptions.indexOf(opt);
|
|
3480
|
+
if (index === -1)
|
|
3481
|
+
return;
|
|
3482
|
+
const liElem = this._optionsList.querySelector(`li#item_${CSS.escape(opt.value)}_${CSS.escape(String(index))}`);
|
|
3483
|
+
if (liElem) {
|
|
3484
|
+
liElem.scrollIntoView({
|
|
3485
|
+
behavior: "smooth",
|
|
3486
|
+
block: "nearest"
|
|
3487
|
+
});
|
|
3488
|
+
}
|
|
3489
|
+
}
|
|
3490
|
+
componentDidLoad() {
|
|
3491
|
+
this._listWrapper.style.width = `${this.width}px`;
|
|
3492
|
+
this._listWrapper.style.maxWidth = this.maxWidth ? `${this.maxWidth}px` : '';
|
|
3493
|
+
}
|
|
3494
|
+
componentDidRender() {
|
|
3495
|
+
var _a;
|
|
3496
|
+
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
3497
|
+
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
3498
|
+
});
|
|
3499
|
+
}
|
|
3500
|
+
render() {
|
|
3501
|
+
return (h("section", { class: "list-container" }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading && this.visibleOptions.length === 0 && (h("div", { class: "message" }, h("span", { class: "message__no-result" }, this.textEmptyList))), this.showLoading && (h("div", { class: "message" }, h("div", { class: "message__loading" }))), this.showOptionValue && (h("span", { class: "item__value item__value--hidden" })), !this.showLoading && this.visibleOptions.length > 0 &&
|
|
3502
|
+
this.visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
|
|
3503
|
+
}
|
|
3504
|
+
static get watchers() { return {
|
|
3505
|
+
"width": ["observeWidth"],
|
|
3506
|
+
"maxWidth": ["observeMaxWidth"]
|
|
3507
|
+
}; }
|
|
3508
|
+
static get style() { return ezComboBoxListCss; }
|
|
3509
|
+
};
|
|
3510
|
+
|
|
3485
3511
|
const EzCustomFormInput$1 = class extends HTMLElement$1 {
|
|
3486
3512
|
constructor() {
|
|
3487
3513
|
super();
|
|
@@ -71973,6 +71999,9 @@ class AgGridController {
|
|
|
71973
71999
|
if (cfgColumn.customWidth != undefined) {
|
|
71974
72000
|
return cfgColumn.customWidth;
|
|
71975
72001
|
}
|
|
72002
|
+
if (cfgColumn.width != undefined) {
|
|
72003
|
+
return cfgColumn.width;
|
|
72004
|
+
}
|
|
71976
72005
|
const field = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
|
|
71977
72006
|
if ((field === null || field === void 0 ? void 0 : field.userInterface) === UserInterface.SEARCH) {
|
|
71978
72007
|
return this.DEFAULT_MAX_SIZE;
|
|
@@ -72553,6 +72582,20 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
72553
72582
|
.then(() => this.resetPaginationState());
|
|
72554
72583
|
}
|
|
72555
72584
|
}
|
|
72585
|
+
nextRecord() {
|
|
72586
|
+
if (this.dataUnit) {
|
|
72587
|
+
if (this.dataUnit.getSelectionInfo().records.length === 0) {
|
|
72588
|
+
this.dataUnit.selectFirst();
|
|
72589
|
+
return;
|
|
72590
|
+
}
|
|
72591
|
+
this.dataUnit.nextRecord();
|
|
72592
|
+
}
|
|
72593
|
+
}
|
|
72594
|
+
previousRecord() {
|
|
72595
|
+
if (this.dataUnit) {
|
|
72596
|
+
this.dataUnit.previousRecord();
|
|
72597
|
+
}
|
|
72598
|
+
}
|
|
72556
72599
|
resetPaginationState() {
|
|
72557
72600
|
var _a;
|
|
72558
72601
|
this._paginationChangedByKeyboard = false;
|
|
@@ -72635,6 +72678,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
72635
72678
|
this._gridController.configFilterColumn(this._filterColumn);
|
|
72636
72679
|
if (this.paginationCounterMode === 'auto')
|
|
72637
72680
|
this._initHeaderOverflowWatcher();
|
|
72681
|
+
this.initKeyboardManager();
|
|
72638
72682
|
}
|
|
72639
72683
|
handlePaginationChange(selectFirstRecord, paginationInfo) {
|
|
72640
72684
|
var _a;
|
|
@@ -72701,6 +72745,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
72701
72745
|
var _a, _b;
|
|
72702
72746
|
(_a = this._headerOverflowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
72703
72747
|
(_b = this._gridController) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
72748
|
+
this.removeShortcuts();
|
|
72704
72749
|
}
|
|
72705
72750
|
connectedCallback() {
|
|
72706
72751
|
var _a;
|
|
@@ -72739,6 +72784,45 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
72739
72784
|
return "left__header-expanded";
|
|
72740
72785
|
return "left__header-contracted";
|
|
72741
72786
|
}
|
|
72787
|
+
async initKeyboardManager() {
|
|
72788
|
+
this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
|
|
72789
|
+
this._keyboardManager
|
|
72790
|
+
.bind("ctrl + .", () => {
|
|
72791
|
+
if (!this._paginationInfo)
|
|
72792
|
+
return;
|
|
72793
|
+
this.nextRecord();
|
|
72794
|
+
}, { description: "Avança para o próximo registro.", element: this._element })
|
|
72795
|
+
.bind("ctrl + ,", () => {
|
|
72796
|
+
if (!this._paginationInfo)
|
|
72797
|
+
return;
|
|
72798
|
+
this.previousRecord();
|
|
72799
|
+
}, { description: "Retorna ao registro anterior.", element: this._element })
|
|
72800
|
+
.bind("ctrl + alt + ArrowLeft", () => {
|
|
72801
|
+
if (!this._paginationInfo)
|
|
72802
|
+
return;
|
|
72803
|
+
const { currentPage } = this._paginationInfo;
|
|
72804
|
+
if (currentPage > 0) {
|
|
72805
|
+
this.previousPage();
|
|
72806
|
+
}
|
|
72807
|
+
}, { description: "Retorna a pagina anterior.", element: this._element })
|
|
72808
|
+
.bind("ctrl + alt + ArrowRight", () => {
|
|
72809
|
+
if (!this._paginationInfo)
|
|
72810
|
+
return;
|
|
72811
|
+
const { hasMore } = this._paginationInfo;
|
|
72812
|
+
if (hasMore) {
|
|
72813
|
+
this.nextPage();
|
|
72814
|
+
}
|
|
72815
|
+
}, { description: "Avança para a próxima página.", element: this._element });
|
|
72816
|
+
}
|
|
72817
|
+
async removeShortcuts() {
|
|
72818
|
+
if (this._keyboardManager) {
|
|
72819
|
+
this._keyboardManager
|
|
72820
|
+
.unbind("ctrl + .")
|
|
72821
|
+
.unbind("ctrl + ,")
|
|
72822
|
+
.unbind("ctrl + alt + ArrowLeft")
|
|
72823
|
+
.unbind("ctrl + alt + ArrowRight");
|
|
72824
|
+
}
|
|
72825
|
+
}
|
|
72742
72826
|
render() {
|
|
72743
72827
|
var _a;
|
|
72744
72828
|
return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: {
|
|
@@ -75425,7 +75509,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
75425
75509
|
});
|
|
75426
75510
|
};
|
|
75427
75511
|
|
|
75428
|
-
const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--
|
|
75512
|
+
const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--most-visible, 4);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--more-visible--2x, 3)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
|
|
75429
75513
|
|
|
75430
75514
|
const EzPopoverCore$1 = class extends HTMLElement$1 {
|
|
75431
75515
|
constructor() {
|
|
@@ -75440,18 +75524,18 @@ const EzPopoverCore$1 = class extends HTMLElement$1 {
|
|
|
75440
75524
|
this.overlayType = "light";
|
|
75441
75525
|
this.anchorElement = undefined;
|
|
75442
75526
|
this.options = { horizontalGap: 0, verticalGap: 0, fromRight: false };
|
|
75443
|
-
this.useAnchorSize = false;
|
|
75444
|
-
this.minWidth = 150;
|
|
75445
75527
|
}
|
|
75446
|
-
observeOpened(newValue, oldValue) {
|
|
75447
|
-
if (newValue
|
|
75448
|
-
|
|
75449
|
-
|
|
75450
|
-
|
|
75451
|
-
|
|
75452
|
-
|
|
75453
|
-
|
|
75528
|
+
async observeOpened(newValue, oldValue) {
|
|
75529
|
+
if (newValue === oldValue)
|
|
75530
|
+
return;
|
|
75531
|
+
if (newValue) {
|
|
75532
|
+
this.openPopover();
|
|
75533
|
+
}
|
|
75534
|
+
else {
|
|
75535
|
+
this.hidePopover();
|
|
75454
75536
|
}
|
|
75537
|
+
this.ezVisibilityChange.emit(newValue);
|
|
75538
|
+
return;
|
|
75455
75539
|
}
|
|
75456
75540
|
/**
|
|
75457
75541
|
* Atualiza a posição do popover.
|
|
@@ -75510,37 +75594,17 @@ const EzPopoverCore$1 = class extends HTMLElement$1 {
|
|
|
75510
75594
|
verticalGap: this.parseSizePixel(top, this.options.verticalGap),
|
|
75511
75595
|
});
|
|
75512
75596
|
}
|
|
75513
|
-
getElement(element) {
|
|
75514
|
-
if (typeof element === 'string') {
|
|
75515
|
-
return document.getElementById(element);
|
|
75516
|
-
}
|
|
75517
|
-
return element;
|
|
75518
|
-
}
|
|
75519
|
-
getAnchorElement() {
|
|
75520
|
-
if (!this.anchorElement) {
|
|
75521
|
-
return this._host;
|
|
75522
|
-
}
|
|
75523
|
-
if (Array.isArray(this.anchorElement)) {
|
|
75524
|
-
for (const element of this.anchorElement) {
|
|
75525
|
-
const htmlElement = this.getElement(element);
|
|
75526
|
-
if (htmlElement) {
|
|
75527
|
-
return htmlElement;
|
|
75528
|
-
}
|
|
75529
|
-
}
|
|
75530
|
-
}
|
|
75531
|
-
return this.getElement(this.anchorElement);
|
|
75532
|
-
}
|
|
75533
75597
|
async updatePositionPopover() {
|
|
75534
75598
|
if (!this._box || !this.opened) {
|
|
75535
75599
|
return;
|
|
75536
75600
|
}
|
|
75537
|
-
|
|
75538
|
-
|
|
75539
|
-
|
|
75540
|
-
|
|
75541
|
-
this.
|
|
75601
|
+
if (!this.anchorElement) {
|
|
75602
|
+
this.anchorElement = this._host;
|
|
75603
|
+
}
|
|
75604
|
+
if (typeof this.anchorElement === 'string') {
|
|
75605
|
+
this.anchorElement = document.getElementById(this.anchorElement);
|
|
75542
75606
|
}
|
|
75543
|
-
await computePosition(
|
|
75607
|
+
await computePosition(this.anchorElement, this._box, {
|
|
75544
75608
|
placement: this.options.fromRight ? 'bottom-end' : 'bottom-start',
|
|
75545
75609
|
middleware: [flip(), shift({ padding: 5 })],
|
|
75546
75610
|
strategy: 'fixed',
|
|
@@ -75647,7 +75711,9 @@ const EzPopoverPlus$1 = class extends HTMLElement$1 {
|
|
|
75647
75711
|
this.overlayType = "light";
|
|
75648
75712
|
this.anchorElement = undefined;
|
|
75649
75713
|
this.options = { horizontalGap: 0, verticalGap: 0, fromRight: false };
|
|
75650
|
-
|
|
75714
|
+
}
|
|
75715
|
+
listenerEzVisibilityChange({ detail }) {
|
|
75716
|
+
this.ezVisibilityChange.emit(detail);
|
|
75651
75717
|
}
|
|
75652
75718
|
async observeOpened(newValue) {
|
|
75653
75719
|
if (newValue && !this._popOverCore) {
|
|
@@ -75659,7 +75725,8 @@ const EzPopoverPlus$1 = class extends HTMLElement$1 {
|
|
|
75659
75725
|
* Atualiza a posição do popover.
|
|
75660
75726
|
*/
|
|
75661
75727
|
async updatePosition(top, left) {
|
|
75662
|
-
|
|
75728
|
+
var _a;
|
|
75729
|
+
await ((_a = this._popOverCore) === null || _a === void 0 ? void 0 : _a.updatePosition(top, left));
|
|
75663
75730
|
}
|
|
75664
75731
|
/**
|
|
75665
75732
|
* Exibe o ez-popover.
|
|
@@ -75690,13 +75757,15 @@ const EzPopoverPlus$1 = class extends HTMLElement$1 {
|
|
|
75690
75757
|
* Altera as opções.
|
|
75691
75758
|
*/
|
|
75692
75759
|
async setOptions(options) {
|
|
75693
|
-
|
|
75760
|
+
var _a;
|
|
75761
|
+
await ((_a = this._popOverCore) === null || _a === void 0 ? void 0 : _a.setOptions(options));
|
|
75694
75762
|
}
|
|
75695
75763
|
/**
|
|
75696
75764
|
* Altera o elemento de ancoragem.
|
|
75697
75765
|
*/
|
|
75698
75766
|
async setAnchorElement(anchor) {
|
|
75699
|
-
|
|
75767
|
+
var _a;
|
|
75768
|
+
await ((_a = this._popOverCore) === null || _a === void 0 ? void 0 : _a.setAnchorElement(anchor));
|
|
75700
75769
|
}
|
|
75701
75770
|
renderPopoverCore() {
|
|
75702
75771
|
this._popOverCore = document.createElement('ez-popover-core');
|
|
@@ -75706,12 +75775,13 @@ const EzPopoverPlus$1 = class extends HTMLElement$1 {
|
|
|
75706
75775
|
this._popOverCore.boxWidth = this.boxWidth;
|
|
75707
75776
|
this._popOverCore.overlayType = this.overlayType;
|
|
75708
75777
|
this._popOverCore.options = this.options;
|
|
75709
|
-
|
|
75710
|
-
|
|
75711
|
-
this.
|
|
75712
|
-
|
|
75713
|
-
|
|
75714
|
-
|
|
75778
|
+
const firstChild = this._host.children.item(0);
|
|
75779
|
+
if (firstChild) {
|
|
75780
|
+
this._popOverCore.appendChild(firstChild);
|
|
75781
|
+
}
|
|
75782
|
+
else {
|
|
75783
|
+
console.warn('O slot do popover está vazio. Adicione conteúdo ao slot para exibição correta.');
|
|
75784
|
+
}
|
|
75715
75785
|
document.body.appendChild(this._popOverCore);
|
|
75716
75786
|
}
|
|
75717
75787
|
render() {
|
|
@@ -76052,26 +76122,7 @@ class ScrollCtrl {
|
|
|
76052
76122
|
}
|
|
76053
76123
|
}
|
|
76054
76124
|
|
|
76055
|
-
const
|
|
76056
|
-
const END_HIGH_LIGHT_TAG = "</span>";
|
|
76057
|
-
function replaceHighlight(value) {
|
|
76058
|
-
const startHighlight = new RegExp(START_HIGH_LIGHT_TAG, 'g');
|
|
76059
|
-
const endHighlight = new RegExp(END_HIGH_LIGHT_TAG, 'g');
|
|
76060
|
-
const newValue = String(value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
76061
|
-
return replaceQuotes(newValue);
|
|
76062
|
-
}
|
|
76063
|
-
function replaceQuotes(text) {
|
|
76064
|
-
if (text == undefined) {
|
|
76065
|
-
return;
|
|
76066
|
-
}
|
|
76067
|
-
return String(text)
|
|
76068
|
-
.replace(/&/g, '&')
|
|
76069
|
-
.replace(/</g, '<')
|
|
76070
|
-
.replace(/>/g, '>')
|
|
76071
|
-
.replace(/"/g, '"');
|
|
76072
|
-
}
|
|
76073
|
-
|
|
76074
|
-
const ezSearchCss = ":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--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);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)}.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}";
|
|
76125
|
+
const ezSearchCss = ":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--small, 6px);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}}";
|
|
76075
76126
|
|
|
76076
76127
|
const EzSearch$1 = class extends HTMLElement$1 {
|
|
76077
76128
|
constructor() {
|
|
@@ -76207,6 +76258,20 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76207
76258
|
async clearValue() {
|
|
76208
76259
|
this.clearSearch();
|
|
76209
76260
|
}
|
|
76261
|
+
scrollListener() {
|
|
76262
|
+
var _a;
|
|
76263
|
+
if (this._floatingID == undefined) {
|
|
76264
|
+
return;
|
|
76265
|
+
}
|
|
76266
|
+
if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
|
|
76267
|
+
this.hideOptions();
|
|
76268
|
+
}
|
|
76269
|
+
else {
|
|
76270
|
+
window.requestAnimationFrame(() => {
|
|
76271
|
+
this.updateListPosition();
|
|
76272
|
+
});
|
|
76273
|
+
}
|
|
76274
|
+
}
|
|
76210
76275
|
async handleValueAsString(value) {
|
|
76211
76276
|
if (this.getSelectedOption(value)) {
|
|
76212
76277
|
this.setInputValue();
|
|
@@ -76220,6 +76285,49 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76220
76285
|
this.ezChange.emit(this.value);
|
|
76221
76286
|
this._currentValue = this.value;
|
|
76222
76287
|
}
|
|
76288
|
+
updateListPosition() {
|
|
76289
|
+
let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
|
|
76290
|
+
const elementRect = this._listWrapper.getBoundingClientRect();
|
|
76291
|
+
const containerRect = this._listContainer.getBoundingClientRect();
|
|
76292
|
+
const textInputRect = this._textInput.getBoundingClientRect();
|
|
76293
|
+
const limitHeight = bottomLimit || window.innerHeight;
|
|
76294
|
+
const neededHeight = containerRect.bottom + elementRect.height;
|
|
76295
|
+
if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
|
|
76296
|
+
fromBottom = true;
|
|
76297
|
+
}
|
|
76298
|
+
if (!hardPosition) {
|
|
76299
|
+
verticalPosition = verticalPosition || 0;
|
|
76300
|
+
horizontalPosition = horizontalPosition || 0;
|
|
76301
|
+
if (fromBottom) {
|
|
76302
|
+
verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
|
|
76303
|
+
}
|
|
76304
|
+
else {
|
|
76305
|
+
verticalPosition += containerRect.top;
|
|
76306
|
+
}
|
|
76307
|
+
if (fromRight) {
|
|
76308
|
+
horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
|
|
76309
|
+
}
|
|
76310
|
+
else {
|
|
76311
|
+
horizontalPosition += containerRect.left;
|
|
76312
|
+
}
|
|
76313
|
+
}
|
|
76314
|
+
if (verticalPosition != undefined) {
|
|
76315
|
+
this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
|
|
76316
|
+
this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
|
|
76317
|
+
}
|
|
76318
|
+
if (horizontalPosition != undefined) {
|
|
76319
|
+
this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
|
|
76320
|
+
this._listWrapper.style[fromRight ? "left" : "right"] = "";
|
|
76321
|
+
}
|
|
76322
|
+
}
|
|
76323
|
+
getListPosition() {
|
|
76324
|
+
if (this.listOptionsPosition) {
|
|
76325
|
+
return this.listOptionsPosition;
|
|
76326
|
+
}
|
|
76327
|
+
return {
|
|
76328
|
+
verticalPosition: 6
|
|
76329
|
+
};
|
|
76330
|
+
}
|
|
76223
76331
|
isDifferentValues(firstValue, secondValue) {
|
|
76224
76332
|
return ObjectUtils$1.objectToString(firstValue || {}) !== ObjectUtils$1.objectToString(secondValue || {});
|
|
76225
76333
|
}
|
|
@@ -76234,14 +76342,24 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76234
76342
|
getText() {
|
|
76235
76343
|
const currentValue = this.getSelectedOption(this._currentValue);
|
|
76236
76344
|
const text = this.getFormattedText(currentValue);
|
|
76237
|
-
return replaceQuotes(text);
|
|
76345
|
+
return this.replaceQuotes(text);
|
|
76346
|
+
}
|
|
76347
|
+
replaceQuotes(text) {
|
|
76348
|
+
if (text == undefined) {
|
|
76349
|
+
return;
|
|
76350
|
+
}
|
|
76351
|
+
return String(text)
|
|
76352
|
+
.replace(/&/g, '&')
|
|
76353
|
+
.replace(/</g, '<')
|
|
76354
|
+
.replace(/>/g, '>')
|
|
76355
|
+
.replace(/"/g, '"');
|
|
76238
76356
|
}
|
|
76239
76357
|
getSelectedOption(value) {
|
|
76240
76358
|
if (typeof value === "string" || value instanceof String) {
|
|
76241
76359
|
return this._visibleOptions.find(o => o.value === value);
|
|
76242
76360
|
}
|
|
76243
76361
|
if (value) {
|
|
76244
|
-
return Object.assign(Object.assign({}, value), { value: replaceHighlight(value === null || value === void 0 ? void 0 : value.value), label: replaceHighlight(value === null || value === void 0 ? void 0 : value.label) });
|
|
76362
|
+
return Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value === null || value === void 0 ? void 0 : value.value), label: this.replaceHighlight(value === null || value === void 0 ? void 0 : value.label) });
|
|
76245
76363
|
}
|
|
76246
76364
|
return value;
|
|
76247
76365
|
}
|
|
@@ -76279,19 +76397,75 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76279
76397
|
}
|
|
76280
76398
|
return 0;
|
|
76281
76399
|
}
|
|
76400
|
+
createOption(detail) {
|
|
76401
|
+
let { key, title } = detail;
|
|
76402
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
76403
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
76404
|
+
title = StringUtils$1.decodeHtmlEntities(title);
|
|
76405
|
+
const option = {
|
|
76406
|
+
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
76407
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
76408
|
+
};
|
|
76409
|
+
this.selectOption(option);
|
|
76410
|
+
}
|
|
76411
|
+
buildItem(opt, index) {
|
|
76412
|
+
opt.label = opt.label || opt.value;
|
|
76413
|
+
const card = {
|
|
76414
|
+
key: opt.value,
|
|
76415
|
+
title: opt.label,
|
|
76416
|
+
details: opt.details
|
|
76417
|
+
};
|
|
76418
|
+
return h("div", { style: { "height": "100%" }, class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this._preSelection = index }, h("ez-card-item", { item: card, compacted: true, enableKey: this.showOptionValue }));
|
|
76419
|
+
}
|
|
76282
76420
|
showOptions() {
|
|
76283
76421
|
if (!this.enabled)
|
|
76284
76422
|
return;
|
|
76285
76423
|
if (this.isOptionsVisible()) {
|
|
76286
76424
|
return;
|
|
76287
76425
|
}
|
|
76288
|
-
|
|
76426
|
+
if (!!this._resizeObserver)
|
|
76427
|
+
this._resizeObserver.observe(this._textInput);
|
|
76428
|
+
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: false, isFixed: true, backClickListener: () => this.hideOptions() });
|
|
76429
|
+
this.setFocus();
|
|
76430
|
+
window.requestAnimationFrame(() => {
|
|
76431
|
+
this.updateListPosition();
|
|
76432
|
+
if (!this.listOptionsPosition) {
|
|
76433
|
+
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
76434
|
+
}
|
|
76435
|
+
});
|
|
76289
76436
|
}
|
|
76290
76437
|
hideOptions() {
|
|
76291
|
-
this.
|
|
76438
|
+
if (this._floatingID !== undefined) {
|
|
76439
|
+
FloatingManager.close(this._floatingID);
|
|
76440
|
+
}
|
|
76441
|
+
this._floatingID = undefined;
|
|
76442
|
+
if (!!this._resizeObserver)
|
|
76443
|
+
this._resizeObserver.unobserve(this._textInput);
|
|
76292
76444
|
}
|
|
76293
76445
|
isOptionsVisible() {
|
|
76294
|
-
return this.
|
|
76446
|
+
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
76447
|
+
}
|
|
76448
|
+
nextOption() {
|
|
76449
|
+
if (!this.isOptionsVisible()) {
|
|
76450
|
+
return;
|
|
76451
|
+
}
|
|
76452
|
+
this.showOptions();
|
|
76453
|
+
this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
|
|
76454
|
+
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
76455
|
+
}
|
|
76456
|
+
previousOption() {
|
|
76457
|
+
this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
76458
|
+
this.scrollToOption(this._visibleOptions[this._preSelection]);
|
|
76459
|
+
}
|
|
76460
|
+
scrollToOption(opt) {
|
|
76461
|
+
window.requestAnimationFrame(() => {
|
|
76462
|
+
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value)
|
|
76463
|
+
? this._optionsList.querySelector(`div#item_${opt.value.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g, '\\$1')}`)
|
|
76464
|
+
: undefined;
|
|
76465
|
+
if (liElem) {
|
|
76466
|
+
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
76467
|
+
}
|
|
76468
|
+
});
|
|
76295
76469
|
}
|
|
76296
76470
|
selectCurrentOption() {
|
|
76297
76471
|
if (this._preSelection !== undefined) {
|
|
@@ -76334,11 +76508,17 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76334
76508
|
this._source = [];
|
|
76335
76509
|
this.updateVisibleOptions();
|
|
76336
76510
|
}
|
|
76511
|
+
replaceHighlight(value) {
|
|
76512
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
76513
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
76514
|
+
const newValue = String(value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
76515
|
+
return this.replaceQuotes(newValue);
|
|
76516
|
+
}
|
|
76337
76517
|
selectOption(newOption, focusOnInput = true) {
|
|
76338
76518
|
var _a, _b;
|
|
76339
76519
|
const currentValue = this.getSelectedOption(this.value);
|
|
76340
|
-
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
76341
|
-
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
|
|
76520
|
+
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
76521
|
+
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
|
|
76342
76522
|
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
76343
76523
|
|| (currentValue == undefined && newOptionsFormatted != undefined && "value" in newOptionsFormatted)) {
|
|
76344
76524
|
const adjustedOpt = !(newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) ? undefined : newOptionsFormatted;
|
|
@@ -76448,7 +76628,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76448
76628
|
this.showNoResultMessage();
|
|
76449
76629
|
return;
|
|
76450
76630
|
}
|
|
76451
|
-
this._currentValue = value ? Object.assign(Object.assign({}, value), { value: replaceHighlight(value.value), label: replaceHighlight(value.label) }) : value;
|
|
76631
|
+
this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
|
|
76452
76632
|
this.value = this._currentValue;
|
|
76453
76633
|
this.setTextInputValue();
|
|
76454
76634
|
}
|
|
@@ -76457,7 +76637,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76457
76637
|
if (this.value === undefined || this.value === null)
|
|
76458
76638
|
return;
|
|
76459
76639
|
const textValue = (typeof this.value === 'string') ? this.value : this.getFormattedText(this.value);
|
|
76460
|
-
this._textInput.value = replaceQuotes(textValue);
|
|
76640
|
+
this._textInput.value = this.replaceQuotes(textValue);
|
|
76461
76641
|
}
|
|
76462
76642
|
}
|
|
76463
76643
|
loadOptionValue(argument) {
|
|
@@ -76494,7 +76674,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76494
76674
|
return;
|
|
76495
76675
|
}
|
|
76496
76676
|
let text = this.getFormattedText(this.value);
|
|
76497
|
-
text = replaceQuotes(text);
|
|
76677
|
+
text = this.replaceQuotes(text);
|
|
76498
76678
|
this._textInput.value = text;
|
|
76499
76679
|
}
|
|
76500
76680
|
//---------------------------------------------
|
|
@@ -76521,6 +76701,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76521
76701
|
}
|
|
76522
76702
|
componentDidRender() {
|
|
76523
76703
|
var _a;
|
|
76704
|
+
if (this._floatingID === undefined) {
|
|
76705
|
+
this._listWrapper.remove();
|
|
76706
|
+
}
|
|
76524
76707
|
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
76525
76708
|
ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
|
|
76526
76709
|
});
|
|
@@ -76532,6 +76715,10 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76532
76715
|
window.requestAnimationFrame(() => {
|
|
76533
76716
|
if (!Array.isArray(entries) || !entries.length)
|
|
76534
76717
|
return;
|
|
76718
|
+
const { clientWidth } = this._listContainer;
|
|
76719
|
+
if (clientWidth > 0 && !!this._listWrapper) {
|
|
76720
|
+
this._listWrapper.style.width = `${clientWidth}px`;
|
|
76721
|
+
}
|
|
76535
76722
|
});
|
|
76536
76723
|
});
|
|
76537
76724
|
await this.handleInitialValue();
|
|
@@ -76598,7 +76785,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76598
76785
|
this._changeDeboucingTimeout = null;
|
|
76599
76786
|
}
|
|
76600
76787
|
}
|
|
76601
|
-
|
|
76788
|
+
keyDownHandler(event) {
|
|
76602
76789
|
this._tabPressed = false;
|
|
76603
76790
|
if (event.ctrlKey) {
|
|
76604
76791
|
if (event.key === "f" || event.key === "F") {
|
|
@@ -76614,20 +76801,15 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76614
76801
|
switch (event.key) {
|
|
76615
76802
|
case "ArrowDown":
|
|
76616
76803
|
event.stopPropagation();
|
|
76617
|
-
if (this.canShowListOptions())
|
|
76804
|
+
if (this.canShowListOptions())
|
|
76618
76805
|
event.preventDefault();
|
|
76619
|
-
|
|
76620
|
-
if (!this.isOptionsVisible()) {
|
|
76621
|
-
this.showOptions();
|
|
76622
|
-
}
|
|
76623
|
-
await this._searchList.nextOption();
|
|
76806
|
+
this.nextOption();
|
|
76624
76807
|
break;
|
|
76625
76808
|
case "ArrowUp":
|
|
76626
76809
|
event.stopPropagation();
|
|
76627
|
-
if (this.canShowListOptions())
|
|
76810
|
+
if (this.canShowListOptions())
|
|
76628
76811
|
event.preventDefault();
|
|
76629
|
-
|
|
76630
|
-
await this._searchList.previousOption();
|
|
76812
|
+
this.previousOption();
|
|
76631
76813
|
break;
|
|
76632
76814
|
case "Enter":
|
|
76633
76815
|
this.handleEventPropagation(event);
|
|
@@ -76649,7 +76831,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76649
76831
|
}
|
|
76650
76832
|
//O evento deve ter sua propagação interrompida, apenas se a lista de opções estiver sendo exibida.
|
|
76651
76833
|
handleEventPropagation(event) {
|
|
76652
|
-
if (this.
|
|
76834
|
+
if (this._listContainer.hasChildNodes() && this.stopPropagateEnterKeyEvent) {
|
|
76653
76835
|
event.stopPropagation();
|
|
76654
76836
|
}
|
|
76655
76837
|
}
|
|
@@ -76661,17 +76843,17 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
76661
76843
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
76662
76844
|
}
|
|
76663
76845
|
canShowLoadSpinDescription() {
|
|
76664
|
-
return this._showLoadingDescription &&
|
|
76665
|
-
}
|
|
76666
|
-
onChangePreSelection(value) {
|
|
76667
|
-
this._preSelection = value;
|
|
76846
|
+
return this._showLoadingDescription && this._floatingID == undefined;
|
|
76668
76847
|
}
|
|
76669
76848
|
render() {
|
|
76670
76849
|
var _a;
|
|
76671
76850
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
76672
76851
|
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, this.canShowLoadSpinDescription() ? h("div", { class: "message__loading" }) : h("ez-icon", { iconName: "search" })), (((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value) || this.ensureClearButtonVisible)
|
|
76673
76852
|
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
76674
|
-
: undefined), h("
|
|
76853
|
+
: undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
|
|
76854
|
+
&& this._visibleOptions.length === 0
|
|
76855
|
+
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
76856
|
+
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), h("span", { class: "item__value item__value--hidden", ref: elem => this._itemValueBasis = elem }), this.canShowListOptions() && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
|
|
76675
76857
|
}
|
|
76676
76858
|
get el() { return this; }
|
|
76677
76859
|
static get watchers() { return {
|
|
@@ -80386,79 +80568,6 @@ const MultiSelectionBoxMessage$1 = class extends HTMLElement$1 {
|
|
|
80386
80568
|
static get style() { return multiSelectionBoxMessageCss; }
|
|
80387
80569
|
};
|
|
80388
80570
|
|
|
80389
|
-
const searchListCss = ":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}}";
|
|
80390
|
-
|
|
80391
|
-
const SearchList$1 = class extends HTMLElement$1 {
|
|
80392
|
-
constructor() {
|
|
80393
|
-
super();
|
|
80394
|
-
this.__registerHost();
|
|
80395
|
-
this.__attachShadow();
|
|
80396
|
-
this.changeValue = createEvent(this, "changeValue", 7);
|
|
80397
|
-
this.changePreSelection = createEvent(this, "changePreSelection", 7);
|
|
80398
|
-
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
80399
|
-
this._endHighlightTag = "</span>";
|
|
80400
|
-
this.showLoading = undefined;
|
|
80401
|
-
this.visibleOptions = [];
|
|
80402
|
-
this.textEmptyList = undefined;
|
|
80403
|
-
this.canShowListOptions = undefined;
|
|
80404
|
-
this.value = undefined;
|
|
80405
|
-
this.showOptionValue = true;
|
|
80406
|
-
this.preSelection = undefined;
|
|
80407
|
-
}
|
|
80408
|
-
async nextOption() {
|
|
80409
|
-
const newPreSelection = this.preSelection === undefined ? 0 : Math.min(this.preSelection + 1, this.visibleOptions.length - 1);
|
|
80410
|
-
this.changePreSelection.emit(newPreSelection);
|
|
80411
|
-
this.scrollToOption(this.visibleOptions[newPreSelection]);
|
|
80412
|
-
}
|
|
80413
|
-
async previousOption() {
|
|
80414
|
-
const newPreSelection = this.preSelection === undefined ? 0 : Math.max(this.preSelection - 1, 0);
|
|
80415
|
-
this.changePreSelection.emit(newPreSelection);
|
|
80416
|
-
this.scrollToOption(this.visibleOptions[newPreSelection]);
|
|
80417
|
-
}
|
|
80418
|
-
selectOption(newOption) {
|
|
80419
|
-
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
80420
|
-
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
|
|
80421
|
-
this.changeValue.emit(newOptionsFormatted);
|
|
80422
|
-
}
|
|
80423
|
-
createOption(detail) {
|
|
80424
|
-
let { key, title } = detail;
|
|
80425
|
-
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
80426
|
-
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
80427
|
-
title = StringUtils$1.decodeHtmlEntities(title);
|
|
80428
|
-
const option = {
|
|
80429
|
-
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
80430
|
-
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
80431
|
-
};
|
|
80432
|
-
this.selectOption(option);
|
|
80433
|
-
}
|
|
80434
|
-
scrollToOption(opt) {
|
|
80435
|
-
window.requestAnimationFrame(() => {
|
|
80436
|
-
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value)
|
|
80437
|
-
? this._optionsList.querySelector(`div#item_${opt.value.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g, '\\$1')}`)
|
|
80438
|
-
: undefined;
|
|
80439
|
-
if (liElem) {
|
|
80440
|
-
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
80441
|
-
}
|
|
80442
|
-
});
|
|
80443
|
-
}
|
|
80444
|
-
buildItem(opt, index) {
|
|
80445
|
-
opt.label = opt.label || opt.value;
|
|
80446
|
-
const card = {
|
|
80447
|
-
key: opt.value,
|
|
80448
|
-
title: opt.label,
|
|
80449
|
-
details: opt.details
|
|
80450
|
-
};
|
|
80451
|
-
return h("div", { style: { "height": "100%" }, class: index === this.preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this.changePreSelection.emit(index) }, h("ez-card-item", { item: card, compacted: true, enableKey: this.showOptionValue }));
|
|
80452
|
-
}
|
|
80453
|
-
render() {
|
|
80454
|
-
return (h(Host, null, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
|
|
80455
|
-
&& this.visibleOptions.length === 0
|
|
80456
|
-
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this.textEmptyList)), this.showLoading
|
|
80457
|
-
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.canShowListOptions && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
|
|
80458
|
-
}
|
|
80459
|
-
static get style() { return searchListCss; }
|
|
80460
|
-
};
|
|
80461
|
-
|
|
80462
80571
|
const EzActionsButton = /*@__PURE__*/proxyCustomElement(EzActionsButton$1, [1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32]}]);
|
|
80463
80572
|
const EzAlert = /*@__PURE__*/proxyCustomElement(EzAlert$1, [1,"ez-alert",{"alertType":[513,"alert-type"]}]);
|
|
80464
80573
|
const EzAlertList = /*@__PURE__*/proxyCustomElement(EzAlertList$1, [1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540],"_container":[32]}]);
|
|
@@ -80472,7 +80581,8 @@ const EzChart = /*@__PURE__*/proxyCustomElement(EzChart$1, [1,"ez-chart",{"type"
|
|
|
80472
80581
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
80473
80582
|
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"]}]);
|
|
80474
80583
|
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]}]);
|
|
80475
|
-
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"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]
|
|
80584
|
+
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],"_textInputReady":[32]}]);
|
|
80585
|
+
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"]]]);
|
|
80476
80586
|
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]}]);
|
|
80477
80587
|
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"]}]);
|
|
80478
80588
|
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"]}]);
|
|
@@ -80493,12 +80603,12 @@ const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,
|
|
|
80493
80603
|
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
80494
80604
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"allowNegative":[4,"allow-negative"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"autoFocus":[4,"auto-focus"],"_value":[32]}]);
|
|
80495
80605
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
|
|
80496
|
-
const EzPopoverCore = /*@__PURE__*/proxyCustomElement(EzPopoverCore$1, [1,"ez-popover-core",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040]
|
|
80497
|
-
const EzPopoverPlus = /*@__PURE__*/proxyCustomElement(EzPopoverPlus$1, [1,"ez-popover-plus",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040],"
|
|
80606
|
+
const EzPopoverCore = /*@__PURE__*/proxyCustomElement(EzPopoverCore$1, [1,"ez-popover-core",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040]}]);
|
|
80607
|
+
const EzPopoverPlus = /*@__PURE__*/proxyCustomElement(EzPopoverPlus$1, [1,"ez-popover-plus",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040]},[[0,"ezVisibilityChange","listenerEzVisibilityChange"]]]);
|
|
80498
80608
|
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"],"enabledScroll":[4,"enabled-scroll"]}]);
|
|
80499
80609
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
80500
80610
|
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"]]]);
|
|
80501
|
-
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]}]);
|
|
80611
|
+
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]},[[11,"scroll","scrollListener"]]]);
|
|
80502
80612
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
80503
80613
|
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]}]);
|
|
80504
80614
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
@@ -80517,7 +80627,6 @@ const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"la
|
|
|
80517
80627
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
80518
80628
|
const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32]}]);
|
|
80519
80629
|
const MultiSelectionBoxMessage = /*@__PURE__*/proxyCustomElement(MultiSelectionBoxMessage$1, [0,"multi-selection-box-message",{"message":[1]}]);
|
|
80520
|
-
const SearchList = /*@__PURE__*/proxyCustomElement(SearchList$1, [1,"search-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"canShowListOptions":[4,"can-show-list-options"],"value":[1],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"]}]);
|
|
80521
80630
|
const defineCustomElements = (opts) => {
|
|
80522
80631
|
if (typeof customElements !== 'undefined') {
|
|
80523
80632
|
[
|
|
@@ -80535,6 +80644,7 @@ const defineCustomElements = (opts) => {
|
|
|
80535
80644
|
EzChip,
|
|
80536
80645
|
EzCollapsibleBox,
|
|
80537
80646
|
EzComboBox,
|
|
80647
|
+
EzComboBoxList,
|
|
80538
80648
|
EzCustomFormInput,
|
|
80539
80649
|
EzDateInput,
|
|
80540
80650
|
EzDateTimeInput,
|
|
@@ -80578,8 +80688,7 @@ const defineCustomElements = (opts) => {
|
|
|
80578
80688
|
EzUpload,
|
|
80579
80689
|
EzViewStack,
|
|
80580
80690
|
FilterColumn,
|
|
80581
|
-
MultiSelectionBoxMessage
|
|
80582
|
-
SearchList
|
|
80691
|
+
MultiSelectionBoxMessage
|
|
80583
80692
|
].forEach(cmp => {
|
|
80584
80693
|
if (!customElements.get(cmp.is)) {
|
|
80585
80694
|
customElements.define(cmp.is, cmp, opts);
|
|
@@ -80588,4 +80697,4 @@ const defineCustomElements = (opts) => {
|
|
|
80588
80697
|
}
|
|
80589
80698
|
};
|
|
80590
80699
|
|
|
80591
|
-
export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzChart, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, 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,
|
|
80700
|
+
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, defineCustomElements };
|