@sankhyalabs/ezui 2.7.4 → 2.7.6
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-actions-button.cjs.entry.js +31 -16
- package/dist/cjs/ez-date-time-input.cjs.entry.js +10 -3
- package/dist/cjs/ez-grid.cjs.entry.js +2 -2
- package/dist/cjs/ez-scroller.cjs.entry.js +48 -50
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +31 -16
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +10 -3
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +2 -2
- package/dist/collection/components/ez-scroller/ez-scroller.css +99 -72
- package/dist/collection/components/ez-scroller/ez-scroller.js +49 -55
- package/dist/custom-elements/index.js +93 -73
- package/dist/esm/ez-actions-button.entry.js +31 -16
- package/dist/esm/ez-date-time-input.entry.js +10 -3
- package/dist/esm/ez-grid.entry.js +2 -2
- package/dist/esm/ez-scroller.entry.js +49 -51
- 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-25e83e46.entry.js +1 -0
- package/dist/ezui/p-37335c51.entry.js +1 -0
- package/dist/ezui/{p-56381ff2.entry.js → p-6fd5e142.entry.js} +1 -1
- package/dist/ezui/p-99218a07.entry.js +1 -0
- package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +3 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +1 -0
- package/dist/types/components/ez-scroller/ez-scroller.d.ts +5 -7
- package/package.json +1 -1
- package/dist/ezui/p-5e3306bc.entry.js +0 -1
- package/dist/ezui/p-7b906805.entry.js +0 -1
- package/dist/ezui/p-a34b52f8.entry.js +0 -1
|
@@ -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, JSUtils,
|
|
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, MaskFormatter } from '@sankhyalabs/core';
|
|
4
4
|
|
|
5
5
|
var DialogType;
|
|
6
6
|
(function (DialogType) {
|
|
@@ -209,35 +209,50 @@ let EzActionsButton$1 = class extends HTMLElement$1 {
|
|
|
209
209
|
async isOpened() {
|
|
210
210
|
return this._floatingID != undefined;
|
|
211
211
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
if (!this.enabled) {
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
let options = {
|
|
212
|
+
getFloatOptions() {
|
|
213
|
+
return {
|
|
218
214
|
autoClose: true,
|
|
219
215
|
innerClickTest: this.innerClickCheck,
|
|
220
216
|
isFixed: true,
|
|
221
217
|
top: this.getPositionTop(),
|
|
222
218
|
left: this.getPositionLeft()
|
|
223
219
|
};
|
|
224
|
-
|
|
220
|
+
}
|
|
221
|
+
getSideLimit() {
|
|
222
|
+
var _a;
|
|
225
223
|
const docWidth = document.body.clientWidth;
|
|
226
224
|
const boundingList = (_a = this._actionsList) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
227
225
|
if ((boundingList === null || boundingList === void 0 ? void 0 : boundingList.right) > docWidth) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
226
|
+
return (docWidth - boundingList.width) + "px";
|
|
227
|
+
}
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
showActions() {
|
|
231
|
+
if (!this.enabled) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const options = this.getFloatOptions();
|
|
235
|
+
this._floatingID = FloatingManager.float(this._actionsList, this._listContainer, options);
|
|
236
|
+
const sideLimit = this.getSideLimit();
|
|
237
|
+
if (sideLimit != undefined) {
|
|
238
|
+
options.left = sideLimit;
|
|
235
239
|
FloatingManager.updateFloatPosition(this._actionsList, this._listContainer, options);
|
|
236
240
|
}
|
|
237
241
|
window.requestAnimationFrame(() => {
|
|
238
242
|
this._actionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
239
243
|
});
|
|
240
244
|
}
|
|
245
|
+
updatePosition() {
|
|
246
|
+
if (!this.enabled || this._floatingID == undefined) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
const options = this.getFloatOptions();
|
|
250
|
+
const sideLimit = this.getSideLimit();
|
|
251
|
+
if (sideLimit != undefined) {
|
|
252
|
+
options.left = sideLimit;
|
|
253
|
+
}
|
|
254
|
+
FloatingManager.updateFloatPosition(this._actionsList, this._listContainer, options);
|
|
255
|
+
}
|
|
241
256
|
getPositionTop() {
|
|
242
257
|
var _a;
|
|
243
258
|
const boundingHost = (_a = this._element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
@@ -274,8 +289,8 @@ let EzActionsButton$1 = class extends HTMLElement$1 {
|
|
|
274
289
|
return (_a = this.actions) === null || _a === void 0 ? void 0 : _a.some(action => action.iconName != undefined);
|
|
275
290
|
}
|
|
276
291
|
controlScrollPage() {
|
|
277
|
-
window.removeEventListener("scroll", this.
|
|
278
|
-
window.addEventListener("scroll", this.
|
|
292
|
+
window.removeEventListener("scroll", this.updatePosition.bind(this));
|
|
293
|
+
window.addEventListener("scroll", this.updatePosition.bind(this));
|
|
279
294
|
}
|
|
280
295
|
//---------------------------------------------
|
|
281
296
|
// Event handlers
|
|
@@ -1795,6 +1810,10 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1795
1810
|
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
1796
1811
|
this._calendar.style.visibility = 'inherit';
|
|
1797
1812
|
}
|
|
1813
|
+
hideCalendar() {
|
|
1814
|
+
this.changeValue(this._calendar.value);
|
|
1815
|
+
this._calendar.hide();
|
|
1816
|
+
}
|
|
1798
1817
|
getParsedDateTime(strValue) {
|
|
1799
1818
|
var _a, _b;
|
|
1800
1819
|
if (strValue === void 0) {
|
|
@@ -1835,7 +1854,7 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1835
1854
|
this.errorMessage = "O valor digitado não é uma data válida";
|
|
1836
1855
|
}
|
|
1837
1856
|
}
|
|
1838
|
-
getTextValue(
|
|
1857
|
+
getTextValue(date) {
|
|
1839
1858
|
const options = {
|
|
1840
1859
|
year: 'numeric', month: 'numeric', day: 'numeric',
|
|
1841
1860
|
hour: 'numeric', minute: 'numeric'
|
|
@@ -1844,7 +1863,10 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1844
1863
|
year: 'numeric', month: 'numeric', day: 'numeric',
|
|
1845
1864
|
hour: 'numeric', minute: 'numeric', second: 'numeric'
|
|
1846
1865
|
};
|
|
1847
|
-
|
|
1866
|
+
if (!date)
|
|
1867
|
+
return;
|
|
1868
|
+
let formattedDate = new Intl.DateTimeFormat('pt-BR', this.showSeconds ? optionsSecond : options).format(date);
|
|
1869
|
+
return formattedDate.replace(",", "");
|
|
1848
1870
|
}
|
|
1849
1871
|
handleInput(event) {
|
|
1850
1872
|
const newValue = this.getParsedDateTime();
|
|
@@ -1870,7 +1892,7 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1870
1892
|
}
|
|
1871
1893
|
render() {
|
|
1872
1894
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
1873
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick() }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.
|
|
1895
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick() }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
1874
1896
|
}
|
|
1875
1897
|
get _elem() { return this; }
|
|
1876
1898
|
static get watchers() { return {
|
|
@@ -118225,14 +118247,14 @@ class AgGridController {
|
|
|
118225
118247
|
this._gridOptions.api.setFocusedCell(rowIndex, firstCell);
|
|
118226
118248
|
}
|
|
118227
118249
|
setColumnsDef(cols) {
|
|
118228
|
-
const newColDefs = [Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: "", checkboxSelection: true, width:
|
|
118250
|
+
const newColDefs = [Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: "", checkboxSelection: true, width: 29, suppressMovable: true, suppressAutoSize: true, suppressMenu: true, lockPosition: true, pinned: true }, this._multipleSelection && { headerComponent: "ezGridHeaderComponent", headerClass: "ag-column-select-header" })];
|
|
118229
118251
|
if (this._statusResolver != undefined) {
|
|
118230
118252
|
newColDefs.push({
|
|
118231
118253
|
colId: this.STATUS_COL_ID,
|
|
118232
118254
|
headerName: "",
|
|
118233
118255
|
checkboxSelection: false,
|
|
118234
118256
|
headerCheckboxSelection: false,
|
|
118235
|
-
width:
|
|
118257
|
+
width: 29,
|
|
118236
118258
|
suppressMovable: true,
|
|
118237
118259
|
suppressAutoSize: true,
|
|
118238
118260
|
suppressMenu: true,
|
|
@@ -119794,15 +119816,15 @@ var EzScrollDirection;
|
|
|
119794
119816
|
EzScrollDirection["BOTH"] = "both";
|
|
119795
119817
|
})(EzScrollDirection || (EzScrollDirection = {}));
|
|
119796
119818
|
|
|
119797
|
-
const ezScrollerCss = ":host{--ez-scroller--box-shadow-color:var(--background--body, #fafcff);--ez-scroller__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-scroller__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-scroller__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-scroller__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-scroller__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-scroller__scrollbar--width:var(--space--small, 6px);display:flex;cursor:grab;width:100
|
|
119819
|
+
const ezScrollerCss = ":host{--ez-scroller--box-shadow-color:var(--background--body, #fafcff);--ez-scroller__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-scroller__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-scroller__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-scroller__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-scroller__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-scroller__scrollbar--width:var(--space--small, 6px);display:flex;cursor:grab;width:100%;overflow:hidden}.dragging{cursor:grabbing}.ez-scroller__container{display:flex;overflow-y:hidden;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked),.ez-scroller__container:not(.ez-scroller__container--locked):hover{scrollbar-color:var(--ez-scroller__scrollbar--color-clicked) var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container--both{overflow-y:scroll;overflow-x:scroll}.ez-scroller__container--horizontal{overflow-x:scroll;flex-direction:row}.ez-scroller__container--vertical{overflow-y:scroll;flex-direction:column}.ez-scroller__container::-webkit-scrollbar{background-color:transparent;width:var(--ez-scroller__scrollbar--width);height:var(--ez-scroller__scrollbar--width);max-width:var(--ez-scroller__scrollbar--width);min-width:var(--ez-scroller__scrollbar--width)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-track{visibility:hidden;background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-track,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-track{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-thumb{background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb{background-color:var(--ez-scroller__scrollbar--color-default)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:hover{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-scroller__scrollbar--color-hover)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:active{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-scroller__scrollbar--color-clicked)}.ez-scroller__wrapper{display:flex;position:relative;width:100%;height:100%}.ez-scroller__wrapper--horizontal{flex-direction:row;width:100%;height:auto}.ez-scroller__wrapper--vertical{flex-direction:column;width:auto;height:100%}.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--shadow-end::after{content:\"\";display:flex;position:absolute;z-index:1}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{width:24px;min-height:calc(100% - 10px)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before{left:0;background:linear-gradient(to right, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{right:0;background:linear-gradient(to left, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{min-width:calc(100% - 10px);height:24px}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before{top:0;background:linear-gradient(to bottom, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{bottom:0;background:linear-gradient(to top, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}";
|
|
119798
119820
|
|
|
119799
119821
|
let EzScroller$1 = class extends HTMLElement$1 {
|
|
119800
119822
|
constructor() {
|
|
119801
119823
|
super();
|
|
119802
119824
|
this.__registerHost();
|
|
119803
119825
|
this.__attachShadow();
|
|
119804
|
-
this.
|
|
119805
|
-
this.
|
|
119826
|
+
this._shadowStart = "ez-scroller__wrapper--shadow-start";
|
|
119827
|
+
this._shadowEnd = "ez-scroller__wrapper--shadow-end";
|
|
119806
119828
|
this.isActive = false;
|
|
119807
119829
|
/**
|
|
119808
119830
|
* Define se o `scroll` estará bloqueado.
|
|
@@ -119818,15 +119840,11 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119818
119840
|
//---------------------------------------------
|
|
119819
119841
|
getContainerClass() {
|
|
119820
119842
|
return `ez-scroller__container ez-scroller__container--${this.direction}
|
|
119821
|
-
${this.locked ? " ez-scroller__container--locked" : ""}
|
|
119822
|
-
${this.isFirefox && this.isActive ? " ez-scroller__container--no-overlay" : ""}
|
|
119843
|
+
${this.locked || !this.isActive ? " ez-scroller__container--locked" : ""}
|
|
119823
119844
|
`;
|
|
119824
119845
|
}
|
|
119825
|
-
|
|
119826
|
-
return `ez-
|
|
119827
|
-
}
|
|
119828
|
-
getShadowEndClass() {
|
|
119829
|
-
return `ez-scroller__shadow-end ez-scroller__shadow-end--${this.direction}`;
|
|
119846
|
+
getWrapperClass() {
|
|
119847
|
+
return `ez-scroller__wrapper ez-scroller__wrapper--${this.direction}`;
|
|
119830
119848
|
}
|
|
119831
119849
|
finishDrag() {
|
|
119832
119850
|
if (this._controller) {
|
|
@@ -119835,38 +119853,40 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119835
119853
|
}
|
|
119836
119854
|
updateShadow() {
|
|
119837
119855
|
const container = this._container;
|
|
119838
|
-
|
|
119839
|
-
|
|
119840
|
-
|
|
119841
|
-
|
|
119842
|
-
|
|
119843
|
-
|
|
119844
|
-
}
|
|
119845
|
-
|
|
119846
|
-
|
|
119847
|
-
|
|
119848
|
-
|
|
119849
|
-
}
|
|
119850
|
-
|
|
119851
|
-
this.
|
|
119852
|
-
|
|
119853
|
-
|
|
119854
|
-
|
|
119855
|
-
|
|
119856
|
-
|
|
119857
|
-
|
|
119858
|
-
|
|
119859
|
-
|
|
119860
|
-
|
|
119861
|
-
|
|
119862
|
-
|
|
119863
|
-
|
|
119864
|
-
|
|
119865
|
-
|
|
119866
|
-
|
|
119867
|
-
|
|
119868
|
-
|
|
119869
|
-
|
|
119856
|
+
const wrapper = this._wrapper;
|
|
119857
|
+
if (container == undefined || wrapper == undefined) {
|
|
119858
|
+
return;
|
|
119859
|
+
}
|
|
119860
|
+
let remainingScroll;
|
|
119861
|
+
if (this.direction === EzScrollDirection.HORIZONTAL) {
|
|
119862
|
+
const { scrollWidth, clientWidth, scrollLeft } = container;
|
|
119863
|
+
remainingScroll = scrollWidth - clientWidth - Math.ceil(scrollLeft);
|
|
119864
|
+
this._startHidden = container.scrollLeft > 0;
|
|
119865
|
+
}
|
|
119866
|
+
else if (this.direction === EzScrollDirection.VERTICAL) {
|
|
119867
|
+
const { scrollHeight, clientHeight, scrollTop } = container;
|
|
119868
|
+
remainingScroll = scrollHeight - clientHeight - Math.ceil(scrollTop);
|
|
119869
|
+
this._startHidden = container.scrollTop > 0;
|
|
119870
|
+
}
|
|
119871
|
+
this._endHidden = remainingScroll > 0;
|
|
119872
|
+
this.isActive = this._startHidden || this._endHidden;
|
|
119873
|
+
const shadowPositions = ["", "start", "end", "middle"];
|
|
119874
|
+
const currentPosition = shadowPositions[Number(this._startHidden) | Number(this._endHidden) << 1];
|
|
119875
|
+
if (currentPosition === "start") {
|
|
119876
|
+
wrapper.classList.add(this._shadowStart);
|
|
119877
|
+
wrapper.classList.remove(this._shadowEnd);
|
|
119878
|
+
}
|
|
119879
|
+
else if (currentPosition === "end") {
|
|
119880
|
+
wrapper.classList.remove(this._shadowStart);
|
|
119881
|
+
wrapper.classList.add(this._shadowEnd);
|
|
119882
|
+
}
|
|
119883
|
+
else if (currentPosition === "middle") {
|
|
119884
|
+
wrapper.classList.add(this._shadowStart);
|
|
119885
|
+
wrapper.classList.add(this._shadowEnd);
|
|
119886
|
+
}
|
|
119887
|
+
else {
|
|
119888
|
+
wrapper.classList.remove(this._shadowStart);
|
|
119889
|
+
wrapper.classList.remove(this._shadowEnd);
|
|
119870
119890
|
}
|
|
119871
119891
|
}
|
|
119872
119892
|
configResize() {
|
|
@@ -119880,6 +119900,9 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119880
119900
|
this._resizeObserver = new ResizeObserver(JSUtils.debounce(this.updateShadow.bind(this), 200));
|
|
119881
119901
|
this._resizeObserver.observe(container);
|
|
119882
119902
|
}
|
|
119903
|
+
getContainerElement() {
|
|
119904
|
+
return h("div", { ref: ref => this._container = ref, class: this.getContainerClass() }, h("slot", null));
|
|
119905
|
+
}
|
|
119883
119906
|
//---------------------------------------------
|
|
119884
119907
|
// Event handlers
|
|
119885
119908
|
//---------------------------------------------
|
|
@@ -119918,14 +119941,11 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119918
119941
|
}
|
|
119919
119942
|
}
|
|
119920
119943
|
}
|
|
119921
|
-
componentDidLoad() {
|
|
119922
|
-
this.isFirefox = UserAgentUtils.isFirefox();
|
|
119923
|
-
}
|
|
119924
119944
|
componentDidRender() {
|
|
119925
119945
|
var _a, _b;
|
|
119926
119946
|
if (this.direction === EzScrollDirection.BOTH) {
|
|
119927
|
-
(_a = this.
|
|
119928
|
-
(_b = this.
|
|
119947
|
+
(_a = this._wrapper) === null || _a === void 0 ? void 0 : _a.classList.remove(this._shadowStart);
|
|
119948
|
+
(_b = this._wrapper) === null || _b === void 0 ? void 0 : _b.classList.remove(this._shadowEnd);
|
|
119929
119949
|
return;
|
|
119930
119950
|
}
|
|
119931
119951
|
if (this._container && this.activeShadow) {
|
|
@@ -119935,9 +119955,9 @@ let EzScroller$1 = class extends HTMLElement$1 {
|
|
|
119935
119955
|
}
|
|
119936
119956
|
}
|
|
119937
119957
|
render() {
|
|
119938
|
-
return (h(Host, null, this.activeShadow
|
|
119939
|
-
h("
|
|
119940
|
-
|
|
119958
|
+
return (h(Host, null, this.activeShadow
|
|
119959
|
+
? h("div", { ref: ref => this._wrapper = ref, class: this.getWrapperClass() }, this.getContainerElement())
|
|
119960
|
+
: this.getContainerElement()));
|
|
119941
119961
|
}
|
|
119942
119962
|
static get style() { return ezScrollerCss; }
|
|
119943
119963
|
};
|
|
@@ -121521,7 +121541,7 @@ const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-nu
|
|
|
121521
121541
|
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"]}]);
|
|
121522
121542
|
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"]}]);
|
|
121523
121543
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
121524
|
-
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"
|
|
121544
|
+
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
121525
121545
|
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]}]);
|
|
121526
121546
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
121527
121547
|
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]}]);
|
|
@@ -67,35 +67,50 @@ let EzActionsButton = class {
|
|
|
67
67
|
async isOpened() {
|
|
68
68
|
return this._floatingID != undefined;
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (!this.enabled) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
let options = {
|
|
70
|
+
getFloatOptions() {
|
|
71
|
+
return {
|
|
76
72
|
autoClose: true,
|
|
77
73
|
innerClickTest: this.innerClickCheck,
|
|
78
74
|
isFixed: true,
|
|
79
75
|
top: this.getPositionTop(),
|
|
80
76
|
left: this.getPositionLeft()
|
|
81
77
|
};
|
|
82
|
-
|
|
78
|
+
}
|
|
79
|
+
getSideLimit() {
|
|
80
|
+
var _a;
|
|
83
81
|
const docWidth = document.body.clientWidth;
|
|
84
82
|
const boundingList = (_a = this._actionsList) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
85
83
|
if ((boundingList === null || boundingList === void 0 ? void 0 : boundingList.right) > docWidth) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
84
|
+
return (docWidth - boundingList.width) + "px";
|
|
85
|
+
}
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
showActions() {
|
|
89
|
+
if (!this.enabled) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const options = this.getFloatOptions();
|
|
93
|
+
this._floatingID = FloatingManager.float(this._actionsList, this._listContainer, options);
|
|
94
|
+
const sideLimit = this.getSideLimit();
|
|
95
|
+
if (sideLimit != undefined) {
|
|
96
|
+
options.left = sideLimit;
|
|
93
97
|
FloatingManager.updateFloatPosition(this._actionsList, this._listContainer, options);
|
|
94
98
|
}
|
|
95
99
|
window.requestAnimationFrame(() => {
|
|
96
100
|
this._actionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
97
101
|
});
|
|
98
102
|
}
|
|
103
|
+
updatePosition() {
|
|
104
|
+
if (!this.enabled || this._floatingID == undefined) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const options = this.getFloatOptions();
|
|
108
|
+
const sideLimit = this.getSideLimit();
|
|
109
|
+
if (sideLimit != undefined) {
|
|
110
|
+
options.left = sideLimit;
|
|
111
|
+
}
|
|
112
|
+
FloatingManager.updateFloatPosition(this._actionsList, this._listContainer, options);
|
|
113
|
+
}
|
|
99
114
|
getPositionTop() {
|
|
100
115
|
var _a;
|
|
101
116
|
const boundingHost = (_a = this._element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
@@ -132,8 +147,8 @@ let EzActionsButton = class {
|
|
|
132
147
|
return (_a = this.actions) === null || _a === void 0 ? void 0 : _a.some(action => action.iconName != undefined);
|
|
133
148
|
}
|
|
134
149
|
controlScrollPage() {
|
|
135
|
-
window.removeEventListener("scroll", this.
|
|
136
|
-
window.addEventListener("scroll", this.
|
|
150
|
+
window.removeEventListener("scroll", this.updatePosition.bind(this));
|
|
151
|
+
window.addEventListener("scroll", this.updatePosition.bind(this));
|
|
137
152
|
}
|
|
138
153
|
//---------------------------------------------
|
|
139
154
|
// Event handlers
|
|
@@ -121,6 +121,10 @@ let EzDateTimeInput = class {
|
|
|
121
121
|
this._calendar.fitVertical(top, this._elem.clientHeight);
|
|
122
122
|
this._calendar.style.visibility = 'inherit';
|
|
123
123
|
}
|
|
124
|
+
hideCalendar() {
|
|
125
|
+
this.changeValue(this._calendar.value);
|
|
126
|
+
this._calendar.hide();
|
|
127
|
+
}
|
|
124
128
|
getParsedDateTime(strValue) {
|
|
125
129
|
var _a, _b;
|
|
126
130
|
if (strValue === void 0) {
|
|
@@ -161,7 +165,7 @@ let EzDateTimeInput = class {
|
|
|
161
165
|
this.errorMessage = "O valor digitado não é uma data válida";
|
|
162
166
|
}
|
|
163
167
|
}
|
|
164
|
-
getTextValue(
|
|
168
|
+
getTextValue(date) {
|
|
165
169
|
const options = {
|
|
166
170
|
year: 'numeric', month: 'numeric', day: 'numeric',
|
|
167
171
|
hour: 'numeric', minute: 'numeric'
|
|
@@ -170,7 +174,10 @@ let EzDateTimeInput = class {
|
|
|
170
174
|
year: 'numeric', month: 'numeric', day: 'numeric',
|
|
171
175
|
hour: 'numeric', minute: 'numeric', second: 'numeric'
|
|
172
176
|
};
|
|
173
|
-
|
|
177
|
+
if (!date)
|
|
178
|
+
return;
|
|
179
|
+
let formattedDate = new Intl.DateTimeFormat('pt-BR', this.showSeconds ? optionsSecond : options).format(date);
|
|
180
|
+
return formattedDate.replace(",", "");
|
|
174
181
|
}
|
|
175
182
|
handleInput(event) {
|
|
176
183
|
const newValue = this.getParsedDateTime();
|
|
@@ -196,7 +203,7 @@ let EzDateTimeInput = class {
|
|
|
196
203
|
}
|
|
197
204
|
render() {
|
|
198
205
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
199
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick() }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.
|
|
206
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick() }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
200
207
|
}
|
|
201
208
|
get _elem() { return getElement(this); }
|
|
202
209
|
static get watchers() { return {
|
|
@@ -115012,14 +115012,14 @@ class AgGridController {
|
|
|
115012
115012
|
this._gridOptions.api.setFocusedCell(rowIndex, firstCell);
|
|
115013
115013
|
}
|
|
115014
115014
|
setColumnsDef(cols) {
|
|
115015
|
-
const newColDefs = [Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: "", checkboxSelection: true, width:
|
|
115015
|
+
const newColDefs = [Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: "", checkboxSelection: true, width: 29, suppressMovable: true, suppressAutoSize: true, suppressMenu: true, lockPosition: true, pinned: true }, this._multipleSelection && { headerComponent: "ezGridHeaderComponent", headerClass: "ag-column-select-header" })];
|
|
115016
115016
|
if (this._statusResolver != undefined) {
|
|
115017
115017
|
newColDefs.push({
|
|
115018
115018
|
colId: this.STATUS_COL_ID,
|
|
115019
115019
|
headerName: "",
|
|
115020
115020
|
checkboxSelection: false,
|
|
115021
115021
|
headerCheckboxSelection: false,
|
|
115022
|
-
width:
|
|
115022
|
+
width: 29,
|
|
115023
115023
|
suppressMovable: true,
|
|
115024
115024
|
suppressAutoSize: true,
|
|
115025
115025
|
suppressMenu: true,
|