@sankhyalabs/ezui 0.0.0-bugfix-dev-kb-74998.4 → 0.0.0-bugfix-dev-KB-75210.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.
Files changed (91) hide show
  1. package/dist/cjs/{ez-card-item_3.cjs.entry.js → ez-card-item_2.cjs.entry.js} +0 -123
  2. package/dist/cjs/ez-chart.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
  4. package/dist/cjs/ez-filter-input.cjs.entry.js +130 -0
  5. package/dist/cjs/ez-form-view.cjs.entry.js +8 -2
  6. package/dist/cjs/ez-grid.cjs.entry.js +777 -109
  7. package/dist/cjs/ez-list.cjs.entry.js +253 -205
  8. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-popup.cjs.entry.js +4 -1
  10. package/dist/cjs/ez-split-item.cjs.entry.js +3 -2
  11. package/dist/cjs/ez-split-panel.cjs.entry.js +54 -2
  12. package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
  13. package/dist/cjs/ezui.cjs.js +1 -1
  14. package/dist/cjs/filter-column.cjs.entry.js +2 -2
  15. package/dist/cjs/index-a7b0c73d.js +10 -2
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/collection-manifest.json +1 -0
  18. package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
  19. package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
  20. package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
  21. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
  22. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +6 -2
  23. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +4 -1
  24. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +4 -0
  25. package/dist/collection/components/ez-grid/ez-grid.css +24 -6
  26. package/dist/collection/components/ez-grid/ez-grid.js +25 -5
  27. package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
  28. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +1 -1
  29. package/dist/collection/components/ez-list/ez-list.js +296 -206
  30. package/dist/collection/components/ez-list/ezListHelper.js +85 -0
  31. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +2 -2
  32. package/dist/collection/components/ez-popup/ez-popup.css +1 -0
  33. package/dist/collection/components/ez-popup/ez-popup.js +5 -2
  34. package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
  35. package/dist/collection/components/ez-split-panel/ez-split-panel.js +71 -1
  36. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +13 -2
  37. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +20 -1
  38. package/dist/custom-elements/index.d.ts +6 -0
  39. package/dist/custom-elements/index.js +1481 -338
  40. package/dist/esm/{ez-card-item_3.entry.js → ez-card-item_2.entry.js} +1 -123
  41. package/dist/esm/ez-chart.entry.js +1 -1
  42. package/dist/esm/ez-double-list.entry.js +283 -0
  43. package/dist/esm/ez-filter-input.entry.js +126 -0
  44. package/dist/esm/ez-form-view.entry.js +8 -2
  45. package/dist/esm/ez-grid.entry.js +778 -110
  46. package/dist/esm/ez-list.entry.js +253 -205
  47. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  48. package/dist/esm/ez-popup.entry.js +4 -1
  49. package/dist/esm/ez-split-item.entry.js +3 -2
  50. package/dist/esm/ez-split-panel.entry.js +54 -2
  51. package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
  52. package/dist/esm/ezui.js +1 -1
  53. package/dist/esm/filter-column.entry.js +2 -2
  54. package/dist/esm/index-baa5e267.js +10 -2
  55. package/dist/esm/loader.js +1 -1
  56. package/dist/ezui/ezui.esm.js +1 -1
  57. package/dist/ezui/p-16e612fc.entry.js +1 -0
  58. package/dist/ezui/p-17eabf46.entry.js +1 -0
  59. package/dist/ezui/p-2475fd6e.entry.js +1 -0
  60. package/dist/ezui/{p-baf80b13.entry.js → p-35d467a8.entry.js} +1 -1
  61. package/dist/ezui/p-5b205c80.entry.js +1 -0
  62. package/dist/ezui/p-65f471bc.entry.js +1 -0
  63. package/dist/ezui/p-66924de6.entry.js +1 -0
  64. package/dist/ezui/p-7e677b7b.entry.js +1 -0
  65. package/dist/ezui/p-80dfc50b.js +1 -0
  66. package/dist/ezui/{p-b36542d8.entry.js → p-a6fe527a.entry.js} +1 -1
  67. package/dist/ezui/p-b46e9f59.entry.js +309 -0
  68. package/dist/ezui/p-e3e3fd7a.entry.js +1 -0
  69. package/dist/ezui/{p-2b46b37b.entry.js → p-fa6732f2.entry.js} +1 -1
  70. package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
  71. package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
  72. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
  73. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
  74. package/dist/types/components/ez-grid/ez-grid.d.ts +5 -1
  75. package/dist/types/components/ez-list/ez-list.d.ts +23 -2
  76. package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
  77. package/dist/types/components/ez-popup/ez-popup.d.ts +1 -1
  78. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +7 -0
  79. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +4 -0
  80. package/dist/types/components.d.ts +133 -13
  81. package/package.json +1 -1
  82. package/react/components.d.ts +1 -0
  83. package/react/components.js +1 -0
  84. package/react/components.js.map +1 -1
  85. package/dist/ezui/p-4575d511.entry.js +0 -1
  86. package/dist/ezui/p-90bcd2ba.entry.js +0 -1
  87. package/dist/ezui/p-bfad39eb.entry.js +0 -1
  88. package/dist/ezui/p-c806f32f.entry.js +0 -1
  89. package/dist/ezui/p-ca1ce49f.entry.js +0 -309
  90. package/dist/ezui/p-cd2e78f0.entry.js +0 -1
  91. package/dist/ezui/p-e78e0843.entry.js +0 -1
@@ -0,0 +1,82 @@
1
+ export function moveItems(selectedItemsList, itemsList, foward) {
2
+ if (!selectedItemsList.length)
3
+ return [...itemsList];
4
+ if (!itemsList.length)
5
+ return [];
6
+ const selectedIndexes = getItemsIndex(selectedItemsList, itemsList);
7
+ const startIndex = getMinValue(selectedIndexes);
8
+ const endIndex = getMaxValue(selectedIndexes);
9
+ return moveRange(startIndex, endIndex, foward, itemsList);
10
+ }
11
+ function getMinValue(numbers) {
12
+ if (numbers.length === 0)
13
+ return 0;
14
+ return numbers.reduce((min, current) => (current < min ? current : min), numbers[0]);
15
+ }
16
+ function getMaxValue(numbers) {
17
+ if (numbers.length === 0)
18
+ return 0;
19
+ return numbers.reduce((max, current) => (current > max ? current : max), numbers[0]);
20
+ }
21
+ function getItemsIndex(selectedItemsList, itemsList) {
22
+ return selectedItemsList.map(selectedId => itemsList.findIndex(original => original.id === selectedId));
23
+ }
24
+ function moveRange(startIndex, endIndex, moveForward, listItem) {
25
+ if (startIndex < 0 || endIndex >= listItem.length || startIndex > endIndex)
26
+ return listItem;
27
+ if (moveForward)
28
+ return moveFoward(endIndex, startIndex, listItem);
29
+ return moveBackward(startIndex, endIndex, listItem);
30
+ }
31
+ function moveBackward(startIndex, endIndex, listItem) {
32
+ if (startIndex === 0)
33
+ return listItem;
34
+ const beforeRange = listItem.slice(0, startIndex - 1);
35
+ const range = listItem.slice(startIndex, endIndex + 1);
36
+ const afterRange = listItem.slice(endIndex + 1);
37
+ const movedItem = listItem[startIndex - 1];
38
+ return [...beforeRange, ...range, movedItem, ...afterRange];
39
+ }
40
+ function moveFoward(endIndex, startIndex, listItem) {
41
+ if (endIndex === listItem.length - 1)
42
+ return listItem;
43
+ const beforeRange = listItem.slice(0, startIndex);
44
+ const range = listItem.slice(startIndex, endIndex + 1);
45
+ const afterRange = listItem.slice(endIndex + 1);
46
+ const movedItem = afterRange.shift();
47
+ return movedItem
48
+ ? [...beforeRange, movedItem, ...range, ...afterRange]
49
+ : listItem;
50
+ }
51
+ export function transferAll({ from, to, selectedFrom, selectedTo }) {
52
+ to = [...to.map(i => setItemSelection(i, false)), ...from.map(i => setItemSelection(i, true))];
53
+ selectedFrom = [];
54
+ selectedTo = [...from.map(({ id }) => id)];
55
+ from = [];
56
+ return { from, to, selectedFrom, selectedTo };
57
+ }
58
+ export function transferItems({ from, to, selectedFrom, selectedTo }) {
59
+ if (!from.length)
60
+ return { from, to, selectedFrom, selectedTo };
61
+ const itemsToTransfer = getItemsToTransfer(to, selectedFrom, from);
62
+ if (!itemsToTransfer.length)
63
+ return { from, to, selectedFrom, selectedTo };
64
+ to = [
65
+ ...to.map(i => setItemSelection(i, false)),
66
+ ...itemsToTransfer.map(i => setItemSelection(i, true))
67
+ ];
68
+ const selectedFromIds = selectedFrom.map(id => id);
69
+ from = [...from.filter(item => !selectedFromIds.includes(item.id))];
70
+ selectedTo = [...selectedFrom];
71
+ selectedFrom = [];
72
+ return { from, to, selectedFrom, selectedTo };
73
+ }
74
+ function getItemsToTransfer(to, selectedFrom, from) {
75
+ const toListIds = to.map(item => item.id);
76
+ //Não deve transferir um item que já existe na lista destino
77
+ const itemsToTransferId = selectedFrom.filter((id) => !toListIds.includes(id));
78
+ return from.filter(({ id }) => itemsToTransferId.includes(id));
79
+ }
80
+ function setItemSelection(item, select) {
81
+ return Object.assign(Object.assign({}, item), { selected: select });
82
+ }
@@ -0,0 +1,62 @@
1
+ :host {
2
+ display: flex;
3
+ flex-direction: row;
4
+ gap: 8px;
5
+ align-items: center;
6
+ font-family: var(--font-pattern, "Roboto");
7
+ }
8
+
9
+ .group {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ gap: 10px;
13
+ flex-direction: column;
14
+ border: var(--border--small) var(--color--strokes);
15
+ border-radius: var(--border--radius-medium);
16
+ width: 350px;
17
+ height: 400px;
18
+ }
19
+
20
+ .group__header {
21
+ background: var(--background--body);
22
+ padding: 10px;
23
+ border-radius: var(--border--radius-medium) var(--border--radius-medium) 0 0;
24
+ }
25
+
26
+ .group__label {
27
+ font-weight: var(--text-weight--large);
28
+ font-size: var(--text--medium);
29
+ color: var(--title--primary);
30
+ margin-bottom: 10px;
31
+ display: block;
32
+ }
33
+
34
+ .group__totalizer {
35
+ padding: 5px 10px;
36
+ background: var(--background--body);
37
+ font-weight: var(--text-weight--medium);
38
+ font-size: var(--text--medium);
39
+ color: var(--text--secondary);
40
+ border-radius: 0 0 var(--border--radius-medium) var(--border--radius-medium);
41
+ }
42
+
43
+ .empty-message{
44
+ font-weight: var(--text-weight--medium);
45
+ font-size: var(--text--medium);
46
+ color: var(--text--secondary);
47
+ text-align: center;
48
+ margin: auto;
49
+ }
50
+
51
+ .list__container {
52
+ height: 100%;
53
+ min-height: 150px;
54
+ overflow: auto;
55
+ display: flex;
56
+ }
57
+
58
+ .actions__column {
59
+ display: flex;
60
+ flex-direction: column;
61
+ gap: 4px;
62
+ }
@@ -0,0 +1,440 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { moveItems, transferAll, transferItems } from './doubleListHelper';
3
+ import { ArrayUtils, ObjectUtils } from '@sankhyalabs/core';
4
+ import { isContinuousSequence } from '../ez-list/ezListHelper';
5
+ import { EzScrollDirection } from '../ez-scroller/EzScrollDirection';
6
+ export class EzDoubleList {
7
+ constructor() {
8
+ this.LEFT_LIST_ID = 'LEFT-LIST-ID';
9
+ this.RIGHT_LIST_ID = 'RIGHT-LIST-ID';
10
+ this.LEFT_FILTER_ID = 'LEFT-FILTER-ID';
11
+ this.RIGHT_FILTER_ID = 'RIGHT-FILTER-ID';
12
+ this.leftList = [];
13
+ this.leftTitle = undefined;
14
+ this.rightList = [];
15
+ this.entityLabel = 'item';
16
+ this.entityLabelPlural = 'itens';
17
+ this.leftListLabel = 'disponíveis';
18
+ this.rightListLabel = 'selecionados';
19
+ this.rightTitle = undefined;
20
+ this.leftFilteredList = [];
21
+ this.rightFilteredList = [];
22
+ this.selectedLeftList = [];
23
+ this.selectedRightList = [];
24
+ this.isFilteringLeft = false;
25
+ this.isFilteringRight = false;
26
+ }
27
+ async resetSelectedLists() {
28
+ this.selectedLeftList = [];
29
+ this.selectedRightList = [];
30
+ }
31
+ observeLeftList(newValue, oldValue) {
32
+ if (ObjectUtils.equals(newValue, oldValue))
33
+ return;
34
+ this.ezLeftListChanged.emit(newValue);
35
+ }
36
+ observeRightList(newValue, oldValue) {
37
+ if (ObjectUtils.equals(newValue, oldValue))
38
+ return;
39
+ this.ezRightListChanged.emit(newValue);
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
+ async handleChangeLeft({ detail }) {
50
+ this.leftList = [...detail];
51
+ this.selectedLeftList = [...detail.filter(item => item.selected)];
52
+ await this.leftEzListInstance.clearHistory();
53
+ }
54
+ async handleChangeRight({ detail }) {
55
+ this.rightList = [...detail];
56
+ this.selectedRightList = [...detail.filter(item => item.selected)];
57
+ await this.rightEzListInstance.clearHistory();
58
+ }
59
+ enableTransferAllToRight() {
60
+ return this.leftList.length > 0;
61
+ }
62
+ enableTransferAllToLeft() {
63
+ return this.rightList.length > 0;
64
+ }
65
+ enableTransferToRight() {
66
+ return this.selectedLeftList.length > 0;
67
+ }
68
+ enableTransferToLeft() {
69
+ return this.selectedRightList.length > 0;
70
+ }
71
+ enableMoveUp(moveAll) {
72
+ if (this.isFilteringRight)
73
+ return false;
74
+ const selectedIndexes = this.getRightSelectedItemsIndex();
75
+ return this.selectedRightList.length > 0
76
+ && !selectedIndexes.includes(0)
77
+ && (moveAll ? true : isContinuousSequence(selectedIndexes));
78
+ }
79
+ enableMoveDown(moveAll) {
80
+ if (this.isFilteringRight)
81
+ return false;
82
+ const selectedIndexes = this.getRightSelectedItemsIndex();
83
+ const lastIndex = this.rightList.length - 1;
84
+ return this.selectedRightList.length > 0
85
+ && !selectedIndexes.includes(lastIndex)
86
+ && (moveAll ? true : isContinuousSequence(selectedIndexes));
87
+ }
88
+ getRightSelectedItemsIndex() {
89
+ return this.selectedRightList.map(id => this.rightList.findIndex(original => original.id === id));
90
+ }
91
+ transferToRight() {
92
+ const { from, to, selectedFrom, selectedTo } = transferItems(this.buildTransferToRightConfig());
93
+ this.leftList = [...from];
94
+ this.rightList = [...to];
95
+ this.selectedLeftList = [...selectedFrom];
96
+ this.selectedRightList = [...selectedTo];
97
+ }
98
+ transferToLeft() {
99
+ const { from, to, selectedFrom, selectedTo } = transferItems(this.buildTransferToLeftConfig());
100
+ this.rightList = [...from];
101
+ this.leftList = [...to];
102
+ this.selectedRightList = [...selectedFrom];
103
+ this.selectedLeftList = [...selectedTo];
104
+ }
105
+ handleTransferAllToRight() {
106
+ const { from, to, selectedFrom, selectedTo } = transferAll(this.buildTransferToRightConfig());
107
+ this.leftList = [...from];
108
+ this.rightList = [...to];
109
+ this.selectedLeftList = [...selectedFrom];
110
+ this.selectedRightList = [...selectedTo];
111
+ }
112
+ handleTransferAllToLeft() {
113
+ const { from, to, selectedFrom, selectedTo } = transferAll(this.buildTransferToLeftConfig());
114
+ this.rightList = [...from];
115
+ this.leftList = [...to];
116
+ this.selectedRightList = [...selectedFrom];
117
+ this.selectedLeftList = [...selectedTo];
118
+ }
119
+ buildTransferToRightConfig() {
120
+ return {
121
+ from: this.leftList,
122
+ to: this.rightList,
123
+ selectedFrom: this.selectedLeftList,
124
+ selectedTo: this.selectedRightList,
125
+ };
126
+ }
127
+ buildTransferToLeftConfig() {
128
+ return {
129
+ from: this.rightList,
130
+ to: this.leftList,
131
+ selectedFrom: this.selectedRightList,
132
+ selectedTo: this.selectedLeftList,
133
+ };
134
+ }
135
+ handleMoveUp() {
136
+ this.rightList = [...moveItems(this.selectedRightList, this.rightList, false)];
137
+ }
138
+ handleMoveDown() {
139
+ this.rightList = [...moveItems(this.selectedRightList, this.rightList, true)];
140
+ }
141
+ handleMoveToTop() {
142
+ const { itemsToKeep, itemsToMove } = this.getItemsToKeepAndToMove();
143
+ this.rightList = [...itemsToMove, ...itemsToKeep];
144
+ }
145
+ handleMoveToBottom() {
146
+ const { itemsToKeep, itemsToMove } = this.getItemsToKeepAndToMove();
147
+ this.rightList = [...itemsToKeep, ...itemsToMove];
148
+ }
149
+ handleSelectLeftItem({ detail }) {
150
+ this.selectedLeftList = [...detail.map(({ id }) => id)];
151
+ }
152
+ handleSelectRightItem({ detail }) {
153
+ this.selectedRightList = [...detail.map(({ id }) => id)];
154
+ }
155
+ getItemsToKeepAndToMove() {
156
+ const itemsToKeep = this.rightList.filter(item => !this.selectedRightList.includes(item.id));
157
+ const itemsToMove = this.rightList.filter(item => this.selectedRightList.includes(item.id));
158
+ return { itemsToKeep, itemsToMove };
159
+ }
160
+ handleTransferToRight() {
161
+ this.transferToRight();
162
+ this.leftFilteredList = [];
163
+ this.leftEzFilterInput.value = '';
164
+ }
165
+ handleTransferToLeft() {
166
+ this.transferToLeft();
167
+ this.rightFilteredList = [];
168
+ this.rightEzFilterInput.value = '';
169
+ }
170
+ buildTotalizer(list) {
171
+ return `Total de ${list.length} ${list.length === 1 ? this.entityLabel : this.entityLabelPlural}`;
172
+ }
173
+ renderLeftList() {
174
+ if (!this.leftList.length) {
175
+ return h("span", { class: 'empty-message' }, "Nenhum ", this.entityLabel, " dispon\u00EDvel");
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) })));
178
+ }
179
+ renderRightList() {
180
+ if (!this.rightList.length) {
181
+ return h("span", { class: 'empty-message' }, "Nenhum ", this.entityLabel, " selecionado");
182
+ }
183
+ return (h("ez-scroller", { direction: EzScrollDirection.VERTICAL, activeShadow: true }, h("ez-list", { ref: (ref) => this.rightEzListInstance = ref, id: this.RIGHT_LIST_ID, hoverFeedback: true, dataSource: this.isFilteringRight ? this.rightFilteredList : this.rightList, ezDraggable: !this.isFilteringRight, enableMultipleSelection: true, onEzChange: this.handleChangeRight.bind(this), ezSelectable: true, onEzSelectMultipleItems: this.handleSelectRightItem.bind(this), onEzDoubleClick: this.handleTransferToLeft.bind(this) })));
184
+ }
185
+ render() {
186
+ return (h(Host, null, h("div", { class: 'group' }, h("div", { class: 'group__header' }, h("span", { class: 'group__label' }, this.leftTitle), h("ez-filter-input", { ref: (ref) => this.leftEzFilterInput = ref, id: this.LEFT_FILTER_ID, label: `Buscar ${this.entityLabel}`, mode: 'slim', onEzChange: evt => this.handleFilterChangeLeft(evt.detail) })), h("div", { class: 'list__container' }, this.renderLeftList()), h("div", { class: 'group__totalizer' }, this.buildTotalizer(this.leftList))), h("div", { class: 'actions__column' }, h("ez-button", { mode: 'icon', iconName: 'dual-chevron-right', enabled: this.enableTransferAllToRight(), title: `Mover todos para ${this.leftListLabel}`, size: 'small', onClick: this.handleTransferAllToRight.bind(this) }), h("ez-button", { mode: 'icon', iconName: 'chevron-right', enabled: this.enableTransferToRight(), title: `Mover para ${this.leftListLabel}`, size: 'small', onClick: this.handleTransferToRight.bind(this) }), h("ez-button", { mode: 'icon', iconName: 'chevron-left', enabled: this.enableTransferToLeft(), title: `Mover para ${this.rightListLabel}`, size: 'small', onClick: this.handleTransferToLeft.bind(this) }), h("ez-button", { mode: 'icon', iconName: 'dual-chevron-left', enabled: this.enableTransferAllToLeft(), title: `Mover todos para ${this.rightListLabel}`, size: 'small', onClick: this.handleTransferAllToLeft.bind(this) })), h("div", { class: 'group' }, h("div", { class: 'group__header' }, h("span", { class: 'group__label' }, this.rightTitle), h("ez-filter-input", { ref: (ref) => this.rightEzFilterInput = ref, id: this.RIGHT_FILTER_ID, label: `Buscar ${this.entityLabel}`, mode: 'slim', onEzChange: evt => this.handleFilterChangeRight(evt.detail) })), h("div", { class: 'list__container' }, this.renderRightList()), h("div", { class: 'group__totalizer' }, this.buildTotalizer(this.rightList))), 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
+ }
188
+ static get is() { return "ez-double-list"; }
189
+ static get encapsulation() { return "scoped"; }
190
+ static get originalStyleUrls() {
191
+ return {
192
+ "$": ["ez-double-list.css"]
193
+ };
194
+ }
195
+ static get styleUrls() {
196
+ return {
197
+ "$": ["ez-double-list.css"]
198
+ };
199
+ }
200
+ static get properties() {
201
+ return {
202
+ "leftList": {
203
+ "type": "unknown",
204
+ "mutable": true,
205
+ "complexType": {
206
+ "original": "ListItem[]",
207
+ "resolved": "ListItem[]",
208
+ "references": {
209
+ "ListItem": {
210
+ "location": "import",
211
+ "path": "../ez-list/ez-list"
212
+ }
213
+ }
214
+ },
215
+ "required": false,
216
+ "optional": false,
217
+ "docs": {
218
+ "tags": [],
219
+ "text": "Define a lista origem."
220
+ },
221
+ "defaultValue": "[]"
222
+ },
223
+ "leftTitle": {
224
+ "type": "string",
225
+ "mutable": false,
226
+ "complexType": {
227
+ "original": "string",
228
+ "resolved": "string",
229
+ "references": {}
230
+ },
231
+ "required": false,
232
+ "optional": false,
233
+ "docs": {
234
+ "tags": [],
235
+ "text": "Define o t\u00EDtulo da lista origem."
236
+ },
237
+ "attribute": "left-title",
238
+ "reflect": false
239
+ },
240
+ "rightList": {
241
+ "type": "unknown",
242
+ "mutable": true,
243
+ "complexType": {
244
+ "original": "ListItem[]",
245
+ "resolved": "ListItem[]",
246
+ "references": {
247
+ "ListItem": {
248
+ "location": "import",
249
+ "path": "../ez-list/ez-list"
250
+ }
251
+ }
252
+ },
253
+ "required": false,
254
+ "optional": false,
255
+ "docs": {
256
+ "tags": [],
257
+ "text": "Define a lista destino."
258
+ },
259
+ "defaultValue": "[]"
260
+ },
261
+ "entityLabel": {
262
+ "type": "string",
263
+ "mutable": false,
264
+ "complexType": {
265
+ "original": "string",
266
+ "resolved": "string",
267
+ "references": {}
268
+ },
269
+ "required": false,
270
+ "optional": false,
271
+ "docs": {
272
+ "tags": [],
273
+ "text": "Nome da entidade listada.\nExemplo: \"Campo\", \"Item\", \"Empresa\"."
274
+ },
275
+ "attribute": "entity-label",
276
+ "reflect": false,
277
+ "defaultValue": "'item'"
278
+ },
279
+ "entityLabelPlural": {
280
+ "type": "string",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "string",
284
+ "resolved": "string",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": false,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": "Varia\u00E7\u00E3o plura do nome da entidade listada.\nExemplo: \"Campos\", \"Itens\", \"Empresas\"."
292
+ },
293
+ "attribute": "entity-label-plural",
294
+ "reflect": false,
295
+ "defaultValue": "'itens'"
296
+ },
297
+ "leftListLabel": {
298
+ "type": "string",
299
+ "mutable": false,
300
+ "complexType": {
301
+ "original": "string",
302
+ "resolved": "string",
303
+ "references": {}
304
+ },
305
+ "required": false,
306
+ "optional": false,
307
+ "docs": {
308
+ "tags": [],
309
+ "text": "R\u00F3tulo da lista esquerda."
310
+ },
311
+ "attribute": "left-list-label",
312
+ "reflect": false,
313
+ "defaultValue": "'dispon\u00EDveis'"
314
+ },
315
+ "rightListLabel": {
316
+ "type": "string",
317
+ "mutable": false,
318
+ "complexType": {
319
+ "original": "string",
320
+ "resolved": "string",
321
+ "references": {}
322
+ },
323
+ "required": false,
324
+ "optional": false,
325
+ "docs": {
326
+ "tags": [],
327
+ "text": "R\u00F3tulo da lista direita."
328
+ },
329
+ "attribute": "right-list-label",
330
+ "reflect": false,
331
+ "defaultValue": "'selecionados'"
332
+ },
333
+ "rightTitle": {
334
+ "type": "string",
335
+ "mutable": false,
336
+ "complexType": {
337
+ "original": "string",
338
+ "resolved": "string",
339
+ "references": {}
340
+ },
341
+ "required": false,
342
+ "optional": false,
343
+ "docs": {
344
+ "tags": [],
345
+ "text": "Define o t\u00EDtulo da lista destino."
346
+ },
347
+ "attribute": "right-title",
348
+ "reflect": false
349
+ }
350
+ };
351
+ }
352
+ static get states() {
353
+ return {
354
+ "leftFilteredList": {},
355
+ "rightFilteredList": {},
356
+ "selectedLeftList": {},
357
+ "selectedRightList": {},
358
+ "isFilteringLeft": {},
359
+ "isFilteringRight": {}
360
+ };
361
+ }
362
+ static get events() {
363
+ return [{
364
+ "method": "ezLeftListChanged",
365
+ "name": "ezLeftListChanged",
366
+ "bubbles": true,
367
+ "cancelable": true,
368
+ "composed": true,
369
+ "docs": {
370
+ "tags": [],
371
+ "text": ""
372
+ },
373
+ "complexType": {
374
+ "original": "Array<ListItem>",
375
+ "resolved": "ListItem[]",
376
+ "references": {
377
+ "Array": {
378
+ "location": "global"
379
+ },
380
+ "ListItem": {
381
+ "location": "import",
382
+ "path": "../ez-list/ez-list"
383
+ }
384
+ }
385
+ }
386
+ }, {
387
+ "method": "ezRightListChanged",
388
+ "name": "ezRightListChanged",
389
+ "bubbles": true,
390
+ "cancelable": true,
391
+ "composed": true,
392
+ "docs": {
393
+ "tags": [],
394
+ "text": ""
395
+ },
396
+ "complexType": {
397
+ "original": "Array<ListItem>",
398
+ "resolved": "ListItem[]",
399
+ "references": {
400
+ "Array": {
401
+ "location": "global"
402
+ },
403
+ "ListItem": {
404
+ "location": "import",
405
+ "path": "../ez-list/ez-list"
406
+ }
407
+ }
408
+ }
409
+ }];
410
+ }
411
+ static get methods() {
412
+ return {
413
+ "resetSelectedLists": {
414
+ "complexType": {
415
+ "signature": "() => Promise<void>",
416
+ "parameters": [],
417
+ "references": {
418
+ "Promise": {
419
+ "location": "global"
420
+ }
421
+ },
422
+ "return": "Promise<void>"
423
+ },
424
+ "docs": {
425
+ "text": "",
426
+ "tags": []
427
+ }
428
+ }
429
+ };
430
+ }
431
+ static get watchers() {
432
+ return [{
433
+ "propName": "leftList",
434
+ "methodName": "observeLeftList"
435
+ }, {
436
+ "propName": "rightList",
437
+ "methodName": "observeRightList"
438
+ }];
439
+ }
440
+ }
@@ -2,7 +2,7 @@ import { UserInterface } from "@sankhyalabs/core";
2
2
  import { REQUIRED_INFO } from "../../../utils/constants";
3
3
  import { buildCheckBox, buildSwitch } from "./templates/CheckBox.tpl";
4
4
  import { buildComboBox } from "./templates/ComboBox.tpl";
5
- import { buildDate, buildTime, buildDateTime } from "./templates/DateInput.tpl";
5
+ import { buildDate, buildTime, buildDateTime, buildTimeSeconds } from "./templates/DateInput.tpl";
6
6
  import { buildFile } from "./templates/FileInput.tpl";
7
7
  import { buildDecimal, buildInteger } from "./templates/NumberInput.tpl";
8
8
  import { buildSearch } from "./templates/SearchInput.tpl";
@@ -14,6 +14,7 @@ uiBuilders.set(UserInterface.SWITCH, buildSwitch);
14
14
  uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
15
15
  uiBuilders.set(UserInterface.DATE, buildDate);
16
16
  uiBuilders.set(UserInterface.TIME, buildTime);
17
+ uiBuilders.set(UserInterface.ELAPSEDTIME, buildTimeSeconds);
17
18
  uiBuilders.set(UserInterface.DATETIME, buildDateTime);
18
19
  uiBuilders.set(UserInterface.FILE, buildFile);
19
20
  uiBuilders.set(UserInterface.DECIMALNUMBER, buildDecimal);
@@ -2,8 +2,12 @@ import { h } from "@stencil/core";
2
2
  export const buildDate = ({ name, label, readOnly, canShowError }) => {
3
3
  return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError, noMargin: true })));
4
4
  };
5
- export const buildTime = ({ name, label, readOnly, canShowError }) => {
6
- return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError, noMargin: true })));
5
+ export const buildTime = ({ name, label, readOnly, canShowError, props }) => {
6
+ var _a;
7
+ return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError, noMargin: true, "show-seconds": (_a = props === null || props === void 0 ? void 0 : props.showSeconds) !== null && _a !== void 0 ? _a : false })));
8
+ };
9
+ export const buildTimeSeconds = ({ name, label, readOnly, canShowError }) => {
10
+ return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError, noMargin: true, showSeconds: true })));
7
11
  };
8
12
  export const buildDateTime = ({ name, label, readOnly, contextName, canShowError }) => {
9
13
  return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, noMargin: true })));
@@ -168,6 +168,9 @@ export default class AgGridController {
168
168
  height: '100%'
169
169
  }
170
170
  },
171
+ rowClassRules: {
172
+ 'row-striped': ({ node }) => (options.enableRowTableStriped && node.rowIndex % 2 === 0),
173
+ },
171
174
  suppressFieldDotNotation: true,
172
175
  components: Object.assign({ ezGridHeaderComponent: SelectionHeader, ezGridCustomHeader: EzGridCustomHeader }, this._editionManager.getComponents()),
173
176
  context: {
@@ -392,7 +395,7 @@ export default class AgGridController {
392
395
  return status;
393
396
  }
394
397
  updateSelectionForAll(selectAll) {
395
- this._dataUnit.updatePageSelection(selectAll ? this._dataUnit.records.map(r => r.__record__id__) : []);
398
+ selectAll ? this._dataUnit.selectAllRecords() : this._dataUnit.unSelectAllRecords();
396
399
  }
397
400
  setData(data) {
398
401
  if (this._grid === undefined) {
@@ -1,6 +1,8 @@
1
1
  import { ApplicationContext, HTMLBuilder } from '@sankhyalabs/core';
2
2
  import { getViewPortHeight } from '../GridEditorUtils';
3
+ import { StringUtils } from "@sankhyalabs/core";
3
4
  export const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
5
+ var _a;
4
6
  const ezSearch = HTMLBuilder.parseElement(`<ez-search
5
7
  class="ez-grid grid_editor"
6
8
  mode="slim"
@@ -8,11 +10,13 @@ export const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) =
8
10
  enabled=${!readOnly}
9
11
  />`);
10
12
  const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
13
+ const metadata = dataUnit.getField(name);
11
14
  ezSearch.optionLoader = (argument) => loader(argument, name, dataUnit);
12
15
  ezSearch.ensureClearButtonVisible = true;
13
16
  ezSearch.suppressPreLoad = true;
14
17
  ezSearch.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
15
18
  ezSearch.stopPropagateEnterKeyEvent = true;
19
+ ezSearch.ignoreLimitCharsToSearch = StringUtils.getBooleanValue((_a = metadata === null || metadata === void 0 ? void 0 : metadata.properties) === null || _a === void 0 ? void 0 : _a.ignoreLimitCharsToSearch);
16
20
  ezSearch.autoFocus = true;
17
21
  ezSearch.valueGetter = () => ezSearch.getValueAsync();
18
22
  return ezSearch;