@sankhyalabs/ezui 1.1.87 → 1.1.90
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/{AssetsUtils-caf95dab.js → AssetsUtils-4909c6de.js} +1 -1
- package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-button_11.cjs.entry.js +86 -21
- package/dist/cjs/ez-calendar.cjs.entry.js +11 -4
- package/dist/cjs/ez-collapsible-box_7.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +1 -1
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/{index-0bce1636.js → index-88286449.js} +358 -8
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/ez-button/ez-button.js +19 -2
- package/dist/collection/components/ez-calendar/ez-calendar.css +33 -29
- package/dist/collection/components/ez-calendar/ez-calendar.js +9 -2
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +7 -5
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +49 -1
- package/dist/collection/components/ez-grid/ez-grid.css +7 -2
- package/dist/collection/components/ez-grid/ez-grid.js +26 -6
- package/dist/collection/components/ez-icon/ez-icon.css +133 -1
- package/dist/collection/components/ez-icon/ez-icon.js +34 -6
- package/dist/collection/components/ez-list/ez-list.js +2 -1
- package/dist/custom-elements/index.js +116 -44
- package/dist/esm/{AssetsUtils-9b1d9c38.js → AssetsUtils-9b1329a3.js} +1 -1
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-button_11.entry.js +86 -21
- package/dist/esm/ez-calendar.entry.js +11 -4
- package/dist/esm/ez-collapsible-box_7.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +1 -1
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ezui.js +2 -2
- package/dist/esm/{index-d80a8d1f.js → index-6b8bfbeb.js} +358 -8
- package/dist/esm/loader.js +2 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-091b27f2.entry.js → p-020f1285.entry.js} +1 -1
- package/dist/ezui/{p-27a35580.entry.js → p-038fd0cb.entry.js} +1 -1
- package/dist/ezui/{p-f87c7082.js → p-477bb703.js} +1 -1
- package/dist/ezui/{p-4e08b842.entry.js → p-4c20d96e.entry.js} +1 -1
- package/dist/ezui/{p-a52b3368.entry.js → p-502d7e0d.entry.js} +1 -1
- package/dist/ezui/{p-19d8a928.entry.js → p-542d3d29.entry.js} +1 -1
- package/dist/ezui/{p-826b6c4d.entry.js → p-552a0b2e.entry.js} +1 -1
- package/dist/ezui/{p-3e79877f.entry.js → p-60469339.entry.js} +1 -1
- package/dist/ezui/{p-eefc1f9d.entry.js → p-7e0281cd.entry.js} +1 -1
- package/dist/ezui/p-89a57641.js +1 -0
- package/dist/ezui/p-95fc543c.entry.js +1 -0
- package/dist/ezui/{p-b678dc80.entry.js → p-b217f40b.entry.js} +1 -1
- package/dist/ezui/{p-6206515e.entry.js → p-b8678ee6.entry.js} +1 -1
- package/dist/ezui/p-d22db59d.entry.js +1 -0
- package/dist/ezui/{p-b796d351.entry.js → p-f241de18.entry.js} +19 -19
- package/dist/types/components/ez-button/ez-button.d.ts +4 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +12 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +3 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +4 -0
- package/dist/types/components/ez-icon/ez-icon.d.ts +6 -0
- package/dist/types/components.d.ts +20 -0
- package/package.json +2 -2
- package/dist/collection/utils/FloatingManager.js +0 -16
- package/dist/ezui/p-39218c31.entry.js +0 -1
- package/dist/ezui/p-535771b6.entry.js +0 -1
- package/dist/ezui/p-7c101b34.js +0 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
/*@doc Define a cor de fundo do corpo da hora do calendário.*/
|
|
13
13
|
--ez-calendar__Time--background-color: var(--background--xlight, #FAFAFA);
|
|
14
14
|
/*@doc Define o espaçamento do corpo do calendário.*/
|
|
15
|
-
--ez-calendar__body--padding: var(--space--medium, 12px);
|
|
15
|
+
--ez-calendar__body--padding: var(--space--medium, 12px) var(--space--small, 6px) ;
|
|
16
16
|
/*@doc Define o raio da borda do corpo do calendário.*/
|
|
17
17
|
--ez-calendar__body--border-radius: var(--border--radius-medium, 12px);
|
|
18
18
|
/*@doc Define a sombra do corpo do calendário.*/
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
/* cal__header */
|
|
22
22
|
/*@doc Define a espessura da borda inferior do header.*/
|
|
23
|
-
--ez-calendar__header-line--stroke:
|
|
23
|
+
--ez-calendar__header-line--stroke: 1px;
|
|
24
24
|
/*@doc Define a cor da borda inferior do header.*/
|
|
25
25
|
--ez-calendar__header-line--color: var(--color--strokes, #C0C0C0);
|
|
26
26
|
|
|
@@ -40,17 +40,19 @@
|
|
|
40
40
|
|
|
41
41
|
/* cell */
|
|
42
42
|
/*@doc Define o espaçamento vertical entre as células.*/
|
|
43
|
-
--ez-calendar__cell--margin: 0px
|
|
43
|
+
--ez-calendar__cell--margin: 0px 1.5px;
|
|
44
44
|
/*@doc Define a largura das células.*/
|
|
45
45
|
--ez-calendar__cell--width: var(--space--large, 24px);
|
|
46
46
|
/*@doc Define o espaçamento horizontal entre as células.*/
|
|
47
|
-
--ez-calendar__cell--padding:
|
|
47
|
+
--ez-calendar__cell--padding: 1.5px 0px;
|
|
48
48
|
/*@doc Define o raio da borda das células.*/
|
|
49
49
|
--ez-calendar__cell--border-radius: var(--border--radius-small, 6px);
|
|
50
50
|
/*@doc Define a cor de fundo das células.*/
|
|
51
|
-
--ez-calendar__cell--over--background-color: var(--color--
|
|
51
|
+
--ez-calendar__cell--over--background-color: var(--color--primary, #E2F4EF);
|
|
52
|
+
/*@doc Define a cor de do texto das células.*/
|
|
53
|
+
--ez-calendar__cell--over--color: var(--color--primary-300, #008561);
|
|
52
54
|
/*@doc Define a cor do texto para células secundárias (fora do mês selecionado).*/
|
|
53
|
-
--ez-calendar__cell--outset--color: var(--color--
|
|
55
|
+
--ez-calendar__cell--outset--color: var(--color--disable-primary, #E5EAF0);
|
|
54
56
|
/*@doc Define a cor de fundo das células selecionadas.*/
|
|
55
57
|
--ez-calendar__cell--selected--background-color: var(--color--primary, #008561);
|
|
56
58
|
/*@doc Define a cor do texto da célula selecionada.*/
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
/*@doc Define a cor do texto do botão "Hoje".*/
|
|
61
63
|
--ez-calendar__btn-today--color: var(--color--primary);
|
|
62
64
|
/*@doc Define a cor de fundo do botão "Hoje" quando o cursor está sobre ele.*/
|
|
63
|
-
--ez-calendar__btn-today--hover--background-color: var(--color--
|
|
65
|
+
--ez-calendar__btn-today--hover--background-color: var(--color--primary-300, #E2F4EF);
|
|
64
66
|
/*@doc Define o raio da borda do botão "Hoje".*/
|
|
65
67
|
--ez-calendar__btn-today--border-radius: var(--border--radius-small, 6px);
|
|
66
68
|
|
|
@@ -90,8 +92,8 @@
|
|
|
90
92
|
/*private*/
|
|
91
93
|
display: flex;
|
|
92
94
|
justify-content: space-between;
|
|
93
|
-
padding-bottom: var(--space--
|
|
94
|
-
margin: var(--space--small, 6px) var(--space--, 12px);
|
|
95
|
+
padding-bottom: var(--space--small, 6px);
|
|
96
|
+
margin: 0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);
|
|
95
97
|
|
|
96
98
|
/*public*/
|
|
97
99
|
font-family: var(--ez-calendar--font-family);
|
|
@@ -140,8 +142,8 @@
|
|
|
140
142
|
|
|
141
143
|
.calendar__lbl-month {
|
|
142
144
|
/*private*/
|
|
143
|
-
font-weight: var(--text-weight--large,
|
|
144
|
-
font-size: var(--title--
|
|
145
|
+
font-weight: var(--text-weight--extra-large, 700);
|
|
146
|
+
font-size: var(--title--small, 14px);
|
|
145
147
|
|
|
146
148
|
/*public*/
|
|
147
149
|
font-family: var(--ez-calendar--font-family);
|
|
@@ -162,7 +164,7 @@
|
|
|
162
164
|
justify-content: center;
|
|
163
165
|
align-content: center;
|
|
164
166
|
cursor: pointer;
|
|
165
|
-
font-size: var(--text--small,
|
|
167
|
+
font-size: var(--text--extra-small, 10px);
|
|
166
168
|
|
|
167
169
|
/*public*/
|
|
168
170
|
font-family: var(--ez-calendar--font-family);
|
|
@@ -178,6 +180,7 @@
|
|
|
178
180
|
.calendar__cell:hover {
|
|
179
181
|
/*public*/
|
|
180
182
|
background-color: var(--ez-calendar__cell--over--background-color);
|
|
183
|
+
color: var(--ez-calendar__cell--over--color);
|
|
181
184
|
}
|
|
182
185
|
|
|
183
186
|
.calendar__cell--secondary {
|
|
@@ -208,11 +211,6 @@
|
|
|
208
211
|
color: var(--ez-calendar__cell--selected--color);
|
|
209
212
|
}
|
|
210
213
|
|
|
211
|
-
.calendar__body {
|
|
212
|
-
/*private*/
|
|
213
|
-
padding: var(--space--small, 6px) 0px;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
214
|
.calendar__footer {
|
|
217
215
|
/*private*/
|
|
218
216
|
display: flex;
|
|
@@ -225,8 +223,8 @@
|
|
|
225
223
|
background-color: unset;
|
|
226
224
|
cursor: pointer;
|
|
227
225
|
font-weight: var(--text-weight--large, 600);
|
|
228
|
-
font-size: var(--title--small);
|
|
229
|
-
padding:
|
|
226
|
+
font-size: var(--title--extra-small, 12px);
|
|
227
|
+
padding: 0px;
|
|
230
228
|
|
|
231
229
|
/*public*/
|
|
232
230
|
font-family: var(--ez-calendar--font-family);
|
|
@@ -249,9 +247,7 @@ section{
|
|
|
249
247
|
margin-left: -10px;
|
|
250
248
|
display: flex;
|
|
251
249
|
flex-direction: column;
|
|
252
|
-
padding: 12px
|
|
253
|
-
padding-left: 16px;
|
|
254
|
-
padding-bottom: 0px;
|
|
250
|
+
padding: 12px 0px 0px 10px;
|
|
255
251
|
|
|
256
252
|
/*public*/
|
|
257
253
|
/*TODO Criar variavel para color o calendar_time var(--ez-calendar__body-time--background-color)*/
|
|
@@ -261,7 +257,7 @@ section{
|
|
|
261
257
|
box-shadow: var(--ez-calendar__body--shadow);
|
|
262
258
|
}
|
|
263
259
|
.calendar__column {
|
|
264
|
-
height:
|
|
260
|
+
height: 136px;
|
|
265
261
|
padding: 0px;
|
|
266
262
|
margin: 0px;
|
|
267
263
|
overflow: auto;
|
|
@@ -276,14 +272,14 @@ section{
|
|
|
276
272
|
|
|
277
273
|
.calendarTime__header{
|
|
278
274
|
/*private*/
|
|
279
|
-
padding-left: 6px;
|
|
280
|
-
padding-right: 6px;
|
|
275
|
+
padding-left: var(--space--small, 6px);
|
|
276
|
+
padding-right: var(--space--small, 6px);
|
|
281
277
|
display: flex;
|
|
282
278
|
justify-content: space-between;
|
|
283
|
-
padding-bottom: var(--space--
|
|
284
|
-
margin: var(--space--small, 6px) var(--space--, 12px);
|
|
285
|
-
font-weight: var(--text-weight--large,
|
|
286
|
-
font-size: var(--title--
|
|
279
|
+
padding-bottom: var(--space--small, 6px);
|
|
280
|
+
margin: 0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);
|
|
281
|
+
font-weight: var(--text-weight--extra-large, 700);
|
|
282
|
+
font-size: var(--title--small, 14px);
|
|
287
283
|
|
|
288
284
|
|
|
289
285
|
/*public*/
|
|
@@ -298,9 +294,17 @@ section{
|
|
|
298
294
|
|
|
299
295
|
.separatorTime{
|
|
300
296
|
color: #A2ABB9;
|
|
297
|
+
padding: 0px 1px;
|
|
298
|
+
line-height: 16px;
|
|
299
|
+
font-size: 17px;
|
|
300
|
+
font-weight: normal;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
.endHidden {
|
|
304
304
|
-webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
+
.calendar__column .calendar__cell{
|
|
308
|
+
margin: 0px;
|
|
309
|
+
padding: 1.5px 1.5px;
|
|
310
|
+
}
|
|
@@ -7,7 +7,7 @@ export class EzCalendar {
|
|
|
7
7
|
this._weekDayLabels = ["D", "S", "T", "Q", "Q", "S", "S"];
|
|
8
8
|
this._monthLabels = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
|
9
9
|
this._hoursLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"];
|
|
10
|
-
this._minutosLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"];
|
|
10
|
+
this._minutosLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"];
|
|
11
11
|
/**
|
|
12
12
|
* A data selecionada no calendário
|
|
13
13
|
*/
|
|
@@ -38,6 +38,7 @@ export class EzCalendar {
|
|
|
38
38
|
window.requestAnimationFrame(() => {
|
|
39
39
|
this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
40
40
|
});
|
|
41
|
+
this.scroll();
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
@@ -140,11 +141,17 @@ export class EzCalendar {
|
|
|
140
141
|
this.updateScroll(this._secondsScroll);
|
|
141
142
|
}
|
|
142
143
|
componentDidLoad() {
|
|
144
|
+
this.scroll();
|
|
145
|
+
}
|
|
146
|
+
scroll() {
|
|
143
147
|
if (this.time || this.showSeconds) {
|
|
144
148
|
this._hoursScroll.scrollTop = this._hoursSelect.offsetTop - 64;
|
|
145
149
|
this._minutesScroll.scrollTop = this._minutesSelect.offsetTop - 64;
|
|
150
|
+
this.updateScroll(this._hoursScroll);
|
|
151
|
+
this.updateScroll(this._minutesScroll);
|
|
146
152
|
if (this.showSeconds) {
|
|
147
153
|
this._secondsScroll.scrollTop = this._secondsSelect.offsetTop - 64;
|
|
154
|
+
this.updateScroll(this._secondsScroll);
|
|
148
155
|
}
|
|
149
156
|
}
|
|
150
157
|
}
|
|
@@ -193,7 +200,7 @@ export class EzCalendar {
|
|
|
193
200
|
h("div", { class: "separatorTime" }, ":"),
|
|
194
201
|
this.showSeconds &&
|
|
195
202
|
h("div", null, "S")),
|
|
196
|
-
h("div", { class: "calendar__body ", style: { display: 'flex', paddingLeft: '
|
|
203
|
+
h("div", { class: "calendar__body ", style: { display: 'flex', paddingLeft: '12px', paddingRight: '12px' } },
|
|
197
204
|
h("div", { class: "calendar__column", ref: elem => this._hoursScroll = elem, onScroll: () => this.updateScroll(this._hoursScroll) }, this._hoursLabel.map((offset, index) => {
|
|
198
205
|
if (index === this.value.getHours()) {
|
|
199
206
|
return (h("div", { style: { display: 'flex' }, ref: elem => this._hoursSelect = elem },
|
|
@@ -14,11 +14,13 @@ export default class DataUnitBridge {
|
|
|
14
14
|
}
|
|
15
15
|
buildColumnDefs() {
|
|
16
16
|
const columnDefs = [];
|
|
17
|
-
this._dataUnit.metadata
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
if (this._dataUnit.metadata) {
|
|
18
|
+
this._dataUnit.metadata.fields.forEach(f => {
|
|
19
|
+
if (f.visible !== false) {
|
|
20
|
+
columnDefs.push({ label: f.label, name: f.name, userInterface: f.userInterface, options: this._dataUnit.getField(f.name).properties.options });
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
22
24
|
return columnDefs;
|
|
23
25
|
}
|
|
24
26
|
}
|
|
@@ -13,6 +13,7 @@ export default class AgGridController {
|
|
|
13
13
|
this._columnStateChangeCallback = options.onColumnStateChange;
|
|
14
14
|
this._selectionChangeCallback = options.onSelectionChange;
|
|
15
15
|
this._paginationChangeCallback = options.onPaginationChange;
|
|
16
|
+
this._doubleClickCallBack = options.onDoubleClick;
|
|
16
17
|
this._multipleSelection = options.allowMultipleSelection;
|
|
17
18
|
this._pageSize = options.pageSize;
|
|
18
19
|
this._serverURL = options.serverURL;
|
|
@@ -52,6 +53,7 @@ export default class AgGridController {
|
|
|
52
53
|
opt.onColumnVisible = e => this.onCallStateChange("visibleChange", e);
|
|
53
54
|
opt.onSelectionChanged = e => this.onSelectionChange(e);
|
|
54
55
|
opt.onPaginationChanged = () => this.onPaginationChange();
|
|
56
|
+
opt.onRowDoubleClicked = evt => this.onRowDoubleClick(evt);
|
|
55
57
|
}
|
|
56
58
|
setOptionsPagination(opt) {
|
|
57
59
|
opt.pagination = (this._pageSize > -1);
|
|
@@ -110,7 +112,13 @@ export default class AgGridController {
|
|
|
110
112
|
if (this._grid === undefined) {
|
|
111
113
|
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
112
114
|
}
|
|
113
|
-
|
|
115
|
+
//TODO neste ponto estamos utilizando um método descontinuado,
|
|
116
|
+
//pelo fato de que o applyColumnState não reordena as colunas conforme
|
|
117
|
+
//o estado passado.
|
|
118
|
+
//https://stackoverflow.com/questions/51488241/ag-grid-how-to-save-and-reload-column-order
|
|
119
|
+
//Assim que for corrigido o applyColumnState devemos substituir o setColumnState por ele.
|
|
120
|
+
// this._gridOptions.columnApi.applyColumnState({ state: state.map(s => this.buildColState(s)) });
|
|
121
|
+
this._gridOptions.columnApi.setColumnState(state.map(s => this.buildColState(s)));
|
|
114
122
|
}
|
|
115
123
|
getColumnsState() {
|
|
116
124
|
if (this._grid === undefined) {
|
|
@@ -150,9 +158,44 @@ export default class AgGridController {
|
|
|
150
158
|
resizable: true,
|
|
151
159
|
headerComponentParams: {
|
|
152
160
|
template: HeaderColumnTemplate
|
|
161
|
+
},
|
|
162
|
+
valueFormatter: params => {
|
|
163
|
+
return this.getFormatterByColumn(params, source);
|
|
153
164
|
}
|
|
154
165
|
};
|
|
155
166
|
}
|
|
167
|
+
getFormatterByColumn(params, source) {
|
|
168
|
+
var _a, _b;
|
|
169
|
+
if ((source === null || source === void 0 ? void 0 : source.userInterface) === "OPTIONSELECTOR" && source.options) {
|
|
170
|
+
const prop = source === null || source === void 0 ? void 0 : source.options;
|
|
171
|
+
let options;
|
|
172
|
+
if (typeof prop === "string") {
|
|
173
|
+
const parsed = JSON.parse(prop);
|
|
174
|
+
options = Object.keys(parsed).map(key => { return { value: key, label: parsed[key] }; });
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
options = prop;
|
|
178
|
+
}
|
|
179
|
+
let optionSelected;
|
|
180
|
+
options.forEach((option) => {
|
|
181
|
+
if (option.value == params.value) {
|
|
182
|
+
optionSelected = option;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
return optionSelected === null || optionSelected === void 0 ? void 0 : optionSelected.label;
|
|
186
|
+
}
|
|
187
|
+
if ((source === null || source === void 0 ? void 0 : source.userInterface) === "SWITCH") {
|
|
188
|
+
if ((params === null || params === void 0 ? void 0 : params.value) === "S" || (params === null || params === void 0 ? void 0 : params.value) === true) {
|
|
189
|
+
return "Sim";
|
|
190
|
+
}
|
|
191
|
+
else if ((params === null || params === void 0 ? void 0 : params.value) === "N" || (params === null || params === void 0 ? void 0 : params.value) === false) {
|
|
192
|
+
return "Não";
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if ((source === null || source === void 0 ? void 0 : source.userInterface) === "SEARCH") {
|
|
196
|
+
return ((_a = params === null || params === void 0 ? void 0 : params.value) === null || _a === void 0 ? void 0 : _a.value) + " - " + ((_b = params === null || params === void 0 ? void 0 : params.value) === null || _b === void 0 ? void 0 : _b.label);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
156
199
|
buildColState(source) {
|
|
157
200
|
return {
|
|
158
201
|
colId: source.name,
|
|
@@ -195,6 +238,11 @@ export default class AgGridController {
|
|
|
195
238
|
}
|
|
196
239
|
}
|
|
197
240
|
}
|
|
241
|
+
onRowDoubleClick(evt) {
|
|
242
|
+
if (this._doubleClickCallBack) {
|
|
243
|
+
this._doubleClickCallBack(evt.data);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
198
246
|
conditionalSet(host, attribute, value) {
|
|
199
247
|
if (value !== null && value !== undefined && value !== false) {
|
|
200
248
|
host[attribute] = value;
|
|
@@ -7,12 +7,17 @@
|
|
|
7
7
|
--ezgrid__header--background-color: var(--background--xlight, #FFF)
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.grid-header {
|
|
11
11
|
/*private*/
|
|
12
12
|
display: flex;
|
|
13
|
-
justify-content:
|
|
13
|
+
justify-content: space-between;
|
|
14
14
|
align-items: center;
|
|
15
15
|
|
|
16
16
|
/*public*/
|
|
17
17
|
background-color: var(--ezgrid__header--background-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.grid-header__container{
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
18
23
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Component, h, Host, Prop, Method, Event, State } from "@stencil/core";
|
|
2
2
|
import AgGridController from "./controller/ag-grid/AgGridController";
|
|
3
|
-
import { getSpritePath } from "../../utils/AssetsUtils";
|
|
4
3
|
import DataUnitBridge from "./controller/DataUnitBridge";
|
|
5
4
|
export class EzGrid {
|
|
6
5
|
constructor() {
|
|
@@ -72,6 +71,9 @@ export class EzGrid {
|
|
|
72
71
|
this._navigationLastRow = status.pageEnd;
|
|
73
72
|
this._navigationTotalRows = status.totalRows;
|
|
74
73
|
},
|
|
74
|
+
onDoubleClick: (row) => {
|
|
75
|
+
this.ezDoubleClick.emit(row);
|
|
76
|
+
},
|
|
75
77
|
allowMultipleSelection: this.multipleSelection,
|
|
76
78
|
pageSize: this.pageSize,
|
|
77
79
|
serverURL: this.serverUrl,
|
|
@@ -89,8 +91,8 @@ export class EzGrid {
|
|
|
89
91
|
h("div", { class: "text text--primary text--medium margin-right--medium" },
|
|
90
92
|
h("strong", { class: "text text--primary text--medium" }, `${this._navigationFirstRow}-${this._navigationLastRow}`),
|
|
91
93
|
` de ${this._navigationTotalRows}`),
|
|
92
|
-
h("ez-button", { size: "small",
|
|
93
|
-
h("ez-button", { size: "small",
|
|
94
|
+
h("ez-button", { size: "small", iconName: "chevron-left", class: "button--secondary margin-right--medium", mode: "icon", enabled: this._navigationHasPrevious, onClick: () => this._gridController.previousPage(), label: "P\u00E1gina anterior" }),
|
|
95
|
+
h("ez-button", { size: "small", iconName: "chevron-right", class: "button--secondary margin-right--medium", mode: "icon", enabled: this._navigationHasNext, onClick: () => this._gridController.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })
|
|
94
96
|
];
|
|
95
97
|
}
|
|
96
98
|
applyConfig(cols) {
|
|
@@ -107,9 +109,12 @@ export class EzGrid {
|
|
|
107
109
|
}
|
|
108
110
|
render() {
|
|
109
111
|
return (h(Host, null,
|
|
110
|
-
h("div", { class: "box box--shadow padding--medium
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
h("div", { class: "box box--shadow padding--medium grid-header margin-bottom--small" },
|
|
113
|
+
h("div", { class: "grid-header__container" },
|
|
114
|
+
h("slot", { name: "leftButtons" })),
|
|
115
|
+
h("div", { class: "grid-header__container" },
|
|
116
|
+
this.getPaginationControl(),
|
|
117
|
+
h("ez-button", { size: "small", iconName: "settings", class: "button--secondary", mode: "icon", onClick: () => { this.openConfig(); } }))),
|
|
113
118
|
h("div", { class: "grid__container ag-sankhya-theme", ref: elem => this._container = elem }),
|
|
114
119
|
h("div", { class: "grid__footer" }),
|
|
115
120
|
h("ez-modal", { modalSize: "small", closeEsc: true, closeOutsideClick: true, opened: this._popUpVisible, onEzCloseModal: () => this._popUpVisible = false },
|
|
@@ -245,6 +250,21 @@ export class EzGrid {
|
|
|
245
250
|
}
|
|
246
251
|
}
|
|
247
252
|
}
|
|
253
|
+
}, {
|
|
254
|
+
"method": "ezDoubleClick",
|
|
255
|
+
"name": "ezDoubleClick",
|
|
256
|
+
"bubbles": true,
|
|
257
|
+
"cancelable": true,
|
|
258
|
+
"composed": true,
|
|
259
|
+
"docs": {
|
|
260
|
+
"tags": [],
|
|
261
|
+
"text": "Evento disparado com o duplo clique de uma linha"
|
|
262
|
+
},
|
|
263
|
+
"complexType": {
|
|
264
|
+
"original": "any",
|
|
265
|
+
"resolved": "any",
|
|
266
|
+
"references": {}
|
|
267
|
+
}
|
|
248
268
|
}]; }
|
|
249
269
|
static get methods() { return {
|
|
250
270
|
"setColumnsDef": {
|
|
@@ -36,4 +36,136 @@ svg {
|
|
|
36
36
|
.x-large {
|
|
37
37
|
width: 30px;
|
|
38
38
|
height: 30px;
|
|
39
|
-
}
|
|
39
|
+
}
|
|
40
|
+
/*
|
|
41
|
+
START CSS GENERATED BY EZ-DESIGN ICONS, SEE MORE AT ez-design\scripts\fontsGenerator.js.
|
|
42
|
+
WHEN ADD NEW ICONS THIS CSS NEED TO BE UPDATED
|
|
43
|
+
*/
|
|
44
|
+
[class^="ez-icon-"], [class*=" ez-icon-"] {
|
|
45
|
+
font-family: 'ez-icons' !important;
|
|
46
|
+
font-size: 16px;
|
|
47
|
+
font-style:normal;
|
|
48
|
+
-webkit-font-smoothing: antialiased;
|
|
49
|
+
-moz-osx-font-smoothing: grayscale;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ez-icon-account-outline:before { content: "\ea01"; }
|
|
53
|
+
.ez-icon-account:before { content: "\ea02"; }
|
|
54
|
+
.ez-icon-alert-circle-inverted:before { content: "\ea03"; }
|
|
55
|
+
.ez-icon-alert-circle:before { content: "\ea04"; }
|
|
56
|
+
.ez-icon-alert-mail:before { content: "\ea05"; }
|
|
57
|
+
.ez-icon-alert-outline:before { content: "\ea06"; }
|
|
58
|
+
.ez-icon-alert-popup:before { content: "\ea07"; }
|
|
59
|
+
.ez-icon-apps:before { content: "\ea08"; }
|
|
60
|
+
.ez-icon-arrow_back:before { content: "\ea09"; }
|
|
61
|
+
.ez-icon-bell-inverted:before { content: "\ea0a"; }
|
|
62
|
+
.ez-icon-bell:before { content: "\ea0b"; }
|
|
63
|
+
.ez-icon-business-center:before { content: "\ea0c"; }
|
|
64
|
+
.ez-icon-calendar-text:before { content: "\ea0d"; }
|
|
65
|
+
.ez-icon-calendar:before { content: "\ea0e"; }
|
|
66
|
+
.ez-icon-check-circle-inverted:before { content: "\ea0f"; }
|
|
67
|
+
.ez-icon-check-circle:before { content: "\ea10"; }
|
|
68
|
+
.ez-icon-check:before { content: "\ea11"; }
|
|
69
|
+
.ez-icon-chevron-down:before { content: "\ea12"; }
|
|
70
|
+
.ez-icon-chevron-left:before { content: "\ea13"; }
|
|
71
|
+
.ez-icon-chevron-right:before { content: "\ea14"; }
|
|
72
|
+
.ez-icon-chevron-up:before { content: "\ea15"; }
|
|
73
|
+
.ez-icon-circle--medium:before { content: "\ea16"; }
|
|
74
|
+
.ez-icon-circle:before { content: "\ea17"; }
|
|
75
|
+
.ez-icon-clipboard:before { content: "\ea18"; }
|
|
76
|
+
.ez-icon-close-circle-inverted:before { content: "\ea19"; }
|
|
77
|
+
.ez-icon-close-circle:before { content: "\ea1a"; }
|
|
78
|
+
.ez-icon-close:before { content: "\ea1b"; }
|
|
79
|
+
.ez-icon-comment-inverted:before { content: "\ea1c"; }
|
|
80
|
+
.ez-icon-comment:before { content: "\ea1d"; }
|
|
81
|
+
.ez-icon-configuration:before { content: "\ea1e"; }
|
|
82
|
+
.ez-icon-copy:before { content: "\ea1f"; }
|
|
83
|
+
.ez-icon-crop:before { content: "\ea20"; }
|
|
84
|
+
.ez-icon-delete:before { content: "\ea21"; }
|
|
85
|
+
.ez-icon-description:before { content: "\ea22"; }
|
|
86
|
+
.ez-icon-dot-notification:before { content: "\ea23"; }
|
|
87
|
+
.ez-icon-dots-horizontal:before { content: "\ea24"; }
|
|
88
|
+
.ez-icon-dots-vertical:before { content: "\ea25"; }
|
|
89
|
+
.ez-icon-drag-indicator:before { content: "\ea26"; }
|
|
90
|
+
.ez-icon-edit-file:before { content: "\ea27"; }
|
|
91
|
+
.ez-icon-edit-table:before { content: "\ea28"; }
|
|
92
|
+
.ez-icon-edit-time:before { content: "\ea29"; }
|
|
93
|
+
.ez-icon-edit:before { content: "\ea2a"; }
|
|
94
|
+
.ez-icon-email-inverted:before { content: "\ea2b"; }
|
|
95
|
+
.ez-icon-email:before { content: "\ea2c"; }
|
|
96
|
+
.ez-icon-error-octagon:before { content: "\ea2d"; }
|
|
97
|
+
.ez-icon-expand:before { content: "\ea2e"; }
|
|
98
|
+
.ez-icon-eye-off:before { content: "\ea2f"; }
|
|
99
|
+
.ez-icon-eye:before { content: "\ea30"; }
|
|
100
|
+
.ez-icon-favorite:before { content: "\ea31"; }
|
|
101
|
+
.ez-icon-file-download:before { content: "\ea32"; }
|
|
102
|
+
.ez-icon-file-upload:before { content: "\ea33"; }
|
|
103
|
+
.ez-icon-filter:before { content: "\ea34"; }
|
|
104
|
+
.ez-icon-find-file:before { content: "\ea35"; }
|
|
105
|
+
.ez-icon-find-page:before { content: "\ea36"; }
|
|
106
|
+
.ez-icon-format-color-fill:before { content: "\ea37"; }
|
|
107
|
+
.ez-icon-help-circle-outline:before { content: "\ea38"; }
|
|
108
|
+
.ez-icon-help-inverted:before { content: "\ea39"; }
|
|
109
|
+
.ez-icon-help:before { content: "\ea3a"; }
|
|
110
|
+
.ez-icon-home:before { content: "\ea3b"; }
|
|
111
|
+
.ez-icon-language:before { content: "\ea3c"; }
|
|
112
|
+
.ez-icon-launch:before { content: "\ea3d"; }
|
|
113
|
+
.ez-icon-lightbulb:before { content: "\ea3e"; }
|
|
114
|
+
.ez-icon-list:before { content: "\ea3f"; }
|
|
115
|
+
.ez-icon-loading:before { content: "\ea40"; }
|
|
116
|
+
.ez-icon-lock-outline:before { content: "\ea41"; }
|
|
117
|
+
.ez-icon-lock:before { content: "\ea42"; }
|
|
118
|
+
.ez-icon-menu:before { content: "\ea43"; }
|
|
119
|
+
.ez-icon-minus-circle-inverted:before { content: "\ea44"; }
|
|
120
|
+
.ez-icon-minus:before { content: "\ea45"; }
|
|
121
|
+
.ez-icon-money-off:before { content: "\ea46"; }
|
|
122
|
+
.ez-icon-money:before { content: "\ea47"; }
|
|
123
|
+
.ez-icon-north-west:before { content: "\ea48"; }
|
|
124
|
+
.ez-icon-pause:before { content: "\ea49"; }
|
|
125
|
+
.ez-icon-payments:before { content: "\ea4a"; }
|
|
126
|
+
.ez-icon-play:before { content: "\ea4b"; }
|
|
127
|
+
.ez-icon-plus-circle-inverted:before { content: "\ea4c"; }
|
|
128
|
+
.ez-icon-plus-circle:before { content: "\ea4d"; }
|
|
129
|
+
.ez-icon-plus:before { content: "\ea4e"; }
|
|
130
|
+
.ez-icon-power:before { content: "\ea4f"; }
|
|
131
|
+
.ez-icon-push-pin:before { content: "\ea50"; }
|
|
132
|
+
.ez-icon-restore:before { content: "\ea51"; }
|
|
133
|
+
.ez-icon-return:before { content: "\ea52"; }
|
|
134
|
+
.ez-icon-rotate:before { content: "\ea53"; }
|
|
135
|
+
.ez-icon-save:before { content: "\ea54"; }
|
|
136
|
+
.ez-icon-search:before { content: "\ea55"; }
|
|
137
|
+
.ez-icon-settings-inverted:before { content: "\ea56"; }
|
|
138
|
+
.ez-icon-settings:before { content: "\ea57"; }
|
|
139
|
+
.ez-icon-share:before { content: "\ea58"; }
|
|
140
|
+
.ez-icon-shield:before { content: "\ea59"; }
|
|
141
|
+
.ez-icon-south-east:before { content: "\ea5a"; }
|
|
142
|
+
.ez-icon-success-circle:before { content: "\ea5b"; }
|
|
143
|
+
.ez-icon-sync:before { content: "\ea5c"; }
|
|
144
|
+
.ez-icon-table:before { content: "\ea5d"; }
|
|
145
|
+
.ez-icon-timer-outline:before { content: "\ea5e"; }
|
|
146
|
+
.ez-icon-user-circle:before { content: "\ea5f"; }
|
|
147
|
+
.ez-icon-warning-minus:before { content: "\ea60"; }
|
|
148
|
+
.ez-icon-warning-triangle:before { content: "\ea61"; }
|
|
149
|
+
/*
|
|
150
|
+
END CSS GENERATED BY EZ-DESIGN ICONS
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
.x-small--font {
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.small--font {
|
|
158
|
+
font-size: 16px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.medium--font {
|
|
162
|
+
font-size: 20px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.large--font {
|
|
166
|
+
font-size: 24px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.x-large--font {
|
|
170
|
+
font-size: 30px;
|
|
171
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StringUtils } from '@sankhyalabs/core';
|
|
1
2
|
import { Component, h, Host, Prop } from '@stencil/core';
|
|
2
3
|
export class EzIcon {
|
|
3
4
|
constructor() {
|
|
@@ -9,13 +10,23 @@ export class EzIcon {
|
|
|
9
10
|
isSprite() {
|
|
10
11
|
return this.href && this.href.indexOf('#') > -1;
|
|
11
12
|
}
|
|
13
|
+
getIconClassName() {
|
|
14
|
+
return `ez-icon-${this.iconName}`;
|
|
15
|
+
}
|
|
16
|
+
getIconContent() {
|
|
17
|
+
if (this.isSprite()) {
|
|
18
|
+
return h("svg", { class: this.size, role: "img" },
|
|
19
|
+
h("use", { xlinkHref: this.href }));
|
|
20
|
+
}
|
|
21
|
+
else if (!StringUtils.isEmpty(this.iconName)) {
|
|
22
|
+
return h("span", { class: `icon-content ${this.getIconClassName()} ${this.size}--font` });
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return h("img", { class: this.size, src: this.href });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
12
28
|
render() {
|
|
13
|
-
return (h(Host, null, this.
|
|
14
|
-
?
|
|
15
|
-
h("svg", { class: this.size, role: "img" },
|
|
16
|
-
h("use", { xlinkHref: this.href }))
|
|
17
|
-
:
|
|
18
|
-
h("img", { class: this.size, src: this.href })));
|
|
29
|
+
return (h(Host, null, this.getIconContent()));
|
|
19
30
|
}
|
|
20
31
|
static get is() { return "ez-icon"; }
|
|
21
32
|
static get encapsulation() { return "shadow"; }
|
|
@@ -60,6 +71,23 @@ export class EzIcon {
|
|
|
60
71
|
},
|
|
61
72
|
"attribute": "href",
|
|
62
73
|
"reflect": true
|
|
74
|
+
},
|
|
75
|
+
"iconName": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"mutable": false,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "string",
|
|
80
|
+
"resolved": "string",
|
|
81
|
+
"references": {}
|
|
82
|
+
},
|
|
83
|
+
"required": false,
|
|
84
|
+
"optional": false,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": "Nome do icone dispon\u00EDvel no pacote de fontes [ez-icons](https://sankhyalabs-storybook.herokuapp.com/themes/default/icons/fonts/index.html)"
|
|
88
|
+
},
|
|
89
|
+
"attribute": "icon-name",
|
|
90
|
+
"reflect": true
|
|
63
91
|
}
|
|
64
92
|
}; }
|
|
65
93
|
}
|
|
@@ -162,7 +162,8 @@ export class EzList {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
else {
|
|
165
|
-
|
|
165
|
+
let indexForAdd = (dragEndItem.index > this._dragStartItem.index) ? dragEndItem.index - 1 : dragEndItem.index;
|
|
166
|
+
newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
|
|
166
167
|
}
|
|
167
168
|
this._listGroupItems = newList;
|
|
168
169
|
this.ezChange.emit(this._listGroupItems);
|