@sankhyalabs/ezui 2.3.14 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-combo-box.cjs.entry.js +4 -0
- package/dist/cjs/ez-form.cjs.entry.js +3 -3
- package/dist/cjs/ez-scroller.cjs.entry.js +15 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +2 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +4 -0
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +3 -3
- package/dist/collection/components/ez-scroller/ez-scroller.js +18 -3
- package/dist/collection/components/ez-text-input/ez-text-input.js +2 -1
- package/dist/custom-elements/index.js +26 -7
- package/dist/esm/ez-combo-box.entry.js +4 -0
- package/dist/esm/ez-form.entry.js +3 -3
- package/dist/esm/ez-scroller.entry.js +16 -2
- package/dist/esm/ez-text-input.entry.js +2 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-52997e83.entry.js → p-05dbdaeb.entry.js} +1 -1
- package/dist/ezui/p-590d9e91.entry.js +1 -0
- package/dist/ezui/p-9334a724.entry.js +1 -0
- package/dist/ezui/p-bd9d791c.entry.js +1 -0
- package/dist/types/components/ez-scroller/ez-scroller.d.ts +3 -0
- package/package.json +2 -2
- package/dist/ezui/p-51e31ecb.entry.js +0 -1
- package/dist/ezui/p-bf26ae36.entry.js +0 -1
- package/dist/ezui/p-e165c3ef.entry.js +0 -1
|
@@ -352,9 +352,13 @@ let EzComboBox = class {
|
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
componentDidRender() {
|
|
355
|
+
var _a;
|
|
355
356
|
if (this._floatingID === undefined) {
|
|
356
357
|
this._listWrapper.remove();
|
|
357
358
|
}
|
|
359
|
+
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
360
|
+
core.ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
361
|
+
});
|
|
358
362
|
}
|
|
359
363
|
componentDidLoad() {
|
|
360
364
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
@@ -118,7 +118,7 @@ const buildFromConfig = (config, dataUnit) => {
|
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
(_b = config === null || config === void 0 ? void 0 : config.fields) === null || _b === void 0 ? void 0 : _b.forEach((field) => {
|
|
121
|
-
var _a, _b, _c;
|
|
121
|
+
var _a, _b, _c, _d;
|
|
122
122
|
if (field.visible !== false) {
|
|
123
123
|
const tabConfig = getTabConfig(field.tab || "__main", sheets);
|
|
124
124
|
if (hiddenTabs.has(tabConfig.label)) {
|
|
@@ -134,10 +134,10 @@ const buildFromConfig = (config, dataUnit) => {
|
|
|
134
134
|
requiredFields.push(field.name);
|
|
135
135
|
}
|
|
136
136
|
const cleanOnCopy = field.cleanOnCopy == undefined ? (_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy : field.cleanOnCopy;
|
|
137
|
-
if (cleanOnCopy || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum)) {
|
|
137
|
+
if (cleanOnCopy || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum) || ((_c = descriptor.properties) === null || _c === void 0 ? void 0 : _c.cleanOnCopy)) {
|
|
138
138
|
cleanOnCopyFields.push(field.name);
|
|
139
139
|
}
|
|
140
|
-
const defaultValue = field.defaultValue == undefined ? (
|
|
140
|
+
const defaultValue = field.defaultValue == undefined ? (_d = descriptor.properties) === null || _d === void 0 ? void 0 : _d.defaultValue : field.defaultValue;
|
|
141
141
|
if (defaultValue) {
|
|
142
142
|
defaultValues[field.name] = field.defaultValue;
|
|
143
143
|
}
|
|
@@ -19,6 +19,7 @@ let EzScroller = class {
|
|
|
19
19
|
index.registerInstance(this, hostRef);
|
|
20
20
|
this._classHidden = "ez-scroller__shadow--hidden";
|
|
21
21
|
this.isFirefox = false;
|
|
22
|
+
this.isActive = false;
|
|
22
23
|
/**
|
|
23
24
|
* Define se o `scroll` estará bloqueado.
|
|
24
25
|
*/
|
|
@@ -34,7 +35,7 @@ let EzScroller = class {
|
|
|
34
35
|
getContainerClass() {
|
|
35
36
|
return `ez-scroller__container ez-scroller__container--${this.direction}
|
|
36
37
|
${this.locked ? " ez-scroller__container--locked" : ""}
|
|
37
|
-
${this.isFirefox ? " ez-scroller__container--no-overlay" : ""}
|
|
38
|
+
${this.isFirefox && this.isActive ? " ez-scroller__container--no-overlay" : ""}
|
|
38
39
|
`;
|
|
39
40
|
}
|
|
40
41
|
getShadowStartClass() {
|
|
@@ -63,6 +64,7 @@ let EzScroller = class {
|
|
|
63
64
|
this._startHidden = container.scrollTop > 0;
|
|
64
65
|
}
|
|
65
66
|
this._endHidden = remainingScroll > 0;
|
|
67
|
+
this.isActive = this._startHidden || this._endHidden;
|
|
66
68
|
const shadowPositions = ["", "start", "end", "middle"];
|
|
67
69
|
const currentPosition = shadowPositions[Number(this._startHidden) | Number(this._endHidden) << 1];
|
|
68
70
|
if (currentPosition === "start") {
|
|
@@ -83,6 +85,17 @@ let EzScroller = class {
|
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
}
|
|
88
|
+
configResize() {
|
|
89
|
+
const container = this._container;
|
|
90
|
+
if (container == undefined) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (this._resizeObserver != undefined) {
|
|
94
|
+
this._resizeObserver.unobserve(container);
|
|
95
|
+
}
|
|
96
|
+
this._resizeObserver = new ResizeObserver(core.JSUtils.debounce(this.updateShadow.bind(this), 200));
|
|
97
|
+
this._resizeObserver.observe(container);
|
|
98
|
+
}
|
|
86
99
|
//---------------------------------------------
|
|
87
100
|
// Event handlers
|
|
88
101
|
//---------------------------------------------
|
|
@@ -133,6 +146,7 @@ let EzScroller = class {
|
|
|
133
146
|
}
|
|
134
147
|
if (this._container && this.activeShadow) {
|
|
135
148
|
this._container.onscroll = this.updateShadow.bind(this);
|
|
149
|
+
this.configResize();
|
|
136
150
|
this.updateShadow();
|
|
137
151
|
}
|
|
138
152
|
}
|
|
@@ -196,6 +196,7 @@ let EzTextInput = class {
|
|
|
196
196
|
this._labelElem.classList.add("input__label--right");
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
+
slot.name && core.ElementIDUtils.addIDInfo(content, slot.name);
|
|
199
200
|
}
|
|
200
201
|
this.observeErrorMessage();
|
|
201
202
|
}
|
|
@@ -236,7 +237,7 @@ let EzTextInput = class {
|
|
|
236
237
|
return (index.h(index.Host, null, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
237
238
|
index.h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
238
239
|
: null, index.h("input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
239
|
-
index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
240
|
+
index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": core.ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
|
|
240
241
|
}
|
|
241
242
|
get _hostElement() { return index.getElement(this); }
|
|
242
243
|
static get watchers() { return {
|
package/dist/cjs/ezui.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ez-actions-button.cjs",[[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],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"validate":[64]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["ez-actions-button.cjs",[[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],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"validate":[64]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ez-actions-button.cjs",[[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],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"validate":[64]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["ez-actions-button.cjs",[[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],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"validate":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -342,9 +342,13 @@ export class EzComboBox {
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
componentDidRender() {
|
|
345
|
+
var _a;
|
|
345
346
|
if (this._floatingID === undefined) {
|
|
346
347
|
this._listWrapper.remove();
|
|
347
348
|
}
|
|
349
|
+
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
350
|
+
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
351
|
+
});
|
|
348
352
|
}
|
|
349
353
|
componentDidLoad() {
|
|
350
354
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
@@ -108,7 +108,7 @@ export const buildFromConfig = (config, dataUnit) => {
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
(_b = config === null || config === void 0 ? void 0 : config.fields) === null || _b === void 0 ? void 0 : _b.forEach((field) => {
|
|
111
|
-
var _a, _b, _c;
|
|
111
|
+
var _a, _b, _c, _d;
|
|
112
112
|
if (field.visible !== false) {
|
|
113
113
|
const tabConfig = getTabConfig(field.tab || "__main", sheets);
|
|
114
114
|
if (hiddenTabs.has(tabConfig.label)) {
|
|
@@ -124,10 +124,10 @@ export const buildFromConfig = (config, dataUnit) => {
|
|
|
124
124
|
requiredFields.push(field.name);
|
|
125
125
|
}
|
|
126
126
|
const cleanOnCopy = field.cleanOnCopy == undefined ? (_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy : field.cleanOnCopy;
|
|
127
|
-
if (cleanOnCopy || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum)) {
|
|
127
|
+
if (cleanOnCopy || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum) || ((_c = descriptor.properties) === null || _c === void 0 ? void 0 : _c.cleanOnCopy)) {
|
|
128
128
|
cleanOnCopyFields.push(field.name);
|
|
129
129
|
}
|
|
130
|
-
const defaultValue = field.defaultValue == undefined ? (
|
|
130
|
+
const defaultValue = field.defaultValue == undefined ? (_d = descriptor.properties) === null || _d === void 0 ? void 0 : _d.defaultValue : field.defaultValue;
|
|
131
131
|
if (defaultValue) {
|
|
132
132
|
defaultValues[field.name] = field.defaultValue;
|
|
133
133
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { UserAgentUtils } from '@sankhyalabs/core';
|
|
1
|
+
import { JSUtils, UserAgentUtils } from '@sankhyalabs/core';
|
|
2
2
|
import { Component, h, Host, Listen, Prop, State } from '@stencil/core';
|
|
3
3
|
import { EzScrollDirection } from './EzScrollDirection';
|
|
4
4
|
export class EzScroller {
|
|
5
5
|
constructor() {
|
|
6
6
|
this._classHidden = "ez-scroller__shadow--hidden";
|
|
7
7
|
this.isFirefox = false;
|
|
8
|
+
this.isActive = false;
|
|
8
9
|
/**
|
|
9
10
|
* Define se o `scroll` estará bloqueado.
|
|
10
11
|
*/
|
|
@@ -20,7 +21,7 @@ export class EzScroller {
|
|
|
20
21
|
getContainerClass() {
|
|
21
22
|
return `ez-scroller__container ez-scroller__container--${this.direction}
|
|
22
23
|
${this.locked ? " ez-scroller__container--locked" : ""}
|
|
23
|
-
${this.isFirefox ? " ez-scroller__container--no-overlay" : ""}
|
|
24
|
+
${this.isFirefox && this.isActive ? " ez-scroller__container--no-overlay" : ""}
|
|
24
25
|
`;
|
|
25
26
|
}
|
|
26
27
|
getShadowStartClass() {
|
|
@@ -49,6 +50,7 @@ export class EzScroller {
|
|
|
49
50
|
this._startHidden = container.scrollTop > 0;
|
|
50
51
|
}
|
|
51
52
|
this._endHidden = remainingScroll > 0;
|
|
53
|
+
this.isActive = this._startHidden || this._endHidden;
|
|
52
54
|
const shadowPositions = ["", "start", "end", "middle"];
|
|
53
55
|
const currentPosition = shadowPositions[Number(this._startHidden) | Number(this._endHidden) << 1];
|
|
54
56
|
if (currentPosition === "start") {
|
|
@@ -69,6 +71,17 @@ export class EzScroller {
|
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
73
|
}
|
|
74
|
+
configResize() {
|
|
75
|
+
const container = this._container;
|
|
76
|
+
if (container == undefined) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (this._resizeObserver != undefined) {
|
|
80
|
+
this._resizeObserver.unobserve(container);
|
|
81
|
+
}
|
|
82
|
+
this._resizeObserver = new ResizeObserver(JSUtils.debounce(this.updateShadow.bind(this), 200));
|
|
83
|
+
this._resizeObserver.observe(container);
|
|
84
|
+
}
|
|
72
85
|
//---------------------------------------------
|
|
73
86
|
// Event handlers
|
|
74
87
|
//---------------------------------------------
|
|
@@ -119,6 +132,7 @@ export class EzScroller {
|
|
|
119
132
|
}
|
|
120
133
|
if (this._container && this.activeShadow) {
|
|
121
134
|
this._container.onscroll = this.updateShadow.bind(this);
|
|
135
|
+
this.configResize();
|
|
122
136
|
this.updateShadow();
|
|
123
137
|
}
|
|
124
138
|
}
|
|
@@ -200,7 +214,8 @@ export class EzScroller {
|
|
|
200
214
|
}
|
|
201
215
|
}; }
|
|
202
216
|
static get states() { return {
|
|
203
|
-
"isFirefox": {}
|
|
217
|
+
"isFirefox": {},
|
|
218
|
+
"isActive": {}
|
|
204
219
|
}; }
|
|
205
220
|
static get listeners() { return [{
|
|
206
221
|
"name": "click",
|
|
@@ -187,6 +187,7 @@ export class EzTextInput {
|
|
|
187
187
|
this._labelElem.classList.add("input__label--right");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
+
slot.name && ElementIDUtils.addIDInfo(content, slot.name);
|
|
190
191
|
}
|
|
191
192
|
this.observeErrorMessage();
|
|
192
193
|
}
|
|
@@ -232,7 +233,7 @@ export class EzTextInput {
|
|
|
232
233
|
h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }),
|
|
233
234
|
h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
234
235
|
this.canShowError && this.mode != "slim" &&
|
|
235
|
-
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
236
|
+
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
|
|
236
237
|
}
|
|
237
238
|
static get is() { return "ez-text-input"; }
|
|
238
239
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { FloatingManager, ElementIDUtils, StringUtils as StringUtils$1, DateUtils as DateUtils$1, TimeFormatter, UserInterface, Action, WaitingChangeException, ApplicationContext, DataUnitAction, DataUnit, ObjectUtils as ObjectUtils$1, NumberUtils as NumberUtils$1, DataType, SortMode, UserAgentUtils, MaskFormatter } from '@sankhyalabs/core';
|
|
3
|
+
import { FloatingManager, ElementIDUtils, StringUtils as StringUtils$1, DateUtils as DateUtils$1, TimeFormatter, UserInterface, Action, WaitingChangeException, ApplicationContext, DataUnitAction, DataUnit, ObjectUtils as ObjectUtils$1, NumberUtils as NumberUtils$1, DataType, SortMode, JSUtils, UserAgentUtils, MaskFormatter } from '@sankhyalabs/core';
|
|
4
4
|
|
|
5
5
|
var DialogType;
|
|
6
6
|
(function (DialogType) {
|
|
@@ -1370,9 +1370,13 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
1372
|
componentDidRender() {
|
|
1373
|
+
var _a;
|
|
1373
1374
|
if (this._floatingID === undefined) {
|
|
1374
1375
|
this._listWrapper.remove();
|
|
1375
1376
|
}
|
|
1377
|
+
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
1378
|
+
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
1379
|
+
});
|
|
1376
1380
|
}
|
|
1377
1381
|
componentDidLoad() {
|
|
1378
1382
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
@@ -2170,7 +2174,7 @@ const buildFromConfig = (config, dataUnit) => {
|
|
|
2170
2174
|
}
|
|
2171
2175
|
});
|
|
2172
2176
|
(_b = config === null || config === void 0 ? void 0 : config.fields) === null || _b === void 0 ? void 0 : _b.forEach((field) => {
|
|
2173
|
-
var _a, _b, _c;
|
|
2177
|
+
var _a, _b, _c, _d;
|
|
2174
2178
|
if (field.visible !== false) {
|
|
2175
2179
|
const tabConfig = getTabConfig(field.tab || "__main", sheets);
|
|
2176
2180
|
if (hiddenTabs.has(tabConfig.label)) {
|
|
@@ -2186,10 +2190,10 @@ const buildFromConfig = (config, dataUnit) => {
|
|
|
2186
2190
|
requiredFields.push(field.name);
|
|
2187
2191
|
}
|
|
2188
2192
|
const cleanOnCopy = field.cleanOnCopy == undefined ? (_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy : field.cleanOnCopy;
|
|
2189
|
-
if (cleanOnCopy || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum)) {
|
|
2193
|
+
if (cleanOnCopy || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum) || ((_c = descriptor.properties) === null || _c === void 0 ? void 0 : _c.cleanOnCopy)) {
|
|
2190
2194
|
cleanOnCopyFields.push(field.name);
|
|
2191
2195
|
}
|
|
2192
|
-
const defaultValue = field.defaultValue == undefined ? (
|
|
2196
|
+
const defaultValue = field.defaultValue == undefined ? (_d = descriptor.properties) === null || _d === void 0 ? void 0 : _d.defaultValue : field.defaultValue;
|
|
2193
2197
|
if (defaultValue) {
|
|
2194
2198
|
defaultValues[field.name] = field.defaultValue;
|
|
2195
2199
|
}
|
|
@@ -119660,6 +119664,7 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119660
119664
|
this.__attachShadow();
|
|
119661
119665
|
this._classHidden = "ez-scroller__shadow--hidden";
|
|
119662
119666
|
this.isFirefox = false;
|
|
119667
|
+
this.isActive = false;
|
|
119663
119668
|
/**
|
|
119664
119669
|
* Define se o `scroll` estará bloqueado.
|
|
119665
119670
|
*/
|
|
@@ -119675,7 +119680,7 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119675
119680
|
getContainerClass() {
|
|
119676
119681
|
return `ez-scroller__container ez-scroller__container--${this.direction}
|
|
119677
119682
|
${this.locked ? " ez-scroller__container--locked" : ""}
|
|
119678
|
-
${this.isFirefox ? " ez-scroller__container--no-overlay" : ""}
|
|
119683
|
+
${this.isFirefox && this.isActive ? " ez-scroller__container--no-overlay" : ""}
|
|
119679
119684
|
`;
|
|
119680
119685
|
}
|
|
119681
119686
|
getShadowStartClass() {
|
|
@@ -119704,6 +119709,7 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119704
119709
|
this._startHidden = container.scrollTop > 0;
|
|
119705
119710
|
}
|
|
119706
119711
|
this._endHidden = remainingScroll > 0;
|
|
119712
|
+
this.isActive = this._startHidden || this._endHidden;
|
|
119707
119713
|
const shadowPositions = ["", "start", "end", "middle"];
|
|
119708
119714
|
const currentPosition = shadowPositions[Number(this._startHidden) | Number(this._endHidden) << 1];
|
|
119709
119715
|
if (currentPosition === "start") {
|
|
@@ -119724,6 +119730,17 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119724
119730
|
}
|
|
119725
119731
|
}
|
|
119726
119732
|
}
|
|
119733
|
+
configResize() {
|
|
119734
|
+
const container = this._container;
|
|
119735
|
+
if (container == undefined) {
|
|
119736
|
+
return;
|
|
119737
|
+
}
|
|
119738
|
+
if (this._resizeObserver != undefined) {
|
|
119739
|
+
this._resizeObserver.unobserve(container);
|
|
119740
|
+
}
|
|
119741
|
+
this._resizeObserver = new ResizeObserver(JSUtils.debounce(this.updateShadow.bind(this), 200));
|
|
119742
|
+
this._resizeObserver.observe(container);
|
|
119743
|
+
}
|
|
119727
119744
|
//---------------------------------------------
|
|
119728
119745
|
// Event handlers
|
|
119729
119746
|
//---------------------------------------------
|
|
@@ -119774,6 +119791,7 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119774
119791
|
}
|
|
119775
119792
|
if (this._container && this.activeShadow) {
|
|
119776
119793
|
this._container.onscroll = this.updateShadow.bind(this);
|
|
119794
|
+
this.configResize();
|
|
119777
119795
|
this.updateShadow();
|
|
119778
119796
|
}
|
|
119779
119797
|
}
|
|
@@ -120573,6 +120591,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
120573
120591
|
this._labelElem.classList.add("input__label--right");
|
|
120574
120592
|
}
|
|
120575
120593
|
}
|
|
120594
|
+
slot.name && ElementIDUtils.addIDInfo(content, slot.name);
|
|
120576
120595
|
}
|
|
120577
120596
|
this.observeErrorMessage();
|
|
120578
120597
|
}
|
|
@@ -120613,7 +120632,7 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
120613
120632
|
return (h(Host, null, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
120614
120633
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
120615
120634
|
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
120616
|
-
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
120635
|
+
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
|
|
120617
120636
|
}
|
|
120618
120637
|
get _hostElement() { return this; }
|
|
120619
120638
|
static get watchers() { return {
|
|
@@ -121350,7 +121369,7 @@ const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-nu
|
|
|
121350
121369
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"]}]);
|
|
121351
121370
|
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"]}]);
|
|
121352
121371
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
121353
|
-
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
121372
|
+
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
121354
121373
|
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513]}]);
|
|
121355
121374
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
121356
121375
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513]}]);
|
|
@@ -348,9 +348,13 @@ let EzComboBox = class {
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
componentDidRender() {
|
|
351
|
+
var _a;
|
|
351
352
|
if (this._floatingID === undefined) {
|
|
352
353
|
this._listWrapper.remove();
|
|
353
354
|
}
|
|
355
|
+
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
356
|
+
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
357
|
+
});
|
|
354
358
|
}
|
|
355
359
|
componentDidLoad() {
|
|
356
360
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
@@ -114,7 +114,7 @@ const buildFromConfig = (config, dataUnit) => {
|
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
116
|
(_b = config === null || config === void 0 ? void 0 : config.fields) === null || _b === void 0 ? void 0 : _b.forEach((field) => {
|
|
117
|
-
var _a, _b, _c;
|
|
117
|
+
var _a, _b, _c, _d;
|
|
118
118
|
if (field.visible !== false) {
|
|
119
119
|
const tabConfig = getTabConfig(field.tab || "__main", sheets);
|
|
120
120
|
if (hiddenTabs.has(tabConfig.label)) {
|
|
@@ -130,10 +130,10 @@ const buildFromConfig = (config, dataUnit) => {
|
|
|
130
130
|
requiredFields.push(field.name);
|
|
131
131
|
}
|
|
132
132
|
const cleanOnCopy = field.cleanOnCopy == undefined ? (_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy : field.cleanOnCopy;
|
|
133
|
-
if (cleanOnCopy || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum)) {
|
|
133
|
+
if (cleanOnCopy || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum) || ((_c = descriptor.properties) === null || _c === void 0 ? void 0 : _c.cleanOnCopy)) {
|
|
134
134
|
cleanOnCopyFields.push(field.name);
|
|
135
135
|
}
|
|
136
|
-
const defaultValue = field.defaultValue == undefined ? (
|
|
136
|
+
const defaultValue = field.defaultValue == undefined ? (_d = descriptor.properties) === null || _d === void 0 ? void 0 : _d.defaultValue : field.defaultValue;
|
|
137
137
|
if (defaultValue) {
|
|
138
138
|
defaultValues[field.name] = field.defaultValue;
|
|
139
139
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-7bc778b3.js';
|
|
2
|
-
import { UserAgentUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { JSUtils, UserAgentUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
var EzScrollDirection;
|
|
5
5
|
(function (EzScrollDirection) {
|
|
@@ -15,6 +15,7 @@ let EzScroller = class {
|
|
|
15
15
|
registerInstance(this, hostRef);
|
|
16
16
|
this._classHidden = "ez-scroller__shadow--hidden";
|
|
17
17
|
this.isFirefox = false;
|
|
18
|
+
this.isActive = false;
|
|
18
19
|
/**
|
|
19
20
|
* Define se o `scroll` estará bloqueado.
|
|
20
21
|
*/
|
|
@@ -30,7 +31,7 @@ let EzScroller = class {
|
|
|
30
31
|
getContainerClass() {
|
|
31
32
|
return `ez-scroller__container ez-scroller__container--${this.direction}
|
|
32
33
|
${this.locked ? " ez-scroller__container--locked" : ""}
|
|
33
|
-
${this.isFirefox ? " ez-scroller__container--no-overlay" : ""}
|
|
34
|
+
${this.isFirefox && this.isActive ? " ez-scroller__container--no-overlay" : ""}
|
|
34
35
|
`;
|
|
35
36
|
}
|
|
36
37
|
getShadowStartClass() {
|
|
@@ -59,6 +60,7 @@ let EzScroller = class {
|
|
|
59
60
|
this._startHidden = container.scrollTop > 0;
|
|
60
61
|
}
|
|
61
62
|
this._endHidden = remainingScroll > 0;
|
|
63
|
+
this.isActive = this._startHidden || this._endHidden;
|
|
62
64
|
const shadowPositions = ["", "start", "end", "middle"];
|
|
63
65
|
const currentPosition = shadowPositions[Number(this._startHidden) | Number(this._endHidden) << 1];
|
|
64
66
|
if (currentPosition === "start") {
|
|
@@ -79,6 +81,17 @@ let EzScroller = class {
|
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
}
|
|
84
|
+
configResize() {
|
|
85
|
+
const container = this._container;
|
|
86
|
+
if (container == undefined) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (this._resizeObserver != undefined) {
|
|
90
|
+
this._resizeObserver.unobserve(container);
|
|
91
|
+
}
|
|
92
|
+
this._resizeObserver = new ResizeObserver(JSUtils.debounce(this.updateShadow.bind(this), 200));
|
|
93
|
+
this._resizeObserver.observe(container);
|
|
94
|
+
}
|
|
82
95
|
//---------------------------------------------
|
|
83
96
|
// Event handlers
|
|
84
97
|
//---------------------------------------------
|
|
@@ -129,6 +142,7 @@ let EzScroller = class {
|
|
|
129
142
|
}
|
|
130
143
|
if (this._container && this.activeShadow) {
|
|
131
144
|
this._container.onscroll = this.updateShadow.bind(this);
|
|
145
|
+
this.configResize();
|
|
132
146
|
this.updateShadow();
|
|
133
147
|
}
|
|
134
148
|
}
|
|
@@ -192,6 +192,7 @@ let EzTextInput = class {
|
|
|
192
192
|
this._labelElem.classList.add("input__label--right");
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
+
slot.name && ElementIDUtils.addIDInfo(content, slot.name);
|
|
195
196
|
}
|
|
196
197
|
this.observeErrorMessage();
|
|
197
198
|
}
|
|
@@ -232,7 +233,7 @@ let EzTextInput = class {
|
|
|
232
233
|
return (h(Host, null, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
233
234
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
234
235
|
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
235
|
-
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
236
|
+
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
|
|
236
237
|
}
|
|
237
238
|
get _hostElement() { return getElement(this); }
|
|
238
239
|
static get watchers() { return {
|
package/dist/esm/ezui.js
CHANGED
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["ez-actions-button",[[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],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"show":[64]}]]],["ez-filter-input",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["ez-modal-container",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application",[[0,"ez-application"]]],["ez-card-item",[[1,"ez-card-item",{"item":[16]}]]],["ez-list",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller",[[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"validate":[64]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["ez-actions-button",[[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],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"show":[64]}]]],["ez-filter-input",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["ez-modal-container",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application",[[0,"ez-application"]]],["ez-card-item",[[1,"ez-card-item",{"item":[16]}]]],["ez-list",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller",[[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"validate":[64]}]]]], options);
|
|
17
17
|
});
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["ez-actions-button",[[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],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"show":[64]}]]],["ez-filter-input",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["ez-modal-container",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application",[[0,"ez-application"]]],["ez-card-item",[[1,"ez-card-item",{"item":[16]}]]],["ez-list",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller",[[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"validate":[64]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["ez-actions-button",[[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],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"show":[64]}]]],["ez-filter-input",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["ez-modal-container",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application",[[0,"ez-application"]]],["ez-card-item",[[1,"ez-card-item",{"item":[16]}]]],["ez-list",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller",[[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isFirefox":[32],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"validate":[64]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
package/dist/ezui/ezui.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-3c7ea91b.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-a34b52f8",[[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],hideActions:[64],isOpened:[64]}]]],["p-f13f3123",[[1,"ez-dialog",{confirm:[1028],dialogType:[1025,"dialog-type"],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],show:[64]}]]],["p-123a2bd5",[[1,"ez-filter-input",{label:[1],value:[1537],enabled:[4],errorMessage:[1537,"error-message"],restrict:[1],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-4c061e51",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],config:[1040],serverUrl:[1,"server-url"],dataUnit:[16],statusResolver:[16],_paginationInfo:[32],_paginationChangedByKeyboard:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64],quickFilter:[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["p-739d60d1",[[6,"ez-modal-container",{modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],showTitleBar:[4,"show-title-bar"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],cancelButtonStatus:[1,"cancel-button-status"],okButtonStatus:[1,"ok-button-status"]}]]],["p-9def6fd0",[[1,"ez-chip",{label:[513],enabled:[516],removePosition:[513,"remove-position"],mode:[513],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-1cc11468",[[0,"ez-application"]]],["p-3cfefc57",[[1,"ez-card-item",{item:[16]}]]],["p-6d0b9d3c",[[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],clearHistory:[64],scrollToTop:[64],setSelection:[64],getSelection:[64],getList:[64]}]]],["p-f6111077",[[1,"ez-loading-bar",{_showLoading:[32],hide:[64],show:[64]}]]],["p-7c227b86",[[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-bffae598",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],innerElement:[1537,"inner-element"],updatePosition:[64],show:[64],hide:[64]}]]],["p-cfcc23e6",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[516,"use-header"],heightMode:[513,"height-mode"],ezTitle:[1,"ez-title"]}]]],["p-5cb4b43b",[[1,"ez-radio-button",{value:[1544],options:[1040],enabled:[516],label:[513],direction:[1537]}]]],["p-
|
|
1
|
+
import{p as e,b as o}from"./p-3c7ea91b.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-a34b52f8",[[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],hideActions:[64],isOpened:[64]}]]],["p-f13f3123",[[1,"ez-dialog",{confirm:[1028],dialogType:[1025,"dialog-type"],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],show:[64]}]]],["p-123a2bd5",[[1,"ez-filter-input",{label:[1],value:[1537],enabled:[4],errorMessage:[1537,"error-message"],restrict:[1],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-4c061e51",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],config:[1040],serverUrl:[1,"server-url"],dataUnit:[16],statusResolver:[16],_paginationInfo:[32],_paginationChangedByKeyboard:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64],quickFilter:[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["p-739d60d1",[[6,"ez-modal-container",{modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],showTitleBar:[4,"show-title-bar"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],cancelButtonStatus:[1,"cancel-button-status"],okButtonStatus:[1,"ok-button-status"]}]]],["p-9def6fd0",[[1,"ez-chip",{label:[513],enabled:[516],removePosition:[513,"remove-position"],mode:[513],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-1cc11468",[[0,"ez-application"]]],["p-3cfefc57",[[1,"ez-card-item",{item:[16]}]]],["p-6d0b9d3c",[[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],clearHistory:[64],scrollToTop:[64],setSelection:[64],getSelection:[64],getList:[64]}]]],["p-f6111077",[[1,"ez-loading-bar",{_showLoading:[32],hide:[64],show:[64]}]]],["p-7c227b86",[[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-bffae598",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],innerElement:[1537,"inner-element"],updatePosition:[64],show:[64],hide:[64]}]]],["p-cfcc23e6",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[516,"use-header"],heightMode:[513,"height-mode"],ezTitle:[1,"ez-title"]}]]],["p-5cb4b43b",[[1,"ez-radio-button",{value:[1544],options:[1040],enabled:[516],label:[513],direction:[1537]}]]],["p-bd9d791c",[[1,"ez-scroller",{direction:[1],locked:[4],activeShadow:[4,"active-shadow"],isFirefox:[32],isActive:[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["p-482c3dd8",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],canClose:[1028,"can-close"],show:[64]}]]],["p-04fab1e9",[[0,"ez-view-stack",{show:[64],getSelectedIndex:[64]}]]],["p-9334a724",[[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],errorMessage:[1537,"error-message"],mask:[1],canShowError:[516,"can-show-error"],restrict:[1],mode:[513],noBorder:[516,"no-border"],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-abcd17e6",[[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],headerAlign:[513,"header-align"],removable:[516],editable:[516],conditionalSave:[16],_activeEditText:[32],showHide:[64],applyFocusTextEdit:[64],cancelEdition:[64]}]]],["p-ad5fe50b",[[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressEmptyOption:[4,"suppress-empty-option"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-7e496975",[[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-7b906805",[[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-ea877274",[[1,"ez-time-input",{label:[513],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-1a89d3ff",[[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-941e9792",[[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],_processedTabs:[32]}]]],["p-f2c4e811",[[1,"ez-check",{label:[513],value:[1540],enabled:[1540],indeterminate:[516],mode:[513],getMode:[64],setFocus:[64]}]]],["p-f2627de5",[[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],errorMessage:[1537,"error-message"],rows:[1538],canShowError:[516,"can-show-error"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-a713a1aa",[[1,"ez-upload",{label:[1],enabled:[4],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],requestHeaders:[8,"request-headers"],urlUpload:[1,"url-upload"],urlDelete:[1,"url-delete"],value:[1040],addFiles:[64],setFocus:[64],setBlur:[64]}]]],["p-01b79946",[[1,"ez-text-edit",{value:[1],styled:[16],_newValue:[32],applyFocusSelect:[64]}]]],["p-590d9e91",[[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressSearch:[4,"suppress-search"],optionLoader:[16],suppressEmptyOption:[4,"suppress-empty-option"],canShowError:[516,"can-show-error"],mode:[513],_preSelection:[32],_visibleOptions:[32],_startLoading:[32],_showLoading:[32],_criteria:[32],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-9d57e44a",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]],["p-87ee59e8",[[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}]]],["p-a2e55b33",[[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513],setFocus:[64],setBlur:[64]}]]],["p-05dbdaeb",[[0,"ez-form",{dataUnit:[1040],config:[16],recordsValidator:[16],validate:[64]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as i,f as n,H as s,g as l}from"./p-3c7ea91b.js";import{UserInterface as r,Action as a,WaitingChangeException as o,ApplicationContext as c,StringUtils as d,DataUnitAction as h,DataUnit as u,ElementIDUtils as f}from"@sankhyalabs/core";import{C as b}from"./p-b853763b.js";import{A as p}from"./p-0b44cf1c.js";import"./p-e1148f5c.js";class m{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}getSheet(e){return this._sheets.get(e)}getAllSheets(){return this._sheets}addSheet(e){this._sheets.set(e.name,e),this._requiredFields=this._requiredFields.concat(e.requiredFields),this._cleanOnCopyFields=this._cleanOnCopyFields.concat(e.cleanOnCopyFields),this._defaultValues=e.defaultValues}getRequiredFields(){return this._requiredFields}getCleanOnCopyFields(){return this._cleanOnCopyFields}getDefaultValues(){return this._defaultValues}}const v=(e,t)=>!!e.required||(null==t?void 0:t.required);function z(e,t){return"__main"==e[0].label?-1:(e[0].order||1e4)-(t[0].order||1e4)}function y(e,t,i){const n={config:t,descriptor:i};let s=(null==t?void 0:t.group)||i.group;if(s){const t=`group::${s}`;e.has(t)?e.get(t).items.push(n):e.set(t,{label:s,items:[n]})}else e.set((null==t?void 0:t.name)||i.name,n)}const g=({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-text-input",{label:i,"data-field-name":t,key:t,enabled:!n}));function _(t,i,n,s=!1){return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large"},e("ez-check",{enabled:!n,label:i,mode:s?b.SWITCH:b.REGULAR,"data-field-name":t,key:t}))}function w(t,i,n,s,l){return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-number-input",{enabled:!n,label:i,precision:s,prettyPrecision:l,"data-field-name":t,key:t}))}const O=new Map;O.set(r.LONGTEXT,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small",key:t},e("ez-text-area",{enabled:!n,label:i,"data-field-name":t})))),O.set(r.CHECKBOX,(e=>_(e.name,e.label,e.readOnly,!1))),O.set(r.SWITCH,(e=>_(e.name,e.label,e.readOnly,!0))),O.set(r.OPTIONSELECTOR,(({name:t,label:i,readOnly:n,required:s},l)=>{const r=null==l?void 0:l.options;let a;if("string"==typeof r){const e=JSON.parse(r);a=Object.keys(e).map((t=>({value:t,label:e[t]})))}else a=r;return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-combo-box",{enabled:!n,suppressEmptyOption:s,label:i,"data-field-name":t,key:t,options:a}))})),O.set(r.SEARCH,(({name:t,label:i,readOnly:n,required:s})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-search",{enabled:!n,suppressEmptyOption:s,label:i,"data-field-name":t,key:t})))),O.set(r.FILE,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-upload",{enabled:!n,label:i,"data-field-name":t,key:t})))),O.set(r.DATE,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-date-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),O.set(r.TIME,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-time-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),O.set(r.DATETIME,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-date-time-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),O.set(r.DECIMALNUMBER,(({name:e,label:t,readOnly:i},n)=>{const s=Number((null==n?void 0:n.precision)||2);return w(e,t,i,s,Number((null==n?void 0:n.prettyPrecision)||s))})),O.set(r.INTEGERNUMBER,(({name:e,label:t,readOnly:i})=>w(e,t,i,0,0)));const E=e=>{const t=e.descriptor,i=Object.assign({},e.config);let n,s;return t&&(i.label||(i.label=t.label),i.name||(i.name=t.name),i.required=v(t,i),i.readOnly=((e,t)=>!!e.readOnly||(null==t?void 0:t.readOnly))(t,i),s=t.properties,n=O.get(t.userInterface)),i.required&&(i.label=`${i.label} (obrigatório) *`),n||(n=g),n(i,s)},A=({source:t})=>"items"in t?e("ez-collapsible-box",{label:t.label,"header-size":"large",key:t.label},t.items.map((e=>E(e)))):E(t),C=({store:t,source:i,dataElementId:n})=>e("div",{class:"dynamic-content ez-box__container","data-element-id":n},e("div",{class:"ez-row ez-padding-vertical--small"},i.items.map((i=>e(A,{store:t,source:i})))));function j(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var x="function"==typeof Symbol&&Symbol.observable||"@@observable",M=function(){return Math.random().toString(36).substring(7).split("").join(".")},R={INIT:"@@redux/INIT"+M(),REPLACE:"@@redux/REPLACE"+M(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+M()}};function k(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function S(e,t,i){var n;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(j(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(j(1));return i(S)(e,t)}if("function"!=typeof e)throw new Error(j(2));var s=e,l=t,r=[],a=r,o=!1;function c(){a===r&&(a=r.slice())}function d(){if(o)throw new Error(j(3));return l}function h(e){if("function"!=typeof e)throw new Error(j(4));if(o)throw new Error(j(5));var t=!0;return c(),a.push(e),function(){if(t){if(o)throw new Error(j(6));t=!1,c();var i=a.indexOf(e);a.splice(i,1),r=null}}}function u(e){if(!k(e))throw new Error(j(7));if(void 0===e.type)throw new Error(j(8));if(o)throw new Error(j(9));try{o=!0,l=s(l,e)}finally{o=!1}for(var t=r=a,i=0;i<t.length;i++)(0,t[i])();return e}function f(e){if("function"!=typeof e)throw new Error(j(10));s=e,u({type:R.REPLACE})}function b(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(j(11));function i(){e.next&&e.next(d())}return i(),{unsubscribe:t(i)}}})[x]=function(){return this},e}return u({type:R.INIT}),(n={dispatch:u,subscribe:h,getState:d,replaceReducer:f})[x]=b,n}const I={};function N(e=I,t){switch(t.type){case P.METADATA_LOADED:return Object.assign(Object.assign({},e),{formMetadata:t.payload,currentSheet:void 0});case P.CHANGE_TAB:return Object.assign(Object.assign({},e),{currentSheet:t.payload});default:return e}}function D(e){return e.formMetadata}var P;!function(e){e.METADATA_LOADED="FORM/METADATA_LOADED",e.CHANGE_TAB="FORM/CHANGE_TAB"}(P||(P={}));class L{constructor(e){this._invalidFields=new Map,this.onDataUnitEvent=e=>{var t;switch(e.type){case a.DATA_LOADED:case a.DATA_SAVED:case a.RECORDS_REMOVED:case a.RECORDS_ADDED:case a.RECORDS_COPIED:case a.EDITION_CANCELED:case a.SELECTION_CHANGED:case a.NEXT_SELECTED:case a.PREVIOUS_SELECTED:this.clearInvalid();case a.DATA_CHANGED:case a.CHANGE_UNDONE:case a.CHANGE_REDONE:case a.RECORD_LOADED:null===(t=this._fields)||void 0===t||t.forEach((e=>{this.updateValue(e.fieldName,e.field)}))}},this._fields=new Map,this._dataUnit=e,this._dataUnit.subscribe(this.onDataUnitEvent)}bind(e){e.forEach((e=>{this.updateBind(e.dataset.fieldName,e)}))}onDisconnectedCallback(){this._dataUnit.unsubscribe(this.onDataUnitEvent)}markInvalid(e){if(this._invalidFields.set(e.name,e),this._fields.has(e.name)){const t=this._fields.get(e.name).field;t.errorMessage||this.updateErrorMessage(e.name,t)}}clearInvalid(){this._invalidFields.clear(),this._fields.forEach((e=>{e.field.errorMessage=""}))}updateValue(e,t){const i=this._fields.get(e);try{i&&(i.listen=!1),t.value=this._dataUnit.getFieldValue(e),this.updateErrorMessage(e,t)}finally{i&&(i.listen=!0)}}updateErrorMessage(e,t){const i=this._invalidFields.get(e);i&&(t.errorMessage=i.message)}getErrorMessage(e){if(this._fields.has(e))return this._fields.get(e).field.errorMessage||null}updateBind(e,t){const i=this._fields.get(e);i&&i.destroy(),t.value=this._dataUnit.getFieldValue(e),this.updateErrorMessage(e,t),this._fields.set(e,T.create(e,t,((e,t)=>this.changeStarted(e,t)),(e=>this.cancelWaitingChange(e)),((e,t)=>this.setFieldValue(e,t)))),this.bindSearchOptionsLoader(e,t),this.applyEzUploadContext(e,t)}changeStarted(e,t){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),!t.blocking&&null==t.promise){const i=this._fields.get(e);i&&(t.promise=new Promise(((e,t)=>{i.waitingChangePromiseResolve=e,i.waitingChangePromiseReject=t})))}this._dataUnit.startChange(e,t)}cancelWaitingChange(e){if(this._dataUnit.waitingForChange(e)){this._dataUnit.cancelWaitingChange(e);const t=this._fields.get(e);t&&t.rejectWaitingChange(new o("Change canceled",e))}}setFieldValue(e,t){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._invalidFields.delete(e),this._dataUnit.setFieldValue(e,t),this._dataUnit.waitingForChange(e)){const t=this._fields.get(e);t&&t.acceptWaitingChange()}}bindSearchOptionsLoader(e,t){if("EZ-SEARCH"===t.nodeName&&null==t.optionLoader){const i=c.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");i&&(t.optionLoader=t=>i(t,e,this._dataUnit))}}applyEzUploadContext(e,t){var i,n;if("EZ-UPLOAD"===t.nodeName){t.urlUpload=c.getContextValue("__EZUI__UPLOAD__ADD__URL__"),t.urlDelete=c.getContextValue("__EZUI__UPLOAD__DEL__URL__");const s=this._dataUnit.getField(e),l=null===(i=s.properties)||void 0===i?void 0:i.DESTINATION;l&&(t.requestHeaders={XTRAINF:`{"destination": "${l}"}`}),t.maxFiles=(null===(n=s.properties)||void 0===n?void 0:n.MAX_FILES)||0}}}class T{constructor(){this.listen=!0,this.startChangeEventName="ezStartChange",this.cancelWaitingChangeEventName="ezCancelWaitingChange",this.changeEventName="ezChange"}destroy(){this.field.removeEventListener(this.startChangeEventName,this.startChangeListener),this.field.removeEventListener(this.cancelWaitingChangeEventName,this.cancelWaitingChangeListener),this.field.removeEventListener(this.changeEventName,this.changeListener)}acceptWaitingChange(){this.waitingChangePromiseResolve&&(this.waitingChangePromiseResolve(),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}rejectWaitingChange(e){this.waitingChangePromiseReject&&(this.waitingChangePromiseReject(e),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}static create(e,t,i,n,s){const l=new T;return l.field=t,l.fieldName=e,l.startChangeListener=t=>{l.listen&&i(e,t.detail)},l.field.addEventListener(l.startChangeEventName,l.startChangeListener),l.cancelWaitingChangeListener=()=>{l.listen&&n(e)},l.field.addEventListener(l.cancelWaitingChangeEventName,l.cancelWaitingChangeListener),l.changeListener=t=>{l.listen&&s(e,t.detail)},l.field.addEventListener(l.changeEventName,l.changeListener),l}}let U=class{constructor(e){t(this,e),this.ezReady=i(this,"ezReady",7),this.onDataUnitAction=e=>{e.type===a.METADATA_LOADED&&this.processMetadata()}}validate(){return new Promise(((e,t)=>{var i;const n=this.dataUnit.getModifiedRecords();for(let e=0;e<n.length;e++){const s=n[e],l=[];let r=this.validateRequired(s);if(r&&!r.isValid&&l.push(r),r=null===(i=this.recordsValidator)||void 0===i?void 0:i.validateRecord(this,s),r&&!r.isValid&&l.push(r),l.length>0){this.processValidationResult(l),t();break}}e()}))}observeConfig(){this.processMetadata()}validateRequired(e){const t=D(this._store.getState()),i=this._staticFields.filter((e=>e.dataset.required)).map((e=>e.dataset.fieldName)).concat(t.getRequiredFields()),n=[];if(new Set(i).forEach((t=>{const i=e[t];if(null==i||""===i){const e=this._dataBinder.getErrorMessage(t);n.push(e?{name:t,message:e}:{name:t,message:"Essa informação é obrigatória"})}})),n.length>0)return{isValid:!1,invalidFields:n,infoMessage:"Há pelo menos um campo obrigatório não preenchido."}}processValidationResult(e){e.forEach((e=>{const t=e.invalidFields;if(t&&t.forEach((e=>{this._dataBinder.markInvalid(e)})),e.infoMessage&&p.info(e.infoMessage),e.errorMessage){const{errorTitle:t,errorMessage:i}=e;p.error(t,i)}}))}getDynamicContent(){var t;const i=D(this._store.getState());if(!i)return null;const n=(s=null===(t=this._store)||void 0===t?void 0:t.getState()).currentSheet?s.formMetadata.getSheet(s.currentSheet):Array.from(s.formMetadata.getAllSheets().values())[0];var s;if(!n)return null;const l=Array.from(i.getAllSheets().values()),r=[];if(l.length>1){const t=l.map(((e,t)=>({tabKey:e.name,label:e.label,index:t}))),i="selector";r.push(e("ez-tabselector",{tabs:this.buildIdTabSelector(t),onEzChange:e=>this._store.dispatch(function(e){return{type:P.CHANGE_TAB,payload:e.tabKey}}(e.detail)),selectedTab:n.name,"data-element-id":i}))}const a=`${d.replaceAccentuatedChars(d.toCamelCase(n.label),!1)}_selectorContainer`;return r.push(e(C,{store:this._store,source:n,dataElementId:a})),r}processMetadata(){if(!this.isStatic()&&this.dataUnit){const e=null!=this.config&&Object.values(this.config).length>0?((e,t)=>{var i,n;const s=new Map,l=new Map,r=[],a=[],o={};null===(i=null==e?void 0:e.tabs)||void 0===i||i.forEach((e=>{l.has(e.label)||!1!==e.visible||l.set(e.label,e)})),null===(n=null==e?void 0:e.fields)||void 0===n||n.forEach((e=>{var i,n,c;if(!1!==e.visible){const d=function(e,t){return("string"==typeof e?Array.from(t.keys()).find((t=>t.label===e)):e)||{label:e,visible:!0}}(e.tab||"__main",s);if(l.has(d.label))return;const h=t.getField(e.name);if(h&&d.visible){s.has(d)||s.set(d,new Map);const t=s.get(d);v(h,e)&&r.push(e.name),((null==e.cleanOnCopy?null===(i=h.properties)||void 0===i?void 0:i.cleanOnCopy:e.cleanOnCopy)||(null===(n=h.properties)||void 0===n?void 0:n.autoNum))&&a.push(e.name),(null==e.defaultValue?null===(c=h.properties)||void 0===c?void 0:c.defaultValue:e.defaultValue)&&(o[e.name]=e.defaultValue),y(t,e,h)}}}));const c=new m;return Array.from(s.entries()).sort(z).forEach((([e,t])=>{c.addSheet({label:"__main"===e.label?"Principal":e.label,name:e.label,items:Array.from(t.values()),requiredFields:r,cleanOnCopyFields:a,defaultValues:o})})),c})(this.config,this.dataUnit):(()=>{var e,t;const i=this.dataUnit.metadata,n=new m;if(i){const s=null===(e=i.fields)||void 0===e?void 0:e.filter((e=>!1!==e.visible)),l=new Map;null===(t=null==i?void 0:i.fields)||void 0===t||t.forEach((e=>{!1!==e.visible&&y(l,null,e)}));let r={};s.filter((e=>e.defaultValue)).map((e=>r[e.name]=e.defaultValue)),n.addSheet({label:i.label,name:i.name,items:Array.from(l.values()),requiredFields:s.filter((e=>e.required)).map((e=>e.name)),cleanOnCopyFields:s.filter((e=>{var t,i;return(null===(t=e.properties)||void 0===t?void 0:t.cleanOnCopy)||(null===(i=e.properties)||void 0===i?void 0:i.autoNum)})).map((e=>e.name)),defaultValues:r})}return n})();this._store.dispatch({type:P.METADATA_LOADED,payload:e})}}isStatic(){var e;return(null===(e=this._staticFields)||void 0===e?void 0:e.length)>0}interceptAction(e){if(e.type===a.RECORDS_COPIED){const t=D(this._store.getState()).getCleanOnCopyFields();if(t)return new h(a.RECORDS_COPIED,e.payload.map((e=>{const i=Object.assign({},e);return t.forEach((e=>delete i[e])),i})))}if(e.type===a.SAVING_DATA)return new Promise((t=>{this.validate().then((()=>t(e))).catch((()=>{}))}));if(e.type===a.RECORDS_ADDED){const t=D(this._store.getState()).getDefaultValues();if(t)return new h(a.RECORDS_ADDED,e.payload.map((e=>{const i=Object.assign({},e);for(const e in t){const n="formattedValue"in t[e]?t[e].formattedValue:t[e].value,s=null!=n?n:t[e],l="function"==typeof s?s():s;i[e]=this.dataUnit.valueFromString(e,l)}return i})))}return e}componentWillLoad(){void 0===this.dataUnit&&(this.dataUnit=new u("ez-form")),this.dataUnit.addInterceptor(this),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new L(this.dataUnit),this._store=S(N),this._store.subscribe((()=>n(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata(),f.addIDInfo(this._element,null,{dataUnit:this.dataUnit})}componentDidRender(){this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]"))),this.ezReady.emit()}disconnectedCallback(){this.dataUnit.unsubscribe(this.onDataUnitAction),this.dataUnit.removeInterceptor(this),this._dataBinder.onDisconnectedCallback()}buildIdTabSelector(e){return e&&e.forEach((e=>e[f.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=d.toCamelCase(e.label))),e}render(){return e(s,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return l(this)}static get watchers(){return{config:["observeConfig"]}}};U.style="ez-form{display:flex;flex-direction:column;width:100%}.dynamic-content ez-collapsible-box{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{U as ez_form}
|
|
1
|
+
import{h as e,r as t,c as i,f as n,H as s,g as l}from"./p-3c7ea91b.js";import{UserInterface as r,Action as a,WaitingChangeException as o,ApplicationContext as c,StringUtils as d,DataUnitAction as h,DataUnit as u,ElementIDUtils as f}from"@sankhyalabs/core";import{C as b}from"./p-b853763b.js";import{A as p}from"./p-0b44cf1c.js";import"./p-e1148f5c.js";class m{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}getSheet(e){return this._sheets.get(e)}getAllSheets(){return this._sheets}addSheet(e){this._sheets.set(e.name,e),this._requiredFields=this._requiredFields.concat(e.requiredFields),this._cleanOnCopyFields=this._cleanOnCopyFields.concat(e.cleanOnCopyFields),this._defaultValues=e.defaultValues}getRequiredFields(){return this._requiredFields}getCleanOnCopyFields(){return this._cleanOnCopyFields}getDefaultValues(){return this._defaultValues}}const v=(e,t)=>!!e.required||(null==t?void 0:t.required);function z(e,t){return"__main"==e[0].label?-1:(e[0].order||1e4)-(t[0].order||1e4)}function y(e,t,i){const n={config:t,descriptor:i};let s=(null==t?void 0:t.group)||i.group;if(s){const t=`group::${s}`;e.has(t)?e.get(t).items.push(n):e.set(t,{label:s,items:[n]})}else e.set((null==t?void 0:t.name)||i.name,n)}const g=({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-text-input",{label:i,"data-field-name":t,key:t,enabled:!n}));function _(t,i,n,s=!1){return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large"},e("ez-check",{enabled:!n,label:i,mode:s?b.SWITCH:b.REGULAR,"data-field-name":t,key:t}))}function w(t,i,n,s,l){return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-number-input",{enabled:!n,label:i,precision:s,prettyPrecision:l,"data-field-name":t,key:t}))}const O=new Map;O.set(r.LONGTEXT,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small",key:t},e("ez-text-area",{enabled:!n,label:i,"data-field-name":t})))),O.set(r.CHECKBOX,(e=>_(e.name,e.label,e.readOnly,!1))),O.set(r.SWITCH,(e=>_(e.name,e.label,e.readOnly,!0))),O.set(r.OPTIONSELECTOR,(({name:t,label:i,readOnly:n,required:s},l)=>{const r=null==l?void 0:l.options;let a;if("string"==typeof r){const e=JSON.parse(r);a=Object.keys(e).map((t=>({value:t,label:e[t]})))}else a=r;return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-combo-box",{enabled:!n,suppressEmptyOption:s,label:i,"data-field-name":t,key:t,options:a}))})),O.set(r.SEARCH,(({name:t,label:i,readOnly:n,required:s})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-search",{enabled:!n,suppressEmptyOption:s,label:i,"data-field-name":t,key:t})))),O.set(r.FILE,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-upload",{enabled:!n,label:i,"data-field-name":t,key:t})))),O.set(r.DATE,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-date-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),O.set(r.TIME,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-time-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),O.set(r.DATETIME,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-date-time-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),O.set(r.DECIMALNUMBER,(({name:e,label:t,readOnly:i},n)=>{const s=Number((null==n?void 0:n.precision)||2);return w(e,t,i,s,Number((null==n?void 0:n.prettyPrecision)||s))})),O.set(r.INTEGERNUMBER,(({name:e,label:t,readOnly:i})=>w(e,t,i,0,0)));const E=e=>{const t=e.descriptor,i=Object.assign({},e.config);let n,s;return t&&(i.label||(i.label=t.label),i.name||(i.name=t.name),i.required=v(t,i),i.readOnly=((e,t)=>!!e.readOnly||(null==t?void 0:t.readOnly))(t,i),s=t.properties,n=O.get(t.userInterface)),i.required&&(i.label=`${i.label} (obrigatório) *`),n||(n=g),n(i,s)},A=({source:t})=>"items"in t?e("ez-collapsible-box",{label:t.label,"header-size":"large",key:t.label},t.items.map((e=>E(e)))):E(t),C=({store:t,source:i,dataElementId:n})=>e("div",{class:"dynamic-content ez-box__container","data-element-id":n},e("div",{class:"ez-row ez-padding-vertical--small"},i.items.map((i=>e(A,{store:t,source:i})))));function j(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var x="function"==typeof Symbol&&Symbol.observable||"@@observable",M=function(){return Math.random().toString(36).substring(7).split("").join(".")},R={INIT:"@@redux/INIT"+M(),REPLACE:"@@redux/REPLACE"+M(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+M()}};function k(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function S(e,t,i){var n;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(j(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(j(1));return i(S)(e,t)}if("function"!=typeof e)throw new Error(j(2));var s=e,l=t,r=[],a=r,o=!1;function c(){a===r&&(a=r.slice())}function d(){if(o)throw new Error(j(3));return l}function h(e){if("function"!=typeof e)throw new Error(j(4));if(o)throw new Error(j(5));var t=!0;return c(),a.push(e),function(){if(t){if(o)throw new Error(j(6));t=!1,c();var i=a.indexOf(e);a.splice(i,1),r=null}}}function u(e){if(!k(e))throw new Error(j(7));if(void 0===e.type)throw new Error(j(8));if(o)throw new Error(j(9));try{o=!0,l=s(l,e)}finally{o=!1}for(var t=r=a,i=0;i<t.length;i++)(0,t[i])();return e}function f(e){if("function"!=typeof e)throw new Error(j(10));s=e,u({type:R.REPLACE})}function b(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(j(11));function i(){e.next&&e.next(d())}return i(),{unsubscribe:t(i)}}})[x]=function(){return this},e}return u({type:R.INIT}),(n={dispatch:u,subscribe:h,getState:d,replaceReducer:f})[x]=b,n}const I={};function N(e=I,t){switch(t.type){case P.METADATA_LOADED:return Object.assign(Object.assign({},e),{formMetadata:t.payload,currentSheet:void 0});case P.CHANGE_TAB:return Object.assign(Object.assign({},e),{currentSheet:t.payload});default:return e}}function D(e){return e.formMetadata}var P;!function(e){e.METADATA_LOADED="FORM/METADATA_LOADED",e.CHANGE_TAB="FORM/CHANGE_TAB"}(P||(P={}));class L{constructor(e){this._invalidFields=new Map,this.onDataUnitEvent=e=>{var t;switch(e.type){case a.DATA_LOADED:case a.DATA_SAVED:case a.RECORDS_REMOVED:case a.RECORDS_ADDED:case a.RECORDS_COPIED:case a.EDITION_CANCELED:case a.SELECTION_CHANGED:case a.NEXT_SELECTED:case a.PREVIOUS_SELECTED:this.clearInvalid();case a.DATA_CHANGED:case a.CHANGE_UNDONE:case a.CHANGE_REDONE:case a.RECORD_LOADED:null===(t=this._fields)||void 0===t||t.forEach((e=>{this.updateValue(e.fieldName,e.field)}))}},this._fields=new Map,this._dataUnit=e,this._dataUnit.subscribe(this.onDataUnitEvent)}bind(e){e.forEach((e=>{this.updateBind(e.dataset.fieldName,e)}))}onDisconnectedCallback(){this._dataUnit.unsubscribe(this.onDataUnitEvent)}markInvalid(e){if(this._invalidFields.set(e.name,e),this._fields.has(e.name)){const t=this._fields.get(e.name).field;t.errorMessage||this.updateErrorMessage(e.name,t)}}clearInvalid(){this._invalidFields.clear(),this._fields.forEach((e=>{e.field.errorMessage=""}))}updateValue(e,t){const i=this._fields.get(e);try{i&&(i.listen=!1),t.value=this._dataUnit.getFieldValue(e),this.updateErrorMessage(e,t)}finally{i&&(i.listen=!0)}}updateErrorMessage(e,t){const i=this._invalidFields.get(e);i&&(t.errorMessage=i.message)}getErrorMessage(e){if(this._fields.has(e))return this._fields.get(e).field.errorMessage||null}updateBind(e,t){const i=this._fields.get(e);i&&i.destroy(),t.value=this._dataUnit.getFieldValue(e),this.updateErrorMessage(e,t),this._fields.set(e,T.create(e,t,((e,t)=>this.changeStarted(e,t)),(e=>this.cancelWaitingChange(e)),((e,t)=>this.setFieldValue(e,t)))),this.bindSearchOptionsLoader(e,t),this.applyEzUploadContext(e,t)}changeStarted(e,t){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),!t.blocking&&null==t.promise){const i=this._fields.get(e);i&&(t.promise=new Promise(((e,t)=>{i.waitingChangePromiseResolve=e,i.waitingChangePromiseReject=t})))}this._dataUnit.startChange(e,t)}cancelWaitingChange(e){if(this._dataUnit.waitingForChange(e)){this._dataUnit.cancelWaitingChange(e);const t=this._fields.get(e);t&&t.rejectWaitingChange(new o("Change canceled",e))}}setFieldValue(e,t){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._invalidFields.delete(e),this._dataUnit.setFieldValue(e,t),this._dataUnit.waitingForChange(e)){const t=this._fields.get(e);t&&t.acceptWaitingChange()}}bindSearchOptionsLoader(e,t){if("EZ-SEARCH"===t.nodeName&&null==t.optionLoader){const i=c.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");i&&(t.optionLoader=t=>i(t,e,this._dataUnit))}}applyEzUploadContext(e,t){var i,n;if("EZ-UPLOAD"===t.nodeName){t.urlUpload=c.getContextValue("__EZUI__UPLOAD__ADD__URL__"),t.urlDelete=c.getContextValue("__EZUI__UPLOAD__DEL__URL__");const s=this._dataUnit.getField(e),l=null===(i=s.properties)||void 0===i?void 0:i.DESTINATION;l&&(t.requestHeaders={XTRAINF:`{"destination": "${l}"}`}),t.maxFiles=(null===(n=s.properties)||void 0===n?void 0:n.MAX_FILES)||0}}}class T{constructor(){this.listen=!0,this.startChangeEventName="ezStartChange",this.cancelWaitingChangeEventName="ezCancelWaitingChange",this.changeEventName="ezChange"}destroy(){this.field.removeEventListener(this.startChangeEventName,this.startChangeListener),this.field.removeEventListener(this.cancelWaitingChangeEventName,this.cancelWaitingChangeListener),this.field.removeEventListener(this.changeEventName,this.changeListener)}acceptWaitingChange(){this.waitingChangePromiseResolve&&(this.waitingChangePromiseResolve(),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}rejectWaitingChange(e){this.waitingChangePromiseReject&&(this.waitingChangePromiseReject(e),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}static create(e,t,i,n,s){const l=new T;return l.field=t,l.fieldName=e,l.startChangeListener=t=>{l.listen&&i(e,t.detail)},l.field.addEventListener(l.startChangeEventName,l.startChangeListener),l.cancelWaitingChangeListener=()=>{l.listen&&n(e)},l.field.addEventListener(l.cancelWaitingChangeEventName,l.cancelWaitingChangeListener),l.changeListener=t=>{l.listen&&s(e,t.detail)},l.field.addEventListener(l.changeEventName,l.changeListener),l}}let U=class{constructor(e){t(this,e),this.ezReady=i(this,"ezReady",7),this.onDataUnitAction=e=>{e.type===a.METADATA_LOADED&&this.processMetadata()}}validate(){return new Promise(((e,t)=>{var i;const n=this.dataUnit.getModifiedRecords();for(let e=0;e<n.length;e++){const s=n[e],l=[];let r=this.validateRequired(s);if(r&&!r.isValid&&l.push(r),r=null===(i=this.recordsValidator)||void 0===i?void 0:i.validateRecord(this,s),r&&!r.isValid&&l.push(r),l.length>0){this.processValidationResult(l),t();break}}e()}))}observeConfig(){this.processMetadata()}validateRequired(e){const t=D(this._store.getState()),i=this._staticFields.filter((e=>e.dataset.required)).map((e=>e.dataset.fieldName)).concat(t.getRequiredFields()),n=[];if(new Set(i).forEach((t=>{const i=e[t];if(null==i||""===i){const e=this._dataBinder.getErrorMessage(t);n.push(e?{name:t,message:e}:{name:t,message:"Essa informação é obrigatória"})}})),n.length>0)return{isValid:!1,invalidFields:n,infoMessage:"Há pelo menos um campo obrigatório não preenchido."}}processValidationResult(e){e.forEach((e=>{const t=e.invalidFields;if(t&&t.forEach((e=>{this._dataBinder.markInvalid(e)})),e.infoMessage&&p.info(e.infoMessage),e.errorMessage){const{errorTitle:t,errorMessage:i}=e;p.error(t,i)}}))}getDynamicContent(){var t;const i=D(this._store.getState());if(!i)return null;const n=(s=null===(t=this._store)||void 0===t?void 0:t.getState()).currentSheet?s.formMetadata.getSheet(s.currentSheet):Array.from(s.formMetadata.getAllSheets().values())[0];var s;if(!n)return null;const l=Array.from(i.getAllSheets().values()),r=[];if(l.length>1){const t=l.map(((e,t)=>({tabKey:e.name,label:e.label,index:t}))),i="selector";r.push(e("ez-tabselector",{tabs:this.buildIdTabSelector(t),onEzChange:e=>this._store.dispatch(function(e){return{type:P.CHANGE_TAB,payload:e.tabKey}}(e.detail)),selectedTab:n.name,"data-element-id":i}))}const a=`${d.replaceAccentuatedChars(d.toCamelCase(n.label),!1)}_selectorContainer`;return r.push(e(C,{store:this._store,source:n,dataElementId:a})),r}processMetadata(){if(!this.isStatic()&&this.dataUnit){const e=null!=this.config&&Object.values(this.config).length>0?((e,t)=>{var i,n;const s=new Map,l=new Map,r=[],a=[],o={};null===(i=null==e?void 0:e.tabs)||void 0===i||i.forEach((e=>{l.has(e.label)||!1!==e.visible||l.set(e.label,e)})),null===(n=null==e?void 0:e.fields)||void 0===n||n.forEach((e=>{var i,n,c,d;if(!1!==e.visible){const h=function(e,t){return("string"==typeof e?Array.from(t.keys()).find((t=>t.label===e)):e)||{label:e,visible:!0}}(e.tab||"__main",s);if(l.has(h.label))return;const u=t.getField(e.name);if(u&&h.visible){s.has(h)||s.set(h,new Map);const t=s.get(h);v(u,e)&&r.push(e.name),((null==e.cleanOnCopy?null===(i=u.properties)||void 0===i?void 0:i.cleanOnCopy:e.cleanOnCopy)||(null===(n=u.properties)||void 0===n?void 0:n.autoNum)||(null===(c=u.properties)||void 0===c?void 0:c.cleanOnCopy))&&a.push(e.name),(null==e.defaultValue?null===(d=u.properties)||void 0===d?void 0:d.defaultValue:e.defaultValue)&&(o[e.name]=e.defaultValue),y(t,e,u)}}}));const c=new m;return Array.from(s.entries()).sort(z).forEach((([e,t])=>{c.addSheet({label:"__main"===e.label?"Principal":e.label,name:e.label,items:Array.from(t.values()),requiredFields:r,cleanOnCopyFields:a,defaultValues:o})})),c})(this.config,this.dataUnit):(()=>{var e,t;const i=this.dataUnit.metadata,n=new m;if(i){const s=null===(e=i.fields)||void 0===e?void 0:e.filter((e=>!1!==e.visible)),l=new Map;null===(t=null==i?void 0:i.fields)||void 0===t||t.forEach((e=>{!1!==e.visible&&y(l,null,e)}));let r={};s.filter((e=>e.defaultValue)).map((e=>r[e.name]=e.defaultValue)),n.addSheet({label:i.label,name:i.name,items:Array.from(l.values()),requiredFields:s.filter((e=>e.required)).map((e=>e.name)),cleanOnCopyFields:s.filter((e=>{var t,i;return(null===(t=e.properties)||void 0===t?void 0:t.cleanOnCopy)||(null===(i=e.properties)||void 0===i?void 0:i.autoNum)})).map((e=>e.name)),defaultValues:r})}return n})();this._store.dispatch({type:P.METADATA_LOADED,payload:e})}}isStatic(){var e;return(null===(e=this._staticFields)||void 0===e?void 0:e.length)>0}interceptAction(e){if(e.type===a.RECORDS_COPIED){const t=D(this._store.getState()).getCleanOnCopyFields();if(t)return new h(a.RECORDS_COPIED,e.payload.map((e=>{const i=Object.assign({},e);return t.forEach((e=>delete i[e])),i})))}if(e.type===a.SAVING_DATA)return new Promise((t=>{this.validate().then((()=>t(e))).catch((()=>{}))}));if(e.type===a.RECORDS_ADDED){const t=D(this._store.getState()).getDefaultValues();if(t)return new h(a.RECORDS_ADDED,e.payload.map((e=>{const i=Object.assign({},e);for(const e in t){const n="formattedValue"in t[e]?t[e].formattedValue:t[e].value,s=null!=n?n:t[e],l="function"==typeof s?s():s;i[e]=this.dataUnit.valueFromString(e,l)}return i})))}return e}componentWillLoad(){void 0===this.dataUnit&&(this.dataUnit=new u("ez-form")),this.dataUnit.addInterceptor(this),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new L(this.dataUnit),this._store=S(N),this._store.subscribe((()=>n(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata(),f.addIDInfo(this._element,null,{dataUnit:this.dataUnit})}componentDidRender(){this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]"))),this.ezReady.emit()}disconnectedCallback(){this.dataUnit.unsubscribe(this.onDataUnitAction),this.dataUnit.removeInterceptor(this),this._dataBinder.onDisconnectedCallback()}buildIdTabSelector(e){return e&&e.forEach((e=>e[f.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=d.toCamelCase(e.label))),e}render(){return e(s,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return l(this)}static get watchers(){return{config:["observeConfig"]}}};U.style="ez-form{display:flex;flex-direction:column;width:100%}.dynamic-content ez-collapsible-box{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{U as ez_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as i,h as t,H as e,g as s}from"./p-3c7ea91b.js";import{FloatingManager as r,ElementIDUtils as a}from"@sankhyalabs/core";import{A as l}from"./p-0b44cf1c.js";import{C as n}from"./p-4a5e37a7.js";import"./p-e1148f5c.js";import"./p-b853763b.js";let h=class{constructor(t){o(this,t),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._startLoading=!1,this._showLoading=!0,this.enabled=!0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.suppressEmptyOption=!1,this.canShowError=!0,this.mode="regular"}observeErrorMessage(){var o;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(o=this.errorMessage)||void 0===o?void 0:o.trim())||this.setInputValue())}observeValue(o,i){var t,e,s,r;if(this._textInput&&o!=i){const a=this.getSelectedOption(o),l=this.getSelectedOption(i),n=this.getSelectedOption(this.value);(null===(t=null==n?void 0:n.value)||void 0===t?void 0:t.toString())!=(null===(e=null==a?void 0:a.value)||void 0===e?void 0:e.toString())&&(this.value=a),(null===(s=null==a?void 0:a.value)||void 0===s?void 0:s.toString())!==(null===(r=null==l?void 0:l.value)||void 0===r?void 0:r.toString())&&(this.setInputValue(),this.ezChange.emit(null===a?void 0:a)),this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}getText(){let o="";const i=this.getSelectedOption(this.value);if(i&&(o=this.showSelectedValue?`${i.value} - ${i.label}`:i.label),null!=o)return String(o).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(o){return"string"==typeof o||o instanceof String?this._visibleOptions.find((i=>i.value===o)):o}updateVisibleOptions(){let o=this._source||[];if(!this.searchMode&&this._criteria){const i=this._criteria.toUpperCase();o=o.filter((o=>o.label.toLocaleUpperCase().indexOf(i)>-1))}this._visibleOptions=this.suppressEmptyOption?o:[{value:void 0,label:""}].concat(o),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var o;if(this.showOptionValue){const i=[];return null===(o=this._visibleOptions)||void 0===o||o.forEach((o=>{const t=this.getWidthValue(o.value);i.includes(t)||i.push(t)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(o){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=o)return i.innerHTML=o,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}buildItem(o,i){const e=this.showOptionValue&&this._maxWidthValue>0?`${this._maxWidthValue}px`:"";return t("li",{class:i===this._preSelection?"item preselected":"item",id:`item_${o.value}`,onMouseDown:()=>this.selectOption(o),onMouseOver:()=>this._preSelection=i},this.showOptionValue?t("span",{class:"item__value",title:o.value,style:{width:e,minWidth:e,maxWidth:e}},o.value):void 0,t("span",{class:"item__label "+(this.showOptionValue?"item__label--bold":""),title:o.label},o.label))}showOptions(){this.enabled&&(this._floatingID=r.float(this._listWrapper,this._listContainer,{autoClose:!0,top:this.errorMessage||!this.canShowError||"slim"===this.mode?"6px":"-13px"}),this.setFocus(),window.requestAnimationFrame((()=>{this._listWrapper.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&r.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&r.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection],!0))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection],!1)}scrollToOption(o,i){window.requestAnimationFrame((()=>{const t=(null==o?void 0:o.value)?this._optionsList.querySelector(`li#item_${o.value}`):void 0;if(t){const o=t.parentElement,e=o.getBoundingClientRect(),s=t.getBoundingClientRect();i&&s.bottom>e.bottom?o.scrollTop=s.height*(this._preSelection-3):!i&&s.top<e.top&&(o.scrollTop=s.height*this._preSelection)}}))}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(o){this._startLoading=!1,o instanceof Promise?(this._showLoading=!0,o.then((o=>{this._showLoading=!1,this.updateSource(o)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(o)?(this._source=o,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch())):this.selectOption(o))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(o){var i,t;const e=this.getSelectedOption(this.value);(null===(i=null==e?void 0:e.value)||void 0===i?void 0:i.toString())!==(null===(t=null==o?void 0:o.value)||void 0===t?void 0:t.toString())?this.value=(null==o?void 0:o.value)?o:void 0:(this.setInputValue(),this.hideOptions()),this.searchMode&&(this._visibleOptions=[]),this.searchMode&&(this._visibleOptions=[])}loadOptions(o,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:o,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.value?this.selectOption(void 0):this.setInputValue()}setInputValue(o=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,o&&(this.errorMessage=""))}clearSearch(){this.value=null}controlListWithOnlyOne(){if(this.searchMode){const o=this._visibleOptions;1===(null==o?void 0:o.length)&&this.selectOption(o[0])}}controlEmptySearch(){var o;this.searchMode&&((null===(o=this._visibleOptions)||void 0===o?void 0:o.length)?this.controlListWithOnlyOne():(this.clearSearch(),l.info(this._textEmptyList)))}componentWillLoad(){if(void 0===this.options){this.options=[];const o=this.el.querySelectorAll("option");o&&o.forEach((o=>{let i=o.innerText,t=o.getAttribute("value");t||(t=i),this.options.push({label:i,value:t}),o.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions(c.PRELOAD)}componentDidRender(){var o;void 0===this._floatingID&&this._listWrapper.remove(),null===(o=this._optionsList)||void 0===o||o.querySelectorAll(".item").forEach((o=>{a.addIDInfoIfNotExists(o,"itemComboBox")}))}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1)}handlerIconClick(){this.searchMode?this.loadOptions(c.ADVANCED):this.showOptions()}onTextInputChangeHandler(o){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(o)}),this._deboucingTime));const t=null===(i=o.target.value)||void 0===i?void 0:i.trim(),e=Number(t||void 0);this._criteria||(this._textInput.value=o.data||t),this._criteria=t,t&&(!isNaN(e)||t.length>=this._limitCharsToSearch)?(this.searchMode?(this._showLoading=!0,this.clearSource(),this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(c.PREDICTIVE,isNaN(e)?t:e.toString())}),this._deboucingTime)):this.updateVisibleOptions(),this.showOptions()):this.hideOptions()}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=void 0)}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(o){switch(this._tabPressed=!1,o.ctrlKey&&("f"!==o.key&&"F"!==o.key||(this.loadOptions(c.ADVANCED),o.stopPropagation(),o.stopImmediatePropagation(),o.preventDefault())),o.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne()}}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){var o;return a.addIDInfoIfNotExists(this.el,"input"),t(e,null,t("ez-text-input",{"data-element-id":a.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:o=>this._textInput=o,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:o=>this.onTextInputChangeHandler(o),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:o=>this.keyDownHandler(o),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},t("button",{class:"btn",slot:this.searchMode?"leftIcon":"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},t("ez-icon",{iconName:this.searchMode?"search":"chevron-down"})),this.searchMode&&(null===(o=this._textInput)||void 0===o?void 0:o.value)&&(this._criteria||this.value)?t("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},t("ez-icon",{iconName:"close"})):void 0),t("section",{class:"list-container",ref:o=>this._listContainer=o},t("div",{class:"list-wrapper",ref:o=>this._listWrapper=o},t("div",{class:"list-options",ref:o=>this._optionsList=o},0===this._visibleOptions.length&&t("div",{class:"message"},!this._showLoading&&t("span",{class:"message__no-result"},this._textEmptyList),this._showLoading&&t("div",{class:"message__loading"})),this.showOptionValue?t("span",{class:"item__value item__value--hidden",ref:o=>this._itemValueBasis=o}):void 0,this._visibleOptions.length>0&&this._visibleOptions.map(((o,i)=>this.buildItem(o,i)))))))}get el(){return s(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"]}}};var c;!function(o){o.ADVANCED="ADVANCED",o.PRELOAD="PRELOAD",o.PREDICTIVE="PREDICTIVE"}(c||(c={})),h.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__list-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-combo-box__list-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-combo-box__list-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__list-scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__list-scrollbar--background-color-primary) var(--ez-combo-box__list-scrollbar--background-color-secondary)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__list-scrollbar--background-color-primary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);width:var(--ez-combo-box__list-scrollbar--width);max-width:var(--ez-combo-box__list-scrollbar--width);min-width:var(--ez-combo-box__list-scrollbar--width)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding: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)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.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)}}";export{h as ez_combo_box}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,H as o,g as r}from"./p-3c7ea91b.js";import{MaskFormatter as n,ElementIDUtils as a}from"@sankhyalabs/core";let l=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.enabled=!0,this.canShowError=!0,this.mode="regular",this.noBorder=!1}observeErrorMessage(){this._inputElem&&this.isInvalid().then((t=>{var i,e;t?(this._inputElem.classList.add("hasError"),null===(i=this._messageBoxElem)||void 0===i||i.classList.add("hasError")):(this._inputElem.classList.remove("hasError"),null===(e=this._messageBoxElem)||void 0===e||e.classList.remove("hasError"))}))}observeMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new n(this.mask):this._maskFormatter.mask=this.mask)}observeValue(t,i){this._inputElem&&t!=i&&(this._inputElem.value=this.value||"",this.handleChange(),this.adjustFloatingLabel(),this.isSlaveMode()||(this.errorMessage="",this.ezChange.emit(this.value)))}adjustFloatingLabel(){if(this.label&&this._labelElem){this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label");const t=this.value&&this.value.toString().length>0,i=this._labelElem.classList.contains("input__label--floated");t||this.isFocused()?i||this._labelElem.classList.add("input__label--floated"):i&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}isSlaveMode(){var t,i;return"true"===(null===(i=null===(t=this._hostElement)||void 0===t?void 0:t.dataset)||void 0===i?void 0:i.slaveMode)}adjustColorContentSlot(t=""){this._contentLeftSlot&&(this._contentLeftSlot.style.color=t)}adjustBorderInput(){this.noBorder&&this._inputElem.classList.add("input__slim--noborder")}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}handleFocusout(){const t=this._inputElem.value;if(t&&this._maskFormatter)try{this._inputElem.value=this._maskFormatter.format(t)}catch(t){this.errorMessage=t.message}this.controlChangeValue(),this.adjustFloatingLabel(),this.adjustColorContentSlot()}isValidValue(t){return!this.restrict||Array.from(t).reduce(((t,i)=>t&&this.restrict.indexOf(i)>-1),!0)}controlChangeValue(){this._inputElem&&(this.value||"")!==this._inputElem.value&&(this.value=this._inputElem.value)}handleChange(){if(!this._inputElem)return;const t=this._inputElem.value;this.isValidValue(t)?this._lastValidValue=t:this._inputElem.value=null==this._lastValidValue?"":this._lastValidValue,this.controlChangeValue()}handleSlotChange(t){const i=t.target,e=i.assignedElements()[0];e&&(e.style.position="absolute",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e.style.overflow="hidden",e.style.top="0px",e.style.width="var(--ez-text-input__icon--width)",e.style.height="slim"!=this.mode?"var(--ez-text-input--height)":"var(--ez-text-input--height--slim)","leftIcon"==i.name?(e.style.left="0px",e.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left"),this._contentLeftSlot=e):"rightIcon"==i.name&&(e.style.right="0px",e.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right")),i.name&&a.addIDInfo(e,i.name)),this.observeErrorMessage()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated"),this.adjustColorContentSlot("var(--ez-text-input__input--focus--border-color)")}componentDidLoad(){this.observeErrorMessage(),this.observeMask(),this.adjustFloatingLabel(),this.adjustBorderInput()}componentWillLoad(){if(this.observeMask(),this.value){if(this._maskFormatter)try{this.value=this._maskFormatter.format(this.value)}catch(t){this.errorMessage=t.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}render(){return a.addIDInfoIfNotExists(this._hostElement,"input"),e(o,null,e("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:this.enabled?"input__label":"input__label input__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("input",{"data-element-id":a.getInternalIDInfo("input"),onFocus:()=>this.doFocus(),ref:t=>this._inputElem=t,type:"text",class:"slim"===this.mode?"input--slim":"",placeholder:"slim"===this.mode&&this.label?this.label:"",value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),e("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.canShowError&&"slim"!=this.mode&&e("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage,"data-element-id":a.getInternalIDInfo("message_box")},this.errorMessage))}get _hostElement(){return r(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],mask:["observeMask"],value:["observeValue"]}}};l.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}";export{l as ez_text_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,h as o,H as s}from"./p-3c7ea91b.js";import{JSUtils as t,UserAgentUtils as e}from"@sankhyalabs/core";var i;!function(r){r.HORIZONTAL="horizontal",r.VERTICAL="vertical",r.BOTH="both"}(i||(i={}));let l=class{constructor(o){r(this,o),this._classHidden="ez-scroller__shadow--hidden",this.isFirefox=!1,this.isActive=!1,this.locked=!1,this.activeShadow=!1}getContainerClass(){return`ez-scroller__container ez-scroller__container--${this.direction}\n ${this.locked?" ez-scroller__container--locked":""}\n ${this.isFirefox&&this.isActive?" ez-scroller__container--no-overlay":""}\n `}getShadowStartClass(){return`ez-scroller__shadow-start ez-scroller__shadow-start--${this.direction}`}getShadowEndClass(){return`ez-scroller__shadow-end ez-scroller__shadow-end--${this.direction}`}finishDrag(){this._controller&&this._container.classList.remove("dragging")}updateShadow(){const r=this._container;if(r){let o;if(this.direction===i.HORIZONTAL){const{scrollWidth:s,clientWidth:t,scrollLeft:e}=r;o=s-t-Math.ceil(e),this._startHidden=r.scrollLeft>0}else if(this.direction===i.VERTICAL){const{scrollHeight:s,clientHeight:t,scrollTop:e}=r;o=s-t-Math.ceil(e),this._startHidden=r.scrollTop>0}this._endHidden=o>0,this.isActive=this._startHidden||this._endHidden;const s=["","start","end","middle"][Number(this._startHidden)|Number(this._endHidden)<<1];"start"===s?(this._shadowStart.classList.remove(this._classHidden),this._shadowEnd.classList.add(this._classHidden)):"end"===s?(this._shadowStart.classList.add(this._classHidden),this._shadowEnd.classList.remove(this._classHidden)):"middle"===s?(this._shadowStart.classList.remove(this._classHidden),this._shadowEnd.classList.remove(this._classHidden)):(this._shadowStart.classList.add(this._classHidden),this._shadowEnd.classList.add(this._classHidden))}}configResize(){const r=this._container;null!=r&&(null!=this._resizeObserver&&this._resizeObserver.unobserve(r),this._resizeObserver=new ResizeObserver(t.debounce(this.updateShadow.bind(this),200)),this._resizeObserver.observe(r))}clickListener(r){this._controller&&this._controller.didScroll()&&(r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation())}mouseDownHandler(r){this.locked?this.finishDrag():(this._controller||(this._controller=new a(this._container)),this._controller.startDragg(r),this._container.classList.add("dragging"))}mouseUpHandler(){this.finishDrag()}mouseMoveHandler(r){this.locked?this.finishDrag():this._controller&&(0===r.buttons?this.finishDrag():this._controller.doScroll(r))}componentDidLoad(){this.isFirefox=e.isFirefox()}componentDidRender(){var r,o;if(this.direction===i.BOTH)return null===(r=this._shadowStart)||void 0===r||r.classList.add(this._classHidden),void(null===(o=this._shadowEnd)||void 0===o||o.classList.add(this._classHidden));this._container&&this.activeShadow&&(this._container.onscroll=this.updateShadow.bind(this),this.configResize(),this.updateShadow())}render(){return o(s,null,this.activeShadow&&o("span",{ref:r=>this._shadowStart=r,class:this.getShadowStartClass()}),o("div",{ref:r=>this._container=r,class:this.getContainerClass()},o("slot",null)),this.activeShadow&&o("span",{ref:r=>this._shadowEnd=r,class:this.getShadowEndClass()}))}};class a{constructor(r){this.scrollablePanel=r}startDragg(r){this.startX=this.measureX(r),this.startY=this.measureY(r),this.scrollWidth=0,this.scrollHeight=0}measureX(r){return r.pageX-this.scrollablePanel.offsetLeft}measureY(r){return r.pageY-this.scrollablePanel.offsetTop}doScroll(r){const o=this.measureX(r),s=this.measureY(r);if(o!=this.startX||s!=this.startY){const r=o-this.startX,t=s-this.startY;this.startX+=r,this.startY+=t,this.scrollWidth+=Math.abs(r),this.scrollHeight+=Math.abs(t),this.scrollablePanel.scrollLeft=Math.max(0,this.scrollablePanel.scrollLeft-r),this.scrollablePanel.scrollTop=Math.max(0,this.scrollablePanel.scrollTop-t)}}didScroll(){return this.scrollHeight>5||this.scrollWidth>5}}l.style=":host{--ez-scroller--box-shadow-color:var(--background--body, #fafcff);display:flex;cursor:grab;width:100%}.dragging{cursor:grabbing}.ez-scroller__container{display:flex;flex-direction:column;overflow-y:hidden;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--scrollbar--primary) var(--scrollbar--secondary)}.ez-scroller__container--horizontal{flex-direction:row;overflow-y:hidden;overflow-x:hidden;padding-bottom:var(--space--small);margin-bottom:calc(var(--space--small) * -1)}.ez-scroller__container--horizontal:not(.ez-scroller__container--no-overlay):not(.ez-scroller__container--locked):hover{overflow-x:overlay}.ez-scroller__container--horizontal.ez-scroller__container--no-overlay{padding-bottom:8px;margin-bottom:-8px}.ez-scroller__container--horizontal.ez-scroller__container--no-overlay:not(.ez-scroller__container--locked):hover{overflow-x:auto;padding-bottom:0px}.ez-scroller__container--vertical{overflow-y:hidden;overflow-x:hidden;padding-right:var(--space--small);margin-right:calc(var(--space--small) * -1)}.ez-scroller__container--vertical:not(.ez-scroller__container--no-overlay):not(.ez-scroller__container--locked):hover{overflow-y:overlay}.ez-scroller__container--vertical.ez-scroller__container--no-overlay{padding-right:8px;margin-right:-8px}.ez-scroller__container--vertical.ez-scroller__container--no-overlay:not(.ez-scroller__container--locked):hover{overflow-y:auto;padding-right:0px}.ez-scroller__container--both{overflow:auto}.ez-scroller__container::-webkit-scrollbar-track{background-color:var(--scrollbar--secondary);border-radius:var(--border--radius-small);visibility:hidden}.ez-scroller__container::-webkit-scrollbar-thumb{background-color:var(--scrollbar--primary);border-radius:var(--border--radius-small)}.ez-scroller__container::-webkit-scrollbar{background-color:var(--scrollbar--secondary);width:var(--space--small);height:var(--space--small);max-width:var(--space--small);min-width:var(--space--small)}.ez-scroller__shadow-start,.ez-scroller__shadow-end{display:flex;position:relative;z-index:0;background:var(--ez-scroller--box-shadow-color)}.ez-scroller__shadow-start--horizontal,.ez-scroller__shadow-end--horizontal{width:10px;min-height:100%;top:-13px}.ez-scroller__shadow-start--horizontal{box-shadow:var(--ez-scroller--box-shadow-color) -4px 0px 6px 10px;margin-right:-10px}.ez-scroller__shadow-end--horizontal{box-shadow:var(--ez-scroller--box-shadow-color) 4px 0px 6px 10px;margin-left:-10px}.ez-scroller__shadow-start--vertical,.ez-scroller__shadow-end--vertical{min-width:100%;height:10px;left:-13px}.ez-scroller__shadow-start--vertical{box-shadow:var(--ez-scroller--box-shadow-color) 0px -4px 6px 10px;margin-bottom:-10px}.ez-scroller__shadow-end--vertical{box-shadow:var(--ez-scroller--box-shadow-color) 0px 4px 6px 10px;margin-top:-10px}.ez-scroller__shadow--hidden{display:none}";export{l as ez_scroller}
|
|
@@ -6,8 +6,10 @@ export declare class EzScroller {
|
|
|
6
6
|
private _controller;
|
|
7
7
|
private _startHidden;
|
|
8
8
|
private _endHidden;
|
|
9
|
+
private _resizeObserver;
|
|
9
10
|
private _classHidden;
|
|
10
11
|
isFirefox: boolean;
|
|
12
|
+
isActive: boolean;
|
|
11
13
|
/**
|
|
12
14
|
* Define a direção em que haverá scroll.
|
|
13
15
|
*/
|
|
@@ -25,6 +27,7 @@ export declare class EzScroller {
|
|
|
25
27
|
private getShadowEndClass;
|
|
26
28
|
private finishDrag;
|
|
27
29
|
private updateShadow;
|
|
30
|
+
private configResize;
|
|
28
31
|
clickListener(evt: MouseEvent): void;
|
|
29
32
|
mouseDownHandler(evt: MouseEvent): void;
|
|
30
33
|
mouseUpHandler(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sankhyalabs/ezui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Biblioteca de componentes Sankhya.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/custom-elements/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"license": "ISC",
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@babel/preset-env": "^7.16.11",
|
|
50
|
-
"@sankhyalabs/core": "^2.
|
|
50
|
+
"@sankhyalabs/core": "^2.5.0",
|
|
51
51
|
"@sankhyalabs/docscss": "^1.0.4",
|
|
52
52
|
"@sankhyalabs/ez-design": "^2.0.0",
|
|
53
53
|
"@sankhyalabs/skippeerdeps": "^1.0.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as o,g as r}from"./p-3c7ea91b.js";import{MaskFormatter as n,ElementIDUtils as a}from"@sankhyalabs/core";let l=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.enabled=!0,this.canShowError=!0,this.mode="regular",this.noBorder=!1}observeErrorMessage(){this._inputElem&&this.isInvalid().then((t=>{var i,e;t?(this._inputElem.classList.add("hasError"),null===(i=this._messageBoxElem)||void 0===i||i.classList.add("hasError")):(this._inputElem.classList.remove("hasError"),null===(e=this._messageBoxElem)||void 0===e||e.classList.remove("hasError"))}))}observeMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new n(this.mask):this._maskFormatter.mask=this.mask)}observeValue(t,i){this._inputElem&&t!=i&&(this._inputElem.value=this.value||"",this.handleChange(),this.adjustFloatingLabel(),this.isSlaveMode()||(this.errorMessage="",this.ezChange.emit(this.value)))}adjustFloatingLabel(){if(this.label&&this._labelElem){this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label");const t=this.value&&this.value.toString().length>0,i=this._labelElem.classList.contains("input__label--floated");t||this.isFocused()?i||this._labelElem.classList.add("input__label--floated"):i&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}isSlaveMode(){var t,i;return"true"===(null===(i=null===(t=this._hostElement)||void 0===t?void 0:t.dataset)||void 0===i?void 0:i.slaveMode)}adjustColorContentSlot(t=""){this._contentLeftSlot&&(this._contentLeftSlot.style.color=t)}adjustBorderInput(){this.noBorder&&this._inputElem.classList.add("input__slim--noborder")}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}handleFocusout(){const t=this._inputElem.value;if(t&&this._maskFormatter)try{this._inputElem.value=this._maskFormatter.format(t)}catch(t){this.errorMessage=t.message}this.controlChangeValue(),this.adjustFloatingLabel(),this.adjustColorContentSlot()}isValidValue(t){return!this.restrict||Array.from(t).reduce(((t,i)=>t&&this.restrict.indexOf(i)>-1),!0)}controlChangeValue(){this._inputElem&&(this.value||"")!==this._inputElem.value&&(this.value=this._inputElem.value)}handleChange(){if(!this._inputElem)return;const t=this._inputElem.value;this.isValidValue(t)?this._lastValidValue=t:this._inputElem.value=null==this._lastValidValue?"":this._lastValidValue,this.controlChangeValue()}handleSlotChange(t){const i=t.target,e=i.assignedElements()[0];e&&(e.style.position="absolute",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e.style.overflow="hidden",e.style.top="0px",e.style.width="var(--ez-text-input__icon--width)",e.style.height="slim"!=this.mode?"var(--ez-text-input--height)":"var(--ez-text-input--height--slim)","leftIcon"==i.name?(e.style.left="0px",e.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left"),this._contentLeftSlot=e):"rightIcon"==i.name&&(e.style.right="0px",e.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right"))),this.observeErrorMessage()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated"),this.adjustColorContentSlot("var(--ez-text-input__input--focus--border-color)")}componentDidLoad(){this.observeErrorMessage(),this.observeMask(),this.adjustFloatingLabel(),this.adjustBorderInput()}componentWillLoad(){if(this.observeMask(),this.value){if(this._maskFormatter)try{this.value=this._maskFormatter.format(this.value)}catch(t){this.errorMessage=t.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}render(){return a.addIDInfoIfNotExists(this._hostElement,"input"),e(o,null,e("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:this.enabled?"input__label":"input__label input__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("input",{"data-element-id":a.getInternalIDInfo("input"),onFocus:()=>this.doFocus(),ref:t=>this._inputElem=t,type:"text",class:"slim"===this.mode?"input--slim":"",placeholder:"slim"===this.mode&&this.label?this.label:"",value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),e("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.canShowError&&"slim"!=this.mode&&e("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return r(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],mask:["observeMask"],value:["observeValue"]}}};l.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}";export{l as ez_text_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as i,h as t,H as s,g as e}from"./p-3c7ea91b.js";import{FloatingManager as r,ElementIDUtils as a}from"@sankhyalabs/core";import{A as l}from"./p-0b44cf1c.js";import{C as n}from"./p-4a5e37a7.js";import"./p-e1148f5c.js";import"./p-b853763b.js";let h=class{constructor(t){o(this,t),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._startLoading=!1,this._showLoading=!0,this.enabled=!0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.suppressEmptyOption=!1,this.canShowError=!0,this.mode="regular"}observeErrorMessage(){var o;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(o=this.errorMessage)||void 0===o?void 0:o.trim())||this.setInputValue())}observeValue(o,i){var t,s,e,r;if(this._textInput&&o!=i){const a=this.getSelectedOption(o),l=this.getSelectedOption(i),n=this.getSelectedOption(this.value);(null===(t=null==n?void 0:n.value)||void 0===t?void 0:t.toString())!=(null===(s=null==a?void 0:a.value)||void 0===s?void 0:s.toString())&&(this.value=a),(null===(e=null==a?void 0:a.value)||void 0===e?void 0:e.toString())!==(null===(r=null==l?void 0:l.value)||void 0===r?void 0:r.toString())&&(this.setInputValue(),this.ezChange.emit(null===a?void 0:a)),this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}getText(){let o="";const i=this.getSelectedOption(this.value);if(i&&(o=this.showSelectedValue?`${i.value} - ${i.label}`:i.label),null!=o)return String(o).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(o){return"string"==typeof o||o instanceof String?this._visibleOptions.find((i=>i.value===o)):o}updateVisibleOptions(){let o=this._source||[];if(!this.searchMode&&this._criteria){const i=this._criteria.toUpperCase();o=o.filter((o=>o.label.toLocaleUpperCase().indexOf(i)>-1))}this._visibleOptions=this.suppressEmptyOption?o:[{value:void 0,label:""}].concat(o),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var o;if(this.showOptionValue){const i=[];return null===(o=this._visibleOptions)||void 0===o||o.forEach((o=>{const t=this.getWidthValue(o.value);i.includes(t)||i.push(t)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(o){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=o)return i.innerHTML=o,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}buildItem(o,i){const s=this.showOptionValue&&this._maxWidthValue>0?`${this._maxWidthValue}px`:"";return t("li",{class:i===this._preSelection?"item preselected":"item",id:`item_${o.value}`,onMouseDown:()=>this.selectOption(o),onMouseOver:()=>this._preSelection=i},this.showOptionValue?t("span",{class:"item__value",title:o.value,style:{width:s,minWidth:s,maxWidth:s}},o.value):void 0,t("span",{class:"item__label "+(this.showOptionValue?"item__label--bold":""),title:o.label},o.label))}showOptions(){this.enabled&&(this._floatingID=r.float(this._listWrapper,this._listContainer,{autoClose:!0,top:this.errorMessage||!this.canShowError||"slim"===this.mode?"6px":"-13px"}),this.setFocus(),window.requestAnimationFrame((()=>{this._listWrapper.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&r.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&r.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection],!0))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection],!1)}scrollToOption(o,i){window.requestAnimationFrame((()=>{const t=(null==o?void 0:o.value)?this._optionsList.querySelector(`li#item_${o.value}`):void 0;if(t){const o=t.parentElement,s=o.getBoundingClientRect(),e=t.getBoundingClientRect();i&&e.bottom>s.bottom?o.scrollTop=e.height*(this._preSelection-3):!i&&e.top<s.top&&(o.scrollTop=e.height*this._preSelection)}}))}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(o){this._startLoading=!1,o instanceof Promise?(this._showLoading=!0,o.then((o=>{this._showLoading=!1,this.updateSource(o)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(o)?(this._source=o,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch())):this.selectOption(o))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(o){var i,t;const s=this.getSelectedOption(this.value);(null===(i=null==s?void 0:s.value)||void 0===i?void 0:i.toString())!==(null===(t=null==o?void 0:o.value)||void 0===t?void 0:t.toString())?this.value=(null==o?void 0:o.value)?o:void 0:(this.setInputValue(),this.hideOptions()),this.searchMode&&(this._visibleOptions=[]),this.searchMode&&(this._visibleOptions=[])}loadOptions(o,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:o,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.value?this.selectOption(void 0):this.setInputValue()}setInputValue(o=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,o&&(this.errorMessage=""))}clearSearch(){this.value=null}controlListWithOnlyOne(){if(this.searchMode){const o=this._visibleOptions;1===(null==o?void 0:o.length)&&this.selectOption(o[0])}}controlEmptySearch(){var o;this.searchMode&&((null===(o=this._visibleOptions)||void 0===o?void 0:o.length)?this.controlListWithOnlyOne():(this.clearSearch(),l.info(this._textEmptyList)))}componentWillLoad(){if(void 0===this.options){this.options=[];const o=this.el.querySelectorAll("option");o&&o.forEach((o=>{let i=o.innerText,t=o.getAttribute("value");t||(t=i),this.options.push({label:i,value:t}),o.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions(c.PRELOAD)}componentDidRender(){void 0===this._floatingID&&this._listWrapper.remove()}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1)}handlerIconClick(){this.searchMode?this.loadOptions(c.ADVANCED):this.showOptions()}onTextInputChangeHandler(o){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(o)}),this._deboucingTime));const t=null===(i=o.target.value)||void 0===i?void 0:i.trim(),s=Number(t||void 0);this._criteria||(this._textInput.value=o.data||t),this._criteria=t,t&&(!isNaN(s)||t.length>=this._limitCharsToSearch)?(this.searchMode?(this._showLoading=!0,this.clearSource(),this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(c.PREDICTIVE,isNaN(s)?t:s.toString())}),this._deboucingTime)):this.updateVisibleOptions(),this.showOptions()):this.hideOptions()}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=void 0)}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(o){switch(this._tabPressed=!1,o.ctrlKey&&("f"!==o.key&&"F"!==o.key||(this.loadOptions(c.ADVANCED),o.stopPropagation(),o.stopImmediatePropagation(),o.preventDefault())),o.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne()}}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){var o;return a.addIDInfoIfNotExists(this.el,"input"),t(s,null,t("ez-text-input",{"data-element-id":a.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:o=>this._textInput=o,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:o=>this.onTextInputChangeHandler(o),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:o=>this.keyDownHandler(o),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},t("button",{class:"btn",slot:this.searchMode?"leftIcon":"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},t("ez-icon",{iconName:this.searchMode?"search":"chevron-down"})),this.searchMode&&(null===(o=this._textInput)||void 0===o?void 0:o.value)&&(this._criteria||this.value)?t("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},t("ez-icon",{iconName:"close"})):void 0),t("section",{class:"list-container",ref:o=>this._listContainer=o},t("div",{class:"list-wrapper",ref:o=>this._listWrapper=o},t("div",{class:"list-options",ref:o=>this._optionsList=o},0===this._visibleOptions.length&&t("div",{class:"message"},!this._showLoading&&t("span",{class:"message__no-result"},this._textEmptyList),this._showLoading&&t("div",{class:"message__loading"})),this.showOptionValue?t("span",{class:"item__value item__value--hidden",ref:o=>this._itemValueBasis=o}):void 0,this._visibleOptions.length>0&&this._visibleOptions.map(((o,i)=>this.buildItem(o,i)))))))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"]}}};var c;!function(o){o.ADVANCED="ADVANCED",o.PRELOAD="PRELOAD",o.PREDICTIVE="PREDICTIVE"}(c||(c={})),h.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__list-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-combo-box__list-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-combo-box__list-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__list-scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__list-scrollbar--background-color-primary) var(--ez-combo-box__list-scrollbar--background-color-secondary)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__list-scrollbar--background-color-primary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);width:var(--ez-combo-box__list-scrollbar--width);max-width:var(--ez-combo-box__list-scrollbar--width);min-width:var(--ez-combo-box__list-scrollbar--width)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding: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)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.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)}}";export{h as ez_combo_box}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as o,H as s}from"./p-3c7ea91b.js";import{UserAgentUtils as e}from"@sankhyalabs/core";var t;!function(r){r.HORIZONTAL="horizontal",r.VERTICAL="vertical",r.BOTH="both"}(t||(t={}));let l=class{constructor(o){r(this,o),this._classHidden="ez-scroller__shadow--hidden",this.isFirefox=!1,this.locked=!1,this.activeShadow=!1}getContainerClass(){return`ez-scroller__container ez-scroller__container--${this.direction}\n ${this.locked?" ez-scroller__container--locked":""}\n ${this.isFirefox?" ez-scroller__container--no-overlay":""}\n `}getShadowStartClass(){return`ez-scroller__shadow-start ez-scroller__shadow-start--${this.direction}`}getShadowEndClass(){return`ez-scroller__shadow-end ez-scroller__shadow-end--${this.direction}`}finishDrag(){this._controller&&this._container.classList.remove("dragging")}updateShadow(){const r=this._container;if(r){let o;if(this.direction===t.HORIZONTAL){const{scrollWidth:s,clientWidth:e,scrollLeft:t}=r;o=s-e-Math.ceil(t),this._startHidden=r.scrollLeft>0}else if(this.direction===t.VERTICAL){const{scrollHeight:s,clientHeight:e,scrollTop:t}=r;o=s-e-Math.ceil(t),this._startHidden=r.scrollTop>0}this._endHidden=o>0;const s=["","start","end","middle"][Number(this._startHidden)|Number(this._endHidden)<<1];"start"===s?(this._shadowStart.classList.remove(this._classHidden),this._shadowEnd.classList.add(this._classHidden)):"end"===s?(this._shadowStart.classList.add(this._classHidden),this._shadowEnd.classList.remove(this._classHidden)):"middle"===s?(this._shadowStart.classList.remove(this._classHidden),this._shadowEnd.classList.remove(this._classHidden)):(this._shadowStart.classList.add(this._classHidden),this._shadowEnd.classList.add(this._classHidden))}}clickListener(r){this._controller&&this._controller.didScroll()&&(r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation())}mouseDownHandler(r){this.locked?this.finishDrag():(this._controller||(this._controller=new i(this._container)),this._controller.startDragg(r),this._container.classList.add("dragging"))}mouseUpHandler(){this.finishDrag()}mouseMoveHandler(r){this.locked?this.finishDrag():this._controller&&(0===r.buttons?this.finishDrag():this._controller.doScroll(r))}componentDidLoad(){this.isFirefox=e.isFirefox()}componentDidRender(){var r,o;if(this.direction===t.BOTH)return null===(r=this._shadowStart)||void 0===r||r.classList.add(this._classHidden),void(null===(o=this._shadowEnd)||void 0===o||o.classList.add(this._classHidden));this._container&&this.activeShadow&&(this._container.onscroll=this.updateShadow.bind(this),this.updateShadow())}render(){return o(s,null,this.activeShadow&&o("span",{ref:r=>this._shadowStart=r,class:this.getShadowStartClass()}),o("div",{ref:r=>this._container=r,class:this.getContainerClass()},o("slot",null)),this.activeShadow&&o("span",{ref:r=>this._shadowEnd=r,class:this.getShadowEndClass()}))}};class i{constructor(r){this.scrollablePanel=r}startDragg(r){this.startX=this.measureX(r),this.startY=this.measureY(r),this.scrollWidth=0,this.scrollHeight=0}measureX(r){return r.pageX-this.scrollablePanel.offsetLeft}measureY(r){return r.pageY-this.scrollablePanel.offsetTop}doScroll(r){const o=this.measureX(r),s=this.measureY(r);if(o!=this.startX||s!=this.startY){const r=o-this.startX,e=s-this.startY;this.startX+=r,this.startY+=e,this.scrollWidth+=Math.abs(r),this.scrollHeight+=Math.abs(e),this.scrollablePanel.scrollLeft=Math.max(0,this.scrollablePanel.scrollLeft-r),this.scrollablePanel.scrollTop=Math.max(0,this.scrollablePanel.scrollTop-e)}}didScroll(){return this.scrollHeight>5||this.scrollWidth>5}}l.style=":host{--ez-scroller--box-shadow-color:var(--background--body, #fafcff);display:flex;cursor:grab;width:100%}.dragging{cursor:grabbing}.ez-scroller__container{display:flex;flex-direction:column;overflow-y:hidden;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--scrollbar--primary) var(--scrollbar--secondary)}.ez-scroller__container--horizontal{flex-direction:row;overflow-y:hidden;overflow-x:hidden;padding-bottom:var(--space--small);margin-bottom:calc(var(--space--small) * -1)}.ez-scroller__container--horizontal:not(.ez-scroller__container--no-overlay):not(.ez-scroller__container--locked):hover{overflow-x:overlay}.ez-scroller__container--horizontal.ez-scroller__container--no-overlay{padding-bottom:8px;margin-bottom:-8px}.ez-scroller__container--horizontal.ez-scroller__container--no-overlay:not(.ez-scroller__container--locked):hover{overflow-x:auto;padding-bottom:0px}.ez-scroller__container--vertical{overflow-y:hidden;overflow-x:hidden;padding-right:var(--space--small);margin-right:calc(var(--space--small) * -1)}.ez-scroller__container--vertical:not(.ez-scroller__container--no-overlay):not(.ez-scroller__container--locked):hover{overflow-y:overlay}.ez-scroller__container--vertical.ez-scroller__container--no-overlay{padding-right:8px;margin-right:-8px}.ez-scroller__container--vertical.ez-scroller__container--no-overlay:not(.ez-scroller__container--locked):hover{overflow-y:auto;padding-right:0px}.ez-scroller__container--both{overflow:auto}.ez-scroller__container::-webkit-scrollbar-track{background-color:var(--scrollbar--secondary);border-radius:var(--border--radius-small);visibility:hidden}.ez-scroller__container::-webkit-scrollbar-thumb{background-color:var(--scrollbar--primary);border-radius:var(--border--radius-small)}.ez-scroller__container::-webkit-scrollbar{background-color:var(--scrollbar--secondary);width:var(--space--small);height:var(--space--small);max-width:var(--space--small);min-width:var(--space--small)}.ez-scroller__shadow-start,.ez-scroller__shadow-end{display:flex;position:relative;z-index:0;background:var(--ez-scroller--box-shadow-color)}.ez-scroller__shadow-start--horizontal,.ez-scroller__shadow-end--horizontal{width:10px;min-height:100%;top:-13px}.ez-scroller__shadow-start--horizontal{box-shadow:var(--ez-scroller--box-shadow-color) -4px 0px 6px 10px;margin-right:-10px}.ez-scroller__shadow-end--horizontal{box-shadow:var(--ez-scroller--box-shadow-color) 4px 0px 6px 10px;margin-left:-10px}.ez-scroller__shadow-start--vertical,.ez-scroller__shadow-end--vertical{min-width:100%;height:10px;left:-13px}.ez-scroller__shadow-start--vertical{box-shadow:var(--ez-scroller--box-shadow-color) 0px -4px 6px 10px;margin-bottom:-10px}.ez-scroller__shadow-end--vertical{box-shadow:var(--ez-scroller--box-shadow-color) 0px 4px 6px 10px;margin-top:-10px}.ez-scroller__shadow--hidden{display:none}";export{l as ez_scroller}
|