@sankhyalabs/ezui 2.3.1 → 2.3.2
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/README.md +1 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +12 -8
- package/dist/cjs/ez-button.cjs.entry.js +5 -5
- package/dist/cjs/ez-calendar.cjs.entry.js +10 -13
- package/dist/cjs/ez-check.cjs.entry.js +5 -8
- package/dist/cjs/ez-chip.cjs.entry.js +4 -4
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +14 -14
- package/dist/cjs/ez-combo-box.cjs.entry.js +11 -11
- package/dist/cjs/ez-date-input.cjs.entry.js +5 -5
- package/dist/cjs/ez-date-time-input.cjs.entry.js +7 -7
- package/dist/cjs/ez-dialog.cjs.entry.js +4 -7
- package/dist/cjs/ez-filter-input.cjs.entry.js +6 -6
- package/dist/cjs/ez-form.cjs.entry.js +3 -6
- package/dist/cjs/ez-grid.cjs.entry.js +16 -17
- package/dist/cjs/ez-icon.cjs.entry.js +3 -3
- package/dist/cjs/ez-list.cjs.entry.js +71 -71
- package/dist/cjs/ez-loading-bar.cjs.entry.js +8 -4
- package/dist/cjs/ez-modal-container.cjs.entry.js +2 -2
- package/dist/cjs/ez-modal.cjs.entry.js +6 -6
- package/dist/cjs/ez-number-input.cjs.entry.js +5 -5
- package/dist/cjs/ez-popover.cjs.entry.js +8 -10
- package/dist/cjs/ez-popup.cjs.entry.js +4 -5
- package/dist/cjs/ez-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/ez-scroller.cjs.entry.js +2 -7
- package/dist/cjs/ez-search.cjs.entry.js +13 -14
- package/dist/cjs/ez-text-area.cjs.entry.js +7 -7
- package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +7 -7
- package/dist/cjs/ez-time-input.cjs.entry.js +6 -6
- package/dist/cjs/ez-toast.cjs.entry.js +5 -5
- package/dist/cjs/ez-upload.cjs.entry.js +5 -5
- package/dist/cjs/ez-view-stack.cjs.entry.js +2 -2
- 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 +27 -22
- package/dist/collection/components/ez-button/ez-button.js +15 -15
- package/dist/collection/components/ez-calendar/ez-calendar.js +18 -21
- package/dist/collection/components/ez-card-item/ez-card-item.js +2 -2
- package/dist/collection/components/ez-check/ez-check.js +28 -22
- package/dist/collection/components/ez-chip/ez-chip.js +15 -15
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +28 -28
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +42 -33
- package/dist/collection/components/ez-date-input/ez-date-input.js +18 -18
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +21 -21
- package/dist/collection/components/ez-dialog/ez-dialog.js +13 -35
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +18 -35
- package/dist/collection/components/ez-form/ez-form.js +7 -42
- package/dist/collection/components/ez-grid/ez-grid.js +41 -42
- package/dist/collection/components/ez-icon/ez-icon.js +11 -11
- package/dist/collection/components/ez-list/ez-list.js +112 -93
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.js +10 -6
- package/dist/collection/components/ez-modal/ez-modal.js +14 -14
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +16 -16
- package/dist/collection/components/ez-number-input/ez-number-input.js +20 -20
- package/dist/collection/components/ez-popover/ez-popover.js +22 -24
- package/dist/collection/components/ez-popup/ez-popup.js +16 -17
- package/dist/collection/components/ez-radio-button/ez-radio-button.js +8 -8
- package/dist/collection/components/ez-scroller/ez-scroller.js +6 -12
- package/dist/collection/components/ez-search/ez-search.js +42 -46
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +2 -2
- package/dist/collection/components/ez-text-area/ez-text-area.js +20 -37
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +6 -6
- package/dist/collection/components/ez-text-input/ez-text-input.js +21 -38
- package/dist/collection/components/ez-time-input/ez-time-input.js +20 -20
- package/dist/collection/components/ez-toast/ez-toast.js +12 -12
- package/dist/collection/components/ez-upload/ez-upload.js +14 -14
- package/dist/collection/components/ez-view-stack/ez-view-stack.js +4 -4
- package/dist/custom-elements/index.js +265 -279
- package/dist/esm/ez-actions-button.entry.js +12 -8
- package/dist/esm/ez-button.entry.js +5 -5
- package/dist/esm/ez-calendar.entry.js +10 -13
- package/dist/esm/ez-check.entry.js +5 -8
- package/dist/esm/ez-chip.entry.js +4 -4
- package/dist/esm/ez-collapsible-box.entry.js +14 -14
- package/dist/esm/ez-combo-box.entry.js +11 -11
- package/dist/esm/ez-date-input.entry.js +5 -5
- package/dist/esm/ez-date-time-input.entry.js +7 -7
- package/dist/esm/ez-dialog.entry.js +4 -7
- package/dist/esm/ez-filter-input.entry.js +6 -6
- package/dist/esm/ez-form.entry.js +3 -6
- package/dist/esm/ez-grid.entry.js +16 -17
- package/dist/esm/ez-icon.entry.js +3 -3
- package/dist/esm/ez-list.entry.js +71 -71
- package/dist/esm/ez-loading-bar.entry.js +8 -4
- package/dist/esm/ez-modal-container.entry.js +2 -2
- package/dist/esm/ez-modal.entry.js +6 -6
- package/dist/esm/ez-number-input.entry.js +5 -5
- package/dist/esm/ez-popover.entry.js +8 -10
- package/dist/esm/ez-popup.entry.js +4 -5
- package/dist/esm/ez-radio-button.entry.js +3 -3
- package/dist/esm/ez-scroller.entry.js +2 -7
- package/dist/esm/ez-search.entry.js +13 -14
- package/dist/esm/ez-text-area.entry.js +7 -7
- package/dist/esm/ez-text-edit.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +7 -7
- package/dist/esm/ez-time-input.entry.js +6 -6
- package/dist/esm/ez-toast.entry.js +5 -5
- package/dist/esm/ez-upload.entry.js +5 -5
- package/dist/esm/ez-view-stack.entry.js +2 -2
- 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-1214c5ce.entry.js +1 -0
- package/dist/ezui/p-2af9fe67.entry.js +1 -0
- package/dist/ezui/p-642c530f.entry.js +1 -0
- package/dist/ezui/p-96265e26.entry.js +1 -0
- package/dist/ezui/p-b47eb5d4.entry.js +1 -0
- package/dist/ezui/{p-855f99f8.entry.js → p-ccbe8272.entry.js} +1 -1
- package/dist/ezui/p-e60e7308.entry.js +1 -0
- package/dist/ezui/p-ede1328a.entry.js +1 -0
- package/dist/ezui/p-f6111077.entry.js +1 -0
- package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +15 -14
- package/dist/types/components/ez-button/ez-button.d.ts +10 -10
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +11 -14
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +7 -0
- package/dist/types/components/ez-check/ez-check.d.ts +11 -13
- package/dist/types/components/ez-chip/ez-chip.d.ts +15 -14
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +25 -25
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +21 -20
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +16 -17
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +18 -19
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +13 -16
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +12 -17
- package/dist/types/components/ez-form/ez-form.d.ts +7 -5
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +2 -2
- package/dist/types/components/ez-grid/ez-grid.d.ts +37 -39
- package/dist/types/components/ez-icon/ez-icon.d.ts +4 -4
- package/dist/types/components/ez-list/ez-list.d.ts +29 -32
- package/dist/types/components/ez-loading-bar/ez-loading-bar.d.ts +6 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +15 -15
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +10 -10
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +18 -24
- package/dist/types/components/ez-popover/ez-popover.d.ts +13 -16
- package/dist/types/components/ez-popup/ez-popup.d.ts +12 -13
- package/dist/types/components/ez-radio-button/ez-radio-button.d.ts +8 -8
- package/dist/types/components/ez-scroller/ez-scroller.d.ts +3 -4
- package/dist/types/components/ez-search/ez-search.d.ts +27 -31
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +4 -7
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +12 -16
- package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +5 -5
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +14 -19
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +16 -17
- package/dist/types/components/ez-toast/ez-toast.d.ts +7 -7
- package/dist/types/components/ez-upload/ez-upload.d.ts +11 -12
- package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +2 -2
- package/dist/types/components.d.ts +514 -529
- package/package.json +2 -2
- package/dist/ezui/p-0fb5f4be.entry.js +0 -1
- package/dist/ezui/p-1ba371a3.entry.js +0 -1
- package/dist/ezui/p-42c6493e.entry.js +0 -1
- package/dist/ezui/p-6700360e.entry.js +0 -1
- package/dist/ezui/p-89b2a151.entry.js +0 -1
- package/dist/ezui/p-8c2105a5.entry.js +0 -1
- package/dist/ezui/p-ed2135a5.entry.js +0 -1
- package/dist/ezui/p-f6afdc4d.entry.js +0 -1
|
@@ -10,64 +10,42 @@ let EzList = class {
|
|
|
10
10
|
this._listGroupItems = [];
|
|
11
11
|
this._listItemsHistory = [];
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* Define a lista inicial do componente.
|
|
14
|
+
*/
|
|
15
15
|
this.dataSource = [];
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* Se true os grupos serão exibidos.
|
|
18
|
+
*/
|
|
19
19
|
this.useGroups = false;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* Se true habilita `drag and drop` para os itens.
|
|
22
|
+
*/
|
|
23
23
|
this.ezDraggable = false;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Se true os itens serão selecionáveis.
|
|
26
|
+
*/
|
|
27
27
|
this.ezSelectable = false;
|
|
28
28
|
}
|
|
29
|
-
createList() {
|
|
30
|
-
if (this.useGroups) {
|
|
31
|
-
let list = [...this.dataSource];
|
|
32
|
-
list.forEach(itemGroup => {
|
|
33
|
-
this.sortGroup(itemGroup);
|
|
34
|
-
});
|
|
35
|
-
this._listGroupItems = list;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this._listItems = this._listItemsHistory.length > 0 ? this._listItemsHistory : [...this.dataSource];
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
sortGroup(itemGroup) {
|
|
42
|
-
if (itemGroup.sort) {
|
|
43
|
-
itemGroup.items.sort(function (a, b) {
|
|
44
|
-
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
45
|
-
});
|
|
46
|
-
if (itemGroup.sort === "DSC") {
|
|
47
|
-
itemGroup.items.reverse();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
29
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
30
|
+
* Limpa o histórico da lista.
|
|
31
|
+
*/
|
|
54
32
|
async clearHistory() {
|
|
55
33
|
this._listItemsHistory = [];
|
|
56
34
|
}
|
|
57
35
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
36
|
+
* Traz o conteúdo da lista para a área visível.
|
|
37
|
+
*/
|
|
60
38
|
async scrollToTop() {
|
|
61
39
|
if (this.useGroups) {
|
|
62
|
-
this._element.shadowRoot.querySelector(
|
|
40
|
+
this._element.shadowRoot.querySelector(".group-container").scrollTop = 0;
|
|
63
41
|
}
|
|
64
42
|
else {
|
|
65
|
-
this._element.shadowRoot.querySelector(
|
|
43
|
+
this._element.shadowRoot.querySelector(".items-container").scrollTop = 0;
|
|
66
44
|
}
|
|
67
45
|
}
|
|
68
46
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
47
|
+
* Aplica seleção nas linhas da lista.
|
|
48
|
+
*/
|
|
71
49
|
async setSelection(selectedItem, scrollToOption) {
|
|
72
50
|
if (selectedItem && this.ezSelectable) {
|
|
73
51
|
if (this.useGroups) {
|
|
@@ -98,8 +76,8 @@ let EzList = class {
|
|
|
98
76
|
}
|
|
99
77
|
if (scrollToOption) {
|
|
100
78
|
let liElem = this.useGroups ?
|
|
101
|
-
this._groupContainer.querySelector(
|
|
102
|
-
: this._itemContainer.querySelector(
|
|
79
|
+
this._groupContainer.querySelector("li#item_" + this.getItemId(selectedItem.label))
|
|
80
|
+
: this._itemContainer.querySelector("li#item_" + this.getItemId(selectedItem.label));
|
|
103
81
|
if (liElem) {
|
|
104
82
|
liElem.scrollIntoView();
|
|
105
83
|
}
|
|
@@ -109,27 +87,9 @@ let EzList = class {
|
|
|
109
87
|
this.removeSelection();
|
|
110
88
|
}
|
|
111
89
|
}
|
|
112
|
-
removeSelection() {
|
|
113
|
-
if (this.useGroups) {
|
|
114
|
-
let newList = [...this._listGroupItems];
|
|
115
|
-
newList.forEach(groupItem => {
|
|
116
|
-
groupItem.items.forEach(item => {
|
|
117
|
-
item.selected = false;
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
this._listGroupItems = newList;
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
let newList = [...this._listItems];
|
|
124
|
-
newList.forEach(item => {
|
|
125
|
-
item.selected = false;
|
|
126
|
-
});
|
|
127
|
-
this._listItems = newList;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
90
|
/**
|
|
131
|
-
*
|
|
132
|
-
|
|
91
|
+
* Obtém o item selecionado.
|
|
92
|
+
*/
|
|
133
93
|
async getSelection() {
|
|
134
94
|
let selectedItem;
|
|
135
95
|
if (this.useGroups) {
|
|
@@ -148,7 +108,7 @@ let EzList = class {
|
|
|
148
108
|
return selectedItem;
|
|
149
109
|
}
|
|
150
110
|
/**
|
|
151
|
-
*
|
|
111
|
+
* Obtém a lista de items ou grupos.
|
|
152
112
|
*/
|
|
153
113
|
async getList() {
|
|
154
114
|
if (this.useGroups) {
|
|
@@ -156,6 +116,46 @@ let EzList = class {
|
|
|
156
116
|
}
|
|
157
117
|
return this._listItems;
|
|
158
118
|
}
|
|
119
|
+
createList() {
|
|
120
|
+
if (this.useGroups) {
|
|
121
|
+
let list = this.dataSource.map(item => item);
|
|
122
|
+
list.forEach(itemGroup => {
|
|
123
|
+
this.sortGroup(itemGroup);
|
|
124
|
+
});
|
|
125
|
+
this._listGroupItems = list;
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
this._listItems = this._listItemsHistory.length > 0 ? this._listItemsHistory : this.dataSource.map(item => item);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
sortGroup(itemGroup) {
|
|
132
|
+
if (itemGroup.sort) {
|
|
133
|
+
itemGroup.items.sort(function (a, b) {
|
|
134
|
+
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
135
|
+
});
|
|
136
|
+
if (itemGroup.sort === "DSC") {
|
|
137
|
+
itemGroup.items.reverse();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
removeSelection() {
|
|
142
|
+
if (this.useGroups) {
|
|
143
|
+
let newList = [...this._listGroupItems];
|
|
144
|
+
newList.forEach(groupItem => {
|
|
145
|
+
groupItem.items.forEach(item => {
|
|
146
|
+
item.selected = false;
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
this._listGroupItems = newList;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
let newList = [...this._listItems];
|
|
153
|
+
newList.forEach(item => {
|
|
154
|
+
item.selected = false;
|
|
155
|
+
});
|
|
156
|
+
this._listItems = newList;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
159
|
componentWillLoad() {
|
|
160
160
|
this._listItemsHistory = [];
|
|
161
161
|
}
|
|
@@ -278,7 +278,7 @@ let EzList = class {
|
|
|
278
278
|
}
|
|
279
279
|
addOverClass(element) {
|
|
280
280
|
if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains("draggable")) {
|
|
281
|
-
element.classList.add(
|
|
281
|
+
element.classList.add("over");
|
|
282
282
|
}
|
|
283
283
|
else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains("draggable-list")) {
|
|
284
284
|
this.addOverClass(element.parentElement);
|
|
@@ -303,21 +303,21 @@ let EzList = class {
|
|
|
303
303
|
let overCollection;
|
|
304
304
|
let overLastDroppableCollection;
|
|
305
305
|
if (this.useGroups) {
|
|
306
|
-
overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(
|
|
307
|
-
overLastDroppableCollection = this._groupContainer.getElementsByClassName(
|
|
306
|
+
overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName("over");
|
|
307
|
+
overLastDroppableCollection = this._groupContainer.getElementsByClassName("last-droppable-space");
|
|
308
308
|
}
|
|
309
309
|
else {
|
|
310
|
-
overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName(
|
|
311
|
-
overLastDroppableCollection = this._itemContainer.getElementsByClassName(
|
|
310
|
+
overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName("over");
|
|
311
|
+
overLastDroppableCollection = this._itemContainer.getElementsByClassName("last-droppable-space");
|
|
312
312
|
}
|
|
313
313
|
if (overCollection) {
|
|
314
314
|
Array.from(overCollection).forEach(function (element) {
|
|
315
|
-
element.classList.remove(
|
|
315
|
+
element.classList.remove("over");
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
if (overLastDroppableCollection) {
|
|
319
319
|
Array.from(overLastDroppableCollection).forEach(function (element) {
|
|
320
|
-
element.classList.remove(
|
|
320
|
+
element.classList.remove("over");
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -468,7 +468,7 @@ let EzList = class {
|
|
|
468
468
|
onDragOverLastIndex(ev) {
|
|
469
469
|
ev.preventDefault();
|
|
470
470
|
if (this._dragStartItem) {
|
|
471
|
-
ev.target.classList.add(
|
|
471
|
+
ev.target.classList.add("over");
|
|
472
472
|
ev.stopPropagation();
|
|
473
473
|
}
|
|
474
474
|
}
|
|
@@ -494,7 +494,7 @@ let EzList = class {
|
|
|
494
494
|
return (h(Host, { ref: (el) => this._element = el }, this.useGroups ?
|
|
495
495
|
h("div", { class: "group-container", ref: (el) => this._groupContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, this._listGroupItems.map(group => {
|
|
496
496
|
return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, h("label", { draggable: false, class: "group-name" }, group.group), h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() }, h("div", { class: "group-items-container" }, h("div", { class: "draggable-list" }, group.items.map((item, index) => {
|
|
497
|
-
return h("li", { id:
|
|
497
|
+
return h("li", { id: "item_" + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: "item_" + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: () => { group.sort ? undefined : this.removeOverClass(); }, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index), onDragOver: (event) => { group.sort ? undefined : this.onDragOverItem(event); }, onDrop: (event) => this.onDrop(event, { groupName: group.group, item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
|
|
498
498
|
h("div", { class: "slot-item" }, this.itemSlotBuilder(item, group))
|
|
499
499
|
: undefined));
|
|
500
500
|
})), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event, group) })), group.sort ?
|
|
@@ -503,7 +503,7 @@ let EzList = class {
|
|
|
503
503
|
}))
|
|
504
504
|
:
|
|
505
505
|
h("div", { class: "items-container", ref: (el) => this._itemContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, h("div", { class: "draggable-list" }, this._listItems.map((item, index) => {
|
|
506
|
-
return h("li", { id:
|
|
506
|
+
return h("li", { id: "item_" + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: "item_" + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: () => this.onDragStart({ item: item, index: index }), onClick: () => { this.setSelection(item); }, onDragLeave: () => this.removeOverClass(), onDragOver: (event) => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDrop(event, { item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
|
|
507
507
|
h("div", null, this.itemSlotBuilder(item))
|
|
508
508
|
: undefined));
|
|
509
509
|
}), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event) })))));
|
|
@@ -7,13 +7,17 @@ let EzLoadingBar = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this._showLoading = true;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Oculta o ez-loading-bar.
|
|
12
|
+
*/
|
|
13
|
+
async hide() {
|
|
11
14
|
this._showLoading = false;
|
|
12
|
-
return Promise.resolve();
|
|
13
15
|
}
|
|
14
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Exibe o ez-loading-bar.
|
|
18
|
+
*/
|
|
19
|
+
async show() {
|
|
15
20
|
this._showLoading = true;
|
|
16
|
-
return Promise.resolve();
|
|
17
21
|
}
|
|
18
22
|
render() {
|
|
19
23
|
return (h(Host, null, this._showLoading && h("div", { class: "loading-bar" }, h("div", { class: "loading-bar__container" }))));
|
|
@@ -24,7 +24,7 @@ let EzModalContainer = class {
|
|
|
24
24
|
registerInstance(this, hostRef);
|
|
25
25
|
this.ezModalAction = createEvent(this, "ezModalAction", 7);
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Define se o cabeçalho será mostrado.
|
|
28
28
|
*/
|
|
29
29
|
this.showTitleBar = true;
|
|
30
30
|
}
|
|
@@ -46,7 +46,7 @@ let EzModalContainer = class {
|
|
|
46
46
|
this._closeButton.focus();
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: evt => this.focusLast(evt) }), this.showTitleBar && h("div", { class: "ez-modal-container__header ez-margin-bottom--large ez-align--middle" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle) : undefined), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))), h("div", null, h("slot", null)), h("div", { class:
|
|
49
|
+
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: evt => this.focusLast(evt) }), this.showTitleBar && h("div", { class: "ez-modal-container__header ez-margin-bottom--large ez-align--middle" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle) : undefined), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))), h("div", null, h("slot", null)), h("div", { class: "ez-col ez-margin-left--auto" }, this.cancelIsVisible() ? h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) }) : undefined, this.okIsVisible() ? h("ez-button", { ref: ref => this._okButton = ref, label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, class: "ez-button--primary ez-margin-left--medium", onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }) : undefined), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: evt => this.focusFirst(evt) })));
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
EzModalContainer.style = ezModalContainerCss;
|
|
@@ -8,16 +8,16 @@ let EzModal = class {
|
|
|
8
8
|
this.ezCloseModal = createEvent(this, "ezCloseModal", 7);
|
|
9
9
|
this.ezOpenModal = createEvent(this, "ezOpenModal", 7);
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* Define se o ez-modal está aberto.
|
|
12
|
+
*/
|
|
13
13
|
this.opened = true;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
* Define se o ez-modal será fechado ao clicar `ESC`.
|
|
16
|
+
*/
|
|
17
17
|
this.closeEsc = false;
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
* Define se o modal será fechado ao clicar fora do conteúdo.
|
|
20
|
+
*/
|
|
21
21
|
this.closeOutsideClick = false;
|
|
22
22
|
this.handleKeyboardEvent = (ev) => {
|
|
23
23
|
if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
|
|
@@ -12,28 +12,28 @@ let EzNumberInput = class {
|
|
|
12
12
|
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
13
13
|
this._focused = false;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Se false, o usuário não pode interagir com o campo.
|
|
16
16
|
*/
|
|
17
17
|
this.enabled = true;
|
|
18
18
|
/**
|
|
19
|
-
* Define o
|
|
19
|
+
* Define o tamanho do campo.
|
|
20
20
|
*/
|
|
21
21
|
this.mode = "regular";
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Aplica o foco no campo.
|
|
25
25
|
*/
|
|
26
26
|
async setFocus() {
|
|
27
27
|
this._textInput.setFocus();
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Remove o foco
|
|
30
|
+
* Remove o foco do campo.
|
|
31
31
|
*/
|
|
32
32
|
async setBlur() {
|
|
33
33
|
this._textInput.setBlur();
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* Retorna
|
|
36
|
+
* Retorna se o conteúdo é inválido.
|
|
37
37
|
*/
|
|
38
38
|
async isInvalid() {
|
|
39
39
|
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
@@ -9,29 +9,27 @@ let EzPopover = class {
|
|
|
9
9
|
this.ezVisibilityChange = createEvent(this, "ezVisibilityChange", 7);
|
|
10
10
|
this._firstRender = true;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* quando o método show() for acionado.
|
|
12
|
+
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
14
13
|
*/
|
|
15
14
|
this.autoClose = true;
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
16
|
+
* Define a distância do topo. Devem ser usados valores válidos de CSS.
|
|
18
17
|
*/
|
|
19
18
|
this.top = "0px";
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
20
|
+
* Define a distância do lado esquerdo. Devem ser usados valores válidos de CSS.
|
|
22
21
|
*/
|
|
23
22
|
this.left = "0px";
|
|
24
23
|
/**
|
|
25
|
-
*
|
|
24
|
+
* Define a distância de baixo. Devem ser usados valores válidos de CSS.
|
|
26
25
|
*/
|
|
27
26
|
this.bottom = "0px";
|
|
28
27
|
/**
|
|
29
|
-
*
|
|
28
|
+
* Define a distância do lado direito. Devem ser usados valores válidos de CSS.
|
|
30
29
|
*/
|
|
31
30
|
this.right = "0px";
|
|
32
31
|
/**
|
|
33
32
|
* Ajusta o comportamento da largura do popover.
|
|
34
|
-
* Opções: "100% e "fit-content" (default)
|
|
35
33
|
*/
|
|
36
34
|
this.boxWidth = "fit-content";
|
|
37
35
|
this.innerClickTest = (_popOvercontainer, node, eventOrigin) => {
|
|
@@ -82,7 +80,7 @@ let EzPopover = class {
|
|
|
82
80
|
}
|
|
83
81
|
}
|
|
84
82
|
/**
|
|
85
|
-
* Atualiza a posição do popover
|
|
83
|
+
* Atualiza a posição do popover.
|
|
86
84
|
*/
|
|
87
85
|
async updatePosition(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
|
|
88
86
|
const floatingOptions = {
|
|
@@ -97,7 +95,7 @@ let EzPopover = class {
|
|
|
97
95
|
FloatingManager.updateFloatPosition(this._box, this._container, floatingOptions);
|
|
98
96
|
}
|
|
99
97
|
/**
|
|
100
|
-
*
|
|
98
|
+
* Exibe o ez-popover.
|
|
101
99
|
*/
|
|
102
100
|
async show(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
|
|
103
101
|
const floatingOptions = {
|
|
@@ -113,7 +111,7 @@ let EzPopover = class {
|
|
|
113
111
|
this.opened = true;
|
|
114
112
|
}
|
|
115
113
|
/**
|
|
116
|
-
*
|
|
114
|
+
* Oculta o ez-popover.
|
|
117
115
|
*/
|
|
118
116
|
async hide() {
|
|
119
117
|
if (this._floatingID !== undefined) {
|
|
@@ -14,20 +14,19 @@ let EzPopup = class {
|
|
|
14
14
|
"x-large": "col--sd-11"
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Define
|
|
18
|
-
* compreendidos em [x-small | small | medium | large | x-large].
|
|
17
|
+
* Define a largura do ez-popup.
|
|
19
18
|
*/
|
|
20
19
|
this.size = "medium";
|
|
21
20
|
/**
|
|
22
|
-
*
|
|
21
|
+
* Define se o ez-popover está aberto.
|
|
23
22
|
*/
|
|
24
23
|
this.opened = false;
|
|
25
24
|
/**
|
|
26
|
-
* Define se o componente utilizará
|
|
25
|
+
* Define se o componente utilizará cabeçalho.
|
|
27
26
|
*/
|
|
28
27
|
this.useHeader = true;
|
|
29
28
|
/**
|
|
30
|
-
* Define
|
|
29
|
+
* Define altura do componente.
|
|
31
30
|
*/
|
|
32
31
|
this.heightMode = "full";
|
|
33
32
|
}
|
|
@@ -12,11 +12,11 @@ let EzRadioButton = class {
|
|
|
12
12
|
*/
|
|
13
13
|
this.options = [];
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
* Se false o usuário não pode interagir com o campo.
|
|
16
|
+
*/
|
|
17
17
|
this.enabled = true;
|
|
18
18
|
/**
|
|
19
|
-
* Define a direção
|
|
19
|
+
* Define a direção dos itens.
|
|
20
20
|
*/
|
|
21
21
|
this.direction = "vertical";
|
|
22
22
|
}
|
|
@@ -16,16 +16,11 @@ let EzScroller = class {
|
|
|
16
16
|
this._classHidden = "ez-scroller__shadow--hidden";
|
|
17
17
|
this.isFirefox = false;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
* Por padrão, a direção é "Ambos".
|
|
21
|
-
*/
|
|
22
|
-
this.direction = EzScrollDirection.BOTH;
|
|
23
|
-
/**
|
|
24
|
-
* Determina se o scroll estará bloqueado quando necessário.
|
|
19
|
+
* Define se o `scroll` estará bloqueado.
|
|
25
20
|
*/
|
|
26
21
|
this.locked = false;
|
|
27
22
|
/**
|
|
28
|
-
*
|
|
23
|
+
* Define se haverá efeito de sombreado.
|
|
29
24
|
*/
|
|
30
25
|
this.activeShadow = false;
|
|
31
26
|
}
|
|
@@ -8,26 +8,25 @@ let EzSearch = class {
|
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
registerInstance(this, hostRef);
|
|
10
10
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
11
|
-
this.showPopup = createEvent(this, "showPopup", 7);
|
|
12
11
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
* Se false o usuário não pode interagir com o campo.
|
|
13
|
+
*/
|
|
15
14
|
this.enabled = true;
|
|
16
15
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Se false a opção selecionada deve exibir somente o `label`.
|
|
17
|
+
*/
|
|
19
18
|
this.showSelectedValue = true;
|
|
20
19
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
* Se false cada opção na lista deve exibir somente o `label`.
|
|
21
|
+
*/
|
|
23
22
|
this.showOptionValue = true;
|
|
24
23
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
* Se true remove a opção vazia da lista.
|
|
25
|
+
*/
|
|
27
26
|
this.suppressEmptyOption = false;
|
|
28
27
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
* Define o tamanho do campo.
|
|
29
|
+
*/
|
|
31
30
|
this.mode = "regular";
|
|
32
31
|
}
|
|
33
32
|
observeErrorMessage() {
|
|
@@ -41,19 +40,19 @@ let EzSearch = class {
|
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
|
-
*
|
|
43
|
+
* Aplica o foco no campo.
|
|
45
44
|
*/
|
|
46
45
|
async setFocus() {
|
|
47
46
|
this._comboElement.setFocus();
|
|
48
47
|
}
|
|
49
48
|
/**
|
|
50
|
-
* Remove o foco
|
|
49
|
+
* Remove o foco do campo.
|
|
51
50
|
*/
|
|
52
51
|
async setBlur() {
|
|
53
52
|
this._comboElement.setBlur();
|
|
54
53
|
}
|
|
55
54
|
/**
|
|
56
|
-
* Retorna
|
|
55
|
+
* Retorna se o conteúdo é inválido.
|
|
57
56
|
*/
|
|
58
57
|
async isInvalid() {
|
|
59
58
|
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
@@ -8,19 +8,19 @@ let EzTextArea = class {
|
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Se false o usuário não pode interagir com o campo.
|
|
12
12
|
*/
|
|
13
13
|
this.enabled = true;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Define o número de linhas.
|
|
16
16
|
*/
|
|
17
17
|
this.rows = 4;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Se false deixa de exibir a mensagem de erro dentro do campo.
|
|
20
20
|
*/
|
|
21
21
|
this.canShowError = true;
|
|
22
22
|
/**
|
|
23
|
-
* Define o
|
|
23
|
+
* Define o tamanho do campo.
|
|
24
24
|
*/
|
|
25
25
|
this.mode = "regular";
|
|
26
26
|
}
|
|
@@ -68,19 +68,19 @@ let EzTextArea = class {
|
|
|
68
68
|
// Public methods
|
|
69
69
|
//---------------------------------------------
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* Aplica o foco no campo.
|
|
72
72
|
*/
|
|
73
73
|
async setFocus() {
|
|
74
74
|
this._inputElem.focus();
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
* Remove o foco
|
|
77
|
+
* Remove o foco do campo.
|
|
78
78
|
*/
|
|
79
79
|
async setBlur() {
|
|
80
80
|
this._inputElem.blur();
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
|
-
* Retorna
|
|
83
|
+
* Retorna se o conteúdo é inválido.
|
|
84
84
|
*/
|
|
85
85
|
async isInvalid() {
|
|
86
86
|
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
@@ -8,19 +8,19 @@ let EzTextInput = class {
|
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Se false o usuário não pode interagir com o campo.
|
|
12
12
|
*/
|
|
13
13
|
this.enabled = true;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Se false deixa de exibir a mensagem de erro dentro do campo.
|
|
16
16
|
*/
|
|
17
17
|
this.canShowError = true;
|
|
18
18
|
/**
|
|
19
|
-
* Define o
|
|
19
|
+
* Define o tamanho do campo.
|
|
20
20
|
*/
|
|
21
21
|
this.mode = "regular";
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Se true o campo não terá bordas.
|
|
24
24
|
*/
|
|
25
25
|
this.noBorder = false;
|
|
26
26
|
}
|
|
@@ -105,19 +105,19 @@ let EzTextInput = class {
|
|
|
105
105
|
// Public methods
|
|
106
106
|
//---------------------------------------------
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
108
|
+
* Aplica o foco no campo.
|
|
109
109
|
*/
|
|
110
110
|
async setFocus() {
|
|
111
111
|
this._inputElem.focus();
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
* Remove o foco
|
|
114
|
+
* Remove o foco do campo.
|
|
115
115
|
*/
|
|
116
116
|
async setBlur() {
|
|
117
117
|
this._inputElem.blur();
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
|
-
* Retorna
|
|
120
|
+
* Retorna se o conteúdo é inválido.
|
|
121
121
|
*/
|
|
122
122
|
async isInvalid() {
|
|
123
123
|
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|