@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
@@ -3,6 +3,7 @@ import { ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
4
4
  import './DialogType-54a62731.js';
5
5
  import './CheckMode-bdb2ec19.js';
6
+ import './ICustomRender-875b5a40.js';
6
7
 
7
8
  const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsable-box--bordered{border:var(--border--small);border-color:var(--color--strokes);border-radius:var(--border--radius-medium);padding:var(--space--xs)}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:2s all ease-in-out}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
8
9
 
@@ -4,6 +4,7 @@ import './ApplicationUtils-eaf91331.js';
4
4
  import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
+ import './ICustomRender-875b5a40.js';
7
8
 
8
9
  const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box__list-min-width:64px;--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-combo-box__list-min-width);position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
9
10
 
@@ -1,9 +1,107 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
2
- import { ElementIDUtils } from '@sankhyalabs/core';
1
+ import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-baa5e267.js';
2
+ import { C as CustomEditorSource } from './ICustomRender-875b5a40.js';
3
+ import { HTMLBuilder, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
4
  import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
4
5
  import './DialogType-54a62731.js';
5
6
  import './CheckMode-bdb2ec19.js';
6
7
 
8
+ const EzCustomFormInput = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.gui = undefined;
12
+ this.customEditor = undefined;
13
+ this.formViewField = undefined;
14
+ this.value = undefined;
15
+ this.detailContext = undefined;
16
+ this.builderFallback = undefined;
17
+ this.selectedRecord = undefined;
18
+ }
19
+ /**
20
+ * Aplica foco no campo.
21
+ */
22
+ async setFocus() {
23
+ var _a, _b;
24
+ (_b = (_a = this.gui) === null || _a === void 0 ? void 0 : _a["setFocus"]) === null || _b === void 0 ? void 0 : _b.call(_a);
25
+ }
26
+ /**
27
+ * Remove o foco do campo.
28
+ */
29
+ async setBlur() {
30
+ var _a, _b;
31
+ (_b = (_a = this.gui) === null || _a === void 0 ? void 0 : _a["setBlur"]) === null || _b === void 0 ? void 0 : _b.call(_a);
32
+ }
33
+ /**
34
+ * Retorna se o conteúdo é inválido.
35
+ */
36
+ async isInvalid() {
37
+ var _a, _b;
38
+ return ((_b = (_a = this.gui) === null || _a === void 0 ? void 0 : _a["isInvalid"]) === null || _b === void 0 ? void 0 : _b.call(_a)) || false;
39
+ }
40
+ getContent() {
41
+ var _a, _b;
42
+ const fieldProps = new Map();
43
+ for (const prop in this.formViewField.props) {
44
+ fieldProps.set(prop, this.formViewField.props[prop]);
45
+ }
46
+ const params = {
47
+ value: this.value,
48
+ name: this.formViewField.name,
49
+ currentEditor: this.builderFallback(this.formViewField),
50
+ setValue: (value) => this.setValue(value),
51
+ getValue: this.getValue,
52
+ record: this.selectedRecord,
53
+ editorMetadata: {
54
+ label: this.formViewField.label,
55
+ hidden: ((_a = this.formViewField.props) === null || _a === void 0 ? void 0 : _a.visible) === false,
56
+ userInterface: this.formViewField.userInterface,
57
+ options: (_b = this.formViewField.props) === null || _b === void 0 ? void 0 : _b.options,
58
+ props: this.formViewField.props ? fieldProps : undefined,
59
+ optionLoader: this.formViewField.optionLoader
60
+ },
61
+ source: CustomEditorSource.FORM,
62
+ detailContext: this.detailContext
63
+ };
64
+ let gui = this.customEditor.getEditorElement(params);
65
+ if (!gui) {
66
+ gui = this.builderFallback(this.formViewField);
67
+ this.handleValue(gui);
68
+ this.gui = gui;
69
+ return;
70
+ }
71
+ if (!(gui instanceof HTMLElement) && typeof gui !== 'string') {
72
+ this.handleValue(gui);
73
+ this.gui = gui;
74
+ return;
75
+ }
76
+ if (typeof gui === 'string') {
77
+ gui = HTMLBuilder.parseElement(gui);
78
+ }
79
+ if (this.value) {
80
+ gui.setAttribute('value', typeof this.value === 'object' ? this.value.value : this.value);
81
+ }
82
+ this.gui = h("div", { key: StringUtils.generateUUID(), ref: el => el && el.appendChild(gui) });
83
+ }
84
+ setValue(value) {
85
+ this.value = value;
86
+ }
87
+ getValue() {
88
+ return this.value;
89
+ }
90
+ handleValue(gui) {
91
+ var _a;
92
+ //@ts-ignore
93
+ (_a = gui.$children$) === null || _a === void 0 ? void 0 : _a.forEach((child) => {
94
+ child.$attrs$.value = this.value;
95
+ });
96
+ }
97
+ componentWillRender() {
98
+ this.getContent();
99
+ }
100
+ render() {
101
+ return (h(Host, null, this.gui));
102
+ }
103
+ };
104
+
7
105
  const ezTextEditCss = ":host{display:flex;align-items:center;gap:5px}.text-edit__form-input{width:auto;--ez-text-input__input--padding:0px}.text-edit__hidden-value{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}";
8
106
 
9
107
  const EzTextEdit = class {
@@ -100,4 +198,4 @@ const EzTextEdit = class {
100
198
  };
101
199
  EzTextEdit.style = ezTextEditCss;
102
200
 
103
- export { EzTextEdit as ez_text_edit };
201
+ export { EzCustomFormInput as ez_custom_form_input, EzTextEdit as ez_text_edit };
@@ -55,8 +55,9 @@ const buildFile = ({ name, label, readOnly, contextName, props }) => {
55
55
  };
56
56
 
57
57
  const buildDecimal = ({ name, label, readOnly, props, contextName, canShowError }) => {
58
- const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
59
- const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
58
+ var _a, _b;
59
+ const precision = Number((_a = props === null || props === void 0 ? void 0 : props.precision) !== null && _a !== void 0 ? _a : 2);
60
+ const prettyPrecision = Number((_b = props === null || props === void 0 ? void 0 : props.prettyPrecision) !== null && _b !== void 0 ? _b : precision);
60
61
  return buildNumeric(name, label, readOnly, precision, prettyPrecision, contextName, canShowError);
61
62
  };
62
63
  const buildInteger = ({ name, label, readOnly, contextName, canShowError }) => {
@@ -145,11 +146,34 @@ const EzFormView = class {
145
146
  registerInstance(this, hostRef);
146
147
  this.ezContentReady = createEvent(this, "ezContentReady", 7);
147
148
  this.formItemsReady = createEvent(this, "formItemsReady", 7);
149
+ this._customEditors = new Map();
148
150
  this.fields = undefined;
151
+ this.selectedRecord = undefined;
149
152
  }
150
153
  async showUp() {
151
154
  this._element.scrollIntoView({ behavior: "smooth", block: "start" });
152
155
  }
156
+ /**
157
+ * Registra um editor customizado para campos da grade e formulário.
158
+ */
159
+ async addCustomEditor(fieldName, customEditor, detailContext) {
160
+ const newCustomEditors = new Map(this._customEditors);
161
+ newCustomEditors.set(fieldName, { customEditor, detailContext });
162
+ this._customEditors = newCustomEditors;
163
+ }
164
+ /**
165
+ * Altera/adiciona uma propriedade nos metados do campo.
166
+ */
167
+ async setFieldProp(fieldName, propName, value) {
168
+ const fields = this.fields.map(field => {
169
+ if (field.name === fieldName && (value || value === 0)) {
170
+ field.props = field.props || {};
171
+ field.props[propName] = value;
172
+ }
173
+ return field;
174
+ });
175
+ this.fields = [...fields];
176
+ }
153
177
  groupFields(fields) {
154
178
  const result = new Map();
155
179
  fields.forEach(item => {
@@ -169,7 +193,8 @@ const EzFormView = class {
169
193
  return result;
170
194
  }
171
195
  componentDidRender() {
172
- this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));
196
+ this._formElements = Array.from(this._element.querySelectorAll("[data-field-name]"));
197
+ this.ezContentReady.emit(this._formElements);
173
198
  const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
174
199
  this.formItemsReady.emit(formItems);
175
200
  }
@@ -180,9 +205,15 @@ const EzFormView = class {
180
205
  ].includes(userInterface);
181
206
  }
182
207
  buildFormItemElement(item, classItem = "") {
208
+ var _a;
183
209
  if (this.isItemFullWidth(item.userInterface)) {
184
210
  classItem += " input-full_width";
185
211
  }
212
+ if (this._customEditors.has(item.name)) {
213
+ const value = (_a = this._formElements.map(el => ({ name: el.dataset.fieldName, value: el['value'] })).find(field => field.name === item.name)) === null || _a === void 0 ? void 0 : _a.value;
214
+ const customEditor = this._customEditors.get(item.name).customEditor;
215
+ return h("div", { class: classItem }, h("ez-custom-form-input", { "data-field-name": item.name, customEditor: customEditor, formViewField: item, builderFallback: fieldBuilder, value: value, selectedRecord: this.selectedRecord }));
216
+ }
186
217
  return h("div", { class: classItem }, fieldBuilder(item));
187
218
  }
188
219
  render() {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, f as forceUpdate, H as Host, g as getElement } from './index-baa5e267.js';
2
- import { DateUtils, Action, WaitingChangeException, ApplicationContext, DataUnitAction, StringUtils, DataUnit, ElementIDUtils } from '@sankhyalabs/core';
2
+ import { DateUtils, Action, ApplicationContext, WaitingChangeException, DataUnitAction, StringUtils, DataUnit, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { b as buildFieldMetadata, R as RecordValidationProcessor } from './RecordValidationProcessor-b00b8b77.js';
4
4
  import './ApplicationUtils-eaf91331.js';
5
5
  import './DialogType-54a62731.js';
@@ -214,6 +214,13 @@ class DataBinder {
214
214
  this.applyDefaultValues();
215
215
  this._dataUnit.subscribe(this.onDataUnitEvent);
216
216
  this._dataUnit.addInterceptor(this);
217
+ this.setContextDataBinder(dataUnit);
218
+ }
219
+ setContextDataBinder(dataUnit) {
220
+ const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__") || new Map();
221
+ const dataBinders = [...(dataBindersByDataUnit.get(dataUnit.dataUnitId) || []), this];
222
+ dataBindersByDataUnit.set(dataUnit.dataUnitId, dataBinders);
223
+ ApplicationContext.setContextValue("__DATABINDER_BY_DATAUNIT__", dataBindersByDataUnit);
217
224
  }
218
225
  applyDefaultValues() {
219
226
  const recordIds = (this._dataUnit.getAddedRecords() || []).map(r => r.__record__id__);
@@ -240,9 +247,17 @@ class DataBinder {
240
247
  getMessageForField: field => this.getErrorMessage(field)
241
248
  }, recordsValidator);
242
249
  }
250
+ disconnectDataUnit() {
251
+ const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__") || new Map();
252
+ const dataBinders = dataBindersByDataUnit.get(this._dataUnit.dataUnitId);
253
+ const dataBindersFiltered = dataBinders.filter((dataBinder) => JSON.stringify(dataBinder) !== JSON.stringify(this));
254
+ dataBindersByDataUnit.set(this._dataUnit.dataUnitId, dataBindersFiltered);
255
+ ApplicationContext.setContextValue("__DATABINDER_BY_DATAUNIT__", dataBindersByDataUnit);
256
+ }
243
257
  onDisconnectedCallback() {
244
258
  this._dataUnit.unsubscribe(this.onDataUnitEvent);
245
259
  this._dataUnit.removeInterceptor(this);
260
+ this.disconnectDataUnit();
246
261
  }
247
262
  getCurrentRecordId() {
248
263
  const record = this._dataUnit.getSelectedRecord();
@@ -289,6 +304,17 @@ class DataBinder {
289
304
  validate() {
290
305
  return this._recordValidatorProcessor.validate();
291
306
  }
307
+ static async validateByDataunit(dataUnit) {
308
+ try {
309
+ const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__");
310
+ const dataBinders = dataBindersByDataUnit.get(dataUnit.dataUnitId) || [];
311
+ await Promise.all(dataBinders.map((dataBinder) => dataBinder.validate()));
312
+ return true;
313
+ }
314
+ catch (_a) {
315
+ return false;
316
+ }
317
+ }
292
318
  updateErrorMessage(fieldName, field, message) {
293
319
  if (message == undefined) {
294
320
  message = this._dataUnit.getInvalidMessage(this.getCurrentRecordId(), fieldName);
@@ -845,15 +871,18 @@ const EzForm = class {
845
871
  this.ezFormSetFields = createEvent(this, "ezFormSetFields", 7);
846
872
  this.ezReady = createEvent(this, "ezReady", 7);
847
873
  this.formItemsReady = createEvent(this, "formItemsReady", 7);
874
+ this._customEditors = new Map();
848
875
  this.onDataUnitAction = (action) => {
849
876
  if (action.type === Action.METADATA_LOADED) {
850
877
  this.processMetadata();
851
878
  }
852
879
  };
880
+ this._fieldsProps = new Map();
853
881
  this.dataUnit = undefined;
854
882
  this.config = undefined;
855
883
  this.recordsValidator = undefined;
856
884
  this.fieldToFocus = undefined;
885
+ this.onlyStaticFields = false;
857
886
  }
858
887
  /**
859
888
  * Realiza validação no conteúdo de todos os campos.
@@ -861,9 +890,30 @@ const EzForm = class {
861
890
  validate() {
862
891
  return this._dataBinder.validate();
863
892
  }
893
+ /**
894
+ * Registra um editor customizado para campos da grade e formulário.
895
+ */
896
+ async addCustomEditor(fieldName, customEditor, detailContext) {
897
+ if (this._formView) {
898
+ this._formView.addCustomEditor(fieldName, customEditor, detailContext);
899
+ return;
900
+ }
901
+ const newCustomEditors = new Map(this._customEditors);
902
+ newCustomEditors.set(fieldName, { customEditor, detailContext });
903
+ this._customEditors = newCustomEditors;
904
+ }
864
905
  observeConfig() {
865
906
  this.processMetadata();
866
907
  }
908
+ /**
909
+ * Altera/adiciona uma propriedade nos metadados do campo.
910
+ */
911
+ async setFieldProp(fieldName, propName, value) {
912
+ const newCustomFieldProps = new Map(this._fieldsProps);
913
+ const currentProps = this._fieldsProps.get(fieldName);
914
+ newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
915
+ this._fieldsProps = newCustomFieldProps;
916
+ }
867
917
  getDynamicContent() {
868
918
  var _a;
869
919
  const formMD = selectFormMetadata(this._store.getState());
@@ -890,10 +940,10 @@ const EzForm = class {
890
940
  }
891
941
  this.ezFormSetFields.emit(fields);
892
942
  const idFormSheet = `${StringUtils.replaceAccentuatedChars(StringUtils.toCamelCase(currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.label), false)}_selectorContainer`;
893
- return (h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, h("ez-form-view", { class: "ez-row ez-padding-vertical--small", fields: fields })));
943
+ return (h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, h("ez-form-view", { ref: (element) => (this._formView = element), class: "ez-row ez-padding-vertical--small", fields: fields, selectedRecord: this.dataUnit.getSelectedRecord() })));
894
944
  }
895
945
  processMetadata() {
896
- if (!this.isStatic() && this.dataUnit && this._store) {
946
+ if (this.bindFields() && this.dataUnit && this._store) {
897
947
  const metadata = buildFormMetadata(this.config, this.dataUnit);
898
948
  this._store.dispatch(loadMetadata(metadata));
899
949
  }
@@ -902,6 +952,9 @@ const EzForm = class {
902
952
  var _a;
903
953
  return ((_a = this._staticFields) === null || _a === void 0 ? void 0 : _a.length) > 0;
904
954
  }
955
+ bindFields() {
956
+ return !this.isStatic() || this.onlyStaticFields === false;
957
+ }
905
958
  componentWillLoad() {
906
959
  if (this.dataUnit === undefined) {
907
960
  this.dataUnit = new DataUnit("ez-form");
@@ -921,6 +974,17 @@ const EzForm = class {
921
974
  this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")), this.dataUnit.dataUnitId, metadata, this.recordsValidator);
922
975
  this.ezReady.emit();
923
976
  this.handleFieldToFocus();
977
+ this.setCustomEditors();
978
+ this.setFieldsProps();
979
+ }
980
+ setCustomEditors() {
981
+ if (!this._formView) {
982
+ return;
983
+ }
984
+ for (const [fieldName, customEditorProps] of this._customEditors) {
985
+ this._formView.addCustomEditor(fieldName, customEditorProps.customEditor, customEditorProps.detailContext);
986
+ this._customEditors.delete(fieldName);
987
+ }
924
988
  }
925
989
  handleFieldToFocus() {
926
990
  var _a;
@@ -937,6 +1001,17 @@ const EzForm = class {
937
1001
  this.ezFormRequestClearFieldToFocus.emit();
938
1002
  });
939
1003
  }
1004
+ setFieldsProps() {
1005
+ if (!this._formView) {
1006
+ return;
1007
+ }
1008
+ for (const [fieldName, props] of this._fieldsProps) {
1009
+ for (const prop in props) {
1010
+ this._formView.setFieldProp(fieldName, prop, props[prop]);
1011
+ }
1012
+ this._fieldsProps.delete(fieldName);
1013
+ }
1014
+ }
940
1015
  disconnectedCallback() {
941
1016
  this.dataUnit.unsubscribe(this.onDataUnitAction);
942
1017
  this._dataBinder.onDisconnectedCallback();