@sankhyalabs/ezui 5.22.0-dev.140 → 5.22.0-dev.142
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-double-list.cjs.entry.js +114 -53
- package/dist/cjs/{ez-tooltip.cjs.entry.js → ez-filter-input_2.cjs.entry.js} +123 -1
- package/dist/cjs/ez-grid.cjs.entry.js +15 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js +3510 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +6 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-double-list/doubleListHelper.js +9 -10
- package/dist/collection/components/ez-double-list/ez-double-list.css +6 -38
- package/dist/collection/components/ez-double-list/ez-double-list.js +168 -50
- package/dist/collection/components/ez-grid/ez-grid.js +43 -4
- package/dist/collection/components/ez-grid/interfaces/IGridMode.js +1 -0
- package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.css +226 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.js +582 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +3652 -70
- package/dist/esm/ez-double-list.entry.js +115 -54
- package/dist/esm/{ez-tooltip.entry.js → ez-filter-input_2.entry.js} +124 -3
- package/dist/esm/ez-grid.entry.js +15 -1
- package/dist/esm/ez-sortable-list.entry.js +3506 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-59561756.entry.js +7 -0
- package/dist/ezui/p-63cb493e.entry.js +1 -0
- package/dist/ezui/{p-e09514b6.entry.js → p-b38411b4.entry.js} +1 -1
- package/dist/ezui/p-e4528470.entry.js +1 -0
- package/dist/types/components/ez-double-list/doubleListHelper.d.ts +4 -2
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +60 -24
- package/dist/types/components/ez-grid/ez-grid.d.ts +6 -1
- package/dist/types/components/ez-grid/interfaces/IGridMode.d.ts +1 -0
- package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
- package/dist/types/components/ez-sortable-list/ez-sortable-list.d.ts +91 -0
- package/dist/types/components.d.ts +194 -4
- package/package.json +5 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +0 -129
- package/dist/esm/ez-filter-input.entry.js +0 -125
- package/dist/ezui/p-20c024f7.entry.js +0 -1
- package/dist/ezui/p-79044c3e.entry.js +0 -1
- package/dist/ezui/p-7e677b7b.entry.js +0 -1
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
|
2
2
|
import { moveItems, transferAll, transferItems } from './doubleListHelper';
|
|
3
|
-
import {
|
|
3
|
+
import { ObjectUtils } from '@sankhyalabs/core';
|
|
4
4
|
import { isContinuousSequence } from '../ez-list/ezListHelper';
|
|
5
|
-
import { EzScrollDirection } from '../ez-scroller/EzScrollDirection';
|
|
6
5
|
export class EzDoubleList {
|
|
7
6
|
constructor() {
|
|
8
7
|
this.LEFT_LIST_ID = 'LEFT-LIST-ID';
|
|
9
8
|
this.RIGHT_LIST_ID = 'RIGHT-LIST-ID';
|
|
10
|
-
this.LEFT_FILTER_ID = 'LEFT-FILTER-ID';
|
|
11
|
-
this.RIGHT_FILTER_ID = 'RIGHT-FILTER-ID';
|
|
12
9
|
this.leftList = [];
|
|
13
10
|
this.leftTitle = undefined;
|
|
14
11
|
this.rightList = [];
|
|
@@ -16,7 +13,10 @@ export class EzDoubleList {
|
|
|
16
13
|
this.entityLabelPlural = 'itens';
|
|
17
14
|
this.leftListLabel = 'disponíveis';
|
|
18
15
|
this.rightListLabel = 'selecionados';
|
|
16
|
+
this.useOnlyRightList = false;
|
|
19
17
|
this.rightTitle = undefined;
|
|
18
|
+
this.emptyMessage = undefined;
|
|
19
|
+
this.slotsListBuilder = undefined;
|
|
20
20
|
this.leftFilteredList = [];
|
|
21
21
|
this.rightFilteredList = [];
|
|
22
22
|
this.selectedLeftList = [];
|
|
@@ -38,23 +38,31 @@ export class EzDoubleList {
|
|
|
38
38
|
return;
|
|
39
39
|
this.ezRightListChanged.emit(newValue);
|
|
40
40
|
}
|
|
41
|
-
handleFilterChangeLeft(value) {
|
|
42
|
-
this.leftFilteredList = ArrayUtils.applyStringFilter(value, this.leftList, true, 'label');
|
|
43
|
-
this.isFilteringLeft = this.leftFilteredList.length !== this.leftList.length;
|
|
44
|
-
}
|
|
45
|
-
handleFilterChangeRight(value) {
|
|
46
|
-
this.rightFilteredList = ArrayUtils.applyStringFilter(value, this.rightList, true, 'label');
|
|
47
|
-
this.isFilteringRight = this.rightFilteredList.length !== this.rightList.length;
|
|
48
|
-
}
|
|
49
41
|
async handleChangeLeft({ detail }) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
if (!detail.to.getAttribute('id') || detail.to.getAttribute('id') !== this.RIGHT_LIST_ID) {
|
|
43
|
+
this.leftList = [...this.reorderArray(detail.dataSource, detail.selectItens, detail.newIndex)];
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
detail.selectItens = detail.selectItens.filter(id => this.rightList.every(item => item.id !== id));
|
|
47
|
+
this.leftList = [...detail.dataSource];
|
|
48
|
+
this.selectedLeftList = [...detail.selectItens];
|
|
49
|
+
this.transferToRight(detail === null || detail === void 0 ? void 0 : detail.newIndex);
|
|
53
50
|
}
|
|
54
51
|
async handleChangeRight({ detail }) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
if (!detail.to.getAttribute('id') || detail.to.getAttribute('id') !== this.LEFT_LIST_ID) {
|
|
53
|
+
this.rightList = [...this.reorderArray(detail.dataSource, detail.selectItens, detail.newIndex)];
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
detail.selectItens = detail.selectItens.filter(id => this.leftList.every(item => item.id !== id));
|
|
57
|
+
this.rightList = [...detail.dataSource];
|
|
58
|
+
this.selectedRightList = [...detail.selectItens];
|
|
59
|
+
this.transferToLeft(detail === null || detail === void 0 ? void 0 : detail.newIndex);
|
|
60
|
+
}
|
|
61
|
+
reorderArray(allItems, itemIdsToMove, insertIndex) {
|
|
62
|
+
const filteredItems = allItems.filter(i => !itemIdsToMove.includes(i.id));
|
|
63
|
+
const itemsToMove = allItems.filter(i => itemIdsToMove.includes(i.id));
|
|
64
|
+
filteredItems.splice(insertIndex, 0, ...itemsToMove);
|
|
65
|
+
return filteredItems;
|
|
58
66
|
}
|
|
59
67
|
enableTransferAllToRight() {
|
|
60
68
|
return this.leftList.length > 0;
|
|
@@ -88,33 +96,43 @@ export class EzDoubleList {
|
|
|
88
96
|
getRightSelectedItemsIndex() {
|
|
89
97
|
return this.selectedRightList.map(id => this.rightList.findIndex(original => original.id === id));
|
|
90
98
|
}
|
|
91
|
-
transferToRight() {
|
|
92
|
-
const { from, to, selectedFrom, selectedTo } = transferItems(this.buildTransferToRightConfig());
|
|
93
|
-
|
|
99
|
+
transferToRight(insertIndex) {
|
|
100
|
+
const { from, to, selectedFrom, selectedTo } = transferItems(Object.assign(Object.assign({}, this.buildTransferToRightConfig()), { insertIndex: insertIndex !== null && insertIndex !== void 0 ? insertIndex : 0 }));
|
|
101
|
+
//Eh preciso limpar a lista antes de atualiza-la por conta de um bug no ciclo de vida do sortable.js
|
|
102
|
+
this.leftList = [];
|
|
103
|
+
requestAnimationFrame(() => this.leftList = [...from]);
|
|
94
104
|
this.rightList = [...to];
|
|
95
105
|
this.selectedLeftList = [...selectedFrom];
|
|
96
106
|
this.selectedRightList = [...selectedTo];
|
|
97
107
|
}
|
|
98
|
-
transferToLeft() {
|
|
99
|
-
const { from, to, selectedFrom, selectedTo } = transferItems(this.buildTransferToLeftConfig());
|
|
100
|
-
|
|
108
|
+
transferToLeft(insertIndex) {
|
|
109
|
+
const { from, to, selectedFrom, selectedTo } = transferItems(Object.assign(Object.assign({}, this.buildTransferToLeftConfig()), { insertIndex: insertIndex !== null && insertIndex !== void 0 ? insertIndex : 0 }));
|
|
110
|
+
//Eh preciso limpar a lista antes de atualiza-la por conta de um bug no ciclo de vida do sortable.js
|
|
111
|
+
this.rightList = [];
|
|
112
|
+
requestAnimationFrame(() => this.rightList = [...from]);
|
|
101
113
|
this.leftList = [...to];
|
|
102
114
|
this.selectedRightList = [...selectedFrom];
|
|
103
115
|
this.selectedLeftList = [...selectedTo];
|
|
104
116
|
}
|
|
105
|
-
handleTransferAllToRight() {
|
|
117
|
+
async handleTransferAllToRight() {
|
|
106
118
|
const { from, to, selectedFrom, selectedTo } = transferAll(this.buildTransferToRightConfig());
|
|
107
119
|
this.leftList = [...from];
|
|
108
120
|
this.rightList = [...to];
|
|
109
121
|
this.selectedLeftList = [...selectedFrom];
|
|
110
122
|
this.selectedRightList = [...selectedTo];
|
|
123
|
+
requestAnimationFrame(async () => {
|
|
124
|
+
await this.clearSelectionAll();
|
|
125
|
+
});
|
|
111
126
|
}
|
|
112
|
-
handleTransferAllToLeft() {
|
|
127
|
+
async handleTransferAllToLeft() {
|
|
113
128
|
const { from, to, selectedFrom, selectedTo } = transferAll(this.buildTransferToLeftConfig());
|
|
114
129
|
this.rightList = [...from];
|
|
115
130
|
this.leftList = [...to];
|
|
116
131
|
this.selectedRightList = [...selectedFrom];
|
|
117
132
|
this.selectedLeftList = [...selectedTo];
|
|
133
|
+
requestAnimationFrame(async () => {
|
|
134
|
+
await this.clearSelectionAll();
|
|
135
|
+
});
|
|
118
136
|
}
|
|
119
137
|
buildTransferToRightConfig() {
|
|
120
138
|
return {
|
|
@@ -157,33 +175,77 @@ export class EzDoubleList {
|
|
|
157
175
|
const itemsToMove = this.rightList.filter(item => this.selectedRightList.includes(item.id));
|
|
158
176
|
return { itemsToKeep, itemsToMove };
|
|
159
177
|
}
|
|
160
|
-
handleTransferToRight() {
|
|
178
|
+
async handleTransferToRight() {
|
|
161
179
|
this.transferToRight();
|
|
162
180
|
this.leftFilteredList = [];
|
|
163
|
-
this.
|
|
181
|
+
await this.leftEzListInstance.clearSelection();
|
|
164
182
|
}
|
|
165
|
-
handleTransferToLeft() {
|
|
183
|
+
async handleTransferToLeft() {
|
|
166
184
|
this.transferToLeft();
|
|
167
185
|
this.rightFilteredList = [];
|
|
168
|
-
this.
|
|
186
|
+
await this.rightEzListInstance.clearSelection();
|
|
169
187
|
}
|
|
170
|
-
|
|
171
|
-
|
|
188
|
+
async clearSelectionAll() {
|
|
189
|
+
await this.rightEzListInstance.clearSelection();
|
|
190
|
+
await this.leftEzListInstance.clearSelection();
|
|
172
191
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
return (h("ez-scroller", { direction: EzScrollDirection.VERTICAL, activeShadow: true }, h("ez-list", { ref: (ref) => this.leftEzListInstance = ref, id: this.LEFT_LIST_ID, hoverFeedback: true, dataSource: this.isFilteringLeft ? this.leftFilteredList : this.leftList, ezDraggable: !this.isFilteringLeft, enableMultipleSelection: true, onEzChange: this.handleChangeLeft.bind(this), ezSelectable: true, onEzSelectMultipleItems: this.handleSelectLeftItem.bind(this), onEzDoubleClick: this.handleTransferToRight.bind(this) })));
|
|
192
|
+
handleChooseLeft() {
|
|
193
|
+
requestAnimationFrame(async () => {
|
|
194
|
+
await this.rightEzListInstance.clearSelection();
|
|
195
|
+
});
|
|
178
196
|
}
|
|
179
|
-
|
|
180
|
-
if (
|
|
181
|
-
return
|
|
182
|
-
|
|
183
|
-
|
|
197
|
+
handleChooseRight() {
|
|
198
|
+
if (this.useOnlyRightList)
|
|
199
|
+
return;
|
|
200
|
+
requestAnimationFrame(async () => {
|
|
201
|
+
await this.leftEzListInstance.clearSelection();
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
renderList(props) {
|
|
205
|
+
const { idSortableList, list, isFiltering, filteredList, emptyMessage, slotConfig, callbacks, title } = props;
|
|
206
|
+
return (h("ez-sortable-list", { ref: callbacks === null || callbacks === void 0 ? void 0 : callbacks.setRef, title: title, idSortableList: idSortableList, emptyMessage: emptyMessage, class: "ez-size-height--full", dataSource: isFiltering ? filteredList : list, hoverFeedback: true, enableMultipleSelection: true, removeItensMoved: true, entityLabel: this.entityLabel, entityLabelPlural: this.entityLabelPlural, itemRightSlotBuilder: slotConfig === null || slotConfig === void 0 ? void 0 : slotConfig.itemRightSlotBuilder, itemLeftSlotBuilder: slotConfig === null || slotConfig === void 0 ? void 0 : slotConfig.itemLeftSlotBuilder, onItemsReordered: callbacks === null || callbacks === void 0 ? void 0 : callbacks.onChange.bind(this), onEzSelectItens: callbacks === null || callbacks === void 0 ? void 0 : callbacks.onSelect.bind(this), onEzDoubleClick: callbacks === null || callbacks === void 0 ? void 0 : callbacks.onDoubleClick.bind(this), onEzChoose: callbacks === null || callbacks === void 0 ? void 0 : callbacks.onChoose.bind(this) }));
|
|
184
207
|
}
|
|
185
208
|
render() {
|
|
186
|
-
|
|
209
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
210
|
+
return (h(Host, null, !this.useOnlyRightList &&
|
|
211
|
+
h("div", { class: "list__container" }, this.leftList && this.renderList({
|
|
212
|
+
idSortableList: this.LEFT_LIST_ID,
|
|
213
|
+
list: this.leftList,
|
|
214
|
+
title: this.leftTitle,
|
|
215
|
+
isFiltering: this.isFilteringLeft,
|
|
216
|
+
filteredList: this.leftFilteredList,
|
|
217
|
+
emptyMessage: !!((_a = this.emptyMessage) === null || _a === void 0 ? void 0 : _a.LEFT_LIST) ? this.emptyMessage.LEFT_LIST : `Nenhum ${this.entityLabel} disponível`,
|
|
218
|
+
slotConfig: {
|
|
219
|
+
itemRightSlotBuilder: (_c = (_b = this.slotsListBuilder) === null || _b === void 0 ? void 0 : _b.LEFT_LIST) === null || _c === void 0 ? void 0 : _c.itemRightSlotBuilder,
|
|
220
|
+
itemLeftSlotBuilder: (_e = (_d = this.slotsListBuilder) === null || _d === void 0 ? void 0 : _d.LEFT_LIST) === null || _e === void 0 ? void 0 : _e.itemLeftSlotBuilder,
|
|
221
|
+
},
|
|
222
|
+
callbacks: {
|
|
223
|
+
setRef: (ref) => this.leftEzListInstance = ref,
|
|
224
|
+
onChange: (evt) => this.handleChangeLeft(evt),
|
|
225
|
+
onSelect: this.handleSelectLeftItem.bind(this),
|
|
226
|
+
onDoubleClick: this.handleTransferToRight.bind(this),
|
|
227
|
+
onChoose: this.handleChooseLeft.bind(this),
|
|
228
|
+
},
|
|
229
|
+
})), !this.useOnlyRightList &&
|
|
230
|
+
h("div", { class: 'actions__column' }, h("ez-button", { mode: "icon", iconName: "dual-chevron-right", enabled: this.enableTransferAllToRight(), title: `Mover todos para ${this.rightListLabel}`, size: "small", onClick: this.handleTransferAllToRight.bind(this) }), h("ez-button", { mode: "icon", iconName: "chevron-right", enabled: this.enableTransferToRight(), title: `Mover para ${this.rightListLabel}`, size: "small", onClick: this.handleTransferToRight.bind(this) }), h("ez-button", { mode: "icon", iconName: "chevron-left", enabled: this.enableTransferToLeft(), title: `Mover para ${this.leftListLabel}`, size: "small", onClick: this.handleTransferToLeft.bind(this) }), h("ez-button", { mode: "icon", iconName: "dual-chevron-left", enabled: this.enableTransferAllToLeft(), title: `Mover todos para ${this.leftListLabel}`, size: "small", onClick: this.handleTransferAllToLeft.bind(this) })), h("div", { class: "list__container" }, this.rightList && this.renderList({
|
|
231
|
+
idSortableList: this.RIGHT_LIST_ID,
|
|
232
|
+
list: this.rightList,
|
|
233
|
+
title: this.rightTitle,
|
|
234
|
+
isFiltering: this.isFilteringRight,
|
|
235
|
+
filteredList: this.rightFilteredList,
|
|
236
|
+
emptyMessage: !!((_f = this.emptyMessage) === null || _f === void 0 ? void 0 : _f.RIGHT_LIST) ? this.emptyMessage.RIGHT_LIST : `Nenhum ${this.entityLabel} selecionado`,
|
|
237
|
+
slotConfig: {
|
|
238
|
+
itemRightSlotBuilder: (_h = (_g = this.slotsListBuilder) === null || _g === void 0 ? void 0 : _g.RIGHT_LIST) === null || _h === void 0 ? void 0 : _h.itemRightSlotBuilder,
|
|
239
|
+
itemLeftSlotBuilder: (_k = (_j = this.slotsListBuilder) === null || _j === void 0 ? void 0 : _j.RIGHT_LIST) === null || _k === void 0 ? void 0 : _k.itemLeftSlotBuilder,
|
|
240
|
+
},
|
|
241
|
+
callbacks: {
|
|
242
|
+
setRef: (ref) => this.rightEzListInstance = ref,
|
|
243
|
+
onChange: (evt) => this.handleChangeRight(evt),
|
|
244
|
+
onSelect: this.handleSelectRightItem.bind(this),
|
|
245
|
+
onDoubleClick: this.handleTransferToLeft.bind(this),
|
|
246
|
+
onChoose: this.handleChooseRight.bind(this),
|
|
247
|
+
},
|
|
248
|
+
})), h("div", { class: 'actions__column' }, h("ez-button", { mode: "icon", iconName: "dual-chevron-up", enabled: this.enableMoveUp(true), title: "Mover para primeira posi\u00E7\u00E3o", size: "small", onClick: this.handleMoveToTop.bind(this) }), h("ez-button", { mode: "icon", iconName: "chevron-up", enabled: this.enableMoveUp(), title: "Mover para cima", size: "small", onClick: this.handleMoveUp.bind(this) }), h("ez-button", { mode: "icon", iconName: "chevron-down", enabled: this.enableMoveDown(), title: "Mover para baixo", size: "small", onClick: this.handleMoveDown.bind(this) }), h("ez-button", { mode: "icon", iconName: "dual-chevron-down", enabled: this.enableMoveDown(true), title: "Mover para \u00FAltima posi\u00E7\u00E3o", size: "small", onClick: this.handleMoveToBottom.bind(this) }))));
|
|
187
249
|
}
|
|
188
250
|
static get is() { return "ez-double-list"; }
|
|
189
251
|
static get encapsulation() { return "scoped"; }
|
|
@@ -208,7 +270,7 @@ export class EzDoubleList {
|
|
|
208
270
|
"references": {
|
|
209
271
|
"ListItem": {
|
|
210
272
|
"location": "import",
|
|
211
|
-
"path": "../ez-list/ez-list"
|
|
273
|
+
"path": "../ez-sortable-list/ez-sortable-list"
|
|
212
274
|
}
|
|
213
275
|
}
|
|
214
276
|
},
|
|
@@ -246,7 +308,7 @@ export class EzDoubleList {
|
|
|
246
308
|
"references": {
|
|
247
309
|
"ListItem": {
|
|
248
310
|
"location": "import",
|
|
249
|
-
"path": "../ez-list/ez-list"
|
|
311
|
+
"path": "../ez-sortable-list/ez-sortable-list"
|
|
250
312
|
}
|
|
251
313
|
}
|
|
252
314
|
},
|
|
@@ -288,7 +350,7 @@ export class EzDoubleList {
|
|
|
288
350
|
"optional": false,
|
|
289
351
|
"docs": {
|
|
290
352
|
"tags": [],
|
|
291
|
-
"text": "Varia\u00E7\u00E3o
|
|
353
|
+
"text": "Varia\u00E7\u00E3o plural do nome da entidade listada.\nExemplo: \"Campos\", \"Itens\", \"Empresas\"."
|
|
292
354
|
},
|
|
293
355
|
"attribute": "entity-label-plural",
|
|
294
356
|
"reflect": false,
|
|
@@ -330,6 +392,24 @@ export class EzDoubleList {
|
|
|
330
392
|
"reflect": false,
|
|
331
393
|
"defaultValue": "'selecionados'"
|
|
332
394
|
},
|
|
395
|
+
"useOnlyRightList": {
|
|
396
|
+
"type": "boolean",
|
|
397
|
+
"mutable": false,
|
|
398
|
+
"complexType": {
|
|
399
|
+
"original": "boolean",
|
|
400
|
+
"resolved": "boolean",
|
|
401
|
+
"references": {}
|
|
402
|
+
},
|
|
403
|
+
"required": false,
|
|
404
|
+
"optional": false,
|
|
405
|
+
"docs": {
|
|
406
|
+
"tags": [],
|
|
407
|
+
"text": "Define se ir\u00E1 exibir apenas a lista da direita."
|
|
408
|
+
},
|
|
409
|
+
"attribute": "use-only-right-list",
|
|
410
|
+
"reflect": false,
|
|
411
|
+
"defaultValue": "false"
|
|
412
|
+
},
|
|
333
413
|
"rightTitle": {
|
|
334
414
|
"type": "string",
|
|
335
415
|
"mutable": false,
|
|
@@ -346,6 +426,44 @@ export class EzDoubleList {
|
|
|
346
426
|
},
|
|
347
427
|
"attribute": "right-title",
|
|
348
428
|
"reflect": false
|
|
429
|
+
},
|
|
430
|
+
"emptyMessage": {
|
|
431
|
+
"type": "unknown",
|
|
432
|
+
"mutable": false,
|
|
433
|
+
"complexType": {
|
|
434
|
+
"original": "EmptyMessage",
|
|
435
|
+
"resolved": "EmptyMessage",
|
|
436
|
+
"references": {
|
|
437
|
+
"EmptyMessage": {
|
|
438
|
+
"location": "local"
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"required": false,
|
|
443
|
+
"optional": false,
|
|
444
|
+
"docs": {
|
|
445
|
+
"tags": [],
|
|
446
|
+
"text": "Objeto que define as mensagens a serem exibidas quando a lista est\u00E1 vazia\nExemplo:\n{\nLEFT_LIST?: \"Lista lado esquerdo vazia.\",\nRIGHT_LIST?: \"Lista lado direito vazia.\";\n}"
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
"slotsListBuilder": {
|
|
450
|
+
"type": "unknown",
|
|
451
|
+
"mutable": true,
|
|
452
|
+
"complexType": {
|
|
453
|
+
"original": "DoubleListSlots",
|
|
454
|
+
"resolved": "DoubleListSlots",
|
|
455
|
+
"references": {
|
|
456
|
+
"DoubleListSlots": {
|
|
457
|
+
"location": "local"
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"required": false,
|
|
462
|
+
"optional": false,
|
|
463
|
+
"docs": {
|
|
464
|
+
"tags": [],
|
|
465
|
+
"text": "Objeto que define os m\u00E9todos de constru\u00E7\u00E3o dos elementos visuais para os itens de cada lista.\n\nEste objeto permite configurar dinamicamente os elementos HTML que ser\u00E3o exibidos ao lado\nesquerdo e direito dos itens em ambas as listas (`LEFT_LIST` e `RIGHT_LIST`)."
|
|
466
|
+
}
|
|
349
467
|
}
|
|
350
468
|
};
|
|
351
469
|
}
|
|
@@ -368,7 +486,7 @@ export class EzDoubleList {
|
|
|
368
486
|
"composed": true,
|
|
369
487
|
"docs": {
|
|
370
488
|
"tags": [],
|
|
371
|
-
"text": ""
|
|
489
|
+
"text": "Emitido ao realizar uma altera\u00E7\u00E3o na lista esquerda do componente."
|
|
372
490
|
},
|
|
373
491
|
"complexType": {
|
|
374
492
|
"original": "Array<ListItem>",
|
|
@@ -379,7 +497,7 @@ export class EzDoubleList {
|
|
|
379
497
|
},
|
|
380
498
|
"ListItem": {
|
|
381
499
|
"location": "import",
|
|
382
|
-
"path": "../ez-list/ez-list"
|
|
500
|
+
"path": "../ez-sortable-list/ez-sortable-list"
|
|
383
501
|
}
|
|
384
502
|
}
|
|
385
503
|
}
|
|
@@ -391,7 +509,7 @@ export class EzDoubleList {
|
|
|
391
509
|
"composed": true,
|
|
392
510
|
"docs": {
|
|
393
511
|
"tags": [],
|
|
394
|
-
"text": ""
|
|
512
|
+
"text": "Emitido ao realizar uma altera\u00E7\u00E3o na lista direita do componente."
|
|
395
513
|
},
|
|
396
514
|
"complexType": {
|
|
397
515
|
"original": "Array<ListItem>",
|
|
@@ -402,7 +520,7 @@ export class EzDoubleList {
|
|
|
402
520
|
},
|
|
403
521
|
"ListItem": {
|
|
404
522
|
"location": "import",
|
|
405
|
-
"path": "../ez-list/ez-list"
|
|
523
|
+
"path": "../ez-sortable-list/ez-sortable-list"
|
|
406
524
|
}
|
|
407
525
|
}
|
|
408
526
|
}
|
|
@@ -48,6 +48,7 @@ export class EzGrid {
|
|
|
48
48
|
this.compact = false;
|
|
49
49
|
this.useSearchColumn = true;
|
|
50
50
|
this.suppressHorizontalScroll = false;
|
|
51
|
+
this.mode = "complete";
|
|
51
52
|
}
|
|
52
53
|
/**
|
|
53
54
|
* Aplica a definição de colunas.
|
|
@@ -204,6 +205,14 @@ export class EzGrid {
|
|
|
204
205
|
this._showPaginationDescription();
|
|
205
206
|
}
|
|
206
207
|
}
|
|
208
|
+
async observeModeChange(newMode = this.mode) {
|
|
209
|
+
if (newMode === "simple") {
|
|
210
|
+
this.canEdit = false;
|
|
211
|
+
this.multipleSelection = false;
|
|
212
|
+
this.suppressCheckboxColumn = true;
|
|
213
|
+
this.compact = true;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
207
216
|
onSelectionChange(evt) {
|
|
208
217
|
this._currentPageSelected = evt.detail.selectionHeaderStatus === true;
|
|
209
218
|
if (this.dataUnit) {
|
|
@@ -557,6 +566,7 @@ export class EzGrid {
|
|
|
557
566
|
}
|
|
558
567
|
connectedCallback() {
|
|
559
568
|
var _a;
|
|
569
|
+
this.observeModeChange();
|
|
560
570
|
(_a = this._gridController) === null || _a === void 0 ? void 0 : _a.registryListeners();
|
|
561
571
|
}
|
|
562
572
|
componentWillRender() {
|
|
@@ -589,6 +599,9 @@ export class EzGrid {
|
|
|
589
599
|
return this.columnfilterDataSource;
|
|
590
600
|
}
|
|
591
601
|
hideHeader() {
|
|
602
|
+
if (this.mode === "simple") {
|
|
603
|
+
return true;
|
|
604
|
+
}
|
|
592
605
|
return !this._hasLeftButtons && !this._paginationInfo;
|
|
593
606
|
}
|
|
594
607
|
resolveLeftHeaderClass() {
|
|
@@ -696,7 +709,7 @@ export class EzGrid {
|
|
|
696
709
|
return {
|
|
697
710
|
"enableLockManagerLoadingComp": {
|
|
698
711
|
"type": "boolean",
|
|
699
|
-
"mutable":
|
|
712
|
+
"mutable": true,
|
|
700
713
|
"complexType": {
|
|
701
714
|
"original": "boolean",
|
|
702
715
|
"resolved": "boolean",
|
|
@@ -908,7 +921,7 @@ export class EzGrid {
|
|
|
908
921
|
},
|
|
909
922
|
"canEdit": {
|
|
910
923
|
"type": "boolean",
|
|
911
|
-
"mutable":
|
|
924
|
+
"mutable": true,
|
|
912
925
|
"complexType": {
|
|
913
926
|
"original": "boolean",
|
|
914
927
|
"resolved": "boolean",
|
|
@@ -998,7 +1011,7 @@ export class EzGrid {
|
|
|
998
1011
|
},
|
|
999
1012
|
"suppressCheckboxColumn": {
|
|
1000
1013
|
"type": "boolean",
|
|
1001
|
-
"mutable":
|
|
1014
|
+
"mutable": true,
|
|
1002
1015
|
"complexType": {
|
|
1003
1016
|
"original": "boolean",
|
|
1004
1017
|
"resolved": "boolean",
|
|
@@ -1052,7 +1065,7 @@ export class EzGrid {
|
|
|
1052
1065
|
},
|
|
1053
1066
|
"compact": {
|
|
1054
1067
|
"type": "boolean",
|
|
1055
|
-
"mutable":
|
|
1068
|
+
"mutable": true,
|
|
1056
1069
|
"complexType": {
|
|
1057
1070
|
"original": "boolean",
|
|
1058
1071
|
"resolved": "boolean",
|
|
@@ -1103,6 +1116,29 @@ export class EzGrid {
|
|
|
1103
1116
|
"attribute": "suppress-horizontal-scroll",
|
|
1104
1117
|
"reflect": false,
|
|
1105
1118
|
"defaultValue": "false"
|
|
1119
|
+
},
|
|
1120
|
+
"mode": {
|
|
1121
|
+
"type": "string",
|
|
1122
|
+
"mutable": false,
|
|
1123
|
+
"complexType": {
|
|
1124
|
+
"original": "IGridMode",
|
|
1125
|
+
"resolved": "\"complete\" | \"simple\"",
|
|
1126
|
+
"references": {
|
|
1127
|
+
"IGridMode": {
|
|
1128
|
+
"location": "import",
|
|
1129
|
+
"path": "./interfaces"
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
"required": false,
|
|
1134
|
+
"optional": false,
|
|
1135
|
+
"docs": {
|
|
1136
|
+
"tags": [],
|
|
1137
|
+
"text": "Define o modo de uso da grade"
|
|
1138
|
+
},
|
|
1139
|
+
"attribute": "mode",
|
|
1140
|
+
"reflect": true,
|
|
1141
|
+
"defaultValue": "\"complete\""
|
|
1106
1142
|
}
|
|
1107
1143
|
};
|
|
1108
1144
|
}
|
|
@@ -1662,6 +1698,9 @@ export class EzGrid {
|
|
|
1662
1698
|
}, {
|
|
1663
1699
|
"propName": "paginationCounterMode",
|
|
1664
1700
|
"methodName": "observePaginationCounterMode"
|
|
1701
|
+
}, {
|
|
1702
|
+
"propName": "mode",
|
|
1703
|
+
"methodName": "observeModeChange"
|
|
1665
1704
|
}];
|
|
1666
1705
|
}
|
|
1667
1706
|
static get listeners() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|