@sankhyalabs/ezui 1.1.159 → 1.1.161
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-combo-box.cjs.entry.js +63 -28
- package/dist/cjs/ez-date-input.cjs.entry.js +71 -25
- package/dist/cjs/ez-date-time-input.cjs.entry.js +94 -31
- package/dist/cjs/ez-filter-input.cjs.entry.js +10 -4
- package/dist/cjs/ez-form.cjs.entry.js +54 -9
- package/dist/cjs/{grid-config.cjs.entry.js → ez-grid-config.cjs.entry.js} +6 -6
- package/dist/cjs/ez-grid.cjs.entry.js +16 -9
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +69 -25
- package/dist/cjs/ez-search.cjs.entry.js +20 -5
- package/dist/cjs/{select-box.cjs.entry.js → ez-select-box.cjs.entry.js} +3 -3
- package/dist/cjs/ez-text-area.cjs.entry.js +8 -2
- package/dist/cjs/ez-text-input.cjs.entry.js +30 -21
- package/dist/cjs/ez-time-input.cjs.entry.js +75 -40
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +10 -4
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +81 -28
- package/dist/collection/components/ez-date-input/ez-date-input.js +87 -25
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +108 -31
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +26 -4
- package/dist/collection/components/ez-form/DataBinder.js +12 -3
- package/dist/collection/components/ez-form/ez-form.js +43 -6
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +7 -3
- package/dist/collection/components/ez-grid/ez-grid.css +4 -0
- package/dist/collection/components/ez-grid/ez-grid.js +21 -14
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.css → ez-grid-config/ez-grid-config.css} +46 -20
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.js → ez-grid-config/ez-grid-config.js} +12 -12
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.css → ez-select-box/ez-select-box.css} +3 -4
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.js → ez-select-box/ez-select-box.js} +3 -3
- package/dist/collection/components/ez-list/ez-list.css +84 -46
- package/dist/collection/components/ez-modal/ez-modal.css +2 -2
- package/dist/collection/components/ez-number-input/ez-number-input.js +83 -25
- package/dist/collection/components/ez-search/ez-search.js +38 -5
- package/dist/collection/components/ez-text-area/ez-text-area.css +1 -1
- package/dist/collection/components/ez-text-area/ez-text-area.js +23 -1
- package/dist/collection/components/ez-text-input/ez-text-input.css +1 -1
- package/dist/collection/components/ez-text-input/ez-text-input.js +45 -38
- package/dist/collection/components/ez-time-input/ez-time-input.js +95 -59
- package/dist/custom-elements/index.d.ts +12 -12
- package/dist/custom-elements/index.js +1121 -810
- package/dist/esm/ez-combo-box.entry.js +63 -28
- package/dist/esm/ez-date-input.entry.js +71 -25
- package/dist/esm/ez-date-time-input.entry.js +94 -31
- package/dist/esm/ez-filter-input.entry.js +10 -4
- package/dist/esm/ez-form.entry.js +54 -9
- package/dist/esm/{grid-config.entry.js → ez-grid-config.entry.js} +6 -6
- package/dist/esm/ez-grid.entry.js +16 -9
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +69 -25
- package/dist/esm/ez-search.entry.js +20 -5
- package/dist/esm/{select-box.entry.js → ez-select-box.entry.js} +3 -3
- package/dist/esm/ez-text-area.entry.js +8 -2
- package/dist/esm/ez-text-input.entry.js +30 -21
- package/dist/esm/ez-time-input.entry.js +76 -41
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-003d53b1.entry.js +1 -0
- package/dist/ezui/p-1fecaeb8.entry.js +1 -0
- package/dist/ezui/p-267fa515.entry.js +1 -0
- package/dist/ezui/p-2acf7d59.entry.js +1 -0
- package/dist/ezui/p-403de0a4.entry.js +1 -0
- package/dist/ezui/p-4c3d136c.entry.js +1 -0
- package/dist/ezui/p-53bbba8e.entry.js +1 -0
- package/dist/ezui/p-6668c3b0.entry.js +1 -0
- package/dist/ezui/p-7fd6deec.entry.js +1 -0
- package/dist/ezui/p-8c1b9fe0.entry.js +1 -0
- package/dist/ezui/{p-be87ac5e.entry.js → p-8d73594f.entry.js} +1 -1
- package/dist/ezui/p-988ff301.entry.js +1 -0
- package/dist/ezui/p-cf56d3e8.entry.js +1 -0
- package/dist/ezui/{p-727a39e5.entry.js → p-fd6f3bf9.entry.js} +1 -1
- package/dist/ezui/p-ff7b4b13.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +13 -7
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -3
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +15 -7
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +5 -1
- package/dist/types/components/ez-form/DataBinder.d.ts +1 -1
- package/dist/types/components/ez-form/ez-form.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +9 -6
- package/dist/types/components/ez-grid/subcomponents/{gridconfig/grid-config.d.ts → ez-grid-config/ez-grid-config.d.ts} +4 -4
- package/dist/types/components/ez-grid/subcomponents/{select-box/select-box.d.ts → ez-select-box/ez-select-box.d.ts} +0 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +14 -5
- package/dist/types/components/ez-search/ez-search.d.ts +6 -1
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +7 -6
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +17 -13
- package/dist/types/components.d.ts +84 -61
- package/package.json +1 -1
- package/react/components.d.ts +2 -2
- package/react/components.js +2 -2
- package/react/components.js.map +1 -1
- package/dist/ezui/p-1859a3d8.entry.js +0 -1
- package/dist/ezui/p-49fdfa4b.entry.js +0 -1
- package/dist/ezui/p-4fdceb7d.entry.js +0 -1
- package/dist/ezui/p-6d4b1628.entry.js +0 -1
- package/dist/ezui/p-8f4fac31.entry.js +0 -1
- package/dist/ezui/p-91377c65.entry.js +0 -1
- package/dist/ezui/p-b524dfca.entry.js +0 -1
- package/dist/ezui/p-bc8aa27f.entry.js +0 -1
- package/dist/ezui/p-bea6f8a6.entry.js +0 -1
- package/dist/ezui/p-c2de757f.entry.js +0 -1
- package/dist/ezui/p-ec21ecce.entry.js +0 -1
- package/dist/ezui/p-ecee9d8d.entry.js +0 -1
- package/dist/ezui/p-fc9b9487.entry.js +0 -1
|
@@ -17,7 +17,7 @@ export default class DataBinder {
|
|
|
17
17
|
case Action.NEXT_SELECTED:
|
|
18
18
|
case Action.PREVIOUS_SELECTED:
|
|
19
19
|
(_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
|
|
20
|
-
this.updateValue(field.fieldName, field.field);
|
|
20
|
+
this.updateValue(field.fieldName, field.field, action.type === Action.EDITION_CANCELED);
|
|
21
21
|
});
|
|
22
22
|
break;
|
|
23
23
|
}
|
|
@@ -35,15 +35,24 @@ export default class DataBinder {
|
|
|
35
35
|
onDisconnectedCallback() {
|
|
36
36
|
this._dataUnit.unsubscribe(this.onDataUnitEvent);
|
|
37
37
|
}
|
|
38
|
-
updateValue(fieldName, field) {
|
|
38
|
+
updateValue(fieldName, field, actionCanceled = false) {
|
|
39
|
+
var _a;
|
|
39
40
|
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
41
|
+
/**
|
|
42
|
+
* FIXME: Campo já salvo com undefined, ao inserir valor inválido e cancelar,
|
|
43
|
+
* o campo não é limpo e atualizado automaticamente, pois o value não mudou,
|
|
44
|
+
* assim, não dispara o Watch do value, que é o responsável por limpar o errorMessage.
|
|
45
|
+
*/
|
|
46
|
+
if (actionCanceled && ((_a = field["errorMessage"]) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
47
|
+
field["errorMessage"] = "";
|
|
48
|
+
}
|
|
40
49
|
}
|
|
41
50
|
updateBind(fieldName, field) {
|
|
42
51
|
const oldBind = this._fields.get(fieldName);
|
|
43
52
|
if (oldBind) {
|
|
44
53
|
oldBind.destroy();
|
|
45
54
|
}
|
|
46
|
-
|
|
55
|
+
this.updateValue(fieldName, field);
|
|
47
56
|
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName) => this.cancelWaitingChange(fieldName), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
48
57
|
this.bindSearchOptionsLoader(fieldName, field);
|
|
49
58
|
this.applyEzUploadContext(fieldName, field);
|
|
@@ -21,25 +21,59 @@ export class EzForm {
|
|
|
21
21
|
return Promise.resolve();
|
|
22
22
|
}
|
|
23
23
|
validate() {
|
|
24
|
-
return new Promise((accept, reject) => {
|
|
24
|
+
return new Promise(async (accept, reject) => {
|
|
25
25
|
const metadata = selectFormMetadata(this._store.getState());
|
|
26
26
|
const requiredFields = this._staticFields
|
|
27
27
|
.filter(f => f.dataset.required)
|
|
28
28
|
.map(f => f.dataset.fieldName)
|
|
29
29
|
.concat(metadata.getRequiredFields());
|
|
30
|
+
let isReject = false;
|
|
30
31
|
const records = this.dataUnit.getModifiedRecords();
|
|
31
32
|
for (let i = 0; i < records.length; i++) {
|
|
32
33
|
if (!this.validateRequired(requiredFields, records[i])) {
|
|
33
|
-
|
|
34
|
+
isReject = true;
|
|
34
35
|
break;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
+
if (!isReject) {
|
|
39
|
+
const validateError = await this.validateError();
|
|
40
|
+
if (!validateError) {
|
|
41
|
+
isReject = true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (isReject) {
|
|
45
|
+
reject();
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
accept();
|
|
49
|
+
}
|
|
38
50
|
});
|
|
39
51
|
}
|
|
40
52
|
observeConfig() {
|
|
41
53
|
this.processMetadata();
|
|
42
54
|
}
|
|
55
|
+
async validateError() {
|
|
56
|
+
var _a;
|
|
57
|
+
const invalidFields = [];
|
|
58
|
+
const dataFields = (_a = this._element) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[data-field-name]");
|
|
59
|
+
if (dataFields && dataFields.length > 0) {
|
|
60
|
+
for (let i = 0; i < dataFields.length; i++) {
|
|
61
|
+
const fieldElem = dataFields[i];
|
|
62
|
+
if (fieldElem && fieldElem['isInvalid']) {
|
|
63
|
+
const hasError = await fieldElem['isInvalid']();
|
|
64
|
+
if (hasError && fieldElem['dataset']) {
|
|
65
|
+
invalidFields.push(fieldElem['dataset'].fieldName);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
;
|
|
70
|
+
}
|
|
71
|
+
const isValid = invalidFields.length === 0;
|
|
72
|
+
if (!isValid) {
|
|
73
|
+
ApplicationUtils.info("Há pelo menos um campo com conteúdo inválido.");
|
|
74
|
+
}
|
|
75
|
+
return isValid;
|
|
76
|
+
}
|
|
43
77
|
validateRequired(requiredFields, record) {
|
|
44
78
|
const invalidFields = [];
|
|
45
79
|
requiredFields.forEach(field => {
|
|
@@ -52,13 +86,16 @@ export class EzForm {
|
|
|
52
86
|
* na aba, isso será tratado no card: https://sankhya.atlassian.net/browse/SKA-44182
|
|
53
87
|
*/
|
|
54
88
|
if (fieldElem) {
|
|
89
|
+
/**
|
|
90
|
+
* Devido o StencilJS não possuir Getter e Setter, para casos que o Watch não for chamado,
|
|
91
|
+
* é necessário limpar a propriedade antes de setar o valor novamente, para que o Watch seja disparado novamente,
|
|
92
|
+
* solução necessária para controlar componentes com herança (Exemplo: EzSearch -> EzComboBox -> EzTextInput).
|
|
93
|
+
*/
|
|
94
|
+
fieldElem["errorMessage"] = "";
|
|
55
95
|
if (value === null || value === undefined || value === "") {
|
|
56
96
|
invalidFields.push(field);
|
|
57
97
|
fieldElem["errorMessage"] = "Essa informação é obrigatória";
|
|
58
98
|
}
|
|
59
|
-
else {
|
|
60
|
-
fieldElem["errorMessage"] = "";
|
|
61
|
-
}
|
|
62
99
|
}
|
|
63
100
|
});
|
|
64
101
|
const isValid = invalidFields.length === 0;
|
|
@@ -8,7 +8,7 @@ import { SortMode, UserInterface } from "@sankhyalabs/core/dist/dataunit/metadat
|
|
|
8
8
|
import { NumberUtils, StringUtils } from "@sankhyalabs/core";
|
|
9
9
|
export default class AgGridController {
|
|
10
10
|
constructor(enterprise) {
|
|
11
|
-
this.DEFAULT_ROW_HEIGHT =
|
|
11
|
+
this.DEFAULT_ROW_HEIGHT = 30;
|
|
12
12
|
this.CHECK_BOX_COL_ID = "checkBoxColumn";
|
|
13
13
|
this.RECORD_ARCHIVE_COL_ID = "__RECORD_ARCHIVE__";
|
|
14
14
|
this.BLOCK_LOAD_DEBOUNCE = 400;
|
|
@@ -71,7 +71,7 @@ export default class AgGridController {
|
|
|
71
71
|
//dos blocos, então, quando removemos uma linha, a altura do bloco não é recalculada.
|
|
72
72
|
//Descobri que setando manualmente a altura das linhas, apesar do bloco ficar com
|
|
73
73
|
//tamanho errado, isso afeta menos o componente.
|
|
74
|
-
|
|
74
|
+
getRowHeight: this.getRowHeight.bind(this)
|
|
75
75
|
};
|
|
76
76
|
this.setOptionsEvents(this._gridOptions);
|
|
77
77
|
this.setOptionsPagination(this._gridOptions);
|
|
@@ -85,8 +85,12 @@ export default class AgGridController {
|
|
|
85
85
|
this._lastPageStatus = this.getPaginationStatus();
|
|
86
86
|
//Atualiza estado da seleção inicial
|
|
87
87
|
this.onSelectionChange();
|
|
88
|
+
this._gridOptions.api.setHeaderHeight(this.getRowHeight());
|
|
88
89
|
}
|
|
89
90
|
}
|
|
91
|
+
getRowHeight() {
|
|
92
|
+
return this.DEFAULT_ROW_HEIGHT;
|
|
93
|
+
}
|
|
90
94
|
setOptionsEvents(opt) {
|
|
91
95
|
opt.onSortChanged = e => this.onCallStateChange("sort", e);
|
|
92
96
|
opt.onColumnResized = e => this.onCallStateChange("columnResize", e);
|
|
@@ -214,7 +218,7 @@ export default class AgGridController {
|
|
|
214
218
|
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
215
219
|
}
|
|
216
220
|
const colDef = this._gridOptions.columnApi.getAllColumns();
|
|
217
|
-
return colDef.map(c => {
|
|
221
|
+
return colDef.filter(c => c.getColId() !== "checkBoxColumn").map(c => {
|
|
218
222
|
const def = c.getColDef();
|
|
219
223
|
const colDef = { name: def.field, label: def.headerName };
|
|
220
224
|
this.conditionalSet(colDef, "sortable", def.sortable);
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
grid-template-rows: auto 1fr auto;
|
|
4
4
|
height: 100%;
|
|
5
5
|
width: 100%;
|
|
6
|
+
|
|
7
|
+
/*public*/
|
|
6
8
|
/*@doc Define a cor de fundo do header do componente.*/
|
|
7
9
|
--ezgrid__header--background-color: var(--background--xlight, #FFF)
|
|
8
10
|
}
|
|
@@ -22,6 +24,8 @@
|
|
|
22
24
|
box-shadow: 0 0 16px 0 rgb(0 38 111 / 12%);
|
|
23
25
|
padding-top: 15px;
|
|
24
26
|
margin-top: -12px;
|
|
27
|
+
|
|
28
|
+
/*public*/
|
|
25
29
|
background-color: var(--ezgrid__header--background-color);
|
|
26
30
|
}
|
|
27
31
|
|
|
@@ -134,6 +134,14 @@ export class EzGrid {
|
|
|
134
134
|
async hasPreviousRecord() {
|
|
135
135
|
return Promise.resolve(this._gridController.hasPreviousRecord());
|
|
136
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Método para abrir a configuração da grid.
|
|
139
|
+
*/
|
|
140
|
+
async openGridConfig() {
|
|
141
|
+
this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
|
|
142
|
+
this._gridConfig.selectedTab = "Colunas";
|
|
143
|
+
this._popUpGridConfig = true;
|
|
144
|
+
}
|
|
137
145
|
componentWillLoad() {
|
|
138
146
|
if (this.dataUnit) {
|
|
139
147
|
this._dataUnitBridge = new DataUnitBridge(this._gridController, this.dataUnit);
|
|
@@ -253,11 +261,6 @@ export class EzGrid {
|
|
|
253
261
|
closeGridConfig() {
|
|
254
262
|
this._popUpGridConfig = false;
|
|
255
263
|
}
|
|
256
|
-
openGridConfig() {
|
|
257
|
-
this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
|
|
258
|
-
this._gridConfig.selectedTab = "Colunas";
|
|
259
|
-
this._popUpGridConfig = true;
|
|
260
|
-
}
|
|
261
264
|
render() {
|
|
262
265
|
return (h(Host, null,
|
|
263
266
|
h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" },
|
|
@@ -267,7 +270,7 @@ export class EzGrid {
|
|
|
267
270
|
h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }),
|
|
268
271
|
h("div", { class: "grid__footer" }),
|
|
269
272
|
h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() },
|
|
270
|
-
h("grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.observeConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeGridConfig() }))));
|
|
273
|
+
h("ez-grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.observeConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeGridConfig() }))));
|
|
271
274
|
}
|
|
272
275
|
static get is() { return "ez-grid"; }
|
|
273
276
|
static get encapsulation() { return "scoped"; }
|
|
@@ -300,10 +303,10 @@ export class EzGrid {
|
|
|
300
303
|
"type": "unknown",
|
|
301
304
|
"mutable": true,
|
|
302
305
|
"complexType": {
|
|
303
|
-
"original": "
|
|
304
|
-
"resolved": "
|
|
306
|
+
"original": "IGridConfig",
|
|
307
|
+
"resolved": "IGridConfig",
|
|
305
308
|
"references": {
|
|
306
|
-
"
|
|
309
|
+
"IGridConfig": {
|
|
307
310
|
"location": "import",
|
|
308
311
|
"path": "./controller/EzGridController"
|
|
309
312
|
}
|
|
@@ -446,10 +449,10 @@ export class EzGrid {
|
|
|
446
449
|
"text": "Evento disparado ao realizar alguma modifica\u00E7\u00E3o na configura\u00E7\u00E3o da grid."
|
|
447
450
|
},
|
|
448
451
|
"complexType": {
|
|
449
|
-
"original": "
|
|
450
|
-
"resolved": "
|
|
452
|
+
"original": "IGridConfig",
|
|
453
|
+
"resolved": "IGridConfig",
|
|
451
454
|
"references": {
|
|
452
|
-
"
|
|
455
|
+
"IGridConfig": {
|
|
453
456
|
"location": "import",
|
|
454
457
|
"path": "./controller/EzGridController"
|
|
455
458
|
}
|
|
@@ -823,11 +826,15 @@ export class EzGrid {
|
|
|
823
826
|
"complexType": {
|
|
824
827
|
"signature": "() => Promise<void>",
|
|
825
828
|
"parameters": [],
|
|
826
|
-
"references": {
|
|
829
|
+
"references": {
|
|
830
|
+
"Promise": {
|
|
831
|
+
"location": "global"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
827
834
|
"return": "Promise<void>"
|
|
828
835
|
},
|
|
829
836
|
"docs": {
|
|
830
|
-
"text": "",
|
|
837
|
+
"text": "M\u00E9todo para abrir a configura\u00E7\u00E3o da grid.",
|
|
831
838
|
"tags": []
|
|
832
839
|
}
|
|
833
840
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
|
|
3
2
|
/*@doc Define o espaçamento utilizado no rodapé do componente.*/
|
|
4
3
|
--ez-grid-config__footer--padding-top: var(--space--medium, 12px);
|
|
5
4
|
|
|
@@ -15,8 +14,10 @@
|
|
|
15
14
|
/*@doc Define o estilo da fonte utilizada para o subtitulo do componente.*/
|
|
16
15
|
--ez-grid-config__subtitle--font-family: var(--font-pattern, "Sora");
|
|
17
16
|
|
|
17
|
+
/*@doc Define o estilo da fonte utilizada para o titulo do componente.*/
|
|
18
18
|
--ez-grid-config__title--font-family: var(--font-pattern, "Sora");
|
|
19
19
|
|
|
20
|
+
/*@doc Define o peso do texto utilizado para o titulo do componente.*/
|
|
20
21
|
--ez-grid-config__title--font-weight: var(--text-weight--large, 700);
|
|
21
22
|
|
|
22
23
|
/*@doc Define o tamanho da fonte utilizada para o subtitulo do componente.*/
|
|
@@ -26,19 +27,22 @@
|
|
|
26
27
|
--ez-grid-config__scrollbar--width: var(--space--medium, 12px);
|
|
27
28
|
|
|
28
29
|
/*@doc Define a cor da barra de rolagem do componente.*/
|
|
29
|
-
--ez-grid-
|
|
30
|
+
--ez-grid-config__scrollbar--background-color: var(--text--primary, #626e82);
|
|
30
31
|
|
|
31
32
|
/*@doc Define o raio da borda da barra de rolagem do componente.*/
|
|
32
|
-
--ez-grid-
|
|
33
|
+
--ez-grid-config__scrollbar--border-radius: var(--border--radius-medium, 12px);
|
|
33
34
|
|
|
34
35
|
/* @doc Define o estilo do texto do grupo da lista. */
|
|
35
|
-
--ez-
|
|
36
|
+
--ez-grid-config__group--font-family: var(--font-pattern, "Sora");
|
|
37
|
+
|
|
36
38
|
/* @doc Define o tamanho do texto do grupo da lista. */
|
|
37
|
-
--ez-
|
|
39
|
+
--ez-grid-config__group--font-size: var(--text--medium, 14px);
|
|
40
|
+
|
|
38
41
|
/* @doc Define o peso do texto do grupo da lista. */
|
|
39
|
-
--ez-
|
|
42
|
+
--ez-grid-config__group--font-weight: var(--text-weight--large, 600);
|
|
43
|
+
|
|
40
44
|
/* @doc Define o espaçamento inferior do grupo da lista. */
|
|
41
|
-
--ez-
|
|
45
|
+
--ez-grid-config__group--padding-bottom: var(--space-small, 6px);
|
|
42
46
|
|
|
43
47
|
display: grid;
|
|
44
48
|
grid-template-rows: auto 1fr auto;
|
|
@@ -46,6 +50,13 @@
|
|
|
46
50
|
width: 100%;
|
|
47
51
|
}
|
|
48
52
|
|
|
53
|
+
@media screen and (min-width: 480px) {
|
|
54
|
+
:host {
|
|
55
|
+
width: 359px;
|
|
56
|
+
max-width: 359px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
49
60
|
.padding-right--medium {
|
|
50
61
|
padding-right: var(--space--medium);
|
|
51
62
|
}
|
|
@@ -53,15 +64,18 @@
|
|
|
53
64
|
ez-list {
|
|
54
65
|
height: 100%;
|
|
55
66
|
}
|
|
56
|
-
|
|
67
|
+
|
|
68
|
+
.height-calc {
|
|
57
69
|
max-height: calc(100% - 24px);
|
|
58
70
|
}
|
|
59
71
|
|
|
60
72
|
.grid-config__footer {
|
|
61
|
-
padding-top: var(--ez-grid-config__footer--padding-top);
|
|
62
73
|
display: flex;
|
|
63
74
|
justify-content: flex-end;
|
|
64
75
|
width: 100%;
|
|
76
|
+
|
|
77
|
+
/*public*/
|
|
78
|
+
padding-top: var(--ez-grid-config__footer--padding-top);
|
|
65
79
|
}
|
|
66
80
|
|
|
67
81
|
.hidden {
|
|
@@ -69,15 +83,19 @@ ez-list {
|
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
.grid-config__main {
|
|
72
|
-
padding-right: var(--ez-grid-config__main--padding-right);
|
|
73
86
|
overflow-y: auto;
|
|
87
|
+
|
|
88
|
+
/*public*/
|
|
89
|
+
padding-right: var(--ez-grid-config__main--padding-right);
|
|
74
90
|
}
|
|
75
91
|
|
|
76
92
|
.tabselector-container {
|
|
93
|
+
/*public*/
|
|
77
94
|
padding: var(--ez-grid-config__tabselector-container--padding) 0;
|
|
78
95
|
}
|
|
79
96
|
|
|
80
97
|
.button-close {
|
|
98
|
+
/*public*/
|
|
81
99
|
padding-left: var(--ez-grid-config__button-close--padding-left);
|
|
82
100
|
}
|
|
83
101
|
|
|
@@ -85,10 +103,11 @@ ez-list {
|
|
|
85
103
|
display: flex;
|
|
86
104
|
justify-content: space-between;
|
|
87
105
|
align-items: center;
|
|
88
|
-
width:
|
|
106
|
+
width: 100%;
|
|
89
107
|
}
|
|
90
108
|
|
|
91
109
|
.subtitle {
|
|
110
|
+
/*public*/
|
|
92
111
|
font-family: var(--ez-grid-config__subtitle--font-family);
|
|
93
112
|
font-size: var(--ez-grid-config__subtitle--font-size);
|
|
94
113
|
color: var(--text--primary);
|
|
@@ -97,13 +116,15 @@ ez-list {
|
|
|
97
116
|
.title {
|
|
98
117
|
display: flex;
|
|
99
118
|
margin: 0;
|
|
100
|
-
font-family: var(--ez-grid-config__title--font-family);
|
|
101
|
-
font-size: var(--title--large);
|
|
102
|
-
font-weight: var(--ez-grid-config__title--font-weight);
|
|
103
119
|
line-height: normal;
|
|
104
120
|
letter-spacing: 0em;
|
|
105
121
|
text-align: left;
|
|
122
|
+
|
|
123
|
+
/*public*/
|
|
106
124
|
color: var(--title--primary);
|
|
125
|
+
font-family: var(--ez-grid-config__title--font-family);
|
|
126
|
+
font-size: var(--title--large);
|
|
127
|
+
font-weight: var(--ez-grid-config__title--font-weight);
|
|
107
128
|
}
|
|
108
129
|
|
|
109
130
|
.grid-config__main::-webkit-scrollbar-track {
|
|
@@ -111,19 +132,24 @@ ez-list {
|
|
|
111
132
|
}
|
|
112
133
|
|
|
113
134
|
.grid-config__main::-webkit-scrollbar-thumb {
|
|
114
|
-
|
|
115
|
-
|
|
135
|
+
/*public*/
|
|
136
|
+
background-color: var(--ez-grid-config__scrollbar--background-color);
|
|
137
|
+
border-radius: var(--ez-grid-config__scrollbar--border-radius);
|
|
116
138
|
}
|
|
117
139
|
|
|
118
140
|
.grid-config__main::-webkit-scrollbar {
|
|
119
141
|
background-color: #f0f2f5;
|
|
142
|
+
|
|
143
|
+
/*public*/
|
|
120
144
|
width: var(--ez-grid-config__scrollbar--width);
|
|
121
145
|
max-width: var(--ez-grid-config__scrollbar--width);
|
|
122
146
|
min-width: var(--ez-grid-config__scrollbar--width);
|
|
123
147
|
}
|
|
148
|
+
|
|
124
149
|
.group-name {
|
|
125
|
-
|
|
126
|
-
font-
|
|
127
|
-
font-
|
|
128
|
-
|
|
150
|
+
/*public*/
|
|
151
|
+
font-family: var(--ez-grid-config__group--font-family);
|
|
152
|
+
font-size: var(--ez-grid-config__group--font-size);
|
|
153
|
+
font-weight: var(--ez-grid-config__group--font-weight);
|
|
154
|
+
padding-bottom: var(--ez-grid-config__group--padding-bottom);
|
|
129
155
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StringUtils } from '@sankhyalabs/core';
|
|
2
2
|
import { Component, Event, h, Host, Prop } from '@stencil/core';
|
|
3
3
|
import ApplicationUtils from '../../../../utils/ApplicationUtils';
|
|
4
|
-
export class
|
|
4
|
+
export class EzGridConfig {
|
|
5
5
|
constructor() {
|
|
6
6
|
this._orderListItems = [];
|
|
7
7
|
this._orderPriorityList = [];
|
|
@@ -82,7 +82,7 @@ export class GridConfig {
|
|
|
82
82
|
selectedOption = item.ascending == true ? 'asc' : 'desc';
|
|
83
83
|
}
|
|
84
84
|
return (h("div", null,
|
|
85
|
-
h("select-box", { selectedOption: selectedOption, key: 'select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
|
|
85
|
+
h("ez-select-box", { selectedOption: selectedOption, key: 'ez-select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
|
|
86
86
|
}
|
|
87
87
|
updateOrder(sortOrder, updatedItemLabel) {
|
|
88
88
|
var _a;
|
|
@@ -435,18 +435,18 @@ export class GridConfig {
|
|
|
435
435
|
h("div", { class: "grid-config__main" },
|
|
436
436
|
h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }),
|
|
437
437
|
h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"),
|
|
438
|
-
h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "
|
|
438
|
+
h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: ev => this.handleOrderListChange(ev), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })),
|
|
439
439
|
h("div", { class: "grid-config__footer" },
|
|
440
440
|
h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }),
|
|
441
441
|
h("ez-button", { label: "Concluir", class: "ez-button--primary", onClick: () => this.finish() }))));
|
|
442
442
|
}
|
|
443
|
-
static get is() { return "grid-config"; }
|
|
443
|
+
static get is() { return "ez-grid-config"; }
|
|
444
444
|
static get encapsulation() { return "scoped"; }
|
|
445
445
|
static get originalStyleUrls() { return {
|
|
446
|
-
"$": ["grid-config.css"]
|
|
446
|
+
"$": ["ez-grid-config.css"]
|
|
447
447
|
}; }
|
|
448
448
|
static get styleUrls() { return {
|
|
449
|
-
"$": ["grid-config.css"]
|
|
449
|
+
"$": ["ez-grid-config.css"]
|
|
450
450
|
}; }
|
|
451
451
|
static get assetsDirs() { return ["../assets"]; }
|
|
452
452
|
static get properties() { return {
|
|
@@ -495,10 +495,10 @@ export class GridConfig {
|
|
|
495
495
|
"type": "unknown",
|
|
496
496
|
"mutable": true,
|
|
497
497
|
"complexType": {
|
|
498
|
-
"original": "
|
|
499
|
-
"resolved": "
|
|
498
|
+
"original": "IGridConfig",
|
|
499
|
+
"resolved": "IGridConfig",
|
|
500
500
|
"references": {
|
|
501
|
-
"
|
|
501
|
+
"IGridConfig": {
|
|
502
502
|
"location": "import",
|
|
503
503
|
"path": "../../controller/EzGridController"
|
|
504
504
|
}
|
|
@@ -523,10 +523,10 @@ export class GridConfig {
|
|
|
523
523
|
"text": ""
|
|
524
524
|
},
|
|
525
525
|
"complexType": {
|
|
526
|
-
"original": "
|
|
527
|
-
"resolved": "
|
|
526
|
+
"original": "IGridConfig",
|
|
527
|
+
"resolved": "IGridConfig",
|
|
528
528
|
"references": {
|
|
529
|
-
"
|
|
529
|
+
"IGridConfig": {
|
|
530
530
|
"location": "import",
|
|
531
531
|
"path": "../../controller/EzGridController"
|
|
532
532
|
}
|
|
@@ -9,13 +9,13 @@ export class SelectBox {
|
|
|
9
9
|
h("option", { value: "asc" }, "A-Z"),
|
|
10
10
|
h("option", { value: "desc" }, "Z-A")));
|
|
11
11
|
}
|
|
12
|
-
static get is() { return "select-box"; }
|
|
12
|
+
static get is() { return "ez-select-box"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
14
14
|
static get originalStyleUrls() { return {
|
|
15
|
-
"$": ["select-box.css"]
|
|
15
|
+
"$": ["ez-select-box.css"]
|
|
16
16
|
}; }
|
|
17
17
|
static get styleUrls() { return {
|
|
18
|
-
"$": ["select-box.css"]
|
|
18
|
+
"$": ["ez-select-box.css"]
|
|
19
19
|
}; }
|
|
20
20
|
static get assetsDirs() { return ["../assets"]; }
|
|
21
21
|
static get properties() { return {
|