@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-81596.0 → 0.0.0-bugfix-dev-KB-81596.1

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 (170) hide show
  1. package/dist/cjs/{DataBinder-e92314c2.js → DataBinder-c2060474.js} +3 -2
  2. package/dist/cjs/FormLayout-c2451c7f.js +7 -0
  3. package/dist/cjs/{constants-2714478b.js → constants-569271bc.js} +4 -0
  4. package/dist/cjs/ez-actions-button.cjs.entry.js +2 -1
  5. package/dist/cjs/ez-card-item_2.cjs.entry.js +3 -1217
  6. package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -1
  7. package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +3 -2
  8. package/dist/cjs/ez-combo-box.cjs.entry.js +2 -7
  9. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-form-view.cjs.entry.js +18 -10
  12. package/dist/cjs/ez-form.cjs.entry.js +29 -3
  13. package/dist/cjs/ez-grid.cjs.entry.js +165 -28
  14. package/dist/cjs/ez-list.cjs.entry.js +2 -2
  15. package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-search-plus.cjs.entry.js +369 -0
  19. package/dist/cjs/ez-search-result-list.cjs.entry.js +98 -0
  20. package/dist/cjs/ez-search.cjs.entry.js +3 -2
  21. package/dist/cjs/ez-split-item.cjs.entry.js +2 -1
  22. package/dist/cjs/ez-text-input.cjs.entry.js +20 -87
  23. package/dist/cjs/ez-tooltip.cjs.entry.js +104 -29
  24. package/dist/cjs/ezui.cjs.js +1 -1
  25. package/dist/cjs/floating-ui.dom.esm-017acce4.js +1404 -0
  26. package/dist/cjs/index-a7b0c73d.js +8 -0
  27. package/dist/cjs/loader.cjs.js +1 -1
  28. package/dist/cjs/{ICustomRender-6fafffce.js → types-6a5df0c7.js} +8 -0
  29. package/dist/collection/collection-manifest.json +12 -0
  30. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -8
  31. package/dist/collection/components/ez-date-input/ez-date-input.js +1 -1
  32. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +1 -1
  33. package/dist/collection/components/ez-form/ez-form.js +31 -4
  34. package/dist/collection/components/ez-form-view/ez-form-view.css +8 -0
  35. package/dist/collection/components/ez-form-view/ez-form-view.js +21 -2
  36. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +3 -1
  37. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +6 -0
  38. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +96 -16
  39. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +21 -4
  40. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +31 -7
  41. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +2 -0
  42. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js +15 -0
  43. package/dist/collection/components/ez-list/ez-list.js +2 -2
  44. package/dist/collection/components/ez-modal/ez-modal.js +1 -1
  45. package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -1
  46. package/dist/collection/components/ez-popup/ez-popup.js +1 -1
  47. package/dist/collection/components/ez-search-plus/ez-search-plus.css +373 -0
  48. package/dist/collection/components/ez-search-plus/ez-search-plus.js +952 -0
  49. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +227 -0
  50. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +279 -0
  51. package/dist/collection/components/ez-text-input/ez-text-input.css +18 -2
  52. package/dist/collection/components/ez-text-input/ez-text-input.js +39 -60
  53. package/dist/collection/components/ez-tooltip/ez-tooltip.css +52 -12
  54. package/dist/collection/components/ez-tooltip/ez-tooltip.js +217 -46
  55. package/dist/collection/utils/constants.js +2 -0
  56. package/dist/collection/utils/form/DataBinder.js +3 -2
  57. package/dist/collection/utils/form/interfaces/FormLayout.js +5 -0
  58. package/dist/collection/utils/form/interfaces/index.js +1 -1
  59. package/dist/collection/utils/index.js +2 -0
  60. package/dist/collection/utils/search/types.js +7 -0
  61. package/dist/custom-elements/index.d.ts +12 -0
  62. package/dist/custom-elements/index.js +992 -170
  63. package/dist/esm/{DataBinder-9c877244.js → DataBinder-89946126.js} +3 -2
  64. package/dist/esm/FormLayout-54092963.js +7 -0
  65. package/dist/esm/constants-b036528f.js +7 -0
  66. package/dist/esm/ez-actions-button.entry.js +2 -1
  67. package/dist/esm/ez-card-item_2.entry.js +1 -1215
  68. package/dist/esm/ez-collapsible-box.entry.js +2 -1
  69. package/dist/esm/ez-combo-box-list_3.entry.js +2 -1
  70. package/dist/esm/ez-combo-box.entry.js +2 -7
  71. package/dist/esm/ez-date-input.entry.js +1 -1
  72. package/dist/esm/ez-date-time-input.entry.js +1 -1
  73. package/dist/esm/ez-form-view.entry.js +19 -11
  74. package/dist/esm/ez-form.entry.js +30 -4
  75. package/dist/esm/ez-grid.entry.js +164 -27
  76. package/dist/esm/ez-list.entry.js +2 -2
  77. package/dist/esm/ez-modal-container.entry.js +1 -1
  78. package/dist/esm/ez-modal.entry.js +1 -1
  79. package/dist/esm/ez-popup.entry.js +1 -1
  80. package/dist/esm/ez-search-plus.entry.js +365 -0
  81. package/dist/esm/ez-search-result-list.entry.js +94 -0
  82. package/dist/esm/ez-search.entry.js +3 -2
  83. package/dist/esm/ez-split-item.entry.js +2 -1
  84. package/dist/esm/ez-text-input.entry.js +20 -87
  85. package/dist/esm/ez-tooltip.entry.js +105 -30
  86. package/dist/esm/ezui.js +1 -1
  87. package/dist/esm/floating-ui.dom.esm-5d3da819.js +1398 -0
  88. package/dist/esm/index-baa5e267.js +8 -0
  89. package/dist/esm/loader.js +1 -1
  90. package/dist/esm/{ICustomRender-875b5a40.js → types-6f6b2650.js} +9 -1
  91. package/dist/ezui/ezui.esm.js +1 -1
  92. package/dist/ezui/p-0bffeffc.entry.js +1 -0
  93. package/dist/ezui/p-173f68ea.js +1 -0
  94. package/dist/ezui/p-1a060042.entry.js +1 -0
  95. package/dist/ezui/{p-cb5cd243.entry.js → p-1ec8bdd2.entry.js} +46 -46
  96. package/dist/ezui/p-248d4f54.entry.js +1 -0
  97. package/dist/ezui/p-3176a6ef.entry.js +1 -0
  98. package/dist/ezui/p-4e0628a7.entry.js +1 -0
  99. package/dist/ezui/p-5895e687.js +1 -0
  100. package/dist/ezui/p-5a14f506.entry.js +1 -0
  101. package/dist/ezui/p-5ec0ae79.entry.js +1 -0
  102. package/dist/ezui/p-5eea9886.js +1 -0
  103. package/dist/ezui/p-81145609.entry.js +1 -0
  104. package/dist/ezui/p-84b1c99e.entry.js +1 -0
  105. package/dist/ezui/p-8ac8093c.entry.js +1 -0
  106. package/dist/ezui/p-9142b27a.entry.js +1 -0
  107. package/dist/ezui/p-9567b31a.entry.js +1 -0
  108. package/dist/ezui/p-9f22e1dc.entry.js +1 -0
  109. package/dist/ezui/{p-acddfb2e.js → p-a64cfcfc.js} +1 -1
  110. package/dist/ezui/p-bf9dec89.entry.js +1 -0
  111. package/dist/ezui/p-c5df78be.entry.js +1 -0
  112. package/dist/ezui/p-cd07f8be.entry.js +1 -0
  113. package/dist/ezui/p-e07e4671.js +1 -0
  114. package/dist/ezui/p-e3544d23.entry.js +1 -0
  115. package/dist/ezui/p-ecaac11f.entry.js +1 -0
  116. package/dist/ezui/p-f4861c6a.entry.js +1 -0
  117. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +0 -2
  118. package/dist/types/components/ez-form/ez-form.d.ts +5 -1
  119. package/dist/types/components/ez-form-view/ez-form-view.d.ts +4 -0
  120. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -0
  121. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
  122. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +5 -2
  123. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
  124. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +1 -0
  125. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.d.ts +3 -0
  126. package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +184 -0
  127. package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +26 -0
  128. package/dist/types/components/ez-text-input/ez-text-input.d.ts +6 -9
  129. package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +37 -5
  130. package/dist/types/components.d.ts +338 -12
  131. package/dist/types/utils/constants.d.ts +2 -0
  132. package/dist/types/utils/form/interfaces/FormLayout.d.ts +4 -0
  133. package/dist/types/utils/form/interfaces/index.d.ts +1 -0
  134. package/dist/types/utils/index.d.ts +2 -0
  135. package/dist/types/utils/search/types.d.ts +12 -0
  136. package/package.json +3 -3
  137. package/react/components.d.ts +62 -60
  138. package/react/components.js +2 -0
  139. package/react/components.js.map +1 -1
  140. package/react/react-component-lib/createComponent.d.ts +1 -1
  141. package/react/react-component-lib/createComponent.js.map +1 -1
  142. package/react/react-component-lib/createOverlayComponent.js.map +1 -1
  143. package/react/react-component-lib/interfaces.js +1 -0
  144. package/react/react-component-lib/utils/attachProps.d.ts +1 -1
  145. package/react/react-component-lib/utils/attachProps.js.map +1 -1
  146. package/react/react-component-lib/utils/dev.js.map +1 -1
  147. package/react/react-component-lib/utils/index.d.ts +2 -2
  148. package/react/react-component-lib/utils/index.js.map +1 -1
  149. package/dist/collection/utils/ResponsiveInputUtils.js +0 -26
  150. package/dist/esm/constants-4e0d35b7.js +0 -5
  151. package/dist/ezui/p-05e1f4e7.js +0 -1
  152. package/dist/ezui/p-17eabf46.entry.js +0 -1
  153. package/dist/ezui/p-1ad6c61b.entry.js +0 -1
  154. package/dist/ezui/p-20cb13fa.entry.js +0 -1
  155. package/dist/ezui/p-23b6128c.entry.js +0 -1
  156. package/dist/ezui/p-3195a7a7.entry.js +0 -1
  157. package/dist/ezui/p-4607fb89.js +0 -1
  158. package/dist/ezui/p-556468d9.entry.js +0 -1
  159. package/dist/ezui/p-6cdd3e0a.entry.js +0 -1
  160. package/dist/ezui/p-788467fe.entry.js +0 -1
  161. package/dist/ezui/p-af1a478e.entry.js +0 -1
  162. package/dist/ezui/p-bbdc3996.entry.js +0 -1
  163. package/dist/ezui/p-c297aa52.entry.js +0 -1
  164. package/dist/ezui/p-cb1535f7.entry.js +0 -1
  165. package/dist/ezui/p-cf87aacb.entry.js +0 -1
  166. package/dist/ezui/p-dcf3c8e5.entry.js +0 -1
  167. package/dist/ezui/p-e347df9c.entry.js +0 -1
  168. package/dist/ezui/p-f5931caa.entry.js +0 -1
  169. package/dist/ezui/p-fd0a19d6.entry.js +0 -1
  170. package/dist/types/utils/ResponsiveInputUtils.d.ts +0 -6
@@ -3,7 +3,8 @@ 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
+ import './types-6f6b2650.js';
7
+ import './FormLayout-54092963.js';
7
8
 
8
9
  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:100%;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:block;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}";
9
10
 
@@ -1,9 +1,10 @@
1
1
  import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-baa5e267.js';
2
2
  import { ElementIDUtils, ObjectUtils, HTMLBuilder, StringUtils } from '@sankhyalabs/core';
3
- import { C as CustomEditorSource } from './ICustomRender-875b5a40.js';
3
+ import { C as CustomEditorSource } from './types-6f6b2650.js';
4
4
  import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
+ import './FormLayout-54092963.js';
7
8
 
8
9
  const ezComboBoxListCss = ":host{--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--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__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--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);--ez-combo-box__list-container--padding:var(--space--extra-small, 3px)}.list-container{padding-top:var(--ez-combo-box__list-container--padding)}.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--medium, 0 8px 24px 0 rgba(43, 58, 84, 0.10));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)}@-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
 
@@ -4,7 +4,8 @@ import './ApplicationUtils-eaf91331.js';
4
4
  import { C as CSSVarsUtils } from './CSSVarsUtils-acba92d7.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
- import './ICustomRender-875b5a40.js';
7
+ import './types-6f6b2650.js';
8
+ import './FormLayout-54092963.js';
8
9
 
9
10
  const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--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__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);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)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;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}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
10
11
 
@@ -24,7 +25,6 @@ const EzComboBox = class {
24
25
  this._startLoading = false;
25
26
  this._showLoading = true;
26
27
  this._criteria = undefined;
27
- this._textInputReady = undefined;
28
28
  this.limitCharsToSearch = 3;
29
29
  this.value = undefined;
30
30
  this.label = undefined;
@@ -304,11 +304,6 @@ const EzComboBox = class {
304
304
  //---------------------------------------------
305
305
  // Lifecycle web component
306
306
  //---------------------------------------------
307
- componentDidRender() {
308
- if (this._textInput) {
309
- this._textInputReady = true;
310
- }
311
- }
312
307
  componentWillLoad() {
313
308
  if (this.options === undefined) {
314
309
  this.options = [];
@@ -157,7 +157,7 @@ const EzDateInput = class {
157
157
  }
158
158
  }
159
159
  disconnectedCallback() {
160
- this.hideCalendar();
160
+ this._popover.hide();
161
161
  }
162
162
  componentDidLoad() {
163
163
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
@@ -208,7 +208,7 @@ const EzDateTimeInput = class {
208
208
  }
209
209
  }
210
210
  disconnectedCallback() {
211
- this.hideCalendar();
211
+ this._popover.hide();
212
212
  }
213
213
  componentDidLoad() {
214
214
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
@@ -1,6 +1,6 @@
1
1
  import { h, r as registerInstance, c as createEvent, g as getElement, H as Host } from './index-baa5e267.js';
2
- import { ObjectUtils, UserInterface, ElementIDUtils } from '@sankhyalabs/core';
3
- import { R as REQUIRED_INFO } from './constants-4e0d35b7.js';
2
+ import { ObjectUtils, StringUtils, UserInterface, ElementIDUtils } from '@sankhyalabs/core';
3
+ import { R as REQUIRED_INFO } from './constants-b036528f.js';
4
4
  import { C as CheckMode } from './CheckMode-bdb2ec19.js';
5
5
 
6
6
  const buildSwitch = (field) => {
@@ -73,12 +73,6 @@ function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecisio
73
73
  h("ez-number-input", { class: "ez-input__no-margin", enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
74
74
  }
75
75
 
76
- const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }) => {
77
- var _a;
78
- return (h("div", { class: "ez-col ez-col--sd-12" },
79
- h("ez-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false })));
80
- };
81
-
82
76
  const buildTextArea = ({ name, label, readOnly, contextName, rows, canShowError }) => {
83
77
  return (h("div", { class: "ez-col ez-col--sd-12", key: name },
84
78
  h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, rows: rows, canShowError: canShowError })));
@@ -89,6 +83,18 @@ const buildTextInput = ({ name, label, readOnly, contextName, canShowError, prop
89
83
  h("ez-text-input", { class: "ez-input__no-margin", label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError, mask: props === null || props === void 0 ? void 0 : props.mask, "clean-value-mask": props === null || props === void 0 ? void 0 : props.cleanValueMask })));
90
84
  };
91
85
 
86
+ const buildSearchPlus = ({ name, label, readOnly, contextName, canShowError, optionLoader, props }) => {
87
+ const hasDescriptionField = !StringUtils.isEmpty(props === null || props === void 0 ? void 0 : props.DESCRIPTIONFIELD);
88
+ return (h("div", { class: "ez-col ez-col--sd-12" },
89
+ h("ez-search-plus", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, hideDescriptionInput: !hasDescriptionField })));
90
+ };
91
+
92
+ const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }) => {
93
+ var _a;
94
+ return (h("div", { class: "ez-col ez-col--sd-12" },
95
+ h("ez-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false })));
96
+ };
97
+
92
98
  const uiBuilders = new Map();
93
99
  uiBuilders.set(UserInterface.CHECKBOX, buildCheckBox);
94
100
  uiBuilders.set(UserInterface.SWITCH, buildSwitch);
@@ -101,6 +107,7 @@ uiBuilders.set(UserInterface.FILE, buildFile);
101
107
  uiBuilders.set(UserInterface.DECIMALNUMBER, buildDecimal);
102
108
  uiBuilders.set(UserInterface.INTEGERNUMBER, buildInteger);
103
109
  uiBuilders.set(UserInterface.SEARCH, buildSearch);
110
+ uiBuilders.set(UserInterface.SEARCHPLUS, buildSearchPlus);
104
111
  uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
105
112
  const fieldBuilder = (field) => {
106
113
  const builder = uiBuilders.get(field.userInterface) || buildTextInput;
@@ -146,7 +153,7 @@ class FormItems {
146
153
  }
147
154
  }
148
155
 
149
- const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-wrap:wrap;width:100%;--ez-form-view__item--min-width:220px;--ez-form-view__item--width:var(--space--small);--ez-form-view__item--padding:var(--space--small)}.form-view__content.sc-ez-form-view{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));gap:var(--ez-form-view__item--width);padding-inline:var(--ez-form-view__item--padding);width:100%}.input-full_width.sc-ez-form-view{grid-column:1 / -1;width:100%}";
156
+ const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-wrap:wrap;width:100%;--ez-form-view__item--min-width:220px;--ez-form-view__item--max-width:440px;--ez-form-view__item--width:var(--space--small);--ez-form-view__item--padding:var(--space--small)}.form-view__content.sc-ez-form-view{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));gap:var(--ez-form-view__item--width);padding-inline:var(--ez-form-view__item--padding);width:100%}.form-view__content--single-column.sc-ez-form-view{grid-template-columns:repeat(1, minmax(var(--ez-form-view__item--min-width), var(--ez-form-view__item--max-width)))}.input-full_width.sc-ez-form-view{grid-column:1 / -1;width:100%}";
150
157
 
151
158
  const EzFormView = class {
152
159
  constructor(hostRef) {
@@ -156,6 +163,7 @@ const EzFormView = class {
156
163
  this._customEditors = new Map();
157
164
  this.fields = undefined;
158
165
  this.selectedRecord = undefined;
166
+ this.singleColumn = true;
159
167
  }
160
168
  async showUp() {
161
169
  this._element.scrollIntoView({ behavior: "smooth", block: "start" });
@@ -231,7 +239,7 @@ const EzFormView = class {
231
239
  let nonArrayGrup = [];
232
240
  let formContent = Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
233
241
  if (Array.isArray(value)) {
234
- return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, h("div", { class: "form-view__content" }, value.map(fi => (this.buildFormItemElement(fi))))));
242
+ return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, h("div", { class: `form-view__content ${this.singleColumn && "form-view__content--single-column"}` }, value.map(fi => (this.buildFormItemElement(fi))))));
235
243
  }
236
244
  else {
237
245
  nonArrayGrup.push(value);
@@ -239,7 +247,7 @@ const EzFormView = class {
239
247
  });
240
248
  // Filtra os elementos que não são arrays e os coloca dentro de uma única div
241
249
  let nonArrayElements = nonArrayGrup.map((value) => this.buildFormItemElement(value));
242
- let groupedNonArrayElements = h("div", { class: "form-view__content" }, nonArrayElements);
250
+ let groupedNonArrayElements = h("div", { class: `form-view__content ${this.singleColumn && "form-view__content--single-column"}` }, nonArrayElements);
243
251
  return (h(Host, null, groupedNonArrayElements, formContent));
244
252
  }
245
253
  get _element() { return getElement(this); }
@@ -1,6 +1,7 @@
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, StringUtils, DataUnit, ElementIDUtils } from '@sankhyalabs/core';
3
- import { b as buildFieldMetadata, D as DataBinder } from './DataBinder-9c877244.js';
2
+ import { DateUtils, ApplicationContext, Action, StringUtils, DataUnit, ElementIDUtils } from '@sankhyalabs/core';
3
+ import { b as buildFieldMetadata, D as DataBinder } from './DataBinder-89946126.js';
4
+ import { F as FormLayout } from './FormLayout-54092963.js';
4
5
  import './ApplicationUtils-eaf91331.js';
5
6
  import './DialogType-54a62731.js';
6
7
 
@@ -556,12 +557,14 @@ const EzForm = class {
556
557
  this.ezReady = createEvent(this, "ezReady", 7);
557
558
  this.formItemsReady = createEvent(this, "formItemsReady", 7);
558
559
  this._customEditors = new Map();
560
+ this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
559
561
  this.onDataUnitAction = (action) => {
560
562
  if (action.type === Action.METADATA_LOADED) {
561
563
  this.processMetadata();
562
564
  }
563
565
  };
564
566
  this._fieldsProps = new Map();
567
+ this._singleColumn = true;
565
568
  this.dataUnit = undefined;
566
569
  this.config = undefined;
567
570
  this.recordsValidator = undefined;
@@ -624,7 +627,7 @@ const EzForm = class {
624
627
  }
625
628
  this.ezFormSetFields.emit(fields);
626
629
  const idFormSheet = `${StringUtils.replaceAccentuatedChars(StringUtils.toCamelCase(currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.label), false)}_selectorContainer`;
627
- 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() })));
630
+ 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, singleColumn: this._singleColumn, selectedRecord: this.dataUnit.getSelectedRecord() })));
628
631
  }
629
632
  processMetadata() {
630
633
  if (this.bindFields() && this.dataUnit && this._store) {
@@ -639,7 +642,8 @@ const EzForm = class {
639
642
  bindFields() {
640
643
  return !this.isStatic() || this.onlyStaticFields === false;
641
644
  }
642
- componentWillLoad() {
645
+ async componentWillLoad() {
646
+ var _a;
643
647
  if (this.dataUnit === undefined) {
644
648
  this.dataUnit = new DataUnit("ez-form");
645
649
  }
@@ -652,6 +656,28 @@ const EzForm = class {
652
656
  this.processMetadata();
653
657
  const dataInfo = { dataUnit: this.dataUnit };
654
658
  ElementIDUtils.addIDInfo(this._element, null, dataInfo);
659
+ const layoutFormConfig = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getLayoutFormConfig());
660
+ this.setSingleColumn(layoutFormConfig);
661
+ this.registerNotifyListeners(layoutFormConfig);
662
+ }
663
+ async setSingleColumn(layoutFormConfig) {
664
+ if (!(layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config)) {
665
+ this._singleColumn = true;
666
+ return;
667
+ }
668
+ this._singleColumn = layoutFormConfig.config === FormLayout.CASCADE ? true : false;
669
+ }
670
+ async registerNotifyListeners(layoutFormConfig) {
671
+ if (!layoutFormConfig)
672
+ return;
673
+ layoutFormConfig.onConfigChange((config) => {
674
+ if (config === FormLayout.CASCADE) {
675
+ this._singleColumn = true;
676
+ }
677
+ else {
678
+ this._singleColumn = false;
679
+ }
680
+ });
655
681
  }
656
682
  componentDidRender() {
657
683
  const metadata = selectFormMetadata(this._store.getState());
@@ -1,12 +1,13 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-baa5e267.js';
2
- import { Action, DataUnit, ObjectUtils as ObjectUtils$1, HTMLBuilder, ApplicationContext, StringUtils as StringUtils$1, UserInterface, LockManager, LockManagerOperation, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, ElementIDUtils, ColumnFilterManager as ColumnFilterManager$1, DateUtils as DateUtils$1, ArrayUtils as ArrayUtils$1, FieldComparator, JSUtils, OverflowWatcher, OVERFLOWED_CLASS_NAME, KeyboardManager } from '@sankhyalabs/core';
2
+ import { Action, DataUnit, ObjectUtils as ObjectUtils$1, UserInterface, HTMLBuilder, ApplicationContext, StringUtils as StringUtils$1, LockManager, LockManagerOperation, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, ElementIDUtils, ColumnFilterManager as ColumnFilterManager$1, DateUtils as DateUtils$1, ArrayUtils as ArrayUtils$1, FieldComparator, JSUtils, OverflowWatcher, OVERFLOWED_CLASS_NAME, KeyboardManager } from '@sankhyalabs/core';
3
3
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
4
4
  import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
- import { C as CustomEditorSource, a as CustomRenderSource } from './ICustomRender-875b5a40.js';
8
- import { D as DISTINCT_FILTER_NAME_PREFIX, E as EZ_GRID_LOADING_SOURCE } from './constants-4e0d35b7.js';
9
- import { b as buildFieldMetadata, R as RecordValidationProcessor, D as DataBinder } from './DataBinder-9c877244.js';
7
+ import { C as CustomEditorSource, a as CustomRenderSource } from './types-6f6b2650.js';
8
+ import './FormLayout-54092963.js';
9
+ import { D as DISTINCT_FILTER_NAME_PREFIX, E as EZ_GRID_LOADING_SOURCE, P as PRESENTATION_COL_ID_PROP_NAME, a as PRESENTATION_FROM_COL_PROP_NAME } from './constants-b036528f.js';
10
+ import { b as buildFieldMetadata, R as RecordValidationProcessor, D as DataBinder } from './DataBinder-89946126.js';
10
11
  import { F as FocusResolver } from './FocusResolver-1ccbf850.js';
11
12
 
12
13
  /**
@@ -50246,14 +50247,20 @@ class DataSource {
50246
50247
  return indexA - indexB;
50247
50248
  });
50248
50249
  this._dataUnit.metadata.fields.forEach(f => {
50249
- var _a;
50250
+ var _a, _b;
50250
50251
  if (f.visible !== false && f.name !== this.RECORD_ARCHIVE) {
50251
50252
  const props = new Map();
50252
50253
  const properties = this._dataUnit.getField(f.name).properties;
50253
50254
  for (const value in properties) {
50254
50255
  props.set(value, properties[value]);
50255
50256
  }
50256
- columnDefs.push({ label: f.label, name: f.name, userInterface: f.userInterface, options: (_a = this._dataUnit.getField(f.name).properties) === null || _a === void 0 ? void 0 : _a.options, props });
50257
+ const col = { label: f.label, name: f.name, userInterface: f.userInterface, options: (_a = this._dataUnit.getField(f.name).properties) === null || _a === void 0 ? void 0 : _a.options, props };
50258
+ columnDefs.push(col);
50259
+ if (f.userInterface === UserInterface.SEARCHPLUS && ((_b = f.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD)) {
50260
+ const descriptionCol = this.buildDescriptionColumn(f);
50261
+ columnDefs.push(descriptionCol);
50262
+ f.properties[PRESENTATION_COL_ID_PROP_NAME] = descriptionCol.name;
50263
+ }
50257
50264
  }
50258
50265
  });
50259
50266
  }
@@ -50263,6 +50270,17 @@ class DataSource {
50263
50270
  console.warn(error);
50264
50271
  }
50265
50272
  }
50273
+ buildDescriptionColumn(field) {
50274
+ var _a, _b, _c, _d;
50275
+ const props = new Map();
50276
+ props.set(PRESENTATION_FROM_COL_PROP_NAME, field.name);
50277
+ return {
50278
+ label: `${(_a = field.properties) === null || _a === void 0 ? void 0 : _a.DESCRIPTIONFIELDLABEL} (${(_b = field.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONENTITY})`,
50279
+ name: `${(_c = field.properties) === null || _c === void 0 ? void 0 : _c.ENTITYNAME}.${(_d = field.properties) === null || _d === void 0 ? void 0 : _d.DESCRIPTIONFIELD}`,
50280
+ userInterface: UserInterface.SHORTTEXT,
50281
+ props
50282
+ };
50283
+ }
50266
50284
  }
50267
50285
 
50268
50286
  class EzGridCustomHeader {
@@ -50673,6 +50691,21 @@ const buildSwitch = (fieldMetadata) => {
50673
50691
  return combo;
50674
50692
  };
50675
50693
 
50694
+ const buildSearchPlus = ({ name, required, readOnly, dataUnit }) => {
50695
+ const ezSearch = HTMLBuilder.parseElement(`<ez-search-plus
50696
+ class="ez-grid grid_editor"
50697
+ mode="slim"
50698
+ suppress-empty-option=${required}
50699
+ enabled=${!readOnly}
50700
+ hide-description-input=${true}
50701
+ />`);
50702
+ const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__PLUS__OPTION__LOADER__");
50703
+ ezSearch.optionLoader = (argument) => loader(argument, name, dataUnit);
50704
+ ezSearch.autoFocus = true;
50705
+ ezSearch.valueGetter = () => ezSearch.getValueAsync();
50706
+ return ezSearch;
50707
+ };
50708
+
50676
50709
  const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
50677
50710
  var _a;
50678
50711
  const ezSearch = HTMLBuilder.parseElement(`<ez-search
@@ -50705,6 +50738,7 @@ uiBuilders.set(UserInterface.CHECKBOX, buildSwitch);
50705
50738
  uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
50706
50739
  uiBuilders.set(UserInterface.LONGTEXT, buildTextAreaInput);
50707
50740
  uiBuilders.set(UserInterface.SEARCH, buildSearch);
50741
+ uiBuilders.set(UserInterface.SEARCHPLUS, buildSearchPlus);
50708
50742
  class EzCellEditor {
50709
50743
  init(params) {
50710
50744
  this._rowData = params.data;
@@ -50903,6 +50937,7 @@ class EzGridCustomCellRender extends EzCellRender {
50903
50937
 
50904
50938
  class GridEditionManager {
50905
50939
  constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert, enableGridInsert, lockerId) {
50940
+ this._inProgressChanges = [];
50906
50941
  this._dataUnit = dataUnit;
50907
50942
  this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
50908
50943
  getRequiredFields: () => this.getRequiredFields(),
@@ -51002,6 +51037,12 @@ class GridEditionManager {
51002
51037
  return this._enableContinuousInsert && (this._dataUnit.records.length - 1) === ((_a = this._lastCellEdited) === null || _a === void 0 ? void 0 : _a.rowIndex);
51003
51038
  }
51004
51039
  async proceedAutoSave() {
51040
+ var _a;
51041
+ //Aguarda outras promises entrarem na fila
51042
+ await new Promise(resolve => setTimeout(resolve, 100));
51043
+ if (this._inProgressChanges.length) {
51044
+ await Promise.all((_a = this._inProgressChanges) === null || _a === void 0 ? void 0 : _a.map(({ promise }) => promise));
51045
+ }
51005
51046
  if (!this._dataUnit.isDirty()) {
51006
51047
  this.saveSuccess();
51007
51048
  return true;
@@ -51072,7 +51113,9 @@ class GridEditionManager {
51072
51113
  }
51073
51114
  configureColumn(col) {
51074
51115
  col.cellEditor = 'ezCellEditor';
51075
- col.editable = params => this.canEdit(params);
51116
+ if (col.editable != false) {
51117
+ col.editable = params => this.canEdit(params);
51118
+ }
51076
51119
  col.suppressKeyboardEvent = (params) => {
51077
51120
  if (params.event.key === KeyCode.ESCAPE && params.editing) {
51078
51121
  return this._dataUnit.isDirty();
@@ -51256,6 +51299,14 @@ class GridEditionManager {
51256
51299
  return;
51257
51300
  }
51258
51301
  if (value instanceof Promise) {
51302
+ const progressChange = {
51303
+ promise: undefined,
51304
+ resolve: () => { }
51305
+ };
51306
+ progressChange.promise = new Promise((resolve) => {
51307
+ progressChange.resolve = resolve;
51308
+ });
51309
+ this._inProgressChanges.push(progressChange);
51259
51310
  this.handlePromiseValue(event, value);
51260
51311
  return;
51261
51312
  }
@@ -51269,16 +51320,22 @@ class GridEditionManager {
51269
51320
  const resolved = await value;
51270
51321
  return this.updateCellValue(event, resolved);
51271
51322
  }
51272
- updateCellValue(event, newValue) {
51273
- var _a;
51323
+ async updateCellValue(event, newValue) {
51324
+ var _a, _b, _c, _d;
51274
51325
  const fieldName = event.colDef.field;
51275
- event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: newValue }));
51276
- (_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
51326
+ const newData = { [fieldName]: newValue };
51327
+ const descriptionColName = (_b = (_a = this._dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b[PRESENTATION_COL_ID_PROP_NAME];
51328
+ if (!StringUtils$1.isEmpty(descriptionColName)) {
51329
+ newData[descriptionColName] = newValue === null || newValue === void 0 ? void 0 : newValue.label;
51330
+ }
51331
+ event.node.setData(Object.assign(Object.assign({}, event.data), { newData }));
51332
+ (_c = this._currentEditLock) === null || _c === void 0 ? void 0 : _c.call(this);
51277
51333
  if (event.oldValue !== newValue) {
51278
51334
  this._isGridEdition = true;
51279
- this._dataUnit.setFieldValue(fieldName, newValue, [event.data.__record__id__], { suppressCreateNewRecord: true });
51335
+ await this._dataUnit.setFieldValue(fieldName, newValue, [event.data.__record__id__], { suppressCreateNewRecord: true });
51280
51336
  this._lastCellEdited = { rowIndex: event.rowIndex, column: event.column, rowPinned: undefined };
51281
51337
  }
51338
+ (_d = this._inProgressChanges) === null || _d === void 0 ? void 0 : _d.forEach(({ resolve }) => resolve(newValue));
51282
51339
  }
51283
51340
  setCellEditors(customEditors) {
51284
51341
  var _a;
@@ -64767,7 +64824,6 @@ class AgGridController {
64767
64824
  this.DEFAULT_FONT_SIZE_HTML5 = 32;
64768
64825
  this.DEFAULT_ICON_SIZE = 12;
64769
64826
  this.DEFAULT_MAX_SIZE = 200;
64770
- this.DOC_WIDTH = 800;
64771
64827
  this._menuItems = [];
64772
64828
  this._idAttribName = '__record__id__';
64773
64829
  this._gridConfig = [];
@@ -64776,6 +64832,7 @@ class AgGridController {
64776
64832
  this._customFormatters = new Map();
64777
64833
  this._gridShowDom = false;
64778
64834
  this.peddingExecutionsOnGridShow = [];
64835
+ this._lastColsConfig = undefined;
64779
64836
  ModuleRegistry.registerModules([
64780
64837
  EnterpriseCoreModule,
64781
64838
  RangeSelectionModule,
@@ -65370,7 +65427,9 @@ class AgGridController {
65370
65427
  }
65371
65428
  }
65372
65429
  isColumnEditable(rowIndex, column) {
65373
- if (column.getColDef().headerName === '' || rowIndex === -1)
65430
+ if (column.getColDef().headerName === ''
65431
+ || column.getColDef().headerName === this.CHECK_BOX_COL_ID
65432
+ || rowIndex === -1)
65374
65433
  return false;
65375
65434
  const rowId = this._dataUnit.records[rowIndex][this._idAttribName];
65376
65435
  const rowNode = this._gridOptions.api.getRowNode(rowId);
@@ -65388,7 +65447,7 @@ class AgGridController {
65388
65447
  this._gridOptions.api.setFocusedCell(rowIndex, firstCell);
65389
65448
  }
65390
65449
  setColumnsDef(cols) {
65391
- const checkBoxColumn = Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: '', checkboxSelection: true, width: 29, suppressMovable: true, suppressAutoSize: true, suppressMenu: true, lockPosition: true, pinned: true }, (this._multipleSelection && { headerComponent: 'ezGridHeaderComponent', headerClass: 'ag-column-select-header' }));
65450
+ const checkBoxColumn = Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: this.CHECK_BOX_COL_ID, checkboxSelection: true, width: 29, suppressMovable: true, suppressAutoSize: true, suppressMenu: true, lockPosition: true, pinned: true }, (this._multipleSelection && { headerComponent: 'ezGridHeaderComponent', headerClass: 'ag-column-select-header' }));
65392
65451
  const newColDefs = this._options.suppressCheckBoxCol ? [] : [checkBoxColumn];
65393
65452
  if (this._statusResolver != undefined) {
65394
65453
  newColDefs.push({
@@ -65416,8 +65475,39 @@ class AgGridController {
65416
65475
  });
65417
65476
  this._colDefs = newColDefs;
65418
65477
  if (this._gridOptions && this._gridOptions.api) {
65478
+ this.setColsDefsWithStateIfNeeded(this._colDefs);
65479
+ }
65480
+ }
65481
+ setColsDefsWithStateIfNeeded(colDefs) {
65482
+ if (!this._lastColsConfig) {
65419
65483
  this._gridOptions.api.setColumnDefs(this._colDefs);
65420
65484
  }
65485
+ /*
65486
+ Caso a definição de colunas esteja sendo atualizada,
65487
+ e existe uma config aplicada, temos que considerar essa
65488
+ config ao adicionar nova definição de colunas.
65489
+ PS: Poderia apenas chamar o setColumnsState, porém,
65490
+ isso impactaria em performance, e o usuário ia perceber
65491
+ a mudança das colunas visualmente na grade, o que traria
65492
+ uma experiencia ruim.
65493
+ */
65494
+ const colDefsWithConfigs = this.getColsDefWithConfigApplied(colDefs, this._lastColsConfig);
65495
+ this._gridOptions.api.setColumnDefs(colDefsWithConfigs);
65496
+ }
65497
+ getColsDefWithConfigApplied(colDefs, colsConfig) {
65498
+ //Cria map de colunas existentes na config e seu índice
65499
+ const orderMap = colsConfig.reduce((map, col, index) => {
65500
+ map[col.name] = index;
65501
+ return map;
65502
+ }, {});
65503
+ //Remove colunas que não existem na config
65504
+ const filteredColsDefs = colDefs.filter((col) => !orderMap.hasOwnProperty(col.colId));
65505
+ //Ordena colunas baseada na config aplicada
65506
+ const sortedColumnDefs = filteredColsDefs.sort((a, b) => {
65507
+ var _a, _b;
65508
+ return ((_a = orderMap[a.field]) !== null && _a !== void 0 ? _a : Number.MAX_VALUE) - ((_b = orderMap[b.field]) !== null && _b !== void 0 ? _b : Number.MAX_VALUE);
65509
+ });
65510
+ return sortedColumnDefs;
65421
65511
  }
65422
65512
  hideSelectionColumn() {
65423
65513
  var _a, _b;
@@ -65451,6 +65541,7 @@ class AgGridController {
65451
65541
  if (this._grid === undefined) {
65452
65542
  throw new Error('Erro interno: Grid ainda não inicializado.');
65453
65543
  }
65544
+ this._lastColsConfig = state;
65454
65545
  const colDef = this._gridOptions.columnApi.getColumns();
65455
65546
  let columns = this.getColumnsDef();
65456
65547
  let visibleColumns = [];
@@ -65459,14 +65550,39 @@ class AgGridController {
65459
65550
  const columnsOffset = colDef.length - columns.length;
65460
65551
  this._gridConfig = state;
65461
65552
  let sort = [];
65462
- state.forEach((cfgColumn, index) => {
65553
+ let currentIndex = 0;
65554
+ state.forEach((cfgColumn) => {
65555
+ var _a, _b;
65463
65556
  const colWidth = this.getColumnWidth(cfgColumn);
65464
- this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + columnsOffset);
65557
+ this._gridOptions.columnApi.moveColumn(cfgColumn.name, currentIndex + columnsOffset);
65465
65558
  this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, colWidth);
65466
65559
  visibleColumns.push(cfgColumn.name);
65467
65560
  if (cfgColumn.ascending !== undefined) {
65468
65561
  sort.push({ colId: cfgColumn.name, sort: cfgColumn.ascending !== true ? 'desc' : 'asc', sortIndex: cfgColumn.orderIndex });
65469
65562
  }
65563
+ currentIndex++;
65564
+ const fieldMD = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
65565
+ /*
65566
+ Migração para o SEARCHPLUS, caso de uso:
65567
+ - Agora existe uma coluna para o campo de descrição do relaciona
65568
+ - Essa col, não existe na config da grade que já foi salva pelo DS
65569
+ - Nesse caso, precisamos inserir a coluna de descrição automaticamente para que
65570
+ os usuários não percam a apresentação do campo de descrição.
65571
+ PS: Caso esteja herdando do HTML5, devemos manter a config como está la
65572
+ */
65573
+ if (this.needToAddDescriptionColumn(cfgColumn, fieldMD, state)) {
65574
+ const descriptionColID = (_b = fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.properties) === null || _b === void 0 ? void 0 : _b[PRESENTATION_COL_ID_PROP_NAME];
65575
+ if (!descriptionColID)
65576
+ return;
65577
+ const descriptionCol = this._gridOptions.columnApi.getColumn(descriptionColID);
65578
+ const descriptionColDef = descriptionCol === null || descriptionCol === void 0 ? void 0 : descriptionCol.getColDef();
65579
+ const descriptionHeaderName = descriptionColDef === null || descriptionColDef === void 0 ? void 0 : descriptionColDef.headerName;
65580
+ const descriptionColSize = this.getColumnWidthByLabel(descriptionHeaderName);
65581
+ this._gridOptions.columnApi.moveColumn(descriptionColID, currentIndex + columnsOffset);
65582
+ this._gridOptions.columnApi.setColumnWidth(descriptionColID, descriptionColSize);
65583
+ visibleColumns.push(descriptionColID);
65584
+ currentIndex++;
65585
+ }
65470
65586
  });
65471
65587
  let invisibleColumns = columns.filter(column => !visibleColumns.includes(column.name)).map(column => column.name);
65472
65588
  this._gridOptions.columnApi.setColumnsVisible(visibleColumns, true);
@@ -65476,10 +65592,15 @@ class AgGridController {
65476
65592
  defaultState: { sort: null },
65477
65593
  });
65478
65594
  }
65479
- getAdaptiveWidth(width) {
65480
- const widthGrid = this._container.clientWidth;
65481
- const adaptiveWidth = (this.DOC_WIDTH * width) / widthGrid;
65482
- return Math.round(adaptiveWidth);
65595
+ needToAddDescriptionColumn(cfgColumn, fieldMD, stateConfig) {
65596
+ var _a, _b;
65597
+ if (!fieldMD) {
65598
+ return false;
65599
+ }
65600
+ const configVersion = ((_a = cfgColumn.configVersion) !== null && _a !== void 0 ? _a : 0);
65601
+ const isSearchPlus = (fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.userInterface) == UserInterface.SEARCHPLUS;
65602
+ const descriptionColID = (_b = fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.properties) === null || _b === void 0 ? void 0 : _b[PRESENTATION_COL_ID_PROP_NAME];
65603
+ return isSearchPlus && configVersion < 1 && stateConfig.find(col => col.name === descriptionColID) != undefined;
65483
65604
  }
65484
65605
  getColumnsState() {
65485
65606
  if (this._grid === undefined) {
@@ -65490,7 +65611,7 @@ class AgGridController {
65490
65611
  .map(s => {
65491
65612
  const column = this._gridOptions.columnApi.getColumn(s.colId);
65492
65613
  const def = column.getColDef();
65493
- const width = this.getAdaptiveWidth(column.getActualWidth());
65614
+ const width = column.getActualWidth();
65494
65615
  const label = def.headerName;
65495
65616
  const name = def.checkboxSelection ? '__SELECTION__' : s.colId;
65496
65617
  const colState = { label, name };
@@ -65540,7 +65661,7 @@ class AgGridController {
65540
65661
  return filterOptions.map(item => item.check).includes(true);
65541
65662
  }
65542
65663
  buildColDef(source) {
65543
- var _a, _b, _c;
65664
+ var _a, _b, _c, _d;
65544
65665
  let tooltip = undefined;
65545
65666
  const propSortable = StringUtils$1.getBooleanValue((_a = source.props) === null || _a === void 0 ? void 0 : _a.get('gridSortable'), true);
65546
65667
  if ((_b = source.props) === null || _b === void 0 ? void 0 : _b.get('gridHeaderTooltip')) {
@@ -65562,6 +65683,11 @@ class AgGridController {
65562
65683
  showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
65563
65684
  },
65564
65685
  valueFormatter: params => {
65686
+ var _a, _b, _c, _d;
65687
+ const presentationFrom = (_a = source === null || source === void 0 ? void 0 : source.props) === null || _a === void 0 ? void 0 : _a.get(PRESENTATION_FROM_COL_PROP_NAME);
65688
+ if (presentationFrom) {
65689
+ return (_d = (_c = (_b = params === null || params === void 0 ? void 0 : params.data) === null || _b === void 0 ? void 0 : _b[presentationFrom]) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : "";
65690
+ }
65565
65691
  if (params.value === undefined || params.value === null) {
65566
65692
  return "";
65567
65693
  }
@@ -65581,6 +65707,7 @@ class AgGridController {
65581
65707
  return this.getFormatterByColumn(params, source);
65582
65708
  },
65583
65709
  cellStyle: this.getStyleByColumn(source),
65710
+ editable: !((_d = source.props) === null || _d === void 0 ? void 0 : _d.has(PRESENTATION_FROM_COL_PROP_NAME))
65584
65711
  });
65585
65712
  }
65586
65713
  setCustomFormatters(customFormatters) {
@@ -65596,8 +65723,11 @@ class AgGridController {
65596
65723
  };
65597
65724
  }
65598
65725
  getStyleByColumn(source) {
65726
+ var _a;
65599
65727
  let cellStyle = this.getInitCellStyle();
65600
- switch (source === null || source === void 0 ? void 0 : source.userInterface) {
65728
+ const primitiveUIType = (_a = source === null || source === void 0 ? void 0 : source.props) === null || _a === void 0 ? void 0 : _a.get("PRIMITIVETUIYPE");
65729
+ const uitype = source === null || source === void 0 ? void 0 : source.userInterface;
65730
+ switch (primitiveUIType !== null && primitiveUIType !== void 0 ? primitiveUIType : uitype) {
65601
65731
  case UserInterface.DECIMALNUMBER:
65602
65732
  case UserInterface.INTEGERNUMBER:
65603
65733
  cellStyle['text-align'] = 'right';
@@ -65613,7 +65743,7 @@ class AgGridController {
65613
65743
  return cellStyle;
65614
65744
  }
65615
65745
  getFormatterByColumn(params, source) {
65616
- var _a;
65746
+ var _a, _b, _c, _d;
65617
65747
  if ((source === null || source === void 0 ? void 0 : source.userInterface) === 'OPTIONSELECTOR' && source.options) {
65618
65748
  const prop = source === null || source === void 0 ? void 0 : source.options;
65619
65749
  let options;
@@ -65650,6 +65780,9 @@ class AgGridController {
65650
65780
  return params === null || params === void 0 ? void 0 : params.value;
65651
65781
  }
65652
65782
  }
65783
+ if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.SEARCHPLUS) {
65784
+ return (_d = (_c = (_b = params === null || params === void 0 ? void 0 : params.value) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : params === null || params === void 0 ? void 0 : params.value) !== null && _d !== void 0 ? _d : "";
65785
+ }
65653
65786
  if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.DECIMALNUMBER) {
65654
65787
  if (params.value != undefined) {
65655
65788
  const precision = Number(source.props.get('precision')) || 2;
@@ -65823,7 +65956,7 @@ class AgGridController {
65823
65956
  this._gridOptions.api.stopEditing();
65824
65957
  }
65825
65958
  getColumnWidth(cfgColumn) {
65826
- var _a, _b;
65959
+ var _a, _b, _c, _d, _e, _f;
65827
65960
  if (cfgColumn == undefined) {
65828
65961
  return;
65829
65962
  }
@@ -65835,10 +65968,14 @@ class AgGridController {
65835
65968
  return parseInt(cfgColumn.width) + this.DEFAULT_FONT_SIZE_HTML5;
65836
65969
  }
65837
65970
  const field = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
65971
+ const label = (_b = field === null || field === void 0 ? void 0 : field.label) !== null && _b !== void 0 ? _b : (_f = (_e = (_d = (_c = this._gridOptions) === null || _c === void 0 ? void 0 : _c.columnApi) === null || _d === void 0 ? void 0 : _d.getColumn(cfgColumn.name)) === null || _e === void 0 ? void 0 : _e.getColDef()) === null || _f === void 0 ? void 0 : _f.headerName;
65838
65972
  if ((field === null || field === void 0 ? void 0 : field.userInterface) === UserInterface.SEARCH) {
65839
65973
  return this.DEFAULT_MAX_SIZE;
65840
65974
  }
65841
- 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;
65975
+ return this.getColumnWidthByLabel(label);
65976
+ }
65977
+ getColumnWidthByLabel(label) {
65978
+ const labelSize = ((label === null || label === void 0 ? void 0 : label.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
65842
65979
  return labelSize > this.DEFAULT_MAX_SIZE ? this.DEFAULT_MAX_SIZE : labelSize;
65843
65980
  }
65844
65981
  }