@sankhyalabs/ezui 1.1.92 → 1.1.95
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/{CSSVarsUtils-66e86394.js → CSSVarsUtils-8fbdf2e0.js} +1 -0
- package/dist/cjs/StringUtils-0ba09df4.js +57 -0
- package/dist/cjs/ez-button_3.cjs.entry.js +578 -0
- package/dist/cjs/ez-calendar_14.cjs.entry.js +2625 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +3 -3
- package/dist/cjs/{ez-button_11.cjs.entry.js → ez-grid.cjs.entry.js} +32 -1439
- package/dist/cjs/ez-icon.cjs.entry.js +42 -0
- package/dist/cjs/ez-modal_2.cjs.entry.js +317 -0
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/{index-a92e6d04.js → index-6164b259.js} +18 -18
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-check/ez-check.css +3 -3
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +52 -3
- package/dist/collection/components/ez-dialog/ez-dialog.css +14 -2
- package/dist/collection/components/ez-dialog/ez-dialog.js +3 -5
- package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +4 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +4 -4
- package/dist/collection/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.js +2 -2
- package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +2 -2
- package/dist/collection/components/ez-form/fieldbuilder/tpl/FileInput.tpl.js +2 -2
- package/dist/collection/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.js +6 -6
- package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +2 -2
- package/dist/collection/components/ez-form/fieldbuilder/tpl/TextArea.tpl.js +2 -2
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +10 -7
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +19 -2
- package/dist/collection/components/ez-grid/ez-grid.css +8 -0
- package/dist/collection/components/ez-grid/ez-grid.js +3 -3
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +28 -4
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +6 -5
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +10 -7
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +12 -17
- package/dist/collection/components/ez-list/ez-list.css +23 -2
- package/dist/collection/components/ez-list/ez-list.js +138 -68
- package/dist/collection/components/ez-text-input/ez-text-input.css +2 -2
- package/dist/collection/components/ez-text-input/ez-text-input.js +24 -1
- package/dist/collection/components/test-du/test-du.js +1 -1
- package/dist/collection/utils/CSSVarsUtils.js +1 -0
- package/dist/collection/utils/index.js +2 -0
- package/dist/custom-elements/index.js +217 -120
- package/dist/esm/{CSSVarsUtils-aeee9825.js → CSSVarsUtils-667e0016.js} +1 -0
- package/dist/esm/StringUtils-cbf10229.js +55 -0
- package/dist/esm/ez-button_3.entry.js +572 -0
- package/dist/esm/ez-calendar_14.entry.js +2608 -0
- package/dist/esm/ez-dialog.entry.js +3 -3
- package/dist/esm/{ez-button_11.entry.js → ez-grid.entry.js} +24 -1421
- package/dist/esm/ez-icon.entry.js +38 -0
- package/dist/esm/ez-modal_2.entry.js +312 -0
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/{index-4fb1605f.js → index-74a9c220.js} +17 -17
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-0a8018c2.entry.js +1 -0
- package/dist/ezui/{p-552a0b2e.entry.js → p-2617733e.entry.js} +1 -1
- package/dist/ezui/p-2f84ba72.js +1 -0
- package/dist/ezui/{p-d4386e30.entry.js → p-6714a1b2.entry.js} +46 -46
- package/dist/ezui/p-90f6d8a0.entry.js +1 -0
- package/dist/ezui/p-a943d501.entry.js +1 -0
- package/dist/ezui/p-b139372f.entry.js +1 -0
- package/dist/ezui/{p-f0137439.js → p-c6762896.js} +1 -1
- package/dist/ezui/p-d54c157f.js +1 -0
- package/dist/ezui/p-e06e47f1.entry.js +1 -0
- package/dist/ezui/{p-7e0281cd.entry.js → p-ef393d36.entry.js} +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +8 -0
- package/dist/types/components/ez-form/ez-form.d.ts +6 -1
- package/dist/types/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.d.ts +2 -1
- package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form/fieldbuilder/tpl/FileInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +4 -2
- package/dist/types/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form/fieldbuilder/tpl/TextArea.tpl.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -1
- package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +6 -4
- package/dist/types/components/ez-list/ez-list.d.ts +11 -6
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
- package/dist/types/components.d.ts +28 -4
- package/dist/types/utils/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cjs/ApplicationUtils-d1c1db56.js +0 -35
- package/dist/cjs/ez-calendar.cjs.entry.js +0 -224
- package/dist/cjs/ez-collapsible-box_7.cjs.entry.js +0 -853
- package/dist/cjs/ez-combo-box.cjs.entry.js +0 -254
- package/dist/cjs/ez-form.cjs.entry.js +0 -753
- package/dist/esm/ApplicationUtils-01280a9d.js +0 -33
- package/dist/esm/ez-calendar.entry.js +0 -220
- package/dist/esm/ez-collapsible-box_7.entry.js +0 -843
- package/dist/esm/ez-combo-box.entry.js +0 -250
- package/dist/esm/ez-form.entry.js +0 -749
- package/dist/ezui/p-0094463f.entry.js +0 -1
- package/dist/ezui/p-020f1285.entry.js +0 -1
- package/dist/ezui/p-038fd0cb.entry.js +0 -1
- package/dist/ezui/p-60469339.entry.js +0 -1
- package/dist/ezui/p-7107d7ef.js +0 -1
- package/dist/ezui/p-8b099482.js +0 -1
- package/dist/ezui/p-d22db59d.entry.js +0 -1
|
@@ -55,7 +55,7 @@ export class EzList {
|
|
|
55
55
|
newList.forEach(groupItem => {
|
|
56
56
|
groupItem.items.forEach(item => {
|
|
57
57
|
if (item.label == selectedItem.label) {
|
|
58
|
-
item.selected =
|
|
58
|
+
item.selected = true;
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
61
|
item.selected = false;
|
|
@@ -68,7 +68,7 @@ export class EzList {
|
|
|
68
68
|
let newList = [...this._listItems];
|
|
69
69
|
newList.forEach(item => {
|
|
70
70
|
if (item.label === selectedItem.label) {
|
|
71
|
-
item.selected =
|
|
71
|
+
item.selected = true;
|
|
72
72
|
}
|
|
73
73
|
else {
|
|
74
74
|
item.selected = false;
|
|
@@ -143,7 +143,7 @@ export class EzList {
|
|
|
143
143
|
this.createList();
|
|
144
144
|
}
|
|
145
145
|
onDrop(ev, dragEndItem) {
|
|
146
|
-
this.removeOverClass(
|
|
146
|
+
this.removeOverClass();
|
|
147
147
|
this.setSelection(undefined);
|
|
148
148
|
if (this._dragStartItem) {
|
|
149
149
|
if (this.useGroups) {
|
|
@@ -179,6 +179,39 @@ export class EzList {
|
|
|
179
179
|
}
|
|
180
180
|
ev.stopPropagation();
|
|
181
181
|
}
|
|
182
|
+
onDropLastIndex(ev, groupDropped) {
|
|
183
|
+
this.removeOverClass();
|
|
184
|
+
this.setSelection(undefined);
|
|
185
|
+
if (this._dragStartItem) {
|
|
186
|
+
if (this.useGroups) {
|
|
187
|
+
let newList = [...this._listGroupItems];
|
|
188
|
+
let groupEnd = this._listGroupItems.find(group => groupDropped.group == group.group);
|
|
189
|
+
//Remove item arrastado
|
|
190
|
+
newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
|
|
191
|
+
//Adiciona item arrastado
|
|
192
|
+
newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
|
|
193
|
+
if (groupEnd.sort) {
|
|
194
|
+
newList.find(group => group.group == groupDropped.group).items.sort(function (a, b) {
|
|
195
|
+
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
196
|
+
});
|
|
197
|
+
if (groupEnd.sort === "DSC") {
|
|
198
|
+
newList.find(group => group.group == groupDropped.group).items.reverse();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
this._listGroupItems = newList;
|
|
202
|
+
this.ezChange.emit(this._listGroupItems);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
let newList = [...this._listItems];
|
|
206
|
+
newList.splice(this._dragStartItem.index, 1);
|
|
207
|
+
newList.push(this._dragStartItem.item);
|
|
208
|
+
this._listItems = newList;
|
|
209
|
+
this._listItemsHistory = newList;
|
|
210
|
+
this.ezChange.emit(this._listItems);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
ev.stopPropagation();
|
|
214
|
+
}
|
|
182
215
|
onDropGroup(groupSelected) {
|
|
183
216
|
var _a;
|
|
184
217
|
let newList = [...this._listGroupItems];
|
|
@@ -212,6 +245,9 @@ export class EzList {
|
|
|
212
245
|
}
|
|
213
246
|
onDragEnd() {
|
|
214
247
|
this._dragStartItem = undefined;
|
|
248
|
+
if (this.useGroups) {
|
|
249
|
+
this.hideOverlays();
|
|
250
|
+
}
|
|
215
251
|
if (this._draggingElement) {
|
|
216
252
|
try {
|
|
217
253
|
this._element.shadowRoot.removeChild(this._draggingElement);
|
|
@@ -220,65 +256,74 @@ export class EzList {
|
|
|
220
256
|
this._draggingElement = undefined;
|
|
221
257
|
}
|
|
222
258
|
}
|
|
223
|
-
addOverClass(
|
|
224
|
-
if (
|
|
225
|
-
|
|
259
|
+
addOverClass(element) {
|
|
260
|
+
if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains("draggable")) {
|
|
261
|
+
element.classList.add('over');
|
|
262
|
+
}
|
|
263
|
+
else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains("draggable-list")) {
|
|
264
|
+
this.addOverClass(element.parentElement);
|
|
226
265
|
}
|
|
227
266
|
}
|
|
228
267
|
addOverGroupClass(ev, group) {
|
|
229
268
|
if (ev.target) {
|
|
230
269
|
let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
|
|
270
|
+
let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
|
|
231
271
|
if (group.items.length > 0) {
|
|
232
|
-
let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
|
|
233
272
|
groupOverlay.setAttribute("style", "display:grid");
|
|
234
273
|
}
|
|
235
274
|
else {
|
|
236
|
-
|
|
275
|
+
groupOverlay.classList.add("presetedHeight");
|
|
276
|
+
groupOverlay.setAttribute("style", "display:grid");
|
|
277
|
+
groupOverlay.scrollIntoView(false);
|
|
237
278
|
}
|
|
238
279
|
}
|
|
239
280
|
}
|
|
240
|
-
removeOverClass(
|
|
241
|
-
|
|
281
|
+
removeOverClass() {
|
|
282
|
+
var _a, _b;
|
|
283
|
+
let overCollection;
|
|
284
|
+
let overLastDroppableCollection;
|
|
285
|
+
if (this.useGroups) {
|
|
286
|
+
overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('over');
|
|
287
|
+
overLastDroppableCollection = this._groupContainer.getElementsByClassName('last-droppable-space');
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName('over');
|
|
291
|
+
overLastDroppableCollection = this._itemContainer.getElementsByClassName('last-droppable-space');
|
|
292
|
+
}
|
|
293
|
+
if (overCollection) {
|
|
294
|
+
Array.from(overCollection).forEach(function (element) {
|
|
295
|
+
element.classList.remove('over');
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
if (overLastDroppableCollection) {
|
|
299
|
+
Array.from(overLastDroppableCollection).forEach(function (element) {
|
|
300
|
+
element.classList.remove('over');
|
|
301
|
+
});
|
|
302
|
+
}
|
|
242
303
|
}
|
|
243
304
|
removeOverGroupClass(ev, group) {
|
|
244
305
|
if (ev.target) {
|
|
245
306
|
let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
|
|
246
|
-
|
|
247
|
-
|
|
307
|
+
let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
|
|
308
|
+
if (groupOverlay) {
|
|
309
|
+
groupOverlay.classList.remove("presetedHeight");
|
|
248
310
|
groupOverlay.setAttribute("style", "display:none");
|
|
249
311
|
}
|
|
250
|
-
else {
|
|
251
|
-
groupContainer === null || groupContainer === void 0 ? void 0 : groupContainer.classList.remove('overGroup');
|
|
252
|
-
}
|
|
253
312
|
}
|
|
254
313
|
}
|
|
255
|
-
onDragStart(
|
|
314
|
+
onDragStart(item, group, index) {
|
|
315
|
+
if (this._changeDeboucingTimeout) {
|
|
316
|
+
window.clearTimeout(this._changeDeboucingTimeout);
|
|
317
|
+
}
|
|
256
318
|
if (this.useGroups) {
|
|
257
319
|
this._dragStartItem = { groupName: group.group, item: item, index: index };
|
|
320
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
321
|
+
this.showOverlays(group);
|
|
322
|
+
}, 10);
|
|
258
323
|
}
|
|
259
324
|
else {
|
|
260
325
|
this._dragStartItem = { item: item.item, index: item.index };
|
|
261
326
|
}
|
|
262
|
-
let sourceElement = event.srcElement.cloneNode(true);
|
|
263
|
-
this._draggingElement = event.srcElement.cloneNode(true);
|
|
264
|
-
this._draggingElement.style.position = "absolute";
|
|
265
|
-
this._draggingElement.style.top = (event.clientY + 5) + 'px';
|
|
266
|
-
this._draggingElement.style.left = (event.clientX + 5) + 'px';
|
|
267
|
-
this._draggingElement.style.height = event.srcElement.clientHeight + 'px';
|
|
268
|
-
this._draggingElement.style.width = event.srcElement.clientWidth + 'px';
|
|
269
|
-
this._draggingElement.style.background = "#FFFFFF";
|
|
270
|
-
this._draggingElement.style.border = "1px solid #008561";
|
|
271
|
-
this._draggingElement.style["box-sizing"] = "border-box";
|
|
272
|
-
this._draggingElement.style["box-shadow"] = "0px 0px 16px rgba(0, 38, 111, 0.122)";
|
|
273
|
-
this._draggingElement.style["border-radius"] = "6px";
|
|
274
|
-
this._element.shadowRoot.appendChild(this._draggingElement);
|
|
275
|
-
event.dataTransfer.setDragImage(sourceElement, -10000, -10000);
|
|
276
|
-
}
|
|
277
|
-
onDrag(event) {
|
|
278
|
-
if (this._draggingElement) {
|
|
279
|
-
this._draggingElement.style.top = (event.clientY + 5) + 'px';
|
|
280
|
-
this._draggingElement.style.left = (event.clientX + 5) + 'px';
|
|
281
|
-
}
|
|
282
327
|
}
|
|
283
328
|
selectFirstItem() {
|
|
284
329
|
if (this.useGroups) {
|
|
@@ -381,63 +426,88 @@ export class EzList {
|
|
|
381
426
|
}
|
|
382
427
|
return undefined;
|
|
383
428
|
}
|
|
429
|
+
getGroupOverlayId(groupName) {
|
|
430
|
+
if (groupName) {
|
|
431
|
+
return "group-overlay-" + groupName.replace(/[^a-z0-9_]/gi, "_");
|
|
432
|
+
}
|
|
433
|
+
return undefined;
|
|
434
|
+
}
|
|
384
435
|
onDragOverGroup(event, group) {
|
|
385
|
-
if (this._dragStartItem && this._dragStartItem.groupName !== group.group) {
|
|
436
|
+
if (this._dragStartItem && this._dragStartItem.groupName !== group.group && group.sort) {
|
|
386
437
|
event.preventDefault();
|
|
387
438
|
this.addOverGroupClass(event, group);
|
|
388
439
|
}
|
|
389
440
|
}
|
|
390
|
-
onDragOverItem(event
|
|
441
|
+
onDragOverItem(event) {
|
|
391
442
|
if (this._dragStartItem) {
|
|
392
443
|
event.preventDefault();
|
|
393
|
-
|
|
394
|
-
group.sort ?
|
|
395
|
-
() => {
|
|
396
|
-
this.addOverGroupClass(event, group);
|
|
397
|
-
}
|
|
398
|
-
: this.addOverClass(event);
|
|
399
|
-
}
|
|
400
|
-
else {
|
|
401
|
-
this.addOverClass(event);
|
|
402
|
-
}
|
|
444
|
+
this.addOverClass(event.target);
|
|
403
445
|
event.stopPropagation();
|
|
404
446
|
}
|
|
405
447
|
}
|
|
448
|
+
onDragOverLastIndex(ev) {
|
|
449
|
+
ev.preventDefault();
|
|
450
|
+
if (this._dragStartItem) {
|
|
451
|
+
ev.target.classList.add('over');
|
|
452
|
+
ev.stopPropagation();
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
showOverlays(groupDragStart) {
|
|
456
|
+
let groupOverlayCollection = this._groupContainer.getElementsByClassName("group-overlay");
|
|
457
|
+
Array.from(groupOverlayCollection).forEach(groupOverlay => {
|
|
458
|
+
let groupOverlayID = this.getGroupOverlayId(groupDragStart.group);
|
|
459
|
+
if (groupOverlayID && groupOverlay.getAttribute("id") && groupOverlayID != groupOverlay.getAttribute("id")) {
|
|
460
|
+
groupOverlay.classList.add("presetedHeight");
|
|
461
|
+
groupOverlay.setAttribute("style", "display:grid");
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
hideOverlays() {
|
|
466
|
+
var _a;
|
|
467
|
+
let groupOverlayCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName("group-overlay");
|
|
468
|
+
Array.from(groupOverlayCollection).forEach(groupOverlay => {
|
|
469
|
+
groupOverlay.classList.remove("presetedHeight");
|
|
470
|
+
groupOverlay.setAttribute("style", "display:none");
|
|
471
|
+
});
|
|
472
|
+
}
|
|
406
473
|
render() {
|
|
407
474
|
return (h(Host, { ref: (el) => this._element = el }, this.useGroups ?
|
|
408
475
|
h("div", { class: "group-container", ref: (el) => this._groupContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, this._listGroupItems.map(group => {
|
|
409
|
-
return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length,
|
|
410
|
-
h("label", { class: "group-name"
|
|
476
|
+
return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) },
|
|
477
|
+
h("label", { draggable: false, class: "group-name" }, group.group),
|
|
411
478
|
h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() },
|
|
412
479
|
h("div", { class: "group-items-container" },
|
|
413
480
|
h("div", { class: "draggable-list" }, group.items.map((item, index) => {
|
|
414
481
|
return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) },
|
|
415
|
-
h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: (
|
|
482
|
+
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 },
|
|
416
483
|
h("div", { class: "item-content" },
|
|
417
484
|
this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined,
|
|
418
485
|
h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)),
|
|
419
486
|
this.itemSlotBuilder ?
|
|
420
487
|
h("div", { class: "slot-item" }, this.itemSlotBuilder(item, group))
|
|
421
488
|
: undefined));
|
|
422
|
-
}))
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
" para ",
|
|
427
|
-
group.group)
|
|
489
|
+
})),
|
|
490
|
+
h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event, group) })),
|
|
491
|
+
group.sort ?
|
|
492
|
+
h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" },
|
|
493
|
+
"Mover para ",
|
|
494
|
+
group.group)
|
|
495
|
+
: undefined));
|
|
428
496
|
}))
|
|
429
497
|
:
|
|
430
498
|
h("div", { class: "items-container", ref: (el) => this._itemContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } },
|
|
431
|
-
h("div", { class: "draggable-list" },
|
|
432
|
-
|
|
433
|
-
h("
|
|
434
|
-
h("div", { class: "item-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
499
|
+
h("div", { class: "draggable-list" },
|
|
500
|
+
this._listItems.map((item, index) => {
|
|
501
|
+
return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) },
|
|
502
|
+
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 },
|
|
503
|
+
h("div", { class: "item-content" },
|
|
504
|
+
this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined,
|
|
505
|
+
h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)),
|
|
506
|
+
this.itemSlotBuilder ?
|
|
507
|
+
h("div", null, this.itemSlotBuilder(item))
|
|
508
|
+
: undefined));
|
|
509
|
+
}),
|
|
510
|
+
h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event) })))));
|
|
441
511
|
}
|
|
442
512
|
static get is() { return "ez-list"; }
|
|
443
513
|
static get encapsulation() { return "shadow"; }
|
|
@@ -534,7 +604,7 @@ export class EzList {
|
|
|
534
604
|
"optional": false,
|
|
535
605
|
"docs": {
|
|
536
606
|
"tags": [],
|
|
537
|
-
"text": "
|
|
607
|
+
"text": "Define se \u00E9 poss\u00EDvel selecionar mais de um registro.\n\n/**\nFun\u00E7\u00E3o respons\u00E1vel por renderizar um conte\u00FAdo dentro do item da lista."
|
|
538
608
|
}
|
|
539
609
|
}
|
|
540
610
|
}; }
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
/*@doc Define a família da fonte do input, label e caixa de mensagem do componente.*/
|
|
16
16
|
--ez-text-input--font-family: var(--font-pattern, Arial);
|
|
17
17
|
/*@doc Define o peso da fonte do label do componente.*/
|
|
18
|
-
--ez-text-input--font-weight: var(--text-weight--
|
|
18
|
+
--ez-text-input--font-weight: var(--text-weight--medium, 400);
|
|
19
19
|
/*@doc Define a cor da fonte do input e label do componente.*/
|
|
20
20
|
--ez-text-input--color: var(--title--primary, #000);
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
--ez-text-input__input--border-color: var(--ez-text-input__input--background-color);
|
|
29
29
|
/*no modo normal usamos a borda com a mesma cor do bg*/
|
|
30
30
|
/*@doc Define a cor da borda do input quando focado.*/
|
|
31
|
-
--ez-text-input__input--focus--border-color: var(--color--
|
|
31
|
+
--ez-text-input__input--focus--border-color: var(--color--primary, #008561);
|
|
32
32
|
/*@doc Define a cor de fundo do input quando desabilitado.*/
|
|
33
33
|
--ez-text-input__input--disabled--background-color: var(--color--disable-secondary, #F2F5F8);
|
|
34
34
|
/*@doc Define a cor do texto do input.*/
|
|
@@ -6,6 +6,10 @@ export class EzTextInput {
|
|
|
6
6
|
* Deixa o campo disponível ou não para digitação.
|
|
7
7
|
*/
|
|
8
8
|
this.enabled = true;
|
|
9
|
+
/**
|
|
10
|
+
* Permite exibir a mensagem de erro.
|
|
11
|
+
*/
|
|
12
|
+
this.canShowError = true;
|
|
9
13
|
}
|
|
10
14
|
showError() {
|
|
11
15
|
const hasError = typeof this.errorMessage === "string" && this.errorMessage !== "";
|
|
@@ -178,7 +182,8 @@ export class EzTextInput {
|
|
|
178
182
|
: null,
|
|
179
183
|
h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }),
|
|
180
184
|
h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
181
|
-
|
|
185
|
+
this.canShowError &&
|
|
186
|
+
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
182
187
|
}
|
|
183
188
|
static get is() { return "ez-text-input"; }
|
|
184
189
|
static get encapsulation() { return "shadow"; }
|
|
@@ -292,6 +297,24 @@ export class EzTextInput {
|
|
|
292
297
|
"attribute": "mask",
|
|
293
298
|
"reflect": false
|
|
294
299
|
},
|
|
300
|
+
"canShowError": {
|
|
301
|
+
"type": "boolean",
|
|
302
|
+
"mutable": false,
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "boolean",
|
|
305
|
+
"resolved": "boolean",
|
|
306
|
+
"references": {}
|
|
307
|
+
},
|
|
308
|
+
"required": false,
|
|
309
|
+
"optional": false,
|
|
310
|
+
"docs": {
|
|
311
|
+
"tags": [],
|
|
312
|
+
"text": "Permite exibir a mensagem de erro."
|
|
313
|
+
},
|
|
314
|
+
"attribute": "can-show-error",
|
|
315
|
+
"reflect": true,
|
|
316
|
+
"defaultValue": "true"
|
|
317
|
+
},
|
|
295
318
|
"restrict": {
|
|
296
319
|
"type": "string",
|
|
297
320
|
"mutable": false,
|
|
@@ -3,6 +3,7 @@ export default class CSSVarsUtils {
|
|
|
3
3
|
if (child) {
|
|
4
4
|
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
|
|
5
5
|
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
|
|
6
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
|
|
6
7
|
}
|
|
7
8
|
}
|
|
8
9
|
static applyIfExists(host, element, varName) {
|