@sankhyalabs/ezui 1.1.76 → 1.1.79
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-02db4f46.js +24 -0
- package/dist/cjs/CSSVarsUtils-66e86394.js +18 -0
- package/dist/cjs/DateUtils-716769e0.js +46 -0
- package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +26 -0
- package/dist/cjs/ez-button_3.cjs.entry.js +520 -0
- package/dist/cjs/ez-calendar_13.cjs.entry.js +2417 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +133 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +110375 -0
- package/dist/cjs/ez-icon.cjs.entry.js +30 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal_2.cjs.entry.js +370 -0
- package/dist/cjs/ez-popover.cjs.entry.js +3 -3
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +10 -28
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +3 -3
- package/dist/cjs/{index-9431aeeb.js → index-2003dec4.js} +1 -15
- package/dist/cjs/index-a2266984.js +7417 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +8 -5
- package/dist/collection/components/ez-application/ez-application.css +3 -0
- package/dist/collection/components/ez-application/ez-application.js +35 -0
- package/dist/collection/components/ez-button/ez-button.css +16 -1
- package/dist/collection/components/ez-button/ez-button.js +27 -2
- package/dist/collection/components/ez-calendar/ez-calendar.css +70 -3
- package/dist/collection/components/ez-calendar/ez-calendar.js +173 -24
- package/dist/collection/components/ez-check/ez-check.css +78 -78
- package/dist/collection/components/ez-check/ez-check.js +3 -3
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +65 -54
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +5 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css +2 -2
- package/dist/collection/components/ez-date-input/ez-date-input.js +1 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +243 -0
- package/dist/collection/components/ez-form/DataBinder.js +44 -0
- package/dist/collection/components/ez-form/ez-form.css +1 -15
- package/dist/collection/components/ez-form/ez-form.js +109 -428
- package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +45 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +11 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.js +14 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +5 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/FileInput.tpl.js +5 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.js +13 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +5 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/TextArea.tpl.js +5 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/TextInput.tpl.js +5 -0
- package/dist/collection/components/ez-form/store/form.slice.js +38 -0
- package/dist/collection/components/ez-form/structure/FormItem.js +11 -0
- package/dist/collection/components/ez-form/structure/FormSheet.js +5 -0
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +86 -0
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
- package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
- package/dist/collection/components/ez-grid/ez-grid.css +15 -0
- package/dist/collection/components/ez-grid/ez-grid.js +414 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
- package/dist/collection/components/ez-icon/ez-icon.css +1 -1
- package/dist/collection/components/ez-list/ez-list.css +227 -44
- package/dist/collection/components/ez-list/ez-list.js +529 -149
- package/dist/collection/components/ez-modal/ez-modal.css +4 -4
- package/dist/collection/components/ez-modal/ez-modal.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.css +1 -165
- package/dist/collection/components/ez-number-input/ez-number-input.js +53 -339
- package/dist/collection/components/ez-popover/ez-popover.css +10 -6
- package/dist/collection/components/ez-popup/ez-popup.css +25 -27
- package/dist/collection/components/ez-search/ez-search.js +6 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
- package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +1 -0
- package/dist/collection/components/ez-upload/ez-upload.js +3 -3
- package/dist/collection/components/test-du/test-du.css +3 -0
- package/dist/collection/components/test-du/test-du.js +87 -0
- package/dist/collection/servidor.js +94 -94
- package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
- package/dist/collection/utils/CSSVarsUtils.js +6 -6
- package/dist/custom-elements/index.d.ts +32 -14
- package/dist/custom-elements/index.js +119419 -3209
- package/dist/esm/AssetsUtils-76ca41e1.js +22 -0
- package/dist/esm/CSSVarsUtils-aeee9825.js +16 -0
- package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +22 -0
- package/dist/esm/ez-button_3.entry.js +514 -0
- package/dist/esm/ez-calendar_13.entry.js +2401 -0
- package/dist/esm/ez-date-time-input.entry.js +129 -0
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +110371 -0
- package/dist/esm/ez-icon.entry.js +26 -0
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-modal_2.entry.js +365 -0
- package/dist/esm/ez-popover.entry.js +3 -3
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-time-input.entry.js +4 -22
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/{index-fd3c8023.js → index-077c7fcf.js} +1 -15
- package/dist/esm/index-afe19542.js +7410 -0
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-00b837e2.js +1 -0
- package/dist/ezui/{p-a0b6eee2.entry.js → p-0a2056d9.entry.js} +1 -1
- package/dist/ezui/p-0d8368fc.entry.js +1 -0
- package/dist/ezui/p-1e36e3ff.entry.js +1 -0
- package/dist/ezui/p-446ec85b.js +1 -0
- package/dist/ezui/p-5509ee41.entry.js +369 -0
- package/dist/ezui/{p-d443f020.entry.js → p-57ea4b84.entry.js} +1 -1
- package/dist/ezui/{p-66954a04.entry.js → p-6d157776.entry.js} +1 -1
- package/dist/ezui/p-7a1f2e0e.entry.js +1 -0
- package/dist/ezui/p-7de3c95d.js +1 -0
- package/dist/ezui/p-857ead8e.entry.js +1 -0
- package/dist/ezui/p-8b099482.js +1 -0
- package/dist/ezui/p-920bb8c9.entry.js +1 -0
- package/dist/ezui/p-9be02ecf.entry.js +1 -0
- package/dist/ezui/p-a4a39579.entry.js +1 -0
- package/dist/ezui/p-c89629eb.js +1 -0
- package/dist/ezui/p-d5699f29.entry.js +1 -0
- package/dist/ezui/p-d64a3939.entry.js +1 -0
- package/dist/ezui/{p-823ff0a0.entry.js → p-da31cd21.entry.js} +1 -1
- package/dist/types/components/ez-application/ez-application.d.ts +10 -0
- package/dist/types/components/ez-button/ez-button.d.ts +5 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +21 -0
- package/dist/types/components/ez-check/ez-check.d.ts +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +10 -0
- package/dist/types/components/ez-form/ez-form.d.ts +24 -32
- package/dist/types/components/ez-form/fieldbuilder/FieldBuilder.d.ts +2 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.d.ts +3 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/FileInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +8 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/TextArea.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/TextInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/store/form.slice.d.ts +24 -0
- package/dist/types/components/ez-form/structure/FormItem.d.ts +9 -0
- package/dist/types/components/ez-form/structure/FormSheet.d.ts +9 -0
- package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +27 -0
- package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
- package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
- package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
- package/dist/types/components/ez-list/ez-list.d.ts +70 -17
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +29 -63
- package/dist/types/components/ez-search/ez-search.d.ts +2 -0
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
- package/dist/types/components/test-du/test-du.d.ts +12 -0
- package/dist/types/components.d.ts +271 -175
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
- package/dist/types/utils/CSSVarsUtils.d.ts +1 -1
- package/package.json +10 -8
- package/react/components.d.ts +6 -3
- package/react/components.js +6 -3
- package/react/components.js.map +1 -1
- package/dist/cjs/CSSVarsUtils-f8827674.js +0 -18
- package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
- package/dist/cjs/ez-button_16.cjs.entry.js +0 -4079
- package/dist/cjs/ez-list.cjs.entry.js +0 -174
- package/dist/cjs/ez-modal.cjs.entry.js +0 -65
- package/dist/cjs/ez-number-input.cjs.entry.js +0 -250
- package/dist/collection/components/ez-form/assets/trash-can-outline.svg +0 -3
- package/dist/collection/components/ez-form/store/Form.actions.js +0 -132
- package/dist/collection/components/ez-form/store/Form.reducer.js +0 -194
- package/dist/collection/components/ez-form/store/Form.selectors.js +0 -44
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +0 -301
- package/dist/collection/components/ez-form/subcomponents/FormMetadata.js +0 -8
- package/dist/collection/components/ez-form/subcomponents/css/place-holder.css +0 -24
- package/dist/collection/components/ez-form/subcomponents/form-metadata.js +0 -227
- package/dist/collection/components/ez-form/subcomponents/place-holder.js +0 -14
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +0 -95
- package/dist/collection/components/ez-form/subcomponents/structure/FieldSet.js +0 -27
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +0 -41
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +0 -37
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
- package/dist/esm/CSSVarsUtils-e0128b01.js +0 -16
- package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
- package/dist/esm/ez-button_16.entry.js +0 -4060
- package/dist/esm/ez-list.entry.js +0 -170
- package/dist/esm/ez-modal.entry.js +0 -61
- package/dist/esm/ez-number-input.entry.js +0 -246
- package/dist/ezui/assets/trash-can-outline.svg +0 -3
- package/dist/ezui/p-11ae4ae7.entry.js +0 -1
- package/dist/ezui/p-47fa3d6c.entry.js +0 -1
- package/dist/ezui/p-8ab6168f.entry.js +0 -1
- package/dist/ezui/p-9c1fb51c.entry.js +0 -1
- package/dist/ezui/p-9d85125b.entry.js +0 -1
- package/dist/ezui/p-9dfccb16.js +0 -1
- package/dist/ezui/p-a7b546b2.entry.js +0 -1
- package/dist/ezui/p-c833c94f.entry.js +0 -1
- package/dist/ezui/p-d1889704.js +0 -1
- package/dist/ezui/p-e0ab3746.js +0 -1
- package/dist/types/components/ez-form/store/Form.actions.d.ts +0 -111
- package/dist/types/components/ez-form/store/Form.reducer.d.ts +0 -20
- package/dist/types/components/ez-form/store/Form.selectors.d.ts +0 -14
- package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +0 -91
- package/dist/types/components/ez-form/subcomponents/FormMetadata.d.ts +0 -24
- package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +0 -16
- package/dist/types/components/ez-form/subcomponents/place-holder.d.ts +0 -3
- package/dist/types/components/ez-form/subcomponents/structure/Field.d.ts +0 -11
- package/dist/types/components/ez-form/subcomponents/structure/FieldSet.d.ts +0 -13
- package/dist/types/components/ez-form/subcomponents/structure/FormSheet.d.ts +0 -14
- package/dist/types/components/ez-form/subcomponents/structure/NavigationBar.d.ts +0 -19
- package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { Component, h, Host, Prop, Method, Event, State } from "@stencil/core";
|
|
2
|
+
import AgGridController from "./controller/ag-grid/AgGridController";
|
|
3
|
+
import { getSpritePath } from "../../utils/AssetsUtils";
|
|
4
|
+
import DataUnitBridge from "./controller/DataUnitBridge";
|
|
5
|
+
export class EzGrid {
|
|
6
|
+
constructor() {
|
|
7
|
+
this._gridController = new AgGridController(false);
|
|
8
|
+
this._popUpVisible = false;
|
|
9
|
+
/**
|
|
10
|
+
* Determina o número de linhas de cada página. Caso informado o valor -1
|
|
11
|
+
* não haverá paginação.
|
|
12
|
+
*/
|
|
13
|
+
this.pageSize = -1;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Método responsável por receber a definição das colunas
|
|
17
|
+
*/
|
|
18
|
+
async setColumnsDef(cols) {
|
|
19
|
+
this._gridController.setColumnsDef(cols, this.multipleSelection);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Adiciona item de menu nas colunas.
|
|
23
|
+
*/
|
|
24
|
+
async addColumnMenuItem(label, name, action) {
|
|
25
|
+
this._gridController.addColumnMenuItem({ label, name, action });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Método responsável por aplicar estado pré-existente nas colunas do grid.
|
|
29
|
+
*/
|
|
30
|
+
async setColumnsState(state) {
|
|
31
|
+
this._gridController.setColumnsState(state);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Método de carga dos registros. Os objetos deste array devem conter atributos
|
|
35
|
+
* para as colunas desejadas.
|
|
36
|
+
*/
|
|
37
|
+
async setData(data) {
|
|
38
|
+
this._gridController.setData(data);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Retorna as linhas selecionadas na grade.
|
|
42
|
+
*/
|
|
43
|
+
async getSelection() {
|
|
44
|
+
return Promise.resolve(this._gridController.getSelection());
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Método retornar o estado atual das colunas do grid.
|
|
48
|
+
*/
|
|
49
|
+
async getColumnsState() {
|
|
50
|
+
return Promise.resolve(this._gridController.getColumnsState());
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Método retornar o estado atual das colunas do grid.
|
|
54
|
+
*/
|
|
55
|
+
async getColumns() {
|
|
56
|
+
return Promise.resolve(this._gridController.getColumnsDef());
|
|
57
|
+
}
|
|
58
|
+
componentWillLoad() {
|
|
59
|
+
if (this.dataUnit) {
|
|
60
|
+
this._dataUnitBridge = new DataUnitBridge(this._gridController, this.dataUnit);
|
|
61
|
+
addEventListener("ezSelectionChange", (evt) => this.dataUnit.setSelection(evt.detail.map((r) => r.__record__id__)));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
componentDidLoad() {
|
|
65
|
+
this._gridController.initDatagrid(this._container, {
|
|
66
|
+
onColumnStateChange: (type, state) => this.ezColumnStateChange.emit({ type, state }),
|
|
67
|
+
onSelectionChange: (selection) => this.ezSelectionChange.emit(selection),
|
|
68
|
+
onPaginationChange: (status) => {
|
|
69
|
+
this._navigationHasPrevious = status.hasPrevious;
|
|
70
|
+
this._navigationHasNext = status.hasNext;
|
|
71
|
+
this._navigationFirstRow = status.pageStart;
|
|
72
|
+
this._navigationLastRow = status.pageEnd;
|
|
73
|
+
this._navigationTotalRows = status.totalRows;
|
|
74
|
+
},
|
|
75
|
+
allowMultipleSelection: this.multipleSelection,
|
|
76
|
+
pageSize: this.pageSize,
|
|
77
|
+
serverURL: this.serverUrl,
|
|
78
|
+
dataUnit: this.dataUnit
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
getPaginationControl() {
|
|
82
|
+
if (this.pageSize === -1) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
return [
|
|
86
|
+
h("div", { class: "text text--primary text--medium margin-right--medium" },
|
|
87
|
+
h("strong", { class: "text text--primary text--medium" }, `${this._navigationFirstRow}-${this._navigationLastRow}`),
|
|
88
|
+
` de ${this._navigationTotalRows}`),
|
|
89
|
+
h("ez-button", { size: "small", image: getSpritePath("chevron-left"), class: "button--secondary margin-right--medium", mode: "icon", enabled: this._navigationHasPrevious, onClick: () => this._gridController.previousPage(), label: "P\u00E1gina anterior" }),
|
|
90
|
+
h("ez-button", { size: "small", image: getSpritePath("chevron-right"), class: "button--secondary margin-right--medium", mode: "icon", enabled: this._navigationHasNext, onClick: () => this._gridController.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
applyConfig(cols) {
|
|
94
|
+
this._gridController.setColumnsState(cols);
|
|
95
|
+
this.closeConfig();
|
|
96
|
+
}
|
|
97
|
+
closeConfig() {
|
|
98
|
+
this._popUpVisible = false;
|
|
99
|
+
}
|
|
100
|
+
openConfig() {
|
|
101
|
+
this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
|
|
102
|
+
this._gridConfig.selectedTab = "Colunas";
|
|
103
|
+
this._popUpVisible = true;
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
return (h(Host, null,
|
|
107
|
+
h("div", { class: "box box--shadow padding--medium grid__header margin-bottom--small" },
|
|
108
|
+
this.getPaginationControl(),
|
|
109
|
+
h("ez-button", { size: "small", image: getSpritePath("settings"), class: "button--secondary", mode: "icon", onClick: () => { this.openConfig(); } })),
|
|
110
|
+
h("div", { class: "grid__container ag-sankhya-theme", ref: elem => this._container = elem }),
|
|
111
|
+
h("div", { class: "grid__footer" }),
|
|
112
|
+
h("ez-modal", { modalSize: "small", closeEsc: true, closeOutsideClick: true, opened: this._popUpVisible, onEzCloseModal: () => this._popUpVisible = false },
|
|
113
|
+
h("grid-config", { ref: ref => this._gridConfig = ref, selectedTab: "Colunas", onConfigFinish: evt => this.applyConfig(evt.detail), onConfigCancel: _evt => this.closeConfig() }))));
|
|
114
|
+
}
|
|
115
|
+
static get is() { return "ez-grid"; }
|
|
116
|
+
static get originalStyleUrls() { return {
|
|
117
|
+
"$": ["ez-grid.css"]
|
|
118
|
+
}; }
|
|
119
|
+
static get styleUrls() { return {
|
|
120
|
+
"$": ["ez-grid.css"]
|
|
121
|
+
}; }
|
|
122
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
123
|
+
static get properties() { return {
|
|
124
|
+
"multipleSelection": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "boolean",
|
|
129
|
+
"resolved": "boolean",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": "Habilita a sele\u00E7\u00E3o de v\u00E1rias linhas"
|
|
137
|
+
},
|
|
138
|
+
"attribute": "multiple-selection",
|
|
139
|
+
"reflect": false
|
|
140
|
+
},
|
|
141
|
+
"pageSize": {
|
|
142
|
+
"type": "number",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "number",
|
|
146
|
+
"resolved": "number",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "Determina o n\u00FAmero de linhas de cada p\u00E1gina. Caso informado o valor -1\nn\u00E3o haver\u00E1 pagina\u00E7\u00E3o."
|
|
154
|
+
},
|
|
155
|
+
"attribute": "page-size",
|
|
156
|
+
"reflect": false,
|
|
157
|
+
"defaultValue": "-1"
|
|
158
|
+
},
|
|
159
|
+
"serverUrl": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"mutable": false,
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "string",
|
|
164
|
+
"resolved": "string",
|
|
165
|
+
"references": {}
|
|
166
|
+
},
|
|
167
|
+
"required": false,
|
|
168
|
+
"optional": false,
|
|
169
|
+
"docs": {
|
|
170
|
+
"tags": [],
|
|
171
|
+
"text": "Endere\u00E7o do servidor. Se informado, o pr\u00F3prio datagrid controlar\u00E1 a obten\u00E7\u00E3o\ndos dados, anulando a necessidade de acionar o m\u00E9todo \"setData(data)\""
|
|
172
|
+
},
|
|
173
|
+
"attribute": "server-url",
|
|
174
|
+
"reflect": false
|
|
175
|
+
},
|
|
176
|
+
"dataUnit": {
|
|
177
|
+
"type": "unknown",
|
|
178
|
+
"mutable": false,
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "DataUnit",
|
|
181
|
+
"resolved": "DataUnit",
|
|
182
|
+
"references": {
|
|
183
|
+
"DataUnit": {
|
|
184
|
+
"location": "import",
|
|
185
|
+
"path": "@sankhyalabs/core"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": ""
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}; }
|
|
197
|
+
static get states() { return {
|
|
198
|
+
"_navigationHasPrevious": {},
|
|
199
|
+
"_navigationHasNext": {},
|
|
200
|
+
"_navigationFirstRow": {},
|
|
201
|
+
"_navigationLastRow": {},
|
|
202
|
+
"_navigationTotalRows": {},
|
|
203
|
+
"_popUpVisible": {}
|
|
204
|
+
}; }
|
|
205
|
+
static get events() { return [{
|
|
206
|
+
"method": "ezColumnStateChange",
|
|
207
|
+
"name": "ezColumnStateChange",
|
|
208
|
+
"bubbles": true,
|
|
209
|
+
"cancelable": true,
|
|
210
|
+
"composed": true,
|
|
211
|
+
"docs": {
|
|
212
|
+
"tags": [],
|
|
213
|
+
"text": "Evento disparado ao mudar o estado das colunas do grid. Ordena\u00E7\u00E3o, largura, etc."
|
|
214
|
+
},
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "EzGridColumStateEvent",
|
|
217
|
+
"resolved": "EzGridColumStateEvent",
|
|
218
|
+
"references": {
|
|
219
|
+
"EzGridColumStateEvent": {
|
|
220
|
+
"location": "import",
|
|
221
|
+
"path": "./controller/EzGridController"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}, {
|
|
226
|
+
"method": "ezSelectionChange",
|
|
227
|
+
"name": "ezSelectionChange",
|
|
228
|
+
"bubbles": true,
|
|
229
|
+
"cancelable": true,
|
|
230
|
+
"composed": true,
|
|
231
|
+
"docs": {
|
|
232
|
+
"tags": [],
|
|
233
|
+
"text": "Evento disparado ao selecionar linhas da grade."
|
|
234
|
+
},
|
|
235
|
+
"complexType": {
|
|
236
|
+
"original": "Array<any>",
|
|
237
|
+
"resolved": "any[]",
|
|
238
|
+
"references": {
|
|
239
|
+
"Array": {
|
|
240
|
+
"location": "global"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}]; }
|
|
245
|
+
static get methods() { return {
|
|
246
|
+
"setColumnsDef": {
|
|
247
|
+
"complexType": {
|
|
248
|
+
"signature": "(cols: Array<EzGridColumn>) => Promise<any>",
|
|
249
|
+
"parameters": [{
|
|
250
|
+
"tags": [],
|
|
251
|
+
"text": ""
|
|
252
|
+
}],
|
|
253
|
+
"references": {
|
|
254
|
+
"Promise": {
|
|
255
|
+
"location": "global"
|
|
256
|
+
},
|
|
257
|
+
"Array": {
|
|
258
|
+
"location": "global"
|
|
259
|
+
},
|
|
260
|
+
"EzGridColumn": {
|
|
261
|
+
"location": "import",
|
|
262
|
+
"path": "./controller/EzGridController"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"return": "Promise<any>"
|
|
266
|
+
},
|
|
267
|
+
"docs": {
|
|
268
|
+
"text": "M\u00E9todo respons\u00E1vel por receber a defini\u00E7\u00E3o das colunas",
|
|
269
|
+
"tags": []
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"addColumnMenuItem": {
|
|
273
|
+
"complexType": {
|
|
274
|
+
"signature": "(label: string, name: string, action: Function) => Promise<any>",
|
|
275
|
+
"parameters": [{
|
|
276
|
+
"tags": [],
|
|
277
|
+
"text": ""
|
|
278
|
+
}, {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": ""
|
|
281
|
+
}, {
|
|
282
|
+
"tags": [],
|
|
283
|
+
"text": ""
|
|
284
|
+
}],
|
|
285
|
+
"references": {
|
|
286
|
+
"Promise": {
|
|
287
|
+
"location": "global"
|
|
288
|
+
},
|
|
289
|
+
"Function": {
|
|
290
|
+
"location": "global"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"return": "Promise<any>"
|
|
294
|
+
},
|
|
295
|
+
"docs": {
|
|
296
|
+
"text": "Adiciona item de menu nas colunas.",
|
|
297
|
+
"tags": []
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"setColumnsState": {
|
|
301
|
+
"complexType": {
|
|
302
|
+
"signature": "(state: Array<EzGridColumn>) => Promise<any>",
|
|
303
|
+
"parameters": [{
|
|
304
|
+
"tags": [],
|
|
305
|
+
"text": ""
|
|
306
|
+
}],
|
|
307
|
+
"references": {
|
|
308
|
+
"Promise": {
|
|
309
|
+
"location": "global"
|
|
310
|
+
},
|
|
311
|
+
"Array": {
|
|
312
|
+
"location": "global"
|
|
313
|
+
},
|
|
314
|
+
"EzGridColumn": {
|
|
315
|
+
"location": "import",
|
|
316
|
+
"path": "./controller/EzGridController"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"return": "Promise<any>"
|
|
320
|
+
},
|
|
321
|
+
"docs": {
|
|
322
|
+
"text": "M\u00E9todo respons\u00E1vel por aplicar estado pr\u00E9-existente nas colunas do grid.",
|
|
323
|
+
"tags": []
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"setData": {
|
|
327
|
+
"complexType": {
|
|
328
|
+
"signature": "(data: Array<any>) => Promise<any>",
|
|
329
|
+
"parameters": [{
|
|
330
|
+
"tags": [],
|
|
331
|
+
"text": ""
|
|
332
|
+
}],
|
|
333
|
+
"references": {
|
|
334
|
+
"Promise": {
|
|
335
|
+
"location": "global"
|
|
336
|
+
},
|
|
337
|
+
"Array": {
|
|
338
|
+
"location": "global"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"return": "Promise<any>"
|
|
342
|
+
},
|
|
343
|
+
"docs": {
|
|
344
|
+
"text": "M\u00E9todo de carga dos registros. Os objetos deste array devem conter atributos\npara as colunas desejadas.",
|
|
345
|
+
"tags": []
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"getSelection": {
|
|
349
|
+
"complexType": {
|
|
350
|
+
"signature": "() => Promise<Array<any>>",
|
|
351
|
+
"parameters": [],
|
|
352
|
+
"references": {
|
|
353
|
+
"Promise": {
|
|
354
|
+
"location": "global"
|
|
355
|
+
},
|
|
356
|
+
"Array": {
|
|
357
|
+
"location": "global"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"return": "Promise<any[]>"
|
|
361
|
+
},
|
|
362
|
+
"docs": {
|
|
363
|
+
"text": "Retorna as linhas selecionadas na grade.",
|
|
364
|
+
"tags": []
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"getColumnsState": {
|
|
368
|
+
"complexType": {
|
|
369
|
+
"signature": "() => Promise<Array<EzGridColumn>>",
|
|
370
|
+
"parameters": [],
|
|
371
|
+
"references": {
|
|
372
|
+
"Promise": {
|
|
373
|
+
"location": "global"
|
|
374
|
+
},
|
|
375
|
+
"EzGridColumn": {
|
|
376
|
+
"location": "import",
|
|
377
|
+
"path": "./controller/EzGridController"
|
|
378
|
+
},
|
|
379
|
+
"Array": {
|
|
380
|
+
"location": "global"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"return": "Promise<EzGridColumn[]>"
|
|
384
|
+
},
|
|
385
|
+
"docs": {
|
|
386
|
+
"text": "M\u00E9todo retornar o estado atual das colunas do grid.",
|
|
387
|
+
"tags": []
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"getColumns": {
|
|
391
|
+
"complexType": {
|
|
392
|
+
"signature": "() => Promise<Array<EzGridColumn>>",
|
|
393
|
+
"parameters": [],
|
|
394
|
+
"references": {
|
|
395
|
+
"Promise": {
|
|
396
|
+
"location": "global"
|
|
397
|
+
},
|
|
398
|
+
"EzGridColumn": {
|
|
399
|
+
"location": "import",
|
|
400
|
+
"path": "./controller/EzGridController"
|
|
401
|
+
},
|
|
402
|
+
"Array": {
|
|
403
|
+
"location": "global"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"return": "Promise<EzGridColumn[]>"
|
|
407
|
+
},
|
|
408
|
+
"docs": {
|
|
409
|
+
"text": "M\u00E9todo retornar o estado atual das colunas do grid.",
|
|
410
|
+
"tags": []
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}; }
|
|
414
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
|
|
3
|
+
/*@doc Define o espaçamento utilizado no rodapé do componente.*/
|
|
4
|
+
--ez-grid-config__footer--padding-top: var(--space--medium, 12px);
|
|
5
|
+
|
|
6
|
+
/*@doc Define o espaçamento utilizado no centro do componente.*/
|
|
7
|
+
--ez-grid-config__main--padding-right: var(--space--medium, 12px);
|
|
8
|
+
|
|
9
|
+
/*@doc Define o espaçamento utilizado no seletor de abas do componente.*/
|
|
10
|
+
--ez-grid-config__tabselector-container--padding: var(--space--medium, 12px);
|
|
11
|
+
|
|
12
|
+
/*@doc Define o espaçamento utilizado à esquerda do botão de fechar do componente.*/
|
|
13
|
+
--ez-grid-config__button-close--padding-left: var(--space--medium, 12px);
|
|
14
|
+
|
|
15
|
+
/*@doc Define o estilo da fonte utilizada para o subtitulo do componente.*/
|
|
16
|
+
--ez-grid-config__subtitle--font-family: var(--font-pattern, "Sora");
|
|
17
|
+
|
|
18
|
+
--ez-grid-config__title--font-family: var(--font-pattern, "Sora");
|
|
19
|
+
|
|
20
|
+
--ez-grid-config__title--font-weight: var(--text-weight--large, 14px);
|
|
21
|
+
|
|
22
|
+
/*@doc Define o tamanho da fonte utilizada para o subtitulo do componente.*/
|
|
23
|
+
--ez-grid-config__subtitle--font-size: var(--text--medium, 14px);
|
|
24
|
+
|
|
25
|
+
/*@doc Define a largura da barra de rolagem do componente.*/
|
|
26
|
+
--ez-grid-config__scrollbar--width: var(--space--medium, 12px);
|
|
27
|
+
|
|
28
|
+
/*@doc Define a cor da barra de rolagem do componente.*/
|
|
29
|
+
--ez-grid-config__main__scrollbar--background-color: var(--text--primary, #626e82);
|
|
30
|
+
|
|
31
|
+
/*@doc Define o raio da borda da barra de rolagem do componente.*/
|
|
32
|
+
--ez-grid-config__main__scrollbar--border-radius: var(--border--radius-medium, 12px);
|
|
33
|
+
|
|
34
|
+
display: grid;
|
|
35
|
+
grid-template-rows: auto 1fr auto;
|
|
36
|
+
max-height: 100%;
|
|
37
|
+
width: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.padding-right--medium {
|
|
41
|
+
padding-right: var(--space--medium);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
ez-list {
|
|
45
|
+
height: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.grid-config__footer {
|
|
49
|
+
padding-top: var(--ez-grid-config__footer--padding-top);
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: flex-end;
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.hidden {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.grid-config__main {
|
|
60
|
+
padding-right: var(--ez-grid-config__main--padding-right);
|
|
61
|
+
overflow-y: auto;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.tabselector-container {
|
|
65
|
+
padding: var(--ez-grid-config__tabselector-container--padding) 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.button-close {
|
|
69
|
+
padding-left: var(--ez-grid-config__button-close--padding-left);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.title-container {
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
align-items: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.subtitle {
|
|
79
|
+
font-family: var(--ez-grid-config__subtitle--font-family);
|
|
80
|
+
font-size: var(--ez-grid-config__subtitle--font-size);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.title {
|
|
84
|
+
display: flex;
|
|
85
|
+
font-family: var(--ez-grid-config__title--font-family);
|
|
86
|
+
margin: 0;
|
|
87
|
+
font-weight: var(--ez-grid-config__title--font-weight);
|
|
88
|
+
line-height: 1.3;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.grid-config__main::-webkit-scrollbar-track {
|
|
92
|
+
background-color: #f0f2f5;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.grid-config__main::-webkit-scrollbar-thumb {
|
|
96
|
+
background-color: var(--ez-grid-config__main__scrollbar--background-color);
|
|
97
|
+
border-radius: var(--ez-grid-config__main__scrollbar--border-radius);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.grid-config__main::-webkit-scrollbar {
|
|
101
|
+
background-color: #f0f2f5;
|
|
102
|
+
width: var(--ez-grid-config__scrollbar--width);
|
|
103
|
+
max-width: var(--ez-grid-config__scrollbar--width);
|
|
104
|
+
min-width: var(--ez-grid-config__scrollbar--width);
|
|
105
|
+
}
|