@sankhyalabs/ezui 5.21.2 → 5.22.0-dev.2

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 (181) 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 +34 -3
  8. package/dist/cjs/ez-form.cjs.entry.js +77 -2
  9. package/dist/cjs/ez-grid.cjs.entry.js +313 -39
  10. package/dist/cjs/ez-list.cjs.entry.js +10 -2
  11. package/dist/cjs/ez-number-input.cjs.entry.js +37 -31
  12. package/dist/cjs/ez-scroller_2.cjs.entry.js +222 -0
  13. package/dist/cjs/ez-search.cjs.entry.js +39 -32
  14. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +92 -0
  15. package/dist/cjs/ez-split-item.cjs.entry.js +1 -0
  16. package/dist/cjs/{ez-scroller_3.cjs.entry.js → ez-tree.cjs.entry.js} +0 -215
  17. package/dist/cjs/ezui.cjs.js +1 -1
  18. package/dist/cjs/index-a7b0c73d.js +16 -4
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/collection/collection-manifest.json +3 -0
  21. package/dist/collection/components/ez-chart/components/BarChart.js +27 -0
  22. package/dist/collection/components/ez-chart/components/ColumnChart.js +27 -0
  23. package/dist/collection/components/ez-chart/components/DonutChart.js +42 -0
  24. package/dist/collection/components/ez-chart/components/LineChart.js +27 -0
  25. package/dist/collection/components/ez-chart/components/PieChart.js +45 -0
  26. package/dist/collection/components/ez-chart/components/index.js +5 -0
  27. package/dist/collection/components/ez-chart/ez-chart.css +5 -0
  28. package/dist/collection/components/ez-chart/ez-chart.js +286 -0
  29. package/dist/collection/components/ez-chart/interfaces/ChartAxis.js +1 -0
  30. package/dist/collection/components/ez-chart/interfaces/ChartContext.js +14 -0
  31. package/dist/collection/components/ez-chart/interfaces/ChartOptions.js +1 -0
  32. package/dist/collection/components/ez-chart/interfaces/ChartSerie.js +1 -0
  33. package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js +1 -0
  34. package/dist/collection/components/ez-chart/interfaces/ChartType.js +8 -0
  35. package/dist/collection/components/ez-chart/interfaces/index.js +5 -0
  36. package/dist/collection/components/ez-chart/test/mock-chart.js +137 -0
  37. package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js +146 -0
  38. package/dist/collection/components/ez-form/ez-form.js +130 -4
  39. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +278 -0
  40. package/dist/collection/components/ez-form-view/ez-form-view.js +110 -1
  41. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +3 -2
  42. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +51 -22
  43. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +6 -1
  44. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +35 -1
  45. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +59 -0
  46. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js +40 -0
  47. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js +11 -0
  48. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js +11 -0
  49. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +10 -3
  50. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js +40 -0
  51. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js +1 -0
  52. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +3 -2
  53. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +40 -0
  54. package/dist/collection/components/ez-grid/ez-grid.js +237 -12
  55. package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js +1 -0
  56. package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
  57. package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js +19 -0
  58. package/dist/collection/components/ez-list/ez-list.js +28 -2
  59. package/dist/collection/components/ez-number-input/ez-number-input.js +46 -31
  60. package/dist/collection/components/ez-search/ez-search.js +38 -32
  61. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +6 -2
  62. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
  63. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +180 -0
  64. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js +293 -0
  65. package/dist/collection/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.js +5 -0
  66. package/dist/collection/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.js +6 -0
  67. package/dist/collection/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.js +6 -0
  68. package/dist/collection/components/ez-sidebar-navigator/interfaces/index.js +3 -0
  69. package/dist/collection/components/ez-sidebar-navigator/messages/constants.js +5 -0
  70. package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js +5 -0
  71. package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js +1 -0
  72. package/dist/collection/utils/customRender/interfaces/ICustomRender.js +5 -0
  73. package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js +1 -0
  74. package/dist/collection/utils/form/DataBinder.js +26 -0
  75. package/dist/collection/utils/form/test/DataBinder.test.js +41 -4
  76. package/dist/collection/utils/form/test/resources/metadataTest.js +15 -0
  77. package/dist/collection/utils/index.js +2 -0
  78. package/dist/custom-elements/index.d.ts +18 -0
  79. package/dist/custom-elements/index.js +1147 -117
  80. package/dist/esm/ICustomRender-875b5a40.js +13 -0
  81. package/dist/esm/ez-actions-button.entry.js +1 -0
  82. package/dist/esm/ez-chart.entry.js +431 -0
  83. package/dist/esm/ez-collapsible-box.entry.js +1 -0
  84. package/dist/esm/ez-combo-box.entry.js +1 -0
  85. package/dist/esm/{ez-text-edit.entry.js → ez-custom-form-input_2.entry.js} +101 -3
  86. package/dist/esm/ez-form-view.entry.js +34 -3
  87. package/dist/esm/ez-form.entry.js +78 -3
  88. package/dist/esm/ez-grid.entry.js +313 -39
  89. package/dist/esm/ez-list.entry.js +10 -2
  90. package/dist/esm/ez-number-input.entry.js +38 -32
  91. package/dist/esm/ez-scroller_2.entry.js +217 -0
  92. package/dist/esm/ez-search.entry.js +39 -32
  93. package/dist/esm/ez-sidebar-navigator.entry.js +88 -0
  94. package/dist/esm/ez-split-item.entry.js +1 -0
  95. package/dist/esm/{ez-scroller_3.entry.js → ez-tree.entry.js} +3 -216
  96. package/dist/esm/ezui.js +1 -1
  97. package/dist/esm/index-baa5e267.js +16 -4
  98. package/dist/esm/loader.js +1 -1
  99. package/dist/ezui/ezui.esm.js +1 -1
  100. package/dist/ezui/p-12ae1104.entry.js +1 -0
  101. package/dist/ezui/p-2097d0cf.entry.js +1 -0
  102. package/dist/ezui/p-3b4eeeb6.entry.js +1 -0
  103. package/dist/ezui/p-4607fb89.js +1 -0
  104. package/dist/ezui/p-4d5235f1.entry.js +1 -0
  105. package/dist/ezui/p-5056284a.entry.js +1 -0
  106. package/dist/ezui/p-5b205c80.entry.js +1 -0
  107. package/dist/ezui/p-7922142b.entry.js +1 -0
  108. package/dist/ezui/{p-fbee26ec.entry.js → p-816cece6.entry.js} +2 -2
  109. package/dist/ezui/p-84e439b9.entry.js +1 -0
  110. package/dist/ezui/p-8888d9ed.entry.js +1 -0
  111. package/dist/ezui/p-922ac38b.entry.js +1 -0
  112. package/dist/ezui/p-9ab22a07.entry.js +1 -0
  113. package/dist/ezui/p-a31b9c90.entry.js +1 -0
  114. package/dist/ezui/p-bcb53f27.entry.js +1 -0
  115. package/dist/ezui/p-ecc2c1ec.entry.js +1 -0
  116. package/dist/types/components/ez-chart/components/BarChart.d.ts +9 -0
  117. package/dist/types/components/ez-chart/components/ColumnChart.d.ts +9 -0
  118. package/dist/types/components/ez-chart/components/DonutChart.d.ts +9 -0
  119. package/dist/types/components/ez-chart/components/LineChart.d.ts +9 -0
  120. package/dist/types/components/ez-chart/components/PieChart.d.ts +9 -0
  121. package/dist/types/components/ez-chart/components/index.d.ts +5 -0
  122. package/dist/types/components/ez-chart/ez-chart.d.ts +58 -0
  123. package/dist/types/components/ez-chart/interfaces/ChartAxis.d.ts +7 -0
  124. package/dist/types/components/ez-chart/interfaces/ChartContext.d.ts +11 -0
  125. package/dist/types/components/ez-chart/interfaces/ChartOptions.d.ts +10 -0
  126. package/dist/types/components/ez-chart/interfaces/ChartSerie.d.ts +20 -0
  127. package/dist/types/components/ez-chart/interfaces/ChartStrategies.d.ts +7 -0
  128. package/dist/types/components/ez-chart/interfaces/ChartType.d.ts +7 -0
  129. package/dist/types/components/ez-chart/interfaces/index.d.ts +5 -0
  130. package/dist/types/components/ez-chart/types/BaseHighChartsRender.d.ts +15 -0
  131. package/dist/types/components/ez-form/ez-form.d.ts +20 -1
  132. package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +48 -0
  133. package/dist/types/components/ez-form-view/ez-form-view.d.ts +16 -1
  134. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +37 -0
  135. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +13 -4
  136. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
  137. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -1
  138. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +19 -0
  139. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +14 -0
  140. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.d.ts +11 -0
  141. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.d.ts +11 -0
  142. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +6 -0
  143. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +15 -0
  144. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellRender.d.ts +10 -0
  145. package/dist/types/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.d.ts +6 -0
  146. package/dist/types/components/ez-grid/ez-grid.d.ts +35 -1
  147. package/dist/types/components/ez-grid/interfaces/ICustomFormatter.d.ts +5 -0
  148. package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
  149. package/dist/types/components/ez-grid/test/resources/gridDataUnit.d.ts +2 -0
  150. package/dist/types/components/ez-list/ez-list.d.ts +5 -0
  151. package/dist/types/components/ez-number-input/ez-number-input.d.ts +3 -0
  152. package/dist/types/components/ez-search/ez-search.d.ts +4 -2
  153. package/dist/types/components/ez-sidebar-navigator/ez-sidebar-navigator.d.ts +57 -0
  154. package/dist/types/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.d.ts +4 -0
  155. package/dist/types/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.d.ts +5 -0
  156. package/dist/types/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.d.ts +5 -0
  157. package/dist/types/components/ez-sidebar-navigator/interfaces/index.d.ts +3 -0
  158. package/dist/types/components/ez-sidebar-navigator/messages/constants.d.ts +5 -0
  159. package/dist/types/components.d.ts +334 -5
  160. package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +31 -0
  161. package/dist/types/utils/customEditor/interfaces/ICustomEditorInfo.d.ts +5 -0
  162. package/dist/types/utils/customRender/interfaces/ICustomRender.d.ts +29 -0
  163. package/dist/types/utils/customRender/interfaces/ICustomRenderInfo.d.ts +5 -0
  164. package/dist/types/utils/form/DataBinder.d.ts +3 -0
  165. package/dist/types/utils/form/test/resources/metadataTest.d.ts +2 -0
  166. package/dist/types/utils/index.d.ts +2 -0
  167. package/package.json +2 -1
  168. package/react/components.d.ts +3 -0
  169. package/react/components.js +3 -0
  170. package/react/components.js.map +1 -1
  171. package/dist/ezui/p-0447d17c.entry.js +0 -1
  172. package/dist/ezui/p-20ec22c0.entry.js +0 -1
  173. package/dist/ezui/p-2a1a0e04.entry.js +0 -1
  174. package/dist/ezui/p-637f69f2.entry.js +0 -1
  175. package/dist/ezui/p-786559c5.entry.js +0 -1
  176. package/dist/ezui/p-7c770f14.entry.js +0 -1
  177. package/dist/ezui/p-91f626d3.entry.js +0 -1
  178. package/dist/ezui/p-99ead599.entry.js +0 -1
  179. package/dist/ezui/p-b567fa8c.entry.js +0 -1
  180. package/dist/ezui/p-bae3d0aa.entry.js +0 -1
  181. package/dist/ezui/p-db77a984.entry.js +0 -1
@@ -8,6 +8,7 @@ const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
8
8
  const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
+ const ICustomRender = require('./ICustomRender-6fafffce.js');
11
12
  const constants = require('./constants-2714478b.js');
12
13
  const RecordValidationProcessor = require('./RecordValidationProcessor-4c893e04.js');
13
14
 
@@ -118861,7 +118862,9 @@ class DataSource {
118861
118862
  }
118862
118863
  }
118863
118864
  handleFocusFirstRow() {
118864
- this._controller.setFocusFirstRow();
118865
+ if (this._options.autoFocus) {
118866
+ this._controller.setFocusFirstRow();
118867
+ }
118865
118868
  }
118866
118869
  isSilentChange(action) {
118867
118870
  //TODO: Provisorio p/ não atualizar a grade quando a alteração for apenas de campos transisntes
@@ -118937,6 +118940,9 @@ class DataSource {
118937
118940
  this._controller.selectRows(selectionInfo.recordIds, true);
118938
118941
  }
118939
118942
  }
118943
+ setAutoFocus(autoFocus) {
118944
+ this._options.autoFocus = autoFocus;
118945
+ }
118940
118946
  getRows(params) {
118941
118947
  if (this.needReload(params)) {
118942
118948
  this._lastLoadingParams = params;
@@ -119322,8 +119328,9 @@ const buildDateTime = ({ readOnly }) => {
119322
119328
  };
119323
119329
 
119324
119330
  const buildDecimal = ({ readOnly, props }) => {
119325
- const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
119326
- const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
119331
+ var _a, _b;
119332
+ const precision = Number((_a = props === null || props === void 0 ? void 0 : props.precision) !== null && _a !== void 0 ? _a : 2);
119333
+ const prettyPrecision = Number((_b = props === null || props === void 0 ? void 0 : props.prettyPrecision) !== null && _b !== void 0 ? _b : precision);
119327
119334
  return buildNumeric(readOnly, precision, prettyPrecision);
119328
119335
  };
119329
119336
  const buildInteger = ({ readOnly }) => {
@@ -119416,11 +119423,12 @@ uiBuilders.set(core.UserInterface.LONGTEXT, buildTextAreaInput);
119416
119423
  uiBuilders.set(core.UserInterface.SEARCH, buildSearch);
119417
119424
  class EzCellEditor {
119418
119425
  init(params) {
119426
+ this._rowData = params.data;
119419
119427
  const fieldName = params.column.getColId();
119420
119428
  const dataUnit = params.context.dataUnit;
119421
- const fieldMetadata = buildEditorMetadata(dataUnit.getField(fieldName), params.eGridCell, dataUnit, params.context.editionManager);
119422
- const builder = uiBuilders.get(fieldMetadata.userInterface) || buildTextInput;
119423
- this._gui = builder(fieldMetadata);
119429
+ this._fieldMetadata = buildEditorMetadata(dataUnit.getField(fieldName), params.eGridCell, dataUnit, params.context.editionManager);
119430
+ const builder = uiBuilders.get(this._fieldMetadata.userInterface) || buildTextInput;
119431
+ this._gui = builder(this._fieldMetadata);
119424
119432
  if (this._gui.valueSetter != undefined) {
119425
119433
  this._gui.valueSetter(params.value);
119426
119434
  }
@@ -119444,10 +119452,151 @@ class EzCellEditor {
119444
119452
  isPopup() {
119445
119453
  return this._gui.isPopUp;
119446
119454
  }
119455
+ getFieldMetadata() {
119456
+ return this._fieldMetadata;
119457
+ }
119458
+ getRecord() {
119459
+ return this._rowData;
119460
+ }
119461
+ }
119462
+
119463
+ class EzGridCustomCellEditor extends EzCellEditor {
119464
+ init(params) {
119465
+ var _a, _b;
119466
+ this._value = params.value;
119467
+ this._fieldName = params.column.getColId();
119468
+ this._customEditorInstance = params.customEditorsInfo.customEditor;
119469
+ super.init(params);
119470
+ this._defaultGui = this.getDefaultGui();
119471
+ const fieldMetadata = super.getFieldMetadata();
119472
+ this._params = {
119473
+ value: params.value,
119474
+ charPress: params.charPress,
119475
+ currentEditor: this._defaultGui,
119476
+ name: this._fieldName,
119477
+ source: ICustomRender.CustomEditorSource.GRID,
119478
+ detailContext: params.customEditorsInfo.detailContext,
119479
+ setValue: (value) => this.setValue(value),
119480
+ getValue: () => this.getValue(),
119481
+ record: super.getRecord(),
119482
+ editorMetadata: {
119483
+ hidden: ((_a = fieldMetadata.props) === null || _a === void 0 ? void 0 : _a.visible) === false,
119484
+ label: fieldMetadata.label,
119485
+ userInterface: fieldMetadata.userInterface,
119486
+ props: fieldMetadata.props,
119487
+ optionLoader: fieldMetadata.optionLoader,
119488
+ options: ((_b = fieldMetadata.props) === null || _b === void 0 ? void 0 : _b.options) || {},
119489
+ },
119490
+ };
119491
+ }
119492
+ getDefaultGui() {
119493
+ const gui = super.getGui();
119494
+ gui.value = this._value;
119495
+ gui.onkeyup = (event) => {
119496
+ const value = event.target.value;
119497
+ this.setValue(value);
119498
+ };
119499
+ return gui;
119500
+ }
119501
+ getGui() {
119502
+ const editorElement = this._customEditorInstance.getEditorElement(this._params);
119503
+ if (!editorElement) {
119504
+ return this._defaultGui;
119505
+ }
119506
+ if (typeof editorElement === 'string') {
119507
+ const element = core.HTMLBuilder.parseElement(editorElement);
119508
+ return element;
119509
+ }
119510
+ return editorElement;
119511
+ }
119512
+ setValue(value) {
119513
+ this._value = value;
119514
+ }
119515
+ getValue() {
119516
+ return this._value;
119517
+ }
119518
+ }
119519
+
119520
+ class EzCellRender {
119521
+ init(params) {
119522
+ const span = document.createElement('span');
119523
+ this._currentParams = params;
119524
+ span.textContent = params.value;
119525
+ const fieldName = params.column.getColId();
119526
+ const dataUnit = params.context.dataUnit;
119527
+ this._fieldMetadata = buildEditorMetadata(dataUnit.getField(fieldName), params.eGridCell, dataUnit, params.context.editionManager);
119528
+ this._gui = span;
119529
+ }
119530
+ refresh() {
119531
+ try {
119532
+ this._currentParams.refreshCell();
119533
+ return true;
119534
+ }
119535
+ catch (_a) {
119536
+ return false;
119537
+ }
119538
+ }
119539
+ getGui() {
119540
+ return this._gui;
119541
+ }
119542
+ afterGuiAttached() {
119543
+ this.focusIn();
119544
+ }
119545
+ focusIn() {
119546
+ this._gui.focus();
119547
+ this._gui.setFocus({ selectText: true });
119548
+ }
119549
+ getValue() {
119550
+ return this._currentParams.getValue();
119551
+ }
119552
+ isPopup() {
119553
+ return this._gui.isPopUp;
119554
+ }
119555
+ getFieldMetadata() {
119556
+ return this._fieldMetadata;
119557
+ }
119558
+ }
119559
+
119560
+ class EzGridCustomCellRender extends EzCellRender {
119561
+ init(params) {
119562
+ var _a, _b;
119563
+ this._fieldName = params.column.getColId();
119564
+ this._customRenderInstance = params.customRendersInfo.customRender;
119565
+ super.init(params);
119566
+ const fieldMetadata = super.getFieldMetadata();
119567
+ this._params = {
119568
+ value: params.value,
119569
+ charPress: '',
119570
+ currentRender: super.getGui(),
119571
+ name: this._fieldName,
119572
+ source: ICustomRender.CustomRenderSource.GRID,
119573
+ getValue: () => params.getValue(),
119574
+ detailContext: params.customRendersInfo.detailContext,
119575
+ renderMetadata: {
119576
+ hidden: ((_a = fieldMetadata.props) === null || _a === void 0 ? void 0 : _a.visible) === false,
119577
+ label: fieldMetadata.label,
119578
+ userInterface: fieldMetadata.userInterface,
119579
+ props: fieldMetadata.props,
119580
+ optionLoader: fieldMetadata.optionLoader,
119581
+ options: ((_b = fieldMetadata.props) === null || _b === void 0 ? void 0 : _b.options) || {},
119582
+ }
119583
+ };
119584
+ }
119585
+ getGui() {
119586
+ const editorElement = this._customRenderInstance.getRenderElement(this._params);
119587
+ if (!editorElement) {
119588
+ return super.getGui();
119589
+ }
119590
+ if (typeof editorElement === 'string') {
119591
+ const element = core.HTMLBuilder.parseElement(editorElement);
119592
+ return element;
119593
+ }
119594
+ return editorElement;
119595
+ }
119447
119596
  }
119448
119597
 
119449
119598
  class GridEditionManager {
119450
- constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled) {
119599
+ constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders) {
119451
119600
  this._dataUnit = dataUnit;
119452
119601
  this._recordValidationProcessor = new RecordValidationProcessor.RecordValidationProcessor(this._dataUnit, {
119453
119602
  getRequiredFields: () => this.getRequiredFields(),
@@ -119456,6 +119605,8 @@ class GridEditionManager {
119456
119605
  }, recordsValidator);
119457
119606
  this._useEnterLikeTab = useEnterLikeTab;
119458
119607
  this._editionIsDisabled = editionIsDisabled;
119608
+ this._customEditors = customEditors;
119609
+ this._customRenders = customRenders;
119459
119610
  }
119460
119611
  configureGrid(options) {
119461
119612
  this._gridOptions = options;
@@ -119522,6 +119673,30 @@ class GridEditionManager {
119522
119673
  col.suppressKeyboardEvent = (params) => {
119523
119674
  return params.event.key === KeyCode.ENTER;
119524
119675
  };
119676
+ col.cellEditorSelector = (params) => {
119677
+ var _a;
119678
+ if ((_a = this._customEditors) === null || _a === void 0 ? void 0 : _a.has(params.colDef.field)) {
119679
+ const customEditor = this._customEditors.get(params.colDef.field);
119680
+ return {
119681
+ component: EzGridCustomCellEditor,
119682
+ params: {
119683
+ customEditorsInfo: customEditor,
119684
+ }
119685
+ };
119686
+ }
119687
+ };
119688
+ col.cellRendererSelector = (params) => {
119689
+ var _a;
119690
+ if ((_a = this._customRenders) === null || _a === void 0 ? void 0 : _a.has(params.colDef.field)) {
119691
+ const customRender = this._customRenders.get(params.colDef.field);
119692
+ return {
119693
+ component: EzGridCustomCellRender,
119694
+ params: {
119695
+ customRendersInfo: customRender,
119696
+ }
119697
+ };
119698
+ }
119699
+ };
119525
119700
  return col;
119526
119701
  }
119527
119702
  getRequiredFields() {
@@ -119667,6 +119842,12 @@ class GridEditionManager {
119667
119842
  this._lastCellEdited = { rowIndex: event.rowIndex, column: event.column, rowPinned: undefined };
119668
119843
  }
119669
119844
  }
119845
+ setCellEditors(customEditors) {
119846
+ this._customEditors = customEditors;
119847
+ }
119848
+ setCellRenders(customRenders) {
119849
+ this._customRenders = customRenders;
119850
+ }
119670
119851
  }
119671
119852
  class TargetEdition {
119672
119853
  constructor(rowIndex, column, backwards) {
@@ -119703,14 +119884,13 @@ class AgGridController {
119703
119884
  this.STATUS_COL_ID = 'statusColumn';
119704
119885
  this.RECORD_ARCHIVE_COL_ID = '__RECORD_ARCHIVE__';
119705
119886
  this.BLOCK_LOAD_DEBOUNCE = 100;
119706
- this.DEFAULT_FONT_SIZE = 14;
119707
- this.DEFAULT_ICON_SIZE = 12;
119708
- this.DEFAULT_MAX_SIZE = 200;
119887
+ this.DOC_WIDTH = 1150;
119709
119888
  this._menuItems = [];
119710
119889
  this._idAttribName = '__record__id__';
119711
119890
  this._gridConfig = [];
119712
119891
  this._filteredColumns = new Map();
119713
119892
  this._filterColumnleftPosition = 0;
119893
+ this._customFormatters = new Map();
119714
119894
  this._enterprise = enterprise;
119715
119895
  }
119716
119896
  getGridConfig() {
@@ -119796,7 +119976,7 @@ class AgGridController {
119796
119976
  this._doubleClickCallBack = options.onDoubleClick;
119797
119977
  this._multipleSelection = options.allowMultipleSelection;
119798
119978
  this._dataUnit = options.dataUnit;
119799
- this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled);
119979
+ this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders);
119800
119980
  this._statusResolver = options.statusResolver;
119801
119981
  if (this._dataUnit) {
119802
119982
  this._dataUnit.sortingProvider = this;
@@ -119858,6 +120038,7 @@ class AgGridController {
119858
120038
  this.selectRows((selection === null || selection === void 0 ? void 0 : selection.recordIds) || [], true);
119859
120039
  }
119860
120040
  this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
120041
+ this._customFormatters = options.customFormatters;
119861
120042
  }
119862
120043
  }
119863
120044
  processFormatterCellCallback(params) {
@@ -120156,6 +120337,10 @@ class AgGridController {
120156
120337
  this.focusOnGridContainer();
120157
120338
  }
120158
120339
  }
120340
+ setAutoFocus(autoFocus) {
120341
+ var _a;
120342
+ (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.setAutoFocus(autoFocus);
120343
+ }
120159
120344
  setFocusFirstRow() {
120160
120345
  const firstRow = this._gridOptions.api.getDisplayedRowAtIndex(0);
120161
120346
  if (firstRow) {
@@ -120241,9 +120426,11 @@ class AgGridController {
120241
120426
  //Existem colunas implícitas que não tem estado, essas colunas são sempre as primeiras.
120242
120427
  //Como vamos reordenar, precisamos considerar o deslocamento provocado por elas.
120243
120428
  const columnsOffset = colDef.length - columns.length;
120429
+ this._gridConfig = state;
120244
120430
  let sort = [];
120245
- state.forEach((cfgColumn, index) => {
120246
- const colWidth = this.getColumnWidth(cfgColumn);
120431
+ state === null || state === void 0 ? void 0 : state.forEach((cfgColumn, index) => {
120432
+ var _a;
120433
+ const colWidth = (_a = this._gridOptions.columnApi.getColumn(cfgColumn.name)) === null || _a === void 0 ? void 0 : _a.getActualWidth();
120247
120434
  this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + columnsOffset);
120248
120435
  this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, colWidth);
120249
120436
  visibleColumns.push(cfgColumn.name);
@@ -120258,7 +120445,11 @@ class AgGridController {
120258
120445
  state: sort,
120259
120446
  defaultState: { sort: null },
120260
120447
  });
120261
- this._gridConfig = state;
120448
+ }
120449
+ getAdaptiveWidth(width) {
120450
+ const widthGrid = this._container.clientWidth;
120451
+ const adaptiveWidth = (this.DOC_WIDTH * width) / widthGrid;
120452
+ return Math.round(adaptiveWidth);
120262
120453
  }
120263
120454
  getColumnsState() {
120264
120455
  if (this._grid === undefined) {
@@ -120267,13 +120458,15 @@ class AgGridController {
120267
120458
  const colState = this._gridOptions.columnApi.getColumnState();
120268
120459
  return colState
120269
120460
  .map(s => {
120270
- const def = this._gridOptions.columnApi.getColumn(s.colId).getColDef();
120461
+ const column = this._gridOptions.columnApi.getColumn(s.colId);
120462
+ const def = column.getColDef();
120463
+ const width = this.getAdaptiveWidth(column.getActualWidth());
120271
120464
  const label = def.headerName;
120272
120465
  const name = def.checkboxSelection ? '__SELECTION__' : s.colId;
120273
120466
  const colState = { label, name };
120274
120467
  this.conditionalSet(colState, 'sort', s.sort);
120275
120468
  this.conditionalSet(colState, 'sortIndex', s.sortIndex);
120276
- this.conditionalSet(colState, 'width', s.width);
120469
+ this.conditionalSet(colState, 'width', width);
120277
120470
  this.conditionalSet(colState, 'pinned', s.pinned !== null);
120278
120471
  this.conditionalSet(colState, 'hidden', s.hide);
120279
120472
  const props = new Map();
@@ -120339,12 +120532,19 @@ class AgGridController {
120339
120532
  showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
120340
120533
  },
120341
120534
  valueFormatter: params => {
120342
- if (params.value === undefined) {
120535
+ if (params.value === undefined || params.value === null) {
120343
120536
  return "";
120344
120537
  }
120345
120538
  if (params.value instanceof Promise) {
120346
120539
  return "Carregando...";
120347
120540
  }
120541
+ const customFormatter = this._customFormatters.get(source.name);
120542
+ if (customFormatter) {
120543
+ const formattedValue = customFormatter.format(params.value, source, params.data.__record__id__);
120544
+ if (formattedValue) {
120545
+ return formattedValue;
120546
+ }
120547
+ }
120348
120548
  if (this._dataUnit) {
120349
120549
  return this._dataUnit.getFormattedValue(source.name, params.value);
120350
120550
  }
@@ -120353,6 +120553,13 @@ class AgGridController {
120353
120553
  cellStyle: this.getStyleByColumn(source),
120354
120554
  });
120355
120555
  }
120556
+ setCustomFormatters(customFormatters) {
120557
+ this._customFormatters = customFormatters;
120558
+ }
120559
+ refreshSelectedRows() {
120560
+ const selectedNodes = this._gridOptions.api.getSelectedNodes();
120561
+ this._gridOptions.api.redrawRows({ rowNodes: selectedNodes });
120562
+ }
120356
120563
  getInitCellStyle() {
120357
120564
  return {
120358
120565
  'line-height': this.getRowHeight() - 1 + 'px',
@@ -120513,20 +120720,23 @@ class AgGridController {
120513
120720
  host[attribute] = value;
120514
120721
  }
120515
120722
  }
120516
- getColumnWidth(cfgColumn) {
120517
- var _a, _b;
120518
- if (cfgColumn == undefined) {
120723
+ setCellEditors(customEditors) {
120724
+ var _a;
120725
+ if (!this._editionManager) {
120726
+ this._customEditors = customEditors;
120519
120727
  return;
120520
120728
  }
120521
- if (cfgColumn.customWidth != undefined) {
120522
- return cfgColumn.customWidth;
120523
- }
120524
- const field = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
120525
- if ((field === null || field === void 0 ? void 0 : field.userInterface) === core.UserInterface.SEARCH) {
120526
- return this.DEFAULT_MAX_SIZE;
120729
+ this._editionManager.setCellEditors(customEditors);
120730
+ (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
120731
+ }
120732
+ setCellRenders(customRenders) {
120733
+ var _a;
120734
+ if (!this._editionManager) {
120735
+ this._customRenders = customRenders;
120736
+ return;
120527
120737
  }
120528
- const labelSize = (((_b = field === null || field === void 0 ? void 0 : field.label) === null || _b === void 0 ? void 0 : _b.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
120529
- return labelSize > this.DEFAULT_MAX_SIZE ? this.DEFAULT_MAX_SIZE : labelSize;
120738
+ this._editionManager.setCellRenders(customRenders);
120739
+ (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
120530
120740
  }
120531
120741
  }
120532
120742
 
@@ -120753,6 +120963,8 @@ const EzGrid = class {
120753
120963
  this.componentReady = index.createEvent(this, "componentReady", 7);
120754
120964
  this._gridController = new AgGridController(false);
120755
120965
  this._messageFilterAppliedSuccess = 'Filtro de coluna aplicado com sucesso!';
120966
+ this._customEditor = new Map();
120967
+ this._customRenders = new Map();
120756
120968
  this._paginationInfo = undefined;
120757
120969
  this._paginationChangedByKeyboard = true;
120758
120970
  this._showSelectionCounter = false;
@@ -120760,6 +120972,7 @@ const EzGrid = class {
120760
120972
  this._currentPageSelected = undefined;
120761
120973
  this._selectionCount = undefined;
120762
120974
  this._hasLeftButtons = false;
120975
+ this._customFormatters = new Map();
120763
120976
  this.multipleSelection = undefined;
120764
120977
  this.config = undefined;
120765
120978
  this.selectionToastConfig = undefined;
@@ -120770,6 +120983,7 @@ const EzGrid = class {
120770
120983
  this.useEnterLikeTab = false;
120771
120984
  this.recordsValidator = undefined;
120772
120985
  this.canEdit = true;
120986
+ this.autoFocus = true;
120773
120987
  }
120774
120988
  /**
120775
120989
  * Aplica a definição de colunas.
@@ -120831,6 +121045,63 @@ const EzGrid = class {
120831
121045
  async filterColumns(search) {
120832
121046
  return Promise.resolve(this._gridController.getColumnsState().filter(col => matches(col.label, search)));
120833
121047
  }
121048
+ /**
121049
+ * Registra um editor customizado para campos da grade e formulário.
121050
+ */
121051
+ async addCustomEditor(fieldName, customEditor, detailContext) {
121052
+ const newCustomEditor = new Map(this._customEditor);
121053
+ newCustomEditor.set(fieldName, {
121054
+ customEditor,
121055
+ detailContext,
121056
+ });
121057
+ this._customEditor = newCustomEditor;
121058
+ this._gridController.setCellEditors(newCustomEditor);
121059
+ }
121060
+ /**
121061
+ * Registra um render customizado para colunas da grid.
121062
+ */
121063
+ async addGridCustomRender(fieldName, customRender, detailContext) {
121064
+ const newCustomRenders = new Map(this._customRenders);
121065
+ newCustomRenders.set(fieldName, { customRender, detailContext });
121066
+ this._customRenders = newCustomRenders;
121067
+ this._gridController.setCellRenders(newCustomRenders);
121068
+ }
121069
+ /**
121070
+ * Registra um formatador de valores para uma coluna da grid.
121071
+ */
121072
+ async addCustomValueFormatter(columnName, customFormatter) {
121073
+ if (!columnName || !customFormatter) {
121074
+ return;
121075
+ }
121076
+ const newCustomFormatters = new Map(this._customFormatters);
121077
+ newCustomFormatters.set(columnName, customFormatter);
121078
+ this._customFormatters = newCustomFormatters;
121079
+ this._gridController.setCustomFormatters(newCustomFormatters);
121080
+ }
121081
+ /**
121082
+ * Remove o formatador de valores de uma coluna da grid.
121083
+ */
121084
+ async removeCustomValueFormatter(columnName) {
121085
+ if (!columnName) {
121086
+ return;
121087
+ }
121088
+ const newCustomFormatters = new Map(this._customFormatters);
121089
+ newCustomFormatters.delete(columnName);
121090
+ this._customFormatters = newCustomFormatters;
121091
+ this._gridController.setCustomFormatters(newCustomFormatters);
121092
+ }
121093
+ /**
121094
+ * Atualiza linhas da grade.
121095
+ */
121096
+ async refreshSelectedRows() {
121097
+ this._gridController.refreshSelectedRows();
121098
+ }
121099
+ /**
121100
+ * Retorna o formatador customizado da coluna caso exista.
121101
+ */
121102
+ async getCustomValueFormatter(columnName) {
121103
+ return this._customFormatters.get(columnName);
121104
+ }
120834
121105
  /**
120835
121106
  * Atribui o foco para a grade.
120836
121107
  */
@@ -120990,7 +121261,9 @@ const EzGrid = class {
120990
121261
  const dataInfo = { dataUnit: this.dataUnit };
120991
121262
  core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
120992
121263
  const dtInfo = { id: 'ezGrid' };
120993
- core.ElementIDUtils.addIDInfo(this._refPaginationControl, 'pagination', dtInfo);
121264
+ if (this._refPaginationControl) {
121265
+ core.ElementIDUtils.addIDInfo(this._refPaginationControl, 'pagination', dtInfo);
121266
+ }
120994
121267
  }
120995
121268
  previousPage() {
120996
121269
  if (this.dataUnit) {
@@ -121010,14 +121283,10 @@ const EzGrid = class {
121010
121283
  (_a = this._gridApi) === null || _a === void 0 ? void 0 : _a.clearRangeSelection();
121011
121284
  }
121012
121285
  getPaginationControl() {
121013
- if (this._paginationInfo) {
121014
- const { currentPage, hasMore } = this._paginationInfo;
121015
- return [
121016
- index.h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium", ref: (element) => (this._refPaginationLabel = element) }, index.h("span", { class: "grid-header__pagination-label" }, index.h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, this._getActualPageLabel()), this._getRemainingPageLabel())),
121017
- index.h("div", { id: "grid-pagination-tooltip", ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, index.h("ez-button", { size: "small", class: "ez-margin-right--medium", iconName: "chevron-left", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), index.h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })),
121018
- ];
121019
- }
121020
- return null;
121286
+ if (!this._paginationInfo)
121287
+ return null;
121288
+ const { currentPage, hasMore } = this._paginationInfo;
121289
+ return (index.h("div", { class: "grid-header__container grid-header__pagination", ref: ref => (this._refPaginationControl = ref) }, index.h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium", ref: (element) => (this._refPaginationLabel = element) }, index.h("span", { class: "grid-header__pagination-label" }, index.h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, this._getActualPageLabel()), this._getRemainingPageLabel())), index.h("div", { id: "grid-pagination-tooltip", ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, index.h("ez-button", { size: "small", class: "ez-margin-right--medium", iconName: "chevron-left", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), index.h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" }))));
121021
121290
  }
121022
121291
  componentDidLoad() {
121023
121292
  this._gridController.initDatagrid(this._container, {
@@ -121039,6 +121308,8 @@ const EzGrid = class {
121039
121308
  useEnterLikeTab: this.useEnterLikeTab,
121040
121309
  recordsValidator: this.recordsValidator,
121041
121310
  editionIsDisabled: () => !this.canEdit,
121311
+ customFormatters: this._customFormatters,
121312
+ autoFocus: this.autoFocus,
121042
121313
  onRefresh: () => {
121043
121314
  if (this.dataUnit) {
121044
121315
  this.setSelection(this.dataUnit.getSelectionInfo());
@@ -121059,7 +121330,7 @@ const EzGrid = class {
121059
121330
  }
121060
121331
  handlePaginationChange(selectFirstRecord, paginationInfo) {
121061
121332
  var _a;
121062
- if (selectFirstRecord !== false) {
121333
+ if (selectFirstRecord !== false && this.autoFocus) {
121063
121334
  if (((_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) > (paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.currentPage) && this._paginationChangedByKeyboard) {
121064
121335
  this._gridController.setFocusLastRow();
121065
121336
  }
@@ -121129,6 +121400,9 @@ const EzGrid = class {
121129
121400
  if (!this.dataUnit.name.includes("InMemoryDataUnit"))
121130
121401
  return;
121131
121402
  }
121403
+ componentDidUpdate() {
121404
+ this._gridController.setAutoFocus(this.autoFocus);
121405
+ }
121132
121406
  getDataSource() {
121133
121407
  var _a;
121134
121408
  return (_a = this.columnfilterDataSource) !== null && _a !== void 0 ? _a : new InMemoryFilterColumnDataSource(this.dataUnit);
@@ -121138,7 +121412,7 @@ const EzGrid = class {
121138
121412
  }
121139
121413
  render() {
121140
121414
  var _a;
121141
- return (index.h(index.Host, { "no-header": this.hideHeader() }, index.h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), index.h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, index.h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), index.h("div", { class: "grid-header__position" }, index.h("div", { class: "grid-header__container grid-header__left-container" }, index.h("slot", { name: "leftButtons" })), index.h("div", { class: "grid-header__container grid-header__pagination", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), index.h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
121415
+ return (index.h(index.Host, { "no-header": this.hideHeader() }, index.h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), index.h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, index.h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), index.h("div", { class: "grid-header__position" }, index.h("div", { class: "grid-header__container grid-header__left-container" }, index.h("slot", { name: "leftButtons" })), this.getPaginationControl())), index.h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
121142
121416
  ${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
121143
121417
  ` }, index.h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), index.h("div", { class: "grid__footer" }, index.h("slot", { name: "footer" }))));
121144
121418
  }
@@ -13,6 +13,7 @@ const EzList = class {
13
13
  this.ezChange = index.createEvent(this, "ezChange", 7);
14
14
  this.ezSelectItem = index.createEvent(this, "ezSelectItem", 7);
15
15
  this.ezCheckChange = index.createEvent(this, "ezCheckChange", 7);
16
+ this.ezDoubleClick = index.createEvent(this, "ezDoubleClick", 7);
16
17
  this._listItemsHistory = [];
17
18
  this._listItems = [];
18
19
  this._listGroupItems = [];
@@ -525,6 +526,9 @@ const EzList = class {
525
526
  }
526
527
  return index.h("div", { class: className, innerHTML: customContent });
527
528
  }
529
+ doubleClickItem(item) {
530
+ this.ezDoubleClick.emit(item);
531
+ }
528
532
  render() {
529
533
  return (index.h(index.Host, { ref: el => (this._element = el) }, this.useGroups ? (index.h("div", { class: "group-container", ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => {
530
534
  this.keyDownHandler(event);
@@ -534,7 +538,9 @@ const EzList = class {
534
538
  'hover-feedback': this.hoverFeedback,
535
539
  }, key: 'item_' + item.id }, {
536
540
  [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`),
537
- }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onClick: () => {
541
+ }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => {
542
+ this.doubleClickItem(item);
543
+ }, onClick: () => {
538
544
  this.setSelection(item);
539
545
  }, onDragLeave: () => {
540
546
  group.sort ? undefined : this.removeOverClass();
@@ -548,7 +554,9 @@ const EzList = class {
548
554
  } }, index.h("div", { class: "draggable-list" }, this._listItems.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
549
555
  'selectable-container': this.ezSelectable,
550
556
  'hover-feedback': this.hoverFeedback,
551
- }, key: 'item_' + item.id }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`) }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onClick: () => {
557
+ }, key: 'item_' + item.id }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`) }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onDblClick: () => {
558
+ this.doubleClickItem(item);
559
+ }, onClick: () => {
552
560
  this.setSelection(item);
553
561
  }, onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.listMode === 'regular' ? (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))))), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
554
562
  this.onDragOverLastIndex(event);