@sankhyalabs/ezui 7.1.0-dev.5 → 7.1.0-dev.6

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 (248) hide show
  1. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  2. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-button.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-chart.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-classic-combo-box.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-classic-input.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-classic-text-area.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-combo-box-list_4.cjs.entry.js +2 -2
  19. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  21. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-empty-card.cjs.entry.js +1 -1
  26. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  27. package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
  28. package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
  29. package/dist/cjs/ez-form.cjs.entry.js +2 -2
  30. package/dist/cjs/ez-grid-view.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-grid.cjs.entry.js +2 -2
  32. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-list-item.cjs.entry.js +1 -1
  36. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-modal-container.cjs.entry.js +3 -12
  39. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  41. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  42. package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
  43. package/dist/cjs/ez-popover-core.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
  45. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  46. package/dist/cjs/ez-popup.cjs.entry.js +5 -2
  47. package/dist/cjs/ez-progress-bar.cjs.entry.js +1 -1
  48. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  49. package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +1 -1
  50. package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
  51. package/dist/cjs/ez-search-plus.cjs.entry.js +1 -1
  52. package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
  53. package/dist/cjs/ez-search.cjs.entry.js +1 -1
  54. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  55. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  56. package/dist/cjs/ez-sortable-list.cjs.entry.js +1 -1
  57. package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
  58. package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
  59. package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
  60. package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
  61. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  62. package/dist/cjs/ez-tag-input.cjs.entry.js +1 -1
  63. package/dist/cjs/ez-tag.cjs.entry.js +1 -1
  64. package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
  65. package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
  66. package/dist/cjs/ez-tile-medium.cjs.entry.js +1 -1
  67. package/dist/cjs/ez-tile.cjs.entry.js +1 -1
  68. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  69. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  70. package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
  71. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  72. package/dist/cjs/ez-underface.cjs.entry.js +1 -1
  73. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  74. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  75. package/dist/cjs/ezui.cjs.js +1 -1
  76. package/dist/cjs/filter-column.cjs.entry.js +1 -1
  77. package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +0 -3
  78. package/dist/cjs/loader.cjs.js +1 -1
  79. package/dist/cjs/{search-column-540f3925.js → search-column-8bfee733.js} +1 -1
  80. package/dist/collection/components/ez-modal-container/ez-modal-container.css +2 -8
  81. package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -10
  82. package/dist/collection/components/ez-popup/ez-popup.js +4 -1
  83. package/dist/custom-elements/index.js +6 -12
  84. package/dist/esm/ez-actions-button.entry.js +1 -1
  85. package/dist/esm/ez-alert-list.entry.js +1 -1
  86. package/dist/esm/ez-alert.entry.js +1 -1
  87. package/dist/esm/ez-application.entry.js +1 -1
  88. package/dist/esm/ez-avatar.entry.js +1 -1
  89. package/dist/esm/ez-badge.entry.js +1 -1
  90. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  91. package/dist/esm/ez-button.entry.js +1 -1
  92. package/dist/esm/ez-calendar.entry.js +1 -1
  93. package/dist/esm/ez-card-item.entry.js +1 -1
  94. package/dist/esm/ez-chart.entry.js +1 -1
  95. package/dist/esm/ez-check.entry.js +1 -1
  96. package/dist/esm/ez-chip.entry.js +1 -1
  97. package/dist/esm/ez-classic-combo-box.entry.js +1 -1
  98. package/dist/esm/ez-classic-input.entry.js +1 -1
  99. package/dist/esm/ez-classic-text-area.entry.js +1 -1
  100. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  101. package/dist/esm/ez-combo-box-list_4.entry.js +2 -2
  102. package/dist/esm/ez-combo-box.entry.js +1 -1
  103. package/dist/esm/ez-date-input.entry.js +1 -1
  104. package/dist/esm/ez-date-time-input.entry.js +1 -1
  105. package/dist/esm/ez-dialog.entry.js +1 -1
  106. package/dist/esm/ez-double-list.entry.js +1 -1
  107. package/dist/esm/ez-dropdown.entry.js +1 -1
  108. package/dist/esm/ez-empty-card.entry.js +1 -1
  109. package/dist/esm/ez-file-item.entry.js +1 -1
  110. package/dist/esm/ez-filter-input.entry.js +1 -1
  111. package/dist/esm/ez-form-view.entry.js +1 -1
  112. package/dist/esm/ez-form.entry.js +2 -2
  113. package/dist/esm/ez-grid-view.entry.js +1 -1
  114. package/dist/esm/ez-grid.entry.js +2 -2
  115. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  116. package/dist/esm/ez-icon.entry.js +1 -1
  117. package/dist/esm/ez-link-builder_6.entry.js +1 -1
  118. package/dist/esm/ez-list-item.entry.js +1 -1
  119. package/dist/esm/ez-list.entry.js +1 -1
  120. package/dist/esm/ez-loading-bar.entry.js +1 -1
  121. package/dist/esm/ez-modal-container.entry.js +3 -12
  122. package/dist/esm/ez-modal.entry.js +1 -1
  123. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  124. package/dist/esm/ez-number-input.entry.js +1 -1
  125. package/dist/esm/ez-pagination.entry.js +1 -1
  126. package/dist/esm/ez-popover-core.entry.js +1 -1
  127. package/dist/esm/ez-popover-plus_3.entry.js +1 -1
  128. package/dist/esm/ez-popover.entry.js +1 -1
  129. package/dist/esm/ez-popup.entry.js +5 -2
  130. package/dist/esm/ez-progress-bar.entry.js +1 -1
  131. package/dist/esm/ez-radio-button.entry.js +1 -1
  132. package/dist/esm/ez-rich-toolbar-item.entry.js +1 -1
  133. package/dist/esm/ez-scroller_2.entry.js +1 -1
  134. package/dist/esm/ez-search-plus.entry.js +1 -1
  135. package/dist/esm/ez-search-result-list.entry.js +1 -1
  136. package/dist/esm/ez-search.entry.js +1 -1
  137. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  138. package/dist/esm/ez-skeleton.entry.js +1 -1
  139. package/dist/esm/ez-sortable-list.entry.js +1 -1
  140. package/dist/esm/ez-spinner.entry.js +1 -1
  141. package/dist/esm/ez-split-button.entry.js +1 -1
  142. package/dist/esm/ez-split-item.entry.js +1 -1
  143. package/dist/esm/ez-split-panel.entry.js +1 -1
  144. package/dist/esm/ez-tabselector.entry.js +1 -1
  145. package/dist/esm/ez-tag-input.entry.js +1 -1
  146. package/dist/esm/ez-tag.entry.js +1 -1
  147. package/dist/esm/ez-text-area.entry.js +1 -1
  148. package/dist/esm/ez-text-input.entry.js +1 -1
  149. package/dist/esm/ez-tile-medium.entry.js +1 -1
  150. package/dist/esm/ez-tile.entry.js +1 -1
  151. package/dist/esm/ez-time-input.entry.js +1 -1
  152. package/dist/esm/ez-toast.entry.js +1 -1
  153. package/dist/esm/ez-tooltip.entry.js +1 -1
  154. package/dist/esm/ez-tree.entry.js +1 -1
  155. package/dist/esm/ez-underface.entry.js +1 -1
  156. package/dist/esm/ez-upload.entry.js +1 -1
  157. package/dist/esm/ez-view-stack.entry.js +1 -1
  158. package/dist/esm/ezui.js +2 -2
  159. package/dist/esm/filter-column.entry.js +1 -1
  160. package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +1 -3
  161. package/dist/esm/loader.js +2 -2
  162. package/dist/esm/{search-column-4e827a95.js → search-column-c00119ae.js} +1 -1
  163. package/dist/ezui/ezui.esm.js +1 -1
  164. package/dist/ezui/{p-5d1adf13.entry.js → p-0b333f09.entry.js} +1 -1
  165. package/dist/ezui/{p-1d846a77.entry.js → p-0c0eb410.entry.js} +1 -1
  166. package/dist/ezui/{p-cf4e2a35.entry.js → p-0e49c0ff.entry.js} +1 -1
  167. package/dist/ezui/{p-77e738d5.entry.js → p-124699e0.entry.js} +1 -1
  168. package/dist/ezui/{p-26077a43.entry.js → p-1266fe78.entry.js} +1 -1
  169. package/dist/ezui/{p-06ca9d9a.entry.js → p-1730ee24.entry.js} +1 -1
  170. package/dist/ezui/{p-3b5bafe4.entry.js → p-1adf7139.entry.js} +1 -1
  171. package/dist/ezui/{p-13949839.entry.js → p-1bfef8e5.entry.js} +1 -1
  172. package/dist/ezui/{p-4cc79a52.entry.js → p-1cde96f9.entry.js} +1 -1
  173. package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
  174. package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
  175. package/dist/ezui/{p-cf33bc48.entry.js → p-20c024f7.entry.js} +1 -1
  176. package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
  177. package/dist/ezui/{p-169d460d.entry.js → p-2528e988.entry.js} +1 -1
  178. package/dist/ezui/{p-06f1b8e4.entry.js → p-288631d1.entry.js} +1 -1
  179. package/dist/ezui/{p-3136f418.entry.js → p-2a70f094.entry.js} +1 -1
  180. package/dist/ezui/{p-b77a0ce4.entry.js → p-2ba2d792.entry.js} +1 -1
  181. package/dist/ezui/{p-2d803ee6.entry.js → p-3fe05d6b.entry.js} +1 -1
  182. package/dist/ezui/{p-f7ca8634.entry.js → p-411c0222.entry.js} +1 -1
  183. package/dist/ezui/{p-570cf58a.entry.js → p-48effc69.entry.js} +1 -1
  184. package/dist/ezui/{p-4a876b8b.entry.js → p-4d30b703.entry.js} +1 -1
  185. package/dist/ezui/{p-b5b33be8.entry.js → p-4e1df756.entry.js} +1 -1
  186. package/dist/ezui/{p-4296e9f9.js → p-4f0632b4.js} +1 -1
  187. package/dist/ezui/{p-8aa7d60b.entry.js → p-59092a66.entry.js} +1 -1
  188. package/dist/ezui/{p-78f18973.entry.js → p-59a98e31.entry.js} +1 -1
  189. package/dist/ezui/{p-129fea99.entry.js → p-5ab08b60.entry.js} +1 -1
  190. package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
  191. package/dist/ezui/{p-c754774e.entry.js → p-6020f3d5.entry.js} +1 -1
  192. package/dist/ezui/{p-51e34317.entry.js → p-6369a0cd.entry.js} +1 -1
  193. package/dist/ezui/{p-b3530711.entry.js → p-6a9a20a0.entry.js} +1 -1
  194. package/dist/ezui/{p-0b531233.entry.js → p-6d596a5a.entry.js} +1 -1
  195. package/dist/ezui/{p-bd65ce5d.entry.js → p-6d8f5cb0.entry.js} +1 -1
  196. package/dist/ezui/{p-30513f10.entry.js → p-6f119d5f.entry.js} +1 -1
  197. package/dist/ezui/{p-1723f728.entry.js → p-6f77a359.entry.js} +1 -1
  198. package/dist/ezui/{p-e2eb894a.entry.js → p-79277e43.entry.js} +1 -1
  199. package/dist/ezui/{p-e195eaad.entry.js → p-7f792043.entry.js} +1 -1
  200. package/dist/ezui/{p-0391f255.entry.js → p-7f8c1fce.entry.js} +1 -1
  201. package/dist/ezui/{p-b7c6ce20.entry.js → p-7fe97ef5.entry.js} +1 -1
  202. package/dist/ezui/p-870506ba.entry.js +1 -0
  203. package/dist/ezui/{p-1d8ea7d2.entry.js → p-8bb3aeb0.entry.js} +1 -1
  204. package/dist/ezui/{p-cb4f1ee9.entry.js → p-8c57ffa4.entry.js} +1 -1
  205. package/dist/ezui/{p-53e773a4.entry.js → p-8dc267ff.entry.js} +1 -1
  206. package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
  207. package/dist/ezui/{p-78e975b4.entry.js → p-91c9d50e.entry.js} +1 -1
  208. package/dist/ezui/{p-05e68ab3.entry.js → p-93e1c917.entry.js} +1 -1
  209. package/dist/ezui/{p-7fdf1f2b.entry.js → p-957d08cd.entry.js} +1 -1
  210. package/dist/ezui/{p-d3779449.entry.js → p-9b2e6438.entry.js} +1 -1
  211. package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
  212. package/dist/ezui/{p-bc693db6.entry.js → p-a0bf1fc7.entry.js} +1 -1
  213. package/dist/ezui/{p-9bcfa689.entry.js → p-a3075f52.entry.js} +1 -1
  214. package/dist/ezui/{p-f26b97e9.entry.js → p-a3ada561.entry.js} +1 -1
  215. package/dist/ezui/{p-c73964f8.entry.js → p-a401041c.entry.js} +1 -1
  216. package/dist/ezui/{p-43106b79.entry.js → p-a7eab406.entry.js} +1 -1
  217. package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
  218. package/dist/ezui/{p-a48979a8.entry.js → p-ba7e908a.entry.js} +1 -1
  219. package/dist/ezui/p-bc2f844e.entry.js +1 -0
  220. package/dist/ezui/{p-015a6319.entry.js → p-bd6146c5.entry.js} +1 -1
  221. package/dist/ezui/{p-b81d19c7.entry.js → p-c82acfc6.entry.js} +1 -1
  222. package/dist/ezui/p-ce5d69da.entry.js +1 -0
  223. package/dist/ezui/{p-4a530109.entry.js → p-d0e6911e.entry.js} +1 -1
  224. package/dist/ezui/{p-c96e536d.entry.js → p-d2645bdf.entry.js} +1 -1
  225. package/dist/ezui/{p-a9432878.entry.js → p-d6742c1e.entry.js} +1 -1
  226. package/dist/ezui/{p-770cf2b8.entry.js → p-d6f50207.entry.js} +1 -1
  227. package/dist/ezui/p-d8cc640d.entry.js +1 -0
  228. package/dist/ezui/{p-5f4a66ec.entry.js → p-dee18824.entry.js} +1 -1
  229. package/dist/ezui/p-e03b2f19.entry.js +1 -0
  230. package/dist/ezui/{p-74f08ec9.entry.js → p-e27d7dc2.entry.js} +1 -1
  231. package/dist/ezui/{p-4815ddbf.entry.js → p-e46a4d06.entry.js} +1 -1
  232. package/dist/ezui/{p-000159dc.entry.js → p-e75c7a23.entry.js} +1 -1
  233. package/dist/ezui/{p-e9b409c1.entry.js → p-e7a7c594.entry.js} +1 -1
  234. package/dist/ezui/{p-4dc07e01.entry.js → p-e882635e.entry.js} +1 -1
  235. package/dist/ezui/{p-b21efe83.entry.js → p-e8c57463.entry.js} +1 -1
  236. package/dist/ezui/{p-a859ea2e.entry.js → p-e8c6c973.entry.js} +1 -1
  237. package/dist/ezui/{p-f17e7182.entry.js → p-e99cbb51.entry.js} +1 -1
  238. package/dist/ezui/{p-53412766.entry.js → p-eee3c7ff.entry.js} +1 -1
  239. package/dist/ezui/{p-35e3715c.entry.js → p-ef8bd3e8.entry.js} +1 -1
  240. package/dist/ezui/{p-44b39e81.entry.js → p-fa6732f2.entry.js} +1 -1
  241. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +0 -2
  242. package/dist/types/components/ez-popup/ez-popup.d.ts +1 -0
  243. package/package.json +1 -1
  244. package/dist/ezui/p-14d6aeb8.entry.js +0 -1
  245. package/dist/ezui/p-3be7d8d8.entry.js +0 -1
  246. package/dist/ezui/p-6ec40dec.entry.js +0 -1
  247. package/dist/ezui/p-7390c7e6.entry.js +0 -1
  248. package/dist/ezui/p-a1c3f74d.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as h,g as n}from"./p-e4c7eb39.js";import{StringUtils as r}from"@sankhyalabs/core";var e=function(t,i){return Number(t.slice(0,-1*i.length))},o=function(t){return t.endsWith("px")?{value:t,type:"px",numeric:e(t,"px")}:t.endsWith("fr")?{value:t,type:"fr",numeric:e(t,"fr")}:t.endsWith("%")?{value:t,type:"%",numeric:e(t,"%")}:"auto"===t?{value:t,type:"auto"}:null},u=function(t){return t.split(" ").map(o)},c=function(t,i,s){return i.concat(s).map((function(i){return i.style[t]})).filter((function(t){return void 0!==t&&""!==t}))},a=function(t){for(var i=0;i<t.length;i++)if(t[i].numeric>0)return i;return null},l=function(){return!1},d=function(t,i,s){t.style[i]=s},f=function(t,i,s){var h=t[i];return void 0!==h?h:s};function m(t){var i;return(i=[]).concat.apply(i,Array.from(t.ownerDocument.styleSheets).map((function(t){var i=[];try{i=Array.from(t.cssRules||[])}catch(t){}return i}))).filter((function(i){var s=!1;try{s=t.matches(i.selectorText)}catch(t){}return s}))}var w=function(t,i,s){this.direction=t,this.element=i.element,this.track=i.track,"column"===t?(this.gridTemplateProp="grid-template-columns",this.gridGapProp="grid-column-gap",this.cursor=f(s,"columnCursor",f(s,"cursor","col-resize")),this.snapOffset=f(s,"columnSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"columnDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientX",this.optionStyle=f(s,"gridTemplateColumns")):"row"===t&&(this.gridTemplateProp="grid-template-rows",this.gridGapProp="grid-row-gap",this.cursor=f(s,"rowCursor",f(s,"cursor","row-resize")),this.snapOffset=f(s,"rowSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"rowDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientY",this.optionStyle=f(s,"gridTemplateRows")),this.onDragStart=f(s,"onDragStart",l),this.onDragEnd=f(s,"onDragEnd",l),this.onDrag=f(s,"onDrag",l),this.writeStyle=f(s,"writeStyle",d),this.startDragging=this.startDragging.bind(this),this.stopDragging=this.stopDragging.bind(this),this.drag=this.drag.bind(this),this.minSizeStart=i.minSizeStart,this.minSizeEnd=i.minSizeEnd,i.element&&(this.element.addEventListener("mousedown",this.startDragging),this.element.addEventListener("touchstart",this.startDragging))};w.prototype.getDimensions=function(){var t=this.grid.getBoundingClientRect(),i=t.width,s=t.height,h=t.bottom,n=t.left,r=t.right;"column"===this.direction?(this.start=t.top,this.end=h,this.size=s):"row"===this.direction&&(this.start=n,this.end=r,this.size=i)},w.prototype.getSizeAtTrack=function(t,i){return function(t,i,s,h){return void 0===s&&(s=0),void 0===h&&(h=!1),i.slice(0,h?t+1:t).reduce((function(t,i){return t+i.numeric}),0)+(s?t*s:0)}(t,this.computedPixels,this.computedGapPixels,i)},w.prototype.getSizeOfTrack=function(t){return this.computedPixels[t].numeric},w.prototype.getRawTracks=function(){var t=c(this.gridTemplateProp,[this.grid],m(this.grid));if(!t.length){if(this.optionStyle)return this.optionStyle;throw Error("Unable to determine grid template tracks from styles.")}return t[0]},w.prototype.getGap=function(){var t=c(this.gridGapProp,[this.grid],m(this.grid));return t.length?t[0]:null},w.prototype.getRawComputedTracks=function(){return window.getComputedStyle(this.grid)[this.gridTemplateProp]},w.prototype.getRawComputedGap=function(){return window.getComputedStyle(this.grid)[this.gridGapProp]},w.prototype.setTracks=function(t){this.tracks=t.split(" "),this.trackValues=u(t)},w.prototype.setComputedTracks=function(t){this.computedTracks=t.split(" "),this.computedPixels=u(t)},w.prototype.setGap=function(t){this.gap=t},w.prototype.setComputedGap=function(t){var i;this.computedGap=t,this.computedGapPixels=((i=this.computedGap).endsWith("px")?Number(i.slice(0,-1*"px".length)):null)||0},w.prototype.getMousePosition=function(t){return"touches"in t?t.touches[0][this.clientAxis]:t[this.clientAxis]},w.prototype.startDragging=function(t){if(!("button"in t)||0===t.button){t.preventDefault(),this.grid=this.element?this.element.parentNode:t.target.parentNode,this.getDimensions(),this.setTracks(this.getRawTracks()),this.setComputedTracks(this.getRawComputedTracks()),this.setGap(this.getGap()),this.setComputedGap(this.getRawComputedGap());var i=this.trackValues.filter((function(t){return"%"===t.type})),s=this.trackValues.filter((function(t){return"fr"===t.type}));if(this.totalFrs=s.length,this.totalFrs){var h=a(s);null!==h&&(this.frToPixels=this.computedPixels[h].numeric/s[h].numeric)}if(i.length){var n=a(i);null!==n&&(this.percentageToPixels=this.computedPixels[n].numeric/i[n].numeric)}var r=this.getSizeAtTrack(this.track,!1)+this.start;if(this.dragStartOffset=this.getMousePosition(t)-r,this.aTrack=this.track-1,!(this.track<this.tracks.length-1))throw Error("Invalid track index: "+this.track+". Track must be between two other tracks and only "+this.tracks.length+" tracks were found.");this.bTrack=this.track+1,this.aTrackStart=this.getSizeAtTrack(this.aTrack,!1)+this.start,this.bTrackEnd=this.getSizeAtTrack(this.bTrack,!0)+this.start,this.dragging=!0,window.addEventListener("mouseup",this.stopDragging),window.addEventListener("touchend",this.stopDragging),window.addEventListener("touchcancel",this.stopDragging),window.addEventListener("mousemove",this.drag),window.addEventListener("touchmove",this.drag),this.grid.addEventListener("selectstart",l),this.grid.addEventListener("dragstart",l),this.grid.style.userSelect="none",this.grid.style.webkitUserSelect="none",this.grid.style.MozUserSelect="none",this.grid.style.pointerEvents="none",this.grid.style.cursor=this.cursor,window.document.body.style.cursor=this.cursor,this.onDragStart(this.direction,this.track)}},w.prototype.stopDragging=function(){this.dragging=!1,this.cleanup(),this.onDragEnd(this.direction,this.track),this.needsDestroy&&(this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),this.destroyCb(),this.needsDestroy=!1,this.destroyCb=null)},w.prototype.drag=function(t){var i=this.getMousePosition(t),s=this.getSizeOfTrack(this.track),h=this.aTrackStart+this.minSizeStart+this.dragStartOffset+this.computedGapPixels,n=this.bTrackEnd-this.minSizeEnd-this.computedGapPixels-(s-this.dragStartOffset);i<h+this.snapOffset&&(i=h),i>n-this.snapOffset&&(i=n),i<h?i=h:i>n&&(i=n);var r=i-this.aTrackStart-this.dragStartOffset-this.computedGapPixels,e=this.bTrackEnd-i+this.dragStartOffset-s-this.computedGapPixels;if(this.dragInterval>1){var o=Math.round(r/this.dragInterval)*this.dragInterval;e-=o-r,r=o}r<this.minSizeStart&&(r=this.minSizeStart),e<this.minSizeEnd&&(e=this.minSizeEnd),"px"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=r+"px":"fr"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=1===this.totalFrs?"1fr":r/this.frToPixels+"fr":"%"===this.trackValues[this.aTrack].type&&(this.tracks[this.aTrack]=r/this.percentageToPixels+"%"),"px"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=e+"px":"fr"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=1===this.totalFrs?"1fr":e/this.frToPixels+"fr":"%"===this.trackValues[this.bTrack].type&&(this.tracks[this.bTrack]=e/this.percentageToPixels+"%");var u=this.tracks.join(" ");this.writeStyle(this.grid,this.gridTemplateProp,u),this.onDrag(this.direction,this.track,u)},w.prototype.cleanup=function(){window.removeEventListener("mouseup",this.stopDragging),window.removeEventListener("touchend",this.stopDragging),window.removeEventListener("touchcancel",this.stopDragging),window.removeEventListener("mousemove",this.drag),window.removeEventListener("touchmove",this.drag),this.grid&&(this.grid.removeEventListener("selectstart",l),this.grid.removeEventListener("dragstart",l),this.grid.style.userSelect="",this.grid.style.webkitUserSelect="",this.grid.style.MozUserSelect="",this.grid.style.pointerEvents="",this.grid.style.cursor=""),window.document.body.style.cursor=""},w.prototype.destroy=function(t,i){void 0===t&&(t=!0),t||!1===this.dragging?(this.cleanup(),this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),i&&i()):(this.needsDestroy=!0,i&&(this.destroyCb=i))};var v=function(t,i,s){return i in t?t[i]:s},p=function(t,i){return function(s){if(s.track<1)throw Error("Invalid track index: "+s.track+". Track must be between two other tracks.");var h="column"===t?i.columnMinSizes||{}:i.rowMinSizes||{},n="column"===t?"columnMinSize":"rowMinSize";return new w(t,Object.assign({},{minSizeStart:v(h,s.track-1,f(i,n,f(i,"minSize",0))),minSizeEnd:v(h,s.track+1,f(i,n,f(i,"minSize",0)))},s),i)}},g=function(t){var i=this;this.columnGutters={},this.rowGutters={},this.options=Object.assign({},{columnGutters:t.columnGutters||[],rowGutters:t.rowGutters||[],columnMinSizes:t.columnMinSizes||{},rowMinSizes:t.rowMinSizes||{}},t),this.options.columnGutters.forEach((function(t){i.columnGutters[t.track]=p("column",i.options)(t)})),this.options.rowGutters.forEach((function(t){i.rowGutters[t.track]=p("row",i.options)(t)}))};g.prototype.addColumnGutter=function(t,i){this.columnGutters[i]&&this.columnGutters[i].destroy(),this.columnGutters[i]=p("column",this.options)({element:t,track:i})},g.prototype.addRowGutter=function(t,i){this.rowGutters[i]&&this.rowGutters[i].destroy(),this.rowGutters[i]=p("row",this.options)({element:t,track:i})},g.prototype.removeColumnGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.columnGutters[t]&&this.columnGutters[t].destroy(i,(function(){delete s.columnGutters[t]}))},g.prototype.removeRowGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.rowGutters[t]&&this.rowGutters[t].destroy(i,(function(){delete s.rowGutters[t]}))},g.prototype.handleDragStart=function(t,i,s){"column"===i?(this.columnGutters[s]&&this.columnGutters[s].destroy(),this.columnGutters[s]=p("column",this.options)({track:s}),this.columnGutters[s].startDragging(t)):"row"===i&&(this.rowGutters[s]&&this.rowGutters[s].destroy(),this.rowGutters[s]=p("row",this.options)({track:s}),this.rowGutters[s].startDragging(t))},g.prototype.destroy=function(t){var i=this;void 0===t&&(t=!0),Object.keys(this.columnGutters).forEach((function(s){return i.columnGutters[s].destroy(t,(function(){delete i.columnGutters[s]}))})),Object.keys(this.rowGutters).forEach((function(s){return i.rowGutters[s].destroy(t,(function(){delete i.rowGutters[s]}))}))};const b=class{constructor(s){t(this,s),this.resizeEnd=i(this,"resizeEnd",7),this._items=[],this._buildInProgress=!1,this.direction="column",this.anchorToExpand=!1,this.structural=!1}rebuildLayout(){Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach((t=>{t.remove()})),Array.from(this._element.getElementsByTagName("EzSplitPanel")).reverse().forEach((t=>{t.rebuildLayout()})),this.buildItems(),this.initSplit()}buildItems(){this._panelID=r.generateUUID(),this._element.dataset.panelId=this._panelID,this._element.dataset.uniqueId="EzSplitPanel";let t=Array.from(this._element.children);this._items=t.filter((t=>{var i;return"EZ-SPLIT-ITEM"===(null===(i=t.tagName)||void 0===i?void 0:i.toUpperCase())}));let i=1;this._items.forEach(((t,s)=>{t.dataset.trackNumber=i.toString(),this._items.length>1&&s!=this._items.length-1&&this.addItemGutter(t),i+=2}))}componentDidLoad(){this.buildItems(),this.initSplit(),this._mutationObserver=new MutationObserver((t=>{for(const i of t)if("childList"===i.type&&!this._buildInProgress){this._buildInProgress=!0,window.requestAnimationFrame((()=>{this.rebuildLayout()})),window.requestAnimationFrame((()=>this._buildInProgress=!1));break}})),this._mutationObserver.observe(this._element,{childList:!0,subtree:!1})}disconnectedCallback(){null!=this._mutationObserver&&this._mutationObserver.disconnect()}initSplit(){var t;this._items.length&&(this._element.style["row"===this.direction?"grid-template-rows":"grid-template-columns"]=this.getGridTemplate(),this.removeGuttersMargin(),t=this.getGutters(),new g(t))}handlePanelDragEnd(){const t=this._items.map((t=>({id:t.id,height:t.clientHeight,width:t.clientWidth})));this.resizeEnd.emit({panelId:this._element.id,items:t})}getGutters(){const t={columnGutters:[],rowGutters:[],onDragEnd:()=>this.handlePanelDragEnd()};if(!this._items.length)return t;const i="row"===this.direction?"rowGutters":"columnGutters";return this._items.forEach(((s,h)=>{if(h===this._items.length-1)return;let n=s.dataset.trackNumber;h===this._items.length-1&&(n=this._items.length.toString()),t[i].push({track:Number(n),element:this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${s.dataset.trackNumber}"]`)})})),t}addItemGutter(t){const i=document.createElement("div");i.classList.add("ez-split-gutter"),i.classList.add(this.direction),i.classList.add("row"===this.direction?"ez-split-gutter__row":"ez-split-gutter__column"),i.dataset.itemTrack=`${t.dataset.trackNumber}`,i.dataset.trackNumber=(Number(t.dataset.trackNumber)+1).toString(),t.parentNode.insertBefore(i,t.nextSibling)}getElementStyle(){return{display:"grid",height:"100%",width:"100%",position:this.anchorToExpand?"relative":"unset"}}calcFreeSpacePercentage(){const t=this._items.reduce(((t,i)=>{var s;return t+((null===(s=i.size)||void 0===s?void 0:s.includes("%"))?Number(i.size.replace("%","")):0)}),0),i=this._items.filter((t=>void 0===t.size)).length;return i&&t?(100-t)/i:null}getGridTemplate(){let t="";const i=this.calcFreeSpacePercentage();return this._items.forEach(((s,h)=>{let n=s.size||"1fr";!s.size&&i&&(n=`${i}%`),t+=h!==this._items.length-1?0!==h?` ${n} 5px`:`${n} 5px`:` ${n}`})),t}removeGuttersMargin(){this._items.length<=1||("column"!=this.direction?"row"!=this.direction||this.removeGuttersMarginRow():this.removeGuttersMarginColumn())}removeGuttersMarginColumn(){this._items.forEach(((t,i)=>{0!=i?i!==this._items.length-1?(t.style.marginRight="0",t.style.marginLeft="0"):t.style.marginLeft="0":t.style.marginRight="0"}))}removeGuttersMarginRow(){this._items.length<=1||this._items.forEach(((t,i)=>{0!=i?i!==this._items.length-1?(t.style.marginBottom="0",t.style.marginTop="0"):t.style.marginTop="0":t.style.marginBottom="0"}))}render(){return s(h,{class:this.structural?"structural__panel":"content__panel",style:this.getElementStyle()})}get _element(){return n(this)}};b.style=".ez-split-gutter{cursor:grab;background-color:transparent;max-width:100%}.ez-split-gutter__row{cursor:ns-resize}.ez-split-gutter__column{cursor:ew-resize}.structural__panel{background:none;box-shadow:none;outline:none;padding:0;margin:0;border:0}";export{b as ez_split_panel}
1
+ import{r as t,c as i,h as s,H as h,g as n}from"./p-23a36bb6.js";import{StringUtils as r}from"@sankhyalabs/core";var e=function(t,i){return Number(t.slice(0,-1*i.length))},o=function(t){return t.endsWith("px")?{value:t,type:"px",numeric:e(t,"px")}:t.endsWith("fr")?{value:t,type:"fr",numeric:e(t,"fr")}:t.endsWith("%")?{value:t,type:"%",numeric:e(t,"%")}:"auto"===t?{value:t,type:"auto"}:null},u=function(t){return t.split(" ").map(o)},c=function(t,i,s){return i.concat(s).map((function(i){return i.style[t]})).filter((function(t){return void 0!==t&&""!==t}))},a=function(t){for(var i=0;i<t.length;i++)if(t[i].numeric>0)return i;return null},l=function(){return!1},d=function(t,i,s){t.style[i]=s},f=function(t,i,s){var h=t[i];return void 0!==h?h:s};function m(t){var i;return(i=[]).concat.apply(i,Array.from(t.ownerDocument.styleSheets).map((function(t){var i=[];try{i=Array.from(t.cssRules||[])}catch(t){}return i}))).filter((function(i){var s=!1;try{s=t.matches(i.selectorText)}catch(t){}return s}))}var w=function(t,i,s){this.direction=t,this.element=i.element,this.track=i.track,"column"===t?(this.gridTemplateProp="grid-template-columns",this.gridGapProp="grid-column-gap",this.cursor=f(s,"columnCursor",f(s,"cursor","col-resize")),this.snapOffset=f(s,"columnSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"columnDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientX",this.optionStyle=f(s,"gridTemplateColumns")):"row"===t&&(this.gridTemplateProp="grid-template-rows",this.gridGapProp="grid-row-gap",this.cursor=f(s,"rowCursor",f(s,"cursor","row-resize")),this.snapOffset=f(s,"rowSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"rowDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientY",this.optionStyle=f(s,"gridTemplateRows")),this.onDragStart=f(s,"onDragStart",l),this.onDragEnd=f(s,"onDragEnd",l),this.onDrag=f(s,"onDrag",l),this.writeStyle=f(s,"writeStyle",d),this.startDragging=this.startDragging.bind(this),this.stopDragging=this.stopDragging.bind(this),this.drag=this.drag.bind(this),this.minSizeStart=i.minSizeStart,this.minSizeEnd=i.minSizeEnd,i.element&&(this.element.addEventListener("mousedown",this.startDragging),this.element.addEventListener("touchstart",this.startDragging))};w.prototype.getDimensions=function(){var t=this.grid.getBoundingClientRect(),i=t.width,s=t.height,h=t.bottom,n=t.left,r=t.right;"column"===this.direction?(this.start=t.top,this.end=h,this.size=s):"row"===this.direction&&(this.start=n,this.end=r,this.size=i)},w.prototype.getSizeAtTrack=function(t,i){return function(t,i,s,h){return void 0===s&&(s=0),void 0===h&&(h=!1),i.slice(0,h?t+1:t).reduce((function(t,i){return t+i.numeric}),0)+(s?t*s:0)}(t,this.computedPixels,this.computedGapPixels,i)},w.prototype.getSizeOfTrack=function(t){return this.computedPixels[t].numeric},w.prototype.getRawTracks=function(){var t=c(this.gridTemplateProp,[this.grid],m(this.grid));if(!t.length){if(this.optionStyle)return this.optionStyle;throw Error("Unable to determine grid template tracks from styles.")}return t[0]},w.prototype.getGap=function(){var t=c(this.gridGapProp,[this.grid],m(this.grid));return t.length?t[0]:null},w.prototype.getRawComputedTracks=function(){return window.getComputedStyle(this.grid)[this.gridTemplateProp]},w.prototype.getRawComputedGap=function(){return window.getComputedStyle(this.grid)[this.gridGapProp]},w.prototype.setTracks=function(t){this.tracks=t.split(" "),this.trackValues=u(t)},w.prototype.setComputedTracks=function(t){this.computedTracks=t.split(" "),this.computedPixels=u(t)},w.prototype.setGap=function(t){this.gap=t},w.prototype.setComputedGap=function(t){var i;this.computedGap=t,this.computedGapPixels=((i=this.computedGap).endsWith("px")?Number(i.slice(0,-1*"px".length)):null)||0},w.prototype.getMousePosition=function(t){return"touches"in t?t.touches[0][this.clientAxis]:t[this.clientAxis]},w.prototype.startDragging=function(t){if(!("button"in t)||0===t.button){t.preventDefault(),this.grid=this.element?this.element.parentNode:t.target.parentNode,this.getDimensions(),this.setTracks(this.getRawTracks()),this.setComputedTracks(this.getRawComputedTracks()),this.setGap(this.getGap()),this.setComputedGap(this.getRawComputedGap());var i=this.trackValues.filter((function(t){return"%"===t.type})),s=this.trackValues.filter((function(t){return"fr"===t.type}));if(this.totalFrs=s.length,this.totalFrs){var h=a(s);null!==h&&(this.frToPixels=this.computedPixels[h].numeric/s[h].numeric)}if(i.length){var n=a(i);null!==n&&(this.percentageToPixels=this.computedPixels[n].numeric/i[n].numeric)}var r=this.getSizeAtTrack(this.track,!1)+this.start;if(this.dragStartOffset=this.getMousePosition(t)-r,this.aTrack=this.track-1,!(this.track<this.tracks.length-1))throw Error("Invalid track index: "+this.track+". Track must be between two other tracks and only "+this.tracks.length+" tracks were found.");this.bTrack=this.track+1,this.aTrackStart=this.getSizeAtTrack(this.aTrack,!1)+this.start,this.bTrackEnd=this.getSizeAtTrack(this.bTrack,!0)+this.start,this.dragging=!0,window.addEventListener("mouseup",this.stopDragging),window.addEventListener("touchend",this.stopDragging),window.addEventListener("touchcancel",this.stopDragging),window.addEventListener("mousemove",this.drag),window.addEventListener("touchmove",this.drag),this.grid.addEventListener("selectstart",l),this.grid.addEventListener("dragstart",l),this.grid.style.userSelect="none",this.grid.style.webkitUserSelect="none",this.grid.style.MozUserSelect="none",this.grid.style.pointerEvents="none",this.grid.style.cursor=this.cursor,window.document.body.style.cursor=this.cursor,this.onDragStart(this.direction,this.track)}},w.prototype.stopDragging=function(){this.dragging=!1,this.cleanup(),this.onDragEnd(this.direction,this.track),this.needsDestroy&&(this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),this.destroyCb(),this.needsDestroy=!1,this.destroyCb=null)},w.prototype.drag=function(t){var i=this.getMousePosition(t),s=this.getSizeOfTrack(this.track),h=this.aTrackStart+this.minSizeStart+this.dragStartOffset+this.computedGapPixels,n=this.bTrackEnd-this.minSizeEnd-this.computedGapPixels-(s-this.dragStartOffset);i<h+this.snapOffset&&(i=h),i>n-this.snapOffset&&(i=n),i<h?i=h:i>n&&(i=n);var r=i-this.aTrackStart-this.dragStartOffset-this.computedGapPixels,e=this.bTrackEnd-i+this.dragStartOffset-s-this.computedGapPixels;if(this.dragInterval>1){var o=Math.round(r/this.dragInterval)*this.dragInterval;e-=o-r,r=o}r<this.minSizeStart&&(r=this.minSizeStart),e<this.minSizeEnd&&(e=this.minSizeEnd),"px"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=r+"px":"fr"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=1===this.totalFrs?"1fr":r/this.frToPixels+"fr":"%"===this.trackValues[this.aTrack].type&&(this.tracks[this.aTrack]=r/this.percentageToPixels+"%"),"px"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=e+"px":"fr"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=1===this.totalFrs?"1fr":e/this.frToPixels+"fr":"%"===this.trackValues[this.bTrack].type&&(this.tracks[this.bTrack]=e/this.percentageToPixels+"%");var u=this.tracks.join(" ");this.writeStyle(this.grid,this.gridTemplateProp,u),this.onDrag(this.direction,this.track,u)},w.prototype.cleanup=function(){window.removeEventListener("mouseup",this.stopDragging),window.removeEventListener("touchend",this.stopDragging),window.removeEventListener("touchcancel",this.stopDragging),window.removeEventListener("mousemove",this.drag),window.removeEventListener("touchmove",this.drag),this.grid&&(this.grid.removeEventListener("selectstart",l),this.grid.removeEventListener("dragstart",l),this.grid.style.userSelect="",this.grid.style.webkitUserSelect="",this.grid.style.MozUserSelect="",this.grid.style.pointerEvents="",this.grid.style.cursor=""),window.document.body.style.cursor=""},w.prototype.destroy=function(t,i){void 0===t&&(t=!0),t||!1===this.dragging?(this.cleanup(),this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),i&&i()):(this.needsDestroy=!0,i&&(this.destroyCb=i))};var v=function(t,i,s){return i in t?t[i]:s},p=function(t,i){return function(s){if(s.track<1)throw Error("Invalid track index: "+s.track+". Track must be between two other tracks.");var h="column"===t?i.columnMinSizes||{}:i.rowMinSizes||{},n="column"===t?"columnMinSize":"rowMinSize";return new w(t,Object.assign({},{minSizeStart:v(h,s.track-1,f(i,n,f(i,"minSize",0))),minSizeEnd:v(h,s.track+1,f(i,n,f(i,"minSize",0)))},s),i)}},g=function(t){var i=this;this.columnGutters={},this.rowGutters={},this.options=Object.assign({},{columnGutters:t.columnGutters||[],rowGutters:t.rowGutters||[],columnMinSizes:t.columnMinSizes||{},rowMinSizes:t.rowMinSizes||{}},t),this.options.columnGutters.forEach((function(t){i.columnGutters[t.track]=p("column",i.options)(t)})),this.options.rowGutters.forEach((function(t){i.rowGutters[t.track]=p("row",i.options)(t)}))};g.prototype.addColumnGutter=function(t,i){this.columnGutters[i]&&this.columnGutters[i].destroy(),this.columnGutters[i]=p("column",this.options)({element:t,track:i})},g.prototype.addRowGutter=function(t,i){this.rowGutters[i]&&this.rowGutters[i].destroy(),this.rowGutters[i]=p("row",this.options)({element:t,track:i})},g.prototype.removeColumnGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.columnGutters[t]&&this.columnGutters[t].destroy(i,(function(){delete s.columnGutters[t]}))},g.prototype.removeRowGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.rowGutters[t]&&this.rowGutters[t].destroy(i,(function(){delete s.rowGutters[t]}))},g.prototype.handleDragStart=function(t,i,s){"column"===i?(this.columnGutters[s]&&this.columnGutters[s].destroy(),this.columnGutters[s]=p("column",this.options)({track:s}),this.columnGutters[s].startDragging(t)):"row"===i&&(this.rowGutters[s]&&this.rowGutters[s].destroy(),this.rowGutters[s]=p("row",this.options)({track:s}),this.rowGutters[s].startDragging(t))},g.prototype.destroy=function(t){var i=this;void 0===t&&(t=!0),Object.keys(this.columnGutters).forEach((function(s){return i.columnGutters[s].destroy(t,(function(){delete i.columnGutters[s]}))})),Object.keys(this.rowGutters).forEach((function(s){return i.rowGutters[s].destroy(t,(function(){delete i.rowGutters[s]}))}))};const b=class{constructor(s){t(this,s),this.resizeEnd=i(this,"resizeEnd",7),this._items=[],this._buildInProgress=!1,this.direction="column",this.anchorToExpand=!1,this.structural=!1}rebuildLayout(){Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach((t=>{t.remove()})),Array.from(this._element.getElementsByTagName("EzSplitPanel")).reverse().forEach((t=>{t.rebuildLayout()})),this.buildItems(),this.initSplit()}buildItems(){this._panelID=r.generateUUID(),this._element.dataset.panelId=this._panelID,this._element.dataset.uniqueId="EzSplitPanel";let t=Array.from(this._element.children);this._items=t.filter((t=>{var i;return"EZ-SPLIT-ITEM"===(null===(i=t.tagName)||void 0===i?void 0:i.toUpperCase())}));let i=1;this._items.forEach(((t,s)=>{t.dataset.trackNumber=i.toString(),this._items.length>1&&s!=this._items.length-1&&this.addItemGutter(t),i+=2}))}componentDidLoad(){this.buildItems(),this.initSplit(),this._mutationObserver=new MutationObserver((t=>{for(const i of t)if("childList"===i.type&&!this._buildInProgress){this._buildInProgress=!0,window.requestAnimationFrame((()=>{this.rebuildLayout()})),window.requestAnimationFrame((()=>this._buildInProgress=!1));break}})),this._mutationObserver.observe(this._element,{childList:!0,subtree:!1})}disconnectedCallback(){null!=this._mutationObserver&&this._mutationObserver.disconnect()}initSplit(){var t;this._items.length&&(this._element.style["row"===this.direction?"grid-template-rows":"grid-template-columns"]=this.getGridTemplate(),this.removeGuttersMargin(),t=this.getGutters(),new g(t))}handlePanelDragEnd(){const t=this._items.map((t=>({id:t.id,height:t.clientHeight,width:t.clientWidth})));this.resizeEnd.emit({panelId:this._element.id,items:t})}getGutters(){const t={columnGutters:[],rowGutters:[],onDragEnd:()=>this.handlePanelDragEnd()};if(!this._items.length)return t;const i="row"===this.direction?"rowGutters":"columnGutters";return this._items.forEach(((s,h)=>{if(h===this._items.length-1)return;let n=s.dataset.trackNumber;h===this._items.length-1&&(n=this._items.length.toString()),t[i].push({track:Number(n),element:this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${s.dataset.trackNumber}"]`)})})),t}addItemGutter(t){const i=document.createElement("div");i.classList.add("ez-split-gutter"),i.classList.add(this.direction),i.classList.add("row"===this.direction?"ez-split-gutter__row":"ez-split-gutter__column"),i.dataset.itemTrack=`${t.dataset.trackNumber}`,i.dataset.trackNumber=(Number(t.dataset.trackNumber)+1).toString(),t.parentNode.insertBefore(i,t.nextSibling)}getElementStyle(){return{display:"grid",height:"100%",width:"100%",position:this.anchorToExpand?"relative":"unset"}}calcFreeSpacePercentage(){const t=this._items.reduce(((t,i)=>{var s;return t+((null===(s=i.size)||void 0===s?void 0:s.includes("%"))?Number(i.size.replace("%","")):0)}),0),i=this._items.filter((t=>void 0===t.size)).length;return i&&t?(100-t)/i:null}getGridTemplate(){let t="";const i=this.calcFreeSpacePercentage();return this._items.forEach(((s,h)=>{let n=s.size||"1fr";!s.size&&i&&(n=`${i}%`),t+=h!==this._items.length-1?0!==h?` ${n} 5px`:`${n} 5px`:` ${n}`})),t}removeGuttersMargin(){this._items.length<=1||("column"!=this.direction?"row"!=this.direction||this.removeGuttersMarginRow():this.removeGuttersMarginColumn())}removeGuttersMarginColumn(){this._items.forEach(((t,i)=>{0!=i?i!==this._items.length-1?(t.style.marginRight="0",t.style.marginLeft="0"):t.style.marginLeft="0":t.style.marginRight="0"}))}removeGuttersMarginRow(){this._items.length<=1||this._items.forEach(((t,i)=>{0!=i?i!==this._items.length-1?(t.style.marginBottom="0",t.style.marginTop="0"):t.style.marginTop="0":t.style.marginBottom="0"}))}render(){return s(h,{class:this.structural?"structural__panel":"content__panel",style:this.getElementStyle()})}get _element(){return n(this)}};b.style=".ez-split-gutter{cursor:grab;background-color:transparent;max-width:100%}.ez-split-gutter__row{cursor:ns-resize}.ez-split-gutter__column{cursor:ew-resize}.structural__panel{background:none;box-shadow:none;outline:none;padding:0;margin:0;border:0}";export{b as ez_split_panel}
@@ -53,7 +53,5 @@ export declare class EzModalContainer {
53
53
  componentDidLoad(): void;
54
54
  disconnectedCallback(): void;
55
55
  private closeModal;
56
- focusLast(): void;
57
- focusFirst(): void;
58
56
  render(): any;
59
57
  }
@@ -61,5 +61,6 @@ export declare class EzPopup {
61
61
  componentDidRender(): void;
62
62
  private handleAutoClose;
63
63
  private handleDefaultPropsButtonsByIndex;
64
+ private renderFooterButtons;
64
65
  render(): any;
65
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/ezui",
3
- "version": "7.1.0-dev.5",
3
+ "version": "7.1.0-dev.6",
4
4
  "description": "Biblioteca de componentes Sankhya.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -1 +0,0 @@
1
- import{r as e,h as r,H as o,g as a}from"./p-e4c7eb39.js";import{ElementIDUtils as c}from"@sankhyalabs/core";const n=class{constructor(r){e(this,r),this.color="default",this.customColor=void 0,this.height=void 0,this.width=void 0}componentDidRender(){this._element&&c.addIDInfo(this._element),this._container&&c.addIDInfo(this._container,"underface",{id:"container"})}render(){const e=Object.assign({},this.customColor&&{"--ez-underface--custom-background-color":`var(${this.customColor})`},this.height&&{"--ez-underface--custom-height":`${this.height}px`},this.width&&{"--ez-underface--custom-width":`${this.width}px`});return r(o,{style:e},r("div",{ref:e=>this._container=e,class:`underface_container ${this.color}`},r("slot",null)))}get _element(){return a(this)}};n.style=":host{--ez-underface--width:693px;--ez-underface--height:247px;--ez-underface--padding:var(--space--24, 24px);--ez-underface--border-radius:var(--border--radius-26, 26px)}div{width:var(--ez-underface--custom-width, var(--ez-underface--width));height:var(--ez-underface--custom-height, var(--ez-underface--height));border-radius:var(--ez-underface--border-radius);padding:var(--ez-underface--padding);display:block;overflow:hidden;outline:none;box-shadow:none;border:none;box-sizing:border-box;background-color:var(--ez-underface--custom-background-color, var(--color--petroleum-700, #222D42))}.light-green{background-color:var(--ez-underface--custom-background-color, var(--color--ocean-green-90))}.green{background-color:var(--ez-underface--custom-background-color, var(--color--green-600))}.light-gray{background-color:var(--ez-underface--custom-background-color, var(--color--gray-80))}.dark-petroleum{background-color:var(--ez-underface--custom-background-color, var(--color--petroleum-900))}.ocean-green{background-color:var(--ez-underface--custom-background-color, var(--color--ocean-green-600))}";export{n as ez_underface}
@@ -1 +0,0 @@
1
- import{r as t,h as i,a as e,H as s,c as o,g as a}from"./p-e4c7eb39.js";import{ElementIDUtils as r,ObjectUtils as h,HTMLBuilder as l,StringUtils as n,KeyboardManager as c}from"@sankhyalabs/core";import{i as d}from"./p-641ee538.js";import{C as b}from"./p-30ffb9ed.js";import{R as m,a as u}from"./p-3e767a74.js";import{p as v}from"./p-bb409cba.js";import{A as p}from"./p-5a11cf56.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-112455b1.js";const x=class{constructor(i){t(this,i),this.showLoading=void 0,this.visibleOptions=void 0,this.textEmptyList=void 0,this.showOptionValue=void 0,this.preSelection=void 0,this.maxWidth=void 0,this.width=void 0,this.onOptionSelect=void 0,this.onOptionHover=void 0}async nextOption(){var t,i;(null===(t=this.visibleOptions)||void 0===t?void 0:t.length)&&(void 0!==this.preSelection&&this.preSelection>=this.visibleOptions.length-1||(this.preSelection=void 0===this.preSelection?0:this.preSelection+1,this.scrollToOption(this.visibleOptions[this.preSelection]),null===(i=this.onOptionHover)||void 0===i||i.call(this,this.preSelection)))}async previousOption(){var t,i;(null===(t=this.visibleOptions)||void 0===t?void 0:t.length)&&(void 0!==this.preSelection&&this.preSelection<=0||(this.preSelection=void 0===this.preSelection?this.visibleOptions.length-1:this.preSelection-1,this.scrollToOption(this.visibleOptions[this.preSelection]),null===(i=this.onOptionHover)||void 0===i||i.call(this,this.preSelection)))}async selectCurrentOption(){void 0!==this.preSelection&&(this.onOptionSelect(this.visibleOptions[this.preSelection]),this.preSelection=void 0)}observeWidth(t,i){t!==i&&this._listWrapper&&(this._listWrapper.style.width=`${this.width}px`)}observeMaxWidth(t,i){t!==i&&this._listWrapper&&(this._listWrapper.style.maxWidth=this.maxWidth?`${this.maxWidth}px`:"")}handleKeyDown(t){switch(t.key){case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.nextOption();break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.preSelection=void 0}}buildItem(t,e){const s=this.showOptionValue&&this.maxWidth>0?`${this.maxWidth}px`:"";return t.label=t.label||t.value,i("li",{tabIndex:1,class:e===this.preSelection?"item preselected":"item",id:`item_${t.value}_${e}`,key:`item_${t.value}_${e}`,onMouseDown:()=>this.onOptionSelect(t),onMouseOver:()=>this.preSelection=e},this.showOptionValue?i("span",{class:"item__value",title:t.value,style:{width:s,minWidth:s,maxWidth:s}},t.value):void 0,i("span",{class:"item__label "+(this.showOptionValue?"item__label--bold":""),title:t.label},t.label))}scrollToOption(t){if(!(null==t?void 0:t.value)||!this._optionsList)return;const i=this.visibleOptions.indexOf(t);if(-1===i)return;const e=this._optionsList.querySelector(`li#item_${CSS.escape(t.value)}_${CSS.escape(String(i))}`);e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}async componentWillLoad(){this.i18n=await d()}componentDidLoad(){this._listWrapper.style.width=`${this.width}px`,this._listWrapper.style.maxWidth=this.maxWidth?`${this.maxWidth}px`:""}componentDidRender(){var t;null===(t=this._optionsList)||void 0===t||t.querySelectorAll(".item").forEach((t=>{r.addIDInfoIfNotExists(t,"itemComboBox")}))}render(){return i("section",{class:"list-container"},i("div",{class:"list-wrapper",ref:t=>this._listWrapper=t},i("ul",{class:"list-options",ref:t=>this._optionsList=t},!this.showLoading&&0===this.visibleOptions.length&&i("div",{class:"message"},i("span",{class:"message__no-result"},this.textEmptyList||this.i18n("ez-combo-box.noResults"))),this.showLoading&&i("div",{class:"message"},i("div",{class:"message__loading"})),this.showOptionValue&&i("span",{class:"item__value item__value--hidden"}),!this.showLoading&&this.visibleOptions.length>0&&this.visibleOptions.map(((t,i)=>this.buildItem(t,i))))))}static get watchers(){return{width:["observeWidth"],maxWidth:["observeMaxWidth"]}}};x.style=":host{--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);--ez-combo-box__list-container--padding:var(--space--extra-small, 3px)}.list-container{padding-top:var(--ez-combo-box__list-container--padding)}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow--medium, 0 8px 24px 0 rgba(43, 58, 84, 0.10));padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";const w=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){h.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,o,a,r;const h=new Map;for(const t in this.formViewField.props)h.set(t,this.formViewField.props[t]);const c={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?h:void 0,optionLoader:this.formViewField.optionLoader},source:b.FORM,detailContext:this.detailContext};let d=this.customEditor.getEditorElement(c);if(!d)return d=this.builderFallback(this.formViewField),this.handleValue(d),void(this.gui=d);if(!(d instanceof e)&&"string"!=typeof d)return this.handleValue(d),void(this.gui=d);"string"==typeof d&&(d=l.parseElement(d));const m=null!==(r=null!==(a=null===(o=this.value)||void 0===o?void 0:o.value)&&void 0!==a?a:this.value)&&void 0!==r?r:"";d.setAttribute("value",m),this.gui=i("div",{key:n.generateUUID(),ref:t=>t&&t.appendChild(d)})}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"]}}},_=class{constructor(i){t(this,i),this.ezChange=o(this,"ezChange",7),this.historyStack=[],this.historyIndex=-1,this.previewMode=!1,this.showPreview=!0,this.value="",this.label=void 0,this.mode="regular",this.enabled=!0,this.rows=6,this.errorMessage=void 0,this.canShowError=!0,this.showConfigs=!0,this.showTextFormat=!0,this.showUndoRedo=!0}observeValue(t,i){h.equals(t,i)||this.ezChange.emit(t)}observeErrorMessage(t){t&&this.previewMode&&(this.previewMode=!1)}async handleExecuteToolbarCommand(t){const{command:i,value:e}=t.detail;await this.executeCommand(i,e)}async setFocus(){this.handleFocus()}async setBlur(){var t;await(null===(t=this.textAreaRef)||void 0===t?void 0:t.setBlur())}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}bindPreview(){this._keyboardManager&&this.showPreview&&this._keyboardManager.bind("ctrl + p",(async()=>{await this.togglePreview()}),{description:"Entra em modo de pré visualização.",element:this.element})}bindConfigs(){this._keyboardManager&&this.showConfigs&&this._keyboardManager.bind("ctrl + l",(async()=>{await this.handleFormatSelection(m.LIST)}),{description:this.i18n("ez-rich-text.listShortcut"),element:this.element}).bind("ctrl + k",(async()=>{await this.handleLink()}),{description:this.i18n("ez-rich-text.linkShortcut"),element:this.element}).bind("ctrl + o",(async()=>{await this.handleImage()}),{description:this.i18n("ez-rich-text.imageShortcut"),element:this.element})}bindTextFormat(){this._keyboardManager&&this.showTextFormat&&this._keyboardManager.bind("ctrl + b",(async()=>{await this.handleFormatSelection(m.BOLD)}),{description:this.i18n("ez-rich-text.boldShortcut"),element:this.element}).bind("ctrl + i",(async()=>{await this.handleFormatSelection(m.ITALIC)}),{description:this.i18n("ez-rich-text.italicShortcut"),element:this.element}).bind("ctrl + u",(async()=>{await this.handleFormatSelection(m.UNDERLINE)}),{description:this.i18n("ez-rich-text.underlineShortcut"),element:this.element})}initKeyboardManager(){this._keyboardManager=new c({propagate:!1,element:this.element}),this._keyboardManager.bind("ctrl + Enter",(async()=>{await this.handleFormatSelection(m.BREAK_LINE)}),{description:this.i18n("ez-rich-text.breakLineShortcut"),element:this.element}).bind("ctrl + z",(async()=>{await this.handleUndo()}),{description:this.i18n("ez-rich-text.undoShortcut"),element:this.element}).bind("ctrl + x",(async()=>{await this.handleRedo()}),{description:this.i18n("ez-rich-text.redoShortcut"),element:this.element}),this.bindPreview(),this.bindConfigs(),this.bindTextFormat()}async executeCommand(t,i){switch(t){case u.FOCUS:this.handleFocus();break;case u.PREVIEW:await this.togglePreview();break;case u.FORMAT:await this.handleFormatSelection(i);break;case u.UNDO:await this.handleUndo();break;case u.REDO:await this.handleRedo();break;case u.LINK:await this.handleLink();break;case u.IMAGE:await this.handleImage()}}handleFocus(){this.previewMode=!1,requestAnimationFrame((async()=>{await this.textAreaRef.setFocus()}))}async handleLink(){this.previewMode=!1,requestAnimationFrame((async()=>{await this.linkBuilderRef.show(this.getSelectedText())}))}async handleImage(){this.previewMode=!1,await this.imageUploaderRef.show()}async handleRedo(){this.previewMode=!1,requestAnimationFrame((async()=>{this.redo(),await this.textAreaRef.setFocus()}))}async handleUndo(){this.previewMode=!1,requestAnimationFrame((async()=>{this.undo(),await this.textAreaRef.setFocus()}))}async handleFormatSelection(t){t&&(this.previewMode=!1,requestAnimationFrame((async()=>{await this.formatSelection(t),await this.textAreaRef.setFocus()})))}async togglePreview(){this.previewMode=!this.previewMode,this.previewMode&&await this.textAreaRef.setFocus()}getSelectedText(){const t=this.getTextAreaElement();if(t)return(this.textAreaRef.value||"").substring(t.selectionStart,t.selectionEnd)}getTextAreaElement(){return this.element.querySelector("ez-text-area").shadowRoot.querySelector("textarea")}async formatSelection(t){if(!this.textAreaRef)return;const i=t.replace("$selection",this.getSelectedText()||"");await this.textAreaRef.appendTextToSelection(i),this.value=this.textAreaRef.value,this.addToHistory(this.value)}addToHistory(t){this.historyIndex>=0&&t===this.historyStack[this.historyIndex]||(this.historyStack.length>=50&&this.historyStack.splice(0,this.historyStack.length-49),this.historyStack.push(t),this.historyIndex=this.historyStack.length-1)}undo(){if(!this.canExecuteUndo())return;this.historyIndex--;const t=this.historyStack[this.historyIndex];this.value=t,this.textAreaRef.value=t}canExecuteUndo(){return this.historyIndex>0}redo(){this.canExecuteRedo()&&(this.historyIndex++,this.getValueFromHistory())}canExecuteRedo(){return this.historyIndex<this.historyStack.length-1}getValueFromHistory(){const t=this.historyStack[this.historyIndex];this.value=t,this.textAreaRef.value=t}handleTextAreaChanged(t){this.value=t.detail,this.addToHistory(this.value)}async removeShortcuts(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}async componentWillLoad(){this.i18n=await d()}componentDidLoad(){this.initKeyboardManager(),this.addToHistory(this.value)}async disconnectedCallback(){await this.removeShortcuts()}getSanitizedValue(){return v.sanitize(this.value,{ADD_ATTR:["target","rel"]})}renderContent(){return this.previewMode?i("div",{id:"rich-text-preview-container",class:"preview",innerHTML:this.getSanitizedValue()}):i("ez-text-area",{ref:t=>this.textAreaRef=t,label:this.label,value:this.value,enabled:this.enabled,rows:this.rows,mode:this.mode,canShowError:this.canShowError,errorMessage:this.errorMessage,onEzChange:this.handleTextAreaChanged.bind(this)})}render(){return i(s,null,i("div",{class:"editor-container bordered"},i("ez-rich-toolbar",{isPreviewMode:this.previewMode,showPreview:this.showPreview,showConfigs:this.showConfigs&&this.enabled,showTextFormat:this.showTextFormat&&this.enabled,showUndoRedo:this.showUndoRedo&&this.enabled}),this.renderContent()),i("ez-link-builder",{ref:t=>this.linkBuilderRef=t}),i("ez-simple-image-uploader",{ref:t=>this.imageUploaderRef=t}))}get element(){return a(this)}static get watchers(){return{value:["observeValue"],errorMessage:["observeErrorMessage"]}}};_.style=".sc-ez-rich-text-h{display:block;width:100%;font-family:Roboto;--ez-rich-text--box-shadow:0 0 3px 0 #DCE0E8;--ez-rich-text--shadow--outline:var(--shadow--outline) var(--color--strokes)}.editor-container.sc-ez-rich-text{width:100%;overflow:hidden;border-radius:12px;border:1px solid #DCE0E8}ez-text-area.sc-ez-rich-text{--text-area__input--border:1px solid}.preview.sc-ez-rich-text{min-height:20px;padding:12px;resize:both;overflow:auto;max-width:100%;border-top:1px solid #DCE0E8}";const g=class{constructor(i){t(this,i),this.saveEdition=o(this,"saveEdition",7),this.cancelEdition=o(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 e,s;const o=null===(s=null===(e=this._inputElement)||void 0===e?void 0:e.shadowRoot)||void 0===s?void 0:s.querySelector("input");if(null!=o){const e=this.getWidthValue(t);o.style.width=e+"px",i&&setTimeout((()=>o.select()),100)}}getWidthValue(t){if(null!=this._valueBasis){const i=this._valueBasis;if(null!=t){const e=2;return i.innerHTML=t,i.clientWidth>0?i.clientWidth+e:e}i.innerHTML=""}return 0}setStyledInput(){var t,i;let e="",s="",o="";null!=this.styled&&(e=this.styled.fontSize,s=this.styled.fontWeight,o=this.styled.fontFamily);const a=null===(i=null===(t=this._inputElement)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("input");null!=a&&(a.style.fontSize=e,a.style.fontWeight=s,a.style.fontFamily=o);const r=this._valueBasis;null!=r&&(r.style.fontSize=e,r.style.fontWeight=s,r.style.fontFamily=o)}handleSaveEdition(){this._newValue?this.saveEdition.emit({value:this.value,newValue:this._newValue}):p.alert(this.i18n("app.warning"),this.i18n("ez-text-edit.emptyFieldWarning")).then((()=>{this.setNewValue(this.value,!0)}))}handleCancelEdition(){this.cancelEdition.emit()}setNewValue(t,i=!1){this._newValue=t,this.calcSizeInput(this._newValue,i)}async componentWillLoad(){this.i18n=await d()}componentDidLoad(){this.applyFocusSelect(),this.setNewValue(this.value)}componentDidRender(){this.setStyledInput()}render(){return r.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":r.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 a(this)}};g.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{x as ez_combo_box_list,w as ez_custom_form_input,_ as ez_rich_text,g as ez_text_edit}
@@ -1 +0,0 @@
1
- import{r as o,c as t,h as i}from"./p-e4c7eb39.js";const s=class{constructor(i){o(this,i),this.applicationLoaded=t(this,"applicationLoaded",7)}componentWillLoad(){}componentDidLoad(){this.applicationLoaded.emit(!0)}render(){return i("div",null)}};s.style="";export{s as ez_application}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as o,H as e,g as l}from"./p-e4c7eb39.js";import{KeyboardManager as s,FloatingManager as n}from"@sankhyalabs/core";import{i as a}from"./p-641ee538.js";const d=class{constructor(o){t(this,o),this.ezClosePopup=i(this,"ezClosePopup",7),this.ezPopupAction=i(this,"ezPopupAction",7),this.size="medium",this.opened=!1,this.useHeader=!0,this.heightMode="full",this.ezTitle=void 0,this.enabledScroll=!1,this.autoClose=!0,this.footerButtons=[]}observeConfig(){this.manageOverflow()}async componentWillLoad(){this.i18n=await a()}componentDidLoad(){this.popUpFocus(),this._keyboardManager=new s({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezPopupAction.emit.bind("OK")).bind("Escape",(()=>this.closePopup())).bind("Esc",(()=>this.closePopup()))}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}closePopup(){this.opened=!1,this.manageOverflow(),this.ezClosePopup.emit()}manageOverflow(){window.document.body.style.overflow=this.opened?"hidden":""}manageOverlay(){this.opened?this._overlayId=n.subscribeOverlayControl(this._popupRef):n.unsubscribeOverlayControl(this._popupRef||this._overlayId)}popUpFocus(){this.opened&&this._popupRef&&this._popupRef.focus()}getGridSize(){const t={"x-small":"col--sd-3 ez-popup__size-limit--x-small",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11",default:"ez-popup__size-limit--x-small",auto:""};return this.size&&t.hasOwnProperty(this.size)&&t[this.size]||t.medium}getDialogClass(){let t="popup__container";return"auto"===this.heightMode&&(t+=" popup__container--auto"),this.enabledScroll&&(t+=" popup__overflow-y--auto"),t+=` ${this.getGridSize()}`,t}componentDidRender(){this.manageOverlay(),this.popUpFocus()}handleAutoClose(t){if(!this.opened||!this._popupRef||!this.autoClose)return;if(this._popupRef.contains(t.target))return;const i=this._popupRef.querySelector("slot");if(i&&i.assignedElements().length>0){const o=i.assignedElements();for(const i of o)if(i.contains(t.target))return}this._popupRef.shadowRoot&&this._popupRef.shadowRoot.contains(t.target)||this.closePopup()}handleDefaultPropsButtonsByIndex(t){switch(t){case 0:return{label:this.i18n?this.i18n("app.confirm"):"Confirmar",variant:"primary",size:"small",onClick:()=>{this.closePopup(),this.ezPopupAction.emit("OK")}};case 1:return{label:this.i18n?this.i18n("app.cancel"):"Cancelar",variant:"secondary",size:"small",onClick:()=>{this.closePopup()}};case 2:return{label:this.i18n?this.i18n("app.close"):"Fechar",variant:"tertiary",size:"small",onClick:()=>{this.closePopup()}}}}render(){return o(e,null,this.opened&&o("div",{class:"overlay",tabIndex:-1,onClick:this.handleAutoClose.bind(this)},o("dialog",{ref:t=>this._popupRef=t,class:this.getDialogClass()},this.useHeader&&o("header",{class:"popup__header"},!!this.ezTitle&&o("h1",{class:"popup__title"},this.ezTitle),o("ez-button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",variant:"tertiary",mode:"icon",iconName:"close",size:"small",onClick:this.closePopup.bind(this)})),o("main",{class:"popup__expandable-content"},o("slot",null)),this.footerButtons.length>0&&o("footer",{class:"popup__footer"},this.footerButtons.slice(0,3).map(((t,i)=>o("ez-button",Object.assign({key:i},this.handleDefaultPropsButtonsByIndex(i),t))))))))}get _element(){return l(this)}static get watchers(){return{opened:["observeConfig"]}}};d.style=':host{display:flex;width:auto;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--24, 24px);--ez-popup__title--font-family:var(--font--pattern, "Roboto");--ez-popup__title--font-size:var(--font-size--xxlarge, 22px);--ez-popup__title--color:var(--title--primary, #00281D);--ez-popup__title--font-weight:var(--font-weight--regular, 400)}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-direction:column;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding);margin:0;border:none;position:unset;gap:var(--space--16, 16px)}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{overflow-y:auto;flex-grow:1;box-sizing:border-box;width:100%;font-family:var(--font--pattern, "Roboto");font-size:var(--font-size--default, 14px);color:var(--title--primary, #00281D);font-weight:var(--font-weight--regular, 400);line-height:var(--line-height--24, 24px)}.popup__header{flex-shrink:0;width:100%;display:flex;align-items:center}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:var(--line-height--32, 32px)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close--solo{width:100%}.popup__footer{flex-shrink:0;display:flex;width:100%;flex-direction:row-reverse;gap:var(--space--8, 8px)}.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}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@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{d as ez_popup}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as o,H as a,g as i}from"./p-e4c7eb39.js";import{KeyboardManager as n}from"@sankhyalabs/core";import{i as s}from"./p-641ee538.js";var l;!function(e){e.CLOSE="CLOSE",e.OK="OK",e.CANCEL="CANCEL",e.LOAD="LOAD"}(l||(l={}));const r=l;var c;!function(e){e.ENABLED="ENABLED",e.DISABLED="DISABLED",e.HIDDEN="HIDDEN"}(c||(c={}));const d=c,h=class{constructor(o){e(this,o),this.ezModalAction=t(this,"ezModalAction",7),this.modalTitle=void 0,this.modalSubTitle=void 0,this.showTitleBar=!0,this.cancelButtonLabel=void 0,this.okButtonLabel=void 0,this.cancelButtonStatus=void 0,this.okButtonStatus=void 0,this.showCloseButton=!0}async handleEzModalAction(e){var t;(null==e?void 0:e.target)&&(null==e?void 0:e.target)===(null===(t=this._element)||void 0===t?void 0:t.parentElement)&&this.closeModal()}cancelIsVisible(){return this.cancelButtonStatus!==d.HIDDEN&&null!=this.cancelButtonLabel}okIsVisible(){return this.okButtonStatus!==d.HIDDEN&&null!=this.okButtonLabel}async componentWillLoad(){this.i18n=await s()}componentDidLoad(){window.requestAnimationFrame((()=>{this.ezModalAction.emit(r.LOAD),this._modalRef.focus()})),this._keyboardManager=new n({propagate:!1,element:this._element}).bind("Enter",this.ezModalAction.emit.bind(r.OK)).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}disconnectedCallback(){var e;null===(e=this._keyboardManager)||void 0===e||e.unbindAllShortcutKeys()}closeModal(){this.ezModalAction.emit("CLOSE")}focusLast(){null!=this._okButton&&this._okButton.setFocus()}focusFirst(){this._closeButton.focus()}render(){return o(a,null,o("button",{class:"ez-modal-container__focus-ctrl",onFocusin:()=>this.focusLast()}),o("div",{ref:e=>this._modalRef=e,tabIndex:-1,class:"ez-modal-container__header-container"},this.showTitleBar&&o("div",{class:"ez-modal-container__header ez-margin-bottom--medium"},o("div",{class:"ez-col ez-align--middle ez-modal-container__title"},o("h2",{class:"ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small"},this.modalTitle),this.modalSubTitle&&o("div",{class:"ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small"},this.modalSubTitle)),this.showCloseButton&&o("button",{ref:e=>this._closeButton=e,class:"ez-modal-container__close-button",onClick:()=>this.ezModalAction.emit(r.CLOSE),"aria-label":this.i18n("app.close")},o("ez-icon",{class:"ez-modal-container__close-icon",size:"medium",iconName:"close"})))),o("div",{tabIndex:-1,class:"ez-modal-container__content"},o("slot",null)),o("div",{tabIndex:-1,class:"ez-modal-container__footer"},this.cancelIsVisible()&&o("ez-button",{label:this.cancelButtonLabel||this.i18n("app.cancel"),enabled:this.cancelButtonStatus!==d.DISABLED,onClick:()=>this.ezModalAction.emit(r.CANCEL)}),this.okIsVisible()&&o("ez-button",{ref:e=>this._okButton=e,class:"ez-button--primary",label:this.okButtonLabel||this.i18n("app.ok"),enabled:this.okButtonStatus!==d.DISABLED,onClick:()=>this.ezModalAction.emit(r.OK)})),o("button",{class:"ez-modal-container__focus-ctrl",onFocusin:()=>this.focusFirst()}))}get _element(){return i(this)}};h.style=".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:hidden;display:grid;grid-template-rows:0 auto 1fr auto 0;width:100%;height:100%}.ez-modal-container__header-container.sc-ez-modal-container{outline:none}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between;align-items:start}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x);outline:none}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none;outline:none;padding:var(--space--6, 6px) 0px}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;background-color:transparent;border:none}";export{h as ez_modal_container}