@genexus/genexus-ide-ui 1.1.23 → 1.1.24

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 (330) hide show
  1. package/dist/cjs/MERCURY_ASSETS-f14e91ff.js +9 -0
  2. package/dist/cjs/{MERCURY_ASSETS-15c5c1ac.js.map → MERCURY_ASSETS-f14e91ff.js.map} +1 -1
  3. package/dist/cjs/gx-ide-about.cjs.entry.js +1 -1
  4. package/dist/cjs/gx-ide-about.cjs.entry.js.map +1 -1
  5. package/dist/cjs/gx-ide-ai-message.cjs.entry.js +1 -1
  6. package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js +1 -1
  7. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js +1 -1
  8. package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gx-ide-bpm-import-gxpm.cjs.entry.js +1 -1
  10. package/dist/cjs/gx-ide-bpm-import-gxpm.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js +1 -1
  12. package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js.map +1 -1
  13. package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js +5 -5
  14. package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js.map +1 -1
  15. package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js +2 -2
  16. package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js.map +1 -1
  17. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +2 -2
  18. package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js.map +1 -1
  19. package/dist/cjs/gx-ide-current-user-info.cjs.entry.js +1 -1
  20. package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js +1 -1
  21. package/dist/cjs/gx-ide-data-selector.cjs.entry.js +1 -1
  22. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js +1 -1
  23. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js.map +1 -1
  24. package/dist/cjs/gx-ide-design-import.cjs.entry.js +1 -1
  25. package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +1 -1
  26. package/dist/cjs/gx-ide-file-item.cjs.entry.js +1 -1
  27. package/dist/cjs/gx-ide-file-uploader.cjs.entry.js +1 -1
  28. package/dist/cjs/gx-ide-json-import.cjs.entry.js +1 -1
  29. package/dist/cjs/gx-ide-json-import.cjs.entry.js.map +1 -1
  30. package/dist/cjs/gx-ide-kb-manager-export.cjs.entry.js +1 -1
  31. package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +2 -2
  32. package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js.map +1 -1
  33. package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js +1 -1
  34. package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +1 -1
  35. package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
  36. package/dist/cjs/gx-ide-object-selector.cjs.entry.js +1 -1
  37. package/dist/cjs/gx-ide-open-api-import.cjs.entry.js +2 -2
  38. package/dist/cjs/gx-ide-open-api-import.cjs.entry.js.map +1 -1
  39. package/dist/cjs/gx-ide-plugin-details.cjs.entry.js +2 -2
  40. package/dist/cjs/gx-ide-plugin-details.cjs.entry.js.map +1 -1
  41. package/dist/cjs/gx-ide-plugin-explorer.cjs.entry.js +1 -1
  42. package/dist/cjs/gx-ide-references.cjs.entry.js +2 -2
  43. package/dist/cjs/gx-ide-references.cjs.entry.js.map +1 -1
  44. package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js +144 -112
  45. package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js.map +1 -1
  46. package/dist/cjs/gx-ide-select-kb-items.cjs.entry.js +1 -1
  47. package/dist/cjs/gx-ide-share-kb.cjs.entry.js +2 -2
  48. package/dist/cjs/gx-ide-share-kb.cjs.entry.js.map +1 -1
  49. package/dist/cjs/gx-ide-splash.cjs.entry.js +1 -1
  50. package/dist/cjs/gx-ide-start-page.cjs.entry.js +1 -1
  51. package/dist/cjs/gx-ide-team-dev-bring-changes.cjs.entry.js +3 -3
  52. package/dist/cjs/gx-ide-team-dev-bring-changes.cjs.entry.js.map +1 -1
  53. package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +2 -2
  54. package/dist/cjs/gx-ide-team-dev-history.cjs.entry.js +2 -2
  55. package/dist/cjs/gx-ide-test.cjs.entry.js +1 -1
  56. package/dist/cjs/gx-ide-test.cjs.entry.js.map +1 -1
  57. package/dist/cjs/gx-ide-welcome-page.cjs.entry.js +1 -1
  58. package/dist/cjs/gx-ide-ww-attributes.cjs.entry.js +1 -1
  59. package/dist/cjs/index.cjs.js +2 -5
  60. package/dist/cjs/index.cjs.js.map +1 -1
  61. package/dist/cjs/render-item.lit-3f18e009.js +329 -0
  62. package/dist/cjs/render-item.lit-3f18e009.js.map +1 -0
  63. package/dist/cjs/{utilities-6118dc24.js → utilities-0b308992.js} +2 -2
  64. package/dist/cjs/{utilities-6118dc24.js.map → utilities-0b308992.js.map} +1 -1
  65. package/dist/collection/components/_test/test.js +1 -1
  66. package/dist/collection/components/_test/test.js.map +1 -1
  67. package/dist/collection/components/about/about.css +1 -0
  68. package/dist/collection/components/bpm/import-files/bpm-import-files.js +1 -1
  69. package/dist/collection/components/bpm/import-files/bpm-import-files.js.map +1 -1
  70. package/dist/collection/components/bpm/import-gxpm/bpm-import-gxpm.js +1 -1
  71. package/dist/collection/components/bpm/import-gxpm/bpm-import-gxpm.js.map +1 -1
  72. package/dist/collection/components/bpm/objects-selector/bpm-objects-selector.js +1 -1
  73. package/dist/collection/components/bpm/objects-selector/bpm-objects-selector.js.map +1 -1
  74. package/dist/collection/components/bpm/task-documents/task-documents.js +4 -4
  75. package/dist/collection/components/bpm/task-documents/task-documents.js.map +1 -1
  76. package/dist/collection/components/chat/chat-container/chat-container.css +0 -5
  77. package/dist/collection/components/chat/lit-custom-render/actions.lit.js +27 -0
  78. package/dist/collection/components/chat/lit-custom-render/actions.lit.js.map +1 -0
  79. package/dist/collection/components/chat/lit-custom-render/code-block.lit.js +46 -0
  80. package/dist/collection/components/chat/lit-custom-render/code-block.lit.js.map +1 -0
  81. package/dist/collection/components/chat/lit-custom-render/dots-animation.js +61 -0
  82. package/dist/collection/components/chat/lit-custom-render/dots-animation.js.map +1 -0
  83. package/dist/collection/components/chat/lit-custom-render/render-item.lit.js +122 -0
  84. package/dist/collection/components/chat/lit-custom-render/render-item.lit.js.map +1 -0
  85. package/dist/collection/components/chat/lit-custom-render/spinner-animation.js +58 -0
  86. package/dist/collection/components/chat/lit-custom-render/spinner-animation.js.map +1 -0
  87. package/dist/collection/components/chat/lit-custom-render/types.js +2 -0
  88. package/dist/collection/components/chat/lit-custom-render/types.js.map +1 -0
  89. package/dist/collection/components/chat/lit-custom-render/utils.js +50 -0
  90. package/dist/collection/components/chat/lit-custom-render/utils.js.map +1 -0
  91. package/dist/collection/components/data-type-selector/data-type-selector.js.map +1 -1
  92. package/dist/collection/components/json-import/json-import.js.map +1 -1
  93. package/dist/collection/components/kb-manager-import/kb-manager-import.js +2 -2
  94. package/dist/collection/components/kb-manager-import/kb-manager-import.js.map +1 -1
  95. package/dist/collection/components/open-api-import/open-api-import.js +1 -1
  96. package/dist/collection/components/open-api-import/open-api-import.js.map +1 -1
  97. package/dist/collection/components/plugin-details/plugin-details.js +1 -1
  98. package/dist/collection/components/plugin-details/plugin-details.js.map +1 -1
  99. package/dist/collection/components/references/references.js +1 -1
  100. package/dist/collection/components/references/references.js.map +1 -1
  101. package/dist/collection/components/team-dev/bring-changes/bring-changes.js +1 -1
  102. package/dist/collection/components/team-dev/bring-changes/bring-changes.js.map +1 -1
  103. package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js +1 -1
  104. package/dist/collection/components/team-dev/create-kb-from-server/create-kb-from-server.js.map +1 -1
  105. package/dist/collection/components/team-dev/share-kb/share-kb.js +1 -1
  106. package/dist/collection/components/team-dev/share-kb/share-kb.js.map +1 -1
  107. package/dist/collection/components/team-dev/update/update.js +1 -1
  108. package/dist/collection/index.js +2 -1
  109. package/dist/collection/index.js.map +1 -1
  110. package/dist/collection/showcase/chat-container/callbacks.js +44 -187
  111. package/dist/collection/showcase/chat-container/callbacks.js.map +1 -1
  112. package/dist/collection/showcase/chat-container/chat.showcase.js +7 -6
  113. package/dist/collection/showcase/chat-container/chat.showcase.js.map +1 -1
  114. package/dist/collection/showcase/chat-container/models.js +321 -0
  115. package/dist/collection/showcase/chat-container/models.js.map +1 -0
  116. package/dist/components/MERCURY_ASSETS.js +1 -1
  117. package/dist/components/MERCURY_ASSETS.js.map +1 -1
  118. package/dist/components/bpm-objects-selector.js +1 -1
  119. package/dist/components/bpm-objects-selector.js.map +1 -1
  120. package/dist/components/chat-container.js +1 -1
  121. package/dist/components/chat-container.js.map +1 -1
  122. package/dist/components/gx-ide-about.js +1 -1
  123. package/dist/components/gx-ide-about.js.map +1 -1
  124. package/dist/components/gx-ide-bpm-import-files.js +1 -1
  125. package/dist/components/gx-ide-bpm-import-files.js.map +1 -1
  126. package/dist/components/gx-ide-bpm-import-gxpm.js +1 -1
  127. package/dist/components/gx-ide-bpm-import-gxpm.js.map +1 -1
  128. package/dist/components/gx-ide-bpm-task-documents.js +4 -4
  129. package/dist/components/gx-ide-bpm-task-documents.js.map +1 -1
  130. package/dist/components/gx-ide-create-kb-from-server.js +1 -1
  131. package/dist/components/gx-ide-create-kb-from-server.js.map +1 -1
  132. package/dist/components/gx-ide-data-type-selector.js.map +1 -1
  133. package/dist/components/gx-ide-json-import.js.map +1 -1
  134. package/dist/components/gx-ide-kb-manager-import.js +1 -1
  135. package/dist/components/gx-ide-kb-manager-import.js.map +1 -1
  136. package/dist/components/gx-ide-open-api-import.js +1 -1
  137. package/dist/components/gx-ide-open-api-import.js.map +1 -1
  138. package/dist/components/gx-ide-plugin-details.js +1 -1
  139. package/dist/components/gx-ide-plugin-details.js.map +1 -1
  140. package/dist/components/gx-ide-references.js +1 -1
  141. package/dist/components/gx-ide-references.js.map +1 -1
  142. package/dist/components/gx-ide-sc-chat-container.js +145 -112
  143. package/dist/components/gx-ide-sc-chat-container.js.map +1 -1
  144. package/dist/components/gx-ide-share-kb.js +1 -1
  145. package/dist/components/gx-ide-share-kb.js.map +1 -1
  146. package/dist/components/gx-ide-team-dev-bring-changes.js +1 -1
  147. package/dist/components/gx-ide-team-dev-bring-changes.js.map +1 -1
  148. package/dist/components/gx-ide-test.js +1 -1
  149. package/dist/components/gx-ide-test.js.map +1 -1
  150. package/dist/components/index.js +1 -1
  151. package/dist/components/index.js.map +1 -1
  152. package/dist/components/render-item.lit.js +327 -0
  153. package/dist/components/render-item.lit.js.map +1 -0
  154. package/dist/esm/MERCURY_ASSETS-ccf43ae3.js +7 -0
  155. package/dist/esm/{MERCURY_ASSETS-7c06e424.js.map → MERCURY_ASSETS-ccf43ae3.js.map} +1 -1
  156. package/dist/esm/gx-ide-about.entry.js +1 -1
  157. package/dist/esm/gx-ide-about.entry.js.map +1 -1
  158. package/dist/esm/gx-ide-ai-message.entry.js +1 -1
  159. package/dist/esm/gx-ide-bpm-app-declaration.entry.js +1 -1
  160. package/dist/esm/gx-ide-bpm-import-files.entry.js +1 -1
  161. package/dist/esm/gx-ide-bpm-import-files.entry.js.map +1 -1
  162. package/dist/esm/gx-ide-bpm-import-gxpm.entry.js +1 -1
  163. package/dist/esm/gx-ide-bpm-import-gxpm.entry.js.map +1 -1
  164. package/dist/esm/gx-ide-bpm-objects-selector.entry.js +1 -1
  165. package/dist/esm/gx-ide-bpm-objects-selector.entry.js.map +1 -1
  166. package/dist/esm/gx-ide-bpm-task-documents.entry.js +5 -5
  167. package/dist/esm/gx-ide-bpm-task-documents.entry.js.map +1 -1
  168. package/dist/esm/gx-ide-chat-container_2.entry.js +2 -2
  169. package/dist/esm/gx-ide-chat-container_2.entry.js.map +1 -1
  170. package/dist/esm/gx-ide-create-kb-from-server.entry.js +2 -2
  171. package/dist/esm/gx-ide-create-kb-from-server.entry.js.map +1 -1
  172. package/dist/esm/gx-ide-current-user-info.entry.js +1 -1
  173. package/dist/esm/gx-ide-dashboard-home.entry.js +1 -1
  174. package/dist/esm/gx-ide-data-selector.entry.js +1 -1
  175. package/dist/esm/gx-ide-data-type-selector.entry.js +1 -1
  176. package/dist/esm/gx-ide-data-type-selector.entry.js.map +1 -1
  177. package/dist/esm/gx-ide-design-import.entry.js +1 -1
  178. package/dist/esm/gx-ide-entity-selector.entry.js +1 -1
  179. package/dist/esm/gx-ide-file-item.entry.js +1 -1
  180. package/dist/esm/gx-ide-file-uploader.entry.js +1 -1
  181. package/dist/esm/gx-ide-json-import.entry.js +1 -1
  182. package/dist/esm/gx-ide-json-import.entry.js.map +1 -1
  183. package/dist/esm/gx-ide-kb-manager-export.entry.js +1 -1
  184. package/dist/esm/gx-ide-kb-manager-import.entry.js +2 -2
  185. package/dist/esm/gx-ide-kb-manager-import.entry.js.map +1 -1
  186. package/dist/esm/gx-ide-manage-module-references-v2.entry.js +1 -1
  187. package/dist/esm/gx-ide-manage-module-references.entry.js +1 -1
  188. package/dist/esm/gx-ide-new-kb.entry.js +1 -1
  189. package/dist/esm/gx-ide-object-selector.entry.js +1 -1
  190. package/dist/esm/gx-ide-open-api-import.entry.js +2 -2
  191. package/dist/esm/gx-ide-open-api-import.entry.js.map +1 -1
  192. package/dist/esm/gx-ide-plugin-details.entry.js +2 -2
  193. package/dist/esm/gx-ide-plugin-details.entry.js.map +1 -1
  194. package/dist/esm/gx-ide-plugin-explorer.entry.js +1 -1
  195. package/dist/esm/gx-ide-references.entry.js +2 -2
  196. package/dist/esm/gx-ide-references.entry.js.map +1 -1
  197. package/dist/esm/gx-ide-sc-chat-container.entry.js +145 -113
  198. package/dist/esm/gx-ide-sc-chat-container.entry.js.map +1 -1
  199. package/dist/esm/gx-ide-select-kb-items.entry.js +1 -1
  200. package/dist/esm/gx-ide-share-kb.entry.js +2 -2
  201. package/dist/esm/gx-ide-share-kb.entry.js.map +1 -1
  202. package/dist/esm/gx-ide-splash.entry.js +1 -1
  203. package/dist/esm/gx-ide-start-page.entry.js +1 -1
  204. package/dist/esm/gx-ide-team-dev-bring-changes.entry.js +3 -3
  205. package/dist/esm/gx-ide-team-dev-bring-changes.entry.js.map +1 -1
  206. package/dist/esm/gx-ide-team-dev-commit.entry.js +2 -2
  207. package/dist/esm/gx-ide-team-dev-history.entry.js +2 -2
  208. package/dist/esm/gx-ide-test.entry.js +1 -1
  209. package/dist/esm/gx-ide-test.entry.js.map +1 -1
  210. package/dist/esm/gx-ide-welcome-page.entry.js +1 -1
  211. package/dist/esm/gx-ide-ww-attributes.entry.js +1 -1
  212. package/dist/esm/index.js +1 -3
  213. package/dist/esm/index.js.map +1 -1
  214. package/dist/esm/render-item.lit-449f2946.js +327 -0
  215. package/dist/esm/render-item.lit-449f2946.js.map +1 -0
  216. package/dist/esm/{utilities-6fdb43e4.js → utilities-00ec1b22.js} +2 -2
  217. package/dist/esm/{utilities-6fdb43e4.js.map → utilities-00ec1b22.js.map} +1 -1
  218. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  219. package/dist/genexus-ide-ui/index.esm.js +1 -5
  220. package/dist/genexus-ide-ui/index.esm.js.map +1 -1
  221. package/dist/genexus-ide-ui/p-04c6bd23.entry.js.map +1 -1
  222. package/dist/genexus-ide-ui/{p-476b74a1.entry.js → p-05f1ff03.entry.js} +2 -2
  223. package/dist/genexus-ide-ui/p-05f1ff03.entry.js.map +1 -0
  224. package/dist/genexus-ide-ui/{p-863ef4de.entry.js → p-0937c905.entry.js} +2 -2
  225. package/dist/genexus-ide-ui/{p-0cd3ab87.entry.js → p-0a0ab008.entry.js} +3 -3
  226. package/dist/genexus-ide-ui/p-0a0ab008.entry.js.map +1 -0
  227. package/dist/genexus-ide-ui/{p-1292a6b9.entry.js → p-1664d366.entry.js} +2 -2
  228. package/dist/genexus-ide-ui/{p-1292a6b9.entry.js.map → p-1664d366.entry.js.map} +1 -1
  229. package/dist/genexus-ide-ui/{p-884e0ed9.entry.js → p-2ad98d24.entry.js} +3 -3
  230. package/dist/genexus-ide-ui/{p-884e0ed9.entry.js.map → p-2ad98d24.entry.js.map} +1 -1
  231. package/dist/genexus-ide-ui/{p-d4ef0c35.entry.js → p-2d04b927.entry.js} +3 -3
  232. package/dist/genexus-ide-ui/{p-8bb9242a.entry.js → p-36c7a87b.entry.js} +2 -2
  233. package/dist/genexus-ide-ui/p-36c7a87b.entry.js.map +1 -0
  234. package/dist/genexus-ide-ui/{p-ca706700.entry.js → p-3dbd3842.entry.js} +3 -3
  235. package/dist/genexus-ide-ui/{p-2987a259.js → p-401bfc97.js} +4430 -4318
  236. package/dist/genexus-ide-ui/p-401bfc97.js.map +1 -0
  237. package/dist/genexus-ide-ui/p-46ffec64.entry.js.map +1 -1
  238. package/dist/genexus-ide-ui/{p-45539ad0.entry.js → p-494b3955.entry.js} +2 -2
  239. package/dist/genexus-ide-ui/{p-45539ad0.entry.js.map → p-494b3955.entry.js.map} +1 -1
  240. package/dist/genexus-ide-ui/{p-d77582b8.entry.js → p-4ad7826c.entry.js} +2 -2
  241. package/dist/genexus-ide-ui/{p-72b5d3e4.entry.js → p-4bb2c398.entry.js} +2 -2
  242. package/dist/genexus-ide-ui/{p-810ad95f.entry.js → p-538594e2.entry.js} +2 -2
  243. package/dist/genexus-ide-ui/{p-641c79a9.entry.js → p-5e7f8ae6.entry.js} +2 -2
  244. package/dist/genexus-ide-ui/{p-c50b9883.entry.js → p-5ff6fe1d.entry.js} +2 -2
  245. package/dist/genexus-ide-ui/{p-c50b9883.entry.js.map → p-5ff6fe1d.entry.js.map} +1 -1
  246. package/dist/genexus-ide-ui/{p-7ae2a57f.entry.js → p-6e958b79.entry.js} +2 -2
  247. package/dist/genexus-ide-ui/{p-4e6425f3.entry.js → p-731b8947.entry.js} +183 -142
  248. package/dist/genexus-ide-ui/p-731b8947.entry.js.map +1 -0
  249. package/dist/genexus-ide-ui/{p-012cfb1d.entry.js → p-75d6c740.entry.js} +2 -2
  250. package/dist/genexus-ide-ui/{p-7d7cf30d.entry.js → p-8714eeb1.entry.js} +2 -2
  251. package/dist/genexus-ide-ui/{p-ca9978e1.entry.js → p-88581fe4.entry.js} +2 -2
  252. package/dist/genexus-ide-ui/{p-1be1db4e.entry.js → p-8e34e92b.entry.js} +2 -2
  253. package/dist/genexus-ide-ui/p-8e34e92b.entry.js.map +1 -0
  254. package/dist/genexus-ide-ui/{p-ea02e5cf.entry.js → p-960d9108.entry.js} +2 -2
  255. package/dist/genexus-ide-ui/{p-ea02e5cf.entry.js.map → p-960d9108.entry.js.map} +1 -1
  256. package/dist/genexus-ide-ui/{p-7053c38e.entry.js → p-9d985956.entry.js} +11 -11
  257. package/dist/genexus-ide-ui/{p-7f65f9e3.entry.js → p-a708a870.entry.js} +2 -2
  258. package/dist/genexus-ide-ui/{p-c92332af.entry.js → p-b0aa8cdb.entry.js} +2 -2
  259. package/dist/genexus-ide-ui/{p-93cdb6f8.entry.js → p-bfe3277f.entry.js} +2 -2
  260. package/dist/genexus-ide-ui/{p-760d8f2a.entry.js → p-c3abc0f5.entry.js} +2 -2
  261. package/dist/genexus-ide-ui/{p-760d8f2a.entry.js.map → p-c3abc0f5.entry.js.map} +1 -1
  262. package/dist/genexus-ide-ui/{p-52f37ec7.entry.js → p-caa5ee2f.entry.js} +8 -8
  263. package/dist/genexus-ide-ui/{p-a869ec48.entry.js → p-d4ca8530.entry.js} +2 -2
  264. package/dist/genexus-ide-ui/{p-0f8a8202.js → p-d7a91333.js} +2 -2
  265. package/dist/genexus-ide-ui/p-d8379699.entry.js.map +1 -1
  266. package/dist/genexus-ide-ui/{p-c9bca7c0.entry.js → p-dce532ea.entry.js} +2 -2
  267. package/dist/genexus-ide-ui/{p-bbb5b0fb.entry.js → p-e02e3694.entry.js} +2 -2
  268. package/dist/genexus-ide-ui/{p-75c1634c.entry.js → p-e162771e.entry.js} +2 -2
  269. package/dist/genexus-ide-ui/{p-75c1634c.entry.js.map → p-e162771e.entry.js.map} +1 -1
  270. package/dist/genexus-ide-ui/p-e24902a0.entry.js.map +1 -1
  271. package/dist/genexus-ide-ui/{p-7d107d2f.entry.js → p-f3f068f6.entry.js} +2 -2
  272. package/dist/genexus-ide-ui/{p-fd440291.entry.js → p-f4a60017.entry.js} +2 -2
  273. package/dist/genexus-ide-ui/{p-7cece7a8.entry.js → p-f52ea9d4.entry.js} +2 -2
  274. package/dist/genexus-ide-ui/{p-7cece7a8.entry.js.map → p-f52ea9d4.entry.js.map} +1 -1
  275. package/dist/genexus-ide-ui/{p-54fb1287.entry.js → p-f83ceb69.entry.js} +2 -2
  276. package/dist/genexus-ide-ui/p-fd4f9904.js +955 -0
  277. package/dist/genexus-ide-ui/p-fd4f9904.js.map +1 -0
  278. package/dist/types/components/chat/lit-custom-render/actions.lit.d.ts +2 -0
  279. package/dist/types/components/chat/lit-custom-render/code-block.lit.d.ts +2 -0
  280. package/dist/types/components/chat/lit-custom-render/dots-animation.d.ts +5 -0
  281. package/dist/types/components/chat/lit-custom-render/render-item.lit.d.ts +3 -0
  282. package/dist/types/components/chat/lit-custom-render/spinner-animation.d.ts +5 -0
  283. package/dist/types/components/chat/lit-custom-render/types.d.ts +4 -0
  284. package/dist/types/components/chat/lit-custom-render/utils.d.ts +23 -0
  285. package/dist/types/index.d.ts +2 -1
  286. package/dist/types/showcase/chat-container/callbacks.d.ts +2 -5
  287. package/dist/types/showcase/chat-container/models.d.ts +15 -0
  288. package/package.json +8 -7
  289. package/dist/cjs/MERCURY_ASSETS-15c5c1ac.js +0 -9
  290. package/dist/cjs/code-render-2af31443.js +0 -86
  291. package/dist/cjs/code-render-2af31443.js.map +0 -1
  292. package/dist/collection/components/chat/code-render.js +0 -65
  293. package/dist/collection/components/chat/code-render.js.map +0 -1
  294. package/dist/components/code-render.js +0 -83
  295. package/dist/components/code-render.js.map +0 -1
  296. package/dist/esm/MERCURY_ASSETS-7c06e424.js +0 -7
  297. package/dist/esm/code-render-e6bf0562.js +0 -83
  298. package/dist/esm/code-render-e6bf0562.js.map +0 -1
  299. package/dist/genexus-ide-ui/p-0cd3ab87.entry.js.map +0 -1
  300. package/dist/genexus-ide-ui/p-1be1db4e.entry.js.map +0 -1
  301. package/dist/genexus-ide-ui/p-2987a259.js.map +0 -1
  302. package/dist/genexus-ide-ui/p-476b74a1.entry.js.map +0 -1
  303. package/dist/genexus-ide-ui/p-4e6425f3.entry.js.map +0 -1
  304. package/dist/genexus-ide-ui/p-60221a44.js +0 -109
  305. package/dist/genexus-ide-ui/p-60221a44.js.map +0 -1
  306. package/dist/genexus-ide-ui/p-8bb9242a.entry.js.map +0 -1
  307. package/dist/types/components/chat/code-render.d.ts +0 -4
  308. /package/dist/genexus-ide-ui/{p-863ef4de.entry.js.map → p-0937c905.entry.js.map} +0 -0
  309. /package/dist/genexus-ide-ui/{p-d4ef0c35.entry.js.map → p-2d04b927.entry.js.map} +0 -0
  310. /package/dist/genexus-ide-ui/{p-ca706700.entry.js.map → p-3dbd3842.entry.js.map} +0 -0
  311. /package/dist/genexus-ide-ui/{p-d77582b8.entry.js.map → p-4ad7826c.entry.js.map} +0 -0
  312. /package/dist/genexus-ide-ui/{p-72b5d3e4.entry.js.map → p-4bb2c398.entry.js.map} +0 -0
  313. /package/dist/genexus-ide-ui/{p-810ad95f.entry.js.map → p-538594e2.entry.js.map} +0 -0
  314. /package/dist/genexus-ide-ui/{p-641c79a9.entry.js.map → p-5e7f8ae6.entry.js.map} +0 -0
  315. /package/dist/genexus-ide-ui/{p-7ae2a57f.entry.js.map → p-6e958b79.entry.js.map} +0 -0
  316. /package/dist/genexus-ide-ui/{p-012cfb1d.entry.js.map → p-75d6c740.entry.js.map} +0 -0
  317. /package/dist/genexus-ide-ui/{p-7d7cf30d.entry.js.map → p-8714eeb1.entry.js.map} +0 -0
  318. /package/dist/genexus-ide-ui/{p-ca9978e1.entry.js.map → p-88581fe4.entry.js.map} +0 -0
  319. /package/dist/genexus-ide-ui/{p-7053c38e.entry.js.map → p-9d985956.entry.js.map} +0 -0
  320. /package/dist/genexus-ide-ui/{p-7f65f9e3.entry.js.map → p-a708a870.entry.js.map} +0 -0
  321. /package/dist/genexus-ide-ui/{p-c92332af.entry.js.map → p-b0aa8cdb.entry.js.map} +0 -0
  322. /package/dist/genexus-ide-ui/{p-93cdb6f8.entry.js.map → p-bfe3277f.entry.js.map} +0 -0
  323. /package/dist/genexus-ide-ui/{p-52f37ec7.entry.js.map → p-caa5ee2f.entry.js.map} +0 -0
  324. /package/dist/genexus-ide-ui/{p-a869ec48.entry.js.map → p-d4ca8530.entry.js.map} +0 -0
  325. /package/dist/genexus-ide-ui/{p-0f8a8202.js.map → p-d7a91333.js.map} +0 -0
  326. /package/dist/genexus-ide-ui/{p-c9bca7c0.entry.js.map → p-dce532ea.entry.js.map} +0 -0
  327. /package/dist/genexus-ide-ui/{p-bbb5b0fb.entry.js.map → p-e02e3694.entry.js.map} +0 -0
  328. /package/dist/genexus-ide-ui/{p-7d107d2f.entry.js.map → p-f3f068f6.entry.js.map} +0 -0
  329. /package/dist/genexus-ide-ui/{p-fd440291.entry.js.map → p-f4a60017.entry.js.map} +0 -0
  330. /package/dist/genexus-ide-ui/{p-54fb1287.entry.js.map → p-f83ceb69.entry.js.map} +0 -0
@@ -1,9 +1,11 @@
1
- import { g as getAssetPath, r as registerInstance, h, H as Host } from './index-10af18cf.js';
2
- import { m as mercuryChatMessageRender } from './code-render-e6bf0562.js';
3
- import './common-c25d8c2f.js';
1
+ import { r as registerInstance, h, H as Host } from './index-10af18cf.js';
2
+ import { r as renderItemMercury } from './render-item.lit-449f2946.js';
4
3
 
5
- const PROCESSING_PLACEHOLDER = "{{ASSISTANT_NAME}}";
6
- let timeOut;
4
+ const ASSISTANT_RESPONSE_SHORT_MARKDOWN = '\n### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\n\n```json\n{\n "firstName": "John",\n "lastName": "Smith",\n "age": 25\n}';
5
+ const ASSISTANT_NAME = "Nexa";
6
+ // - - - - - - - - - - - - - -
7
+ // Other messages
8
+ // - - - - - - - - - - - - - -
7
9
  const ASSISTANT_RESPONSE_MARKDOWN = `
8
10
  ###### Code block {#code-block}
9
11
  To create code blocks, you’ll use three backticks (\` \`\`\` \`) or three tildes (\`~~~\`) on the lines before and after the code block.
@@ -55,104 +57,6 @@ ReactDOM.render(
55
57
  ###### Horizontal Rules {#horizontal-rules}
56
58
  To create a horizontal rule, use three or more asterisks (\`***\`), dashes (\`---\`), or underscores (\`___\`) on a line by themselves.
57
59
  `;
58
- const ASSISTANT_RESPONSE_SHORT_MARKDOWN = `
59
- ###### Code block {#code-block}
60
- To create code blocks, you’ll use three backticks (\` \`\`\` \`) or three tildes (\`~~~\`) on the lines before and after the code block.
61
-
62
- \`\`\`json
63
- {
64
- "firstName": "John",
65
- "lastName": "Smith",
66
- "age": 25
67
- }
68
- \`\`\`
69
- `;
70
- const sendChatToLLM = (chatRef) => () => {
71
- chatRef.generatingResponse = true;
72
- chatRef.addNewMessage({
73
- id: `${new Date().getTime()}`,
74
- role: "assistant",
75
- content: "Analyzing",
76
- status: "waiting"
77
- });
78
- timeOut = setTimeout(() => {
79
- chatRef.updateLastMessage({
80
- role: "assistant",
81
- content: "Processing with Chat with LLMs",
82
- status: "waiting"
83
- }, "replace");
84
- timeOut = setTimeout(() => {
85
- dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, "replace");
86
- }, 10000);
87
- }, 20000);
88
- };
89
- const chatCallbacksWithChatRef = (chChatRef) => {
90
- return {
91
- clear: () => new Promise(resolve => resolve()),
92
- sendChatToLLM: sendChatToLLM(chChatRef),
93
- uploadImage: () => new Promise(resolve => resolve("")),
94
- stopGeneratingAnswer: () => {
95
- clearTimeout(timeOut);
96
- chChatRef.updateLastMessage({
97
- role: "assistant",
98
- content: "",
99
- status: "complete"
100
- }, "concat");
101
- return new Promise(resolve => setTimeout(() => resolve, 10));
102
- }
103
- };
104
- };
105
- function dummyStreaming(chatRef, counter, stringToDisplay, mode) {
106
- timeOut = setTimeout(() => {
107
- const streamingCompleted = counter >= stringToDisplay.length;
108
- chatRef.updateLastMessage({
109
- role: "assistant",
110
- content: stringToDisplay.substring(counter - 20, counter),
111
- // {
112
- // message: stringToDisplay.substring(counter - 20, counter),
113
- // files: streamingCompleted
114
- // ? [
115
- // {
116
- // url: "https://next.genexus.ai",
117
- // caption: "Mars Exploration Contract"
118
- // },
119
- // {
120
- // url: "https://gx-chameleon.netlify.app",
121
- // caption: "Venus Exploration Contract"
122
- // }
123
- // ]
124
- // : undefined
125
- // },
126
- status: streamingCompleted ? "complete" : "streaming"
127
- }, mode);
128
- if (!streamingCompleted) {
129
- dummyStreaming(chatRef, counter + 20, stringToDisplay, "concat");
130
- }
131
- else {
132
- chatRef.generatingResponse = false;
133
- }
134
- }, counter % 200 === 0 ? 50 : 40);
135
- }
136
- const chatTranslations = {
137
- accessibleName: {
138
- clearChat: "Clear chat",
139
- copyResponseButton: "Copy assistant response",
140
- downloadCodeButton: "Download code",
141
- imagePicker: "Select images",
142
- removeUploadedImage: "Remove uploaded image",
143
- sendButton: "Send",
144
- sendInput: "Message",
145
- stopGeneratingAnswerButton: "Stop generating answer"
146
- },
147
- placeholder: {
148
- sendInput: "Ask me a question..."
149
- },
150
- text: {
151
- copyCodeButton: "Copy code",
152
- processing: `Processing with ${PROCESSING_PLACEHOLDER}`,
153
- sourceFiles: "Source files:"
154
- }
155
- };
156
60
  Array.from({ length: 40 }, (_, index) => index % 2 === 0
157
61
  ? {
158
62
  id: `index: ${index}`,
@@ -189,28 +93,40 @@ const codeFixerRecord = [
189
93
  role: "assistant",
190
94
  status: "complete",
191
95
  content: "Action required example. Action required example. Action required example.",
192
- metadata: "14:56"
96
+ metadata: {
97
+ assistantName: ASSISTANT_NAME,
98
+ time: "14:25"
99
+ }
193
100
  },
194
101
  {
195
102
  id: "3",
196
103
  role: "assistant",
197
104
  status: "complete",
198
105
  content: "Some fields contain missing or invalid data, which may prevent the process from completing correctly. Review your input carefully and make any necessary corrections before continuing.",
199
- metadata: "14:57",
106
+ metadata: {
107
+ assistantName: ASSISTANT_NAME,
108
+ time: "14:25"
109
+ },
200
110
  parts: "warning"
201
111
  },
202
112
  {
203
113
  id: "4",
204
114
  role: "error",
205
115
  content: "An unexpected error occurred while processing your request, and the operation couldn’t be completed.Please check your internet connection or try again later. If the problem persists, contact support.",
206
- metadata: "14:58"
116
+ metadata: {
117
+ assistantName: ASSISTANT_NAME,
118
+ time: "14:25"
119
+ }
207
120
  },
208
121
  {
209
122
  id: "5",
210
123
  role: "assistant",
211
124
  status: "complete",
212
125
  content: "Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.",
213
- metadata: "14:59",
126
+ metadata: {
127
+ assistantName: ASSISTANT_NAME,
128
+ time: "14:25"
129
+ },
214
130
  parts: "success"
215
131
  },
216
132
  {
@@ -224,22 +140,138 @@ const codeFixerRecord = [
224
140
  role: "assistant",
225
141
  status: "complete",
226
142
  content: "You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.",
227
- metadata: "15:01"
143
+ metadata: {
144
+ assistantName: ASSISTANT_NAME,
145
+ time: "14:25"
146
+ }
228
147
  },
229
148
  {
230
149
  id: "8",
231
150
  role: "assistant",
232
151
  status: "waiting",
233
- content: "You can provide further details or updates"
152
+ content: "You can provide further details or updates",
153
+ metadata: {
154
+ assistantName: ASSISTANT_NAME,
155
+ time: "14:25"
156
+ }
234
157
  },
235
158
  {
236
159
  id: "9",
237
160
  role: "assistant",
238
161
  status: "complete",
239
- content: ASSISTANT_RESPONSE_SHORT_MARKDOWN
162
+ content: ASSISTANT_RESPONSE_SHORT_MARKDOWN,
163
+ metadata: {
164
+ assistantName: ASSISTANT_NAME,
165
+ time: "14:25"
166
+ }
240
167
  }
241
168
  ];
242
169
 
170
+ const PROCESSING_PLACEHOLDER = "{{ASSISTANT_NAME}}";
171
+ const sendChatMessages = (chatRef) => () => {
172
+ chatRef.generatingResponse = true;
173
+ chatRef.addNewMessage({
174
+ id: `${new Date().getTime()}`,
175
+ role: "assistant",
176
+ content: "Analyzing",
177
+ status: "waiting",
178
+ metadata: {
179
+ assistantName: ASSISTANT_NAME,
180
+ time: "14:25"
181
+ }
182
+ });
183
+ setTimeout(() => {
184
+ chatRef.updateLastMessage({
185
+ role: "assistant",
186
+ content: "Processing with Chat with LLMs",
187
+ status: "waiting",
188
+ metadata: {
189
+ assistantName: ASSISTANT_NAME,
190
+ time: "14:25"
191
+ }
192
+ }, "replace");
193
+ setTimeout(() => {
194
+ dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, "replace");
195
+ }, 2000);
196
+ }, 2000);
197
+ };
198
+ const stopGeneratingAnswer = () => {
199
+ console.log("stop generating answer");
200
+ return new Promise(resolve => {
201
+ // Lógica asincrónica aquí si es necesario
202
+ resolve();
203
+ });
204
+ };
205
+ const chatCallbacksWithChatRef = (chChatRef) => {
206
+ return {
207
+ sendChatMessages: sendChatMessages(chChatRef),
208
+ uploadFile: (file) => new Promise(() => {
209
+ console.log("file", file);
210
+ return Promise.resolve({
211
+ url: "Error",
212
+ mimeType: "application/javascript"
213
+ });
214
+ }),
215
+ stopGeneratingAnswer: stopGeneratingAnswer
216
+ };
217
+ };
218
+ function dummyStreaming(chatRef, counter, stringToDisplay, mode) {
219
+ setTimeout(() => {
220
+ const streamingCompleted = counter >= stringToDisplay.length;
221
+ chatRef.updateLastMessage({
222
+ role: "assistant",
223
+ content: stringToDisplay.substring(counter - 20, counter),
224
+ // {
225
+ // message: stringToDisplay.substring(counter - 20, counter),
226
+ // files: streamingCompleted
227
+ // ? [
228
+ // {
229
+ // url: "https://next.genexus.ai",
230
+ // caption: "Mars Exploration Contract"
231
+ // },
232
+ // {
233
+ // url: "https://gx-chameleon.netlify.app",
234
+ // caption: "Venus Exploration Contract"
235
+ // }
236
+ // ]
237
+ // : undefined
238
+ // },
239
+ status: streamingCompleted ? "complete" : "streaming",
240
+ metadata: {
241
+ assistantName: ASSISTANT_NAME,
242
+ time: "14:25"
243
+ }
244
+ }, mode);
245
+ if (!streamingCompleted) {
246
+ dummyStreaming(chatRef, counter + 20, stringToDisplay, "concat");
247
+ }
248
+ else {
249
+ chatRef.generatingResponse = false;
250
+ }
251
+ }, counter % 200 === 0 ? 50 : 40);
252
+ }
253
+ const chatTranslations = {
254
+ accessibleName: {
255
+ clearChat: "Clear chat",
256
+ copyMessageContent: "Copy message",
257
+ downloadCodeButton: "Download code",
258
+ sendButton: "Send",
259
+ sendInput: "Message",
260
+ stopGeneratingAnswerButton: "Stop generating answer"
261
+ },
262
+ placeholder: {
263
+ sendInput: "Ask me a question..."
264
+ },
265
+ text: {
266
+ copyCodeButton: "Copy code",
267
+ copyMessageContent: "Copy message content",
268
+ downloadCodeButton: "Download code",
269
+ processing: `Processing with ${PROCESSING_PLACEHOLDER}`,
270
+ sourceFiles: "Source files:",
271
+ stopGeneratingAnswerButton: "Stop generating answer"
272
+ }
273
+ };
274
+
243
275
  const chatShowcaseCss = ":host{block-size:100%;display:grid}";
244
276
 
245
277
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
@@ -259,11 +291,11 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
259
291
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
260
292
  };
261
293
  var _GxIdeScChatContainer_chatContainerRef, _GxIdeScChatContainer_chatWelcomeRef, _GxIdeScChatContainer_chChatRef, _GxIdeScChatContainer_chatCallbacks, _GxIdeScChatContainer_copyConversationCallbackHandler, _GxIdeScChatContainer_deleteConversationCallbackHandler, _GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler;
262
- const AI_AVATAR = getAssetPath(`./gx-ide-assets/chat-welcome/images/ai-avatar.svg`);
263
294
  const CSS_BUNDLES = [
264
295
  "resets/box-sizing",
265
296
  "utils/elevation",
266
- "components/chat"
297
+ "components/chat-lit",
298
+ "components/markdown-viewer"
267
299
  ];
268
300
  const GxIdeScChatContainer = class {
269
301
  constructor(hostRef) {
@@ -369,7 +401,7 @@ const GxIdeScChatContainer = class {
369
401
  }
370
402
  }
371
403
  render() {
372
- return (h(Host, null, h("ch-theme", { model: CSS_BUNDLES }), h("gx-ide-chat-container", { chatTitle: "GeneXus Assistant", copyConversationCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_copyConversationCallbackHandler, "f"), deleteConversationCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_deleteConversationCallbackHandler, "f"), ref: el => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chatContainerRef, el, "f")), class: "elevation-1" }, h("ch-chat", { callbacks: __classPrivateFieldGet(this, _GxIdeScChatContainer_chatCallbacks, "f"), class: "chat", generatingResponse: this.generatingResponse, loadingState: this.loadingState, renderItem: mercuryChatMessageRender("components/markdown-viewer", AI_AVATAR, "Nexa"), items: this.chatItems, showAdditionalContent: this.showAdditionalContent, translations: chatTranslations, ref: el => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chChatRef, el, "f")) }, h("gx-ide-chat-welcome", { ref: el => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chatWelcomeRef, el, "f")), slot: "empty-chat", suggestedPrompRequestedCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler, "f"), suggestedPrompts: [
404
+ return (h(Host, null, h("ch-theme", { model: CSS_BUNDLES }), h("gx-ide-chat-container", { chatTitle: "GeneXus Assistant", copyConversationCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_copyConversationCallbackHandler, "f"), deleteConversationCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_deleteConversationCallbackHandler, "f"), ref: el => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chatContainerRef, el, "f")), class: "elevation-1" }, h("ch-chat", { callbacks: __classPrivateFieldGet(this, _GxIdeScChatContainer_chatCallbacks, "f"), class: "chat-lit", generatingResponse: this.generatingResponse, loadingState: this.loadingState, renderItem: renderItemMercury, items: codeFixerRecord, showAdditionalContent: this.showAdditionalContent, translations: chatTranslations, ref: (el) => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chChatRef, el, "f")), markdownTheme: "components/markdown-viewer" }, h("gx-ide-chat-welcome", { ref: el => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chatWelcomeRef, el, "f")), slot: "empty-chat", suggestedPrompRequestedCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler, "f"), suggestedPrompts: [
373
405
  "I need to represente a product entity",
374
406
  "I want to create a Customer Tracking application. Can you help me with the architecture?",
375
407
  "I need to create a REST API for my application"
@@ -1 +1 @@
1
- {"file":"gx-ide-sc-chat-container.entry.js","mappings":";;;;AAMA,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAEpD,IAAI,OAAuB,CAAC;AAE5B,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDnC,CAAC;AAEF,MAAM,iCAAiC,GAAG;;;;;;;;;;;CAWzC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,OAA0B,KAAK;IACpD,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAElC,OAAO,CAAC,aAAa,CAAC;QACpB,EAAE,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;QAC7B,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IAEH,OAAO,GAAG,UAAU,CAAC;QACnB,OAAO,CAAC,iBAAiB,CACvB;YACE,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,gCAAgC;YACzC,MAAM,EAAE,SAAS;SAClB,EACD,SAAS,CACV,CAAC;QAEF,OAAO,GAAG,UAAU,CAAC;YACnB,cAAc,CAAC,OAAO,EAAE,EAAE,EAAE,2BA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AE,6BAA6B;oBACtC,QAAQ,EAAE,OAAO;iBAClB;aACF,CAAC;SACH;KACF;IA4DD,MAAM;QACJ,QACE,EAAC,IAAI,QACH,gBAAU,KAAK,EAAE,WAAW,GAAa,EACzC,6BACE,SAAS,EAAC,mBAAmB,EAC7B,wBAAwB,EAAE,uBAAA,IAAI,6DAAiC,EAC/D,0BAA0B,EAAE,uBAAA,IAAI,+DAAmC,EACnE,GAAG,EAAE,EAAE,KACJ,uBAAA,IAAI,0CAAqB,EAAmC,MAAA,CAAC,EAEhE,KAAK,EAAC,aAAa,IAEnB,eACE,SAAS,EAAE,uBAAA,IAAI,2CAAe,EAC9B,KAAK,EAAC,MAAM,EACZ,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,UAAU,EAAE,wBAAwB,CAClC,4BAA4B,EAC5B,SAAS,EACT,MAAM,CACP,EACD,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,EACjD,YAAY,EAAE,gBAAgB,EAC9B,GAAG,EAAE,EAAE,KAAK,uBAAA,IAAI,mCAAc,EAAuB,MAAA,CAAC,IAEtD,2BACE,GAAG,EAAE,EAAE,KACJ,uBAAA,IAAI,wCAAmB,EAAiC,MAAA,CAAC,EAE5D,IAAI,EAAC,YAAY,EACjB,+BAA+B,EAC7B,uBAAA,IAAI,oEAAwC,EAE9C,gBAAgB,EAAE;gBAChB,uCAAuC;gBACvC,0FAA0F;gBAC1F,gDAAgD;aACjD,GACoB,EACvB,WAAK,IAAI,EAAC,oBAAoB,oEAExB,CACE,CACY,CACnB,EACP;KACH;;;;;;;","names":[],"sources":["src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import {\n ChatInternalCallbacks,\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nlet timeOut: NodeJS.Timeout;\n\nconst ASSISTANT_RESPONSE_MARKDOWN = `\n###### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n\n\\`\\`\\`\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\nAnother way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n\n <html>\n <head>\n </head>\n </html>\n\n\n###### Syntax Highlighting {#syntax-highlighting}\nThis feature allows you to add color highlighting for whatever language your code was written in.\nTo add syntax highlighting, specify a language next to the backticks before the fenced code block.\n\n\\`\\`\\`json\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\n\\`\\`\\`javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Markdown from 'react-markdown'\nimport rehypeHighlight from 'rehype-highlight'\n\nconst markdown = \\`\n# Your markdown here\n\\`\n\nReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n)\n\\`\\`\\`\n\n###### Horizontal Rules {#horizontal-rules}\nTo create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n`;\n\nconst ASSISTANT_RESPONSE_SHORT_MARKDOWN = `\n###### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n\n\\`\\`\\`json\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n`;\n\nconst sendChatToLLM = (chatRef: HTMLChChatElement) => () => {\n chatRef.generatingResponse = true;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n\n timeOut = setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n\n timeOut = setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 10000);\n }, 20000);\n};\n\nexport const chatCallbacksWithChatRef = (\n chChatRef: HTMLChChatElement\n): ChatInternalCallbacks => {\n return {\n clear: () => new Promise(resolve => resolve()),\n sendChatToLLM: sendChatToLLM(chChatRef),\n uploadImage: () => new Promise(resolve => resolve(\"\")),\n stopGeneratingAnswer: () => {\n clearTimeout(timeOut);\n\n chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"\",\n status: \"complete\"\n },\n \"concat\"\n );\n\n return new Promise(resolve => setTimeout(() => resolve, 10));\n }\n };\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n timeOut = setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: stringToDisplay.substring(counter - 20, counter),\n\n // {\n // message: stringToDisplay.substring(counter - 20, counter),\n // files: streamingCompleted\n // ? [\n // {\n // url: \"https://next.genexus.ai\",\n // caption: \"Mars Exploration Contract\"\n // },\n // {\n // url: \"https://gx-chameleon.netlify.app\",\n // caption: \"Venus Exploration Contract\"\n // }\n // ]\n // : undefined\n // },\n status: streamingCompleted ? \"complete\" : \"streaming\"\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n } else {\n chatRef.generatingResponse = false;\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyResponseButton: \"Copy assistant response\",\n downloadCodeButton: \"Download code\",\n imagePicker: \"Select images\",\n removeUploadedImage: \"Remove uploaded image\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\"\n }\n};\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: \"14:56\"\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Some fields contain missing or invalid data, which may prevent the process from completing correctly. Review your input carefully and make any necessary corrections before continuing.\",\n metadata: \"14:57\",\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content:\n \"An unexpected error occurred while processing your request, and the operation couldn’t be completed.Please check your internet connection or try again later. If the problem persists, contact support.\",\n metadata: \"14:58\"\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: \"14:59\",\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: \"15:01\"\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\"\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN\n }\n];\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import {\n Component,\n Host,\n h,\n State,\n Prop,\n getAssetPath,\n Method\n} from \"@stencil/core\";\nimport { mercuryChatMessageRender } from \"../../components/chat/code-render\";\n\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nconst AI_AVATAR = getAssetPath(\n `./gx-ide-assets/chat-welcome/images/ai-avatar.svg`\n);\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/elevation\",\n \"components/chat\"\n];\n\nimport {\n chatCallbacksWithChatRef,\n chatTranslations,\n codeFixerRecord\n} from \"./callbacks\";\nimport {\n ChatMessage,\n ChatInternalCallbacks\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageUser } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n #chatWelcomeRef!: HTMLGxIdeChatWelcomeElement;\n #chChatRef!: HTMLChChatElement;\n #chatCallbacks: ChatInternalCallbacks;\n\n /**\n * If true, the chat items length will be 0, since this is a requirement for dipslaying the ch-chat\n * \"empty-chat\" slot that welcome screen uses to display.\n */\n @Prop() readonly mode: \"welcome\" | \"messages-sample\" | \"empty\" =\n \"messages-sample\";\n\n @State() generatingResponse: boolean = false;\n @State() loadingState:\n | \"all-records-loaded\"\n | \"initial\"\n | \"loading\"\n | \"more-data-to-fetch\" = \"all-records-loaded\";\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n @State() chatItems: ChatMessage[] = [];\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n // hand exitWelcome to gx-ide-chat-welcome\n this.#chatWelcomeRef.exitWelcome();\n }\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {};\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n componentDidRender() {\n if (!this.#chatCallbacks && this.#chChatRef) {\n this.#chatCallbacks = chatCallbacksWithChatRef(this.#chChatRef);\n }\n }\n\n async componentWillLoad() {\n if (this.mode === \"messages-sample\") {\n this.chatItems = codeFixerRecord;\n } else if (this.mode === \"welcome\") {\n this.chatItems = [];\n } else if (this.mode === \"empty\") {\n this.chatItems = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Hello! I am your assistant.\",\n metadata: \"14:56\"\n }\n ];\n }\n }\n #suggestedPrompRequestedCallbackHandler = async (\n prompt: string\n ): Promise<void> => {\n let assistantFinalResponse: string;\n if (prompt.toLowerCase().includes(\"transaction\")) {\n assistantFinalResponse =\n 'To create a transaction in GeneXus, start by opening your KB (Knowledge Base) and selecting \"Transaction\" from the \"New Object\" options. Give it a name and define its attributes, starting with a primary key followed by the related data fields. GeneXus will automatically infer the data structure and relationships based on how you define the attributes and their nesting. Once saved, it generates the necessary database tables and forms for inserting, updating, and deleting records. You can then run the application to test the transaction directly in your browser.';\n } else if (prompt.toLowerCase().includes(\"entity\")) {\n assistantFinalResponse =\n 'In GeneXus, creating an entity usually means defining a Transaction object that represents a real-world concept like \"Customer\" or \"Product.\" To do this, create a new Transaction, name it after the entity, and define its attributes—starting with a unique identifier (like CustomerId) and then adding other fields (like CustomerName, CustomerEmail). GeneXus treats this Transaction as an entity and uses it to generate the corresponding table and interface automatically.';\n } else {\n assistantFinalResponse =\n \"Sorry, I didn’t catch that—mind rephrasing it? 😅\";\n }\n\n const userPrompt: ChatMessageUser = {\n id: \"1\",\n role: \"user\",\n content: prompt\n };\n this.#chChatRef.addNewMessage(userPrompt);\n setTimeout(() => {\n this.#chChatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Getting information\",\n status: \"waiting\"\n },\n \"replace\"\n );\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: assistantFinalResponse,\n status: \"complete\"\n },\n \"replace\"\n );\n }, 1500);\n }, 1500);\n }, 100);\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n class=\"elevation-1\"\n >\n <ch-chat\n callbacks={this.#chatCallbacks}\n class=\"chat\"\n generatingResponse={this.generatingResponse}\n loadingState={this.loadingState} // \"all-records-loaded\" to display the welcome screen\n renderItem={mercuryChatMessageRender(\n \"components/markdown-viewer\",\n AI_AVATAR,\n \"Nexa\"\n )}\n items={this.chatItems} // length 0 to display the welcome screen\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n ref={el => (this.#chChatRef = el as HTMLChChatElement)}\n >\n <gx-ide-chat-welcome\n ref={el =>\n (this.#chatWelcomeRef = el as HTMLGxIdeChatWelcomeElement)\n }\n slot=\"empty-chat\"\n suggestedPrompRequestedCallback={\n this.#suggestedPrompRequestedCallbackHandler\n }\n suggestedPrompts={[\n \"I need to represente a product entity\",\n \"I want to create a Customer Tracking application. Can you help me with the architecture?\",\n \"I need to create a REST API for my application\"\n ]}\n ></gx-ide-chat-welcome>\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"gx-ide-sc-chat-container.entry.js","mappings":";;;AAOO,MAAM,iCAAiC,GAC5C,iPAAiP,CAAC;AAE7O,MAAM,cAAc,GAAG,MAAM,CAAC;AAqKrC;AACA;AACA;AAEO,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD1C,CAAC;AAe2C,KAAK,CAAC,IAAI,CACrD,EAAE,MAAM,EAAE,EAAE,EAAE,EACd,CAAC,CAAC,EAAE,KAAK,KACP,KAAK,GAAG,CAAC,KA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A,IAAI,+DAAmC,EACnE,GAAG,EAAE,EAAE,KACJ,uBAAA,IAAI,0CAAqB,EAAmC,MAAA,CAAC,EAEhE,KAAK,EAAC,aAAa,IAEnB,eACE,SAAS,EAAE,uBAAA,IAAI,2CAAe,EAC9B,KAAK,EAAC,UAAU,EAChB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,UAAU,EAAE,iBAAiB,EAC7B,KAAK,EAAE,eAAe,EACtB,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,EACjD,YAAY,EAAE,gBAAgB,EAC9B,GAAG,EAAE,CAAC,EAAqB,MACxB,uBAAA,IAAI,mCAAc,EAAuB,MAAA,CAAC,EAE7C,aAAa,EAAC,4BAA4B,IAE1C,2BACE,GAAG,EAAE,EAAE,KACJ,uBAAA,IAAI,wCAAmB,EAAiC,MAAA,CAAC,EAE5D,IAAI,EAAC,YAAY,EACjB,+BAA+B,EAC7B,uBAAA,IAAI,oEAAwC,EAE9C,gBAAgB,EAAE;gBAChB,uCAAuC;gBACvC,0FAA0F;gBAC1F,gDAAgD;aACjD,GACoB,EACvB,WAAK,IAAI,EAAC,oBAAoB,oEAExB,CACE,CACY,CACnB,EACP;KACH;;;;;;;","names":[],"sources":["src/showcase/chat-container/models.ts","src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import type {\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nexport const ASSISTANT_RESPONSE_SHORT_MARKDOWN =\n '\\n### Code block {#code-block}\\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\\n\\n```json\\n{\\n \"firstName\": \"John\",\\n \"lastName\": \"Smith\",\\n \"age\": 25\\n}';\n\nexport const ASSISTANT_NAME = \"Nexa\";\n\n// - - - - - - - - - - - - - -\n// Types of messages\n// - - - - - - - - - - - - - -\n\nexport const userMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n }\n];\n\nexport const assistantMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantMessageWarningChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n }\n];\n\nexport const assistantMessageSuccessChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration web panel was created successfully. Fields: Name, Email, Phone, Address. Validations applied (required, email format). Data saved to “Customer” transaction. Confirmation message shown after submit. Let me know if you'd like to add styles or link it to another object.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\nexport const errorMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantWaitingChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"Creating CustomerRegistration panel\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy assistant content\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy\",\n downloadCodeButton: \"Download\",\n processing: `Processing...`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n\n// All messages\n\nexport const allMessagesModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"15:00\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\n// - - - - - - - - - - - - - -\n// Other messages\n// - - - - - - - - - - - - - -\n\nexport const ASSISTANT_RESPONSE_MARKDOWN = `\n###### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n\n\\`\\`\\`\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\nAnother way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n\n <html>\n <head>\n </head>\n </html>\n\n\n###### Syntax Highlighting {#syntax-highlighting}\nThis feature allows you to add color highlighting for whatever language your code was written in.\nTo add syntax highlighting, specify a language next to the backticks before the fenced code block.\n\n\\`\\`\\`json\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\n\\`\\`\\`javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Markdown from 'react-markdown'\nimport rehypeHighlight from 'rehype-highlight'\n\nconst markdown = \\`\n# Your markdown here\n\\`\n\nReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n)\n\\`\\`\\`\n\n###### Horizontal Rules {#horizontal-rules}\nTo create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n`;\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Some fields contain missing or invalid data, which may prevent the process from completing correctly. Review your input carefully and make any necessary corrections before continuing.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content:\n \"An unexpected error occurred while processing your request, and the operation couldn’t be completed.Please check your internet connection or try again later. If the problem persists, contact support.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN,\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n","import {\n ChatCallbacks,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageFile } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\nimport { ASSISTANT_RESPONSE_MARKDOWN } from \"./models\";\n\nimport { ASSISTANT_NAME } from \"./models\";\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nconst sendChatMessages = (chatRef: HTMLChChatElement) => () => {\n chatRef.generatingResponse = true;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n });\n\n setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n \"replace\"\n );\n\n setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 2000);\n }, 2000);\n};\n\nconst stopGeneratingAnswer = (): Promise<void> => {\n console.log(\"stop generating answer\");\n return new Promise<void>(resolve => {\n // Lógica asincrónica aquí si es necesario\n resolve();\n });\n};\n\nexport const chatCallbacksWithChatRef = (\n chChatRef: HTMLChChatElement\n): ChatCallbacks => {\n return {\n sendChatMessages: sendChatMessages(chChatRef),\n uploadFile: (file: File) =>\n new Promise<ChatMessageFile>(() => {\n console.log(\"file\", file);\n\n return Promise.resolve({\n url: \"Error\",\n mimeType: \"application/javascript\"\n } satisfies ChatMessageFile);\n }),\n stopGeneratingAnswer: stopGeneratingAnswer\n };\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: stringToDisplay.substring(counter - 20, counter),\n\n // {\n // message: stringToDisplay.substring(counter - 20, counter),\n // files: streamingCompleted\n // ? [\n // {\n // url: \"https://next.genexus.ai\",\n // caption: \"Mars Exploration Contract\"\n // },\n // {\n // url: \"https://gx-chameleon.netlify.app\",\n // caption: \"Venus Exploration Contract\"\n // }\n // ]\n // : undefined\n // },\n status: streamingCompleted ? \"complete\" : \"streaming\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n } else {\n chatRef.generatingResponse = false;\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy message\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy message content\",\n downloadCodeButton: \"Download code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import { Component, Host, h, State, Prop, Method } from \"@stencil/core\";\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { renderItemMercury } from \"../../components/chat/lit-custom-render/render-item.lit\";\nimport { codeFixerRecord } from \"./models\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/elevation\",\n \"components/chat-lit\",\n \"components/markdown-viewer\"\n];\n\nimport { chatCallbacksWithChatRef, chatTranslations } from \"./callbacks\";\nimport {\n ChatMessage,\n ChatCallbacks\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageUser } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n #chatWelcomeRef!: HTMLGxIdeChatWelcomeElement;\n #chChatRef!: HTMLChChatElement;\n #chatCallbacks: ChatCallbacks;\n\n /**\n * If true, the chat items length will be 0, since this is a requirement for dipslaying the ch-chat\n * \"empty-chat\" slot that welcome screen uses to display.\n */\n @Prop() readonly mode: \"welcome\" | \"messages-sample\" | \"empty\" =\n \"messages-sample\";\n\n @State() generatingResponse: boolean = false;\n @State() loadingState:\n | \"all-records-loaded\"\n | \"initial\"\n | \"loading\"\n | \"more-data-to-fetch\" = \"all-records-loaded\";\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n @State() chatItems: ChatMessage[] = [];\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n // hand exitWelcome to gx-ide-chat-welcome\n this.#chatWelcomeRef.exitWelcome();\n }\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {};\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n componentDidRender() {\n if (!this.#chatCallbacks && this.#chChatRef) {\n this.#chatCallbacks = chatCallbacksWithChatRef(this.#chChatRef);\n }\n }\n\n async componentWillLoad() {\n if (this.mode === \"messages-sample\") {\n this.chatItems = codeFixerRecord;\n } else if (this.mode === \"welcome\") {\n this.chatItems = [];\n } else if (this.mode === \"empty\") {\n this.chatItems = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Hello! I am your assistant.\",\n metadata: \"14:56\"\n }\n ];\n }\n }\n #suggestedPrompRequestedCallbackHandler = async (\n prompt: string\n ): Promise<void> => {\n let assistantFinalResponse: string;\n if (prompt.toLowerCase().includes(\"transaction\")) {\n assistantFinalResponse =\n 'To create a transaction in GeneXus, start by opening your KB (Knowledge Base) and selecting \"Transaction\" from the \"New Object\" options. Give it a name and define its attributes, starting with a primary key followed by the related data fields. GeneXus will automatically infer the data structure and relationships based on how you define the attributes and their nesting. Once saved, it generates the necessary database tables and forms for inserting, updating, and deleting records. You can then run the application to test the transaction directly in your browser.';\n } else if (prompt.toLowerCase().includes(\"entity\")) {\n assistantFinalResponse =\n 'In GeneXus, creating an entity usually means defining a Transaction object that represents a real-world concept like \"Customer\" or \"Product.\" To do this, create a new Transaction, name it after the entity, and define its attributes—starting with a unique identifier (like CustomerId) and then adding other fields (like CustomerName, CustomerEmail). GeneXus treats this Transaction as an entity and uses it to generate the corresponding table and interface automatically.';\n } else {\n assistantFinalResponse =\n \"Sorry, I didn’t catch that—mind rephrasing it? 😅\";\n }\n\n const userPrompt: ChatMessageUser = {\n id: \"1\",\n role: \"user\",\n content: prompt\n };\n this.#chChatRef.addNewMessage(userPrompt);\n setTimeout(() => {\n this.#chChatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Getting information\",\n status: \"waiting\"\n },\n \"replace\"\n );\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: assistantFinalResponse,\n status: \"complete\"\n },\n \"replace\"\n );\n }, 1500);\n }, 1500);\n }, 100);\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n class=\"elevation-1\"\n >\n <ch-chat\n callbacks={this.#chatCallbacks}\n class=\"chat-lit\"\n generatingResponse={this.generatingResponse}\n loadingState={this.loadingState} // \"all-records-loaded\" to display the welcome screen\n renderItem={renderItemMercury}\n items={codeFixerRecord} // length 0 to display the welcome screen\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n ref={(el: HTMLChChatElement) =>\n (this.#chChatRef = el as HTMLChChatElement)\n }\n markdownTheme=\"components/markdown-viewer\"\n >\n <gx-ide-chat-welcome\n ref={el =>\n (this.#chatWelcomeRef = el as HTMLGxIdeChatWelcomeElement)\n }\n slot=\"empty-chat\"\n suggestedPrompRequestedCallback={\n this.#suggestedPrompRequestedCallbackHandler\n }\n suggestedPrompts={[\n \"I need to represente a product entity\",\n \"I want to create a Customer Tracking application. Can you help me with the architecture?\",\n \"I need to create a REST API for my application\"\n ]}\n ></gx-ide-chat-welcome>\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, g as getAssetPath, h, H as Host, a as getElement } from './index-10af18cf.js';
2
- import { g as getIconPath } from './MERCURY_ASSETS-7c06e424.js';
2
+ import { g as getIconPath } from './MERCURY_ASSETS-ccf43ae3.js';
3
3
  import { L as Locale } from './locale-e5107fad.js';
4
4
 
5
5
  const ACTIVE_ITEM_DEFAULT_ICON = getIconPath({
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, g as getAssetPath, h, H as Host, a as getElement } from './index-10af18cf.js';
2
- import { g as getIconPath } from './MERCURY_ASSETS-7c06e424.js';
2
+ import { g as getIconPath } from './MERCURY_ASSETS-ccf43ae3.js';
3
3
  import { c as config } from './config-1ef9d75a.js';
4
4
  import { v as validateControls } from './form-validation-cd0215c6.js';
5
5
  import { L as Locale } from './locale-e5107fad.js';
@@ -174,7 +174,7 @@ const GxIdeShareKb = class {
174
174
  return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("ch-shortcuts", { src: __classPrivateFieldGet(this, _GxIdeShareKb_shortcutsSrc, "f"), ref: (el) => (this.chShortcutsEl = el) }), h("section", { class: "section" }, h("header", { class: "header control-header-with-border space-body spacing-body-inline spacing-body-block-start" }, h("div", { class: "field field-block" }, h("label", { class: "label" }, __classPrivateFieldGet(this, _GxIdeShareKb__componentLocale, "f").header.serverUrl), h("p", null, this.connectionData.serverUrl)), h("div", { class: "field field-block" }, h("label", { class: "label" }, __classPrivateFieldGet(this, _GxIdeShareKb__componentLocale, "f").header.user), h("p", null, this.connectionData.userName)), h("button", { class: "button-tertiary button-change", onClick: __classPrivateFieldGet(this, _GxIdeShareKb_changeConnectionHandler, "f") }, __classPrivateFieldGet(this, _GxIdeShareKb__componentLocale, "f").header.change)), h("section", { class: "main field-group spacing-body" }, h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "alias" }, __classPrivateFieldGet(this, _GxIdeShareKb__componentLocale, "f").kb.aliasLabel), h("ch-edit", {
175
175
  // alias
176
176
  class: "input", id: "kb-name", value: this.kbName, onInput: __classPrivateFieldGet(this, _GxIdeShareKb_kbNameInputHandler, "f"), placeholder: __classPrivateFieldGet(this, _GxIdeShareKb__componentLocale, "f").kb.localKbNamePlaceholder, ref: (el) => (__classPrivateFieldSet(this, _GxIdeShareKb_KBNameEl, el, "f"))
177
- }), __classPrivateFieldGet(this, _GxIdeShareKb_evaluateTooltipRender, "f").call(this, __classPrivateFieldGet(this, _GxIdeShareKb_KBNameEl, "f"))), h("div", { class: "versions-container field-group" }, h("ch-radio-group-render", { class: "radio-group", model: __classPrivateFieldGet(this, _GxIdeShareKb_versionsSelect, "f"), onChange: __classPrivateFieldGet(this, _GxIdeShareKb_versionsChangedHandler, "f"), value: __classPrivateFieldGet(this, _GxIdeShareKb_versionsSelect, "f")[0].value, ref: el => (__classPrivateFieldSet(this, _GxIdeShareKb_versionSelectedTypeEl, el, "f")) }), this.versionSelectedType === "Select" && (h("div", { class: "versions-container__item field-group" }, h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "control-id-1" }, __classPrivateFieldGet(this, _GxIdeShareKb__componentLocale, "f").kb.versionsLabel), h("div", { class: "versions-container__input" }, h("ch-edit", { class: "input", readonly: true, placeholder: this.enableSelectVersionsButton
177
+ }), __classPrivateFieldGet(this, _GxIdeShareKb_evaluateTooltipRender, "f").call(this, __classPrivateFieldGet(this, _GxIdeShareKb_KBNameEl, "f"))), h("div", { class: "versions-container field-group" }, h("ch-radio-group-render", { class: "radio-group", model: __classPrivateFieldGet(this, _GxIdeShareKb_versionsSelect, "f"), onChange: __classPrivateFieldGet(this, _GxIdeShareKb_versionsChangedHandler, "f"), value: __classPrivateFieldGet(this, _GxIdeShareKb_versionsSelect, "f")[0].value, ref: (el) => (__classPrivateFieldSet(this, _GxIdeShareKb_versionSelectedTypeEl, el, "f")) }), this.versionSelectedType === "Select" && (h("div", { class: "versions-container__item field-group" }, h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "control-id-1" }, __classPrivateFieldGet(this, _GxIdeShareKb__componentLocale, "f").kb.versionsLabel), h("div", { class: "versions-container__input" }, h("ch-edit", { class: "input", readonly: true, placeholder: this.enableSelectVersionsButton
178
178
  ? __classPrivateFieldGet(this, _GxIdeShareKb__componentLocale, "f").kb.versionsPlaceholder
179
179
  : __classPrivateFieldGet(this, _GxIdeShareKb__componentLocale, "f").kb
180
180
  .versionsPlaceholderDisabled, value: this.versionsValueInput }), h("button", { class: "button-tertiary button-icon-only", onClick: __classPrivateFieldGet(this, _GxIdeShareKb_selectedVersionHandler, "f"), disabled: !this.enableSelectVersionsButton }, h("ch-image", { src: __classPrivateFieldGet(this, _GxIdeShareKb_showMoreIcon, "f"), class: "icon-sm" })))))))), __classPrivateFieldGet(this, _GxIdeShareKb_renderFooter, "f").call(this))));
@@ -1 +1 @@
1
- {"file":"gx-ide-share-kb.entry.js","mappings":";;;;;;AAAA,MAAM,UAAU,GAAG,2wBAA2wB;;;;;;;;;;;;;;;;;;;AC4B9xB,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,k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CACL,CACF,CACF,CACP,CACG,CACE,EAET,uBAAA,IAAI,kCAAc,MAAlB,IAAI,CAAgB,CACb,CACL,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/team-dev/share-kb/share-kb.scss?tag=gx-ide-share-kb&encapsulation=shadow","src/components/team-dev/share-kb/share-kb.tsx"],"sourcesContent":[":host {\n display: grid;\n block-size: 100%;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n// - - - - - - - - - - -\n// Header\n// - - - - - - - - - - -\n\nheader {\n display: grid;\n grid-template-rows: max-content;\n grid-template-columns: 1fr 1fr max-content;\n}\n\n.button-change {\n align-self: center;\n justify-self: end;\n}\n\n// - - - - - - - - - - -\n// Main\n// - - - - - - - - - - -\n\n.main {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: max-content 1fr max-content max-content;\n}\n\n.search-kbs {\n inline-size: 50%;\n}\n\n.versions-container {\n grid-auto-rows: max-content;\n\n &__input {\n display: grid;\n grid-template-columns: 1fr max-content;\n gap: var(--mer-spacing--xs);\n }\n}\n\n.button-icon-only.button-tertiary {\n border-color: var(--mer-color__neutral-gray--500);\n border-width: var(--mer-border__width--sm);\n border-radius: var(--mer-border__radius--sm);\n}\n\n.button-icon-only:hover {\n border-color: var(--mer-color__neutral-gray--100);\n}\n","// Stencil\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n State,\n getAssetPath\n} from \"@stencil/core\";\n\n// Other Libraries\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport { GXServerConnectionData } from \"../connect-gx-server/connect-gx-server\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\nimport { Locale } from \"../../../common/locale\";\nimport { RadioGroupItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/radio-group/types\";\nimport { ChEditCustomEvent } from \"@genexus/chameleon-controls-library\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"components/list-box\",\n \"components/tooltip\",\n \"chameleon/scrollbar\"\n];\n\n@Component({\n tag: \"gx-ide-share-kb\",\n styleUrl: \"share-kb.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/share-kb\"]\n})\nexport class GxIdeShareKb {\n #showMoreIcon = getIconPath({\n category: \"gemini-tools\",\n name: \"show-more-horizontal\",\n colorType: \"on-elevation\"\n });\n\n #versionsSelect: RadioGroupItemModel[] = [\n { value: \"Trunk\", caption: \"Trunk Version\" },\n { value: \"All\", caption: \"All Versions\" },\n { value: \"Select\", caption: \"Select Version\" }\n ];\n\n [key: string]: any;\n\n #_componentLocale: any;\n #kbVersions: KBVersion[] = [];\n #renderedFirstTime = false;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/create-kb-from-server/shortcuts.json`\n );\n #selectedKbId: string;\n\n #versionSelectedTypeEl: HTMLChRadioGroupRenderElement;\n\n @Element() el: HTMLGxIdeShareKbElement;\n\n #KBNameEl!: HTMLChEditElement;\n\n /**\n * State to enable/disable the select versions button\n */\n @State() enableSelectVersionsButton: boolean = false;\n\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * The version selected type\n */\n @State() versionSelectedType: VersionOption;\n\n /**\n * String value to show the number of versions selected (\"N versions selected\")\n */\n @State() versionsValueInput: string = \"\";\n\n /**\n * Set of data required when executing any of the callbacks that require a connection to the server.\n */\n @Prop() readonly connectionData: GXServerConnectionData;\n\n /**\n * Callback that is invoked when the dialog is closed\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * The host reopens the gx-ide-connect-server login modal with the previous data, and closes the current modal\n */\n @Prop() readonly changeConnectionCallback: (\n data: GXServerConnectionData\n ) => Promise<void>;\n\n /**\n * The name of the KB.\n */\n @Prop({ mutable: true }) kbName: string;\n\n /**\n * Callback that must be invoked when the Share button is pressed.\n */\n @Prop() readonly shareKBCallback: (\n data: ShareKBData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Callback invoked by pressing the ellipsis in the version selector. Receives the KB selected by the user, and displays the version selector dialog. Returns a list of versions chosen by the user.\n */\n @Prop() readonly selectKBVersionsCallback: (\n selectedKB: string\n ) => Promise<KBVersion[]>;\n\n /**\n * Emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.versionSelectedType = this.#versionSelectedTypeEl\n .value as VersionOption;\n\n this.#initializeValidatableControls();\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 async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n #cancelHandler = (): void => {\n this.cancelCallback();\n };\n\n #changeConnectionHandler = async (): Promise<void> => {\n this.changeConnectionCallback({\n authenticationType: this.connectionData.authenticationType,\n serverUrl: this.connectionData.serverUrl,\n userName: this.connectionData.userName,\n userPassword: this.connectionData.userPassword\n });\n };\n\n #shareKBHandler = async (): Promise<void> => {\n if (this.versionSelectedType !== \"Select\") {\n this.#kbVersions = [];\n }\n this.shareKBCallback({\n name: this.kbName,\n serverUrl: this.connectionData.serverUrl,\n versionList: this.#kbVersions,\n allVersions: this.versionSelectedType === \"All\"\n }).then((formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n });\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs as well.\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n #initializeValidatableControls = () => {\n // populate validatableControls with the controls that could have errors.\n const validatableControls: HTMLElement[] = [this.#KBNameEl];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n #kbNameInputHandler = (event: ChEditCustomEvent<string> | InputEvent) => {\n this.kbName = event.detail as string;\n };\n\n #selectedVersionHandler = async () => {\n if (this.selectKBVersionsCallback) {\n await this.selectKBVersionsCallback(this.#selectedKbId).then(result => {\n if (result?.length) {\n this.#kbVersions = result.map(kbVersion => ({\n id: kbVersion.id,\n name: kbVersion.name\n }));\n\n if (result.length === 1 && this.#kbVersions[0].id === 0) {\n this.localKbNameInputValue = this.#selectedKbId;\n this.versionsValueInput =\n this.#_componentLocale.kb.versionsPlaceholder;\n } else if (result.length > 1) {\n this.localKbNameInputValue = this.#selectedKbId;\n this.versionsValueInput = `${result.length.toString()} ${\n this.#_componentLocale.kb.versionSelectedFieldValue\n }`;\n } else {\n this.localKbNameInputValue = `${this.#selectedKbId}_${\n this.#kbVersions[0].name\n }`;\n this.versionsValueInput = `${result[0].name} ${\n this.#_componentLocale.kb.oneVersionSelectedFieldValue\n }`;\n }\n }\n });\n }\n };\n\n #versionsChangedHandler = (event: CustomEvent<string>) => {\n this.versionSelectedType = event.detail as VersionOption;\n if (this.versionSelectedType === \"Select\") {\n this.enableSelectVersionsButton = true;\n } else {\n this.enableSelectVersionsButton = false;\n }\n };\n\n #renderFooter = () => {\n const disableShareKbButton = !this.kbName.length;\n return (\n <footer class=\"footer control-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelHandler}\n part=\"button button-cancel\"\n >\n {this.#_componentLocale.footer.cancel}\n </button>\n\n <button\n // share kb button\n class=\"button-primary\"\n onClick={!disableShareKbButton && this.#shareKBHandler}\n disabled={disableShareKbButton}\n part=\"button button-create-kb\"\n >\n {this.#_componentLocale.footer.shareKB}\n </button>\n </div>\n </footer>\n );\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n\n <section class=\"section\">\n <header class=\"header control-header-with-border space-body spacing-body-inline spacing-body-block-start\">\n <div class=\"field field-block\">\n <label class=\"label\">\n {this.#_componentLocale.header.serverUrl}\n </label>\n <p>{this.connectionData.serverUrl}</p>\n </div>\n\n <div class=\"field field-block\">\n <label class=\"label\">{this.#_componentLocale.header.user}</label>\n <p>{this.connectionData.userName}</p>\n </div>\n\n <button\n class=\"button-tertiary button-change\"\n onClick={this.#changeConnectionHandler}\n >\n {this.#_componentLocale.header.change}\n </button>\n </header>\n\n <section class=\"main field-group spacing-body\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"alias\">\n {this.#_componentLocale.kb.aliasLabel}\n </label>\n <ch-edit\n // alias\n class=\"input\"\n id=\"kb-name\"\n value={this.kbName}\n onInput={this.#kbNameInputHandler}\n placeholder={this.#_componentLocale.kb.localKbNamePlaceholder}\n ref={(el: HTMLChEditElement) =>\n (this.#KBNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#KBNameEl)}\n </div>\n\n <div class=\"versions-container field-group\">\n <ch-radio-group-render\n class=\"radio-group\"\n model={this.#versionsSelect}\n onChange={this.#versionsChangedHandler}\n value={this.#versionsSelect[0].value}\n ref={el =>\n (this.#versionSelectedTypeEl =\n el as HTMLChRadioGroupRenderElement)\n }\n ></ch-radio-group-render>\n\n {this.versionSelectedType === \"Select\" && (\n <div class=\"versions-container__item field-group\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"control-id-1\">\n {this.#_componentLocale.kb.versionsLabel}\n </label>\n <div class=\"versions-container__input\">\n <ch-edit\n class=\"input\"\n readonly\n placeholder={\n this.enableSelectVersionsButton\n ? this.#_componentLocale.kb.versionsPlaceholder\n : this.#_componentLocale.kb\n .versionsPlaceholderDisabled\n }\n value={this.versionsValueInput}\n ></ch-edit>\n <button\n class=\"button-tertiary button-icon-only\"\n onClick={this.#selectedVersionHandler}\n disabled={!this.enableSelectVersionsButton}\n >\n <ch-image\n src={this.#showMoreIcon}\n class=\"icon-sm\"\n ></ch-image>\n </button>\n </div>\n </div>\n </div>\n )}\n </div>\n </section>\n\n {this.#renderFooter()}\n </section>\n </Host>\n );\n }\n}\n\nexport type KBData = {\n id: string;\n name: string;\n};\n\nexport type KBVersion = {\n id: number;\n name: string;\n type?: VersionType;\n};\n\nexport type ConnectionResultData = {\n formResult: FormSubmitResult;\n kbs: KBData[];\n};\n\nexport type ShareKBData = {\n name: string;\n serverUrl: string;\n versionList: KBVersion[];\n allVersions: boolean;\n};\n\nexport type VersionOption = \"Trunk\" | \"All\" | \"Select\";\n\nexport type VersionType = \"Branch\" | \"Frozen\";\n"],"version":3}
1
+ {"file":"gx-ide-share-kb.entry.js","mappings":";;;;;;AAAA,MAAM,UAAU,GAAG,2wBAA2wB;;;;;;;;;;;;;;;;;;;AC4B9xB,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,kBAAkB;IAClB,cAAc;IACd,kBAAkB;IAClB,eAAe;IACf,qBAAqB;IACrB,oBAAoB;IACpB,qBAAqB;CACtB,CAAC;MAQW,YAAY;;;;QACvB,qCAAgB,WAAW,CAAC;YAC1B,QAAQ,EAAE,cAAc;YACxB,IAAI,EAAE,sBAAsB;YAC5B,SAAS,EAAE,cAAc;SAC1B,CAAC,EAAC;QAEH,uCAAyC;YACvC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eA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,KAAK,EAAC,aAAa,EACnB,KAAK,EAAE,uBAAA,IAAI,oCAAgB,EAC3B,QAAQ,EAAE,uBAAA,IAAI,4CAAwB,EACtC,KAAK,EAAE,uBAAA,IAAI,oCAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,EACpC,GAAG,EAAE,CAAC,EAAiC,MACpC,uBAAA,IAAI,uCACH,EAAmC,MAAA,CAAC,GAEjB,EAExB,IAAI,CAAC,mBAAmB,KAAK,QAAQ,KACpC,WAAK,KAAK,EAAC,sCAAsC,IAC/C,WAAK,KAAK,EAAC,mBAAmB,IAC5B,aAAO,KAAK,EAAC,OAAO,EAAC,OAAO,EAAC,cAAc,IACxC,uBAAA,IAAI,sCAAkB,CAAC,EAAE,CAAC,aAAa,CAClC,EACR,WAAK,KAAK,EAAC,2BAA2B,IACpC,eACE,KAAK,EAAC,OAAO,EACb,QAAQ,QACR,WAAW,EACT,IAAI,CAAC,0BAA0B;kBAC3B,uBAAA,IAAI,sCAAkB,CAAC,EAAE,CAAC,mBAAmB;kBAC7C,uBAAA,IAAI,sCAAkB,CAAC,EAAE;qBACtB,2BAA2B,EAEpC,KAAK,EAAE,IAAI,CAAC,kBAAkB,GACrB,EACX,cACE,KAAK,EAAC,kCAAkC,EACxC,OAAO,EAAE,uBAAA,IAAI,4CAAwB,EACrC,QAAQ,EAAE,CAAC,IAAI,CAAC,0BAA0B,IAE1C,gBACE,GAAG,EAAE,uBAAA,IAAI,kCAAc,EACvB,KAAK,EAAC,SAAS,GACL,CACL,CACL,CACF,CACF,CACP,CACG,CACE,EAET,uBAAA,IAAI,kCAAc,MAAlB,IAAI,CAAgB,CACb,CACL,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/team-dev/share-kb/share-kb.scss?tag=gx-ide-share-kb&encapsulation=shadow","src/components/team-dev/share-kb/share-kb.tsx"],"sourcesContent":[":host {\n display: grid;\n block-size: 100%;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n// - - - - - - - - - - -\n// Header\n// - - - - - - - - - - -\n\nheader {\n display: grid;\n grid-template-rows: max-content;\n grid-template-columns: 1fr 1fr max-content;\n}\n\n.button-change {\n align-self: center;\n justify-self: end;\n}\n\n// - - - - - - - - - - -\n// Main\n// - - - - - - - - - - -\n\n.main {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: max-content 1fr max-content max-content;\n}\n\n.search-kbs {\n inline-size: 50%;\n}\n\n.versions-container {\n grid-auto-rows: max-content;\n\n &__input {\n display: grid;\n grid-template-columns: 1fr max-content;\n gap: var(--mer-spacing--xs);\n }\n}\n\n.button-icon-only.button-tertiary {\n border-color: var(--mer-color__neutral-gray--500);\n border-width: var(--mer-border__width--sm);\n border-radius: var(--mer-border__radius--sm);\n}\n\n.button-icon-only:hover {\n border-color: var(--mer-color__neutral-gray--100);\n}\n","// Stencil\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n State,\n getAssetPath\n} from \"@stencil/core\";\n\n// Other Libraries\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\n\n// Custom Imports\nimport { config } from \"../../../common/config\";\nimport { GXServerConnectionData } from \"../connect-gx-server/connect-gx-server\";\nimport { FormSubmitResult } from \"../../../common/types\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../../common/form-validation\";\nimport { Locale } from \"../../../common/locale\";\nimport { RadioGroupItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/radio-group/types\";\nimport { ChEditCustomEvent } from \"@genexus/chameleon-controls-library\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"components/list-box\",\n \"components/tooltip\",\n \"chameleon/scrollbar\"\n];\n\n@Component({\n tag: \"gx-ide-share-kb\",\n styleUrl: \"share-kb.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/share-kb\"]\n})\nexport class GxIdeShareKb {\n #showMoreIcon = getIconPath({\n category: \"gemini-tools\",\n name: \"show-more-horizontal\",\n colorType: \"on-elevation\"\n });\n\n #versionsSelect: RadioGroupItemModel[] = [\n { value: \"Trunk\", caption: \"Trunk Version\" },\n { value: \"All\", caption: \"All Versions\" },\n { value: \"Select\", caption: \"Select Version\" }\n ];\n\n [key: string]: any;\n\n #_componentLocale: any;\n #kbVersions: KBVersion[] = [];\n #renderedFirstTime = false;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/create-kb-from-server/shortcuts.json`\n );\n #selectedKbId: string;\n\n #versionSelectedTypeEl: HTMLChRadioGroupRenderElement;\n\n @Element() el: HTMLGxIdeShareKbElement;\n\n #KBNameEl!: HTMLChEditElement;\n\n /**\n * State to enable/disable the select versions button\n */\n @State() enableSelectVersionsButton: boolean = false;\n\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * The version selected type\n */\n @State() versionSelectedType: VersionOption;\n\n /**\n * String value to show the number of versions selected (\"N versions selected\")\n */\n @State() versionsValueInput: string = \"\";\n\n /**\n * Set of data required when executing any of the callbacks that require a connection to the server.\n */\n @Prop() readonly connectionData: GXServerConnectionData;\n\n /**\n * Callback that is invoked when the dialog is closed\n */\n @Prop() readonly cancelCallback!: () => Promise<void>;\n\n /**\n * The host reopens the gx-ide-connect-server login modal with the previous data, and closes the current modal\n */\n @Prop() readonly changeConnectionCallback: (\n data: GXServerConnectionData\n ) => Promise<void>;\n\n /**\n * The name of the KB.\n */\n @Prop({ mutable: true }) kbName: string;\n\n /**\n * Callback that must be invoked when the Share button is pressed.\n */\n @Prop() readonly shareKBCallback: (\n data: ShareKBData\n ) => Promise<FormSubmitResult>;\n\n /**\n * Callback invoked by pressing the ellipsis in the version selector. Receives the KB selected by the user, and displays the version selector dialog. Returns a list of versions chosen by the user.\n */\n @Prop() readonly selectKBVersionsCallback: (\n selectedKB: string\n ) => Promise<KBVersion[]>;\n\n /**\n * Emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.versionSelectedType = this.#versionSelectedTypeEl\n .value as VersionOption;\n\n this.#initializeValidatableControls();\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 async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n #cancelHandler = (): void => {\n this.cancelCallback();\n };\n\n #changeConnectionHandler = async (): Promise<void> => {\n this.changeConnectionCallback({\n authenticationType: this.connectionData.authenticationType,\n serverUrl: this.connectionData.serverUrl,\n userName: this.connectionData.userName,\n userPassword: this.connectionData.userPassword\n });\n };\n\n #shareKBHandler = async (): Promise<void> => {\n if (this.versionSelectedType !== \"Select\") {\n this.#kbVersions = [];\n }\n this.shareKBCallback({\n name: this.kbName,\n serverUrl: this.connectionData.serverUrl,\n versionList: this.#kbVersions,\n allVersions: this.versionSelectedType === \"All\"\n }).then((formSubmitResult: FormSubmitResult) => {\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n });\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs as well.\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n #initializeValidatableControls = () => {\n // populate validatableControls with the controls that could have errors.\n const validatableControls: HTMLElement[] = [this.#KBNameEl];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n #kbNameInputHandler = (event: ChEditCustomEvent<string> | InputEvent) => {\n this.kbName = event.detail as string;\n };\n\n #selectedVersionHandler = async () => {\n if (this.selectKBVersionsCallback) {\n await this.selectKBVersionsCallback(this.#selectedKbId).then(result => {\n if (result?.length) {\n this.#kbVersions = result.map(kbVersion => ({\n id: kbVersion.id,\n name: kbVersion.name\n }));\n\n if (result.length === 1 && this.#kbVersions[0].id === 0) {\n this.localKbNameInputValue = this.#selectedKbId;\n this.versionsValueInput =\n this.#_componentLocale.kb.versionsPlaceholder;\n } else if (result.length > 1) {\n this.localKbNameInputValue = this.#selectedKbId;\n this.versionsValueInput = `${result.length.toString()} ${\n this.#_componentLocale.kb.versionSelectedFieldValue\n }`;\n } else {\n this.localKbNameInputValue = `${this.#selectedKbId}_${\n this.#kbVersions[0].name\n }`;\n this.versionsValueInput = `${result[0].name} ${\n this.#_componentLocale.kb.oneVersionSelectedFieldValue\n }`;\n }\n }\n });\n }\n };\n\n #versionsChangedHandler = (event: CustomEvent<string>) => {\n this.versionSelectedType = event.detail as VersionOption;\n if (this.versionSelectedType === \"Select\") {\n this.enableSelectVersionsButton = true;\n } else {\n this.enableSelectVersionsButton = false;\n }\n };\n\n #renderFooter = () => {\n const disableShareKbButton = !this.kbName.length;\n return (\n <footer class=\"footer control-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n // cancel button\n class=\"button-secondary\"\n onClick={this.#cancelHandler}\n part=\"button button-cancel\"\n >\n {this.#_componentLocale.footer.cancel}\n </button>\n\n <button\n // share kb button\n class=\"button-primary\"\n onClick={!disableShareKbButton && this.#shareKBHandler}\n disabled={disableShareKbButton}\n part=\"button button-create-kb\"\n >\n {this.#_componentLocale.footer.shareKB}\n </button>\n </div>\n </footer>\n );\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n\n <section class=\"section\">\n <header class=\"header control-header-with-border space-body spacing-body-inline spacing-body-block-start\">\n <div class=\"field field-block\">\n <label class=\"label\">\n {this.#_componentLocale.header.serverUrl}\n </label>\n <p>{this.connectionData.serverUrl}</p>\n </div>\n\n <div class=\"field field-block\">\n <label class=\"label\">{this.#_componentLocale.header.user}</label>\n <p>{this.connectionData.userName}</p>\n </div>\n\n <button\n class=\"button-tertiary button-change\"\n onClick={this.#changeConnectionHandler}\n >\n {this.#_componentLocale.header.change}\n </button>\n </header>\n\n <section class=\"main field-group spacing-body\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"alias\">\n {this.#_componentLocale.kb.aliasLabel}\n </label>\n <ch-edit\n // alias\n class=\"input\"\n id=\"kb-name\"\n value={this.kbName}\n onInput={this.#kbNameInputHandler}\n placeholder={this.#_componentLocale.kb.localKbNamePlaceholder}\n ref={(el: HTMLChEditElement) =>\n (this.#KBNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#KBNameEl)}\n </div>\n\n <div class=\"versions-container field-group\">\n <ch-radio-group-render\n class=\"radio-group\"\n model={this.#versionsSelect}\n onChange={this.#versionsChangedHandler}\n value={this.#versionsSelect[0].value}\n ref={(el: HTMLChRadioGroupRenderElement) =>\n (this.#versionSelectedTypeEl =\n el as HTMLChRadioGroupRenderElement)\n }\n ></ch-radio-group-render>\n\n {this.versionSelectedType === \"Select\" && (\n <div class=\"versions-container__item field-group\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"control-id-1\">\n {this.#_componentLocale.kb.versionsLabel}\n </label>\n <div class=\"versions-container__input\">\n <ch-edit\n class=\"input\"\n readonly\n placeholder={\n this.enableSelectVersionsButton\n ? this.#_componentLocale.kb.versionsPlaceholder\n : this.#_componentLocale.kb\n .versionsPlaceholderDisabled\n }\n value={this.versionsValueInput}\n ></ch-edit>\n <button\n class=\"button-tertiary button-icon-only\"\n onClick={this.#selectedVersionHandler}\n disabled={!this.enableSelectVersionsButton}\n >\n <ch-image\n src={this.#showMoreIcon}\n class=\"icon-sm\"\n ></ch-image>\n </button>\n </div>\n </div>\n </div>\n )}\n </div>\n </section>\n\n {this.#renderFooter()}\n </section>\n </Host>\n );\n }\n}\n\nexport type KBData = {\n id: string;\n name: string;\n};\n\nexport type KBVersion = {\n id: number;\n name: string;\n type?: VersionType;\n};\n\nexport type ConnectionResultData = {\n formResult: FormSubmitResult;\n kbs: KBData[];\n};\n\nexport type ShareKBData = {\n name: string;\n serverUrl: string;\n versionList: KBVersion[];\n allVersions: boolean;\n};\n\nexport type VersionOption = \"Trunk\" | \"All\" | \"Select\";\n\nexport type VersionType = \"Branch\" | \"Frozen\";\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { g as getAssetPath, r as registerInstance, h, H as Host, a as getElement } from './index-10af18cf.js';
2
- import { g as getIconPath } from './MERCURY_ASSETS-7c06e424.js';
2
+ import { g as getIconPath } from './MERCURY_ASSETS-ccf43ae3.js';
3
3
  import { L as Locale } from './locale-e5107fad.js';
4
4
  import { A as ANIMATION_DOTS } from './common-c25d8c2f.js';
5
5