@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-39550.0 → 0.0.0-bugfix-dev-KB-50898.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-alert-list.cjs.entry.js +2 -5
- package/dist/cjs/ez-grid.cjs.entry.js +15 -20
- package/dist/cjs/ez-modal-container.cjs.entry.js +6 -5
- package/dist/cjs/ez-popup.cjs.entry.js +5 -5
- package/dist/cjs/ez-scroller_3.cjs.entry.js +4 -18
- package/dist/cjs/ez-split-button.cjs.entry.js +6 -25
- package/dist/cjs/ez-split-panel.cjs.entry.js +9 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +2 -10
- package/dist/collection/components/ez-grid/ez-grid.js +15 -20
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +15 -5
- package/dist/collection/components/ez-popup/ez-popup.js +15 -6
- package/dist/collection/components/ez-split-button/ez-split-button.js +6 -25
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +9 -1
- package/dist/collection/components/ez-tree/ez-tree.css +0 -26
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +2 -15
- package/dist/custom-elements/index.js +51 -82
- package/dist/esm/ez-alert-list.entry.js +2 -5
- package/dist/esm/ez-grid.entry.js +15 -20
- package/dist/esm/ez-modal-container.entry.js +6 -5
- package/dist/esm/ez-popup.entry.js +6 -6
- package/dist/esm/ez-scroller_3.entry.js +4 -18
- package/dist/esm/ez-split-button.entry.js +6 -25
- package/dist/esm/ez-split-panel.entry.js +9 -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-fb5adf9e.entry.js → p-031784b0.entry.js} +1 -1
- package/dist/ezui/p-58fae29b.entry.js +1 -0
- package/dist/ezui/{p-d7d7423a.entry.js → p-65b3c23b.entry.js} +1 -1
- package/dist/ezui/p-8c82374d.entry.js +1 -0
- package/dist/ezui/p-8e7031a0.entry.js +1 -0
- package/dist/ezui/p-a08b309b.entry.js +1 -0
- package/dist/ezui/p-b9fbf4e7.entry.js +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +0 -1
- package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +1 -0
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +1 -1
- package/dist/types/components/ez-popup/ez-popup.d.ts +1 -2
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +0 -3
- package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -3
- package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
- package/package.json +1 -1
- package/dist/collection/components/ez-tree/interfaces/ITreeItemBadge.js +0 -1
- package/dist/ezui/p-3faa2b46.entry.js +0 -1
- package/dist/ezui/p-701231f0.entry.js +0 -1
- package/dist/ezui/p-91f626d3.entry.js +0 -1
- package/dist/ezui/p-a1ec32ef.entry.js +0 -1
- package/dist/ezui/p-e228ccb9.entry.js +0 -1
- package/dist/types/components/ez-tree/interfaces/ITreeItemBadge.d.ts +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Host, h, Fragment } from "@stencil/core";
|
|
2
|
-
import { FloatingManager
|
|
2
|
+
import { FloatingManager } from '@sankhyalabs/core';
|
|
3
3
|
export class EzPopup {
|
|
4
4
|
constructor() {
|
|
5
5
|
this._sizeClasses = {
|
|
@@ -19,11 +19,11 @@ export class EzPopup {
|
|
|
19
19
|
observeConfig() {
|
|
20
20
|
this.manageOverflow();
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
.
|
|
22
|
+
handleKeyDown(event) {
|
|
23
|
+
if (event.key === 'Escape' || event.key === 'Esc')
|
|
24
|
+
this.opened = false;
|
|
25
|
+
if (event.key === 'Enter')
|
|
26
|
+
this.ezPopupAction.emit("OK");
|
|
27
27
|
}
|
|
28
28
|
manageOverflow() {
|
|
29
29
|
if (this.opened) {
|
|
@@ -198,4 +198,13 @@ export class EzPopup {
|
|
|
198
198
|
"methodName": "observeConfig"
|
|
199
199
|
}];
|
|
200
200
|
}
|
|
201
|
+
static get listeners() {
|
|
202
|
+
return [{
|
|
203
|
+
"name": "keydown",
|
|
204
|
+
"method": "handleKeyDown",
|
|
205
|
+
"target": "window",
|
|
206
|
+
"capture": false,
|
|
207
|
+
"passive": false
|
|
208
|
+
}];
|
|
209
|
+
}
|
|
201
210
|
}
|
|
@@ -65,38 +65,22 @@ export class EzSplitButton {
|
|
|
65
65
|
evt.stopPropagation();
|
|
66
66
|
this.closeDropdown();
|
|
67
67
|
}
|
|
68
|
-
resolveOffsetParentRect() {
|
|
69
|
-
var _a, _b;
|
|
70
|
-
const offsetParentRect = (_b = (_a = this.dropdownParent) === null || _a === void 0 ? void 0 : _a.offsetParent) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
71
|
-
const scrollLeft = window.scrollX || document.documentElement.scrollLeft;
|
|
72
|
-
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
|
73
|
-
const rectWithoutScroll = {
|
|
74
|
-
top: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.top) + scrollTop,
|
|
75
|
-
left: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.left) + scrollLeft,
|
|
76
|
-
bottom: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.bottom) + scrollTop,
|
|
77
|
-
right: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.right) + scrollLeft,
|
|
78
|
-
width: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.width,
|
|
79
|
-
height: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.height
|
|
80
|
-
};
|
|
81
|
-
this.offsetParentRect = rectWithoutScroll;
|
|
82
|
-
}
|
|
83
68
|
/**
|
|
84
69
|
* Método responsável em posicionar o dropdown na tela.
|
|
85
70
|
* Faz com que o dropdown se ajuste automaticamente ao espaco na tela
|
|
86
71
|
*/
|
|
87
72
|
positionDropdown() {
|
|
88
|
-
var _a, _b, _c, _d, _e, _f;
|
|
89
73
|
const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
|
|
90
74
|
const rightButtonRect = _rightButton.getBoundingClientRect();
|
|
91
75
|
const dropdownParentRect = _dropdownParent.getBoundingClientRect();
|
|
92
|
-
const spaceBelow = window.innerHeight -
|
|
93
|
-
const spaceAbove = rightButtonRect.top
|
|
94
|
-
const spaceRight = window.innerWidth -
|
|
76
|
+
const spaceBelow = window.innerHeight - rightButtonRect.bottom;
|
|
77
|
+
const spaceAbove = rightButtonRect.top;
|
|
78
|
+
const spaceRight = window.innerWidth - rightButtonRect.right;
|
|
95
79
|
const spaceLeft = rightButtonRect.left;
|
|
96
80
|
const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
|
|
97
81
|
const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
|
|
98
|
-
let top = `${rightButtonRect.bottom
|
|
99
|
-
let left = `${rightButtonRect.left
|
|
82
|
+
let top = `${rightButtonRect.bottom + window.scrollY}px`;
|
|
83
|
+
let left = `${rightButtonRect.left + window.scrollX}px`;
|
|
100
84
|
let bottom = 'auto';
|
|
101
85
|
if (hasSpaceBelow) {
|
|
102
86
|
bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
|
|
@@ -104,7 +88,7 @@ export class EzSplitButton {
|
|
|
104
88
|
_dropdownParent.style.maxHeight = `${spaceAbove}px`;
|
|
105
89
|
}
|
|
106
90
|
if (hasSpaceRight) {
|
|
107
|
-
left = `${rightButtonRect.right - dropdownParentRect.width
|
|
91
|
+
left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
|
|
108
92
|
}
|
|
109
93
|
_dropdownParent.style.top = top;
|
|
110
94
|
_dropdownParent.style.bottom = bottom;
|
|
@@ -117,9 +101,6 @@ export class EzSplitButton {
|
|
|
117
101
|
componentWillLoad() {
|
|
118
102
|
this.setEvents();
|
|
119
103
|
}
|
|
120
|
-
componentWillRender() {
|
|
121
|
-
this.resolveOffsetParentRect();
|
|
122
|
-
}
|
|
123
104
|
componentDidLoad() {
|
|
124
105
|
if (this._element)
|
|
125
106
|
ElementIDUtils.addIDInfo(this._element);
|
|
@@ -106,8 +106,16 @@ export class SplitPanel {
|
|
|
106
106
|
}
|
|
107
107
|
getGridTemplate() {
|
|
108
108
|
let template = '';
|
|
109
|
+
const inUseSpacePercentage = this._items.reduce((accumulator, currentValue) => {
|
|
110
|
+
var _a;
|
|
111
|
+
return accumulator + (((_a = currentValue.size) === null || _a === void 0 ? void 0 : _a.includes('%')) ? Number(currentValue.size.replace("%", "")) : 0);
|
|
112
|
+
}, 0);
|
|
113
|
+
const itemsWithPercentageAmount = this._items.filter((item) => item.size === undefined).length;
|
|
109
114
|
this._items.forEach((col, index) => {
|
|
110
|
-
|
|
115
|
+
let size = col.size || '1fr';
|
|
116
|
+
if (!col.size && inUseSpacePercentage > 0) {
|
|
117
|
+
size = `${(100 - inUseSpacePercentage) / itemsWithPercentageAmount}%`;
|
|
118
|
+
}
|
|
111
119
|
if (index === this._items.length - 1) {
|
|
112
120
|
template += ` ${size}`;
|
|
113
121
|
return;
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
--ez-tree--selected--color: var(--color--primary, #008561);
|
|
25
25
|
/*@doc Define a cor da fonte e do ícone quando desabilitado.*/
|
|
26
26
|
--ez-tree--disabled--color: var(--text--disable, #AFB6C0);
|
|
27
|
-
/*@doc Usado em fontes com peso maior (bold)*/
|
|
28
|
-
--ez-tree--font-weight--bold: var(--text-weight--large, 600);
|
|
29
27
|
|
|
30
28
|
/* Item */
|
|
31
29
|
/*@doc Define a altura de cada item.*/
|
|
@@ -49,18 +47,6 @@
|
|
|
49
47
|
/*@doc Define o espaçamento interno do ícone.*/
|
|
50
48
|
--ez-tree__item-icon-box--padding: var(--ez-tree__tree-item--padding);
|
|
51
49
|
|
|
52
|
-
/* Badge ícone - Cores */
|
|
53
|
-
/*@doc Cor de ícone de badge padrão.*/
|
|
54
|
-
--ez-tree__badge--icon-color--default: var(--title--primary, #2B3A54);
|
|
55
|
-
/*@doc Cor de ícone de badge de erro.*/
|
|
56
|
-
--ez-tree__badge--icon-color--error: var(--color--error, #da4453);
|
|
57
|
-
/*@doc Cor de ícone de badge sucesso.*/
|
|
58
|
-
--ez-tree__badge--icon-color--success: var(--color-alert--success-800, #157a00);
|
|
59
|
-
/*@doc Cor de ícone de badge de aviso.*/
|
|
60
|
-
--ez-tree__badge--icon-color--warning: var(--color--warning, #f2d410);
|
|
61
|
-
/*@doc Cor de ícone de badge desabilitado.*/
|
|
62
|
-
--ez-tree__badge--icon-color--disabled: var(--text--disable, #AFB6C0);
|
|
63
|
-
|
|
64
50
|
/*private*/
|
|
65
51
|
display: flex;
|
|
66
52
|
flex-direction: column;
|
|
@@ -99,14 +85,6 @@ ul.first-level {
|
|
|
99
85
|
--ez-icon--color: white;
|
|
100
86
|
}
|
|
101
87
|
|
|
102
|
-
.tree-item-badge-text{
|
|
103
|
-
/*public*/
|
|
104
|
-
font-family: var(--ez-tree--font-family);
|
|
105
|
-
font-size: var(--ez-tree--font-size);
|
|
106
|
-
font-weight: var(--ez-tree--font-weight);
|
|
107
|
-
color: var(--ez-tree--color);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
88
|
.tree-item-badge.error{
|
|
111
89
|
background: var(--color--error);
|
|
112
90
|
}
|
|
@@ -202,10 +180,6 @@ ul.first-level {
|
|
|
202
180
|
color: var(--ez-tree--color);
|
|
203
181
|
}
|
|
204
182
|
|
|
205
|
-
.item-label--bold {
|
|
206
|
-
font-weight: var(--ez-tree--font-weight--bold);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
183
|
.tree-item[selected] .item-label {
|
|
210
184
|
/*public*/
|
|
211
185
|
color: var(--ez-tree--selected--color);
|
|
@@ -14,24 +14,11 @@ export const TreeItem = (props) => {
|
|
|
14
14
|
if (available) {
|
|
15
15
|
itemsList.push(treeItem);
|
|
16
16
|
}
|
|
17
|
-
return (h("ul", { class: level === 1 ? "first-level" : undefined }, h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ?
|
|
17
|
+
return (h("ul", { class: level === 1 ? "first-level" : undefined }, h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? 'tree-item-error' : ""}`, onClick: () => available && itemClick(treeItem) }, {
|
|
18
18
|
disabled,
|
|
19
19
|
selected: treeItem.id === selectedId,
|
|
20
20
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
|
|
21
21
|
}), h("div", { class: "item-label-container" }, h("div", { class: "item-icon-box" }, expandable &&
|
|
22
|
-
h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })), h("label", { class:
|
|
22
|
+
h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })), h("label", { class: "item-label" }, treeItem.label)), h("div", { class: `tree-item-badge ${(treeItem.id !== selectedId) ? treeItem.badge : null}` }, treeItem.badge === 'error' ? (h("ez-icon", { id: `${treeItem.id}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" })) : null)), expanded
|
|
23
23
|
&& node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
|
|
24
24
|
};
|
|
25
|
-
function getBadgeElement(itemId, badge, isSelectedItem) {
|
|
26
|
-
if (badge == undefined) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (typeof badge === "string") {
|
|
30
|
-
return h("div", { class: `tree-item-badge ${isSelectedItem ? null : badge}` }, badge === "error" &&
|
|
31
|
-
h("ez-icon", { id: `${itemId}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" }));
|
|
32
|
-
}
|
|
33
|
-
if (badge.type === "text") {
|
|
34
|
-
return h("div", { id: `${itemId}-badge-text`, class: "tree-item-badge-text" }, badge.text);
|
|
35
|
-
}
|
|
36
|
-
return h("div", null, h("ez-icon", { id: `${itemId}-badge-icon`, class: "tree-item-badge-icon", style: { "--ez-icon--color": `var(--ez-tree__badge--icon-color--${badge.iconColor || "default"})` }, iconName: badge.iconName }));
|
|
37
|
-
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, HTMLBuilder, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, ArrayUtils as ArrayUtils$1, OverflowWatcher, OVERFLOWED_CLASS_NAME
|
|
3
|
+
import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, HTMLBuilder, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, ArrayUtils as ArrayUtils$1, OverflowWatcher, OVERFLOWED_CLASS_NAME } from '@sankhyalabs/core';
|
|
4
4
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
5
5
|
|
|
6
6
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
@@ -1133,7 +1133,6 @@ const EzAlertList$1 = class extends HTMLElement$1 {
|
|
|
1133
1133
|
super();
|
|
1134
1134
|
this.__registerHost();
|
|
1135
1135
|
this.__attachShadow();
|
|
1136
|
-
this._container = undefined;
|
|
1137
1136
|
this.alerts = [];
|
|
1138
1137
|
this.enableDragAndDrop = undefined;
|
|
1139
1138
|
this.enableExpand = true;
|
|
@@ -1142,9 +1141,7 @@ const EzAlertList$1 = class extends HTMLElement$1 {
|
|
|
1142
1141
|
this.expanded = false;
|
|
1143
1142
|
}
|
|
1144
1143
|
observeOpened() {
|
|
1145
|
-
|
|
1146
|
-
this.manageOverlay();
|
|
1147
|
-
}
|
|
1144
|
+
this.manageOverlay();
|
|
1148
1145
|
}
|
|
1149
1146
|
/**
|
|
1150
1147
|
* Retorna o id do alerta a partir do título e do índice.
|
|
@@ -1271,7 +1268,7 @@ const EzAlertList$1 = class extends HTMLElement$1 {
|
|
|
1271
1268
|
}
|
|
1272
1269
|
get _element() { return this; }
|
|
1273
1270
|
static get watchers() { return {
|
|
1274
|
-
"
|
|
1271
|
+
"opened": ["observeOpened"]
|
|
1275
1272
|
}; }
|
|
1276
1273
|
static get style() { return ezAlertListCss; }
|
|
1277
1274
|
};
|
|
@@ -125683,6 +125680,9 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125683
125680
|
return Promise.resolve(this._gridController.getColumnsState().filter(col => matches(col.label, search)));
|
|
125684
125681
|
}
|
|
125685
125682
|
observeConfig(config) {
|
|
125683
|
+
if (!config) {
|
|
125684
|
+
return;
|
|
125685
|
+
}
|
|
125686
125686
|
this._gridController.setColumnsState(config.columns);
|
|
125687
125687
|
}
|
|
125688
125688
|
updatePaginationTooltip() {
|
|
@@ -125741,29 +125741,21 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125741
125741
|
return newConfig;
|
|
125742
125742
|
}
|
|
125743
125743
|
positionSelectionCounter() {
|
|
125744
|
-
var _a
|
|
125745
|
-
if (
|
|
125746
|
-
return;
|
|
125747
|
-
if (!this._showSelectionCounter) {
|
|
125748
|
-
this._gridSelectionCounter.style.bottom = '';
|
|
125744
|
+
var _a;
|
|
125745
|
+
if (this._gridSelectionCounter == undefined) {
|
|
125749
125746
|
return;
|
|
125750
125747
|
}
|
|
125751
|
-
|
|
125752
|
-
|
|
125753
|
-
|
|
125754
|
-
|
|
125755
|
-
|
|
125756
|
-
|
|
125757
|
-
|
|
125758
|
-
|
|
125759
|
-
|
|
125760
|
-
|
|
125761
|
-
const containerRightEdge = containerRect.left + this._container.clientWidth;
|
|
125762
|
-
const selectionEnd = (selectionStart - (selectionRect.width / 2)) + selectionRect.width;
|
|
125763
|
-
if (selectionEnd > containerRightEdge) {
|
|
125764
|
-
selectionStart = containerRightEdge - (selectionRect.width / 2);
|
|
125748
|
+
if (this._showSelectionCounter) {
|
|
125749
|
+
const boundingContainer = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
125750
|
+
if (boundingContainer == undefined) {
|
|
125751
|
+
return;
|
|
125752
|
+
}
|
|
125753
|
+
const limitBottom = boundingContainer.bottom - 30;
|
|
125754
|
+
this._gridSelectionCounter.style.bottom = document.body.clientHeight - limitBottom + 'px';
|
|
125755
|
+
}
|
|
125756
|
+
else {
|
|
125757
|
+
this._gridSelectionCounter.style.bottom = '';
|
|
125765
125758
|
}
|
|
125766
|
-
return `${selectionStart}px`;
|
|
125767
125759
|
}
|
|
125768
125760
|
setEvents() {
|
|
125769
125761
|
window.removeEventListener('scroll', this.positionSelectionCounter.bind(this));
|
|
@@ -126810,6 +126802,12 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
126810
126802
|
this.cancelButtonStatus = undefined;
|
|
126811
126803
|
this.okButtonStatus = undefined;
|
|
126812
126804
|
}
|
|
126805
|
+
handleKeyDown(event) {
|
|
126806
|
+
if (event.key === 'Escape' || event.key === 'Esc')
|
|
126807
|
+
this.ezModalAction.emit(ModalAction$1.CANCEL);
|
|
126808
|
+
if (event.key === 'Enter')
|
|
126809
|
+
this.ezModalAction.emit(ModalAction$1.OK);
|
|
126810
|
+
}
|
|
126813
126811
|
cancelIsVisible() {
|
|
126814
126812
|
return (this.cancelButtonStatus !== ModalButtonStatus$1.HIDDEN && this.cancelButtonLabel != undefined);
|
|
126815
126813
|
}
|
|
@@ -126820,10 +126818,6 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
126820
126818
|
window.requestAnimationFrame(() => {
|
|
126821
126819
|
this.ezModalAction.emit(ModalAction$1.LOAD);
|
|
126822
126820
|
});
|
|
126823
|
-
new KeyboardManager({ propagate: false, element: this._element })
|
|
126824
|
-
.bind("Enter", this.ezModalAction.emit.bind(ModalAction$1.OK))
|
|
126825
|
-
.bind("Escape", this.ezModalAction.emit.bind(ModalAction$1.CANCEL))
|
|
126826
|
-
.bind("Esc", this.ezModalAction.emit.bind(ModalAction$1.CANCEL));
|
|
126827
126821
|
}
|
|
126828
126822
|
focusLast() {
|
|
126829
126823
|
if (this._okButton == undefined) {
|
|
@@ -127372,11 +127366,11 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
127372
127366
|
observeConfig() {
|
|
127373
127367
|
this.manageOverflow();
|
|
127374
127368
|
}
|
|
127375
|
-
|
|
127376
|
-
|
|
127377
|
-
.
|
|
127378
|
-
|
|
127379
|
-
.
|
|
127369
|
+
handleKeyDown(event) {
|
|
127370
|
+
if (event.key === 'Escape' || event.key === 'Esc')
|
|
127371
|
+
this.opened = false;
|
|
127372
|
+
if (event.key === 'Enter')
|
|
127373
|
+
this.ezPopupAction.emit("OK");
|
|
127380
127374
|
}
|
|
127381
127375
|
manageOverflow() {
|
|
127382
127376
|
if (this.opened) {
|
|
@@ -128470,38 +128464,22 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
|
|
|
128470
128464
|
evt.stopPropagation();
|
|
128471
128465
|
this.closeDropdown();
|
|
128472
128466
|
}
|
|
128473
|
-
resolveOffsetParentRect() {
|
|
128474
|
-
var _a, _b;
|
|
128475
|
-
const offsetParentRect = (_b = (_a = this.dropdownParent) === null || _a === void 0 ? void 0 : _a.offsetParent) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
128476
|
-
const scrollLeft = window.scrollX || document.documentElement.scrollLeft;
|
|
128477
|
-
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
|
128478
|
-
const rectWithoutScroll = {
|
|
128479
|
-
top: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.top) + scrollTop,
|
|
128480
|
-
left: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.left) + scrollLeft,
|
|
128481
|
-
bottom: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.bottom) + scrollTop,
|
|
128482
|
-
right: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.right) + scrollLeft,
|
|
128483
|
-
width: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.width,
|
|
128484
|
-
height: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.height
|
|
128485
|
-
};
|
|
128486
|
-
this.offsetParentRect = rectWithoutScroll;
|
|
128487
|
-
}
|
|
128488
128467
|
/**
|
|
128489
128468
|
* Método responsável em posicionar o dropdown na tela.
|
|
128490
128469
|
* Faz com que o dropdown se ajuste automaticamente ao espaco na tela
|
|
128491
128470
|
*/
|
|
128492
128471
|
positionDropdown() {
|
|
128493
|
-
var _a, _b, _c, _d, _e, _f;
|
|
128494
128472
|
const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
|
|
128495
128473
|
const rightButtonRect = _rightButton.getBoundingClientRect();
|
|
128496
128474
|
const dropdownParentRect = _dropdownParent.getBoundingClientRect();
|
|
128497
|
-
const spaceBelow = window.innerHeight -
|
|
128498
|
-
const spaceAbove = rightButtonRect.top
|
|
128499
|
-
const spaceRight = window.innerWidth -
|
|
128475
|
+
const spaceBelow = window.innerHeight - rightButtonRect.bottom;
|
|
128476
|
+
const spaceAbove = rightButtonRect.top;
|
|
128477
|
+
const spaceRight = window.innerWidth - rightButtonRect.right;
|
|
128500
128478
|
const spaceLeft = rightButtonRect.left;
|
|
128501
128479
|
const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
|
|
128502
128480
|
const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
|
|
128503
|
-
let top = `${rightButtonRect.bottom
|
|
128504
|
-
let left = `${rightButtonRect.left
|
|
128481
|
+
let top = `${rightButtonRect.bottom + window.scrollY}px`;
|
|
128482
|
+
let left = `${rightButtonRect.left + window.scrollX}px`;
|
|
128505
128483
|
let bottom = 'auto';
|
|
128506
128484
|
if (hasSpaceBelow) {
|
|
128507
128485
|
bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
|
|
@@ -128509,7 +128487,7 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
|
|
|
128509
128487
|
_dropdownParent.style.maxHeight = `${spaceAbove}px`;
|
|
128510
128488
|
}
|
|
128511
128489
|
if (hasSpaceRight) {
|
|
128512
|
-
left = `${rightButtonRect.right - dropdownParentRect.width
|
|
128490
|
+
left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
|
|
128513
128491
|
}
|
|
128514
128492
|
_dropdownParent.style.top = top;
|
|
128515
128493
|
_dropdownParent.style.bottom = bottom;
|
|
@@ -128522,9 +128500,6 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
|
|
|
128522
128500
|
componentWillLoad() {
|
|
128523
128501
|
this.setEvents();
|
|
128524
128502
|
}
|
|
128525
|
-
componentWillRender() {
|
|
128526
|
-
this.resolveOffsetParentRect();
|
|
128527
|
-
}
|
|
128528
128503
|
componentDidLoad() {
|
|
128529
128504
|
if (this._element)
|
|
128530
128505
|
ElementIDUtils.addIDInfo(this._element);
|
|
@@ -129369,8 +129344,16 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
129369
129344
|
}
|
|
129370
129345
|
getGridTemplate() {
|
|
129371
129346
|
let template = '';
|
|
129347
|
+
const inUseSpacePercentage = this._items.reduce((accumulator, currentValue) => {
|
|
129348
|
+
var _a;
|
|
129349
|
+
return accumulator + (((_a = currentValue.size) === null || _a === void 0 ? void 0 : _a.includes('%')) ? Number(currentValue.size.replace("%", "")) : 0);
|
|
129350
|
+
}, 0);
|
|
129351
|
+
const itemsWithPercentageAmount = this._items.filter((item) => item.size === undefined).length;
|
|
129372
129352
|
this._items.forEach((col, index) => {
|
|
129373
|
-
|
|
129353
|
+
let size = col.size || '1fr';
|
|
129354
|
+
if (!col.size && inUseSpacePercentage > 0) {
|
|
129355
|
+
size = `${(100 - inUseSpacePercentage) / itemsWithPercentageAmount}%`;
|
|
129356
|
+
}
|
|
129374
129357
|
if (index === this._items.length - 1) {
|
|
129375
129358
|
template += ` ${size}`;
|
|
129376
129359
|
return;
|
|
@@ -130409,7 +130392,7 @@ const TreeItem = (props) => {
|
|
|
130409
130392
|
itemsList.push(treeItem);
|
|
130410
130393
|
}
|
|
130411
130394
|
return (h("ul", { class: level === 1 ? "first-level" : undefined },
|
|
130412
|
-
h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ?
|
|
130395
|
+
h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? 'tree-item-error' : ""}`, onClick: () => available && itemClick(treeItem) }, {
|
|
130413
130396
|
disabled,
|
|
130414
130397
|
selected: treeItem.id === selectedId,
|
|
130415
130398
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
|
|
@@ -130417,25 +130400,11 @@ const TreeItem = (props) => {
|
|
|
130417
130400
|
h("div", { class: "item-label-container" },
|
|
130418
130401
|
h("div", { class: "item-icon-box" }, expandable &&
|
|
130419
130402
|
h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })),
|
|
130420
|
-
h("label", { class:
|
|
130421
|
-
|
|
130403
|
+
h("label", { class: "item-label" }, treeItem.label)),
|
|
130404
|
+
h("div", { class: `tree-item-badge ${(treeItem.id !== selectedId) ? treeItem.badge : null}` }, treeItem.badge === 'error' ? (h("ez-icon", { id: `${treeItem.id}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" })) : null)),
|
|
130422
130405
|
expanded
|
|
130423
130406
|
&& node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
|
|
130424
130407
|
};
|
|
130425
|
-
function getBadgeElement(itemId, badge, isSelectedItem) {
|
|
130426
|
-
if (badge == undefined) {
|
|
130427
|
-
return;
|
|
130428
|
-
}
|
|
130429
|
-
if (typeof badge === "string") {
|
|
130430
|
-
return h("div", { class: `tree-item-badge ${isSelectedItem ? null : badge}` }, badge === "error" &&
|
|
130431
|
-
h("ez-icon", { id: `${itemId}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" }));
|
|
130432
|
-
}
|
|
130433
|
-
if (badge.type === "text") {
|
|
130434
|
-
return h("div", { id: `${itemId}-badge-text`, class: "tree-item-badge-text" }, badge.text);
|
|
130435
|
-
}
|
|
130436
|
-
return h("div", null,
|
|
130437
|
-
h("ez-icon", { id: `${itemId}-badge-icon`, class: "tree-item-badge-icon", style: { "--ez-icon--color": `var(--ez-tree__badge--icon-color--${badge.iconColor || "default"})` }, iconName: badge.iconName }));
|
|
130438
|
-
}
|
|
130439
130408
|
|
|
130440
130409
|
class Node$1 {
|
|
130441
130410
|
constructor(tree, item, parent, isPlaceHolder = false) {
|
|
@@ -130679,7 +130648,7 @@ class Tree extends Node$1 {
|
|
|
130679
130648
|
}
|
|
130680
130649
|
}
|
|
130681
130650
|
|
|
130682
|
-
const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:calc(var(--space--small, 6px) + 2px);--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-
|
|
130651
|
+
const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:calc(var(--space--small, 6px) + 2px);--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item-badge{width:16px;height:16px;background:transparent;border-radius:50%;transition:all 300ms ease-in-out;display:flex;align-items:center;justify-content:center}.tree-item-badge-error-icon{--ez-icon--color:white}.tree-item-badge.error{background:var(--color--error)}.tree-item-badge.warning{background:var(--color--warning)}.tree-item-badge.success{background:var(--color--success)}.item-label-container{display:flex;align-items:center}.tree-item{display:flex;align-items:center;margin-top:var(--ez-tree--margin);margin-right:var(--ez-tree--margin-right);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding);justify-content:space-between}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";
|
|
130683
130652
|
|
|
130684
130653
|
const EzTree$1 = class extends HTMLElement$1 {
|
|
130685
130654
|
constructor() {
|
|
@@ -131617,7 +131586,7 @@ const MultiSelectionBoxMessage$1 = class extends HTMLElement$1 {
|
|
|
131617
131586
|
|
|
131618
131587
|
const EzActionsButton = /*@__PURE__*/proxyCustomElement(EzActionsButton$1, [1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32]}]);
|
|
131619
131588
|
const EzAlert = /*@__PURE__*/proxyCustomElement(EzAlert$1, [1,"ez-alert",{"alertType":[513,"alert-type"]}]);
|
|
131620
|
-
const EzAlertList = /*@__PURE__*/proxyCustomElement(EzAlertList$1, [1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540]
|
|
131589
|
+
const EzAlertList = /*@__PURE__*/proxyCustomElement(EzAlertList$1, [1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540]}]);
|
|
131621
131590
|
const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
|
|
131622
131591
|
const EzBadge = /*@__PURE__*/proxyCustomElement(EzBadge$1, [1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"hasSlot":[32]}]);
|
|
131623
131592
|
const EzBreadcrumb = /*@__PURE__*/proxyCustomElement(EzBreadcrumb$1, [1,"ez-breadcrumb",{"items":[1040],"fillMode":[1025,"fill-mode"],"maxItems":[1026,"max-items"],"positionEllipsis":[1026,"position-ellipsis"],"visibleItems":[32],"hiddenItems":[32],"showDropdown":[32],"collapseConfigPosition":[32]}]);
|
|
@@ -131642,11 +131611,11 @@ const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[5
|
|
|
131642
131611
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
131643
131612
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
131644
131613
|
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]);
|
|
131645
|
-
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [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"]}]);
|
|
131614
|
+
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [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"]},[[8,"keydown","handleKeyDown"]]]);
|
|
131646
131615
|
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
131647
131616
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513]}]);
|
|
131648
131617
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
|
|
131649
|
-
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"]}]);
|
|
131618
|
+
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"]},[[8,"keydown","handleKeyDown"]]]);
|
|
131650
131619
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
131651
131620
|
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"]]]);
|
|
131652
131621
|
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],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
@@ -6,7 +6,6 @@ const ezAlertListCss = ":host {\n display: flex;\n\n /* Alert List */\n \n /
|
|
|
6
6
|
const EzAlertList = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
|
-
this._container = undefined;
|
|
10
9
|
this.alerts = [];
|
|
11
10
|
this.enableDragAndDrop = undefined;
|
|
12
11
|
this.enableExpand = true;
|
|
@@ -15,9 +14,7 @@ const EzAlertList = class {
|
|
|
15
14
|
this.expanded = false;
|
|
16
15
|
}
|
|
17
16
|
observeOpened() {
|
|
18
|
-
|
|
19
|
-
this.manageOverlay();
|
|
20
|
-
}
|
|
17
|
+
this.manageOverlay();
|
|
21
18
|
}
|
|
22
19
|
/**
|
|
23
20
|
* Retorna o id do alerta a partir do título e do índice.
|
|
@@ -144,7 +141,7 @@ const EzAlertList = class {
|
|
|
144
141
|
}
|
|
145
142
|
get _element() { return getElement(this); }
|
|
146
143
|
static get watchers() { return {
|
|
147
|
-
"
|
|
144
|
+
"opened": ["observeOpened"]
|
|
148
145
|
}; }
|
|
149
146
|
};
|
|
150
147
|
EzAlertList.style = ezAlertListCss;
|
|
@@ -120763,6 +120763,9 @@ const EzGrid = class {
|
|
|
120763
120763
|
return Promise.resolve(this._gridController.getColumnsState().filter(col => matches(col.label, search)));
|
|
120764
120764
|
}
|
|
120765
120765
|
observeConfig(config) {
|
|
120766
|
+
if (!config) {
|
|
120767
|
+
return;
|
|
120768
|
+
}
|
|
120766
120769
|
this._gridController.setColumnsState(config.columns);
|
|
120767
120770
|
}
|
|
120768
120771
|
updatePaginationTooltip() {
|
|
@@ -120821,29 +120824,21 @@ const EzGrid = class {
|
|
|
120821
120824
|
return newConfig;
|
|
120822
120825
|
}
|
|
120823
120826
|
positionSelectionCounter() {
|
|
120824
|
-
var _a
|
|
120825
|
-
if (
|
|
120827
|
+
var _a;
|
|
120828
|
+
if (this._gridSelectionCounter == undefined) {
|
|
120826
120829
|
return;
|
|
120827
|
-
|
|
120830
|
+
}
|
|
120831
|
+
if (this._showSelectionCounter) {
|
|
120832
|
+
const boundingContainer = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
120833
|
+
if (boundingContainer == undefined) {
|
|
120834
|
+
return;
|
|
120835
|
+
}
|
|
120836
|
+
const limitBottom = boundingContainer.bottom - 30;
|
|
120837
|
+
this._gridSelectionCounter.style.bottom = document.body.clientHeight - limitBottom + 'px';
|
|
120838
|
+
}
|
|
120839
|
+
else {
|
|
120828
120840
|
this._gridSelectionCounter.style.bottom = '';
|
|
120829
|
-
return;
|
|
120830
120841
|
}
|
|
120831
|
-
const containerRect = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
120832
|
-
const selectionRect = (_b = this._gridSelectionCounter) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
120833
|
-
if (!containerRect || !selectionRect)
|
|
120834
|
-
return;
|
|
120835
|
-
const positionBottom = containerRect.bottom - 30;
|
|
120836
|
-
this._gridSelectionCounter.style.bottom = document.body.clientHeight - positionBottom + 'px';
|
|
120837
|
-
this._gridSelectionCounter.style.left = this.calculatePositionLeft(containerRect, selectionRect);
|
|
120838
|
-
}
|
|
120839
|
-
calculatePositionLeft(containerRect, selectionRect) {
|
|
120840
|
-
let selectionStart = containerRect.left + (containerRect.width / 2);
|
|
120841
|
-
const containerRightEdge = containerRect.left + this._container.clientWidth;
|
|
120842
|
-
const selectionEnd = (selectionStart - (selectionRect.width / 2)) + selectionRect.width;
|
|
120843
|
-
if (selectionEnd > containerRightEdge) {
|
|
120844
|
-
selectionStart = containerRightEdge - (selectionRect.width / 2);
|
|
120845
|
-
}
|
|
120846
|
-
return `${selectionStart}px`;
|
|
120847
120842
|
}
|
|
120848
120843
|
setEvents() {
|
|
120849
120844
|
window.removeEventListener('scroll', this.positionSelectionCounter.bind(this));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-baa5e267.js';
|
|
2
|
-
import { KeyboardManager } from '@sankhyalabs/core';
|
|
3
2
|
|
|
4
3
|
var ModalAction;
|
|
5
4
|
(function (ModalAction) {
|
|
@@ -32,6 +31,12 @@ const EzModalContainer = class {
|
|
|
32
31
|
this.cancelButtonStatus = undefined;
|
|
33
32
|
this.okButtonStatus = undefined;
|
|
34
33
|
}
|
|
34
|
+
handleKeyDown(event) {
|
|
35
|
+
if (event.key === 'Escape' || event.key === 'Esc')
|
|
36
|
+
this.ezModalAction.emit(ModalAction$1.CANCEL);
|
|
37
|
+
if (event.key === 'Enter')
|
|
38
|
+
this.ezModalAction.emit(ModalAction$1.OK);
|
|
39
|
+
}
|
|
35
40
|
cancelIsVisible() {
|
|
36
41
|
return (this.cancelButtonStatus !== ModalButtonStatus$1.HIDDEN && this.cancelButtonLabel != undefined);
|
|
37
42
|
}
|
|
@@ -42,10 +47,6 @@ const EzModalContainer = class {
|
|
|
42
47
|
window.requestAnimationFrame(() => {
|
|
43
48
|
this.ezModalAction.emit(ModalAction$1.LOAD);
|
|
44
49
|
});
|
|
45
|
-
new KeyboardManager({ propagate: false, element: this._element })
|
|
46
|
-
.bind("Enter", this.ezModalAction.emit.bind(ModalAction$1.OK))
|
|
47
|
-
.bind("Escape", this.ezModalAction.emit.bind(ModalAction$1.CANCEL))
|
|
48
|
-
.bind("Esc", this.ezModalAction.emit.bind(ModalAction$1.CANCEL));
|
|
49
50
|
}
|
|
50
51
|
focusLast() {
|
|
51
52
|
if (this._okButton == undefined) {
|