@genexus/genexus-ide-ui 1.1.2 → 1.1.4

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 (293) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js +1 -1
  3. package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js +180 -166
  5. package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gx-ide-bpm-assign-roles.cjs.entry.js +1 -1
  7. package/dist/cjs/gx-ide-bpm-assign-roles.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js +1 -1
  9. package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js +1 -1
  11. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js.map +1 -1
  12. package/dist/cjs/gx-ide-bpm-import-gxpm.cjs.entry.js +1 -1
  13. package/dist/cjs/gx-ide-bpm-import-gxpm.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js +1 -1
  15. package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js.map +1 -1
  16. package/dist/cjs/gx-ide-bpm-timer-duration.cjs.entry.js +1 -1
  17. package/dist/cjs/gx-ide-bpm-timer-duration.cjs.entry.js.map +1 -1
  18. package/dist/cjs/gx-ide-card.cjs.entry.js +1 -1
  19. package/dist/cjs/gx-ide-card.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js +1 -1
  21. package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js.map +1 -1
  22. package/dist/cjs/gx-ide-deployment-tool.cjs.entry.js +1 -1
  23. package/dist/cjs/gx-ide-deployment-tool.cjs.entry.js.map +1 -1
  24. package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js +1 -1
  25. package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js.map +1 -1
  26. package/dist/cjs/gx-ide-empty-state.cjs.entry.js +1 -1
  27. package/dist/cjs/gx-ide-empty-state.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gx-ide-file-item.cjs.entry.js +110 -0
  29. package/dist/cjs/gx-ide-file-item.cjs.entry.js.map +1 -0
  30. package/dist/cjs/gx-ide-file-uploader.cjs.entry.js +399 -0
  31. package/dist/cjs/gx-ide-file-uploader.cjs.entry.js.map +1 -0
  32. package/dist/cjs/gx-ide-gam-installation-settings.cjs.entry.js +1 -1
  33. package/dist/cjs/gx-ide-gam-installation-settings.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js +1 -1
  35. package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js +1 -1
  37. package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +1 -1
  39. package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js.map +1 -1
  40. package/dist/cjs/gx-ide-references.cjs.entry.js +1 -1
  41. package/dist/cjs/gx-ide-references.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +1 -1
  43. package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gx-ide-team-dev-select-recent-comment.cjs.entry.js +1 -1
  45. package/dist/cjs/gx-ide-team-dev-select-recent-comment.cjs.entry.js.map +1 -1
  46. package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +1 -1
  47. package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js.map +1 -1
  48. package/dist/cjs/gx-ide-team-dev-update-to-revision.cjs.entry.js +1 -1
  49. package/dist/cjs/gx-ide-team-dev-update-to-revision.cjs.entry.js.map +1 -1
  50. package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +1 -1
  51. package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js.map +1 -1
  52. package/dist/cjs/gx-ide-template.cjs.entry.js +1 -1
  53. package/dist/cjs/gx-ide-template.cjs.entry.js.map +1 -1
  54. package/dist/cjs/gx-ide-wf-settings.cjs.entry.js +1 -1
  55. package/dist/cjs/gx-ide-wf-settings.cjs.entry.js.map +1 -1
  56. package/dist/cjs/gx-ide-ww-images.cjs.entry.js +1 -1
  57. package/dist/cjs/gx-ide-ww-images.cjs.entry.js.map +1 -1
  58. package/dist/cjs/loader.cjs.js +1 -1
  59. package/dist/collection/collection-manifest.json +2 -0
  60. package/dist/collection/components/_helpers/card/card.css +9 -0
  61. package/dist/collection/components/_helpers/empty-state/gx-ide-empty-state.css +9 -0
  62. package/dist/collection/components/_helpers/list-selector/list-selector.css +9 -0
  63. package/dist/collection/components/_starting-template/template.css +9 -0
  64. package/dist/collection/components/ai-assistant/ai-assistant.css +9 -0
  65. package/dist/collection/components/bpm/application-declaration/bpm-app-declaration.css +36 -27
  66. package/dist/collection/components/bpm/application-declaration/bpm-app-declaration.js +217 -181
  67. package/dist/collection/components/bpm/application-declaration/bpm-app-declaration.js.map +1 -1
  68. package/dist/collection/components/bpm/application-declaration/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.en.json +14 -2
  69. package/dist/collection/components/bpm/application-declaration/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.ja.json +15 -3
  70. package/dist/collection/components/bpm/application-declaration/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.zh.json +14 -2
  71. package/dist/collection/components/bpm/assign-roles/bpm-assign-roles.css +9 -0
  72. package/dist/collection/components/bpm/export-xpdl/bpm-export-xpdl.css +9 -0
  73. package/dist/collection/components/bpm/import-files/bpm-import-files.css +9 -0
  74. package/dist/collection/components/bpm/import-gxpm/bpm-import-gxpm.css +9 -0
  75. package/dist/collection/components/bpm/objects-selector/bpm-objects-selector.css +9 -0
  76. package/dist/collection/components/bpm/timer-duration/bpm-timer-duration.css +9 -0
  77. package/dist/collection/components/dashboard-home/dashboard-home.css +9 -0
  78. package/dist/collection/components/deployment-tool/deployment-tool.css +9 -0
  79. package/dist/collection/components/file-uploader/file-item/file-item.css +97 -0
  80. package/dist/collection/components/file-uploader/file-item/file-item.js +246 -0
  81. package/dist/collection/components/file-uploader/file-item/file-item.js.map +1 -0
  82. package/dist/collection/components/file-uploader/file-uploader.css +687 -0
  83. package/dist/collection/components/file-uploader/file-uploader.js +750 -0
  84. package/dist/collection/components/file-uploader/file-uploader.js.map +1 -0
  85. package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.en.json +36 -0
  86. package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.ja.json +36 -0
  87. package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.zh.json +36 -0
  88. package/dist/collection/components/file-uploader/types.js +2 -0
  89. package/dist/collection/components/file-uploader/types.js.map +1 -0
  90. package/dist/collection/components/gam-installation-settings/gam-installation-settings.css +9 -0
  91. package/dist/collection/components/modules/edit-module-server/edit-module-server.css +9 -0
  92. package/dist/collection/components/modules/manage-module-references/manage-module-references.css +9 -0
  93. package/dist/collection/components/modules/manage-module-references-v2/manage-module-references.css +9 -0
  94. package/dist/collection/components/references/references.css +9 -0
  95. package/dist/collection/components/team-dev/commit/commit.css +9 -0
  96. package/dist/collection/components/team-dev/select-recent-comment/select-recent-comment.css +9 -0
  97. package/dist/collection/components/team-dev/update/update.css +9 -0
  98. package/dist/collection/components/team-dev/update-partial-selection/update-partial-selection.css +9 -0
  99. package/dist/collection/components/team-dev/update-to-revision/update-to-revision.css +9 -0
  100. package/dist/collection/components/wf-settings/wf-settings.css +9 -0
  101. package/dist/collection/components/ww-images/ww-images.css +9 -0
  102. package/dist/collection/testing/locale.e2e.js +4 -1
  103. package/dist/collection/testing/locale.e2e.js.map +1 -1
  104. package/dist/components/bpm-objects-selector.js +1 -1
  105. package/dist/components/bpm-objects-selector.js.map +1 -1
  106. package/dist/components/file-item.js +130 -0
  107. package/dist/components/file-item.js.map +1 -0
  108. package/dist/components/gx-ide-ai-assistant.js +1 -1
  109. package/dist/components/gx-ide-ai-assistant.js.map +1 -1
  110. package/dist/components/gx-ide-bpm-app-declaration.js +189 -184
  111. package/dist/components/gx-ide-bpm-app-declaration.js.map +1 -1
  112. package/dist/components/gx-ide-bpm-assign-roles.js +1 -1
  113. package/dist/components/gx-ide-bpm-assign-roles.js.map +1 -1
  114. package/dist/components/gx-ide-bpm-export-xpdl.js +1 -1
  115. package/dist/components/gx-ide-bpm-export-xpdl.js.map +1 -1
  116. package/dist/components/gx-ide-bpm-import-files.js +1 -1
  117. package/dist/components/gx-ide-bpm-import-files.js.map +1 -1
  118. package/dist/components/gx-ide-bpm-import-gxpm.js +1 -1
  119. package/dist/components/gx-ide-bpm-import-gxpm.js.map +1 -1
  120. package/dist/components/gx-ide-bpm-timer-duration.js +1 -1
  121. package/dist/components/gx-ide-bpm-timer-duration.js.map +1 -1
  122. package/dist/components/gx-ide-card.js +1 -1
  123. package/dist/components/gx-ide-card.js.map +1 -1
  124. package/dist/components/gx-ide-dashboard-home.js +1 -1
  125. package/dist/components/gx-ide-dashboard-home.js.map +1 -1
  126. package/dist/components/gx-ide-deployment-tool.js +1 -1
  127. package/dist/components/gx-ide-deployment-tool.js.map +1 -1
  128. package/dist/components/gx-ide-edit-module-server.js +1 -1
  129. package/dist/components/gx-ide-edit-module-server.js.map +1 -1
  130. package/dist/components/gx-ide-empty-state2.js +1 -1
  131. package/dist/components/gx-ide-empty-state2.js.map +1 -1
  132. package/dist/components/gx-ide-file-item.d.ts +11 -0
  133. package/dist/components/gx-ide-file-item.js +8 -0
  134. package/dist/components/gx-ide-file-item.js.map +1 -0
  135. package/dist/components/gx-ide-file-uploader.d.ts +11 -0
  136. package/dist/components/gx-ide-file-uploader.js +438 -0
  137. package/dist/components/gx-ide-file-uploader.js.map +1 -0
  138. package/dist/components/gx-ide-gam-installation-settings.js +1 -1
  139. package/dist/components/gx-ide-gam-installation-settings.js.map +1 -1
  140. package/dist/components/gx-ide-manage-module-references-v2.js +1 -1
  141. package/dist/components/gx-ide-manage-module-references-v2.js.map +1 -1
  142. package/dist/components/gx-ide-manage-module-references.js +1 -1
  143. package/dist/components/gx-ide-manage-module-references.js.map +1 -1
  144. package/dist/components/gx-ide-references.js +1 -1
  145. package/dist/components/gx-ide-references.js.map +1 -1
  146. package/dist/components/gx-ide-team-dev-commit.js +1 -1
  147. package/dist/components/gx-ide-team-dev-commit.js.map +1 -1
  148. package/dist/components/gx-ide-team-dev-select-recent-comment.js +1 -1
  149. package/dist/components/gx-ide-team-dev-select-recent-comment.js.map +1 -1
  150. package/dist/components/gx-ide-team-dev-update-partial-selection.js +1 -1
  151. package/dist/components/gx-ide-team-dev-update-partial-selection.js.map +1 -1
  152. package/dist/components/gx-ide-team-dev-update-to-revision.js +1 -1
  153. package/dist/components/gx-ide-team-dev-update-to-revision.js.map +1 -1
  154. package/dist/components/gx-ide-team-dev-update.js +1 -1
  155. package/dist/components/gx-ide-team-dev-update.js.map +1 -1
  156. package/dist/components/gx-ide-template.js +1 -1
  157. package/dist/components/gx-ide-template.js.map +1 -1
  158. package/dist/components/gx-ide-wf-settings.js +1 -1
  159. package/dist/components/gx-ide-wf-settings.js.map +1 -1
  160. package/dist/components/gx-ide-ww-images.js +1 -1
  161. package/dist/components/gx-ide-ww-images.js.map +1 -1
  162. package/dist/components/list-selector.js +1 -1
  163. package/dist/components/list-selector.js.map +1 -1
  164. package/dist/esm/genexus-ide-ui.js +1 -1
  165. package/dist/esm/gx-ide-ai-assistant.entry.js +1 -1
  166. package/dist/esm/gx-ide-ai-assistant.entry.js.map +1 -1
  167. package/dist/esm/gx-ide-bpm-app-declaration.entry.js +181 -167
  168. package/dist/esm/gx-ide-bpm-app-declaration.entry.js.map +1 -1
  169. package/dist/esm/gx-ide-bpm-assign-roles.entry.js +1 -1
  170. package/dist/esm/gx-ide-bpm-assign-roles.entry.js.map +1 -1
  171. package/dist/esm/gx-ide-bpm-export-xpdl.entry.js +1 -1
  172. package/dist/esm/gx-ide-bpm-export-xpdl.entry.js.map +1 -1
  173. package/dist/esm/gx-ide-bpm-import-files.entry.js +1 -1
  174. package/dist/esm/gx-ide-bpm-import-files.entry.js.map +1 -1
  175. package/dist/esm/gx-ide-bpm-import-gxpm.entry.js +1 -1
  176. package/dist/esm/gx-ide-bpm-import-gxpm.entry.js.map +1 -1
  177. package/dist/esm/gx-ide-bpm-objects-selector.entry.js +1 -1
  178. package/dist/esm/gx-ide-bpm-objects-selector.entry.js.map +1 -1
  179. package/dist/esm/gx-ide-bpm-timer-duration.entry.js +1 -1
  180. package/dist/esm/gx-ide-bpm-timer-duration.entry.js.map +1 -1
  181. package/dist/esm/gx-ide-card.entry.js +1 -1
  182. package/dist/esm/gx-ide-card.entry.js.map +1 -1
  183. package/dist/esm/gx-ide-dashboard-home.entry.js +1 -1
  184. package/dist/esm/gx-ide-dashboard-home.entry.js.map +1 -1
  185. package/dist/esm/gx-ide-deployment-tool.entry.js +1 -1
  186. package/dist/esm/gx-ide-deployment-tool.entry.js.map +1 -1
  187. package/dist/esm/gx-ide-edit-module-server.entry.js +1 -1
  188. package/dist/esm/gx-ide-edit-module-server.entry.js.map +1 -1
  189. package/dist/esm/gx-ide-empty-state.entry.js +1 -1
  190. package/dist/esm/gx-ide-empty-state.entry.js.map +1 -1
  191. package/dist/esm/gx-ide-file-item.entry.js +106 -0
  192. package/dist/esm/gx-ide-file-item.entry.js.map +1 -0
  193. package/dist/esm/gx-ide-file-uploader.entry.js +395 -0
  194. package/dist/esm/gx-ide-file-uploader.entry.js.map +1 -0
  195. package/dist/esm/gx-ide-gam-installation-settings.entry.js +1 -1
  196. package/dist/esm/gx-ide-gam-installation-settings.entry.js.map +1 -1
  197. package/dist/esm/gx-ide-list-selector_2.entry.js +1 -1
  198. package/dist/esm/gx-ide-list-selector_2.entry.js.map +1 -1
  199. package/dist/esm/gx-ide-manage-module-references-v2.entry.js +1 -1
  200. package/dist/esm/gx-ide-manage-module-references-v2.entry.js.map +1 -1
  201. package/dist/esm/gx-ide-manage-module-references.entry.js +1 -1
  202. package/dist/esm/gx-ide-manage-module-references.entry.js.map +1 -1
  203. package/dist/esm/gx-ide-references.entry.js +1 -1
  204. package/dist/esm/gx-ide-references.entry.js.map +1 -1
  205. package/dist/esm/gx-ide-team-dev-commit.entry.js +1 -1
  206. package/dist/esm/gx-ide-team-dev-commit.entry.js.map +1 -1
  207. package/dist/esm/gx-ide-team-dev-select-recent-comment.entry.js +1 -1
  208. package/dist/esm/gx-ide-team-dev-select-recent-comment.entry.js.map +1 -1
  209. package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +1 -1
  210. package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js.map +1 -1
  211. package/dist/esm/gx-ide-team-dev-update-to-revision.entry.js +1 -1
  212. package/dist/esm/gx-ide-team-dev-update-to-revision.entry.js.map +1 -1
  213. package/dist/esm/gx-ide-team-dev-update.entry.js +1 -1
  214. package/dist/esm/gx-ide-team-dev-update.entry.js.map +1 -1
  215. package/dist/esm/gx-ide-template.entry.js +1 -1
  216. package/dist/esm/gx-ide-template.entry.js.map +1 -1
  217. package/dist/esm/gx-ide-wf-settings.entry.js +1 -1
  218. package/dist/esm/gx-ide-wf-settings.entry.js.map +1 -1
  219. package/dist/esm/gx-ide-ww-images.entry.js +1 -1
  220. package/dist/esm/gx-ide-ww-images.entry.js.map +1 -1
  221. package/dist/esm/loader.js +1 -1
  222. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  223. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  224. package/dist/genexus-ide-ui/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.en.json +14 -2
  225. package/dist/genexus-ide-ui/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.ja.json +15 -3
  226. package/dist/genexus-ide-ui/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.zh.json +14 -2
  227. package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.en.json +36 -0
  228. package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.ja.json +36 -0
  229. package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.zh.json +36 -0
  230. package/dist/genexus-ide-ui/{p-1e8f5da5.entry.js → p-04c6bd23.entry.js} +29 -29
  231. package/dist/genexus-ide-ui/{p-3e936f26.entry.js → p-05b04291.entry.js} +2 -2
  232. package/dist/genexus-ide-ui/{p-3ecdb582.entry.js → p-1072bf33.entry.js} +2 -2
  233. package/dist/genexus-ide-ui/{p-683cb15e.entry.js → p-14165308.entry.js} +2 -2
  234. package/dist/genexus-ide-ui/{p-2027c939.entry.js → p-2b3938b4.entry.js} +2 -2
  235. package/dist/genexus-ide-ui/{p-48826a6f.entry.js → p-3085add2.entry.js} +99 -99
  236. package/dist/genexus-ide-ui/{p-e4c2e200.entry.js → p-35f9ebbc.entry.js} +5 -5
  237. package/dist/genexus-ide-ui/{p-038c3f9b.entry.js → p-45996535.entry.js} +2 -2
  238. package/dist/genexus-ide-ui/{p-50b22f23.entry.js → p-4b38fffc.entry.js} +2 -2
  239. package/dist/genexus-ide-ui/{p-8f00263d.entry.js → p-6d2174ed.entry.js} +2 -2
  240. package/dist/genexus-ide-ui/{p-3d4355b4.entry.js → p-767e0f6d.entry.js} +8 -8
  241. package/dist/genexus-ide-ui/{p-bac13202.entry.js → p-844b7117.entry.js} +17 -17
  242. package/dist/genexus-ide-ui/{p-a790c4c9.entry.js → p-961bb2cc.entry.js} +2 -2
  243. package/dist/genexus-ide-ui/p-a1d73ca3.entry.js +310 -0
  244. package/dist/genexus-ide-ui/p-a1d73ca3.entry.js.map +1 -0
  245. package/dist/genexus-ide-ui/{p-9b5cb6b9.entry.js → p-a47d71eb.entry.js} +5 -5
  246. package/dist/genexus-ide-ui/{p-a05d4963.entry.js → p-b1851e6b.entry.js} +8 -8
  247. package/dist/genexus-ide-ui/{p-c6c955a3.entry.js → p-b2928645.entry.js} +2 -2
  248. package/dist/genexus-ide-ui/{p-3b8db39e.entry.js → p-b58fb87b.entry.js} +2 -2
  249. package/dist/genexus-ide-ui/p-bbf88f43.entry.js +475 -0
  250. package/dist/genexus-ide-ui/p-bbf88f43.entry.js.map +1 -0
  251. package/dist/genexus-ide-ui/{p-59ed3f39.entry.js → p-d8379699.entry.js} +2 -2
  252. package/dist/genexus-ide-ui/{p-beea29fa.entry.js → p-e24902a0.entry.js} +2 -2
  253. package/dist/genexus-ide-ui/{p-54fbb568.entry.js → p-edf889d2.entry.js} +2 -2
  254. package/dist/genexus-ide-ui/p-ef5dfd35.entry.js +157 -0
  255. package/dist/genexus-ide-ui/p-ef5dfd35.entry.js.map +1 -0
  256. package/dist/genexus-ide-ui/{p-a59a07e2.entry.js → p-f49bb305.entry.js} +2 -2
  257. package/dist/genexus-ide-ui/{p-cd397078.entry.js → p-f51adb3d.entry.js} +2 -2
  258. package/dist/genexus-ide-ui/{p-74c81ca3.entry.js → p-f722955f.entry.js} +2 -2
  259. package/dist/genexus-ide-ui/{p-2a6683e1.entry.js → p-f7421997.entry.js} +2 -2
  260. package/dist/genexus-ide-ui/{p-22b8bdb1.entry.js → p-fcecdafa.entry.js} +2 -2
  261. package/dist/types/components/bpm/application-declaration/bpm-app-declaration.d.ts +22 -44
  262. package/dist/types/components/file-uploader/file-item/file-item.d.ts +31 -0
  263. package/dist/types/components/file-uploader/file-uploader.d.ts +51 -0
  264. package/dist/types/components/file-uploader/types.d.ts +31 -0
  265. package/dist/types/components.d.ts +249 -10
  266. package/package.json +1 -1
  267. package/dist/genexus-ide-ui/p-55c87f23.entry.js +0 -287
  268. package/dist/genexus-ide-ui/p-55c87f23.entry.js.map +0 -1
  269. /package/dist/genexus-ide-ui/{p-1e8f5da5.entry.js.map → p-04c6bd23.entry.js.map} +0 -0
  270. /package/dist/genexus-ide-ui/{p-3e936f26.entry.js.map → p-05b04291.entry.js.map} +0 -0
  271. /package/dist/genexus-ide-ui/{p-3ecdb582.entry.js.map → p-1072bf33.entry.js.map} +0 -0
  272. /package/dist/genexus-ide-ui/{p-683cb15e.entry.js.map → p-14165308.entry.js.map} +0 -0
  273. /package/dist/genexus-ide-ui/{p-2027c939.entry.js.map → p-2b3938b4.entry.js.map} +0 -0
  274. /package/dist/genexus-ide-ui/{p-48826a6f.entry.js.map → p-3085add2.entry.js.map} +0 -0
  275. /package/dist/genexus-ide-ui/{p-e4c2e200.entry.js.map → p-35f9ebbc.entry.js.map} +0 -0
  276. /package/dist/genexus-ide-ui/{p-038c3f9b.entry.js.map → p-45996535.entry.js.map} +0 -0
  277. /package/dist/genexus-ide-ui/{p-50b22f23.entry.js.map → p-4b38fffc.entry.js.map} +0 -0
  278. /package/dist/genexus-ide-ui/{p-8f00263d.entry.js.map → p-6d2174ed.entry.js.map} +0 -0
  279. /package/dist/genexus-ide-ui/{p-3d4355b4.entry.js.map → p-767e0f6d.entry.js.map} +0 -0
  280. /package/dist/genexus-ide-ui/{p-bac13202.entry.js.map → p-844b7117.entry.js.map} +0 -0
  281. /package/dist/genexus-ide-ui/{p-a790c4c9.entry.js.map → p-961bb2cc.entry.js.map} +0 -0
  282. /package/dist/genexus-ide-ui/{p-9b5cb6b9.entry.js.map → p-a47d71eb.entry.js.map} +0 -0
  283. /package/dist/genexus-ide-ui/{p-a05d4963.entry.js.map → p-b1851e6b.entry.js.map} +0 -0
  284. /package/dist/genexus-ide-ui/{p-c6c955a3.entry.js.map → p-b2928645.entry.js.map} +0 -0
  285. /package/dist/genexus-ide-ui/{p-3b8db39e.entry.js.map → p-b58fb87b.entry.js.map} +0 -0
  286. /package/dist/genexus-ide-ui/{p-59ed3f39.entry.js.map → p-d8379699.entry.js.map} +0 -0
  287. /package/dist/genexus-ide-ui/{p-beea29fa.entry.js.map → p-e24902a0.entry.js.map} +0 -0
  288. /package/dist/genexus-ide-ui/{p-54fbb568.entry.js.map → p-edf889d2.entry.js.map} +0 -0
  289. /package/dist/genexus-ide-ui/{p-a59a07e2.entry.js.map → p-f49bb305.entry.js.map} +0 -0
  290. /package/dist/genexus-ide-ui/{p-cd397078.entry.js.map → p-f51adb3d.entry.js.map} +0 -0
  291. /package/dist/genexus-ide-ui/{p-74c81ca3.entry.js.map → p-f722955f.entry.js.map} +0 -0
  292. /package/dist/genexus-ide-ui/{p-2a6683e1.entry.js.map → p-f7421997.entry.js.map} +0 -0
  293. /package/dist/genexus-ide-ui/{p-22b8bdb1.entry.js.map → p-fcecdafa.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"gx-ide-empty-state2.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,utZAAutZ;;ACGlvZ,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;CACnB,CAAC;MAOW,eAAe;;;;;0BAOa,KAAK;;;;;IAiB5C,MAAM;QACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IACvC,gBAAU,KAAK,EAAE,WAAW,GAAa,EACzC,eAAS,KAAK,EAAC,gBAAgB,IAC5B,IAAI,CAAC,YAAY,KAChB,YAAM,KAAK,EAAC,8BAA8B,IACxC,gBAAU,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAC,SAAS,GAAY,CACxD,CACR,EACD,WAAK,KAAK,EAAC,yBAAyB,IACjC,IAAI,CAAC,UAAU,KACd,UAAI,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,UAAU,CAAM,CAClD,EACA,IAAI,CAAC,gBAAgB,KACpB,SAAG,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,gBAAgB,CAAK,CACtD,CACG,EACN,eAAa,CACL,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/_helpers/empty-state/gx-ide-empty-state.scss?tag=gx-ide-empty-state&encapsulation=shadow","src/components/_helpers/empty-state/gx-ide-empty-state.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-common.scss\";\n\n:host {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n inline-size: 100%;\n position: relative;\n}\n:host(.animate) {\n animation: fadeIn var(--mer-timing--fast) forwards;\n inset-block-start: 0;\n}\n.main-container {\n max-width: 320px;\n margin: 0 auto;\n gap: var(--mer-spacing--md);\n padding: var(--mer-spacing--md);\n\n &__icon-wrapper {\n border: var(--mer-border__width--sm) dashed var(--mer-accent__primary);\n border-radius: 50%;\n min-width: 40px;\n min-height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n }\n\n &__content {\n gap: var(--mer-spacing--sm);\n }\n}\n.main-container,\n.main-container__content {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n inset-block-start: 5px;\n }\n}\n","import { Component, Host, h, Prop, Element } from \"@stencil/core\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/typography\"\n];\n\n@Component({\n tag: \"gx-ide-empty-state\",\n styleUrl: \"gx-ide-empty-state.scss\",\n shadow: true\n})\nexport class GxIdeEmptyState {\n @Element() el: HTMLGxIdeEmptyStateElement;\n\n /**\n * Includes a subtle entry animation\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() readonly isAnimated: boolean = false;\n\n /**\n * The state description\n */\n @Prop() readonly stateDescription?: string;\n\n /**\n * The state icon\n */\n @Prop() readonly stateIconSrc?: string;\n\n /**\n * The state title\n */\n @Prop() readonly stateTitle!: string;\n\n render() {\n return (\n <Host class={{ animate: this.isAnimated }}>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <article class=\"main-container\">\n {this.stateIconSrc && (\n <span class=\"main-container__icon-wrapper\">\n <ch-image src={this.stateIconSrc} class=\"icon-md\"></ch-image>\n </span>\n )}\n <div class=\"main-container__content\">\n {this.stateTitle && (\n <h2 class=\"body-regular-m\">{this.stateTitle}</h2>\n )}\n {this.stateDescription && (\n <p class=\"body-regular-s\">{this.stateDescription}</p>\n )}\n </div>\n <slot></slot>\n </article>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"gx-ide-empty-state2.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,g1ZAAg1Z;;ACG32Z,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;CACnB,CAAC;MAOW,eAAe;;;;;0BAOa,KAAK;;;;;IAiB5C,MAAM;QACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IACvC,gBAAU,KAAK,EAAE,WAAW,GAAa,EACzC,eAAS,KAAK,EAAC,gBAAgB,IAC5B,IAAI,CAAC,YAAY,KAChB,YAAM,KAAK,EAAC,8BAA8B,IACxC,gBAAU,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAC,SAAS,GAAY,CACxD,CACR,EACD,WAAK,KAAK,EAAC,yBAAyB,IACjC,IAAI,CAAC,UAAU,KACd,UAAI,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,UAAU,CAAM,CAClD,EACA,IAAI,CAAC,gBAAgB,KACpB,SAAG,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,gBAAgB,CAAK,CACtD,CACG,EACN,eAAa,CACL,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/_helpers/empty-state/gx-ide-empty-state.scss?tag=gx-ide-empty-state&encapsulation=shadow","src/components/_helpers/empty-state/gx-ide-empty-state.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-common.scss\";\n\n:host {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n inline-size: 100%;\n position: relative;\n}\n:host(.animate) {\n animation: fadeIn var(--mer-timing--fast) forwards;\n inset-block-start: 0;\n}\n.main-container {\n max-width: 320px;\n margin: 0 auto;\n gap: var(--mer-spacing--md);\n padding: var(--mer-spacing--md);\n\n &__icon-wrapper {\n border: var(--mer-border__width--sm) dashed var(--mer-accent__primary);\n border-radius: 50%;\n min-width: 40px;\n min-height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n }\n\n &__content {\n gap: var(--mer-spacing--sm);\n }\n}\n.main-container,\n.main-container__content {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n inset-block-start: 5px;\n }\n}\n","import { Component, Host, h, Prop, Element } from \"@stencil/core\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/typography\"\n];\n\n@Component({\n tag: \"gx-ide-empty-state\",\n styleUrl: \"gx-ide-empty-state.scss\",\n shadow: true\n})\nexport class GxIdeEmptyState {\n @Element() el: HTMLGxIdeEmptyStateElement;\n\n /**\n * Includes a subtle entry animation\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() readonly isAnimated: boolean = false;\n\n /**\n * The state description\n */\n @Prop() readonly stateDescription?: string;\n\n /**\n * The state icon\n */\n @Prop() readonly stateIconSrc?: string;\n\n /**\n * The state title\n */\n @Prop() readonly stateTitle!: string;\n\n render() {\n return (\n <Host class={{ animate: this.isAnimated }}>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <article class=\"main-container\">\n {this.stateIconSrc && (\n <span class=\"main-container__icon-wrapper\">\n <ch-image src={this.stateIconSrc} class=\"icon-md\"></ch-image>\n </span>\n )}\n <div class=\"main-container__content\">\n {this.stateTitle && (\n <h2 class=\"body-regular-m\">{this.stateTitle}</h2>\n )}\n {this.stateDescription && (\n <p class=\"body-regular-s\">{this.stateDescription}</p>\n )}\n </div>\n <slot></slot>\n </article>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GxIdeFileItem extends Components.GxIdeFileItem, HTMLElement {}
4
+ export const GxIdeFileItem: {
5
+ prototype: GxIdeFileItem;
6
+ new (): GxIdeFileItem;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,8 @@
1
+ import { F as FileItem, d as defineCustomElement$1 } from './file-item.js';
2
+
3
+ const GxIdeFileItem = FileItem;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { GxIdeFileItem, defineCustomElement };
7
+
8
+ //# sourceMappingURL=gx-ide-file-item.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-file-item.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GxIdeFileUploader extends Components.GxIdeFileUploader, HTMLElement {}
4
+ export const GxIdeFileUploader: {
5
+ prototype: GxIdeFileUploader;
6
+ new (): GxIdeFileUploader;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,438 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { g as getIconPath } from './assets-manager.js';
3
+ import './MERCURY_ASSETS.js';
4
+ import { L as Locale } from './locale.js';
5
+ import { d as defineCustomElement$2 } from './file-item.js';
6
+
7
+ const fileUploaderCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}:host{display:grid;block-size:100%}.card-regular{background-color:var(--mer-surface__elevation--01);border:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--md) var(--mer-spacing--md);display:grid}.card-small{background-color:var(--mer-surface__elevation--02);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--sm) var(--mer-spacing--sm)}.card-small--actionable:hover{background-color:var(--mer-color__neutral-gray--600)}.card-small--actionable:active{background-color:var(--mer-color__neutral-gray--650)}.card-small:focus-visible{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}.empty-state{block-size:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--mer-spacing--sm);text-align:center}.empty-state__title,.empty-state__button,.empty-state__link{max-inline-size:300px}.opacity-0{opacity:0}.opacity-1{opacity:1}.display-contents{display:contents}.pill-tag{padding:1px 4px;border-radius:2px;min-inline-size:40px;text-align:center;margin-inline-end:10px;font-size:11px}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-view-primary{font-size:var(--mer-font__size--2xs)}p{margin:0;font-size:var(--mer-font__size--xxs)}.buttons-container{display:flex;gap:var(--mer-spacing--xs)}:host{display:block;inline-size:100%;block-size:100%;padding-inline-end:0 !important}.file-uploader-dialog{display:flex;flex-direction:column;block-size:100%;background-color:var(--mer-surface__background);position:relative}.file-uploader-dialog .dialog-content{flex:1;min-block-size:0;overflow:auto}.file-uploader-dialog .dialog-footer{padding-inline-end:var(--spacing-body-inline-end)}.file-uploader{display:flex;flex-direction:column;inline-size:100%;block-size:100%}.file-uploader__list{display:flex;flex-direction:column;inline-size:100%;block-size:100%}.file-uploader__list-header{position:sticky;top:0;z-index:1;background-color:var(--mer-surface__elevation--01);display:flex;justify-content:space-between;align-items:center;padding-inline-end:var(--spacing-body-inline-end)}.file-uploader__list-content{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:var(--mer-spacing--xs);padding-inline-end:var(--spacing-body-inline-end);padding-block-end:var(--mer-spacing--md)}.file-uploader__list-title-container{display:flex;align-items:center;gap:var(--mer-spacing--2xs);white-space:nowrap}.file-uploader__drop-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;inline-size:calc(100% - var(--spacing-body-inline-end));block-size:calc(100% - var(--mer-spacing--sm));min-block-size:200px;margin-block-end:var(--mer-spacing--sm);background:var(--mer-surface__elevation--01);border:var(--mer-border__width--md) dashed var(--mer-border-color__dim);border-radius:var(--mer-border__radius--md);transition:border-color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease}.file-uploader__drop-zone--dragging{border-color:var(--mer-accent__primary);background:var(--mer-accent__primary--hover);opacity:0.7}.file-uploader__drop-zone .text-container{display:flex;flex-direction:column;align-items:center;gap:var(--mer-spacing--2xs);margin-block-start:var(--mer-spacing--xs)}.hidden-input{display:none}.label-primary-row{display:flex;align-items:center;gap:var(--mer-spacing--xs)}";
8
+
9
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
10
+ if (kind === "a" && !f)
11
+ throw new TypeError("Private accessor was defined without a getter");
12
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
13
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
17
+ if (kind === "m")
18
+ throw new TypeError("Private method is not writable");
19
+ if (kind === "a" && !f)
20
+ throw new TypeError("Private accessor was defined without a setter");
21
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
22
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
23
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
24
+ };
25
+ var _FileUploader_instances, _FileUploader__componentLocale, _FileUploader_fileInputEl, _FileUploader_dragCounter, _FileUploader_generateId, _FileUploader_isValidFile, _FileUploader_getValidFiles, _FileUploader_handleDragEnter, _FileUploader_handleDragLeave, _FileUploader_handleDragOver, _FileUploader_handleDrop, _FileUploader_handleFileSelect, _FileUploader_handleFileInput, _FileUploader_handleFiles, _FileUploader_handleNameChange, _FileUploader_handleFileCancel, _FileUploader_handleConfirm, _FileUploader_handleCancel;
26
+ const PLUS_ICON = getIconPath({
27
+ category: "gemini-tools",
28
+ name: "add",
29
+ colorType: "primary"
30
+ });
31
+ const CSS_BUNDLES = [
32
+ "resets/box-sizing",
33
+ "components/button",
34
+ "components/icon",
35
+ "components/list-box",
36
+ "components/edit",
37
+ "utils/typography",
38
+ "utils/spacing",
39
+ "utils/form",
40
+ "utils/layout",
41
+ "utils/elevation",
42
+ "chameleon/scrollbar"
43
+ ];
44
+ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends HTMLElement {
45
+ constructor() {
46
+ super();
47
+ this.__registerHost();
48
+ this.__attachShadow();
49
+ _FileUploader_instances.add(this);
50
+ _FileUploader__componentLocale.set(this, void 0);
51
+ _FileUploader_fileInputEl.set(this, void 0);
52
+ _FileUploader_dragCounter.set(this, 0);
53
+ /** Generates a unique ID for file identification */
54
+ _FileUploader_generateId.set(this, () => {
55
+ return Math.random().toString(36).substr(2, 9);
56
+ });
57
+ /** Handles drag enter event */
58
+ _FileUploader_handleDragEnter.set(this, (e) => {
59
+ var _a;
60
+ e.preventDefault();
61
+ e.stopPropagation();
62
+ __classPrivateFieldSet(this, _FileUploader_dragCounter, (_a = __classPrivateFieldGet(this, _FileUploader_dragCounter, "f"), _a++, _a), "f");
63
+ this.isDragging = true;
64
+ });
65
+ /** Handles drag leave event */
66
+ _FileUploader_handleDragLeave.set(this, (e) => {
67
+ var _a;
68
+ e.preventDefault();
69
+ e.stopPropagation();
70
+ __classPrivateFieldSet(this, _FileUploader_dragCounter, (_a = __classPrivateFieldGet(this, _FileUploader_dragCounter, "f"), _a--, _a), "f");
71
+ if (__classPrivateFieldGet(this, _FileUploader_dragCounter, "f") === 0) {
72
+ this.isDragging = false;
73
+ }
74
+ });
75
+ /** Handles drag over event */
76
+ _FileUploader_handleDragOver.set(this, (e) => {
77
+ e.preventDefault();
78
+ e.stopPropagation();
79
+ });
80
+ /** Handles drop event */
81
+ _FileUploader_handleDrop.set(this, (e) => {
82
+ var _a;
83
+ e.preventDefault();
84
+ e.stopPropagation();
85
+ this.isDragging = false;
86
+ __classPrivateFieldSet(this, _FileUploader_dragCounter, 0, "f");
87
+ const files = (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.files;
88
+ if (files) {
89
+ __classPrivateFieldGet(this, _FileUploader_handleFiles, "f").call(this, files);
90
+ }
91
+ });
92
+ /** Triggers file input click */
93
+ _FileUploader_handleFileSelect.set(this, () => {
94
+ var _a;
95
+ (_a = __classPrivateFieldGet(this, _FileUploader_fileInputEl, "f")) === null || _a === void 0 ? void 0 : _a.click();
96
+ });
97
+ /** Handles file input change event */
98
+ _FileUploader_handleFileInput.set(this, (e) => {
99
+ const files = e.target.files;
100
+ if (files) {
101
+ __classPrivateFieldGet(this, _FileUploader_handleFiles, "f").call(this, files);
102
+ }
103
+ });
104
+ /** Processes files and starts upload */
105
+ _FileUploader_handleFiles.set(this, (files) => {
106
+ const validFiles = __classPrivateFieldGet(this, _FileUploader_instances, "m", _FileUploader_getValidFiles).call(this, files);
107
+ validFiles.forEach(async (file) => {
108
+ var _a, _b;
109
+ const id = __classPrivateFieldGet(this, _FileUploader_generateId, "f").call(this);
110
+ const fileState = {
111
+ id,
112
+ name: file.name,
113
+ file,
114
+ pending: true,
115
+ progress: 0
116
+ };
117
+ if (!this.multiple) {
118
+ this.fileStates.clear();
119
+ }
120
+ this.fileStates = new Map(this.fileStates.set(id, fileState));
121
+ if (this.uploadFunction) {
122
+ try {
123
+ const uploadPromise = this.uploadFunction(file, progress => {
124
+ const state = this.fileStates.get(id);
125
+ if (state) {
126
+ const updatedState = Object.assign(Object.assign({}, state), { progress: progress, pending: progress < 100 });
127
+ this.fileStates = new Map(this.fileStates.set(id, updatedState));
128
+ }
129
+ });
130
+ // Store the upload promise/object for potential cancellation
131
+ const stateWithPromise = Object.assign(Object.assign({}, this.fileStates.get(id)), { uploadPromise });
132
+ this.fileStates = new Map(this.fileStates.set(id, stateWithPromise));
133
+ const result = await uploadPromise;
134
+ console.log("Upload result:", { id, result });
135
+ const state = this.fileStates.get(id);
136
+ if (state) {
137
+ if (result.success && result.remoteId) {
138
+ const updatedState = Object.assign(Object.assign({}, state), { remoteId: result.remoteId, pending: false, progress: 100 });
139
+ this.fileStates = new Map(this.fileStates.set(id, updatedState));
140
+ console.log("File uploaded successfully:", updatedState);
141
+ await ((_a = this.fileUploadedCallback) === null || _a === void 0 ? void 0 : _a.call(this, {
142
+ name: state.name,
143
+ originalName: state.file.name,
144
+ remoteId: result.remoteId
145
+ }));
146
+ }
147
+ else {
148
+ const updatedState = Object.assign(Object.assign({}, state), { error: ((_b = result.errors) === null || _b === void 0 ? void 0 : _b.upload) || "Upload failed", pending: false });
149
+ this.fileStates = new Map(this.fileStates.set(id, updatedState));
150
+ console.log("File upload failed:", updatedState);
151
+ }
152
+ }
153
+ }
154
+ catch (error) {
155
+ const state = this.fileStates.get(id);
156
+ if (state) {
157
+ const updatedState = Object.assign(Object.assign({}, state), { error: error instanceof Error
158
+ ? error.message
159
+ : "Unknown error occurred", pending: false });
160
+ this.fileStates = new Map(this.fileStates.set(id, updatedState));
161
+ console.log("File upload error:", updatedState);
162
+ }
163
+ }
164
+ }
165
+ });
166
+ if (__classPrivateFieldGet(this, _FileUploader_fileInputEl, "f")) {
167
+ __classPrivateFieldGet(this, _FileUploader_fileInputEl, "f").value = "";
168
+ }
169
+ });
170
+ /** Handles file name change */
171
+ _FileUploader_handleNameChange.set(this, async (event) => {
172
+ var _a;
173
+ const { id, name } = event.detail;
174
+ const file = this.fileStates.get(id);
175
+ if (file) {
176
+ const updatedFile = Object.assign(Object.assign({}, file), { name: name.trim(), isEditing: false });
177
+ this.fileStates = new Map(this.fileStates.set(id, updatedFile));
178
+ await ((_a = this.fileRenamedCallback) === null || _a === void 0 ? void 0 : _a.call(this, { fileId: id, newName: name.trim() }));
179
+ }
180
+ });
181
+ /** Handles individual file cancellation or deletion */
182
+ _FileUploader_handleFileCancel.set(this, async (event) => {
183
+ var _a, _b, _c, _d;
184
+ const id = event.detail;
185
+ const state = this.fileStates.get(id);
186
+ if (state) {
187
+ try {
188
+ if (state.pending) {
189
+ // Cancel upload in progress
190
+ if (state.uploadPromise &&
191
+ typeof state.uploadPromise.cancel === "function") {
192
+ state.uploadPromise.cancel();
193
+ }
194
+ else if (this.cancelUploadFunction) {
195
+ await this.cancelUploadFunction(id);
196
+ }
197
+ await ((_a = this.uploadCancelledCallback) === null || _a === void 0 ? void 0 : _a.call(this, id));
198
+ this.fileStates.delete(id);
199
+ this.fileStates = new Map(this.fileStates);
200
+ }
201
+ else {
202
+ const fileToDelete = {
203
+ name: state.name,
204
+ originalName: state.file.name,
205
+ remoteId: state.remoteId
206
+ };
207
+ const shouldDelete = await ((_b = this.onBeforeDelete) === null || _b === void 0 ? void 0 : _b.call(this, fileToDelete));
208
+ if (shouldDelete) {
209
+ await ((_c = this.fileDeletedCallback) === null || _c === void 0 ? void 0 : _c.call(this, fileToDelete));
210
+ this.fileStates.delete(id);
211
+ this.fileStates = new Map(this.fileStates);
212
+ }
213
+ }
214
+ }
215
+ catch (error) {
216
+ await ((_d = this.fileDeletionErrorCallback) === null || _d === void 0 ? void 0 : _d.call(this, {
217
+ fileName: state.name,
218
+ error: error instanceof Error ? error.message : "Unknown error occurred"
219
+ }));
220
+ }
221
+ }
222
+ });
223
+ /** Handles dialog confirmation */
224
+ _FileUploader_handleConfirm.set(this, async () => {
225
+ var _a;
226
+ // Verificar si hay subidas en progreso
227
+ const hasPendingUploads = Array.from(this.fileStates.values()).some(file => file.pending);
228
+ if (hasPendingUploads) {
229
+ return; // No permitir confirmar si hay subidas en progreso
230
+ }
231
+ // Obtener todos los archivos que están completamente subidos
232
+ const uploadedFiles = Array.from(this.fileStates.values())
233
+ .filter(file => {
234
+ const isValid = !file.pending && file.remoteId && !file.error;
235
+ console.log("File validation:", {
236
+ id: file.id,
237
+ name: file.name,
238
+ pending: file.pending,
239
+ remoteId: file.remoteId,
240
+ error: file.error,
241
+ isValid
242
+ });
243
+ return isValid;
244
+ })
245
+ .map(file => ({
246
+ name: file.name,
247
+ originalName: file.file.name,
248
+ remoteId: file.remoteId
249
+ }));
250
+ console.log("Files to be confirmed:", uploadedFiles);
251
+ if (uploadedFiles.length > 0) {
252
+ await ((_a = this.dialogConfirmedCallback) === null || _a === void 0 ? void 0 : _a.call(this, uploadedFiles));
253
+ }
254
+ // Clear file states
255
+ this.fileStates.clear();
256
+ this.fileStates = new Map();
257
+ // Reset file input
258
+ if (__classPrivateFieldGet(this, _FileUploader_fileInputEl, "f")) {
259
+ __classPrivateFieldGet(this, _FileUploader_fileInputEl, "f").value = "";
260
+ }
261
+ });
262
+ /** Handles dialog cancellation */
263
+ _FileUploader_handleCancel.set(this, async () => {
264
+ var _a, _b, _c;
265
+ try {
266
+ // Cancelamos todas las subidas en progreso
267
+ for (const [id, state] of this.fileStates.entries()) {
268
+ if (state.pending && this.cancelUploadFunction) {
269
+ try {
270
+ await this.cancelUploadFunction(id);
271
+ await ((_a = this.uploadCancelledCallback) === null || _a === void 0 ? void 0 : _a.call(this, id));
272
+ }
273
+ catch (error) {
274
+ // Error handling for upload cancellation
275
+ }
276
+ }
277
+ }
278
+ // Limpiamos todos los estados
279
+ this.fileStates.clear();
280
+ this.fileStates = new Map();
281
+ if (__classPrivateFieldGet(this, _FileUploader_fileInputEl, "f")) {
282
+ __classPrivateFieldGet(this, _FileUploader_fileInputEl, "f").value = "";
283
+ }
284
+ await ((_b = this.dialogCanceledCallback) === null || _b === void 0 ? void 0 : _b.call(this));
285
+ }
286
+ catch (error) {
287
+ this.fileStates.clear();
288
+ this.fileStates = new Map();
289
+ await ((_c = this.dialogCanceledCallback) === null || _c === void 0 ? void 0 : _c.call(this));
290
+ }
291
+ });
292
+ this.types = [];
293
+ this.multiple = false;
294
+ this.canEditName = false;
295
+ this.label = undefined;
296
+ this.uploadFunction = undefined;
297
+ this.cancelUploadFunction = undefined;
298
+ this.fileUploadedCallback = undefined;
299
+ this.dialogCanceledCallback = undefined;
300
+ this.dialogConfirmedCallback = undefined;
301
+ this.uploadCancelledCallback = undefined;
302
+ this.fileRenamedCallback = undefined;
303
+ this.fileValidationErrorCallback = undefined;
304
+ this.fileDeletionErrorCallback = undefined;
305
+ this.fileDeletedCallback = undefined;
306
+ this.onBeforeDelete = undefined;
307
+ this.fileStates = new Map();
308
+ this.isDragging = false;
309
+ }
310
+ /** Initializes component with locale strings */
311
+ async componentWillLoad() {
312
+ __classPrivateFieldSet(this, _FileUploader__componentLocale, await Locale.getComponentStrings(this.el), "f");
313
+ }
314
+ /** Clears the current file selection */
315
+ async clear() {
316
+ var _a;
317
+ for (const [id, state] of this.fileStates.entries()) {
318
+ if (state.pending && this.cancelUploadFunction) {
319
+ try {
320
+ await this.cancelUploadFunction(id);
321
+ await ((_a = this.uploadCancelledCallback) === null || _a === void 0 ? void 0 : _a.call(this, id));
322
+ }
323
+ catch (error) {
324
+ // Error handling for upload cancellation
325
+ }
326
+ }
327
+ }
328
+ this.fileStates.clear();
329
+ }
330
+ render() {
331
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
332
+ return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("input", { type: "file", class: "hidden-input", multiple: this.multiple, accept: (_a = this.types) === null || _a === void 0 ? void 0 : _a.map(type => (type.startsWith(".") ? type : `.${type}`)).join(","), onChange: __classPrivateFieldGet(this, _FileUploader_handleFileInput, "f"), ref: el => (__classPrivateFieldSet(this, _FileUploader_fileInputEl, el, "f")), "aria-hidden": "true", tabIndex: -1, style: { display: "none" } }), h("div", { class: "file-uploader-dialog" }, h("div", { class: "dialog-content" }, this.isDragging || this.fileStates.size === 0 ? (h("div", { class: {
333
+ "file-uploader__drop-zone": true,
334
+ "file-uploader__drop-zone--dragging": this.isDragging
335
+ }, onDragEnter: __classPrivateFieldGet(this, _FileUploader_handleDragEnter, "f"), onDragLeave: __classPrivateFieldGet(this, _FileUploader_handleDragLeave, "f"), onDragOver: __classPrivateFieldGet(this, _FileUploader_handleDragOver, "f"), onDrop: __classPrivateFieldGet(this, _FileUploader_handleDrop, "f") }, h("button", { class: "button-tertiary button-icon-and-text", type: "button", onClick: __classPrivateFieldGet(this, _FileUploader_handleFileSelect, "f") }, h("ch-image", { class: "icon-md", src: PLUS_ICON }), h("label", { class: "label" }, this.multiple
336
+ ? (_b = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _b === void 0 ? void 0 : _b.header.uploadButtonMultiple
337
+ : (_c = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _c === void 0 ? void 0 : _c.header.uploadButtonSingle)), h("div", { class: "text-container" }, h("div", { class: "label-primary-row" }, h("label", { class: "label" }, this.label || ((_d = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _d === void 0 ? void 0 : _d.header.orText)), h("label", { class: "label" }, (_e = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _e === void 0 ? void 0 : _e.header.dragAndDrop)), h("span", { class: "caption" }, this.types && this.types.length > 0
338
+ ? (_f = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _f === void 0 ? void 0 : _f.header.acceptedFiles.replace("{0}", this.types.join(", "))
339
+ : (_g = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _g === void 0 ? void 0 : _g.header.allFilesAccepted)))) : (h("div", { class: "file-uploader__list" }, h("div", { class: "file-uploader__list-header spacing-body-block-end" }, h("div", { class: "file-uploader__list-title-container" }, h("label", { class: "label" }, this.label ||
340
+ ((_h = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _h === void 0 ? void 0 : _h.fileList.attachedFiles)), h("span", { class: "caption" }, (_j = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _j === void 0 ? void 0 : _j.fileList.filesCount.replace("{0}", this.fileStates.size.toString()))), this.multiple && (h("button", { class: "button-tertiary button-icon-and-text", type: "button", onClick: __classPrivateFieldGet(this, _FileUploader_handleFileSelect, "f") }, h("ch-image", { class: "icon-md", src: PLUS_ICON }), h("label", { class: "label" }, this.multiple
341
+ ? (_k = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _k === void 0 ? void 0 : _k.header.uploadButtonMultiple
342
+ : (_l = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _l === void 0 ? void 0 : _l.header.uploadButtonSingle)))), h("div", { class: "file-uploader__list-content scrollable" }, Array.from(this.fileStates.values()).map(file => (h("gx-ide-file-item", { key: file.id, file: file, editable: this.canEditName, onFileNameChange: __classPrivateFieldGet(this, _FileUploader_handleNameChange, "f"), onFileDelete: __classPrivateFieldGet(this, _FileUploader_handleFileCancel, "f"), onFileCancel: __classPrivateFieldGet(this, _FileUploader_handleFileCancel, "f") }))))))), h("div", { class: "dialog-footer control-footer control-footer-with-border" }, h("div", { class: "buttons-spacer" }, h("button", { class: "button-secondary", type: "button", onClick: __classPrivateFieldGet(this, _FileUploader_handleCancel, "f") }, (_m = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _m === void 0 ? void 0 : _m.buttons.cancel), h("button", { class: "button-primary", type: "button", onClick: __classPrivateFieldGet(this, _FileUploader_handleConfirm, "f"), disabled: this.fileStates.size === 0 ||
343
+ Array.from(this.fileStates.values()).some(file => file.pending) }, (_o = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _o === void 0 ? void 0 : _o.buttons.confirm))))));
344
+ }
345
+ static get assetsDirs() { return ["gx-ide-assets/file-uploader"]; }
346
+ get el() { return this; }
347
+ static get style() { return fileUploaderCss; }
348
+ }, [1, "gx-ide-file-uploader", {
349
+ "types": [16],
350
+ "multiple": [4],
351
+ "canEditName": [4, "can-edit-name"],
352
+ "label": [1],
353
+ "uploadFunction": [16],
354
+ "cancelUploadFunction": [16],
355
+ "fileUploadedCallback": [16],
356
+ "dialogCanceledCallback": [16],
357
+ "dialogConfirmedCallback": [16],
358
+ "uploadCancelledCallback": [16],
359
+ "fileRenamedCallback": [16],
360
+ "fileValidationErrorCallback": [16],
361
+ "fileDeletionErrorCallback": [16],
362
+ "fileDeletedCallback": [16],
363
+ "onBeforeDelete": [16],
364
+ "fileStates": [32],
365
+ "isDragging": [32],
366
+ "clear": [64]
367
+ }]);
368
+ _FileUploader__componentLocale = new WeakMap(), _FileUploader_fileInputEl = new WeakMap(), _FileUploader_dragCounter = new WeakMap(), _FileUploader_generateId = new WeakMap(), _FileUploader_handleDragEnter = new WeakMap(), _FileUploader_handleDragLeave = new WeakMap(), _FileUploader_handleDragOver = new WeakMap(), _FileUploader_handleDrop = new WeakMap(), _FileUploader_handleFileSelect = new WeakMap(), _FileUploader_handleFileInput = new WeakMap(), _FileUploader_handleFiles = new WeakMap(), _FileUploader_handleNameChange = new WeakMap(), _FileUploader_handleFileCancel = new WeakMap(), _FileUploader_handleConfirm = new WeakMap(), _FileUploader_handleCancel = new WeakMap(), _FileUploader_instances = new WeakSet(), _FileUploader_isValidFile = function _FileUploader_isValidFile(file) {
369
+ var _a, _b;
370
+ // If no types specified, accept any file
371
+ if (!this.types || this.types.length === 0) {
372
+ return { isValid: true };
373
+ }
374
+ for (const type of this.types) {
375
+ // Handle wildcards like 'image/*'
376
+ if (type.includes("/*")) {
377
+ const baseType = type.split("/")[0];
378
+ if (file.type.startsWith(baseType)) {
379
+ return { isValid: true };
380
+ }
381
+ }
382
+ // Handle extensions like '.jpg'
383
+ else if (type.startsWith(".")) {
384
+ if (file.name.toLowerCase().endsWith(type.toLowerCase())) {
385
+ return { isValid: true };
386
+ }
387
+ }
388
+ // Handle specific MIME types
389
+ else if (file.type === type || file.type === `application/${type}`) {
390
+ return { isValid: true };
391
+ }
392
+ }
393
+ return {
394
+ isValid: false,
395
+ error: ((_b = (_a = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b.invalidFileType) || "Invalid file type"
396
+ };
397
+ }, _FileUploader_getValidFiles = function _FileUploader_getValidFiles(files) {
398
+ const validFiles = [];
399
+ Array.from(files).forEach(file => {
400
+ var _a;
401
+ const validation = __classPrivateFieldGet(this, _FileUploader_instances, "m", _FileUploader_isValidFile).call(this, file);
402
+ if (validation.isValid) {
403
+ validFiles.push(file);
404
+ }
405
+ else {
406
+ (_a = this.fileValidationErrorCallback) === null || _a === void 0 ? void 0 : _a.call(this, {
407
+ fileName: file.name,
408
+ error: validation.error
409
+ });
410
+ }
411
+ });
412
+ return validFiles;
413
+ };
414
+ function defineCustomElement$1() {
415
+ if (typeof customElements === "undefined") {
416
+ return;
417
+ }
418
+ const components = ["gx-ide-file-uploader", "gx-ide-file-item"];
419
+ components.forEach(tagName => { switch (tagName) {
420
+ case "gx-ide-file-uploader":
421
+ if (!customElements.get(tagName)) {
422
+ customElements.define(tagName, FileUploader);
423
+ }
424
+ break;
425
+ case "gx-ide-file-item":
426
+ if (!customElements.get(tagName)) {
427
+ defineCustomElement$2();
428
+ }
429
+ break;
430
+ } });
431
+ }
432
+
433
+ const GxIdeFileUploader = FileUploader;
434
+ const defineCustomElement = defineCustomElement$1;
435
+
436
+ export { GxIdeFileUploader, defineCustomElement };
437
+
438
+ //# sourceMappingURL=gx-ide-file-uploader.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-file-uploader.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,ulcAAulc;;;;;;;;;;;;;;;;;;;ACiB/mc,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,QAAQ,EAAE,cAAc;IACxB,IAAI,EAAE,KAAK;IACX,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAEH,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,qBAAqB;IACrB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,YAAY;IACZ,cAAc;IACd,iBAAiB;IACjB,qBAAqB;CACtB,CAAC;MAaW,YAAY;;;;;;QACvB,iDAAuB;QACvB,4CAAgC;QAiEhC,oCA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AE,OAAO,EAAE,IAAI,EAAE,CAAC;aAC1B;SACF;;aAEI,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YAC7B,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE;gBACxD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;aAC1B;SACF;;aAEI,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,IAAI,EAAE,EAAE;YAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;SAC1B;KACF;IAED,OAAO;QACL,OAAO,EAAE,KAAK;QACd,KAAK,EACH,CAAA,MAAA,MAAA,uBAAA,IAAI,sCAAkB,0CAAE,MAAM,0CAAE,eAAe,KAAI,mBAAmB;KACzE,CAAC;AACJ,CAAC,qEAGc,KAAe;IAC5B,MAAM,UAAU,GAAW,EAAE,CAAC;IAE9B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI;;QAC5B,MAAM,UAAU,GAAG,uBAAA,IAAI,0DAAa,MAAjB,IAAI,EAAc,IAAI,CAAC,CAAC;QAC3C,IAAI,UAAU,CAAC,OAAO,EAAE;YACtB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACvB;aAAM;YACL,MAAA,IAAI,CAAC,2BAA2B,qDAAG;gBACjC,QAAQ,EAAE,IAAI,CAAC,IAAI;gBACnB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;SACJ;KACF,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/file-uploader/file-uploader.scss?tag=gx-ide-file-uploader&encapsulation=shadow","src/components/file-uploader/file-uploader.tsx"],"sourcesContent":["@import \"../../global/gx-ide-common.scss\";\n@import \"../../global/gx-ide-mixins.scss\";\n@import \"../../../node_modules/@genexus/mercury/dist/assets/scss/helpers.scss\";\n\n:host {\n display: block;\n inline-size: 100%;\n block-size: 100%;\n padding-inline-end: 0 !important;\n}\n\n.file-uploader-dialog {\n display: flex;\n flex-direction: column;\n block-size: 100%;\n background-color: var(--mer-surface__background);\n position: relative;\n\n .dialog-content {\n flex: 1;\n min-block-size: 0;\n overflow: auto;\n }\n\n .dialog-footer {\n padding-inline-end: var(--spacing-body-inline-end);\n }\n}\n\n.file-uploader {\n display: flex;\n flex-direction: column;\n inline-size: 100%;\n block-size: 100%;\n\n &__list {\n display: flex;\n flex-direction: column;\n inline-size: 100%;\n block-size: 100%;\n\n &-header {\n position: sticky;\n top: 0;\n z-index: 1;\n background-color: var(--mer-surface__elevation--01);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-inline-end: var(--spacing-body-inline-end);\n }\n\n &-content {\n flex: 1;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--xs);\n padding-inline-end: var(--spacing-body-inline-end);\n padding-block-end: var(--mer-spacing--md);\n }\n }\n\n &__list-title-container {\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--2xs);\n white-space: nowrap;\n }\n\n &__drop-zone {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n inline-size: calc(100% - var(--spacing-body-inline-end));\n block-size: calc(100% - var(--mer-spacing--sm));\n min-block-size: 200px;\n margin-block-end: var(--mer-spacing--sm);\n background: var(--mer-surface__elevation--01);\n border: var(--mer-border__width--md) dashed var(--mer-border-color__dim);\n border-radius: var(--mer-border__radius--md);\n transition: border-color 0.3s ease, background-color 0.3s ease,\n opacity 0.3s ease;\n\n &--dragging {\n border-color: var(--mer-accent__primary);\n background: var(--mer-accent__primary--hover);\n opacity: 0.7;\n }\n\n .text-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--mer-spacing--2xs);\n margin-block-start: var(--mer-spacing--xs);\n }\n }\n}\n\n.hidden-input {\n display: none;\n}\n\n.label-primary-row {\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--xs);\n}\n","/* eslint-disable @stencil-community/own-methods-must-be-private */\n/* eslint-disable @stencil-community/own-props-must-be-private */\n/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n State,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport { Locale } from \"../../common/locale\";\nimport { UploadedFile, FileUploadState, UploadResult } from \"./types\";\n\nconst PLUS_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"add\",\n colorType: \"primary\"\n});\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"components/list-box\",\n \"components/edit\",\n \"utils/typography\",\n \"utils/spacing\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/elevation\",\n \"chameleon/scrollbar\"\n];\n\ntype FileValidationResult = {\n isValid: boolean;\n error?: string;\n};\n\n@Component({\n tag: \"gx-ide-file-uploader\",\n styleUrl: \"file-uploader.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/file-uploader\"]\n})\nexport class FileUploader {\n #_componentLocale: any;\n #fileInputEl!: HTMLInputElement;\n\n @Element() el!: HTMLGxIdeFileUploaderElement;\n\n /** Allowed file types/extensions (e.g. ['.jpg', '.png', 'image/*', 'application/pdf']) */\n @Prop() readonly types?: string[] = [];\n\n /** Whether multiple files can be selected */\n @Prop() readonly multiple: boolean = false;\n\n /** Whether file names can be edited */\n @Prop() readonly canEditName: boolean = false;\n\n /** Label to display in the uploader dialog */\n @Prop() readonly label?: string;\n\n /** Function to handle file upload */\n @Prop() readonly uploadFunction!: (\n file: File,\n progressCallback: (progress: number) => void\n ) => Promise<UploadResult>;\n\n /** Function to cancel file upload */\n @Prop() readonly cancelUploadFunction?: (fileId: string) => Promise<void>;\n\n /** Callback when a file is uploaded successfully */\n @Prop() readonly fileUploadedCallback?: (file: UploadedFile) => Promise<void>;\n\n /** Callback when the dialog is canceled */\n @Prop() readonly dialogCanceledCallback?: () => Promise<void>;\n\n /** Callback when the dialog is confirmed with files */\n @Prop() readonly dialogConfirmedCallback?: (\n files: UploadedFile[]\n ) => Promise<void>;\n\n /** Callback when upload is cancelled */\n @Prop() readonly uploadCancelledCallback?: (fileId: string) => Promise<void>;\n\n /** Callback when file is renamed */\n @Prop() readonly fileRenamedCallback?: (data: {\n fileId: string;\n newName: string;\n }) => Promise<void>;\n\n /** Callback when a file validation error occurs */\n @Prop() readonly fileValidationErrorCallback?: (data: {\n fileName: string;\n error: string;\n }) => Promise<void>;\n\n /** Callback when a file deletion error occurs */\n @Prop() readonly fileDeletionErrorCallback?: (data: {\n fileName: string;\n error: string;\n }) => Promise<void>;\n\n /** Callback when a file is deleted */\n @Prop() readonly fileDeletedCallback?: (file: UploadedFile) => Promise<void>;\n\n /** Callback before deleting a file to get confirmation */\n @Prop() readonly onBeforeDelete?: (file: UploadedFile) => Promise<boolean>;\n\n @State() private fileStates: Map<string, FileUploadState> = new Map();\n @State() private isDragging: boolean = false;\n #dragCounter = 0;\n\n /** Initializes component with locale strings */\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /** Generates a unique ID for file identification */\n #generateId = (): string => {\n return Math.random().toString(36).substr(2, 9);\n };\n\n /** Validates if a file matches the allowed types */\n #isValidFile(file: File): FileValidationResult {\n // If no types specified, accept any file\n if (!this.types || this.types.length === 0) {\n return { isValid: true };\n }\n\n for (const type of this.types) {\n // Handle wildcards like 'image/*'\n if (type.includes(\"/*\")) {\n const baseType = type.split(\"/\")[0];\n if (file.type.startsWith(baseType)) {\n return { isValid: true };\n }\n }\n // Handle extensions like '.jpg'\n else if (type.startsWith(\".\")) {\n if (file.name.toLowerCase().endsWith(type.toLowerCase())) {\n return { isValid: true };\n }\n }\n // Handle specific MIME types\n else if (file.type === type || file.type === `application/${type}`) {\n return { isValid: true };\n }\n }\n\n return {\n isValid: false,\n error:\n this.#_componentLocale?.errors?.invalidFileType || \"Invalid file type\"\n };\n }\n\n /** Filters valid files from a FileList */\n #getValidFiles(files: FileList): File[] {\n const validFiles: File[] = [];\n\n Array.from(files).forEach(file => {\n const validation = this.#isValidFile(file);\n if (validation.isValid) {\n validFiles.push(file);\n } else {\n this.fileValidationErrorCallback?.({\n fileName: file.name,\n error: validation.error\n });\n }\n });\n\n return validFiles;\n }\n\n /** Handles drag enter event */\n #handleDragEnter = (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n this.#dragCounter++;\n this.isDragging = true;\n };\n\n /** Handles drag leave event */\n #handleDragLeave = (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n this.#dragCounter--;\n if (this.#dragCounter === 0) {\n this.isDragging = false;\n }\n };\n\n /** Handles drag over event */\n #handleDragOver = (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n /** Handles drop event */\n #handleDrop = (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n this.isDragging = false;\n this.#dragCounter = 0;\n\n const files = e.dataTransfer?.files;\n if (files) {\n this.#handleFiles(files);\n }\n };\n\n /** Triggers file input click */\n #handleFileSelect = () => {\n this.#fileInputEl?.click();\n };\n\n /** Handles file input change event */\n #handleFileInput = (e: Event) => {\n const files = (e.target as HTMLInputElement).files;\n if (files) {\n this.#handleFiles(files);\n }\n };\n\n /** Processes files and starts upload */\n #handleFiles = (files: FileList) => {\n const validFiles: File[] = this.#getValidFiles(files);\n\n validFiles.forEach(async file => {\n const id = this.#generateId();\n const fileState: FileUploadState = {\n id,\n name: file.name,\n file,\n pending: true,\n progress: 0\n };\n\n if (!this.multiple) {\n this.fileStates.clear();\n }\n\n this.fileStates = new Map(this.fileStates.set(id, fileState));\n\n if (this.uploadFunction) {\n try {\n const uploadPromise = this.uploadFunction(file, progress => {\n const state = this.fileStates.get(id);\n if (state) {\n const updatedState = {\n ...state,\n progress: progress,\n pending: progress < 100\n };\n this.fileStates = new Map(this.fileStates.set(id, updatedState));\n }\n });\n\n // Store the upload promise/object for potential cancellation\n const stateWithPromise = {\n ...this.fileStates.get(id),\n uploadPromise\n };\n this.fileStates = new Map(this.fileStates.set(id, stateWithPromise));\n\n const result = await uploadPromise;\n console.log(\"Upload result:\", { id, result });\n\n const state = this.fileStates.get(id);\n if (state) {\n if (result.success && result.remoteId) {\n const updatedState = {\n ...state,\n remoteId: result.remoteId,\n pending: false,\n progress: 100\n };\n this.fileStates = new Map(this.fileStates.set(id, updatedState));\n console.log(\"File uploaded successfully:\", updatedState);\n await this.fileUploadedCallback?.({\n name: state.name,\n originalName: state.file.name,\n remoteId: result.remoteId\n });\n } else {\n const updatedState = {\n ...state,\n error: result.errors?.upload || \"Upload failed\",\n pending: false\n };\n this.fileStates = new Map(this.fileStates.set(id, updatedState));\n console.log(\"File upload failed:\", updatedState);\n }\n }\n } catch (error) {\n const state = this.fileStates.get(id);\n if (state) {\n const updatedState = {\n ...state,\n error:\n error instanceof Error\n ? error.message\n : \"Unknown error occurred\",\n pending: false\n };\n this.fileStates = new Map(this.fileStates.set(id, updatedState));\n console.log(\"File upload error:\", updatedState);\n }\n }\n }\n });\n\n if (this.#fileInputEl) {\n this.#fileInputEl.value = \"\";\n }\n };\n\n /** Handles file name change */\n #handleNameChange = async (\n event: CustomEvent<{ id: string; name: string }>\n ) => {\n const { id, name } = event.detail;\n const file = this.fileStates.get(id);\n\n if (file) {\n const updatedFile = {\n ...file,\n name: name.trim(),\n isEditing: false\n };\n\n this.fileStates = new Map(this.fileStates.set(id, updatedFile));\n await this.fileRenamedCallback?.({ fileId: id, newName: name.trim() });\n }\n };\n\n /** Handles individual file cancellation or deletion */\n #handleFileCancel = async (event: CustomEvent<string>) => {\n const id = event.detail;\n const state = this.fileStates.get(id);\n if (state) {\n try {\n if (state.pending) {\n // Cancel upload in progress\n if (\n state.uploadPromise &&\n typeof state.uploadPromise.cancel === \"function\"\n ) {\n state.uploadPromise.cancel();\n } else if (this.cancelUploadFunction) {\n await this.cancelUploadFunction(id);\n }\n\n await this.uploadCancelledCallback?.(id);\n\n this.fileStates.delete(id);\n this.fileStates = new Map(this.fileStates);\n } else {\n const fileToDelete: UploadedFile = {\n name: state.name,\n originalName: state.file.name,\n remoteId: state.remoteId\n };\n\n const shouldDelete = await this.onBeforeDelete?.(fileToDelete);\n\n if (shouldDelete) {\n await this.fileDeletedCallback?.(fileToDelete);\n this.fileStates.delete(id);\n this.fileStates = new Map(this.fileStates);\n }\n }\n } catch (error) {\n await this.fileDeletionErrorCallback?.({\n fileName: state.name,\n error:\n error instanceof Error ? error.message : \"Unknown error occurred\"\n });\n }\n }\n };\n\n /** Handles dialog confirmation */\n #handleConfirm = async () => {\n // Verificar si hay subidas en progreso\n const hasPendingUploads = Array.from(this.fileStates.values()).some(\n file => file.pending\n );\n\n if (hasPendingUploads) {\n return; // No permitir confirmar si hay subidas en progreso\n }\n\n // Obtener todos los archivos que están completamente subidos\n const uploadedFiles: UploadedFile[] = Array.from(this.fileStates.values())\n .filter(file => {\n const isValid = !file.pending && file.remoteId && !file.error;\n console.log(\"File validation:\", {\n id: file.id,\n name: file.name,\n pending: file.pending,\n remoteId: file.remoteId,\n error: file.error,\n isValid\n });\n return isValid;\n })\n .map(file => ({\n name: file.name,\n originalName: file.file.name,\n remoteId: file.remoteId as string\n }));\n\n console.log(\"Files to be confirmed:\", uploadedFiles);\n\n if (uploadedFiles.length > 0) {\n await this.dialogConfirmedCallback?.(uploadedFiles);\n }\n\n // Clear file states\n this.fileStates.clear();\n this.fileStates = new Map();\n\n // Reset file input\n if (this.#fileInputEl) {\n this.#fileInputEl.value = \"\";\n }\n };\n\n /** Handles dialog cancellation */\n #handleCancel = async () => {\n try {\n // Cancelamos todas las subidas en progreso\n for (const [id, state] of this.fileStates.entries()) {\n if (state.pending && this.cancelUploadFunction) {\n try {\n await this.cancelUploadFunction(id);\n await this.uploadCancelledCallback?.(id);\n } catch (error) {\n // Error handling for upload cancellation\n }\n }\n }\n\n // Limpiamos todos los estados\n this.fileStates.clear();\n this.fileStates = new Map();\n\n if (this.#fileInputEl) {\n this.#fileInputEl.value = \"\";\n }\n\n await this.dialogCanceledCallback?.();\n } catch (error) {\n this.fileStates.clear();\n this.fileStates = new Map();\n await this.dialogCanceledCallback?.();\n }\n };\n\n /** Clears the current file selection */\n @Method()\n async clear() {\n for (const [id, state] of this.fileStates.entries()) {\n if (state.pending && this.cancelUploadFunction) {\n try {\n await this.cancelUploadFunction(id);\n await this.uploadCancelledCallback?.(id);\n } catch (error) {\n // Error handling for upload cancellation\n }\n }\n }\n this.fileStates.clear();\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <input\n type=\"file\"\n class=\"hidden-input\"\n multiple={this.multiple}\n accept={this.types\n ?.map(type => (type.startsWith(\".\") ? type : `.${type}`))\n .join(\",\")}\n onChange={this.#handleFileInput}\n ref={el => (this.#fileInputEl = el as HTMLInputElement)}\n aria-hidden=\"true\"\n tabIndex={-1}\n style={{ display: \"none\" }}\n />\n <div class=\"file-uploader-dialog\">\n <div class=\"dialog-content\">\n {this.isDragging || this.fileStates.size === 0 ? (\n <div\n class={{\n \"file-uploader__drop-zone\": true,\n \"file-uploader__drop-zone--dragging\": this.isDragging\n }}\n onDragEnter={this.#handleDragEnter}\n onDragLeave={this.#handleDragLeave}\n onDragOver={this.#handleDragOver}\n onDrop={this.#handleDrop}\n >\n <button\n class=\"button-tertiary button-icon-and-text\"\n type=\"button\"\n onClick={this.#handleFileSelect}\n >\n <ch-image class=\"icon-md\" src={PLUS_ICON}></ch-image>\n <label class=\"label\">\n {this.multiple\n ? this.#_componentLocale?.header.uploadButtonMultiple\n : this.#_componentLocale?.header.uploadButtonSingle}\n </label>\n </button>\n <div class=\"text-container\">\n <div class=\"label-primary-row\">\n <label class=\"label\">\n {this.label || this.#_componentLocale?.header.orText}\n </label>\n <label class=\"label\">\n {this.#_componentLocale?.header.dragAndDrop}\n </label>\n </div>\n <span class=\"caption\">\n {this.types && this.types.length > 0\n ? this.#_componentLocale?.header.acceptedFiles.replace(\n \"{0}\",\n this.types.join(\", \")\n )\n : this.#_componentLocale?.header.allFilesAccepted}\n </span>\n </div>\n </div>\n ) : (\n <div class=\"file-uploader__list\">\n <div class=\"file-uploader__list-header spacing-body-block-end\">\n <div class=\"file-uploader__list-title-container\">\n <label class=\"label\">\n {this.label ||\n this.#_componentLocale?.fileList.attachedFiles}\n </label>\n <span class=\"caption\">\n {this.#_componentLocale?.fileList.filesCount.replace(\n \"{0}\",\n this.fileStates.size.toString()\n )}\n </span>\n </div>\n {this.multiple && (\n <button\n class=\"button-tertiary button-icon-and-text\"\n type=\"button\"\n onClick={this.#handleFileSelect}\n >\n <ch-image class=\"icon-md\" src={PLUS_ICON}></ch-image>\n <label class=\"label\">\n {this.multiple\n ? this.#_componentLocale?.header.uploadButtonMultiple\n : this.#_componentLocale?.header.uploadButtonSingle}\n </label>\n </button>\n )}\n </div>\n <div class=\"file-uploader__list-content scrollable\">\n {Array.from(this.fileStates.values()).map(file => (\n <gx-ide-file-item\n key={file.id}\n file={file}\n editable={this.canEditName}\n onFileNameChange={this.#handleNameChange}\n onFileDelete={this.#handleFileCancel}\n onFileCancel={this.#handleFileCancel}\n />\n ))}\n </div>\n </div>\n )}\n </div>\n <div class=\"dialog-footer control-footer control-footer-with-border\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#handleCancel}\n >\n {this.#_componentLocale?.buttons.cancel}\n </button>\n <button\n class=\"button-primary\"\n type=\"button\"\n onClick={this.#handleConfirm}\n disabled={\n this.fileStates.size === 0 ||\n Array.from(this.fileStates.values()).some(\n file => file.pending\n )\n }\n >\n {this.#_componentLocale?.buttons.confirm}\n </button>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}