@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-76362.1 → 0.0.0-bugfix-dev-KB-79020.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/dist/cjs/DataBinder-3b083480.js +445 -0
  2. package/dist/cjs/FocusResolver-885f2173.js +35 -0
  3. package/dist/cjs/ez-actions-button.cjs.entry.js +4 -3
  4. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-button.cjs.entry.js +2 -2
  10. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-card-item_3.cjs.entry.js +13 -20
  12. package/dist/cjs/ez-chart.cjs.entry.js +2 -2
  13. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-combo-box.cjs.entry.js +49 -13
  17. package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +5 -4
  18. package/dist/cjs/ez-date-input.cjs.entry.js +9 -3
  19. package/dist/cjs/ez-date-time-input.cjs.entry.js +9 -3
  20. package/dist/cjs/ez-dialog.cjs.entry.js +11 -3
  21. package/dist/cjs/ez-dropdown_2.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-form-view.cjs.entry.js +3 -3
  24. package/dist/cjs/ez-form.cjs.entry.js +6 -326
  25. package/dist/cjs/ez-grid.cjs.entry.js +14620 -70502
  26. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  27. package/dist/cjs/ez-icon.cjs.entry.js +2 -2
  28. package/dist/cjs/ez-list.cjs.entry.js +152 -101
  29. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-modal.cjs.entry.js +2 -2
  32. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-number-input.cjs.entry.js +9 -2
  34. package/dist/cjs/ez-popover.cjs.entry.js +2 -2
  35. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  36. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-search.cjs.entry.js +68 -23
  39. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
  41. package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
  42. package/dist/cjs/ez-split-panel.cjs.entry.js +15 -5
  43. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-text-area.cjs.entry.js +67 -5
  45. package/dist/cjs/ez-text-input.cjs.entry.js +80 -8
  46. package/dist/cjs/ez-time-input.cjs.entry.js +7 -1
  47. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  48. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  49. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  50. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  51. package/dist/cjs/ezui.cjs.js +2 -2
  52. package/dist/cjs/filter-column.cjs.entry.js +1 -1
  53. package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +0 -3
  54. package/dist/cjs/loader.cjs.js +2 -2
  55. package/dist/collection/collection-manifest.json +1 -1
  56. package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
  57. package/dist/collection/components/ez-button/ez-button.css +2 -2
  58. package/dist/collection/components/ez-card-item/ez-card-item.css +14 -5
  59. package/dist/collection/components/ez-combo-box/ez-combo-box.css +12 -0
  60. package/dist/collection/components/ez-combo-box/ez-combo-box.js +76 -15
  61. package/dist/collection/components/ez-date-input/ez-date-input.js +35 -4
  62. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +35 -4
  63. package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
  64. package/dist/collection/components/ez-dialog/ez-dialog.js +9 -1
  65. package/dist/collection/components/ez-filter-input/ez-filter-input.css +0 -11
  66. package/dist/collection/components/ez-filter-input/ez-filter-input.js +22 -52
  67. package/dist/collection/components/ez-form/ez-form.js +1 -0
  68. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +3 -2
  69. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
  70. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +100 -27
  71. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +8 -0
  72. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +164 -46
  73. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +7 -0
  74. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +1 -0
  75. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
  76. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
  77. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +1 -0
  78. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
  79. package/dist/collection/components/ez-grid/ez-grid.js +90 -3
  80. package/dist/collection/components/ez-icon/ez-icon.css +153 -149
  81. package/dist/collection/components/ez-list/ez-list.css +5 -5
  82. package/dist/collection/components/ez-list/ez-list.js +152 -170
  83. package/dist/collection/components/ez-modal/ez-modal.css +4 -0
  84. package/dist/collection/components/ez-modal/ez-modal.js +2 -2
  85. package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
  86. package/dist/collection/components/ez-number-input/ez-number-input.js +25 -0
  87. package/dist/collection/components/ez-popover/ez-popover.css +3 -10
  88. package/dist/collection/components/ez-popup/ez-popup.css +4 -8
  89. package/dist/collection/components/ez-search/ez-search.css +1 -1
  90. package/dist/collection/components/ez-search/ez-search.js +94 -24
  91. package/dist/collection/components/ez-split-button/ez-split-button.css +2 -2
  92. package/dist/collection/components/ez-split-panel/ez-split-panel.js +35 -4
  93. package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
  94. package/dist/collection/components/ez-text-area/ez-text-area.css +49 -0
  95. package/dist/collection/components/ez-text-area/ez-text-area.js +102 -2
  96. package/dist/collection/components/ez-text-input/ez-text-input.css +33 -53
  97. package/dist/collection/components/ez-text-input/ez-text-input.js +88 -6
  98. package/dist/collection/components/ez-time-input/ez-time-input.js +24 -0
  99. package/dist/collection/utils/FocusResolver.js +31 -0
  100. package/dist/collection/utils/ResponsiveInputUtils.js +26 -0
  101. package/dist/collection/utils/form/DataBinder.js +18 -3
  102. package/dist/collection/utils/form/FormMetadata.js +1 -1
  103. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
  104. package/dist/custom-elements/index.js +15381 -70913
  105. package/dist/esm/DataBinder-02fa9bb9.js +441 -0
  106. package/dist/esm/FocusResolver-1ccbf850.js +33 -0
  107. package/dist/esm/ez-actions-button.entry.js +4 -3
  108. package/dist/esm/ez-alert-list.entry.js +1 -1
  109. package/dist/esm/ez-alert.entry.js +1 -1
  110. package/dist/esm/ez-application.entry.js +1 -1
  111. package/dist/esm/ez-badge.entry.js +1 -1
  112. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  113. package/dist/esm/ez-button.entry.js +2 -2
  114. package/dist/esm/ez-calendar.entry.js +1 -1
  115. package/dist/esm/ez-card-item_3.entry.js +13 -20
  116. package/dist/esm/ez-chart.entry.js +2 -2
  117. package/dist/esm/ez-check.entry.js +1 -1
  118. package/dist/esm/ez-chip.entry.js +1 -1
  119. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  120. package/dist/esm/ez-combo-box.entry.js +50 -14
  121. package/dist/esm/ez-custom-form-input_2.entry.js +5 -4
  122. package/dist/esm/ez-date-input.entry.js +9 -3
  123. package/dist/esm/ez-date-time-input.entry.js +9 -3
  124. package/dist/esm/ez-dialog.entry.js +11 -3
  125. package/dist/esm/ez-dropdown_2.entry.js +1 -1
  126. package/dist/esm/ez-file-item.entry.js +1 -1
  127. package/dist/esm/ez-form-view.entry.js +3 -3
  128. package/dist/esm/ez-form.entry.js +5 -325
  129. package/dist/esm/ez-grid.entry.js +14589 -70471
  130. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  131. package/dist/esm/ez-icon.entry.js +2 -2
  132. package/dist/esm/ez-list.entry.js +153 -102
  133. package/dist/esm/ez-loading-bar.entry.js +1 -1
  134. package/dist/esm/ez-modal-container.entry.js +1 -1
  135. package/dist/esm/ez-modal.entry.js +2 -2
  136. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  137. package/dist/esm/ez-number-input.entry.js +9 -2
  138. package/dist/esm/ez-popover.entry.js +2 -2
  139. package/dist/esm/ez-popup.entry.js +2 -2
  140. package/dist/esm/ez-radio-button.entry.js +1 -1
  141. package/dist/esm/ez-scroller_2.entry.js +1 -1
  142. package/dist/esm/ez-search.entry.js +68 -23
  143. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  144. package/dist/esm/ez-split-button.entry.js +2 -2
  145. package/dist/esm/ez-split-item.entry.js +1 -1
  146. package/dist/esm/ez-split-panel.entry.js +15 -5
  147. package/dist/esm/ez-tabselector.entry.js +1 -1
  148. package/dist/esm/ez-text-area.entry.js +67 -5
  149. package/dist/esm/ez-text-input.entry.js +80 -8
  150. package/dist/esm/ez-time-input.entry.js +7 -1
  151. package/dist/esm/ez-toast.entry.js +1 -1
  152. package/dist/esm/ez-tree.entry.js +1 -1
  153. package/dist/esm/ez-upload.entry.js +1 -1
  154. package/dist/esm/ez-view-stack.entry.js +1 -1
  155. package/dist/esm/ezui.js +3 -3
  156. package/dist/esm/filter-column.entry.js +1 -1
  157. package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +1 -3
  158. package/dist/esm/loader.js +3 -3
  159. package/dist/ezui/ezui.esm.js +1 -1
  160. package/dist/ezui/{p-e6b38ade.entry.js → p-0306dff7.entry.js} +1 -1
  161. package/dist/ezui/p-039a95bd.entry.js +1 -0
  162. package/dist/ezui/{p-91ccae0c.entry.js → p-09de35a2.entry.js} +1 -1
  163. package/dist/ezui/p-0a75bb05.entry.js +1 -0
  164. package/dist/ezui/p-0db68715.entry.js +1 -0
  165. package/dist/ezui/p-151fc744.entry.js +1 -0
  166. package/dist/ezui/p-15d7af92.entry.js +1 -0
  167. package/dist/ezui/{p-b2f6bc0a.entry.js → p-17be134a.entry.js} +1 -1
  168. package/dist/ezui/p-19098a3f.entry.js +1 -0
  169. package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
  170. package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
  171. package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
  172. package/dist/ezui/p-2b46b37b.entry.js +1 -0
  173. package/dist/ezui/p-2bb2a0c4.entry.js +1 -0
  174. package/dist/ezui/p-3175fe8c.entry.js +1 -0
  175. package/dist/ezui/p-43b41d3e.entry.js +309 -0
  176. package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
  177. package/dist/ezui/p-455e737c.js +1 -0
  178. package/dist/ezui/p-4575d511.entry.js +1 -0
  179. package/dist/ezui/{p-7567ccdd.entry.js → p-555c9018.entry.js} +1 -1
  180. package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
  181. package/dist/ezui/{p-f1c2c19e.entry.js → p-650e4b6d.entry.js} +1 -1
  182. package/dist/ezui/{p-554522db.entry.js → p-6d79930d.entry.js} +1 -1
  183. package/dist/ezui/{p-fc194825.entry.js → p-6e429cff.entry.js} +1 -1
  184. package/dist/ezui/{p-3b546374.entry.js → p-7409eeaa.entry.js} +1 -1
  185. package/dist/ezui/{p-11bfeca3.entry.js → p-77a4bd35.entry.js} +1 -1
  186. package/dist/ezui/p-783ea398.entry.js +1 -0
  187. package/dist/ezui/p-7ed30844.entry.js +1 -0
  188. package/dist/ezui/{p-e18d9e6a.entry.js → p-7fdd479f.entry.js} +1 -1
  189. package/dist/ezui/p-7fde6c1d.entry.js +1 -0
  190. package/dist/ezui/p-8481a08a.entry.js +1 -0
  191. package/dist/ezui/{p-1b08bf3c.entry.js → p-8888d9ed.entry.js} +1 -1
  192. package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
  193. package/dist/ezui/{p-e7395eae.entry.js → p-90bcd2ba.entry.js} +1 -1
  194. package/dist/ezui/{p-a921e3e7.entry.js → p-990b4318.entry.js} +1 -1
  195. package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
  196. package/dist/ezui/p-a5b91a77.entry.js +1 -0
  197. package/dist/ezui/p-a80b1287.entry.js +1 -0
  198. package/dist/ezui/{p-30951bd7.entry.js → p-baf80b13.entry.js} +1 -1
  199. package/dist/ezui/p-bc2f844e.entry.js +1 -0
  200. package/dist/ezui/p-bfad39eb.entry.js +1 -0
  201. package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
  202. package/dist/ezui/{p-b858fc6e.entry.js → p-c3045972.entry.js} +1 -1
  203. package/dist/ezui/{p-a563df31.entry.js → p-c4320a39.entry.js} +1 -1
  204. package/dist/ezui/p-cd2e78f0.entry.js +1 -0
  205. package/dist/ezui/p-d0ca26fe.entry.js +1 -0
  206. package/dist/ezui/p-dc628ed3.js +1 -0
  207. package/dist/ezui/p-dc8b36c3.entry.js +1 -0
  208. package/dist/ezui/{p-bef7daac.entry.js → p-e347df9c.entry.js} +1 -1
  209. package/dist/ezui/{p-70f1c812.entry.js → p-f9e551de.entry.js} +1 -1
  210. package/dist/ezui/p-fec696ab.entry.js +1 -0
  211. package/dist/ezui/p-ffd246f5.entry.js +1 -0
  212. package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +1 -0
  213. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +7 -1
  214. package/dist/types/components/ez-date-input/ez-date-input.d.ts +6 -1
  215. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +6 -1
  216. package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -0
  217. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +4 -11
  218. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
  219. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +12 -0
  220. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +7 -2
  221. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -1
  222. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +19 -7
  223. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +3 -1
  224. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
  225. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  226. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
  227. package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
  228. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +1 -1
  229. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
  230. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
  231. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
  232. package/dist/types/components/ez-grid/ez-grid.d.ts +11 -1
  233. package/dist/types/components/ez-list/ez-list.d.ts +3 -26
  234. package/dist/types/components/ez-modal/ez-modal.d.ts +1 -1
  235. package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
  236. package/dist/types/components/ez-search/ez-search.d.ts +10 -2
  237. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +4 -0
  238. package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
  239. package/dist/types/components/ez-text-area/ez-text-area.d.ts +17 -0
  240. package/dist/types/components/ez-text-input/ez-text-input.d.ts +9 -0
  241. package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
  242. package/dist/types/components.d.ts +114 -44
  243. package/dist/types/utils/FocusResolver.d.ts +5 -0
  244. package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -0
  245. package/dist/types/utils/form/DataBinder.d.ts +3 -0
  246. package/package.json +11 -4
  247. package/dist/cjs/RecordValidationProcessor-10846595.js +0 -108
  248. package/dist/esm/RecordValidationProcessor-9c6cc267.js +0 -105
  249. package/dist/ezui/p-00687830.entry.js +0 -1
  250. package/dist/ezui/p-044d46d5.entry.js +0 -1
  251. package/dist/ezui/p-11b09aa1.entry.js +0 -1
  252. package/dist/ezui/p-190c190f.entry.js +0 -304
  253. package/dist/ezui/p-2de9f0aa.entry.js +0 -1
  254. package/dist/ezui/p-36180f4d.entry.js +0 -1
  255. package/dist/ezui/p-3f8c33e0.entry.js +0 -1
  256. package/dist/ezui/p-52100a6e.entry.js +0 -1
  257. package/dist/ezui/p-5a40c77a.entry.js +0 -1
  258. package/dist/ezui/p-61059f6b.entry.js +0 -1
  259. package/dist/ezui/p-68267f59.entry.js +0 -1
  260. package/dist/ezui/p-6ec40dec.entry.js +0 -1
  261. package/dist/ezui/p-823cc11b.entry.js +0 -1
  262. package/dist/ezui/p-85b500bb.entry.js +0 -1
  263. package/dist/ezui/p-868b56f7.entry.js +0 -1
  264. package/dist/ezui/p-8ac13678.entry.js +0 -1
  265. package/dist/ezui/p-940760bf.entry.js +0 -1
  266. package/dist/ezui/p-9e08ddb0.entry.js +0 -1
  267. package/dist/ezui/p-b2a1398f.entry.js +0 -1
  268. package/dist/ezui/p-ba5f4ee7.entry.js +0 -1
  269. package/dist/ezui/p-d40b93a7.entry.js +0 -1
  270. package/dist/ezui/p-d4aba783.entry.js +0 -1
  271. package/dist/ezui/p-e3ec7422.entry.js +0 -1
  272. package/dist/ezui/p-f291db18.entry.js +0 -1
  273. package/dist/ezui/p-f42855b9.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as t,c as a,h as e,H as r,g as o}from"./p-23a36bb6.js";import{ElementIDUtils as i}from"@sankhyalabs/core";const s=class{constructor(e){t(this,e),this.ezChange=a(this,"ezChange",7),this.LINE_HEIGHT=24,this.HEIGHT_RATIO=1.4,this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.rows=4,this.canShowError=!0,this.mode="regular",this.enableResize=!1,this.autoRows=!1,this.autoFocus=!1}observeErrorMessage(){var t,a,e,r;"string"==typeof this.errorMessage&&""!==this.errorMessage?(null===(t=this._container)||void 0===t||t.classList.add("hasError"),null===(a=this._messageBoxElem)||void 0===a||a.classList.add("hasError")):(null===(e=this._container)||void 0===e||e.classList.remove("hasError"),null===(r=this._messageBoxElem)||void 0===r||r.classList.remove("hasError"))}observeValue(t,a){this._inputElem&&t!=a&&(this.canChangeValue()&&(this._inputElem.value=this.value||""),this.adjustFloatingLabel(),this.errorMessage="",this.ezChange.emit(this.value))}observeMode(){null==this._initialRows&&(this._initialRows=this.rows>0?this.rows:void 0);const t=this._initialRows>0?this._initialRows:"slim"!=this.mode?4:2;t!==this.rows&&(this.rows=t)}observeRows(){const t=this.rows>0?this.rows:"slim"!=this.mode?4:2;t!==this.rows&&this.updateRows(t)}observeAutoRows(){var t,a;this.autoRows?(null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this.initializeResizeObserver()):null===(a=this._resizeObserver)||void 0===a||a.disconnect()}async appendTextToSelection(t){var a,e,r,o;const i=this._inputElem.selectionStart,s=this._inputElem.selectionEnd,l=null!==(e=null===(a=this.value)||void 0===a?void 0:a.substring(0,i))&&void 0!==e?e:"",n=null!==(o=null===(r=this.value)||void 0===r?void 0:r.substring(s))&&void 0!==o?o:"";this.value=`${l}${t}${n}`;const d=i+t.length;this._inputElem.setSelectionRange(i===s?d:i,d),await this.setFocus()}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}canChangeValue(){return this._inputElem&&(this.value||"")!==this._inputElem.value}adjustFloatingLabel(){if(this.label&&this._labelElem){const t=this.value&&this.value.toString().length>0,a=this._labelElem.classList.contains("textarea__label--floated");t||this.isFocused()?a||this._labelElem.classList.add("textarea__label--floated"):a&&this._labelElem.classList.remove("textarea__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}updateRows(t){this.rows=t,this._initialRows=t}calculateMaxRows(){const t=this._hostElement.parentElement;if(!t)return;const a=Math.max((null==t?void 0:t.clientHeight)||0,this.LINE_HEIGHT);if(a>0){const t=Math.floor(a/this.LINE_HEIGHT*this.HEIGHT_RATIO);t!==this.rows&&this.updateRows(t)}}initializeResizeObserver(){if(!this.autoRows)return;const t=this._hostElement.parentElement;if(t){try{null!=this._resizeObserver&&this._resizeObserver.unobserve(t),this._resizeObserver=new ResizeObserver(this.calculateMaxRows.bind(this)),this._resizeObserver.observe(t)}catch(t){console.warn(t)}this.calculateMaxRows()}}handleFocusout(){this.adjustFloatingLabel(),this._container&&this._container.classList.contains("textarea--focus")&&this._container.classList.remove("textarea--focus")}handleChange(){this.canChangeValue()&&(this.value=this._inputElem.value)}handleFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("textarea__label--floated")&&this._labelElem.classList.add("textarea__label--floated"),this._container&&!this._container.classList.contains("textarea--focus")&&this._container.classList.add("textarea--focus")}connectedCallback(){this.initializeResizeObserver()}disconnectedCallback(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect()}componentDidLoad(){this.observeErrorMessage(),this.adjustFloatingLabel(),this.observeMode(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus()}))}render(){return i.addIDInfoIfNotExists(this._hostElement,"input"),e(r,null,e("div",{class:"textarea "+(this.enabled?"":"textarea--disabled"),ref:t=>this._container=t},this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:this.enabled?"textarea__label":"textarea__label textarea__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("textarea",{onFocus:()=>this.handleFocus(),"data-element-id":i.getInternalIDInfo("input"),ref:t=>this._inputElem=t,value:this.value,disabled:!this.enabled,class:{"textarea--slim":"slim"===this.mode,"textarea--resizable":this.enableResize},placeholder:"slim"===this.mode&&this.label?this.label:"",onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},rows:this.rows})),this.canShowError&&"slim"!=this.mode&&e("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return o(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],mode:["observeMode"],rows:["observeRows"],autoRows:["observeAutoRows"]}}};s.style=":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #2B3A54);--text-area__input--background-color:var(--background--light, #FFFFFF);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--color--strokes,#DCE0E8);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--background--medium, #F0F3F7);--text-area__input--disabled--color:var(--text--primary, #626E82);--text-area__input--disabled--border--color:var(--color--strokes,#DCE0E8);--text-area__input--error--border-color:var(--color-alert--error-800,#BD0025);--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color-alert--error-800,#BD0025);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;--text-area__scrollbar--color-default:var(--scrollbar--default, #626e82);--text-area__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--text-area__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--text-area__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--text-area__scrollbar--border-radius:var(--border--radius-small, 6px);--text-area__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;width:100%;padding:0;background:none;font-weight:var(--text-area--font-weight);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);margin-top:calc(var(--space--medium, 12px) + 4px);scrollbar-width:thin;scrollbar-color:var(--text-area__scrollbar--color-clicked) var(--text-area__scrollbar--color-background)}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color);border:var(--text-area__input--disabled--border);cursor:not-allowed}textarea::-webkit-scrollbar{background-color:var(--text-area__scrollbar--color-background);width:var(--text-area__scrollbar--width);max-width:var(--text-area__scrollbar--width);min-width:var(--text-area__scrollbar--width)}textarea::-webkit-scrollbar-thumb{background-color:var(--text-area__scrollbar--color-default);border-radius:var(--text-area__scrollbar--border-radius)}textarea::-webkit-scrollbar-track{background-color:var(--text-area__scrollbar--color-background);border-radius:var(--text-area__scrollbar--border-radius)}textarea::-webkit-scrollbar-thumb:vertical:hover,textarea::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--text-area__scrollbar--color-hover)}textarea::-webkit-scrollbar-thumb:vertical:active,textarea::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--text-area__scrollbar--color-clicked)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--disabled{border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--disabled--border--color);background-color:var(--text-area__input--disabled--background-color);cursor:not-allowed}.textarea--resizable{resize:both}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color);cursor:not-allowed}.textarea--slim{margin-top:var(--space--small, 6px)}.textarea--slim::-webkit-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-ms-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:disabled::-webkit-input-placeholder,.textarea--slim:disabled:-moz-placeholder,.textarea--slim:disabled::-moz-placeholder,.textarea--slim:disabled:-ms-input-placeholder,.textarea--slim:disabled::placeholder{color:var(--text-area__input--disabled--color);cursor:not-allowed}";export{s as ez_text_area}
@@ -0,0 +1 @@
1
+ class l{static resolveFocus(l,i=!0){var t;l&&(null===(t=l.focus)||void 0===t||t.call(l),l.setFocus?l.setFocus({selectText:i}):this.resolveFocusOnChild(l,i))}static resolveFocusOnChild(l,i=!0){var t,e;if(this.isGridCell(l)&&l.firstElementChild)return void this.resolveFocusOnChild(l.firstElementChild);if(!l||!l.classList.contains("hydrated"))return;const o=l.firstElementChild;((null==o?void 0:o.focus)||(null==o?void 0:o.setFocus))&&(null===(t=null==o?void 0:o.focus)||void 0===t||t.call(o),null===(e=null==o?void 0:o.setFocus)||void 0===e||e.call(o,{selectText:i}))}static isGridCell(l){var i;return"gridcell"===(null===(i=null==l?void 0:l.getAttribute)||void 0===i?void 0:i.call(l,"role"))}}export{l as F}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as s,c as e,g as o}from"./p-23a36bb6.js";import{C as l}from"./p-4607fb89.js";import{ObjectUtils as n,HTMLBuilder as h,StringUtils as a,ElementIDUtils as d}from"@sankhyalabs/core";import{A as r}from"./p-2187f86c.js";import"./p-ab574d59.js";import"./p-b853763b.js";const u=class{constructor(i){t(this,i),this.gui=void 0,this.customEditor=void 0,this.formViewField=void 0,this.value=void 0,this.detailContext=void 0,this.builderFallback=void 0,this.selectedRecord=void 0}async setFocus(){var t,i;null===(i=null===(t=this.gui)||void 0===t?void 0:t.setFocus)||void 0===i||i.call(t)}async setBlur(){var t,i;null===(i=null===(t=this.gui)||void 0===t?void 0:t.setBlur)||void 0===i||i.call(t)}async isInvalid(){var t,i;return(null===(i=null===(t=this.gui)||void 0===t?void 0:t.isInvalid)||void 0===i?void 0:i.call(t))||!1}watchValue(){this.handleValue(this.gui)}watchCustomEditor(){this.getContent()}watchFormViewField(t,i){n.equals(t,i)||this.getContent()}watchDetailContext(){this.getContent()}watchBuilderFallback(){this.getContent()}watchSelectedRecord(t,i){(null==t?void 0:t.__record__id__)!==(null==i?void 0:i.__record__id__)&&this.getContent()}getContent(){var t,s,e,o,n;const d=new Map;for(const t in this.formViewField.props)d.set(t,this.formViewField.props[t]);const r={value:this.value,name:this.formViewField.name,currentEditor:this.builderFallback(this.formViewField),setValue:t=>this.setValue(t),getValue:this.getValue,record:this.selectedRecord,editorMetadata:{label:this.formViewField.label,hidden:!1===(null===(t=this.formViewField.props)||void 0===t?void 0:t.visible),userInterface:this.formViewField.userInterface,options:null===(s=this.formViewField.props)||void 0===s?void 0:s.options,props:this.formViewField.props?d:void 0,optionLoader:this.formViewField.optionLoader},source:l.FORM,detailContext:this.detailContext};let u=this.customEditor.getEditorElement(r);if(!u)return u=this.builderFallback(this.formViewField),this.handleValue(u),void(this.gui=u);if(!(u instanceof HTMLElement)&&"string"!=typeof u)return this.handleValue(u),void(this.gui=u);"string"==typeof u&&(u=h.parseElement(u));const c=null!==(n=null!==(o=null===(e=this.value)||void 0===e?void 0:e.value)&&void 0!==o?o:this.value)&&void 0!==n?n:"";u.setAttribute("value",c),this.gui=i("div",{key:a.generateUUID(),ref:t=>t&&t.appendChild(u)})}setValue(t){this.value=t}getValue(){return this.value}handleValue(t){var i;null===(i=t.t)||void 0===i||i.forEach((t=>{t.i.value=this.value}))}componentWillLoad(){this.getContent()}render(){return i(s,null,this.gui)}static get watchers(){return{value:["watchValue"],customEditor:["watchCustomEditor"],formViewField:["watchFormViewField"],detailContext:["watchDetailContext"],builderFallback:["watchBuilderFallback"],selectedRecord:["watchSelectedRecord"]}}},c=class{constructor(i){t(this,i),this.saveEdition=e(this,"saveEdition",7),this.cancelEdition=e(this,"cancelEdition",7),this._newValue=void 0,this.value=void 0,this.styled=void 0}async applyFocusSelect(){this.calcSizeInput(this.value,!0)}calcSizeInput(t,i=!1){var s,e;const o=null===(e=null===(s=this._inputElement)||void 0===s?void 0:s.shadowRoot)||void 0===e?void 0:e.querySelector("input");if(null!=o){const s=this.getWidthValue(t);o.style.width=s+"px",i&&setTimeout((()=>o.select()),100)}}getWidthValue(t){if(null!=this._valueBasis){const i=this._valueBasis;if(null!=t){const s=2;return i.innerHTML=t,i.clientWidth>0?i.clientWidth+s:s}i.innerHTML=""}return 0}setStyledInput(){var t,i;let s="",e="",o="";null!=this.styled&&(s=this.styled.fontSize,e=this.styled.fontWeight,o=this.styled.fontFamily);const l=null===(i=null===(t=this._inputElement)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("input");null!=l&&(l.style.fontSize=s,l.style.fontWeight=e,l.style.fontFamily=o);const n=this._valueBasis;null!=n&&(n.style.fontSize=s,n.style.fontWeight=e,n.style.fontFamily=o)}handleSaveEdition(){this._newValue?this.saveEdition.emit({value:this.value,newValue:this._newValue}):r.alert("Aviso","Não é possível salvar um campo em branco.").then((()=>{this.setNewValue(this.value,!0)}))}handleCancelEdition(){this.cancelEdition.emit()}setNewValue(t,i=!1){this._newValue=t,this.calcSizeInput(this._newValue,i)}componentDidLoad(){this.applyFocusSelect(),this.setNewValue(this.value)}componentDidRender(){this.setStyledInput()}render(){return d.addIDInfoIfNotExists(this._element,"input"),i(s,null,i("span",{class:"text-edit__hidden-value",ref:t=>this._valueBasis=t}),i("ez-text-input",{"data-element-id":d.getInternalIDInfo("textInput"),onInput:()=>{this.calcSizeInput(this._newValue)},class:"text-edit__form-input",value:this._newValue,ref:t=>this._inputElement=t,mode:"slim",onEzChange:t=>this.setNewValue(null==t?void 0:t.detail),noBorder:!0}),i("ez-button",{class:"text-edit__icon-check",mode:"icon",iconName:"check",size:"small",onClick:()=>{this.handleSaveEdition()}}),i("ez-button",{class:"text-edit__icon-close",mode:"icon",iconName:"close",size:"small",onClick:()=>{this.handleCancelEdition()}}))}get _element(){return o(this)}};c.style=":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}";export{u as ez_custom_form_input,c as ez_text_edit}
@@ -1 +1 @@
1
- import{r as l,c as e,h as i,g as o}from"./p-e4c7eb39.js";import{ElementIDUtils as t}from"@sankhyalabs/core";import{A as s}from"./p-2187f86c.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-4607fb89.js";const a=class{constructor(i){l(this,i),this.ezChange=e(this,"ezChange",7),this.ezRemove=e(this,"ezRemove",7),this.ezSaveEditLabel=e(this,"ezSaveEditLabel",7),this.ezEditLabelMode=e(this,"ezEditLabelMode",7),this._activeEditText=!1,this.value=!1,this.boxBordered=!1,this.label=void 0,this.subtitle=void 0,this.headerSize="small",this.iconPlacement="left",this.headerAlign="left",this.removable=!1,this.editable=!1,this.conditionalSave=void 0}async showHide(){this.value=!this.value}async applyFocusTextEdit(){var l;null===(l=this._refTextEdit)||void 0===l||l.applyFocusSelect()}async cancelEdition(){this._activeEditText=!1,this.ezEditLabelMode.emit(this._activeEditText)}observeCollapsedValue(){this.ezChange.emit(this.value)}getHeaderSize(){const l=this.headerSize&&this.headerSize.toLowerCase(),e=["xsmall","xlarge"].includes(l)?l.replace("x","x-"):l;return["x-small","small","medium","large","x-large"].includes(e)?e:"small"}removeElement(){this._hostElement&&this._hostElement.remove(),this.ezRemove.emit(this)}editLabel(l){l.preventDefault(),l.stopPropagation(),this._activeEditText=!0,this.ezEditLabelMode.emit(this._activeEditText)}confirmRemove(l){l.stopPropagation(),s.confirm("Aviso",`Deseja realmente remover o grupo <b>${this.label}</b>?`).then((l=>{l&&this.removeElement()}))}saveEditionText(l){const{value:e,newValue:i}=l.detail;if(e===i)return void this.cancelEdition();let o=!0;this.conditionalSave&&(o=this.conditionalSave(i)),this.label!==i&&o&&(this.label=i,this._activeEditText=!1,this.ezSaveEditLabel.emit(l.detail),this.ezEditLabelMode.emit(this._activeEditText))}getStyledLabel(){if(null!=this._refLabel)return{fontSize:window.getComputedStyle(this._refLabel).getPropertyValue("font-size"),fontWeight:window.getComputedStyle(this._refLabel).getPropertyValue("font-weight"),fontFamily:window.getComputedStyle(this._refLabel).getPropertyValue("font-family")}}componentDidLoad(){t.addIDInfo(this._hostElement)}render(){return i("div",{class:`collapsible-box ${this.boxBordered&&"collapsable-box--bordered"}`},i("div",{class:"collapsible-box__header"},i("button",Object.assign({},this._activeEditText?null:{onClick:()=>{this.showHide()}},{class:"collapsible-box__title collapsible-box__title--"+(this.headerAlign||"left")+("right"===this.iconPlacement?" collapsible-box__title--icon-right":"")+(this.value?" collapsible-box__title--no-margin":"")}),i("ez-icon",{slot:"icon","icon-name":"chevron-right",size:this.getHeaderSize(),class:"collapsible-box__icon collapsible-box__icon--"+this.getHeaderSize()+(this.value?" collapsible-box__icon--collapsed":""),id:"toggleCollapsible"}),this._activeEditText?i("ez-text-edit",{class:"collapsible-box__text-edit",ref:l=>this._refTextEdit=l,value:this.label,styled:this.getStyledLabel(),onSaveEdition:l=>this.saveEditionText(l),onCancelEdition:()=>this.cancelEdition()}):i("label",{class:"collapsible-box__label font--"+this.getHeaderSize(),title:this.label,ref:l=>this._refLabel=l},i("span",null,this.label),this.editable&&i("ez-icon",{slot:"icon","icon-name":"edit",onClick:l=>this.editLabel(l),title:"Editar"}),this.removable&&i("ez-icon",{slot:"icon","icon-name":"delete",onClick:l=>this.confirmRemove(l),title:"Remover"}))),i("slot",{name:"rightSlot"})),i("div",{class:"collapsible-box__content"+(this.value?"":" collapsible-box__content--show")},this.subtitle&&i("div",{class:"subtitle-box__content"},i("label",{class:"subtitle-box__label",title:this.subtitle},i("span",null,this.subtitle))),i("slot",null)))}get _hostElement(){return o(this)}static get watchers(){return{value:["observeCollapsedValue"]}}};a.style=":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}";export{a as ez_collapsible_box}
1
+ import{r as l,c as i,h as o,g as e}from"./p-23a36bb6.js";import{ElementIDUtils as t}from"@sankhyalabs/core";import{A as s}from"./p-2187f86c.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-4607fb89.js";const a=class{constructor(o){l(this,o),this.ezChange=i(this,"ezChange",7),this.ezRemove=i(this,"ezRemove",7),this.ezSaveEditLabel=i(this,"ezSaveEditLabel",7),this.ezEditLabelMode=i(this,"ezEditLabelMode",7),this._activeEditText=!1,this.value=!1,this.boxBordered=!1,this.label=void 0,this.subtitle=void 0,this.headerSize="small",this.iconPlacement="left",this.headerAlign="left",this.removable=!1,this.editable=!1,this.conditionalSave=void 0}async showHide(){this.value=!this.value}async applyFocusTextEdit(){var l;null===(l=this._refTextEdit)||void 0===l||l.applyFocusSelect()}async cancelEdition(){this._activeEditText=!1,this.ezEditLabelMode.emit(this._activeEditText)}observeCollapsedValue(){this.ezChange.emit(this.value)}getHeaderSize(){const l=this.headerSize&&this.headerSize.toLowerCase(),i=["xsmall","xlarge"].includes(l)?l.replace("x","x-"):l;return["x-small","small","medium","large","x-large"].includes(i)?i:"small"}removeElement(){this._hostElement&&this._hostElement.remove(),this.ezRemove.emit(this)}editLabel(l){l.preventDefault(),l.stopPropagation(),this._activeEditText=!0,this.ezEditLabelMode.emit(this._activeEditText)}confirmRemove(l){l.stopPropagation(),s.confirm("Aviso",`Deseja realmente remover o grupo <b>${this.label}</b>?`).then((l=>{l&&this.removeElement()}))}saveEditionText(l){const{value:i,newValue:o}=l.detail;if(i===o)return void this.cancelEdition();let e=!0;this.conditionalSave&&(e=this.conditionalSave(o)),this.label!==o&&e&&(this.label=o,this._activeEditText=!1,this.ezSaveEditLabel.emit(l.detail),this.ezEditLabelMode.emit(this._activeEditText))}getStyledLabel(){if(null!=this._refLabel)return{fontSize:window.getComputedStyle(this._refLabel).getPropertyValue("font-size"),fontWeight:window.getComputedStyle(this._refLabel).getPropertyValue("font-weight"),fontFamily:window.getComputedStyle(this._refLabel).getPropertyValue("font-family")}}componentDidLoad(){t.addIDInfo(this._hostElement)}render(){return o("div",{class:`collapsible-box ${this.boxBordered&&"collapsable-box--bordered"}`},o("div",{class:"collapsible-box__header"},o("button",Object.assign({},this._activeEditText?null:{onClick:()=>{this.showHide()}},{class:"collapsible-box__title collapsible-box__title--"+(this.headerAlign||"left")+("right"===this.iconPlacement?" collapsible-box__title--icon-right":"")+(this.value?" collapsible-box__title--no-margin":"")}),o("ez-icon",{slot:"icon","icon-name":"chevron-right",size:this.getHeaderSize(),class:"collapsible-box__icon collapsible-box__icon--"+this.getHeaderSize()+(this.value?" collapsible-box__icon--collapsed":""),id:"toggleCollapsible"}),this._activeEditText?o("ez-text-edit",{class:"collapsible-box__text-edit",ref:l=>this._refTextEdit=l,value:this.label,styled:this.getStyledLabel(),onSaveEdition:l=>this.saveEditionText(l),onCancelEdition:()=>this.cancelEdition()}):o("label",{class:"collapsible-box__label font--"+this.getHeaderSize(),title:this.label,ref:l=>this._refLabel=l},o("span",null,this.label),this.editable&&o("ez-icon",{slot:"icon","icon-name":"edit",onClick:l=>this.editLabel(l),title:"Editar"}),this.removable&&o("ez-icon",{slot:"icon","icon-name":"delete",onClick:l=>this.confirmRemove(l),title:"Remover"}))),o("slot",{name:"rightSlot"})),o("div",{class:"collapsible-box__content"+(this.value?"":" collapsible-box__content--show")},this.subtitle&&o("div",{class:"subtitle-box__content"},o("label",{class:"subtitle-box__label",title:this.subtitle},o("span",null,this.subtitle))),o("slot",null)))}get _hostElement(){return e(this)}static get watchers(){return{value:["observeCollapsedValue"]}}};a.style=":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}";export{a as ez_collapsible_box}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,F as e,H as h}from"./p-e4c7eb39.js";import{ArrayUtils as l}from"@sankhyalabs/core";var o;!function(t){t.DATASOURCE_RESULTS="DATASOURCE_RESULTS",t.DATASOURCE_RESULTS_EMPTY="DATASOURCE_RESULTS_EMPTY",t.DATASOURCE_INIT="DATASOURCE_INIT",t.OPTIONS_EMPTY="OPTIONS_EMPTY",t.OPTIONS="OPTIONS"}(o||(o={}));const n=class{constructor(s){t(this,s),this.changeFilteredOptions=i(this,"changeFilteredOptions",7),this.columnName=void 0,this.dataSource=void 0,this.useOptions=!1,this.options=void 0,this.isTextSearch=!1,this.filteredOptions=void 0,this.displayOptions=void 0,this.viewScenario=void 0,this.displayOptionToCheckAllItems=!0}async clearFilteredOptions(){this.setInitialScenario(),this.filteredOptions=[],this.searchInput&&(this.searchInput.value=""),this.filterInput&&(this.filterInput.value="")}onChangeUseOptions(){this.setInitialScenario()}onChangeOptions(){this.options&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.options)),this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.setInitialScenario()}onChangeFilteredOptions(t){this.displayOptions=this.filteredOptions,this.displayOptionToCheckAllItems=this.filteredOptions.length>1,this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.changeFilteredOptions.emit(t)}componentDidRender(){this.changeCheckAllValeuFromFilteredOptions()}ordenationByCheckStateAndAlphabetically(t){const i=[],s=[];let e;return t.forEach((t=>{null==t.value||""===t.label?e=Object.assign(Object.assign({},t),{label:"(Vazio)"}):t.check?i.push(t):s.push(t)})),(null==e?[]:[e]).concat(null==this.dataSource?l.sortAlphabetically(i):this.dataSource.sortItems(this.columnName,i)).concat(null==this.dataSource?l.sortAlphabetically(s):this.dataSource.sortItems(this.columnName,s))}changeCheckAllValeuFromFilteredOptions(){var t,i,s,e;const h=null===(t=this.filteredOptions)||void 0===t?void 0:t.every((t=>!0===t.check)),l=null===(i=this.filteredOptions)||void 0===i?void 0:i.every((t=>!1===t.check)),o=(null===(s=this.filteredOptions)||void 0===s?void 0:s.some((t=>!1===t.check)))&&(null===(e=this.filteredOptions)||void 0===e?void 0:e.some((t=>!0===t.check)))&&(!h||!l);return this.checkInput&&h?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!0)):this.checkInput&&o?(this.checkInput.indeterminate=!0,void(this.checkInput.value=!1)):this.checkInput&&l?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!1)):void 0}setInitialScenario(){if(this.useOptions)return this.viewScenario=o.OPTIONS,void this.changeCheckAllValeuFromFilteredOptions();this.viewScenario=this.options&&this.options.length>0?o.DATASOURCE_RESULTS:o.DATASOURCE_INIT}async searchWithDataSource(t,i){const{argument:s,mode:e}=t;if("PRELOAD"!==e&&i)return this.dataSource.fetchData(s,i)}handleSearchOnDataSource(t){var i;const s=null!==(i=this.filteredOptions)&&void 0!==i?i:[];t.detail&&!s.some((i=>i.value==t.detail.value))&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...s,t.detail])),this.viewScenario=o.DATASOURCE_RESULTS,this.searchInput.value=""}handleRemoveItemFromOptions(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter((i=>i.value!==t.value))),0===this.filteredOptions.length&&(this.viewScenario=o.DATASOURCE_INIT),this.searchInput&&(this.searchInput.value="")}handleSearchOnOption(t){if(t.detail)return this.displayOptions=l.applyStringFilter(t.detail,this.filteredOptions,!0),void(this.viewScenario=0===this.displayOptions.length?o.OPTIONS_EMPTY:o.OPTIONS);this.displayOptions=this.filteredOptions,this.viewScenario=o.OPTIONS}handleChangeSelectAllItems(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...this.filteredOptions.map((i=>(i.check=!!t.detail,i)))])}handleChangeSelectedItem(t){const{detail:i}=t;this.filteredOptions.find((t=>t.label===i.label)).check=i.check}buildViewList(t){return s(e,null,this.displayOptionToCheckAllItems&&s("ez-check",{ref:t=>this.checkInput=t,label:"Selecionar todos",class:"multi-selection__select-all",onEzChange:this.handleChangeSelectAllItems.bind(this)}),s("ez-list",{class:"multi-selection__list",dataSource:this.displayOptions,listMode:"check",hoverFeedback:!0,onEzCheckChange:this.handleChangeSelectedItem.bind(this),itemSlotBuilder:t?this.buildDeleteIconSlot.bind(this):null}))}buildDeleteIconSlot(t){return s("ez-icon",{style:{cursor:"pointer"},iconName:"delete",onClick:()=>this.handleRemoveItemFromOptions(t)})}buildInitViewWithDataSource(){return s("multi-selection-box-message",{message:"Selecione os valores a serem filtrados através do campo de busca."})}buildViewEmptyResults(){return s("multi-selection-box-message",{message:"Nenhum resultado encontrado."})}scenarioToDisplay(t){const i={[o.DATASOURCE_INIT]:()=>this.buildInitViewWithDataSource(),[o.DATASOURCE_RESULTS]:()=>this.buildViewList(!0),[o.DATASOURCE_RESULTS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS]:()=>this.buildViewList(!1)}[t];return i?i():void 0}render(){return s(h,null,s("div",{class:"multi-selection"},this.useOptions?s("ez-filter-input",{ref:t=>this.filterInput=t,label:"Buscar..",onEzChange:this.handleSearchOnOption.bind(this)}):s("ez-search",{class:"multi-selection__input",label:"Buscar...",ref:t=>this.searchInput=t,suppressEmptyOption:!0,showOptionValue:!1,showSelectedValue:!1,optionLoader:t=>this.searchWithDataSource(t,this.columnName),onEzChange:this.handleSearchOnDataSource.bind(this),isTextSearch:this.isTextSearch}),s("ez-scroll",{class:"multi-selection__content-options"},this.scenarioToDisplay(this.viewScenario))))}static get watchers(){return{useOptions:["onChangeUseOptions"],options:["onChangeOptions"],filteredOptions:["onChangeFilteredOptions"]}}};n.style=".sc-ez-multi-selection-list-h{--ez-check--outter-gap:0px;display:block;width:304px;height:322px;max-height:calc(100vh - 350px)}.multi-selection__input.sc-ez-multi-selection-list{margin-bottom:var(--space--2xs, 8px)}.multi-selection__content-options.sc-ez-multi-selection-list{position:relative;top:-12px;left:-4px}.multi-selection__select-all.sc-ez-multi-selection-list{height:var(--space--xl);margin:0 var(--space--small, 6px)}.multi-selection__list.sc-ez-multi-selection-list{height:235px;max-height:calc(100vh - 435px);overflow-y:auto;overflow-x:clip}.multi-selection__list.sc-ez-multi-selection-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";export{n as ez_multi_selection_list}
1
+ import{r as t,c as i,h as s,F as e,H as h}from"./p-23a36bb6.js";import{ArrayUtils as l}from"@sankhyalabs/core";var o;!function(t){t.DATASOURCE_RESULTS="DATASOURCE_RESULTS",t.DATASOURCE_RESULTS_EMPTY="DATASOURCE_RESULTS_EMPTY",t.DATASOURCE_INIT="DATASOURCE_INIT",t.OPTIONS_EMPTY="OPTIONS_EMPTY",t.OPTIONS="OPTIONS"}(o||(o={}));const n=class{constructor(s){t(this,s),this.changeFilteredOptions=i(this,"changeFilteredOptions",7),this.columnName=void 0,this.dataSource=void 0,this.useOptions=!1,this.options=void 0,this.isTextSearch=!1,this.filteredOptions=void 0,this.displayOptions=void 0,this.viewScenario=void 0,this.displayOptionToCheckAllItems=!0}async clearFilteredOptions(){this.setInitialScenario(),this.filteredOptions=[],this.searchInput&&(this.searchInput.value=""),this.filterInput&&(this.filterInput.value="")}onChangeUseOptions(){this.setInitialScenario()}onChangeOptions(){this.options&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.options)),this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.setInitialScenario()}onChangeFilteredOptions(t){this.displayOptions=this.filteredOptions,this.displayOptionToCheckAllItems=this.filteredOptions.length>1,this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.changeFilteredOptions.emit(t)}componentDidRender(){this.changeCheckAllValeuFromFilteredOptions()}ordenationByCheckStateAndAlphabetically(t){const i=[],s=[];let e;return t.forEach((t=>{null==t.value||""===t.label?e=Object.assign(Object.assign({},t),{label:"(Vazio)"}):t.check?i.push(t):s.push(t)})),(null==e?[]:[e]).concat(null==this.dataSource?l.sortAlphabetically(i):this.dataSource.sortItems(this.columnName,i)).concat(null==this.dataSource?l.sortAlphabetically(s):this.dataSource.sortItems(this.columnName,s))}changeCheckAllValeuFromFilteredOptions(){var t,i,s,e;const h=null===(t=this.filteredOptions)||void 0===t?void 0:t.every((t=>!0===t.check)),l=null===(i=this.filteredOptions)||void 0===i?void 0:i.every((t=>!1===t.check)),o=(null===(s=this.filteredOptions)||void 0===s?void 0:s.some((t=>!1===t.check)))&&(null===(e=this.filteredOptions)||void 0===e?void 0:e.some((t=>!0===t.check)))&&(!h||!l);return this.checkInput&&h?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!0)):this.checkInput&&o?(this.checkInput.indeterminate=!0,void(this.checkInput.value=!1)):this.checkInput&&l?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!1)):void 0}setInitialScenario(){if(this.useOptions)return this.viewScenario=o.OPTIONS,void this.changeCheckAllValeuFromFilteredOptions();this.viewScenario=this.options&&this.options.length>0?o.DATASOURCE_RESULTS:o.DATASOURCE_INIT}async searchWithDataSource(t,i){const{argument:s,mode:e}=t;if("PRELOAD"!==e&&i)return this.dataSource.fetchData(s,i)}handleSearchOnDataSource(t){var i;const s=null!==(i=this.filteredOptions)&&void 0!==i?i:[];t.detail&&!s.some((i=>i.value==t.detail.value))&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...s,t.detail])),this.viewScenario=o.DATASOURCE_RESULTS,this.searchInput.value=""}handleRemoveItemFromOptions(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter((i=>i.value!==t.value))),0===this.filteredOptions.length&&(this.viewScenario=o.DATASOURCE_INIT),this.searchInput&&(this.searchInput.value="")}handleSearchOnOption(t){if(t.detail)return this.displayOptions=l.applyStringFilter(t.detail,this.filteredOptions,!0),void(this.viewScenario=0===this.displayOptions.length?o.OPTIONS_EMPTY:o.OPTIONS);this.displayOptions=this.filteredOptions,this.viewScenario=o.OPTIONS}handleChangeSelectAllItems(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...this.filteredOptions.map((i=>(i.check=!!t.detail,i)))])}handleChangeSelectedItem(t){const{detail:i}=t;this.filteredOptions.find((t=>t.label===i.label)).check=i.check}buildViewList(t){return s(e,null,this.displayOptionToCheckAllItems&&s("ez-check",{ref:t=>this.checkInput=t,label:"Selecionar todos",class:"multi-selection__select-all",onEzChange:this.handleChangeSelectAllItems.bind(this)}),s("ez-list",{class:"multi-selection__list",dataSource:this.displayOptions,listMode:"check",hoverFeedback:!0,onEzCheckChange:this.handleChangeSelectedItem.bind(this),itemSlotBuilder:t?this.buildDeleteIconSlot.bind(this):null}))}buildDeleteIconSlot(t){return s("ez-icon",{style:{cursor:"pointer"},iconName:"delete",onClick:()=>this.handleRemoveItemFromOptions(t)})}buildInitViewWithDataSource(){return s("multi-selection-box-message",{message:"Selecione os valores a serem filtrados através do campo de busca."})}buildViewEmptyResults(){return s("multi-selection-box-message",{message:"Nenhum resultado encontrado."})}scenarioToDisplay(t){const i={[o.DATASOURCE_INIT]:()=>this.buildInitViewWithDataSource(),[o.DATASOURCE_RESULTS]:()=>this.buildViewList(!0),[o.DATASOURCE_RESULTS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS]:()=>this.buildViewList(!1)}[t];return i?i():void 0}render(){return s(h,null,s("div",{class:"multi-selection"},this.useOptions?s("ez-filter-input",{ref:t=>this.filterInput=t,label:"Buscar..",onEzChange:this.handleSearchOnOption.bind(this)}):s("ez-search",{class:"multi-selection__input",label:"Buscar...",ref:t=>this.searchInput=t,suppressEmptyOption:!0,showOptionValue:!1,showSelectedValue:!1,optionLoader:t=>this.searchWithDataSource(t,this.columnName),onEzChange:this.handleSearchOnDataSource.bind(this),isTextSearch:this.isTextSearch}),s("ez-scroll",{class:"multi-selection__content-options"},this.scenarioToDisplay(this.viewScenario))))}static get watchers(){return{useOptions:["onChangeUseOptions"],options:["onChangeOptions"],filteredOptions:["onChangeFilteredOptions"]}}};n.style=".sc-ez-multi-selection-list-h{--ez-check--outter-gap:0px;display:block;width:304px;height:322px;max-height:calc(100vh - 350px)}.multi-selection__input.sc-ez-multi-selection-list{margin-bottom:var(--space--2xs, 8px)}.multi-selection__content-options.sc-ez-multi-selection-list{position:relative;top:-12px;left:-4px}.multi-selection__select-all.sc-ez-multi-selection-list{height:var(--space--xl);margin:0 var(--space--small, 6px)}.multi-selection__list.sc-ez-multi-selection-list{height:235px;max-height:calc(100vh - 435px);overflow-y:auto;overflow-x:clip}.multi-selection__list.sc-ez-multi-selection-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";export{n as ez_multi_selection_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as d,h as i,H as o,g as l}from"./p-23a36bb6.js";import{FloatingManager as e,KeyboardManager as a}from"@sankhyalabs/core";const n=class{constructor(i){t(this,i),this.ezCloseModal=d(this,"ezCloseModal",7),this.ezOpenModal=d(this,"ezOpenModal",7),this.ezModalAction=d(this,"ezModalAction",7),this.modalSize=void 0,this.align=void 0,this.heightMode="regular",this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.closeOutsideLeave=!1,this.scrim="medium"}observeOpened(){this.opened?this._overlayId=e.subscribeOverlayControl(this._modalRef):e.unsubscribeOverlayControl(this._modalRef||this._overlayId)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}componentDidLoad(){this.observeOpened(),new a({propagate:!1,element:this._element}).bind("Enter",this.ezModalAction.emit.bind("OK")).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}componentDidRender(){this.modalFocus()}modalFocus(){this.opened&&requestAnimationFrame((()=>{const t=this._element.shadowRoot.querySelector("ez-modal-container");this._modalRef&&null===t&&this._modalRef.focus()}))}onMouseDownHandler(t){this.closeOutsideClick&&t.target===this._overlay&&this.closeModal()}onMouseLeaveHandler(){this.closeOutsideLeave&&this.closeModal()}render(){const t="left"===this.align?"left":"right";return i(o,null,this.opened?i("div",{ref:t=>this._modalRef=t,class:`modal modal__screen-${this.scrim} ${"regular"===this.heightMode?"modal__vertical-padding":""}`,onMouseDown:t=>this.onMouseDownHandler(t),tabIndex:-1},i("div",{class:`modal__container modal__container--${t}`,ref:t=>this._overlay=t},i("div",{onMouseLeave:()=>this.onMouseLeaveHandler(),class:`modal__content ${"regular"===this.heightMode?`modal__content--${t}`:""} ${this.modalSize}`},i("slot",null)))):void 0)}get _element(){return l(this)}static get watchers(){return{opened:["observeOpened"]}}};n.style=":host{--ez-modal-z-index:var(--elevation--22, 22);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-none{background:none}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";export{n as ez_modal}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as s,g as n}from"./p-23a36bb6.js";import{DateUtils as a,TimeFormatter as o,ElementIDUtils as h}from"@sankhyalabs/core";import{C as r}from"./p-9e11fc7b.js";const l=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.canShowError=!0,this.autoFocus=!1}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=a.validateDate(t,!0),s=a.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=a.validateDate(this.value,!0),e=a.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}showCalendar(){let t;this.isFixed()?(t=29,this._calendar.fitHorizontal(0)):t=this.errorMessage||"slim"===this.mode?6:-13,this._calendar.fitVertical(t,this._elem.clientHeight),this._calendar.style.visibility="inherit"}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),n=s.length>0?s[0]:t,h=o.prepareValue(s[1]?s[1]:"",this.showSeconds);return a.strToDate(n+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=a.validateDate(this.value,!0),i=a.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage="O valor digitado não é uma data válida"}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return a.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=a.validateDate(this.value,!0),s=a.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}isFixed(){return"true"===this._elem.dataset.isFixed}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-text-input",{"data-element-id":h.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),canShowError:this.canShowError},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},floating:!0,time:!0,showSeconds:this.showSeconds,"data-is-fixed":this._elem.dataset.isFixed}))}get _elem(){return n(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};l.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{l as ez_date_time_input}
@@ -6,6 +6,7 @@ export declare class EzActionsButton {
6
6
  private _button;
7
7
  private _floatingID;
8
8
  private _arrowOffset;
9
+ private _spaceMedium;
9
10
  private _element;
10
11
  private _selectedAction;
11
12
  /**
@@ -1,4 +1,5 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
+ import { TFocusOptions } from "../ez-text-input/ez-text-input";
2
3
  export declare class EzComboBox {
3
4
  private _textInput;
4
5
  private _optionsList;
@@ -89,6 +90,10 @@ export declare class EzComboBox {
89
90
  * Informa se a pesquisa é do tipo texto.
90
91
  */
91
92
  isTextSearch: boolean;
93
+ /**
94
+ * Se true o campo de texto receberá o foco ao ser renderizado.
95
+ */
96
+ autoFocus: boolean;
92
97
  /**
93
98
  * Emitido quando acontece a alteração de valor do campo.
94
99
  */
@@ -100,7 +105,7 @@ export declare class EzComboBox {
100
105
  /**
101
106
  * Aplica o foco no campo.
102
107
  */
103
- setFocus(): Promise<void>;
108
+ setFocus(options?: TFocusOptions): Promise<void>;
104
109
  /**
105
110
  * Remove o foco do campo.
106
111
  */
@@ -132,6 +137,7 @@ export declare class EzComboBox {
132
137
  private previousOption;
133
138
  private scrollToOption;
134
139
  private selectCurrentOption;
140
+ private controlListWithOnlyOne;
135
141
  private updateSource;
136
142
  private selectOption;
137
143
  private loadOptions;
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { WaitingChange } from '@sankhyalabs/core';
3
+ import { TFocusOptions } from '../ez-text-input/ez-text-input';
3
4
  export declare class EzDateInput {
4
5
  private _calendar;
5
6
  private _textInput;
@@ -43,13 +44,17 @@ export declare class EzDateInput {
43
44
  * Se false deixa de exibir a mensagem de erro dentro do campo.
44
45
  */
45
46
  canShowError: boolean;
47
+ /**
48
+ * Se true o campo de texto receberá o foco ao ser renderizado.
49
+ */
50
+ autoFocus: boolean;
46
51
  observeLabel(): void;
47
52
  observeErrorMessage(): void;
48
53
  observeValue(newValue: Date, oldValue: Date): void;
49
54
  /**
50
55
  * Aplica o foco no campo.
51
56
  */
52
- setFocus(): Promise<void>;
57
+ setFocus(options?: TFocusOptions): Promise<void>;
53
58
  /**
54
59
  * Remove o foco do campo.
55
60
  */
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { WaitingChange } from '@sankhyalabs/core';
3
+ import { TFocusOptions } from '../ez-text-input/ez-text-input';
3
4
  export declare class EzDateTimeInput {
4
5
  private _calendar;
5
6
  private _textInput;
@@ -47,13 +48,17 @@ export declare class EzDateTimeInput {
47
48
  * Se false deixa de exibir a mensagem de erro dentro do campo.
48
49
  */
49
50
  canShowError: boolean;
51
+ /**
52
+ * Se true o campo de texto receberá o foco ao ser renderizado.
53
+ */
54
+ autoFocus: boolean;
50
55
  observeLabel(): void;
51
56
  observeErrorMessage(): void;
52
57
  observeValue(newValue: Date, oldValue: Date): void;
53
58
  /**
54
59
  * Aplica o foco no campo.
55
60
  */
56
- setFocus(): Promise<void>;
61
+ setFocus(options?: TFocusOptions): Promise<void>;
57
62
  /**
58
63
  * Remove o foco do campo.
59
64
  */
@@ -24,6 +24,7 @@ export declare class EzDialog {
24
24
  private _overlayRef;
25
25
  private _overlayId;
26
26
  private _canFocusOnPrimaryBtn;
27
+ private _lastActiveElement;
27
28
  /**
28
29
  * Define se o ez-dialog será utilizado no modo de confirmação.
29
30
  */
@@ -83,6 +84,7 @@ export declare class EzDialog {
83
84
  private focusOnDialog;
84
85
  private handleFocusOnPrimaryButton;
85
86
  private focusOnPrimaryButton;
87
+ disconnectedCallback(): void;
86
88
  render(): any;
87
89
  }
88
90
  export {};
@@ -1,4 +1,5 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
+ import { TFocusOptions } from "../ez-text-input/ez-text-input";
2
3
  export declare class EzFilterInput {
3
4
  private _elem;
4
5
  private _textInput;
@@ -15,10 +16,6 @@ export declare class EzFilterInput {
15
16
  * Emitido quando acontece o foco no campo.
16
17
  */
17
18
  ezFocusIn: EventEmitter<void>;
18
- /**
19
- * Emitido quando tem interação com o Ícone de pesquisa
20
- */
21
- ezIconClick: EventEmitter<boolean>;
22
19
  /**
23
20
  * Texto a ser apresentado como título do campo.
24
21
  */
@@ -52,16 +49,16 @@ export declare class EzFilterInput {
52
49
  */
53
50
  canShowError: boolean;
54
51
  /**
55
- * Se true permite ao usuário interagir com o ícone de pesquisa
52
+ * Se true o campo de texto receberá o foco ao ser renderizado.
56
53
  */
57
- enabledIconClick: boolean;
54
+ autoFocus: boolean;
58
55
  observeLabel(): void;
59
56
  observeErrorMessage(): void;
60
57
  observeValue(newValue: string, oldValue: string): void;
61
58
  /**
62
59
  * Aplica o foco no campo.
63
60
  */
64
- setFocus(): Promise<void>;
61
+ setFocus(options?: TFocusOptions): Promise<void>;
65
62
  /**
66
63
  * Remove o foco do campo.
67
64
  */
@@ -78,10 +75,6 @@ export declare class EzFilterInput {
78
75
  * Método responsável por resetar o valor do campo para o ultimo valor inputado.
79
76
  */
80
77
  endSearch(): Promise<void>;
81
- /**
82
- * Método usado para emitir o evento de clique no ícone
83
- */
84
- handleIconClick(): Promise<void>;
85
78
  handleChange(evt: CustomEvent<string>): void;
86
79
  handleFocus: () => void;
87
80
  componentDidLoad(): void;
@@ -1,2 +1,2 @@
1
1
  import { IFormViewField } from "../../interfaces/IFormViewField";
2
- export declare const buildTextInput: ({ name, label, readOnly, contextName, canShowError }: IFormViewField) => HTMLElement;
2
+ export declare const buildTextInput: ({ name, label, readOnly, contextName, canShowError, props }: IFormViewField) => HTMLElement;
@@ -163,6 +163,17 @@ export default interface EzGridController {
163
163
  setFocus(): void;
164
164
  savingCanceled(fields: Array<IInvalidField>, recordId: string): void;
165
165
  destroy(): void;
166
+ registryListeners(): void;
167
+ resetPaginationState(): void;
168
+ stopEdit(): void;
169
+ /**
170
+ Remove coluna de seleção por checkbox
171
+ */
172
+ hideSelectionColumn(): void;
173
+ /**
174
+ Mostra coluna de seleção por checkbox
175
+ */
176
+ showSelectionColumn(): void;
166
177
  }
167
178
  /**
168
179
  * Carrega as informações necessárias para contextualizar corretamente a instância.
@@ -246,6 +257,7 @@ export interface EzGridOptions {
246
257
  * Só funciona quando a prop enableGridInsert está ativa
247
258
  */
248
259
  enableContinuousInsert?: boolean;
260
+ enableLockManger?: boolean;
249
261
  }
250
262
  /**
251
263
  * Representa cada coluna da grade.
@@ -18,7 +18,6 @@ export default class AgGridController implements EzGridController, SortingProvid
18
18
  private _columnStateChangeCallback;
19
19
  private _selectionChangeCallback;
20
20
  private _doubleClickCallBack;
21
- private _enterprise;
22
21
  private _menuItems;
23
22
  private _multipleSelection;
24
23
  private _dataUnit;
@@ -44,7 +43,7 @@ export default class AgGridController implements EzGridController, SortingProvid
44
43
  private handleFilteredColumnsChanged;
45
44
  clearFilter(): void;
46
45
  private showFilterColumn;
47
- constructor(enterprise: boolean);
46
+ constructor(_enterprise: boolean);
48
47
  getGridConfig(): Array<EzGridColumnConfig>;
49
48
  locateColumn(columnName: string): void;
50
49
  getSort(_dataUnitName: string, defaultSorting: Array<Sort>): Array<Sort>;
@@ -86,12 +85,15 @@ export default class AgGridController implements EzGridController, SortingProvid
86
85
  setFocusLastRow(): void;
87
86
  startEditionOnRowByIndex(rowIndex: number): void;
88
87
  startEditionOnLastRow(): void;
88
+ private syncSelectWithDataUnit;
89
89
  private startEdition;
90
90
  private getFirstEditableColl;
91
91
  private isColumnEditable;
92
92
  private setFocusOnRow;
93
93
  private focusByCollAndRow;
94
94
  setColumnsDef(cols: Array<EzGridColumn>): void;
95
+ hideSelectionColumn(): void;
96
+ showSelectionColumn(): void;
95
97
  getColumnsDef(): Array<EzGridColumn>;
96
98
  setColumnsState(state: Array<EzGridColumnConfig>): void;
97
99
  private getAdaptiveWidth;
@@ -124,4 +126,7 @@ export default class AgGridController implements EzGridController, SortingProvid
124
126
  clearInvalidCells(stopEdition?: boolean): void;
125
127
  processContinuousInsert(): void;
126
128
  destroy(): void;
129
+ registryListeners(): void;
130
+ resetPaginationState(): void;
131
+ stopEdit(): void;
127
132
  }
@@ -1,4 +1,4 @@
1
- import { IServerSideDatasource, IServerSideGetRowsParams } from "ag-grid-community";
1
+ import { IServerSideDatasource, IServerSideGetRowsParams } from "@ag-grid-community/core";
2
2
  import { DataUnit, QuickFilter } from '@sankhyalabs/core';
3
3
  import EzGridController, { EzGridColumn, EzGridOptions } from "../EzGridController";
4
4
  export default class DataSource implements IServerSideDatasource {
@@ -41,5 +41,6 @@ export default class DataSource implements IServerSideDatasource {
41
41
  needReload(currentLoading: IServerSideGetRowsParams): boolean;
42
42
  private callbackGetRows;
43
43
  destroy(): void;
44
+ registryListeners(): void;
44
45
  buildColumnDefs(): Array<EzGridColumn>;
45
46
  }
@@ -1,5 +1,5 @@
1
1
  import { DataUnit, Record } from '@sankhyalabs/core';
2
- import { CellPosition, ColDef, GridApi, GridOptions } from 'ag-grid-community';
2
+ import { CellPosition, ColDef, GridApi, GridOptions } from "@ag-grid-community/core";
3
3
  import { IRecordValidator } from '../../../../utils/form/interfaces';
4
4
  import { ICustomEditorInfo } from '../../../../utils/customEditor/interfaces/ICustomEditorInfo';
5
5
  import { ICustomRenderInfo } from '../../../../utils/customRender/interfaces/ICustomRenderInfo';
@@ -8,6 +8,7 @@ export default class GridEditionManager {
8
8
  private _dataUnit;
9
9
  private _lastCellClicked;
10
10
  private _lastCellEdited;
11
+ private _lastCellOpened;
11
12
  private _targetEditionCell;
12
13
  private _recordValidationProcessor;
13
14
  private _gridOptions;
@@ -18,12 +19,19 @@ export default class GridEditionManager {
18
19
  private _customRenders;
19
20
  private _enableContinuousInsert;
20
21
  private _enableGridInsert;
21
- private _invalidCell;
22
- constructor(dataUnit: DataUnit, useEnterLikeTab: boolean, recordsValidator: IRecordValidator, editionIsDisabled: () => boolean, customEditors?: Map<string, ICustomEditorInfo>, customRenders?: Map<string, ICustomRenderInfo>, enableContinuousInsert?: boolean, enableGridInsert?: boolean);
22
+ private _invalidCells;
23
+ private _nextInvalidCell;
24
+ private _currentEditLock;
25
+ private _lockerId;
26
+ constructor(dataUnit: DataUnit, useEnterLikeTab: boolean, recordsValidator: IRecordValidator, editionIsDisabled: () => boolean, customEditors?: Map<string, ICustomEditorInfo>, customRenders?: Map<string, ICustomRenderInfo>, enableContinuousInsert?: boolean, enableGridInsert?: boolean, lockerId?: string);
23
27
  configureGrid(options: GridOptions): GridOptions;
24
28
  updateCurrentEditorGuiValue(updatedRowValue: Record): void;
29
+ private lockFocusWhenAddRow;
30
+ private handleCellEditingStartedRowAdd;
31
+ private isSelectableRow;
25
32
  private canContinuousInsert;
26
- proceedAutoSave(): void;
33
+ proceedAutoSave(): Promise<boolean>;
34
+ private saveDataUnit;
27
35
  recordValidate(): Promise<void>;
28
36
  navigateByEnterKey(keyboardEvent: KeyboardEvent): void;
29
37
  getComponents(): {
@@ -32,6 +40,7 @@ export default class GridEditionManager {
32
40
  verifyClickToEdition(api: GridApi, cellClicked: CellPosition): void;
33
41
  configureColumn(col: ColDef): ColDef;
34
42
  private getRequiredFields;
43
+ private getFormRequiredFields;
35
44
  private saveSuccess;
36
45
  private saveFail;
37
46
  private focusOnCell;
@@ -46,11 +55,14 @@ export default class GridEditionManager {
46
55
  private isColEditable;
47
56
  private isSecondClick;
48
57
  private onCellEditRequest;
58
+ private handlePromiseValue;
59
+ private updateCellValue;
49
60
  setCellEditors(customEditors: Map<string, ICustomEditorInfo>): void;
50
61
  setCellRenders(customRenders: Map<string, ICustomRenderInfo>): void;
51
- private setInvalidCell;
52
- getInvalidCell(): IInvalidCell;
53
- processContinuousInsert(): void;
62
+ private pushInvalidCell;
63
+ getInvalidCells(): Array<IInvalidCell>;
64
+ getNextInvalidCell(): IInvalidCell;
65
+ processContinuousInsert(): Promise<void>;
54
66
  clearInvalidCells(stopEdition?: boolean): void;
55
67
  setEnableContinuousInsert(enable: boolean): void;
56
68
  hasInvalidField(fieldName: string, recordId: string): boolean;
@@ -1,4 +1,4 @@
1
- import { ICellEditorParams } from "ag-grid-community";
1
+ import { ICellEditorParams } from "@ag-grid-community/core";
2
2
  import { ICustomEditorInfo } from "../../../../../utils/customEditor/interfaces/ICustomEditorInfo";
3
3
  import EzCellEditor from "../editor/EzCellEditor";
4
4
  interface CustomParamsEditor {
@@ -16,5 +16,7 @@ export default class EzGridCustomCellEditor extends EzCellEditor {
16
16
  getGui(): HTMLElement;
17
17
  private setValue;
18
18
  getValue(): any;
19
+ afterGuiAttached(): void;
20
+ focusIn(): void;
19
21
  }
20
22
  export {};
@@ -1,4 +1,4 @@
1
- import { ICellRendererParams } from "ag-grid-community";
1
+ import { ICellRendererParams } from "@ag-grid-community/core";
2
2
  import EzCellRender from "../editor/EzCellRender";
3
3
  import { ICustomRenderInfo } from "../../../../../utils/customRender/interfaces/ICustomRenderInfo";
4
4
  interface CustomParamsRender {
@@ -1,4 +1,4 @@
1
- import { IHeaderParams } from 'ag-grid-community';
1
+ import { IHeaderParams } from "@ag-grid-community/core";
2
2
  export interface IEzGridCustomHeaderParams {
3
3
  tooltip?: string;
4
4
  hasFilter?: () => boolean;
@@ -1,4 +1,4 @@
1
- import { ICellRendererComp, ICellRendererParams } from "ag-grid-community";
1
+ import { ICellRendererComp, ICellRendererParams } from "@ag-grid-community/core";
2
2
  export declare class CellRendererStatus implements ICellRendererComp {
3
3
  private readonly DEFAULT_COLOR;
4
4
  private _eGui;
@@ -1,4 +1,4 @@
1
- import { IHeaderParams, IHeaderComp } from "ag-grid-community";
1
+ import { IHeaderParams, IHeaderComp } from "@ag-grid-community/core";
2
2
  export default class SelectionHeader implements IHeaderComp {
3
3
  private element;
4
4
  private checkBox;
@@ -1,4 +1,4 @@
1
- import { ICellEditorComp, ICellEditorParams } from "ag-grid-community";
1
+ import { ICellEditorComp, ICellEditorParams } from "@ag-grid-community/core";
2
2
  import { Record } from "@sankhyalabs/core";
3
3
  import { IEditorMetadata } from "./IEditorMetadata";
4
4
  export default class EzCellEditor implements ICellEditorComp {
@@ -1,4 +1,4 @@
1
- import { ICellRendererComp, ICellRendererParams } from "ag-grid-community";
1
+ import { ICellRendererComp, ICellRendererParams } from "@ag-grid-community/core";
2
2
  import { IEditorMetadata } from "./IEditorMetadata";
3
3
  export default class EzCellRender implements ICellRendererComp {
4
4
  private _gui;
@@ -4,6 +4,7 @@ export interface IUICellEditor extends HTMLElement {
4
4
  valueSetter?: (value: any) => void;
5
5
  valueGetter?: () => any;
6
6
  isPopUp?: boolean;
7
+ autoFocus?: boolean;
7
8
  }
8
9
  export interface IFocusOptions {
9
10
  selectText: boolean;
@@ -1,4 +1,4 @@
1
- import { IServerSideGetRowsRequest, LoadSuccessParams } from "ag-grid-community";
1
+ import { IServerSideGetRowsRequest, LoadSuccessParams } from "@ag-grid-community/core";
2
2
  export default class Server {
3
3
  private _data;
4
4
  constructor(data: Array<any>);
@@ -13,7 +13,6 @@ export declare class EzGrid {
13
13
  private _gridSelectionCounter;
14
14
  private _resizeObserver;
15
15
  private _messageFilterAppliedSuccess;
16
- private _gridApi;
17
16
  private _filterColumn;
18
17
  private _refPaginationLabel;
19
18
  private _refPaginationLabelTooltip;
@@ -107,6 +106,10 @@ export declare class EzGrid {
107
106
  * Só funciona quando a prop enableGridInsert está ativa
108
107
  */
109
108
  enableContinuousInsert?: boolean;
109
+ /**
110
+ * Ativa inserção de registros no modo grade.
111
+ */
112
+ enableLockManger?: boolean;
110
113
  /**
111
114
  * Aplica a definição de colunas.
112
115
  */
@@ -175,10 +178,16 @@ export declare class EzGrid {
175
178
  * Atribui o foco para a grade.
176
179
  */
177
180
  setFocus(): Promise<void>;
181
+ /**
182
+ * Para a edição da grade.
183
+ */
184
+ stopEdit(): Promise<void>;
185
+ checkStopEditOutsideClick(event: MouseEvent): Promise<void>;
178
186
  observeConfig(config: IGridConfig): void;
179
187
  updatePaginationTooltip(): void;
180
188
  observePaginationCounterMode(newValue: any): void;
181
189
  onSelectionChange(evt: CustomEvent): void;
190
+ handleClick(event: MouseEvent): Promise<void>;
182
191
  private setSelection;
183
192
  private onSelectAllRecords;
184
193
  private onSelectPageRecords;
@@ -207,6 +216,7 @@ export declare class EzGrid {
207
216
  private _hidePaginationDescription;
208
217
  private _showPaginationDescription;
209
218
  disconnectedCallback(): void;
219
+ connectedCallback(): void;
210
220
  componentWillRender(): void;
211
221
  componentDidRender(): void;
212
222
  componentWillLoad(): void;