@sankhyalabs/ezui 5.21.4 → 5.22.0-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/cjs/ICustomRender-6fafffce.js +13 -0
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -0
  3. package/dist/cjs/ez-chart.cjs.entry.js +435 -0
  4. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -0
  5. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -0
  6. package/dist/cjs/{ez-text-edit.cjs.entry.js → ez-custom-form-input_2.cjs.entry.js} +99 -0
  7. package/dist/cjs/ez-form-view.cjs.entry.js +37 -5
  8. package/dist/cjs/ez-form.cjs.entry.js +81 -2
  9. package/dist/cjs/ez-grid.cjs.entry.js +312 -40
  10. package/dist/cjs/ez-list.cjs.entry.js +10 -2
  11. package/dist/cjs/ez-modal-container.cjs.entry.js +2 -1
  12. package/dist/cjs/ez-modal.cjs.entry.js +7 -1
  13. package/dist/cjs/ez-number-input.cjs.entry.js +37 -31
  14. package/dist/cjs/ez-scroller_2.cjs.entry.js +222 -0
  15. package/dist/cjs/ez-search.cjs.entry.js +40 -33
  16. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +92 -0
  17. package/dist/cjs/ez-split-item.cjs.entry.js +1 -0
  18. package/dist/cjs/ez-tabselector.cjs.entry.js +8 -2
  19. package/dist/cjs/{ez-scroller_3.cjs.entry.js → ez-tree.cjs.entry.js} +0 -215
  20. package/dist/cjs/ezui.cjs.js +1 -1
  21. package/dist/cjs/index-a7b0c73d.js +16 -4
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/collection/collection-manifest.json +3 -0
  24. package/dist/collection/components/ez-chart/components/BarChart.js +27 -0
  25. package/dist/collection/components/ez-chart/components/ColumnChart.js +27 -0
  26. package/dist/collection/components/ez-chart/components/DonutChart.js +42 -0
  27. package/dist/collection/components/ez-chart/components/LineChart.js +27 -0
  28. package/dist/collection/components/ez-chart/components/PieChart.js +45 -0
  29. package/dist/collection/components/ez-chart/components/index.js +5 -0
  30. package/dist/collection/components/ez-chart/ez-chart.css +5 -0
  31. package/dist/collection/components/ez-chart/ez-chart.js +286 -0
  32. package/dist/collection/components/ez-chart/interfaces/ChartAxis.js +1 -0
  33. package/dist/collection/components/ez-chart/interfaces/ChartContext.js +14 -0
  34. package/dist/collection/components/ez-chart/interfaces/ChartOptions.js +1 -0
  35. package/dist/collection/components/ez-chart/interfaces/ChartSerie.js +1 -0
  36. package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js +1 -0
  37. package/dist/collection/components/ez-chart/interfaces/ChartType.js +8 -0
  38. package/dist/collection/components/ez-chart/interfaces/index.js +5 -0
  39. package/dist/collection/components/ez-chart/test/mock-chart.js +137 -0
  40. package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js +146 -0
  41. package/dist/collection/components/ez-form/ez-form.js +130 -4
  42. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +278 -0
  43. package/dist/collection/components/ez-form-view/ez-form-view.js +110 -1
  44. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +3 -2
  45. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +3 -2
  46. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +51 -22
  47. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +6 -1
  48. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +36 -2
  49. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +59 -0
  50. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js +40 -0
  51. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js +11 -0
  52. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js +11 -0
  53. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +10 -3
  54. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js +40 -0
  55. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js +1 -0
  56. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +3 -2
  57. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +40 -0
  58. package/dist/collection/components/ez-grid/ez-grid.js +235 -12
  59. package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js +1 -0
  60. package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
  61. package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js +19 -0
  62. package/dist/collection/components/ez-list/ez-list.js +28 -2
  63. package/dist/collection/components/ez-modal/ez-modal.js +25 -1
  64. package/dist/collection/components/ez-modal-container/ez-modal-container.js +20 -1
  65. package/dist/collection/components/ez-number-input/ez-number-input.js +46 -31
  66. package/dist/collection/components/ez-search/ez-search.js +39 -33
  67. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +6 -2
  68. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
  69. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +180 -0
  70. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js +293 -0
  71. package/dist/collection/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.js +5 -0
  72. package/dist/collection/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.js +6 -0
  73. package/dist/collection/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.js +6 -0
  74. package/dist/collection/components/ez-sidebar-navigator/interfaces/index.js +3 -0
  75. package/dist/collection/components/ez-sidebar-navigator/messages/constants.js +5 -0
  76. package/dist/collection/components/ez-tabselector/ez-tabselector.js +34 -2
  77. package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js +5 -0
  78. package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js +1 -0
  79. package/dist/collection/utils/customRender/interfaces/ICustomRender.js +5 -0
  80. package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js +1 -0
  81. package/dist/collection/utils/form/DataBinder.js +31 -1
  82. package/dist/collection/utils/form/test/DataBinder.test.js +41 -4
  83. package/dist/collection/utils/form/test/resources/metadataTest.js +15 -0
  84. package/dist/collection/utils/index.js +2 -0
  85. package/dist/custom-elements/index.d.ts +18 -0
  86. package/dist/custom-elements/index.js +1173 -127
  87. package/dist/esm/ICustomRender-875b5a40.js +13 -0
  88. package/dist/esm/ez-actions-button.entry.js +1 -0
  89. package/dist/esm/ez-chart.entry.js +431 -0
  90. package/dist/esm/ez-collapsible-box.entry.js +1 -0
  91. package/dist/esm/ez-combo-box.entry.js +1 -0
  92. package/dist/esm/{ez-text-edit.entry.js → ez-custom-form-input_2.entry.js} +101 -3
  93. package/dist/esm/ez-form-view.entry.js +37 -5
  94. package/dist/esm/ez-form.entry.js +82 -3
  95. package/dist/esm/ez-grid.entry.js +312 -40
  96. package/dist/esm/ez-list.entry.js +10 -2
  97. package/dist/esm/ez-modal-container.entry.js +2 -1
  98. package/dist/esm/ez-modal.entry.js +7 -1
  99. package/dist/esm/ez-number-input.entry.js +38 -32
  100. package/dist/esm/ez-scroller_2.entry.js +217 -0
  101. package/dist/esm/ez-search.entry.js +40 -33
  102. package/dist/esm/ez-sidebar-navigator.entry.js +88 -0
  103. package/dist/esm/ez-split-item.entry.js +1 -0
  104. package/dist/esm/ez-tabselector.entry.js +8 -2
  105. package/dist/esm/{ez-scroller_3.entry.js → ez-tree.entry.js} +3 -216
  106. package/dist/esm/ezui.js +1 -1
  107. package/dist/esm/index-baa5e267.js +16 -4
  108. package/dist/esm/loader.js +1 -1
  109. package/dist/ezui/ezui.esm.js +1 -1
  110. package/dist/ezui/p-2097d0cf.entry.js +1 -0
  111. package/dist/ezui/{p-9fbb0f01.entry.js → p-32e553e5.entry.js} +2 -2
  112. package/dist/ezui/p-34b6916c.entry.js +1 -0
  113. package/dist/ezui/p-3b4eeeb6.entry.js +1 -0
  114. package/dist/ezui/p-42533ea4.entry.js +1 -0
  115. package/dist/ezui/p-4607fb89.js +1 -0
  116. package/dist/ezui/p-4d5235f1.entry.js +1 -0
  117. package/dist/ezui/p-5b205c80.entry.js +1 -0
  118. package/dist/ezui/p-7922142b.entry.js +1 -0
  119. package/dist/ezui/p-84e439b9.entry.js +1 -0
  120. package/dist/ezui/p-8888d9ed.entry.js +1 -0
  121. package/dist/ezui/p-922ac38b.entry.js +1 -0
  122. package/dist/ezui/p-a31b9c90.entry.js +1 -0
  123. package/dist/ezui/p-aba3da00.entry.js +1 -0
  124. package/dist/ezui/p-bcb53f27.entry.js +1 -0
  125. package/dist/ezui/p-c0d9c4f8.entry.js +1 -0
  126. package/dist/ezui/p-cdc472cc.entry.js +1 -0
  127. package/dist/ezui/p-ecc2c1ec.entry.js +1 -0
  128. package/dist/ezui/p-fcf0acce.entry.js +1 -0
  129. package/dist/types/components/ez-chart/components/BarChart.d.ts +9 -0
  130. package/dist/types/components/ez-chart/components/ColumnChart.d.ts +9 -0
  131. package/dist/types/components/ez-chart/components/DonutChart.d.ts +9 -0
  132. package/dist/types/components/ez-chart/components/LineChart.d.ts +9 -0
  133. package/dist/types/components/ez-chart/components/PieChart.d.ts +9 -0
  134. package/dist/types/components/ez-chart/components/index.d.ts +5 -0
  135. package/dist/types/components/ez-chart/ez-chart.d.ts +58 -0
  136. package/dist/types/components/ez-chart/interfaces/ChartAxis.d.ts +7 -0
  137. package/dist/types/components/ez-chart/interfaces/ChartContext.d.ts +11 -0
  138. package/dist/types/components/ez-chart/interfaces/ChartOptions.d.ts +10 -0
  139. package/dist/types/components/ez-chart/interfaces/ChartSerie.d.ts +20 -0
  140. package/dist/types/components/ez-chart/interfaces/ChartStrategies.d.ts +7 -0
  141. package/dist/types/components/ez-chart/interfaces/ChartType.d.ts +7 -0
  142. package/dist/types/components/ez-chart/interfaces/index.d.ts +5 -0
  143. package/dist/types/components/ez-chart/types/BaseHighChartsRender.d.ts +15 -0
  144. package/dist/types/components/ez-form/ez-form.d.ts +20 -1
  145. package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +48 -0
  146. package/dist/types/components/ez-form-view/ez-form-view.d.ts +16 -1
  147. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +1 -1
  148. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +37 -0
  149. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +13 -4
  150. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
  151. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -1
  152. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +19 -0
  153. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +14 -0
  154. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.d.ts +11 -0
  155. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.d.ts +11 -0
  156. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +6 -0
  157. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +15 -0
  158. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellRender.d.ts +10 -0
  159. package/dist/types/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.d.ts +6 -0
  160. package/dist/types/components/ez-grid/ez-grid.d.ts +34 -1
  161. package/dist/types/components/ez-grid/interfaces/ICustomFormatter.d.ts +5 -0
  162. package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
  163. package/dist/types/components/ez-grid/test/resources/gridDataUnit.d.ts +2 -0
  164. package/dist/types/components/ez-list/ez-list.d.ts +5 -0
  165. package/dist/types/components/ez-modal/ez-modal.d.ts +5 -0
  166. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -0
  167. package/dist/types/components/ez-number-input/ez-number-input.d.ts +3 -0
  168. package/dist/types/components/ez-search/ez-search.d.ts +4 -2
  169. package/dist/types/components/ez-sidebar-navigator/ez-sidebar-navigator.d.ts +57 -0
  170. package/dist/types/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.d.ts +4 -0
  171. package/dist/types/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.d.ts +5 -0
  172. package/dist/types/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.d.ts +5 -0
  173. package/dist/types/components/ez-sidebar-navigator/interfaces/index.d.ts +3 -0
  174. package/dist/types/components/ez-sidebar-navigator/messages/constants.d.ts +5 -0
  175. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +2 -1
  176. package/dist/types/components.d.ts +351 -5
  177. package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +31 -0
  178. package/dist/types/utils/customEditor/interfaces/ICustomEditorInfo.d.ts +5 -0
  179. package/dist/types/utils/customRender/interfaces/ICustomRender.d.ts +29 -0
  180. package/dist/types/utils/customRender/interfaces/ICustomRenderInfo.d.ts +5 -0
  181. package/dist/types/utils/form/DataBinder.d.ts +5 -0
  182. package/dist/types/utils/form/test/resources/metadataTest.d.ts +2 -0
  183. package/dist/types/utils/index.d.ts +2 -0
  184. package/package.json +2 -1
  185. package/react/components.d.ts +3 -0
  186. package/react/components.js +3 -0
  187. package/react/components.js.map +1 -1
  188. package/dist/ezui/p-0447d17c.entry.js +0 -1
  189. package/dist/ezui/p-20ec22c0.entry.js +0 -1
  190. package/dist/ezui/p-2a1a0e04.entry.js +0 -1
  191. package/dist/ezui/p-2dcb50d4.entry.js +0 -1
  192. package/dist/ezui/p-30775e7f.entry.js +0 -1
  193. package/dist/ezui/p-41ac6cd9.entry.js +0 -1
  194. package/dist/ezui/p-637f69f2.entry.js +0 -1
  195. package/dist/ezui/p-786559c5.entry.js +0 -1
  196. package/dist/ezui/p-91f626d3.entry.js +0 -1
  197. package/dist/ezui/p-99ead599.entry.js +0 -1
  198. package/dist/ezui/p-b567fa8c.entry.js +0 -1
  199. package/dist/ezui/p-bae3d0aa.entry.js +0 -1
  200. package/dist/ezui/p-db77a984.entry.js +0 -1
  201. package/dist/ezui/p-f3c526cc.entry.js +0 -1
@@ -0,0 +1,48 @@
1
+ import { ICustomEditor } from '../../../utils/customEditor/interfaces/ICustomEditor';
2
+ import { IFormViewField } from '../interfaces';
3
+ import { Record } from '@sankhyalabs/core';
4
+ export declare class EzCustomFormInput {
5
+ gui: HTMLElement;
6
+ /**
7
+ * Instância do editor customizado.
8
+ */
9
+ customEditor: ICustomEditor;
10
+ /**
11
+ * Campo que o elemento customizado representa.
12
+ */
13
+ formViewField: IFormViewField;
14
+ /**
15
+ * Valores dos campos do formulário.
16
+ */
17
+ value: any;
18
+ /**
19
+ * Define de qual contexto o editor está sendo acionado.
20
+ */
21
+ detailContext: string;
22
+ /**
23
+ * Builder original do FormView que será chamado caso o custom não retorne nenhum valor.
24
+ */
25
+ builderFallback: (field: IFormViewField) => HTMLElement;
26
+ /**
27
+ * Define os registros da linha selecionada.
28
+ */
29
+ selectedRecord: Record;
30
+ /**
31
+ * Aplica foco no campo.
32
+ */
33
+ setFocus(): Promise<void>;
34
+ /**
35
+ * Remove o foco do campo.
36
+ */
37
+ setBlur(): Promise<void>;
38
+ /**
39
+ * Retorna se o conteúdo é inválido.
40
+ */
41
+ isInvalid(): Promise<boolean>;
42
+ private getContent;
43
+ private setValue;
44
+ private getValue;
45
+ private handleValue;
46
+ componentWillRender(): void;
47
+ render(): any;
48
+ }
@@ -1,8 +1,11 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { IFormViewField } from './interfaces/IFormViewField';
3
- import { UserInterface } from '@sankhyalabs/core';
3
+ import { Record, 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.
@@ -16,7 +19,19 @@ export declare class EzFormView {
16
19
  * Define a lista de metadados usada para criar os campos de user interface.
17
20
  */
18
21
  fields: Array<IFormViewField>;
22
+ /**
23
+ * Define os registros da linha selecionada.
24
+ */
25
+ selectedRecord: Record;
19
26
  showUp(): Promise<void>;
27
+ /**
28
+ * Registra um editor customizado para campos da grade e formulário.
29
+ */
30
+ addCustomEditor(fieldName: string, customEditor: ICustomEditor, detailContext?: string): Promise<void>;
31
+ /**
32
+ * Altera/adiciona uma propriedade nos metados do campo.
33
+ */
34
+ setFieldProp(fieldName: string, propName: string, value: any): Promise<void>;
20
35
  private groupFields;
21
36
  componentDidRender(): void;
22
37
  isItemFullWidth(userInterface: UserInterface): boolean;
@@ -1,2 +1,2 @@
1
1
  import { IFormViewField } from "../../interfaces/IFormViewField";
2
- export declare const buildSearch: ({ name, label, readOnly, required, contextName, canShowError, optionLoader }: IFormViewField) => HTMLElement;
2
+ export declare const buildSearch: ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }: IFormViewField) => HTMLElement;
@@ -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
  */
@@ -99,6 +106,10 @@ export default interface EzGridController {
99
106
  * Foca a primeira linha da grade, usado durante a troca de página
100
107
  */
101
108
  setFocusFirstRow(): void;
109
+ /**
110
+ * Define se a grade será focada automaticamente.
111
+ */
112
+ setAutoFocus(autoFocus: boolean): void;
102
113
  /**
103
114
  * Método responsável por retornar a configuração da grade.
104
115
  */
@@ -110,6 +121,16 @@ export default interface EzGridController {
110
121
  configFilterColumn(filterColumn: FilterCollumn): any;
111
122
  getFilter(): Array<Filter> | undefined;
112
123
  clearFilter(): void;
124
+ /**
125
+ * Registra editores customizados no controller da grid.
126
+ */
127
+ setCellEditors(customEditors: Map<string, ICustomEditorInfo>): void;
128
+ /**
129
+ * Registra renders customizados no controller da grid.
130
+ */
131
+ setCellRenders(customRenders: Map<string, ICustomRenderInfo>): void;
132
+ clearFilter(): void;
133
+ setCustomFormatters(customFormatters: Map<string, ICustomFormatter>): void;
113
134
  setFocus(): void;
114
135
  }
115
136
  /**
@@ -169,6 +190,22 @@ export interface EzGridOptions {
169
190
  * Desabilita edição na grade independente da configuração de coluna.
170
191
  */
171
192
  editionIsDisabled?: () => boolean;
193
+ /**
194
+ * Registra editores customizados no controller da grid
195
+ */
196
+ customEditors?: Map<string, ICustomEditorInfo>;
197
+ /**
198
+ * Registra renders customizados no controller da grid
199
+ */
200
+ customRenders?: Map<string, ICustomRenderInfo>;
201
+ /**
202
+ * Mapa de formatadores customizados por coluna.
203
+ */
204
+ customFormatters: Map<string, ICustomFormatter>;
205
+ /**
206
+ * Define se a grid será focada ao ser carregada.
207
+ */
208
+ autoFocus: boolean;
172
209
  }
173
210
  /**
174
211
  * 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;
@@ -8,9 +11,7 @@ export default class AgGridController implements EzGridController, SortingProvid
8
11
  private readonly STATUS_COL_ID;
9
12
  private readonly RECORD_ARCHIVE_COL_ID;
10
13
  private readonly BLOCK_LOAD_DEBOUNCE;
11
- private readonly DEFAULT_FONT_SIZE;
12
- private readonly DEFAULT_ICON_SIZE;
13
- private readonly DEFAULT_MAX_SIZE;
14
+ private readonly DOC_WIDTH;
14
15
  private _grid;
15
16
  private _gridOptions;
16
17
  private _columnStateChangeCallback;
@@ -30,6 +31,9 @@ export default class AgGridController implements EzGridController, SortingProvid
30
31
  private _filterColumn;
31
32
  private _filterColumnleftPosition;
32
33
  private _editionManager;
34
+ private _customEditors;
35
+ private _customRenders;
36
+ private _customFormatters;
33
37
  private _container;
34
38
  private _options;
35
39
  configFilterColumn(filterColumn: HTMLFilterColumnElement): void;
@@ -68,12 +72,14 @@ export default class AgGridController implements EzGridController, SortingProvid
68
72
  refresh(): void;
69
73
  private focusOnGridContainer;
70
74
  setFocus(): void;
75
+ setAutoFocus(autoFocus: boolean): void;
71
76
  setFocusFirstRow(): void;
72
77
  setFocusLastRow(): void;
73
78
  private setFocusOnRow;
74
79
  setColumnsDef(cols: Array<EzGridColumn>): void;
75
80
  getColumnsDef(): Array<EzGridColumn>;
76
81
  setColumnsState(state: Array<EzGridColumnConfig>): void;
82
+ private getAdaptiveWidth;
77
83
  getColumnsState(): Array<EzGridColumn>;
78
84
  getSelection(): Array<any>;
79
85
  addColumnMenuItem(item: EzGridColumnMenuItemDef): void;
@@ -81,6 +87,8 @@ export default class AgGridController implements EzGridController, SortingProvid
81
87
  setSelectedIndex(index: number): void;
82
88
  hasFilterColumn(columnName: string): boolean;
83
89
  private buildColDef;
90
+ setCustomFormatters(customFormatters: Map<string, ICustomFormatter>): void;
91
+ refreshSelectedRows(): void;
84
92
  private getInitCellStyle;
85
93
  private getStyleByColumn;
86
94
  private getFormatterByColumn;
@@ -91,5 +99,6 @@ export default class AgGridController implements EzGridController, SortingProvid
91
99
  private onSelectionChange;
92
100
  private onRowDoubleClick;
93
101
  private conditionalSet;
94
- private getColumnWidth;
102
+ setCellEditors(customEditors: Map<string, ICustomEditorInfo>): void;
103
+ setCellRenders(customRenders: Map<string, ICustomRenderInfo>): void;
95
104
  }
@@ -15,6 +15,7 @@ export default class DataSource implements IServerSideDatasource {
15
15
  private isSilentChange;
16
16
  constructor(dataUnit: DataUnit, controller: EzGridController, options: EzGridOptions);
17
17
  private updateSelection;
18
+ setAutoFocus(autoFocus: boolean): void;
18
19
  getRows(params: IServerSideGetRowsParams): void;
19
20
  needReload(currentLoading: IServerSideGetRowsParams): boolean;
20
21
  private callbackGetRows;
@@ -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
- constructor(dataUnit: DataUnit, useEnterLikeTab: boolean, recordsValidator: IRecordValidator, editionIsDisabled: () => boolean);
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
  }
@@ -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 {};
@@ -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 {};
@@ -0,0 +1,11 @@
1
+ import { DataType, UserInterface } from "@sankhyalabs/core";
2
+ export declare const metadata: {
3
+ name: string;
4
+ label: string;
5
+ fields: {
6
+ name: string;
7
+ label: string;
8
+ dataType: DataType;
9
+ userInterface: UserInterface;
10
+ }[];
11
+ };
@@ -0,0 +1,11 @@
1
+ import { DataType, UserInterface } from "@sankhyalabs/core";
2
+ export declare const metadata: {
3
+ name: string;
4
+ label: string;
5
+ fields: {
6
+ name: string;
7
+ label: string;
8
+ dataType: DataType;
9
+ userInterface: UserInterface;
10
+ }[];
11
+ };
@@ -1,10 +1,16 @@
1
1
  import { ICellEditorComp, ICellEditorParams } from "ag-grid-community";
2
+ import { Record } from "@sankhyalabs/core";
3
+ import { IEditorMetadata } from "./IEditorMetadata";
2
4
  export default class EzCellEditor implements ICellEditorComp {
3
5
  private _gui;
6
+ private _fieldMetadata;
7
+ private _rowData;
4
8
  init(params: ICellEditorParams): void;
5
9
  getGui(): HTMLElement;
6
10
  afterGuiAttached(): void;
7
11
  focusIn(): void;
8
12
  getValue(): any;
9
13
  isPopup(): boolean;
14
+ getFieldMetadata(): IEditorMetadata;
15
+ getRecord(): Record;
10
16
  }
@@ -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
+ }
@@ -0,0 +1,6 @@
1
+ import { DataUnit } from "@sankhyalabs/core";
2
+ export declare const gridEditionImplementation: {
3
+ getComponents: () => {};
4
+ configureGrid: (option: any) => any;
5
+ };
6
+ export declare function buildOptions(dataUnit: DataUnit): any;
@@ -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
  */
@@ -85,6 +90,10 @@ export declare class EzGrid {
85
90
  * Define se a edição está habilitada na grid.
86
91
  */
87
92
  canEdit: boolean;
93
+ /**
94
+ * Define se a grid será focada ao ser carregada.
95
+ */
96
+ autoFocus?: boolean;
88
97
  /**
89
98
  * Aplica a definição de colunas.
90
99
  */
@@ -125,6 +134,30 @@ export declare class EzGrid {
125
134
  * Usa um argumento para filtrar as colunas po label
126
135
  */
127
136
  filterColumns(search: string): Promise<Array<EzGridColumn>>;
137
+ /**
138
+ * Registra um editor customizado para campos da grade e formulário.
139
+ */
140
+ addCustomEditor(fieldName: string, customEditor: ICustomEditor, detailContext?: string): Promise<void>;
141
+ /**
142
+ * Registra um render customizado para colunas da grid.
143
+ */
144
+ addGridCustomRender(fieldName: string, customRender: ICustomRender, detailContext?: string): Promise<void>;
145
+ /**
146
+ * Registra um formatador de valores para uma coluna da grid.
147
+ */
148
+ addCustomValueFormatter(columnName: string, customFormatter: ICustomFormatter): Promise<void>;
149
+ /**
150
+ * Remove o formatador de valores de uma coluna da grid.
151
+ */
152
+ removeCustomValueFormatter(columnName: string): Promise<void>;
153
+ /**
154
+ * Atualiza linhas da grade.
155
+ */
156
+ refreshSelectedRows(): Promise<void>;
157
+ /**
158
+ * Retorna o formatador customizado da coluna caso exista.
159
+ */
160
+ getCustomValueFormatter(columnName: string): Promise<ICustomFormatter | undefined>;
128
161
  /**
129
162
  * Atribui o foco para a grade.
130
163
  */
@@ -0,0 +1,5 @@
1
+ import { EzGridColumn } from "../controller/EzGridController";
2
+ export interface ICustomFormatter {
3
+ format: (currentValue: any, column: EzGridColumn, recordId: string) => any;
4
+ refreshSelectedRows: () => void;
5
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './ISelection';
2
2
  export * from './ISelectionToastConfig';
3
3
  export * from './IColumnFilter';
4
+ export * from './ICustomFormatter';
@@ -0,0 +1,2 @@
1
+ import { DataUnit } from "@sankhyalabs/core";
2
+ export declare function getDataUnit(): DataUnit;
@@ -77,6 +77,10 @@ export declare class EzList {
77
77
  * Emitido quando acontece a alteração de um item do checkbox.
78
78
  */
79
79
  ezCheckChange?: EventEmitter<ListItem>;
80
+ /**
81
+ * Emitido quando ocorre um duplo clique em um item da lista.
82
+ */
83
+ ezDoubleClick?: EventEmitter<ListItem>;
80
84
  /**
81
85
  * Limpa o histórico da lista.
82
86
  */
@@ -129,5 +133,6 @@ export declare class EzList {
129
133
  showOverlays(groupDragStart: any): void;
130
134
  hideOverlays(): void;
131
135
  getContainerItemBuilder(slotPosition: 'left' | 'right', item: ListItem, group?: ListGroup, className?: string): HTMLElement;
136
+ doubleClickItem(item: ListItem): void;
132
137
  render(): any;
133
138
  }
@@ -31,6 +31,10 @@ export declare class EzModal {
31
31
  * Define se o modal será fechado ao clicar fora do conteúdo.
32
32
  */
33
33
  closeOutsideClick: boolean;
34
+ /**
35
+ * Define se o modal será fechado se o mouse sair para fora do conteúdo.
36
+ */
37
+ closeOutsideLeave?: boolean;
34
38
  /**
35
39
  * Define o tipo de scrim a ser aplicado no overlay do modal
36
40
  */
@@ -57,5 +61,6 @@ export declare class EzModal {
57
61
  componentDidLoad(): void;
58
62
  componentDidRender(): void;
59
63
  onMouseDownHandler(event: any): void;
64
+ onMouseLeaveHandler(): void;
60
65
  render(): any;
61
66
  }
@@ -32,6 +32,10 @@ export declare class EzModalContainer {
32
32
  * Define o estado do botão de confirmação.
33
33
  */
34
34
  okButtonStatus: "HIDDEN" | "ENABLED" | "DISABLED";
35
+ /**
36
+ * Define a visibilidade do botão de fechar.
37
+ */
38
+ showCloseButton?: boolean;
35
39
  /**
36
40
  * Representa a interação com o usuário.
37
41
  * OK - Quando o botão é acionado
@@ -7,6 +7,7 @@ export declare class EzNumberInput {
7
7
  private _changePending;
8
8
  private _valuePromiseCallbacks;
9
9
  private _elem;
10
+ private _value;
10
11
  /**
11
12
  * Emitido quando acontece a alteração de valor do campo.
12
13
  */
@@ -68,6 +69,8 @@ export declare class EzNumberInput {
68
69
  observeLabel(): void;
69
70
  observeErrorMessage(): void;
70
71
  observeValue(newValue: number, oldValue: number): void;
72
+ observePrecision(): void;
73
+ private handleNewValue;
71
74
  private validateValue;
72
75
  private getTextValue;
73
76
  private changeValue;
@@ -15,10 +15,10 @@ export declare class EzSearch {
15
15
  private _tabPressed;
16
16
  private _textEmptyList;
17
17
  private _textEmptySearch;
18
- private _lookupMode;
19
18
  private _resizeObserver;
20
19
  private _startHighlightTag;
21
20
  private _endHighlightTag;
21
+ private _currentValue;
22
22
  private el;
23
23
  private _preSelection;
24
24
  private _visibleOptions;
@@ -99,7 +99,8 @@ export declare class EzSearch {
99
99
  */
100
100
  fromGrid: boolean;
101
101
  observeErrorMessage(): void;
102
- observeValue(newValue: IOption | string, oldValue: IOption | string): void;
102
+ private validateNewValue;
103
+ observeValue(newValue: IOption | string, oldValue: IOption | string): Promise<void>;
103
104
  observeOptions(newOptions: IOption[], oldOptions: IOption[]): void;
104
105
  getValueAsync(): Promise<unknown>;
105
106
  /**
@@ -119,6 +120,7 @@ export declare class EzSearch {
119
120
  */
120
121
  clearValue(): Promise<void>;
121
122
  scrollListener(): void;
123
+ private handleValueAsString;
122
124
  private updateListPosition;
123
125
  private getListPosition;
124
126
  private isDifferentValues;
@@ -0,0 +1,57 @@
1
+ import { EventEmitter } from "../../stencil-public-runtime";
2
+ import { ModeMenuEnum, SizeMenuEnum, TypeMenuEnum } from "./interfaces";
3
+ export declare class EzSidebarNavigator {
4
+ _element: HTMLElement;
5
+ /**
6
+ * Define o tipo do menu (float, fixed ou dynamic (livre)).
7
+ */
8
+ type: TypeMenuEnum;
9
+ /**
10
+ * Define se o menu será do tipo FIXED ou FLOAT.
11
+ */
12
+ mode: ModeMenuEnum;
13
+ /**
14
+ * Define o tamanho do menu (small, medium, large).
15
+ */
16
+ size: SizeMenuEnum;
17
+ /**
18
+ * Define se terá responsividade, Controle deverá ser pelo CSS.
19
+ */
20
+ isResponsive: boolean;
21
+ /**
22
+ * Define o título do Sidebar Navigator
23
+ */
24
+ titleMenu: string;
25
+ /**
26
+ * Define se o botão de "Recolher Menu" será exibido
27
+ */
28
+ showCollapseMenu: boolean;
29
+ /**
30
+ * Define se o botão de "Fixar Menu" será exibido
31
+ */
32
+ showFixedButton: boolean;
33
+ /**
34
+ * Define se o sidebar está aberto.
35
+ */
36
+ open: boolean;
37
+ /**
38
+ * Evento emitido sempre que o modo (FLOAT ou FIXED) do menu for alterado..
39
+ */
40
+ ezChangeMode: EventEmitter<ModeMenuEnum>;
41
+ /**
42
+ * Método para fixar/desafixar o menu, emitindo o evento ezChangeMode.
43
+ */
44
+ changeModeMenu(): Promise<void>;
45
+ /**
46
+ * Método para fechar o menu automaticamente após uma ação, fluxo, etc.
47
+ */
48
+ closeSidebar(): Promise<void>;
49
+ /**
50
+ * Método para abrir o menu automaticamente após uma ação, fluxo, etc.
51
+ */
52
+ openSidebar(): Promise<void>;
53
+ private handleToggleSidebar;
54
+ private handleToggleMode;
55
+ componentDidLoad(): void;
56
+ render(): any;
57
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ModeMenuEnum {
2
+ FLOAT = "float",
3
+ FIXED = "fixed"
4
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum SizeMenuEnum {
2
+ SMALL = "sm",
3
+ MEDIUM = "md",
4
+ LARGE = "lg"
5
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum TypeMenuEnum {
2
+ FLOAT = "float",
3
+ FIXED = "fixed",
4
+ DYNAMIC = "dynamic"
5
+ }
@@ -0,0 +1,3 @@
1
+ export * from './ModeMenuEnum';
2
+ export * from './SizeMenuEnum';
3
+ export * from './TypeMenuEnum';
@@ -0,0 +1,5 @@
1
+ export declare const MESSAGES: {
2
+ HIDE_MENU: string;
3
+ UN_PIN_MENU: string;
4
+ PUSH_PIN_MENU: string;
5
+ };
@@ -27,7 +27,8 @@ export declare class EzTabselector {
27
27
  */
28
28
  ezChange: EventEmitter<Tab>;
29
29
  observeTabs(newValue: string | Array<Tab>, oldValue: string | Array<Tab>): void;
30
- handleTabClick(tab: Tab): void;
30
+ goToTab(tabIndex: number, silent?: boolean): Promise<void>;
31
+ handleTabClick(tab: Tab, emitChange?: boolean): void;
31
32
  componentWillLoad(): void;
32
33
  private processesTabs;
33
34
  componentDidRender(): void;