@genexus/genexus-ide-ui 1.1.5 → 1.1.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 (643) hide show
  1. package/dist/cjs/{code-render-0e9837c4.js → code-render-55d37767.js} +3 -3
  2. package/dist/cjs/code-render-55d37767.js.map +1 -0
  3. package/dist/cjs/{form-validation-ffe2b957.js → form-validation-178cf461.js} +3 -7
  4. package/dist/cjs/form-validation-178cf461.js.map +1 -0
  5. package/dist/cjs/gx-ide-about.cjs.entry.js +1 -1
  6. package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js +15 -9
  7. package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gx-ide-ai-message.cjs.entry.js +2 -2
  9. package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js +4 -3
  10. package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gx-ide-bpm-assign-roles.cjs.entry.js +1 -1
  12. package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js +5 -3
  13. package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js.map +1 -1
  14. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js +3 -2
  15. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js.map +1 -1
  16. package/dist/cjs/gx-ide-bpm-import-gxpm.cjs.entry.js +1 -1
  17. package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js +1 -1
  18. package/dist/cjs/gx-ide-bpm-sync-gam-roles.cjs.entry.js +3 -2
  19. package/dist/cjs/gx-ide-bpm-sync-gam-roles.cjs.entry.js.map +1 -1
  20. package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js +11 -9
  21. package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js.map +1 -1
  22. package/dist/cjs/gx-ide-bpm-timer-duration.cjs.entry.js +3 -2
  23. package/dist/cjs/gx-ide-bpm-timer-duration.cjs.entry.js.map +1 -1
  24. package/dist/cjs/gx-ide-card.cjs.entry.js +1 -1
  25. package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js +1 -1
  26. package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js +23 -18
  27. package/dist/cjs/gx-ide-connect-gx-server.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gx-ide-container_2.cjs.entry.js +2 -1
  29. package/dist/cjs/gx-ide-container_2.cjs.entry.js.map +1 -1
  30. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +10 -6
  31. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js.map +1 -1
  32. package/dist/cjs/gx-ide-current-user-info.cjs.entry.js +4 -3
  33. package/dist/cjs/gx-ide-current-user-info.cjs.entry.js.map +1 -1
  34. package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js +5 -4
  35. package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js.map +1 -1
  36. package/dist/cjs/gx-ide-data-selector.cjs.entry.js +4 -3
  37. package/dist/cjs/gx-ide-data-selector.cjs.entry.js.map +1 -1
  38. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js +5 -4
  39. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js.map +1 -1
  40. package/dist/cjs/gx-ide-deployment-tool.cjs.entry.js +20 -16
  41. package/dist/cjs/gx-ide-deployment-tool.cjs.entry.js.map +1 -1
  42. package/dist/cjs/gx-ide-design-import.cjs.entry.js +28 -20
  43. package/dist/cjs/gx-ide-design-import.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gx-ide-directory-selector.cjs.entry.js +2 -1
  45. package/dist/cjs/gx-ide-directory-selector.cjs.entry.js.map +1 -1
  46. package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js +3 -2
  47. package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js.map +1 -1
  48. package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +5 -3
  49. package/dist/cjs/gx-ide-entity-selector.cjs.entry.js.map +1 -1
  50. package/dist/cjs/gx-ide-file-uploader.cjs.entry.js +45 -60
  51. package/dist/cjs/gx-ide-file-uploader.cjs.entry.js.map +1 -1
  52. package/dist/cjs/gx-ide-gam-installation-settings.cjs.entry.js +3 -2
  53. package/dist/cjs/gx-ide-gam-installation-settings.cjs.entry.js.map +1 -1
  54. package/dist/cjs/gx-ide-kb-manager-export.cjs.entry.js +1 -1
  55. package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +8 -5
  56. package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js.map +1 -1
  57. package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js +1 -1
  58. package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js.map +1 -1
  59. package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js +5 -14
  60. package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js.map +1 -1
  61. package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +3 -3
  62. package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js.map +1 -1
  63. package/dist/cjs/gx-ide-navigation-report.cjs.entry.js +7 -4
  64. package/dist/cjs/gx-ide-navigation-report.cjs.entry.js.map +1 -1
  65. package/dist/cjs/gx-ide-new-environment.cjs.entry.js +18 -13
  66. package/dist/cjs/gx-ide-new-environment.cjs.entry.js.map +1 -1
  67. package/dist/cjs/gx-ide-new-kb.cjs.entry.js +35 -31
  68. package/dist/cjs/gx-ide-new-kb.cjs.entry.js.map +1 -1
  69. package/dist/cjs/gx-ide-new-object.cjs.entry.js +9 -6
  70. package/dist/cjs/gx-ide-new-object.cjs.entry.js.map +1 -1
  71. package/dist/cjs/gx-ide-new-version.cjs.entry.js +3 -3
  72. package/dist/cjs/gx-ide-new-version.cjs.entry.js.map +1 -1
  73. package/dist/cjs/gx-ide-object-selector.cjs.entry.js +7 -6
  74. package/dist/cjs/gx-ide-object-selector.cjs.entry.js.map +1 -1
  75. package/dist/cjs/gx-ide-open-api-import.cjs.entry.js +9 -5
  76. package/dist/cjs/gx-ide-open-api-import.cjs.entry.js.map +1 -1
  77. package/dist/cjs/gx-ide-references.cjs.entry.js +23 -18
  78. package/dist/cjs/gx-ide-references.cjs.entry.js.map +1 -1
  79. package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js +1 -1
  80. package/dist/cjs/gx-ide-select-kb-items.cjs.entry.js +13 -7
  81. package/dist/cjs/gx-ide-select-kb-items.cjs.entry.js.map +1 -1
  82. package/dist/cjs/gx-ide-select-user-team.cjs.entry.js +4 -3
  83. package/dist/cjs/gx-ide-select-user-team.cjs.entry.js.map +1 -1
  84. package/dist/cjs/gx-ide-share-kb.cjs.entry.js +7 -4
  85. package/dist/cjs/gx-ide-share-kb.cjs.entry.js.map +1 -1
  86. package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js +3 -2
  87. package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js.map +1 -1
  88. package/dist/cjs/gx-ide-sign-in.cjs.entry.js +1 -1
  89. package/dist/cjs/gx-ide-splash.cjs.entry.js +4 -3
  90. package/dist/cjs/gx-ide-splash.cjs.entry.js.map +1 -1
  91. package/dist/cjs/gx-ide-start-page.cjs.entry.js +7 -4
  92. package/dist/cjs/gx-ide-start-page.cjs.entry.js.map +1 -1
  93. package/dist/cjs/gx-ide-status-buttons.cjs.entry.js +1 -1
  94. package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +2 -2
  95. package/dist/cjs/gx-ide-team-dev-select-recent-comment.cjs.entry.js +1 -1
  96. package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +2 -2
  97. package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js.map +1 -1
  98. package/dist/cjs/gx-ide-team-dev-update-to-revision.cjs.entry.js +1 -1
  99. package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +4 -3
  100. package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js.map +1 -1
  101. package/dist/cjs/gx-ide-template.cjs.entry.js +1 -1
  102. package/dist/cjs/gx-ide-welcome-page.cjs.entry.js +8 -6
  103. package/dist/cjs/gx-ide-welcome-page.cjs.entry.js.map +1 -1
  104. package/dist/cjs/gx-ide-wf-settings.cjs.entry.js +1 -1
  105. package/dist/cjs/gx-ide-ww-attributes.cjs.entry.js +14 -8
  106. package/dist/cjs/gx-ide-ww-attributes.cjs.entry.js.map +1 -1
  107. package/dist/cjs/gx-ide-ww-files.cjs.entry.js +21 -18
  108. package/dist/cjs/gx-ide-ww-files.cjs.entry.js.map +1 -1
  109. package/dist/cjs/gx-ide-ww-images.cjs.entry.js +7 -18
  110. package/dist/cjs/gx-ide-ww-images.cjs.entry.js.map +1 -1
  111. package/dist/cjs/{helpers-e5a13fa5.js → helpers-30f109a4.js} +6 -6
  112. package/dist/cjs/helpers-30f109a4.js.map +1 -0
  113. package/dist/cjs/index.cjs.js +7 -1
  114. package/dist/cjs/index.cjs.js.map +1 -1
  115. package/dist/cjs/{locale-36b93b1b.js → locale-ff30a5f3.js} +4 -4
  116. package/dist/cjs/locale-ff30a5f3.js.map +1 -0
  117. package/dist/collection/common/common.js +7 -4
  118. package/dist/collection/common/common.js.map +1 -1
  119. package/dist/collection/common/form-validation.js +4 -7
  120. package/dist/collection/common/form-validation.js.map +1 -1
  121. package/dist/collection/common/helpers.js +10 -9
  122. package/dist/collection/common/helpers.js.map +1 -1
  123. package/dist/collection/common/images/ai-avatar.svg +11 -0
  124. package/dist/collection/common/locale.js +3 -3
  125. package/dist/collection/common/locale.js.map +1 -1
  126. package/dist/collection/common/render-suggest.js +1 -1
  127. package/dist/collection/common/render-suggest.js.map +1 -1
  128. package/dist/collection/components/_helpers/container/container.js +2 -1
  129. package/dist/collection/components/_helpers/container/container.js.map +1 -1
  130. package/dist/collection/components/_helpers/directory-selector/directory-selector.js +2 -1
  131. package/dist/collection/components/_helpers/directory-selector/directory-selector.js.map +1 -1
  132. package/dist/collection/components/_helpers/entity-selector/entity-selector.js +4 -2
  133. package/dist/collection/components/_helpers/entity-selector/entity-selector.js.map +1 -1
  134. package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.js +1 -1
  135. package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.js.map +1 -1
  136. package/dist/collection/components/ai-assistant/ai-assistant.js +14 -8
  137. package/dist/collection/components/ai-assistant/ai-assistant.js.map +1 -1
  138. package/dist/collection/components/bpm/application-declaration/bpm-app-declaration.js +3 -2
  139. package/dist/collection/components/bpm/application-declaration/bpm-app-declaration.js.map +1 -1
  140. package/dist/collection/components/bpm/export-xpdl/bpm-export-xpdl.js +4 -2
  141. package/dist/collection/components/bpm/export-xpdl/bpm-export-xpdl.js.map +1 -1
  142. package/dist/collection/components/bpm/import-files/bpm-import-files.js +2 -1
  143. package/dist/collection/components/bpm/import-files/bpm-import-files.js.map +1 -1
  144. package/dist/collection/components/bpm/sync-gam-roles/bpm-sync-gam-roles.js +2 -1
  145. package/dist/collection/components/bpm/sync-gam-roles/bpm-sync-gam-roles.js.map +1 -1
  146. package/dist/collection/components/bpm/task-documents/helpers.js +1 -1
  147. package/dist/collection/components/bpm/task-documents/helpers.js.map +1 -1
  148. package/dist/collection/components/bpm/task-documents/task-documents.js +9 -7
  149. package/dist/collection/components/bpm/task-documents/task-documents.js.map +1 -1
  150. package/dist/collection/components/bpm/timer-duration/bpm-timer-duration.js +2 -1
  151. package/dist/collection/components/bpm/timer-duration/bpm-timer-duration.js.map +1 -1
  152. package/dist/collection/components/chat/code-render.js +2 -2
  153. package/dist/collection/components/chat/code-render.js.map +1 -1
  154. package/dist/collection/components/current-user-info/current-user-info.js +3 -2
  155. package/dist/collection/components/current-user-info/current-user-info.js.map +1 -1
  156. package/dist/collection/components/dashboard-home/dashboard-home.js +3 -2
  157. package/dist/collection/components/dashboard-home/dashboard-home.js.map +1 -1
  158. package/dist/collection/components/data-selector/data-selector.js +3 -2
  159. package/dist/collection/components/data-selector/data-selector.js.map +1 -1
  160. package/dist/collection/components/data-type-selector/data-type-selector.js +4 -3
  161. package/dist/collection/components/data-type-selector/data-type-selector.js.map +1 -1
  162. package/dist/collection/components/deployment-tool/deployment-tool.js +18 -11
  163. package/dist/collection/components/deployment-tool/deployment-tool.js.map +1 -1
  164. package/dist/collection/components/deployment-tool/helpers.js +1 -4
  165. package/dist/collection/components/deployment-tool/helpers.js.map +1 -1
  166. package/dist/collection/components/design-import/design-import.js +26 -18
  167. package/dist/collection/components/design-import/design-import.js.map +1 -1
  168. package/dist/collection/components/design-import/helpers.js +1 -1
  169. package/dist/collection/components/design-import/helpers.js.map +1 -1
  170. package/dist/collection/components/file-uploader/file-uploader.js +44 -59
  171. package/dist/collection/components/file-uploader/file-uploader.js.map +1 -1
  172. package/dist/collection/components/gam-installation-settings/gam-installation-settings.js +2 -1
  173. package/dist/collection/components/gam-installation-settings/gam-installation-settings.js.map +1 -1
  174. package/dist/collection/components/kb-manager-import/kb-manager-import.js +7 -4
  175. package/dist/collection/components/kb-manager-import/kb-manager-import.js.map +1 -1
  176. package/dist/collection/components/modules/edit-module-server/edit-module-server.js +2 -1
  177. package/dist/collection/components/modules/edit-module-server/edit-module-server.js.map +1 -1
  178. package/dist/collection/components/modules/manage-module-references/manage-module-references.js +2 -2
  179. package/dist/collection/components/modules/manage-module-references/manage-module-references.js.map +1 -1
  180. package/dist/collection/components/modules/manage-module-references-v2/manage-module-references-v2.js +4 -13
  181. package/dist/collection/components/modules/manage-module-references-v2/manage-module-references-v2.js.map +1 -1
  182. package/dist/collection/components/navigation-report/navigation-report.js +6 -3
  183. package/dist/collection/components/navigation-report/navigation-report.js.map +1 -1
  184. package/dist/collection/components/new-environment/new-environment.js +15 -10
  185. package/dist/collection/components/new-environment/new-environment.js.map +1 -1
  186. package/dist/collection/components/new-kb/new-kb.js +32 -28
  187. package/dist/collection/components/new-kb/new-kb.js.map +1 -1
  188. package/dist/collection/components/new-object/new-object.js +8 -5
  189. package/dist/collection/components/new-object/new-object.js.map +1 -1
  190. package/dist/collection/components/new-version/new-version.js +2 -2
  191. package/dist/collection/components/new-version/new-version.js.map +1 -1
  192. package/dist/collection/components/object-selector/object-selector.js +5 -4
  193. package/dist/collection/components/object-selector/object-selector.js.map +1 -1
  194. package/dist/collection/components/open-api-import/open-api-import.js +8 -4
  195. package/dist/collection/components/open-api-import/open-api-import.js.map +1 -1
  196. package/dist/collection/components/references/helpers.js +13 -9
  197. package/dist/collection/components/references/helpers.js.map +1 -1
  198. package/dist/collection/components/references/references.js +11 -9
  199. package/dist/collection/components/references/references.js.map +1 -1
  200. package/dist/collection/components/select-kb-items/helpers.js +10 -5
  201. package/dist/collection/components/select-kb-items/helpers.js.map +1 -1
  202. package/dist/collection/components/select-kb-items/select-kb-items.js +2 -1
  203. package/dist/collection/components/select-kb-items/select-kb-items.js.map +1 -1
  204. package/dist/collection/components/select-user-team/helpers.js +1 -1
  205. package/dist/collection/components/select-user-team/helpers.js.map +1 -1
  206. package/dist/collection/components/select-user-team/select-user-team.js +2 -1
  207. package/dist/collection/components/select-user-team/select-user-team.js.map +1 -1
  208. package/dist/collection/components/sign-in-team/sign-in-team.js +2 -1
  209. package/dist/collection/components/sign-in-team/sign-in-team.js.map +1 -1
  210. package/dist/collection/components/splash/splash.js +3 -2
  211. package/dist/collection/components/splash/splash.js.map +1 -1
  212. package/dist/collection/components/start-page/start-page.js +6 -3
  213. package/dist/collection/components/start-page/start-page.js.map +1 -1
  214. package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js +21 -16
  215. package/dist/collection/components/team-dev/connect-gx-server/connect-gx-server.js.map +1 -1
  216. package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js +8 -4
  217. package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js.map +1 -1
  218. package/dist/collection/components/team-dev/share-kb/share-kb.js +5 -2
  219. package/dist/collection/components/team-dev/share-kb/share-kb.js.map +1 -1
  220. package/dist/collection/components/team-dev/update/update.js +2 -1
  221. package/dist/collection/components/team-dev/update/update.js.map +1 -1
  222. package/dist/collection/components/team-dev/update-partial-selection/update-partial-selection.js +1 -1
  223. package/dist/collection/components/team-dev/update-partial-selection/update-partial-selection.js.map +1 -1
  224. package/dist/collection/components/welcome-page/welcome-page.js +7 -5
  225. package/dist/collection/components/welcome-page/welcome-page.js.map +1 -1
  226. package/dist/collection/components/ww-attributes/helpers.js +2 -1
  227. package/dist/collection/components/ww-attributes/helpers.js.map +1 -1
  228. package/dist/collection/components/ww-attributes/ww-attributes.js +11 -6
  229. package/dist/collection/components/ww-attributes/ww-attributes.js.map +1 -1
  230. package/dist/collection/components/ww-files/helpers.js +2 -1
  231. package/dist/collection/components/ww-files/helpers.js.map +1 -1
  232. package/dist/collection/components/ww-files/ww-files.js +18 -16
  233. package/dist/collection/components/ww-files/ww-files.js.map +1 -1
  234. package/dist/collection/components/ww-images/ww-images.js +5 -16
  235. package/dist/collection/components/ww-images/ww-images.js.map +1 -1
  236. package/dist/collection/index.js +4 -0
  237. package/dist/collection/index.js.map +1 -1
  238. package/dist/collection/testing/locale.e2e.js +3 -3
  239. package/dist/collection/testing/locale.e2e.js.map +1 -1
  240. package/dist/components/code-render.js +2 -2
  241. package/dist/components/code-render.js.map +1 -1
  242. package/dist/components/container.js +2 -1
  243. package/dist/components/container.js.map +1 -1
  244. package/dist/components/entity-selector.js +4 -2
  245. package/dist/components/entity-selector.js.map +1 -1
  246. package/dist/components/form-validation.js +2 -6
  247. package/dist/components/form-validation.js.map +1 -1
  248. package/dist/components/gx-ide-ai-assistant.js +14 -8
  249. package/dist/components/gx-ide-ai-assistant.js.map +1 -1
  250. package/dist/components/gx-ide-bpm-app-declaration.js +3 -2
  251. package/dist/components/gx-ide-bpm-app-declaration.js.map +1 -1
  252. package/dist/components/gx-ide-bpm-export-xpdl.js +4 -2
  253. package/dist/components/gx-ide-bpm-export-xpdl.js.map +1 -1
  254. package/dist/components/gx-ide-bpm-import-files.js +2 -1
  255. package/dist/components/gx-ide-bpm-import-files.js.map +1 -1
  256. package/dist/components/gx-ide-bpm-sync-gam-roles.js +2 -1
  257. package/dist/components/gx-ide-bpm-sync-gam-roles.js.map +1 -1
  258. package/dist/components/gx-ide-bpm-task-documents.js +10 -8
  259. package/dist/components/gx-ide-bpm-task-documents.js.map +1 -1
  260. package/dist/components/gx-ide-bpm-timer-duration.js +2 -1
  261. package/dist/components/gx-ide-bpm-timer-duration.js.map +1 -1
  262. package/dist/components/gx-ide-connect-gx-server.js +21 -16
  263. package/dist/components/gx-ide-connect-gx-server.js.map +1 -1
  264. package/dist/components/gx-ide-create-kb-from-server.js +8 -4
  265. package/dist/components/gx-ide-create-kb-from-server.js.map +1 -1
  266. package/dist/components/gx-ide-current-user-info.js +3 -2
  267. package/dist/components/gx-ide-current-user-info.js.map +1 -1
  268. package/dist/components/gx-ide-dashboard-home.js +3 -2
  269. package/dist/components/gx-ide-dashboard-home.js.map +1 -1
  270. package/dist/components/gx-ide-data-selector.js +3 -2
  271. package/dist/components/gx-ide-data-selector.js.map +1 -1
  272. package/dist/components/gx-ide-data-type-selector.js +4 -3
  273. package/dist/components/gx-ide-data-type-selector.js.map +1 -1
  274. package/dist/components/gx-ide-deployment-tool.js +19 -15
  275. package/dist/components/gx-ide-deployment-tool.js.map +1 -1
  276. package/dist/components/gx-ide-design-import.js +27 -19
  277. package/dist/components/gx-ide-design-import.js.map +1 -1
  278. package/dist/components/gx-ide-directory-selector.js +2 -1
  279. package/dist/components/gx-ide-directory-selector.js.map +1 -1
  280. package/dist/components/gx-ide-edit-module-server.js +2 -1
  281. package/dist/components/gx-ide-edit-module-server.js.map +1 -1
  282. package/dist/components/gx-ide-file-uploader.js +44 -59
  283. package/dist/components/gx-ide-file-uploader.js.map +1 -1
  284. package/dist/components/gx-ide-gam-installation-settings.js +2 -1
  285. package/dist/components/gx-ide-gam-installation-settings.js.map +1 -1
  286. package/dist/components/gx-ide-kb-manager-import.js +7 -4
  287. package/dist/components/gx-ide-kb-manager-import.js.map +1 -1
  288. package/dist/components/gx-ide-manage-module-references-v2.js +4 -13
  289. package/dist/components/gx-ide-manage-module-references-v2.js.map +1 -1
  290. package/dist/components/gx-ide-manage-module-references.js +2 -2
  291. package/dist/components/gx-ide-manage-module-references.js.map +1 -1
  292. package/dist/components/gx-ide-navigation-report.js +6 -3
  293. package/dist/components/gx-ide-navigation-report.js.map +1 -1
  294. package/dist/components/gx-ide-new-environment.js +15 -10
  295. package/dist/components/gx-ide-new-environment.js.map +1 -1
  296. package/dist/components/gx-ide-new-kb.js +32 -28
  297. package/dist/components/gx-ide-new-kb.js.map +1 -1
  298. package/dist/components/gx-ide-new-object.js +8 -5
  299. package/dist/components/gx-ide-new-object.js.map +1 -1
  300. package/dist/components/gx-ide-new-version.js +2 -2
  301. package/dist/components/gx-ide-new-version.js.map +1 -1
  302. package/dist/components/gx-ide-object-selector.js +5 -4
  303. package/dist/components/gx-ide-object-selector.js.map +1 -1
  304. package/dist/components/gx-ide-open-api-import.js +8 -4
  305. package/dist/components/gx-ide-open-api-import.js.map +1 -1
  306. package/dist/components/gx-ide-references.js +22 -17
  307. package/dist/components/gx-ide-references.js.map +1 -1
  308. package/dist/components/gx-ide-select-kb-items.js +12 -6
  309. package/dist/components/gx-ide-select-kb-items.js.map +1 -1
  310. package/dist/components/gx-ide-select-user-team.js +3 -2
  311. package/dist/components/gx-ide-select-user-team.js.map +1 -1
  312. package/dist/components/gx-ide-share-kb.js +5 -2
  313. package/dist/components/gx-ide-share-kb.js.map +1 -1
  314. package/dist/components/gx-ide-sign-in-team.js +2 -1
  315. package/dist/components/gx-ide-sign-in-team.js.map +1 -1
  316. package/dist/components/gx-ide-splash.js +3 -2
  317. package/dist/components/gx-ide-splash.js.map +1 -1
  318. package/dist/components/gx-ide-start-page.js +6 -3
  319. package/dist/components/gx-ide-start-page.js.map +1 -1
  320. package/dist/components/gx-ide-team-dev-update-partial-selection.js +1 -1
  321. package/dist/components/gx-ide-team-dev-update-partial-selection.js.map +1 -1
  322. package/dist/components/gx-ide-team-dev-update.js +2 -1
  323. package/dist/components/gx-ide-team-dev-update.js.map +1 -1
  324. package/dist/components/gx-ide-welcome-page.js +7 -5
  325. package/dist/components/gx-ide-welcome-page.js.map +1 -1
  326. package/dist/components/gx-ide-ww-attributes.js +13 -7
  327. package/dist/components/gx-ide-ww-attributes.js.map +1 -1
  328. package/dist/components/gx-ide-ww-files.js +20 -17
  329. package/dist/components/gx-ide-ww-files.js.map +1 -1
  330. package/dist/components/gx-ide-ww-images.js +5 -16
  331. package/dist/components/gx-ide-ww-images.js.map +1 -1
  332. package/dist/components/helpers.js +5 -5
  333. package/dist/components/helpers.js.map +1 -1
  334. package/dist/components/index.js +6 -0
  335. package/dist/components/index.js.map +1 -1
  336. package/dist/components/list-selector-item.js +1 -1
  337. package/dist/components/list-selector-item.js.map +1 -1
  338. package/dist/components/locale.js +3 -3
  339. package/dist/components/locale.js.map +1 -1
  340. package/dist/esm/{code-render-f3afd300.js → code-render-53b3b0bd.js} +3 -3
  341. package/dist/esm/code-render-53b3b0bd.js.map +1 -0
  342. package/dist/esm/{form-validation-71dca8c6.js → form-validation-cd0215c6.js} +3 -7
  343. package/dist/{genexus-ide-ui/p-549b8f0c.js.map → esm/form-validation-cd0215c6.js.map} +1 -1
  344. package/dist/esm/gx-ide-about.entry.js +1 -1
  345. package/dist/esm/gx-ide-ai-assistant.entry.js +15 -9
  346. package/dist/esm/gx-ide-ai-assistant.entry.js.map +1 -1
  347. package/dist/esm/gx-ide-ai-message.entry.js +2 -2
  348. package/dist/esm/gx-ide-bpm-app-declaration.entry.js +4 -3
  349. package/dist/esm/gx-ide-bpm-app-declaration.entry.js.map +1 -1
  350. package/dist/esm/gx-ide-bpm-assign-roles.entry.js +1 -1
  351. package/dist/esm/gx-ide-bpm-export-xpdl.entry.js +5 -3
  352. package/dist/esm/gx-ide-bpm-export-xpdl.entry.js.map +1 -1
  353. package/dist/esm/gx-ide-bpm-import-files.entry.js +3 -2
  354. package/dist/esm/gx-ide-bpm-import-files.entry.js.map +1 -1
  355. package/dist/esm/gx-ide-bpm-import-gxpm.entry.js +1 -1
  356. package/dist/esm/gx-ide-bpm-objects-selector.entry.js +1 -1
  357. package/dist/esm/gx-ide-bpm-sync-gam-roles.entry.js +3 -2
  358. package/dist/esm/gx-ide-bpm-sync-gam-roles.entry.js.map +1 -1
  359. package/dist/esm/gx-ide-bpm-task-documents.entry.js +11 -9
  360. package/dist/esm/gx-ide-bpm-task-documents.entry.js.map +1 -1
  361. package/dist/esm/gx-ide-bpm-timer-duration.entry.js +3 -2
  362. package/dist/esm/gx-ide-bpm-timer-duration.entry.js.map +1 -1
  363. package/dist/esm/gx-ide-card.entry.js +1 -1
  364. package/dist/esm/gx-ide-chat-container_2.entry.js +1 -1
  365. package/dist/esm/gx-ide-connect-gx-server.entry.js +23 -18
  366. package/dist/esm/gx-ide-connect-gx-server.entry.js.map +1 -1
  367. package/dist/esm/gx-ide-container_2.entry.js +2 -1
  368. package/dist/esm/gx-ide-container_2.entry.js.map +1 -1
  369. package/dist/esm/gx-ide-create-kb-from-server.entry.js +10 -6
  370. package/dist/esm/gx-ide-create-kb-from-server.entry.js.map +1 -1
  371. package/dist/esm/gx-ide-current-user-info.entry.js +4 -3
  372. package/dist/esm/gx-ide-current-user-info.entry.js.map +1 -1
  373. package/dist/esm/gx-ide-dashboard-home.entry.js +5 -4
  374. package/dist/esm/gx-ide-dashboard-home.entry.js.map +1 -1
  375. package/dist/esm/gx-ide-data-selector.entry.js +4 -3
  376. package/dist/esm/gx-ide-data-selector.entry.js.map +1 -1
  377. package/dist/esm/gx-ide-data-type-selector.entry.js +5 -4
  378. package/dist/esm/gx-ide-data-type-selector.entry.js.map +1 -1
  379. package/dist/esm/gx-ide-deployment-tool.entry.js +20 -16
  380. package/dist/esm/gx-ide-deployment-tool.entry.js.map +1 -1
  381. package/dist/esm/gx-ide-design-import.entry.js +28 -20
  382. package/dist/esm/gx-ide-design-import.entry.js.map +1 -1
  383. package/dist/esm/gx-ide-directory-selector.entry.js +2 -1
  384. package/dist/esm/gx-ide-directory-selector.entry.js.map +1 -1
  385. package/dist/esm/gx-ide-edit-module-server.entry.js +3 -2
  386. package/dist/esm/gx-ide-edit-module-server.entry.js.map +1 -1
  387. package/dist/esm/gx-ide-entity-selector.entry.js +5 -3
  388. package/dist/esm/gx-ide-entity-selector.entry.js.map +1 -1
  389. package/dist/esm/gx-ide-file-uploader.entry.js +45 -60
  390. package/dist/esm/gx-ide-file-uploader.entry.js.map +1 -1
  391. package/dist/esm/gx-ide-gam-installation-settings.entry.js +3 -2
  392. package/dist/esm/gx-ide-gam-installation-settings.entry.js.map +1 -1
  393. package/dist/esm/gx-ide-kb-manager-export.entry.js +1 -1
  394. package/dist/esm/gx-ide-kb-manager-import.entry.js +8 -5
  395. package/dist/esm/gx-ide-kb-manager-import.entry.js.map +1 -1
  396. package/dist/esm/gx-ide-list-selector_2.entry.js +1 -1
  397. package/dist/esm/gx-ide-list-selector_2.entry.js.map +1 -1
  398. package/dist/esm/gx-ide-manage-module-references-v2.entry.js +5 -14
  399. package/dist/esm/gx-ide-manage-module-references-v2.entry.js.map +1 -1
  400. package/dist/esm/gx-ide-manage-module-references.entry.js +3 -3
  401. package/dist/esm/gx-ide-manage-module-references.entry.js.map +1 -1
  402. package/dist/esm/gx-ide-navigation-report.entry.js +7 -4
  403. package/dist/esm/gx-ide-navigation-report.entry.js.map +1 -1
  404. package/dist/esm/gx-ide-new-environment.entry.js +18 -13
  405. package/dist/esm/gx-ide-new-environment.entry.js.map +1 -1
  406. package/dist/esm/gx-ide-new-kb.entry.js +35 -31
  407. package/dist/esm/gx-ide-new-kb.entry.js.map +1 -1
  408. package/dist/esm/gx-ide-new-object.entry.js +9 -6
  409. package/dist/esm/gx-ide-new-object.entry.js.map +1 -1
  410. package/dist/esm/gx-ide-new-version.entry.js +3 -3
  411. package/dist/esm/gx-ide-new-version.entry.js.map +1 -1
  412. package/dist/esm/gx-ide-object-selector.entry.js +7 -6
  413. package/dist/esm/gx-ide-object-selector.entry.js.map +1 -1
  414. package/dist/esm/gx-ide-open-api-import.entry.js +9 -5
  415. package/dist/esm/gx-ide-open-api-import.entry.js.map +1 -1
  416. package/dist/esm/gx-ide-references.entry.js +23 -18
  417. package/dist/esm/gx-ide-references.entry.js.map +1 -1
  418. package/dist/esm/gx-ide-sc-chat-container.entry.js +1 -1
  419. package/dist/esm/gx-ide-select-kb-items.entry.js +13 -7
  420. package/dist/esm/gx-ide-select-kb-items.entry.js.map +1 -1
  421. package/dist/esm/gx-ide-select-user-team.entry.js +4 -3
  422. package/dist/esm/gx-ide-select-user-team.entry.js.map +1 -1
  423. package/dist/esm/gx-ide-share-kb.entry.js +7 -4
  424. package/dist/esm/gx-ide-share-kb.entry.js.map +1 -1
  425. package/dist/esm/gx-ide-sign-in-team.entry.js +3 -2
  426. package/dist/esm/gx-ide-sign-in-team.entry.js.map +1 -1
  427. package/dist/esm/gx-ide-sign-in.entry.js +1 -1
  428. package/dist/esm/gx-ide-splash.entry.js +4 -3
  429. package/dist/esm/gx-ide-splash.entry.js.map +1 -1
  430. package/dist/esm/gx-ide-start-page.entry.js +7 -4
  431. package/dist/esm/gx-ide-start-page.entry.js.map +1 -1
  432. package/dist/esm/gx-ide-status-buttons.entry.js +1 -1
  433. package/dist/esm/gx-ide-team-dev-commit.entry.js +2 -2
  434. package/dist/esm/gx-ide-team-dev-select-recent-comment.entry.js +1 -1
  435. package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +2 -2
  436. package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js.map +1 -1
  437. package/dist/esm/gx-ide-team-dev-update-to-revision.entry.js +1 -1
  438. package/dist/esm/gx-ide-team-dev-update.entry.js +4 -3
  439. package/dist/esm/gx-ide-team-dev-update.entry.js.map +1 -1
  440. package/dist/esm/gx-ide-template.entry.js +1 -1
  441. package/dist/esm/gx-ide-welcome-page.entry.js +8 -6
  442. package/dist/esm/gx-ide-welcome-page.entry.js.map +1 -1
  443. package/dist/esm/gx-ide-wf-settings.entry.js +1 -1
  444. package/dist/esm/gx-ide-ww-attributes.entry.js +14 -8
  445. package/dist/esm/gx-ide-ww-attributes.entry.js.map +1 -1
  446. package/dist/esm/gx-ide-ww-files.entry.js +21 -18
  447. package/dist/esm/gx-ide-ww-files.entry.js.map +1 -1
  448. package/dist/esm/gx-ide-ww-images.entry.js +7 -18
  449. package/dist/esm/gx-ide-ww-images.entry.js.map +1 -1
  450. package/dist/esm/{helpers-5f1c9a32.js → helpers-10479d69.js} +6 -6
  451. package/dist/esm/helpers-10479d69.js.map +1 -0
  452. package/dist/esm/index.js +7 -1
  453. package/dist/esm/index.js.map +1 -1
  454. package/dist/esm/{locale-643afe17.js → locale-e5107fad.js} +4 -4
  455. package/dist/esm/locale-e5107fad.js.map +1 -0
  456. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  457. package/dist/genexus-ide-ui/index.esm.js +7 -1
  458. package/dist/genexus-ide-ui/index.esm.js.map +1 -1
  459. package/dist/genexus-ide-ui/{p-11dccb8f.entry.js → p-01d96378.entry.js} +16 -17
  460. package/dist/genexus-ide-ui/p-01d96378.entry.js.map +1 -0
  461. package/dist/genexus-ide-ui/{p-75e1aa31.entry.js → p-036d005d.entry.js} +5 -4
  462. package/dist/genexus-ide-ui/p-036d005d.entry.js.map +1 -0
  463. package/dist/genexus-ide-ui/{p-f5a48b33.entry.js → p-04205aa4.entry.js} +6 -5
  464. package/dist/genexus-ide-ui/p-04205aa4.entry.js.map +1 -0
  465. package/dist/genexus-ide-ui/{p-f6ceb01a.entry.js → p-04c6bd23.entry.js} +29 -28
  466. package/dist/genexus-ide-ui/p-04c6bd23.entry.js.map +1 -0
  467. package/dist/genexus-ide-ui/{p-f52bcdac.entry.js → p-0550fd5f.entry.js} +2 -2
  468. package/dist/genexus-ide-ui/{p-e1d75f00.entry.js → p-05b04291.entry.js} +2 -2
  469. package/dist/genexus-ide-ui/{p-e1d75f00.entry.js.map → p-05b04291.entry.js.map} +1 -1
  470. package/dist/genexus-ide-ui/{p-bfd9066c.entry.js → p-0bdf34f2.entry.js} +4 -6
  471. package/dist/genexus-ide-ui/p-0bdf34f2.entry.js.map +1 -0
  472. package/dist/genexus-ide-ui/{p-2be58a7a.entry.js → p-14165308.entry.js} +2 -2
  473. package/dist/genexus-ide-ui/{p-7cedb0f0.entry.js → p-1bc2613e.entry.js} +69 -66
  474. package/dist/genexus-ide-ui/p-1bc2613e.entry.js.map +1 -0
  475. package/dist/genexus-ide-ui/{p-c5cca204.entry.js → p-1c7ea1cb.entry.js} +11 -10
  476. package/dist/genexus-ide-ui/p-1c7ea1cb.entry.js.map +1 -0
  477. package/dist/genexus-ide-ui/{p-daa29451.entry.js → p-1dd7be84.entry.js} +17 -14
  478. package/dist/genexus-ide-ui/p-1dd7be84.entry.js.map +1 -0
  479. package/dist/genexus-ide-ui/{p-549b8f0c.js → p-289c3290.js} +15 -16
  480. package/dist/genexus-ide-ui/p-289c3290.js.map +1 -0
  481. package/dist/genexus-ide-ui/{p-032b4a81.entry.js → p-29c69938.entry.js} +22 -19
  482. package/dist/genexus-ide-ui/p-29c69938.entry.js.map +1 -0
  483. package/dist/genexus-ide-ui/{p-db4f756a.entry.js → p-3085add2.entry.js} +188 -176
  484. package/dist/genexus-ide-ui/p-3085add2.entry.js.map +1 -0
  485. package/dist/genexus-ide-ui/{p-857866f8.js → p-311eedf3.js} +9 -8
  486. package/dist/genexus-ide-ui/p-311eedf3.js.map +1 -0
  487. package/dist/genexus-ide-ui/{p-2e90a13a.entry.js → p-31beae9e.entry.js} +3 -2
  488. package/dist/genexus-ide-ui/p-31beae9e.entry.js.map +1 -0
  489. package/dist/genexus-ide-ui/{p-9a39e49c.entry.js → p-35f9ebbc.entry.js} +2 -2
  490. package/dist/genexus-ide-ui/{p-db4750ff.entry.js → p-385c9544.entry.js} +147 -138
  491. package/dist/genexus-ide-ui/p-385c9544.entry.js.map +1 -0
  492. package/dist/genexus-ide-ui/{p-8f1f4126.entry.js → p-3da8db15.entry.js} +9 -9
  493. package/dist/genexus-ide-ui/p-3da8db15.entry.js.map +1 -0
  494. package/dist/genexus-ide-ui/{p-b1833747.entry.js → p-4538dea5.entry.js} +31 -26
  495. package/dist/genexus-ide-ui/p-4538dea5.entry.js.map +1 -0
  496. package/dist/genexus-ide-ui/{p-6dc05a27.entry.js → p-45996535.entry.js} +4 -3
  497. package/dist/genexus-ide-ui/p-45996535.entry.js.map +1 -0
  498. package/dist/genexus-ide-ui/{p-a6029d9a.entry.js → p-48062d23.entry.js} +128 -116
  499. package/dist/genexus-ide-ui/p-48062d23.entry.js.map +1 -0
  500. package/dist/genexus-ide-ui/{p-4d929210.entry.js → p-4b38fffc.entry.js} +2 -2
  501. package/dist/genexus-ide-ui/{p-d1cc4724.entry.js → p-4d0ba4f6.entry.js} +8 -15
  502. package/dist/genexus-ide-ui/p-4d0ba4f6.entry.js.map +1 -0
  503. package/dist/genexus-ide-ui/{p-66d9269a.entry.js → p-4e943649.entry.js} +19 -16
  504. package/dist/genexus-ide-ui/p-4e943649.entry.js.map +1 -0
  505. package/dist/genexus-ide-ui/{p-ec01c70c.entry.js → p-67e0b419.entry.js} +7 -6
  506. package/dist/genexus-ide-ui/p-67e0b419.entry.js.map +1 -0
  507. package/dist/genexus-ide-ui/{p-45d2fa91.entry.js → p-68969051.entry.js} +12 -11
  508. package/dist/genexus-ide-ui/p-68969051.entry.js.map +1 -0
  509. package/dist/genexus-ide-ui/{p-9b238bf7.entry.js → p-690942cb.entry.js} +178 -173
  510. package/dist/genexus-ide-ui/p-690942cb.entry.js.map +1 -0
  511. package/dist/genexus-ide-ui/{p-b211bca8.entry.js → p-6b957e82.entry.js} +2 -2
  512. package/dist/genexus-ide-ui/{p-be794132.entry.js → p-6f898249.entry.js} +233 -228
  513. package/dist/genexus-ide-ui/p-6f898249.entry.js.map +1 -0
  514. package/dist/genexus-ide-ui/{p-29575656.entry.js → p-704499e5.entry.js} +116 -107
  515. package/dist/genexus-ide-ui/p-704499e5.entry.js.map +1 -0
  516. package/dist/genexus-ide-ui/{p-ac0438d6.entry.js → p-767e0f6d.entry.js} +12 -11
  517. package/dist/genexus-ide-ui/p-767e0f6d.entry.js.map +1 -0
  518. package/dist/genexus-ide-ui/{p-6168d48c.entry.js → p-7abe2214.entry.js} +167 -160
  519. package/dist/genexus-ide-ui/p-7abe2214.entry.js.map +1 -0
  520. package/dist/genexus-ide-ui/{p-50eaa96d.entry.js → p-7d8812b0.entry.js} +99 -89
  521. package/dist/genexus-ide-ui/p-7d8812b0.entry.js.map +1 -0
  522. package/dist/genexus-ide-ui/{p-9c690c36.entry.js → p-88c81f18.entry.js} +13 -12
  523. package/dist/genexus-ide-ui/p-88c81f18.entry.js.map +1 -0
  524. package/dist/genexus-ide-ui/{p-5e05f830.entry.js → p-8cb937b7.entry.js} +35 -31
  525. package/dist/genexus-ide-ui/p-8cb937b7.entry.js.map +1 -0
  526. package/dist/genexus-ide-ui/p-9ddea83b.js +146 -0
  527. package/dist/genexus-ide-ui/p-9ddea83b.js.map +1 -0
  528. package/dist/genexus-ide-ui/{p-2dbf722d.entry.js → p-9fa1200f.entry.js} +75 -69
  529. package/dist/genexus-ide-ui/p-9fa1200f.entry.js.map +1 -0
  530. package/dist/genexus-ide-ui/{p-0e53f1ef.entry.js → p-a1415a9c.entry.js} +161 -159
  531. package/dist/genexus-ide-ui/p-a1415a9c.entry.js.map +1 -0
  532. package/dist/genexus-ide-ui/{p-c30b2104.entry.js → p-a47d71eb.entry.js} +11 -9
  533. package/dist/genexus-ide-ui/p-a47d71eb.entry.js.map +1 -0
  534. package/dist/genexus-ide-ui/{p-f315c6e0.entry.js → p-aab809c4.entry.js} +2 -2
  535. package/dist/genexus-ide-ui/{p-f5879a41.entry.js → p-b1851e6b.entry.js} +3 -3
  536. package/dist/genexus-ide-ui/{p-f5879a41.entry.js.map → p-b1851e6b.entry.js.map} +1 -1
  537. package/dist/genexus-ide-ui/{p-95f831a8.entry.js → p-b2928645.entry.js} +2 -2
  538. package/dist/genexus-ide-ui/{p-39c527ff.entry.js → p-b58fb87b.entry.js} +2 -2
  539. package/dist/genexus-ide-ui/{p-a86a8692.entry.js → p-c38ce0bf.entry.js} +36 -32
  540. package/dist/genexus-ide-ui/p-c38ce0bf.entry.js.map +1 -0
  541. package/dist/genexus-ide-ui/{p-3edbf07d.js → p-c5178973.js} +3 -3
  542. package/dist/genexus-ide-ui/{p-3edbf07d.js.map → p-c5178973.js.map} +1 -1
  543. package/dist/genexus-ide-ui/{p-0d83a34d.entry.js → p-c7badbf1.entry.js} +66 -62
  544. package/dist/genexus-ide-ui/p-c7badbf1.entry.js.map +1 -0
  545. package/dist/genexus-ide-ui/{p-970d16ca.entry.js → p-c91af626.entry.js} +15 -15
  546. package/dist/genexus-ide-ui/{p-970d16ca.entry.js.map → p-c91af626.entry.js.map} +1 -1
  547. package/dist/genexus-ide-ui/{p-8b046b4b.entry.js → p-d095a37c.entry.js} +10 -9
  548. package/dist/genexus-ide-ui/p-d095a37c.entry.js.map +1 -0
  549. package/dist/genexus-ide-ui/{p-e37e95e7.entry.js → p-d2107cb2.entry.js} +3 -3
  550. package/dist/genexus-ide-ui/{p-353810b8.entry.js → p-d3767a7d.entry.js} +104 -99
  551. package/dist/genexus-ide-ui/p-d3767a7d.entry.js.map +1 -0
  552. package/dist/genexus-ide-ui/{p-02fc47cd.entry.js → p-d8379699.entry.js} +2 -2
  553. package/dist/genexus-ide-ui/{p-cdf8b082.entry.js → p-da473001.entry.js} +2 -2
  554. package/dist/genexus-ide-ui/{p-501c7b1f.entry.js → p-de7f0c1f.entry.js} +22 -19
  555. package/dist/genexus-ide-ui/p-de7f0c1f.entry.js.map +1 -0
  556. package/dist/genexus-ide-ui/{p-5da3e999.entry.js → p-ded7444c.entry.js} +17 -16
  557. package/dist/genexus-ide-ui/p-ded7444c.entry.js.map +1 -0
  558. package/dist/genexus-ide-ui/{p-9a9ee1ee.entry.js → p-e24902a0.entry.js} +2 -2
  559. package/dist/genexus-ide-ui/{p-5a42428d.entry.js → p-e28e6bc4.entry.js} +15 -14
  560. package/dist/genexus-ide-ui/p-e28e6bc4.entry.js.map +1 -0
  561. package/dist/genexus-ide-ui/{p-7782e1b8.entry.js → p-e502c2fd.entry.js} +61 -56
  562. package/dist/genexus-ide-ui/p-e502c2fd.entry.js.map +1 -0
  563. package/dist/genexus-ide-ui/{p-f2bd9044.entry.js → p-e7fb3ee3.entry.js} +2 -2
  564. package/dist/genexus-ide-ui/{p-e5571f49.entry.js → p-eb9e760d.entry.js} +18 -18
  565. package/dist/genexus-ide-ui/p-eb9e760d.entry.js.map +1 -0
  566. package/dist/genexus-ide-ui/{p-eb51429c.entry.js → p-ec0809a7.entry.js} +2 -2
  567. package/dist/genexus-ide-ui/{p-460db3ff.entry.js → p-ecba870e.entry.js} +3 -3
  568. package/dist/genexus-ide-ui/{p-e26e05c7.entry.js → p-f49bb305.entry.js} +18 -12
  569. package/dist/genexus-ide-ui/p-f49bb305.entry.js.map +1 -0
  570. package/dist/genexus-ide-ui/{p-8636a0bd.entry.js → p-f722955f.entry.js} +2 -2
  571. package/dist/genexus-ide-ui/{p-a8cc41e4.entry.js → p-f7421997.entry.js} +61 -58
  572. package/dist/genexus-ide-ui/p-f7421997.entry.js.map +1 -0
  573. package/dist/types/index.d.ts +4 -0
  574. package/package.json +3 -3
  575. package/dist/cjs/code-render-0e9837c4.js.map +0 -1
  576. package/dist/cjs/form-validation-ffe2b957.js.map +0 -1
  577. package/dist/cjs/helpers-e5a13fa5.js.map +0 -1
  578. package/dist/cjs/locale-36b93b1b.js.map +0 -1
  579. package/dist/esm/code-render-f3afd300.js.map +0 -1
  580. package/dist/esm/form-validation-71dca8c6.js.map +0 -1
  581. package/dist/esm/helpers-5f1c9a32.js.map +0 -1
  582. package/dist/esm/locale-643afe17.js.map +0 -1
  583. package/dist/genexus-ide-ui/p-032b4a81.entry.js.map +0 -1
  584. package/dist/genexus-ide-ui/p-0d83a34d.entry.js.map +0 -1
  585. package/dist/genexus-ide-ui/p-0e53f1ef.entry.js.map +0 -1
  586. package/dist/genexus-ide-ui/p-11dccb8f.entry.js.map +0 -1
  587. package/dist/genexus-ide-ui/p-29575656.entry.js.map +0 -1
  588. package/dist/genexus-ide-ui/p-2dbf722d.entry.js.map +0 -1
  589. package/dist/genexus-ide-ui/p-2e90a13a.entry.js.map +0 -1
  590. package/dist/genexus-ide-ui/p-353810b8.entry.js.map +0 -1
  591. package/dist/genexus-ide-ui/p-45d2fa91.entry.js.map +0 -1
  592. package/dist/genexus-ide-ui/p-501c7b1f.entry.js.map +0 -1
  593. package/dist/genexus-ide-ui/p-50eaa96d.entry.js.map +0 -1
  594. package/dist/genexus-ide-ui/p-51601b85.js +0 -145
  595. package/dist/genexus-ide-ui/p-51601b85.js.map +0 -1
  596. package/dist/genexus-ide-ui/p-5a42428d.entry.js.map +0 -1
  597. package/dist/genexus-ide-ui/p-5da3e999.entry.js.map +0 -1
  598. package/dist/genexus-ide-ui/p-5e05f830.entry.js.map +0 -1
  599. package/dist/genexus-ide-ui/p-6168d48c.entry.js.map +0 -1
  600. package/dist/genexus-ide-ui/p-66d9269a.entry.js.map +0 -1
  601. package/dist/genexus-ide-ui/p-6dc05a27.entry.js.map +0 -1
  602. package/dist/genexus-ide-ui/p-75e1aa31.entry.js.map +0 -1
  603. package/dist/genexus-ide-ui/p-7782e1b8.entry.js.map +0 -1
  604. package/dist/genexus-ide-ui/p-7cedb0f0.entry.js.map +0 -1
  605. package/dist/genexus-ide-ui/p-857866f8.js.map +0 -1
  606. package/dist/genexus-ide-ui/p-8b046b4b.entry.js.map +0 -1
  607. package/dist/genexus-ide-ui/p-8f1f4126.entry.js.map +0 -1
  608. package/dist/genexus-ide-ui/p-9b238bf7.entry.js.map +0 -1
  609. package/dist/genexus-ide-ui/p-9c690c36.entry.js.map +0 -1
  610. package/dist/genexus-ide-ui/p-a6029d9a.entry.js.map +0 -1
  611. package/dist/genexus-ide-ui/p-a86a8692.entry.js.map +0 -1
  612. package/dist/genexus-ide-ui/p-a8cc41e4.entry.js.map +0 -1
  613. package/dist/genexus-ide-ui/p-ac0438d6.entry.js.map +0 -1
  614. package/dist/genexus-ide-ui/p-b1833747.entry.js.map +0 -1
  615. package/dist/genexus-ide-ui/p-be794132.entry.js.map +0 -1
  616. package/dist/genexus-ide-ui/p-bfd9066c.entry.js.map +0 -1
  617. package/dist/genexus-ide-ui/p-c30b2104.entry.js.map +0 -1
  618. package/dist/genexus-ide-ui/p-c5cca204.entry.js.map +0 -1
  619. package/dist/genexus-ide-ui/p-d1cc4724.entry.js.map +0 -1
  620. package/dist/genexus-ide-ui/p-daa29451.entry.js.map +0 -1
  621. package/dist/genexus-ide-ui/p-db4750ff.entry.js.map +0 -1
  622. package/dist/genexus-ide-ui/p-db4f756a.entry.js.map +0 -1
  623. package/dist/genexus-ide-ui/p-e26e05c7.entry.js.map +0 -1
  624. package/dist/genexus-ide-ui/p-e5571f49.entry.js.map +0 -1
  625. package/dist/genexus-ide-ui/p-ec01c70c.entry.js.map +0 -1
  626. package/dist/genexus-ide-ui/p-f5a48b33.entry.js.map +0 -1
  627. package/dist/genexus-ide-ui/p-f6ceb01a.entry.js.map +0 -1
  628. /package/dist/genexus-ide-ui/{p-f52bcdac.entry.js.map → p-0550fd5f.entry.js.map} +0 -0
  629. /package/dist/genexus-ide-ui/{p-2be58a7a.entry.js.map → p-14165308.entry.js.map} +0 -0
  630. /package/dist/genexus-ide-ui/{p-9a39e49c.entry.js.map → p-35f9ebbc.entry.js.map} +0 -0
  631. /package/dist/genexus-ide-ui/{p-4d929210.entry.js.map → p-4b38fffc.entry.js.map} +0 -0
  632. /package/dist/genexus-ide-ui/{p-b211bca8.entry.js.map → p-6b957e82.entry.js.map} +0 -0
  633. /package/dist/genexus-ide-ui/{p-f315c6e0.entry.js.map → p-aab809c4.entry.js.map} +0 -0
  634. /package/dist/genexus-ide-ui/{p-95f831a8.entry.js.map → p-b2928645.entry.js.map} +0 -0
  635. /package/dist/genexus-ide-ui/{p-39c527ff.entry.js.map → p-b58fb87b.entry.js.map} +0 -0
  636. /package/dist/genexus-ide-ui/{p-e37e95e7.entry.js.map → p-d2107cb2.entry.js.map} +0 -0
  637. /package/dist/genexus-ide-ui/{p-02fc47cd.entry.js.map → p-d8379699.entry.js.map} +0 -0
  638. /package/dist/genexus-ide-ui/{p-cdf8b082.entry.js.map → p-da473001.entry.js.map} +0 -0
  639. /package/dist/genexus-ide-ui/{p-9a9ee1ee.entry.js.map → p-e24902a0.entry.js.map} +0 -0
  640. /package/dist/genexus-ide-ui/{p-f2bd9044.entry.js.map → p-e7fb3ee3.entry.js.map} +0 -0
  641. /package/dist/genexus-ide-ui/{p-eb51429c.entry.js.map → p-ec0809a7.entry.js.map} +0 -0
  642. /package/dist/genexus-ide-ui/{p-460db3ff.entry.js.map → p-ecba870e.entry.js.map} +0 -0
  643. /package/dist/genexus-ide-ui/{p-8636a0bd.entry.js.map → p-f722955f.entry.js.map} +0 -0
@@ -65,7 +65,8 @@ const GxIdeDirectorySelector$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeDir
65
65
  }
66
66
  // 10.RENDER() FUNCTION //
67
67
  render() {
68
- return (h(Host, null, this.label ? (h("gxg-label", { labelPosition: this.labelPosition, center: this.centerLabel }, this.label)) : null, h("div", { class: "wrapper" }, h("gxg-form-text", { part: "input", value: this.value, onValueChanged: this.valueChangedHandler }), h("gxg-button", { part: "button-select", onClick: this.btnSelectClickHandler, "aria-label": this.accessibilityLabels?.buttonSelectLabel, type: "secondary-icon-only", icon: this.icon, disabled: !this.selectDirectoryCallback, onMouseEnter: this.buttonSelectMouseEnterHandler, onMouseLeave: this.buttonSelectMouseLeaveHandler }))));
68
+ var _a;
69
+ return (h(Host, null, this.label ? (h("gxg-label", { labelPosition: this.labelPosition, center: this.centerLabel }, this.label)) : null, h("div", { class: "wrapper" }, h("gxg-form-text", { part: "input", value: this.value, onValueChanged: this.valueChangedHandler }), h("gxg-button", { part: "button-select", onClick: this.btnSelectClickHandler, "aria-label": (_a = this.accessibilityLabels) === null || _a === void 0 ? void 0 : _a.buttonSelectLabel, type: "secondary-icon-only", icon: this.icon, disabled: !this.selectDirectoryCallback, onMouseEnter: this.buttonSelectMouseEnterHandler, onMouseLeave: this.buttonSelectMouseLeaveHandler }))));
69
70
  }
70
71
  static get style() { return directorySelectorCss; }
71
72
  }, [1, "gx-ide-directory-selector", {
@@ -1 +1 @@
1
- {"file":"gx-ide-directory-selector.js","mappings":";;AAAA,MAAM,oBAAoB,GAAG,4sQAA4sQ;;MCU5tQA,wBAAsB;;;;;;;;;;;;;;;;;;;QAiBzB,gBAAW,GAAG,gBAAgB,CAAC;QAuD/B,0BAAqB,GAAG;YAC9B,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,KAAK,OAAO,EAAE;gBAChD,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;aAC1B;SACF,CAAC;;;;QAQM,0BAAqB,GAAG;YAC9B,IAAI,CAAC,uBAAuB;gBAC1B,IAAI,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,MAAM;oBACxC,IAAI,MAAM,EAAE;wBACV,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;qBAGrB;iBACF,CAAC,CAAC;SACN,CAAC;QAEM,wBAAmB,GAAG,CAAC,CAAsB;YACnD,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;SACvB,CAAC;QAEM,kCAA6B,GAAG;YACtC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;SACnC,CAAC;QAEM,kCAA6B,GAAG;YACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;SAC9B,CAAC;oBAlFc,IAAI,CAAC,WAAW;mCAOgC;YAC9D,iBAAiB,EAAE,iCAAiC;SACrD;;6BAUiE,OAAO;2BAKlC,IAAI;;;;;;;IAqB3C,iBAAiB;QACf,IAAI,CAAC,qBAAqB,EAAE,CAAC;KAC9B;;IAuCD,MAAM;QACJ,QACE,EAAC,IAAI,QACF,IAAI,CAAC,KAAK,IACT,iBACE,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,MAAM,EAAE,IAAI,CAAC,WAAW,IAEvB,IAAI,CAAC,KAAK,CACD,IACV,IAAI,EACR,WAAK,KAAK,EAAC,SAAS,IAClB,qBACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,IAAI,CAAC,mBAAmB,GACzB,EACjB,kBACE,IAAI,EAAC,eAAe,EACpB,OAAO,EAAE,IAAI,CAAC,qBAAqB,gBACvB,IAAI,CAAC,mBAAmB,EAAE,iBAAiB,EACvD,IAAI,EAAC,qBAAqB,EAC1B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,CAAC,IAAI,CAAC,uBAAuB,EACvC,YAAY,EAAE,IAAI,CAAC,6BAA6B,EAChD,YAAY,EAAE,IAAI,CAAC,6BAA6B,GACpC,CACV,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeDirectorySelector"],"sources":["src/components/_helpers/directory-selector/directory-selector.scss?tag=gx-ide-directory-selector&encapsulation=shadow","src/components/_helpers/directory-selector/directory-selector.tsx"],"sourcesContent":["@import \"../../../../node_modules/@genexus/gemini/dist/collection/globals/mixins.scss\";\n\n:host {\n display: flex;\n flex-direction: column;\n\n .container {\n display: flex;\n flex-direction: column;\n gap: 30px;\n }\n /*label*/\n label {\n font-size: 14px;\n }\n /*wrapper*/\n .wrapper {\n display: inline-flex;\n align-items: center;\n gap: var(--gx-ide-grid-column-gap);\n }\n}\n/*label position*/\n:host([label-position=\"start\"]) {\n flex-direction: row;\n .wrapper {\n flex: 1;\n }\n}\n","/* STENCIL IMPORTS */\nimport { Component, Host, h, Prop, State } from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\n\n@Component({\n tag: \"gx-ide-directory-selector\",\n styleUrl: \"directory-selector.scss\",\n shadow: true\n})\nexport class GxIdeDirectorySelector {\n /*\nINDEX:\n1.OWN PROPERTIES \n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.METHODS\n7.LISTENERS\n8.PUBLIC METHODS API\n9.LOCAL METHODS\n10.RENDER() FUNCTION\n*/\n\n // 1.OWN PROPERTIES | WATCH'S //\n\n private defaultIcon = \"objects/folder\";\n\n // 2. REFERENCE TO ELEMENTS //\n\n // 3.STATE() VARIABLES //\n\n @State() icon = this.defaultIcon;\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * This property provides the user a way to define custom aria-label descriptions.\n */\n @Prop() readonly accessibilityLabels: DirectorySelectorLabels = {\n buttonSelectLabel: \"displays the directory selector\"\n };\n\n /**\n * The label associated with the input (optional)\n */\n @Prop() readonly label?: string;\n\n /**\n * The label position\n */\n @Prop({ reflect: true }) readonly labelPosition?: LabelPosition = \"start\";\n\n /**\n * Centers the label\n */\n @Prop({ mutable: true }) centerLabel = true;\n\n /**\n * The label width\n */\n @Prop() readonly labelWidth: string;\n\n /**\n * Callback that will be called when the user presses the action button. Returns the new value (directory path) assigned to the component.\n */\n @Prop() readonly selectDirectoryCallback: () => Promise<string>;\n\n /**\n * Value currently assigned.\n */\n @Prop({ mutable: true }) value: string;\n\n // 5.EVENTS (EMIT) //\n\n // 6.METHODS //\n\n componentWillLoad() {\n this.evaluateLabelPosition();\n }\n\n private evaluateLabelPosition = (): void => {\n if (this.label && this.labelPosition === \"above\") {\n this.centerLabel = false;\n }\n };\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private btnSelectClickHandler = () => {\n this.selectDirectoryCallback &&\n this.selectDirectoryCallback().then(result => {\n if (result) {\n this.value = result;\n } else {\n // to be defined\n }\n });\n };\n\n private valueChangedHandler = (e: CustomEvent<string>) => {\n this.value = e.detail;\n };\n\n private buttonSelectMouseEnterHandler = (): void => {\n this.icon = \"objects/folder-open\";\n };\n\n private buttonSelectMouseLeaveHandler = (): void => {\n this.icon = this.defaultIcon;\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host>\n {this.label ? (\n <gxg-label\n labelPosition={this.labelPosition}\n center={this.centerLabel}\n >\n {this.label}\n </gxg-label>\n ) : null}\n <div class=\"wrapper\">\n <gxg-form-text\n part=\"input\"\n value={this.value}\n onValueChanged={this.valueChangedHandler}\n ></gxg-form-text>\n <gxg-button\n part=\"button-select\"\n onClick={this.btnSelectClickHandler}\n aria-label={this.accessibilityLabels?.buttonSelectLabel}\n type=\"secondary-icon-only\"\n icon={this.icon}\n disabled={!this.selectDirectoryCallback}\n onMouseEnter={this.buttonSelectMouseEnterHandler}\n onMouseLeave={this.buttonSelectMouseLeaveHandler}\n ></gxg-button>\n </div>\n </Host>\n );\n }\n}\n\nexport type DirectorySelectorLabels = {\n buttonSelectLabel: string;\n};\nexport type LabelPosition = \"start\" | \"above\";\n"],"version":3}
1
+ {"file":"gx-ide-directory-selector.js","mappings":";;AAAA,MAAM,oBAAoB,GAAG,4sQAA4sQ;;MCU5tQA,wBAAsB;;;;;;;;;;;;;;;;;;;QAiBzB,gBAAW,GAAG,gBAAgB,CAAC;QAuD/B,0BAAqB,GAAG;YAC9B,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,KAAK,OAAO,EAAE;gBAChD,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;aAC1B;SACF,CAAC;;;;QAQM,0BAAqB,GAAG;YAC9B,IAAI,CAAC,uBAAuB;gBAC1B,IAAI,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,MAAM;oBACxC,IAAI,MAAM,EAAE;wBACV,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;qBAGrB;iBACF,CAAC,CAAC;SACN,CAAC;QAEM,wBAAmB,GAAG,CAAC,CAAsB;YACnD,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;SACvB,CAAC;QAEM,kCAA6B,GAAG;YACtC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;SACnC,CAAC;QAEM,kCAA6B,GAAG;YACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;SAC9B,CAAC;oBAlFc,IAAI,CAAC,WAAW;mCAOgC;YAC9D,iBAAiB,EAAE,iCAAiC;SACrD;;6BAUiE,OAAO;2BAKlC,IAAI;;;;;;;IAqB3C,iBAAiB;QACf,IAAI,CAAC,qBAAqB,EAAE,CAAC;KAC9B;;IAuCD,MAAM;;QACJ,QACE,EAAC,IAAI,QACF,IAAI,CAAC,KAAK,IACT,iBACE,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,MAAM,EAAE,IAAI,CAAC,WAAW,IAEvB,IAAI,CAAC,KAAK,CACD,IACV,IAAI,EACR,WAAK,KAAK,EAAC,SAAS,IAClB,qBACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,cAAc,EAAE,IAAI,CAAC,mBAAmB,GACzB,EACjB,kBACE,IAAI,EAAC,eAAe,EACpB,OAAO,EAAE,IAAI,CAAC,qBAAqB,gBACvB,MAAA,IAAI,CAAC,mBAAmB,0CAAE,iBAAiB,EACvD,IAAI,EAAC,qBAAqB,EAC1B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,CAAC,IAAI,CAAC,uBAAuB,EACvC,YAAY,EAAE,IAAI,CAAC,6BAA6B,EAChD,YAAY,EAAE,IAAI,CAAC,6BAA6B,GACpC,CACV,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeDirectorySelector"],"sources":["src/components/_helpers/directory-selector/directory-selector.scss?tag=gx-ide-directory-selector&encapsulation=shadow","src/components/_helpers/directory-selector/directory-selector.tsx"],"sourcesContent":["@import \"../../../../node_modules/@genexus/gemini/dist/collection/globals/mixins.scss\";\n\n:host {\n display: flex;\n flex-direction: column;\n\n .container {\n display: flex;\n flex-direction: column;\n gap: 30px;\n }\n /*label*/\n label {\n font-size: 14px;\n }\n /*wrapper*/\n .wrapper {\n display: inline-flex;\n align-items: center;\n gap: var(--gx-ide-grid-column-gap);\n }\n}\n/*label position*/\n:host([label-position=\"start\"]) {\n flex-direction: row;\n .wrapper {\n flex: 1;\n }\n}\n","/* STENCIL IMPORTS */\nimport { Component, Host, h, Prop, State } from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\n\n@Component({\n tag: \"gx-ide-directory-selector\",\n styleUrl: \"directory-selector.scss\",\n shadow: true\n})\nexport class GxIdeDirectorySelector {\n /*\nINDEX:\n1.OWN PROPERTIES \n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.METHODS\n7.LISTENERS\n8.PUBLIC METHODS API\n9.LOCAL METHODS\n10.RENDER() FUNCTION\n*/\n\n // 1.OWN PROPERTIES | WATCH'S //\n\n private defaultIcon = \"objects/folder\";\n\n // 2. REFERENCE TO ELEMENTS //\n\n // 3.STATE() VARIABLES //\n\n @State() icon = this.defaultIcon;\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * This property provides the user a way to define custom aria-label descriptions.\n */\n @Prop() readonly accessibilityLabels: DirectorySelectorLabels = {\n buttonSelectLabel: \"displays the directory selector\"\n };\n\n /**\n * The label associated with the input (optional)\n */\n @Prop() readonly label?: string;\n\n /**\n * The label position\n */\n @Prop({ reflect: true }) readonly labelPosition?: LabelPosition = \"start\";\n\n /**\n * Centers the label\n */\n @Prop({ mutable: true }) centerLabel = true;\n\n /**\n * The label width\n */\n @Prop() readonly labelWidth: string;\n\n /**\n * Callback that will be called when the user presses the action button. Returns the new value (directory path) assigned to the component.\n */\n @Prop() readonly selectDirectoryCallback: () => Promise<string>;\n\n /**\n * Value currently assigned.\n */\n @Prop({ mutable: true }) value: string;\n\n // 5.EVENTS (EMIT) //\n\n // 6.METHODS //\n\n componentWillLoad() {\n this.evaluateLabelPosition();\n }\n\n private evaluateLabelPosition = (): void => {\n if (this.label && this.labelPosition === \"above\") {\n this.centerLabel = false;\n }\n };\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private btnSelectClickHandler = () => {\n this.selectDirectoryCallback &&\n this.selectDirectoryCallback().then(result => {\n if (result) {\n this.value = result;\n } else {\n // to be defined\n }\n });\n };\n\n private valueChangedHandler = (e: CustomEvent<string>) => {\n this.value = e.detail;\n };\n\n private buttonSelectMouseEnterHandler = (): void => {\n this.icon = \"objects/folder-open\";\n };\n\n private buttonSelectMouseLeaveHandler = (): void => {\n this.icon = this.defaultIcon;\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host>\n {this.label ? (\n <gxg-label\n labelPosition={this.labelPosition}\n center={this.centerLabel}\n >\n {this.label}\n </gxg-label>\n ) : null}\n <div class=\"wrapper\">\n <gxg-form-text\n part=\"input\"\n value={this.value}\n onValueChanged={this.valueChangedHandler}\n ></gxg-form-text>\n <gxg-button\n part=\"button-select\"\n onClick={this.btnSelectClickHandler}\n aria-label={this.accessibilityLabels?.buttonSelectLabel}\n type=\"secondary-icon-only\"\n icon={this.icon}\n disabled={!this.selectDirectoryCallback}\n onMouseEnter={this.buttonSelectMouseEnterHandler}\n onMouseLeave={this.buttonSelectMouseLeaveHandler}\n ></gxg-button>\n </div>\n </Host>\n );\n }\n}\n\nexport type DirectorySelectorLabels = {\n buttonSelectLabel: string;\n};\nexport type LabelPosition = \"start\" | \"above\";\n"],"version":3}
@@ -84,9 +84,10 @@ const GxIdeEditModuleServer$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeEdit
84
84
  }
85
85
  }
86
86
  render() {
87
+ var _a;
87
88
  return (h(Host, { class: "gx-ide-component" }, h("div", { class: "gx-ide-main-wrapper gx-ide-overflow" }, h("gx-ide-container", { slimmerFooter: true }, h("div", { class: this.selectedType === "local"
88
89
  ? "grid module-servers-grid-local"
89
- : "grid module-servers-grid-server" }, h("div", { class: "module-servers-grid-column-1" }, h("gxg-label", null, " ", this._componentLocale.type), h("gxg-label", null, " ", this._componentLocale.name), h("gxg-label", null, " ", this._componentLocale.source)), h("div", { class: "module-servers-grid-column-2" }, h("gxg-combo-box", { value: this.type, ref: (el) => (this.serverTypeEl = el) }, this.types?.map(type => (h("gxg-combo-box-item", { value: type.id, onItemSelected: item => (this.selectedType = item.detail.value) }, type.type)))), h("gxg-form-text", { placeholder: this._componentLocale.name, ref: (el) => (this.nameEl = el), value: this.name, part: "name" }), h("gxg-form-text", { placeholder: this._componentLocale.source, ref: (el) => (this.sourceEl = el), value: this.source, part: "source" })), this.selectedType === "local" && (h("gxg-button", { onClick: this.selectSourceCallbackHandle }, "...")), this.selectedType === "remote" && this.renderServerOptions()), h("gxg-button", { slot: "footer-end", type: "outlined", onClick: this.cancelCallbackHandler }, this._componentLocale.footer.btnCancel), h("gxg-button", { slot: "footer-end", type: "primary-text-only", onClick: this.confirmCallbackHandler }, this._componentLocale.footer.btnConfirm)))));
90
+ : "grid module-servers-grid-server" }, h("div", { class: "module-servers-grid-column-1" }, h("gxg-label", null, " ", this._componentLocale.type), h("gxg-label", null, " ", this._componentLocale.name), h("gxg-label", null, " ", this._componentLocale.source)), h("div", { class: "module-servers-grid-column-2" }, h("gxg-combo-box", { value: this.type, ref: (el) => (this.serverTypeEl = el) }, (_a = this.types) === null || _a === void 0 ? void 0 : _a.map(type => (h("gxg-combo-box-item", { value: type.id, onItemSelected: item => (this.selectedType = item.detail.value) }, type.type)))), h("gxg-form-text", { placeholder: this._componentLocale.name, ref: (el) => (this.nameEl = el), value: this.name, part: "name" }), h("gxg-form-text", { placeholder: this._componentLocale.source, ref: (el) => (this.sourceEl = el), value: this.source, part: "source" })), this.selectedType === "local" && (h("gxg-button", { onClick: this.selectSourceCallbackHandle }, "...")), this.selectedType === "remote" && this.renderServerOptions()), h("gxg-button", { slot: "footer-end", type: "outlined", onClick: this.cancelCallbackHandler }, this._componentLocale.footer.btnCancel), h("gxg-button", { slot: "footer-end", type: "primary-text-only", onClick: this.confirmCallbackHandler }, this._componentLocale.footer.btnConfirm)))));
90
91
  }
91
92
  static get assetsDirs() { return ["gx-ide-assets/edit-module-server"]; }
92
93
  get el() { return this; }
@@ -1 +1 @@
1
- {"file":"gx-ide-edit-module-server.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,k2ZAAk2Z;;MC0Bj3ZA,uBAAqB;;;;;;QAOxB,sBAAiB,GAAG,KAAK,CAAC;;;;;;;QAmF1B,2BAAsB,GAAG;YAC/B,IAAI,IAAI,CAAC,eAAe,EAAE;gBACxB,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CACpC,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC,YAAY,CACzC,CAAC;gBACF,IAAI,IAAI,GAAG,EAA0B,CAAC;gBACtC,IAAI,cAAc,CAAC,IAAI,KAAK,QAAQ,EAAE;oBACpC,IAAI,GAAG;wBACL,EAAE,EAAE,cAAc,CAAC,EAAE;wBACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;wBACvB,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;wBAC7B,aAAa,EAAE,cAAc,CAAC,aAAa;wBAC3C,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;wBAC3B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;wBACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK;qBAChC,CAAC;iBACH;qBAAM;oBACL,IAAI,GAAG;wBACL,EAAE,EAAE,cAAc,CAAC,EAAE;wBACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;wBACvB,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;wBAC7B,aAAa,EAAE,cAAc,CAAC,aAAa;wBAC3C,MAAM,EAAE,IAAI,CAAC,QAAQ,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ACb,EACL,IAAI,CAAC,YAAY,KAAK,OAAO,KAC5B,kBAAY,OAAO,EAAE,IAAI,CAAC,0BAA0B,UAEvC,CACd,EACA,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,IAAI,CAAC,mBAAmB,EAAE,CACzD,EAEN,kBACE,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,IAAI,CAAC,qBAAqB,IAElC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAC5B,EACb,kBACE,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,mBAAmB,EACxB,OAAO,EAAE,IAAI,CAAC,sBAAsB,IAEnC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAC7B,CACI,CACf,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeEditModuleServer"],"sources":["src/components/modules/edit-module-server/edit-module-server.scss?tag=gx-ide-edit-module-server&encapsulation=shadow","src/components/modules/edit-module-server/edit-module-server.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-common.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n\n:host {\n display: block;\n}\n.module-servers-grid-local {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-columns: auto 1fr auto;\n\n *:nth-child(3) {\n align-self: end;\n }\n}\n.module-servers-grid-server {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-columns: auto 1fr;\n\n *:nth-child(3) {\n align-self: end;\n }\n}\n.module-servers-grid-column-1 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(3, 1fr);\n}\n\n.module-servers-grid-column-2 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(2, 1fr);\n}\n.grid-server-auth-column-1 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(2, 1fr);\n}\n\n.grid-server-auth-column-2 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(2, 1fr);\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n State,\n EventEmitter\n} from \"@stencil/core\";\n\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\nimport { Locale } from \"../../../common/locale\";\nimport {\n ModuleServerType,\n ModuleServerFullData,\n EditServerModuleResult\n} from \"../types\";\n@Component({\n tag: \"gx-ide-edit-module-server\",\n styleUrl: \"edit-module-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/edit-module-server\"]\n})\nexport class GxIdeEditModuleServer {\n // 1.OWN PROPERTIES | WATCH'S //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeEditModuleServerElement;\n private serverTypeEl: HTMLGxgComboBoxElement;\n private nameEl: HTMLGxgFormTextElement;\n private sourceEl: HTMLGxgFormTextElement;\n private userEl: HTMLGxgFormTextElement;\n private passwordEl: HTMLGxgFormTextElement;\n\n // 3.STATE() VARIABLES //\n\n @State() selectedType: \"local\" | \"remote\" = \"local\";\n\n // 4.PUBLIC PROPERTY API //\n\n /**\n * The type of the server\n */\n @Prop() readonly types: ModuleServerType[];\n\n /**\n * The name of the server\n */\n @Prop() readonly name: string;\n\n /**\n * Disk path or server url\n */\n @Prop() readonly source: string;\n\n /**\n * Id of the currently selected server type\n */\n @Prop() readonly type: string;\n\n /**\n * Confirm callback\n */\n @Prop() readonly confirmCallback: ConfirmCallback;\n\n /**\n * Callback invoked when wants to select a local folder that have modules inside\n */\n @Prop() readonly selectSourceCallback: SelectSourceCallback;\n\n /**\n * Cancel callback\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n // 6.COMPONENT LIFECYCLE EVENTS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n /**\n * Executed when user click on confirm button\n */\n private confirmCallbackHandler = async () => {\n if (this.confirmCallback) {\n const selectedTypeId = this.types.find(\n ({ type }) => type === this.selectedType\n );\n let data = {} as ModuleServerFullData;\n if (selectedTypeId.type === \"remote\") {\n data = {\n id: selectedTypeId.id,\n name: this.nameEl.value,\n type: this.serverTypeEl.value,\n authenticated: selectedTypeId.authenticated,\n source: this.sourceEl.value,\n user: this.userEl.value,\n password: this.passwordEl.value\n };\n } else {\n data = {\n id: selectedTypeId.id,\n name: this.nameEl.value,\n type: this.serverTypeEl.value,\n authenticated: selectedTypeId.authenticated,\n source: this.sourceEl.value\n };\n }\n const result = await this.confirmCallback(data);\n if (result.success) {\n // display success message\n } else {\n // display error message\n }\n }\n };\n\n /**\n * Executed when user click on cancel button\n */\n private cancelCallbackHandler = async () => {\n await this.cancelCallback();\n };\n private selectSourceCallbackHandle = async () => {\n const path = await this.selectSourceCallback();\n\n if (path) {\n this.sourceEl.value = path;\n }\n };\n\n // 10.LOCAL METHODS //\n\n private renderServerOptions = (): Element[] => {\n return [\n <div class=\"grid-server-auth-column-1\">\n <gxg-label>{this._componentLocale.user}</gxg-label>\n <gxg-label>{this._componentLocale.password}</gxg-label>\n </div>,\n <div class=\"grid-server-auth-column-2\">\n <gxg-form-text\n placeholder={this._componentLocale.user}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.userEl = el as HTMLGxgFormTextElement)\n }\n part=\"user\"\n ></gxg-form-text>\n <gxg-form-text\n password\n placeholder={this._componentLocale.password}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.passwordEl = el as HTMLGxgFormTextElement)\n }\n part=\"password\"\n ></gxg-form-text>\n </div>\n ];\n };\n\n render() {\n return (\n <Host class=\"gx-ide-component\">\n <div class=\"gx-ide-main-wrapper gx-ide-overflow\">\n <gx-ide-container slimmerFooter>\n <div\n class={\n this.selectedType === \"local\"\n ? \"grid module-servers-grid-local\"\n : \"grid module-servers-grid-server\"\n }\n >\n <div class=\"module-servers-grid-column-1\">\n <gxg-label> {this._componentLocale.type}</gxg-label>\n <gxg-label> {this._componentLocale.name}</gxg-label>\n <gxg-label> {this._componentLocale.source}</gxg-label>\n </div>\n <div class=\"module-servers-grid-column-2\">\n <gxg-combo-box\n value={this.type}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.serverTypeEl = el as HTMLGxgComboBoxElement)\n }\n >\n {this.types?.map(type => (\n <gxg-combo-box-item\n value={type.id}\n onItemSelected={item =>\n (this.selectedType = item.detail.value)\n }\n >\n {type.type}\n </gxg-combo-box-item>\n ))}\n </gxg-combo-box>\n <gxg-form-text\n placeholder={this._componentLocale.name}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.nameEl = el as HTMLGxgFormTextElement)\n }\n value={this.name}\n part=\"name\"\n ></gxg-form-text>\n <gxg-form-text\n placeholder={this._componentLocale.source}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.sourceEl = el as HTMLGxgFormTextElement)\n }\n value={this.source}\n part=\"source\"\n ></gxg-form-text>\n </div>\n {this.selectedType === \"local\" && (\n <gxg-button onClick={this.selectSourceCallbackHandle}>\n ...\n </gxg-button>\n )}\n {this.selectedType === \"remote\" && this.renderServerOptions()}\n </div>\n\n <gxg-button\n slot=\"footer-end\"\n type=\"outlined\"\n onClick={this.cancelCallbackHandler}\n >\n {this._componentLocale.footer.btnCancel}\n </gxg-button>\n <gxg-button\n slot=\"footer-end\"\n type=\"primary-text-only\"\n onClick={this.confirmCallbackHandler}\n >\n {this._componentLocale.footer.btnConfirm}\n </gxg-button>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\nexport type ConfirmCallback = (\n data: ModuleServerFullData\n) => Promise<EditServerModuleResult>;\nexport type CancelCallback = () => Promise<void>;\nexport type SelectSourceCallback = () => Promise<string | undefined>;\n"],"version":3}
1
+ {"file":"gx-ide-edit-module-server.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,k2ZAAk2Z;;MC0Bj3ZA,uBAAqB;;;;;;QAOxB,sBAAiB,GAAG,KAAK,CAAC;;;;;;;QAmF1B,2BAAsB,GAAG;YAC/B,IAAI,IAAI,CAAC,eAAe,EAAE;gBACxB,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CACpC,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC,YAAY,CACzC,CAAC;gBACF,IAAI,IAAI,GAAG,EAA0B,CAAC;gBACtC,IAAI,cAAc,CAAC,IAAI,KAAK,QAAQ,EAAE;oBACpC,IAAI,GAAG;wBACL,EAAE,EAAE,cAAc,CAAC,EAAE;wBACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;wBACvB,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;wBAC7B,aAAa,EAAE,cAAc,CAAC,aAAa;wBAC3C,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;wBAC3B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;wBACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK;qBAChC,CAAC;iBACH;qBAAM;oBACL,IAAI,GAAG;wBACL,EAAE,EAAE,cAAc,CAAC,EAAE;wBACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;wBACvB,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;wBAC7B,aAAa,EAAE,cAAc,CAAC,aAAa;wBAC3C,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;qBAC5B,CAAC;iBACH;gBACc,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI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IAAI,CAAC,0BAA0B,UAEvC,CACd,EACA,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,IAAI,CAAC,mBAAmB,EAAE,CACzD,EAEN,kBACE,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,IAAI,CAAC,qBAAqB,IAElC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAC5B,EACb,kBACE,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,mBAAmB,EACxB,OAAO,EAAE,IAAI,CAAC,sBAAsB,IAEnC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAC7B,CACI,CACf,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeEditModuleServer"],"sources":["src/components/modules/edit-module-server/edit-module-server.scss?tag=gx-ide-edit-module-server&encapsulation=shadow","src/components/modules/edit-module-server/edit-module-server.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-common.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n\n:host {\n display: block;\n}\n.module-servers-grid-local {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-columns: auto 1fr auto;\n\n *:nth-child(3) {\n align-self: end;\n }\n}\n.module-servers-grid-server {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-columns: auto 1fr;\n\n *:nth-child(3) {\n align-self: end;\n }\n}\n.module-servers-grid-column-1 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(3, 1fr);\n}\n\n.module-servers-grid-column-2 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(2, 1fr);\n}\n.grid-server-auth-column-1 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(2, 1fr);\n}\n\n.grid-server-auth-column-2 {\n gap: var(--spacing-comp-03);\n display: grid;\n grid-template-rows: repeat(2, 1fr);\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n State,\n EventEmitter\n} from \"@stencil/core\";\n\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\nimport { Locale } from \"../../../common/locale\";\nimport {\n ModuleServerType,\n ModuleServerFullData,\n EditServerModuleResult\n} from \"../types\";\n@Component({\n tag: \"gx-ide-edit-module-server\",\n styleUrl: \"edit-module-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/edit-module-server\"]\n})\nexport class GxIdeEditModuleServer {\n // 1.OWN PROPERTIES | WATCH'S //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeEditModuleServerElement;\n private serverTypeEl: HTMLGxgComboBoxElement;\n private nameEl: HTMLGxgFormTextElement;\n private sourceEl: HTMLGxgFormTextElement;\n private userEl: HTMLGxgFormTextElement;\n private passwordEl: HTMLGxgFormTextElement;\n\n // 3.STATE() VARIABLES //\n\n @State() selectedType: \"local\" | \"remote\" = \"local\";\n\n // 4.PUBLIC PROPERTY API //\n\n /**\n * The type of the server\n */\n @Prop() readonly types: ModuleServerType[];\n\n /**\n * The name of the server\n */\n @Prop() readonly name: string;\n\n /**\n * Disk path or server url\n */\n @Prop() readonly source: string;\n\n /**\n * Id of the currently selected server type\n */\n @Prop() readonly type: string;\n\n /**\n * Confirm callback\n */\n @Prop() readonly confirmCallback: ConfirmCallback;\n\n /**\n * Callback invoked when wants to select a local folder that have modules inside\n */\n @Prop() readonly selectSourceCallback: SelectSourceCallback;\n\n /**\n * Cancel callback\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n // 6.COMPONENT LIFECYCLE EVENTS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n /**\n * Executed when user click on confirm button\n */\n private confirmCallbackHandler = async () => {\n if (this.confirmCallback) {\n const selectedTypeId = this.types.find(\n ({ type }) => type === this.selectedType\n );\n let data = {} as ModuleServerFullData;\n if (selectedTypeId.type === \"remote\") {\n data = {\n id: selectedTypeId.id,\n name: this.nameEl.value,\n type: this.serverTypeEl.value,\n authenticated: selectedTypeId.authenticated,\n source: this.sourceEl.value,\n user: this.userEl.value,\n password: this.passwordEl.value\n };\n } else {\n data = {\n id: selectedTypeId.id,\n name: this.nameEl.value,\n type: this.serverTypeEl.value,\n authenticated: selectedTypeId.authenticated,\n source: this.sourceEl.value\n };\n }\n const result = await this.confirmCallback(data);\n if (result.success) {\n // display success message\n } else {\n // display error message\n }\n }\n };\n\n /**\n * Executed when user click on cancel button\n */\n private cancelCallbackHandler = async () => {\n await this.cancelCallback();\n };\n private selectSourceCallbackHandle = async () => {\n const path = await this.selectSourceCallback();\n\n if (path) {\n this.sourceEl.value = path;\n }\n };\n\n // 10.LOCAL METHODS //\n\n private renderServerOptions = (): Element[] => {\n return [\n <div class=\"grid-server-auth-column-1\">\n <gxg-label>{this._componentLocale.user}</gxg-label>\n <gxg-label>{this._componentLocale.password}</gxg-label>\n </div>,\n <div class=\"grid-server-auth-column-2\">\n <gxg-form-text\n placeholder={this._componentLocale.user}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.userEl = el as HTMLGxgFormTextElement)\n }\n part=\"user\"\n ></gxg-form-text>\n <gxg-form-text\n password\n placeholder={this._componentLocale.password}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.passwordEl = el as HTMLGxgFormTextElement)\n }\n part=\"password\"\n ></gxg-form-text>\n </div>\n ];\n };\n\n render() {\n return (\n <Host class=\"gx-ide-component\">\n <div class=\"gx-ide-main-wrapper gx-ide-overflow\">\n <gx-ide-container slimmerFooter>\n <div\n class={\n this.selectedType === \"local\"\n ? \"grid module-servers-grid-local\"\n : \"grid module-servers-grid-server\"\n }\n >\n <div class=\"module-servers-grid-column-1\">\n <gxg-label> {this._componentLocale.type}</gxg-label>\n <gxg-label> {this._componentLocale.name}</gxg-label>\n <gxg-label> {this._componentLocale.source}</gxg-label>\n </div>\n <div class=\"module-servers-grid-column-2\">\n <gxg-combo-box\n value={this.type}\n ref={(el: HTMLGxgComboBoxElement) =>\n (this.serverTypeEl = el as HTMLGxgComboBoxElement)\n }\n >\n {this.types?.map(type => (\n <gxg-combo-box-item\n value={type.id}\n onItemSelected={item =>\n (this.selectedType = item.detail.value)\n }\n >\n {type.type}\n </gxg-combo-box-item>\n ))}\n </gxg-combo-box>\n <gxg-form-text\n placeholder={this._componentLocale.name}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.nameEl = el as HTMLGxgFormTextElement)\n }\n value={this.name}\n part=\"name\"\n ></gxg-form-text>\n <gxg-form-text\n placeholder={this._componentLocale.source}\n ref={(el: HTMLGxgFormTextElement) =>\n (this.sourceEl = el as HTMLGxgFormTextElement)\n }\n value={this.source}\n part=\"source\"\n ></gxg-form-text>\n </div>\n {this.selectedType === \"local\" && (\n <gxg-button onClick={this.selectSourceCallbackHandle}>\n ...\n </gxg-button>\n )}\n {this.selectedType === \"remote\" && this.renderServerOptions()}\n </div>\n\n <gxg-button\n slot=\"footer-end\"\n type=\"outlined\"\n onClick={this.cancelCallbackHandler}\n >\n {this._componentLocale.footer.btnCancel}\n </gxg-button>\n <gxg-button\n slot=\"footer-end\"\n type=\"primary-text-only\"\n onClick={this.confirmCallbackHandler}\n >\n {this._componentLocale.footer.btnConfirm}\n </gxg-button>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\nexport type ConfirmCallback = (\n data: ModuleServerFullData\n) => Promise<EditServerModuleResult>;\nexport type CancelCallback = () => Promise<void>;\nexport type SelectSourceCallback = () => Promise<string | undefined>;\n"],"version":3}
@@ -78,18 +78,20 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
78
78
  });
79
79
  /** Handles drop event */
80
80
  _FileUploader_handleDrop.set(this, (e) => {
81
+ var _a;
81
82
  e.preventDefault();
82
83
  e.stopPropagation();
83
84
  this.isDragging = false;
84
85
  __classPrivateFieldSet(this, _FileUploader_dragCounter, 0, "f");
85
- const files = e.dataTransfer?.files;
86
+ const files = (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.files;
86
87
  if (files) {
87
88
  __classPrivateFieldGet(this, _FileUploader_handleFiles, "f").call(this, files);
88
89
  }
89
90
  });
90
91
  /** Triggers file input click */
91
92
  _FileUploader_handleFileSelect.set(this, () => {
92
- __classPrivateFieldGet(this, _FileUploader_fileInputEl, "f")?.click();
93
+ var _a;
94
+ (_a = __classPrivateFieldGet(this, _FileUploader_fileInputEl, "f")) === null || _a === void 0 ? void 0 : _a.click();
93
95
  });
94
96
  /** Handles file input change event */
95
97
  _FileUploader_handleFileInput.set(this, (e) => {
@@ -102,6 +104,7 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
102
104
  _FileUploader_handleFiles.set(this, (files) => {
103
105
  const validFiles = __classPrivateFieldGet(this, _FileUploader_instances, "m", _FileUploader_getValidFiles).call(this, files);
104
106
  validFiles.forEach(async (file) => {
107
+ var _a, _b;
105
108
  const id = __classPrivateFieldGet(this, _FileUploader_generateId, "f").call(this);
106
109
  const fileState = {
107
110
  id,
@@ -119,45 +122,29 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
119
122
  const uploadPromise = this.uploadFunction(file, progress => {
120
123
  const state = this.fileStates.get(id);
121
124
  if (state) {
122
- const updatedState = {
123
- ...state,
124
- progress: progress,
125
- pending: progress < 100
126
- };
125
+ const updatedState = Object.assign(Object.assign({}, state), { progress: progress, pending: progress < 100 });
127
126
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
128
127
  }
129
128
  });
130
129
  // Store the upload promise/object for potential cancellation
131
- const stateWithPromise = {
132
- ...this.fileStates.get(id),
133
- uploadPromise
134
- };
130
+ const stateWithPromise = Object.assign(Object.assign({}, this.fileStates.get(id)), { uploadPromise });
135
131
  this.fileStates = new Map(this.fileStates.set(id, stateWithPromise));
136
132
  const result = await uploadPromise;
137
133
  console.log("Upload result:", { id, result });
138
134
  const state = this.fileStates.get(id);
139
135
  if (state) {
140
136
  if (result.success && result.remoteId) {
141
- const updatedState = {
142
- ...state,
143
- remoteId: result.remoteId,
144
- pending: false,
145
- progress: 100
146
- };
137
+ const updatedState = Object.assign(Object.assign({}, state), { remoteId: result.remoteId, pending: false, progress: 100 });
147
138
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
148
139
  console.log("File uploaded successfully:", updatedState);
149
- await this.fileUploadedCallback?.({
140
+ await ((_a = this.fileUploadedCallback) === null || _a === void 0 ? void 0 : _a.call(this, {
150
141
  name: state.name,
151
142
  originalName: state.file.name,
152
143
  remoteId: result.remoteId
153
- });
144
+ }));
154
145
  }
155
146
  else {
156
- const updatedState = {
157
- ...state,
158
- error: result.errors?.upload || "Upload failed",
159
- pending: false
160
- };
147
+ const updatedState = Object.assign(Object.assign({}, state), { error: ((_b = result.errors) === null || _b === void 0 ? void 0 : _b.upload) || "Upload failed", pending: false });
161
148
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
162
149
  console.log("File upload failed:", updatedState);
163
150
  }
@@ -166,13 +153,9 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
166
153
  catch (error) {
167
154
  const state = this.fileStates.get(id);
168
155
  if (state) {
169
- const updatedState = {
170
- ...state,
171
- error: error instanceof Error
156
+ const updatedState = Object.assign(Object.assign({}, state), { error: error instanceof Error
172
157
  ? error.message
173
- : "Unknown error occurred",
174
- pending: false
175
- };
158
+ : "Unknown error occurred", pending: false });
176
159
  this.fileStates = new Map(this.fileStates.set(id, updatedState));
177
160
  console.log("File upload error:", updatedState);
178
161
  }
@@ -185,20 +168,18 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
185
168
  });
186
169
  /** Handles file name change */
187
170
  _FileUploader_handleNameChange.set(this, async (event) => {
171
+ var _a;
188
172
  const { id, name } = event.detail;
189
173
  const file = this.fileStates.get(id);
190
174
  if (file) {
191
- const updatedFile = {
192
- ...file,
193
- name: name.trim(),
194
- isEditing: false
195
- };
175
+ const updatedFile = Object.assign(Object.assign({}, file), { name: name.trim(), isEditing: false });
196
176
  this.fileStates = new Map(this.fileStates.set(id, updatedFile));
197
- await this.fileRenamedCallback?.({ fileId: id, newName: name.trim() });
177
+ await ((_a = this.fileRenamedCallback) === null || _a === void 0 ? void 0 : _a.call(this, { fileId: id, newName: name.trim() }));
198
178
  }
199
179
  });
200
180
  /** Handles individual file cancellation or deletion */
201
181
  _FileUploader_handleFileCancel.set(this, async (event) => {
182
+ var _a, _b, _c, _d;
202
183
  const id = event.detail;
203
184
  const state = this.fileStates.get(id);
204
185
  if (state) {
@@ -212,7 +193,7 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
212
193
  else if (this.cancelUploadFunction) {
213
194
  await this.cancelUploadFunction(id);
214
195
  }
215
- await this.uploadCancelledCallback?.(id);
196
+ await ((_a = this.uploadCancelledCallback) === null || _a === void 0 ? void 0 : _a.call(this, id));
216
197
  this.fileStates.delete(id);
217
198
  this.fileStates = new Map(this.fileStates);
218
199
  }
@@ -222,24 +203,25 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
222
203
  originalName: state.file.name,
223
204
  remoteId: state.remoteId
224
205
  };
225
- const shouldDelete = await this.onBeforeDelete?.(fileToDelete);
206
+ const shouldDelete = await ((_b = this.onBeforeDelete) === null || _b === void 0 ? void 0 : _b.call(this, fileToDelete));
226
207
  if (shouldDelete) {
227
- await this.fileDeletedCallback?.(fileToDelete);
208
+ await ((_c = this.fileDeletedCallback) === null || _c === void 0 ? void 0 : _c.call(this, fileToDelete));
228
209
  this.fileStates.delete(id);
229
210
  this.fileStates = new Map(this.fileStates);
230
211
  }
231
212
  }
232
213
  }
233
214
  catch (error) {
234
- await this.fileDeletionErrorCallback?.({
215
+ await ((_d = this.fileDeletionErrorCallback) === null || _d === void 0 ? void 0 : _d.call(this, {
235
216
  fileName: state.name,
236
217
  error: error instanceof Error ? error.message : "Unknown error occurred"
237
- });
218
+ }));
238
219
  }
239
220
  }
240
221
  });
241
222
  /** Handles dialog confirmation */
242
223
  _FileUploader_handleConfirm.set(this, async () => {
224
+ var _a;
243
225
  // Verificar si hay subidas en progreso
244
226
  const hasPendingUploads = Array.from(this.fileStates.values()).some(file => file.pending);
245
227
  if (hasPendingUploads) {
@@ -266,7 +248,7 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
266
248
  }));
267
249
  console.log("Files to be confirmed:", uploadedFiles);
268
250
  if (uploadedFiles.length > 0) {
269
- await this.dialogConfirmedCallback?.(uploadedFiles);
251
+ await ((_a = this.dialogConfirmedCallback) === null || _a === void 0 ? void 0 : _a.call(this, uploadedFiles));
270
252
  }
271
253
  // Clear file states
272
254
  this.fileStates.clear();
@@ -278,13 +260,14 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
278
260
  });
279
261
  /** Handles dialog cancellation */
280
262
  _FileUploader_handleCancel.set(this, async () => {
263
+ var _a, _b, _c;
281
264
  try {
282
265
  // Cancelamos todas las subidas en progreso
283
266
  for (const [id, state] of this.fileStates.entries()) {
284
267
  if (state.pending && this.cancelUploadFunction) {
285
268
  try {
286
269
  await this.cancelUploadFunction(id);
287
- await this.uploadCancelledCallback?.(id);
270
+ await ((_a = this.uploadCancelledCallback) === null || _a === void 0 ? void 0 : _a.call(this, id));
288
271
  }
289
272
  catch (error) {
290
273
  // Error handling for upload cancellation
@@ -297,12 +280,12 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
297
280
  if (__classPrivateFieldGet(this, _FileUploader_fileInputEl, "f")) {
298
281
  __classPrivateFieldGet(this, _FileUploader_fileInputEl, "f").value = "";
299
282
  }
300
- await this.dialogCanceledCallback?.();
283
+ await ((_b = this.dialogCanceledCallback) === null || _b === void 0 ? void 0 : _b.call(this));
301
284
  }
302
285
  catch (error) {
303
286
  this.fileStates.clear();
304
287
  this.fileStates = new Map();
305
- await this.dialogCanceledCallback?.();
288
+ await ((_c = this.dialogCanceledCallback) === null || _c === void 0 ? void 0 : _c.call(this));
306
289
  }
307
290
  });
308
291
  this.types = [];
@@ -329,11 +312,12 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
329
312
  }
330
313
  /** Clears the current file selection */
331
314
  async clear() {
315
+ var _a;
332
316
  for (const [id, state] of this.fileStates.entries()) {
333
317
  if (state.pending && this.cancelUploadFunction) {
334
318
  try {
335
319
  await this.cancelUploadFunction(id);
336
- await this.uploadCancelledCallback?.(id);
320
+ await ((_a = this.uploadCancelledCallback) === null || _a === void 0 ? void 0 : _a.call(this, id));
337
321
  }
338
322
  catch (error) {
339
323
  // Error handling for upload cancellation
@@ -343,20 +327,19 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
343
327
  this.fileStates.clear();
344
328
  }
345
329
  render() {
346
- return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("input", { type: "file", class: "hidden-input", multiple: this.multiple, accept: this.types
347
- ?.map(type => (type.startsWith(".") ? type : `.${type}`))
348
- .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: {
330
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
331
+ 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: {
349
332
  "file-uploader__drop-zone": true,
350
333
  "file-uploader__drop-zone--dragging": this.isDragging
351
334
  }, 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
352
- ? __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.header.uploadButtonMultiple
353
- : __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.header.uploadButtonSingle)), h("div", { class: "text-container" }, h("div", { class: "label-primary-row" }, h("label", { class: "label" }, this.label || __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.header.orText), h("label", { class: "label" }, __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.header.dragAndDrop)), h("span", { class: "caption" }, this.types && this.types.length > 0
354
- ? __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.header.acceptedFiles.replace("{0}", this.types.join(", "))
355
- : __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.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 ||
356
- __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.fileList.attachedFiles), h("span", { class: "caption" }, __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.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
357
- ? __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.header.uploadButtonMultiple
358
- : __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.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") }, __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.buttons.cancel), h("button", { class: "button-primary", type: "button", onClick: __classPrivateFieldGet(this, _FileUploader_handleConfirm, "f"), disabled: this.fileStates.size === 0 ||
359
- Array.from(this.fileStates.values()).some(file => file.pending) }, __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.buttons.confirm))))));
335
+ ? (_b = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _b === void 0 ? void 0 : _b.header.uploadButtonMultiple
336
+ : (_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
337
+ ? (_f = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _f === void 0 ? void 0 : _f.header.acceptedFiles.replace("{0}", this.types.join(", "))
338
+ : (_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 ||
339
+ ((_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
340
+ ? (_k = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _k === void 0 ? void 0 : _k.header.uploadButtonMultiple
341
+ : (_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 ||
342
+ Array.from(this.fileStates.values()).some(file => file.pending) }, (_o = __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")) === null || _o === void 0 ? void 0 : _o.buttons.confirm))))));
360
343
  }
361
344
  static get assetsDirs() { return ["gx-ide-assets/file-uploader"]; }
362
345
  get el() { return this; }
@@ -382,6 +365,7 @@ const FileUploader = /*@__PURE__*/ proxyCustomElement(class FileUploader extends
382
365
  "clear": [64]
383
366
  }]);
384
367
  _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) {
368
+ var _a, _b;
385
369
  // If no types specified, accept any file
386
370
  if (!this.types || this.types.length === 0) {
387
371
  return { isValid: true };
@@ -407,17 +391,18 @@ _FileUploader__componentLocale = new WeakMap(), _FileUploader_fileInputEl = new
407
391
  }
408
392
  return {
409
393
  isValid: false,
410
- error: __classPrivateFieldGet(this, _FileUploader__componentLocale, "f")?.errors?.invalidFileType || "Invalid file type"
394
+ 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"
411
395
  };
412
396
  }, _FileUploader_getValidFiles = function _FileUploader_getValidFiles(files) {
413
397
  const validFiles = [];
414
398
  Array.from(files).forEach(file => {
399
+ var _a;
415
400
  const validation = __classPrivateFieldGet(this, _FileUploader_instances, "m", _FileUploader_isValidFile).call(this, file);
416
401
  if (validation.isValid) {
417
402
  validFiles.push(file);
418
403
  }
419
404
  else {
420
- this.fileValidationErrorCallback?.({
405
+ (_a = this.fileValidationErrorCallback) === null || _a === void 0 ? void 0 : _a.call(this, {
421
406
  fileName: file.name,
422
407
  error: validation.error
423
408
  });
@@ -1 +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,oCAAe,CAAC,EAAC;;QAQjB,mCAAc;YACZ,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAA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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,uBAAA,IAAI,sCAAkB,EAAE,MAAM,EAAE,eAAe,IAAI,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,IAAI,CAAC,2BAA2B,GAAG;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}
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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,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;gBAClC,OAAO,EAAE,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}