@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-50898.1 → 0.0.0-bugfix-dev-59880.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ICustomRender-6fafffce.js +13 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -0
- package/dist/cjs/ez-alert-list.cjs.entry.js +11 -1
- package/dist/cjs/ez-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -0
- package/dist/cjs/{ez-text-edit.cjs.entry.js → ez-custom-form-input_2.cjs.entry.js} +86 -0
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +36 -4
- package/dist/cjs/ez-form.cjs.entry.js +51 -2
- package/dist/cjs/ez-grid.cjs.entry.js +322 -19
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +15 -4
- package/dist/cjs/ez-modal.cjs.entry.js +7 -8
- package/dist/cjs/ez-number-input.cjs.entry.js +9 -2
- package/dist/cjs/ez-popup.cjs.entry.js +14 -8
- package/dist/cjs/ez-search.cjs.entry.js +6 -2
- package/dist/cjs/ez-split-item.cjs.entry.js +3 -2
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +11 -1
- package/dist/collection/components/ez-button/ez-button.css +7 -0
- package/dist/collection/components/ez-button/ez-button.js +1 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +1 -0
- package/dist/collection/components/ez-form/ez-form.js +130 -4
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +245 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js +92 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +3 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +62 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +35 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +58 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js +40 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js +11 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js +11 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +6 -3
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js +40 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js +1 -0
- package/dist/collection/components/ez-grid/ez-grid.js +206 -2
- package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js +1 -0
- package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
- package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +3 -11
- package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js +22 -0
- package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js +19 -0
- package/dist/collection/components/ez-list/ez-list.css +6 -2
- package/dist/collection/components/ez-modal/ez-modal.js +22 -9
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +4 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +23 -3
- package/dist/collection/components/ez-number-input/ez-number-input.js +12 -1
- package/dist/collection/components/ez-popup/ez-popup.js +14 -8
- package/dist/collection/components/ez-search/ez-search.js +5 -2
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +0 -7
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +1 -1
- package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js +5 -0
- package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js +1 -0
- package/dist/collection/utils/customRender/interfaces/ICustomRender.js +5 -0
- package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js +1 -0
- package/dist/collection/utils/index.js +2 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +580 -61
- package/dist/esm/ICustomRender-875b5a40.js +13 -0
- package/dist/esm/ez-actions-button.entry.js +1 -0
- package/dist/esm/ez-alert-list.entry.js +11 -1
- package/dist/esm/ez-button.entry.js +2 -2
- package/dist/esm/ez-collapsible-box.entry.js +1 -0
- package/dist/esm/ez-combo-box.entry.js +1 -0
- package/dist/esm/{ez-text-edit.entry.js → ez-custom-form-input_2.entry.js} +88 -3
- package/dist/esm/ez-date-input.entry.js +1 -0
- package/dist/esm/ez-form-view.entry.js +36 -4
- package/dist/esm/ez-form.entry.js +51 -2
- package/dist/esm/ez-grid.entry.js +322 -19
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +16 -5
- package/dist/esm/ez-modal.entry.js +9 -10
- package/dist/esm/ez-number-input.entry.js +9 -2
- package/dist/esm/ez-popup.entry.js +15 -9
- package/dist/esm/ez-search.entry.js +6 -2
- package/dist/esm/ez-split-item.entry.js +3 -2
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-09de35a2.entry.js +1 -0
- package/dist/ezui/p-13d2fe2d.entry.js +1 -0
- package/dist/ezui/{p-384247cd.entry.js → p-1f96ba9a.entry.js} +2 -2
- package/dist/ezui/p-204b1439.entry.js +1 -0
- package/dist/ezui/p-2b8da3a4.entry.js +1 -0
- package/dist/ezui/p-30775e7f.entry.js +1 -0
- package/dist/ezui/p-4607fb89.js +1 -0
- package/dist/ezui/{p-2a1a0e04.entry.js → p-77362d3a.entry.js} +1 -1
- package/dist/ezui/{p-8defa6d3.entry.js → p-786559c5.entry.js} +1 -1
- package/dist/ezui/p-7922142b.entry.js +1 -0
- package/dist/ezui/p-84e439b9.entry.js +1 -0
- package/dist/ezui/p-922ac38b.entry.js +1 -0
- package/dist/ezui/p-bae4e180.entry.js +1 -0
- package/dist/ezui/p-bcb53f27.entry.js +1 -0
- package/dist/ezui/p-c942e4a7.entry.js +1 -0
- package/dist/ezui/p-d9401ea0.entry.js +1 -0
- package/dist/ezui/p-e90dd4eb.entry.js +1 -0
- package/dist/ezui/p-f3c526cc.entry.js +1 -0
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +5 -0
- package/dist/types/components/ez-form/ez-form.d.ts +20 -1
- package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +41 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +29 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +19 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +14 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +15 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellRender.d.ts +10 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +30 -1
- package/dist/types/components/ez-grid/interfaces/ICustomFormatter.d.ts +5 -0
- package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
- package/dist/types/components/ez-grid/subcomponents/utils/selectionCounterUtils.d.ts +4 -0
- package/dist/types/components/ez-grid/test/resources/gridDataUnit.d.ts +2 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +9 -1
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +3 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +1 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +3 -3
- package/dist/types/components.d.ts +124 -4
- package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +29 -0
- package/dist/types/utils/customEditor/interfaces/ICustomEditorInfo.d.ts +5 -0
- package/dist/types/utils/customRender/interfaces/ICustomRender.d.ts +29 -0
- package/dist/types/utils/customRender/interfaces/ICustomRenderInfo.d.ts +5 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-0447d17c.entry.js +0 -1
- package/dist/ezui/p-20ec22c0.entry.js +0 -1
- package/dist/ezui/p-5e1d036e.entry.js +0 -1
- package/dist/ezui/p-701231f0.entry.js +0 -1
- package/dist/ezui/p-7a636dfc.entry.js +0 -1
- package/dist/ezui/p-99ead599.entry.js +0 -1
- package/dist/ezui/p-9aefaa52.entry.js +0 -1
- package/dist/ezui/p-9f1e89c9.entry.js +0 -1
- package/dist/ezui/p-a1ec32ef.entry.js +0 -1
- package/dist/ezui/p-b041333c.entry.js +0 -1
- package/dist/ezui/p-b567fa8c.entry.js +0 -1
- package/dist/ezui/p-bae3d0aa.entry.js +0 -1
- package/dist/ezui/p-db77a984.entry.js +0 -1
- package/dist/ezui/p-e228ccb9.entry.js +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ICustomEditor } from '../../../utils/customEditor/interfaces/ICustomEditor';
|
|
2
|
+
import { IFormViewField } from '../interfaces';
|
|
3
|
+
export declare class EzCustomFormInput {
|
|
4
|
+
gui: HTMLElement;
|
|
5
|
+
/**
|
|
6
|
+
* Instância do editor customizado.
|
|
7
|
+
*/
|
|
8
|
+
customEditor: ICustomEditor;
|
|
9
|
+
/**
|
|
10
|
+
* Campo que o elemento customizado representa.
|
|
11
|
+
*/
|
|
12
|
+
formViewField: IFormViewField;
|
|
13
|
+
/**
|
|
14
|
+
* Valores dos campos do formulário.
|
|
15
|
+
*/
|
|
16
|
+
value: any;
|
|
17
|
+
/**
|
|
18
|
+
* Define de qual contexto o editor está sendo acionado.
|
|
19
|
+
*/
|
|
20
|
+
detailContext: string;
|
|
21
|
+
/**
|
|
22
|
+
* Builder original do FormView que será chamado caso o custom não retorne nenhum valor.
|
|
23
|
+
*/
|
|
24
|
+
builderFallback: (field: IFormViewField) => HTMLElement;
|
|
25
|
+
/**
|
|
26
|
+
* Aplica foco no campo.
|
|
27
|
+
*/
|
|
28
|
+
setFocus(): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Remove o foco do campo.
|
|
31
|
+
*/
|
|
32
|
+
setBlur(): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Retorna se o conteúdo é inválido.
|
|
35
|
+
*/
|
|
36
|
+
isInvalid(): Promise<boolean>;
|
|
37
|
+
private getContent;
|
|
38
|
+
private handleValue;
|
|
39
|
+
componentWillRender(): void;
|
|
40
|
+
render(): any;
|
|
41
|
+
}
|
|
@@ -2,7 +2,10 @@ import { EventEmitter } from '../../stencil-public-runtime';
|
|
|
2
2
|
import { IFormViewField } from './interfaces/IFormViewField';
|
|
3
3
|
import { UserInterface } from '@sankhyalabs/core';
|
|
4
4
|
import { FormItems } from './structure';
|
|
5
|
+
import { ICustomEditor } from '../../utils/customEditor/interfaces/ICustomEditor';
|
|
5
6
|
export declare class EzFormView {
|
|
7
|
+
private _formElements;
|
|
8
|
+
private _customEditors;
|
|
6
9
|
_element: HTMLEzFormViewElement;
|
|
7
10
|
/**
|
|
8
11
|
* Evento emitido quando o componente foi totalmente carregado na DOM.
|
|
@@ -17,6 +20,14 @@ export declare class EzFormView {
|
|
|
17
20
|
*/
|
|
18
21
|
fields: Array<IFormViewField>;
|
|
19
22
|
showUp(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Registra um editor customizado para campos da grade e formulário.
|
|
25
|
+
*/
|
|
26
|
+
addCustomEditor(fieldName: string, customEditor: ICustomEditor, detailContext?: string): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Altera/adiciona uma propriedade nos metados do campo.
|
|
29
|
+
*/
|
|
30
|
+
setFieldProp(fieldName: string, propName: string, value: any): Promise<void>;
|
|
20
31
|
private groupFields;
|
|
21
32
|
componentDidRender(): void;
|
|
22
33
|
isItemFullWidth(userInterface: UserInterface): boolean;
|
|
@@ -2,6 +2,9 @@ import { DataUnit, Filter } from '@sankhyalabs/core';
|
|
|
2
2
|
import { Components } from '../../../components';
|
|
3
3
|
import FilterCollumn = Components.FilterColumn;
|
|
4
4
|
import { IRecordValidator } from '../../../utils/form/interfaces';
|
|
5
|
+
import { ICustomEditorInfo } from '../../../utils/customEditor/interfaces/ICustomEditorInfo';
|
|
6
|
+
import { ICustomRenderInfo } from '../../../utils/customRender/interfaces/ICustomRenderInfo';
|
|
7
|
+
import { ICustomFormatter } from '../interfaces';
|
|
5
8
|
/**
|
|
6
9
|
* O intuito desta abstração, é isolar o componente EzGrid de uma implementação
|
|
7
10
|
* específica, permitindo que usemos componentes de terceiros sem um acoplamento
|
|
@@ -87,6 +90,10 @@ export default interface EzGridController {
|
|
|
87
90
|
* Método responsável por atualizar as linhas da grade
|
|
88
91
|
*/
|
|
89
92
|
refresh(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Método responsável por atualizar as linhas selecionadas da grade
|
|
95
|
+
*/
|
|
96
|
+
refreshSelectedRows(): void;
|
|
90
97
|
/**
|
|
91
98
|
* Adiciona um filtro rápido na grid e faz o refresh.
|
|
92
99
|
*/
|
|
@@ -110,6 +117,16 @@ export default interface EzGridController {
|
|
|
110
117
|
configFilterColumn(filterColumn: FilterCollumn): any;
|
|
111
118
|
getFilter(): Array<Filter> | undefined;
|
|
112
119
|
clearFilter(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Registra editores customizados no controller da grid.
|
|
122
|
+
*/
|
|
123
|
+
setCellEditors(customEditors: Map<string, ICustomEditorInfo>): void;
|
|
124
|
+
/**
|
|
125
|
+
* Registra renders customizados no controller da grid.
|
|
126
|
+
*/
|
|
127
|
+
setCellRenders(customRenders: Map<string, ICustomRenderInfo>): void;
|
|
128
|
+
clearFilter(): void;
|
|
129
|
+
setCustomFormatters(customFormatters: Map<string, ICustomFormatter>): void;
|
|
113
130
|
}
|
|
114
131
|
/**
|
|
115
132
|
* Carrega as informações necessárias para contextualizar corretamente a instância.
|
|
@@ -164,6 +181,18 @@ export interface EzGridOptions {
|
|
|
164
181
|
* Desabilita edição na grade independente da configuração de coluna.
|
|
165
182
|
*/
|
|
166
183
|
editionIsDisabled?: () => boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Registra editores customizados no controller da grid
|
|
186
|
+
*/
|
|
187
|
+
customEditors?: Map<string, ICustomEditorInfo>;
|
|
188
|
+
/**
|
|
189
|
+
* Registra renders customizados no controller da grid
|
|
190
|
+
*/
|
|
191
|
+
customRenders?: Map<string, ICustomRenderInfo>;
|
|
192
|
+
/**
|
|
193
|
+
* Mapa de formatadores customizados por coluna.
|
|
194
|
+
*/
|
|
195
|
+
customFormatters: Map<string, ICustomFormatter>;
|
|
167
196
|
}
|
|
168
197
|
/**
|
|
169
198
|
* Representa cada coluna da grade.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Sort, SortingProvider } from '@sankhyalabs/core';
|
|
2
2
|
import { Filter, FilterProvider } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
3
3
|
import EzGridController, { EzGridColumn, EzGridColumnConfig, EzGridColumnMenuItemDef, EzGridOptions } from '../EzGridController';
|
|
4
|
+
import { ICustomEditorInfo } from '../../../../utils/customEditor/interfaces/ICustomEditorInfo';
|
|
5
|
+
import { ICustomRenderInfo } from '../../../../utils/customRender/interfaces/ICustomRenderInfo';
|
|
6
|
+
import { ICustomFormatter } from '../../interfaces';
|
|
4
7
|
export default class AgGridController implements EzGridController, SortingProvider, FilterProvider {
|
|
5
8
|
private readonly DEFAULT_ROW_HEIGHT;
|
|
6
9
|
private readonly DEFAULT_HEADER_ROW_HEIGHT;
|
|
@@ -30,6 +33,9 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
30
33
|
private _filterColumn;
|
|
31
34
|
private _filterColumnleftPosition;
|
|
32
35
|
private _editionManager;
|
|
36
|
+
private _customEditors;
|
|
37
|
+
private _customRenders;
|
|
38
|
+
private _customFormatters;
|
|
33
39
|
configFilterColumn(filterColumn: HTMLFilterColumnElement): void;
|
|
34
40
|
private handleFilteredColumnsChanged;
|
|
35
41
|
clearFilter(): void;
|
|
@@ -41,6 +47,7 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
41
47
|
getFilter(): Array<Filter> | undefined;
|
|
42
48
|
private getExpression;
|
|
43
49
|
initDatagrid(container: HTMLElement, options: EzGridOptions): void;
|
|
50
|
+
private processFormatterCellCallback;
|
|
44
51
|
private setFilterColumnLeftPosition;
|
|
45
52
|
private buildMenuItemOptions;
|
|
46
53
|
private buildMenuItemOptionSort;
|
|
@@ -76,6 +83,8 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
76
83
|
setSelectedIndex(index: number): void;
|
|
77
84
|
hasFilterColumn(columnName: string): boolean;
|
|
78
85
|
private buildColDef;
|
|
86
|
+
setCustomFormatters(customFormatters: Map<string, ICustomFormatter>): void;
|
|
87
|
+
refreshSelectedRows(): void;
|
|
79
88
|
private getInitCellStyle;
|
|
80
89
|
private getStyleByColumn;
|
|
81
90
|
private getFormatterByColumn;
|
|
@@ -87,4 +96,6 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
87
96
|
private onRowDoubleClick;
|
|
88
97
|
private conditionalSet;
|
|
89
98
|
private getColumnWidth;
|
|
99
|
+
setCellEditors(customEditors: Map<string, ICustomEditorInfo>): void;
|
|
100
|
+
setCellRenders(customRenders: Map<string, ICustomRenderInfo>): void;
|
|
90
101
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DataUnit } from "@sankhyalabs/core";
|
|
2
2
|
import { CellPosition, ColDef, GridApi, GridOptions } from "ag-grid-community";
|
|
3
3
|
import { IRecordValidator } from "../../../../utils/form/interfaces";
|
|
4
|
+
import { ICustomEditorInfo } from "../../../../utils/customEditor/interfaces/ICustomEditorInfo";
|
|
5
|
+
import { ICustomRenderInfo } from "../../../../utils/customRender/interfaces/ICustomRenderInfo";
|
|
4
6
|
export default class GridEditionManager {
|
|
5
7
|
private _dataUnit;
|
|
6
8
|
private _lastCellClicked;
|
|
@@ -11,7 +13,9 @@ export default class GridEditionManager {
|
|
|
11
13
|
private _useEnterLikeTab;
|
|
12
14
|
private _editionIsDisabled;
|
|
13
15
|
private _isGridEdition;
|
|
14
|
-
|
|
16
|
+
private _customEditors;
|
|
17
|
+
private _customRenders;
|
|
18
|
+
constructor(dataUnit: DataUnit, useEnterLikeTab: boolean, recordsValidator: IRecordValidator, editionIsDisabled: () => boolean, customEditors?: Map<string, ICustomEditorInfo>, customRenders?: Map<string, ICustomRenderInfo>);
|
|
15
19
|
configureGrid(options: GridOptions): GridOptions;
|
|
16
20
|
proceedAutoSave(): void;
|
|
17
21
|
navigateByEnterKey(keyboardEvent: KeyboardEvent): void;
|
|
@@ -35,4 +39,6 @@ export default class GridEditionManager {
|
|
|
35
39
|
private isColEditable;
|
|
36
40
|
private isSecondClick;
|
|
37
41
|
private onCellEditRequest;
|
|
42
|
+
setCellEditors(customEditors: Map<string, ICustomEditorInfo>): void;
|
|
43
|
+
setCellRenders(customRenders: Map<string, ICustomRenderInfo>): void;
|
|
38
44
|
}
|
package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ICellEditorParams } from "ag-grid-community";
|
|
2
|
+
import { ICustomEditorInfo } from "../../../../../utils/customEditor/interfaces/ICustomEditorInfo";
|
|
3
|
+
import EzCellEditor from "../editor/EzCellEditor";
|
|
4
|
+
interface CustomParamsEditor {
|
|
5
|
+
customEditorsInfo: ICustomEditorInfo;
|
|
6
|
+
}
|
|
7
|
+
export default class EzGridCustomCellEditor extends EzCellEditor {
|
|
8
|
+
private _fieldName;
|
|
9
|
+
private _customEditorInstance;
|
|
10
|
+
private _params;
|
|
11
|
+
private _defaultGui;
|
|
12
|
+
private _value;
|
|
13
|
+
init(params: ICellEditorParams & CustomParamsEditor): void;
|
|
14
|
+
private getDefaultGui;
|
|
15
|
+
getGui(): HTMLElement;
|
|
16
|
+
private setValue;
|
|
17
|
+
getValue(): any;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ICellRendererParams } from "ag-grid-community";
|
|
2
|
+
import EzCellRender from "../editor/EzCellRender";
|
|
3
|
+
import { ICustomRenderInfo } from "../../../../../utils/customRender/interfaces/ICustomRenderInfo";
|
|
4
|
+
interface CustomParamsRender {
|
|
5
|
+
customRendersInfo: ICustomRenderInfo;
|
|
6
|
+
}
|
|
7
|
+
export default class EzGridCustomCellRender extends EzCellRender {
|
|
8
|
+
private _fieldName;
|
|
9
|
+
private _customRenderInstance;
|
|
10
|
+
private _params;
|
|
11
|
+
init(params: ICellRendererParams & CustomParamsRender): void;
|
|
12
|
+
getGui(): HTMLElement;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ICellEditorComp, ICellEditorParams } from "ag-grid-community";
|
|
2
|
+
import { IEditorMetadata } from "./IEditorMetadata";
|
|
2
3
|
export default class EzCellEditor implements ICellEditorComp {
|
|
3
4
|
private _gui;
|
|
5
|
+
private _fieldMetadata;
|
|
4
6
|
init(params: ICellEditorParams): void;
|
|
5
7
|
getGui(): HTMLElement;
|
|
6
8
|
afterGuiAttached(): void;
|
|
7
9
|
focusIn(): void;
|
|
8
10
|
getValue(): any;
|
|
9
11
|
isPopup(): boolean;
|
|
12
|
+
getFieldMetadata(): IEditorMetadata;
|
|
10
13
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ICellRendererComp, ICellRendererParams } from "ag-grid-community";
|
|
2
|
+
import { IEditorMetadata } from "./IEditorMetadata";
|
|
3
|
+
export default class EzCellRender implements ICellRendererComp {
|
|
4
|
+
private _gui;
|
|
5
|
+
private _fieldMetadata;
|
|
6
|
+
private _currentParams;
|
|
7
|
+
init(params: ICellRendererParams): void;
|
|
8
|
+
refresh(): boolean;
|
|
9
|
+
getGui(): HTMLElement;
|
|
10
|
+
afterGuiAttached(): void;
|
|
11
|
+
focusIn(): void;
|
|
12
|
+
getValue(): any;
|
|
13
|
+
isPopup(): boolean;
|
|
14
|
+
getFieldMetadata(): IEditorMetadata;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface IUICellRender extends HTMLElement {
|
|
2
|
+
setFocus: (options: IFocusOptions) => void;
|
|
3
|
+
value: any;
|
|
4
|
+
valueSetter?: (value: any) => void;
|
|
5
|
+
valueGetter?: () => any;
|
|
6
|
+
isPopUp?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface IFocusOptions {
|
|
9
|
+
selectText: boolean;
|
|
10
|
+
}
|
|
@@ -3,7 +3,9 @@ import { EventEmitter } from '../../stencil-public-runtime';
|
|
|
3
3
|
import { IRecordValidator } from '../../utils/form/interfaces';
|
|
4
4
|
import { IMultiSelectionListDataSource } from '../ez-multi-selection-list/interfaces/IMultiSelectionListDataSource';
|
|
5
5
|
import { EzGridColumStateEvent, EzGridColumn, EzGridColumnConfig, IGridConfig, IStatusResolver, StatusResolverFunction } from './controller/EzGridController';
|
|
6
|
-
import { ISelection, ISelectionToastConfig } from './interfaces';
|
|
6
|
+
import { ICustomFormatter, ISelection, ISelectionToastConfig } from './interfaces';
|
|
7
|
+
import { ICustomEditor } from '../../utils/customEditor/interfaces/ICustomEditor';
|
|
8
|
+
import { ICustomRender } from '../../utils/customRender/interfaces/ICustomRender';
|
|
7
9
|
export declare class EzGrid {
|
|
8
10
|
private _container;
|
|
9
11
|
private _refPaginationControl;
|
|
@@ -16,6 +18,8 @@ export declare class EzGrid {
|
|
|
16
18
|
private _refPaginationLabel;
|
|
17
19
|
private _refPaginationLabelTooltip;
|
|
18
20
|
private _headerOverflowWatcher;
|
|
21
|
+
private _customEditor;
|
|
22
|
+
private _customRenders;
|
|
19
23
|
_element: HTMLElement;
|
|
20
24
|
private _paginationInfo;
|
|
21
25
|
private _paginationChangedByKeyboard;
|
|
@@ -24,6 +28,7 @@ export declare class EzGrid {
|
|
|
24
28
|
private _currentPageSelected;
|
|
25
29
|
private _selectionCount;
|
|
26
30
|
private _hasLeftButtons;
|
|
31
|
+
private _customFormatters;
|
|
27
32
|
/**
|
|
28
33
|
* Emitido quando acontece a alteração de estado das colunas do grid: Ordenação, largura, etc.
|
|
29
34
|
*/
|
|
@@ -125,6 +130,30 @@ export declare class EzGrid {
|
|
|
125
130
|
* Usa um argumento para filtrar as colunas po label
|
|
126
131
|
*/
|
|
127
132
|
filterColumns(search: string): Promise<Array<EzGridColumn>>;
|
|
133
|
+
/**
|
|
134
|
+
* Registra um editor customizado para campos da grade e formulário.
|
|
135
|
+
*/
|
|
136
|
+
addCustomEditor(fieldName: string, customEditor: ICustomEditor, detailContext?: string): Promise<void>;
|
|
137
|
+
/**
|
|
138
|
+
* Registra um render customizado para colunas da grid.
|
|
139
|
+
*/
|
|
140
|
+
addGridCustomRender(fieldName: string, customRender: ICustomRender, detailContext?: string): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Registra um formatador de valores para uma coluna da grid.
|
|
143
|
+
*/
|
|
144
|
+
addCustomValueFormatter(columnName: string, customFormatter: ICustomFormatter): Promise<void>;
|
|
145
|
+
/**
|
|
146
|
+
* Remove o formatador de valores de uma coluna da grid.
|
|
147
|
+
*/
|
|
148
|
+
removeCustomValueFormatter(columnName: string): Promise<void>;
|
|
149
|
+
/**
|
|
150
|
+
* Atualiza linhas da grade.
|
|
151
|
+
*/
|
|
152
|
+
refreshSelectedRows(): Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* Retorna o formatador customizado da coluna caso exista.
|
|
155
|
+
*/
|
|
156
|
+
getCustomValueFormatter(columnName: string): Promise<ICustomFormatter | undefined>;
|
|
128
157
|
observeConfig(config: IGridConfig): void;
|
|
129
158
|
updatePaginationTooltip(): void;
|
|
130
159
|
onSelectionChange(evt: CustomEvent): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function enableSelectAll(total: any): boolean;
|
|
2
|
+
export declare function buildSelectAllLabel(allRecordSelected: any, count: any, total: any): string;
|
|
3
|
+
export declare function buildSelectAllTitle(total: any): string;
|
|
4
|
+
export declare function getText(selectionCount: number, allSelectedRecords: boolean): string;
|
|
@@ -35,6 +35,7 @@ export declare class EzModal {
|
|
|
35
35
|
* Define o tipo de scrim a ser aplicado no overlay do modal
|
|
36
36
|
*/
|
|
37
37
|
scrim: "medium" | "light";
|
|
38
|
+
private _element;
|
|
38
39
|
/**
|
|
39
40
|
* Emitido quando o modal é fechado.
|
|
40
41
|
*/
|
|
@@ -43,8 +44,15 @@ export declare class EzModal {
|
|
|
43
44
|
* Emitido quando o modal é aberto.
|
|
44
45
|
*/
|
|
45
46
|
ezOpenModal: EventEmitter;
|
|
47
|
+
/**
|
|
48
|
+
* Representa a interação com o usuário.
|
|
49
|
+
* OK - Quando o botão é acionado
|
|
50
|
+
* CANCEL - Quando o botão de cancelar é acionado
|
|
51
|
+
* CLOSE - Quando o botão de fechar é acionado.
|
|
52
|
+
* LOAD - Quando o modal é carregado (eventualmente pode ser usado para dar foco a um elemento específico)
|
|
53
|
+
*/
|
|
54
|
+
ezModalAction: EventEmitter<string>;
|
|
46
55
|
observeOpened(): void;
|
|
47
|
-
handleKeyboardEvent: (ev: any) => void;
|
|
48
56
|
closeModal(): void;
|
|
49
57
|
componentDidLoad(): void;
|
|
50
58
|
componentDidRender(): void;
|
|
@@ -2,6 +2,7 @@ import { EventEmitter } from "../../stencil-public-runtime";
|
|
|
2
2
|
export declare class EzModalContainer {
|
|
3
3
|
_closeButton: HTMLElement;
|
|
4
4
|
_okButton: HTMLEzButtonElement;
|
|
5
|
+
private _modalRef;
|
|
5
6
|
private _element;
|
|
6
7
|
/**
|
|
7
8
|
* Texto a ser apresentado como título do modal.
|
|
@@ -39,9 +40,11 @@ export declare class EzModalContainer {
|
|
|
39
40
|
* LOAD - Quando o modal é carregado (eventualmente pode ser usado para dar foco a um elemento específico)
|
|
40
41
|
*/
|
|
41
42
|
ezModalAction: EventEmitter<string>;
|
|
43
|
+
handleEzModalAction(event: CustomEvent<string>): Promise<void>;
|
|
42
44
|
private cancelIsVisible;
|
|
43
45
|
private okIsVisible;
|
|
44
46
|
componentDidLoad(): void;
|
|
47
|
+
private closeModal;
|
|
45
48
|
focusLast(): void;
|
|
46
49
|
focusFirst(): void;
|
|
47
50
|
render(): any;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
2
|
export declare class EzPopup {
|
|
3
|
-
private
|
|
4
|
-
private _modalRef;
|
|
3
|
+
private _popupRef;
|
|
5
4
|
private _overlayId;
|
|
6
|
-
private _element;
|
|
7
5
|
private _sizeClasses;
|
|
6
|
+
private _element;
|
|
8
7
|
/**
|
|
9
8
|
* Define a largura do ez-popup.
|
|
10
9
|
*/
|
|
@@ -35,6 +34,7 @@ export declare class EzPopup {
|
|
|
35
34
|
ezPopupAction: EventEmitter<string>;
|
|
36
35
|
observeConfig(): void;
|
|
37
36
|
componentDidLoad(): void;
|
|
37
|
+
private closePopup;
|
|
38
38
|
private manageOverflow;
|
|
39
39
|
private manageOverlay;
|
|
40
40
|
getGridSize(): string;
|