graphdb-workbench 3.2.0-TR2 → 3.2.0-TR4

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 (246) hide show
  1. package/dist/12358.4be185f89eebea9c35bf.bundle.js +3 -0
  2. package/dist/12358.4be185f89eebea9c35bf.bundle.js.map +1 -0
  3. package/dist/{12396.9a7f2862146b6f9adcb1.bundle.js → 12396.a1b7856e86d52282f34c.bundle.js} +2 -2
  4. package/dist/{12396.9a7f2862146b6f9adcb1.bundle.js.map → 12396.a1b7856e86d52282f34c.bundle.js.map} +1 -1
  5. package/dist/{15535.7b170e17ee0a58970ab6.bundle.js → 15535.c58319cba275ee5baa90.bundle.js} +2 -2
  6. package/dist/{15535.7b170e17ee0a58970ab6.bundle.js.map → 15535.c58319cba275ee5baa90.bundle.js.map} +1 -1
  7. package/dist/{16162.67e7c1f5f313481b1e80.bundle.js → 16162.2dc986d04777c8ae9489.bundle.js} +2 -2
  8. package/dist/{16162.67e7c1f5f313481b1e80.bundle.js.map → 16162.2dc986d04777c8ae9489.bundle.js.map} +1 -1
  9. package/dist/19402.7f6ea977348338acc824.bundle.js +2 -0
  10. package/dist/19402.7f6ea977348338acc824.bundle.js.map +1 -0
  11. package/dist/{20287.dd5bc263fe26adf34965.bundle.js → 20287.7cfc312df157f5bdea97.bundle.js} +2 -2
  12. package/dist/{20287.dd5bc263fe26adf34965.bundle.js.map → 20287.7cfc312df157f5bdea97.bundle.js.map} +1 -1
  13. package/dist/{21136.b7efcb40fb956ff1109c.bundle.js → 21136.67a9bcf4bb0c201d3fd1.bundle.js} +2 -2
  14. package/dist/{21136.b7efcb40fb956ff1109c.bundle.js.map → 21136.67a9bcf4bb0c201d3fd1.bundle.js.map} +1 -1
  15. package/dist/21142.7f8327c28d939fa26009.bundle.js +2 -0
  16. package/dist/21142.7f8327c28d939fa26009.bundle.js.map +1 -0
  17. package/dist/{21170.7832554eab9eaade6ffb.bundle.js → 21170.cecdf25699f68d4cf749.bundle.js} +2 -2
  18. package/dist/{21170.7832554eab9eaade6ffb.bundle.js.map → 21170.cecdf25699f68d4cf749.bundle.js.map} +1 -1
  19. package/dist/21195.e2c1fc69631041b97f8e.bundle.js +2 -0
  20. package/dist/21195.e2c1fc69631041b97f8e.bundle.js.map +1 -0
  21. package/dist/{25747.c01110e23b922cdd3d9e.bundle.js → 25747.c3dc5503ad696af5d5a3.bundle.js} +2 -2
  22. package/dist/{25747.c01110e23b922cdd3d9e.bundle.js.map → 25747.c3dc5503ad696af5d5a3.bundle.js.map} +1 -1
  23. package/dist/{27580.5a421770ab66d2dedc37.bundle.js → 27580.d038d43102a3e9eec97d.bundle.js} +2 -2
  24. package/dist/{27580.5a421770ab66d2dedc37.bundle.js.map → 27580.d038d43102a3e9eec97d.bundle.js.map} +1 -1
  25. package/dist/29350.d2791feedf54d2e4b7b6.bundle.js +2 -0
  26. package/dist/29350.d2791feedf54d2e4b7b6.bundle.js.map +1 -0
  27. package/dist/{31636.54e2817f8ae3998a34b3.bundle.js → 31636.fc6eba63d6d985d31673.bundle.js} +2 -2
  28. package/dist/{31636.54e2817f8ae3998a34b3.bundle.js.map → 31636.fc6eba63d6d985d31673.bundle.js.map} +1 -1
  29. package/dist/{32489.f7a2dc39cd61c2cd8874.bundle.js → 32489.e9af1ec463e2d4136732.bundle.js} +2 -2
  30. package/dist/{32489.f7a2dc39cd61c2cd8874.bundle.js.map → 32489.e9af1ec463e2d4136732.bundle.js.map} +1 -1
  31. package/dist/{34330.4b46c3a52d19f05fc0b2.bundle.js → 34330.990c99ea37f6cca46bad.bundle.js} +2 -2
  32. package/dist/34330.990c99ea37f6cca46bad.bundle.js.map +1 -0
  33. package/dist/{34495.be67c06c39909114bbe4.bundle.js → 34495.06c9997d58d0b0ba7152.bundle.js} +2 -2
  34. package/dist/{34495.be67c06c39909114bbe4.bundle.js.map → 34495.06c9997d58d0b0ba7152.bundle.js.map} +1 -1
  35. package/dist/36633.eba4270db7fdcf1aad4c.bundle.js +2 -0
  36. package/dist/36633.eba4270db7fdcf1aad4c.bundle.js.map +1 -0
  37. package/dist/36665.69d43b057bcfc55df3b5.bundle.js +2 -0
  38. package/dist/36665.69d43b057bcfc55df3b5.bundle.js.map +1 -0
  39. package/dist/{38360.efec913bb97c3b8588a4.bundle.js → 38360.ca92a04a1afcf9cfea7f.bundle.js} +2 -2
  40. package/dist/{38360.efec913bb97c3b8588a4.bundle.js.map → 38360.ca92a04a1afcf9cfea7f.bundle.js.map} +1 -1
  41. package/dist/{38644.800252af49cd67310834.bundle.js → 38644.29dbfb38e4089efa6697.bundle.js} +2 -2
  42. package/dist/{38644.800252af49cd67310834.bundle.js.map → 38644.29dbfb38e4089efa6697.bundle.js.map} +1 -1
  43. package/dist/{38843.29e34a5e5293cee51566.bundle.js → 38843.4b11f56e93f60fbe4e0a.bundle.js} +2 -2
  44. package/dist/{38843.29e34a5e5293cee51566.bundle.js.map → 38843.4b11f56e93f60fbe4e0a.bundle.js.map} +1 -1
  45. package/dist/{39518.0ca97879b92271d7c5e2.bundle.js → 39518.c577d83ed591fada064c.bundle.js} +2 -2
  46. package/dist/{39518.0ca97879b92271d7c5e2.bundle.js.map → 39518.c577d83ed591fada064c.bundle.js.map} +1 -1
  47. package/dist/{39539.7cea6717cc3a5ba91617.bundle.js → 39539.463ec29e136b100c0abe.bundle.js} +2 -2
  48. package/dist/{39539.7cea6717cc3a5ba91617.bundle.js.map → 39539.463ec29e136b100c0abe.bundle.js.map} +1 -1
  49. package/dist/40516.3cfaf1ff4704c038f944.bundle.js +2 -0
  50. package/dist/40516.3cfaf1ff4704c038f944.bundle.js.map +1 -0
  51. package/dist/{41453.4ae219d972a187c36bfc.bundle.js → 41453.241761ce8ff75036e5e0.bundle.js} +2 -2
  52. package/dist/{41453.4ae219d972a187c36bfc.bundle.js.map → 41453.241761ce8ff75036e5e0.bundle.js.map} +1 -1
  53. package/dist/{42129.0314e45b4b818b01b71f.bundle.js → 42129.f67dc6029cdab567bf54.bundle.js} +2 -2
  54. package/dist/{42129.0314e45b4b818b01b71f.bundle.js.map → 42129.f67dc6029cdab567bf54.bundle.js.map} +1 -1
  55. package/dist/42143.6c37997677f5ec643731.bundle.js +2 -0
  56. package/dist/42143.6c37997677f5ec643731.bundle.js.map +1 -0
  57. package/dist/{44444.02026ff20e2a843dc05b.bundle.js → 44444.a1b29c2329c7d4a39cc5.bundle.js} +2 -2
  58. package/dist/{44444.02026ff20e2a843dc05b.bundle.js.map → 44444.a1b29c2329c7d4a39cc5.bundle.js.map} +1 -1
  59. package/dist/44874.b16be286176dfe4aa766.bundle.js +2 -0
  60. package/dist/44874.b16be286176dfe4aa766.bundle.js.map +1 -0
  61. package/dist/49539.63984d5b37bc8b9a7244.bundle.js +2 -0
  62. package/dist/49539.63984d5b37bc8b9a7244.bundle.js.map +1 -0
  63. package/dist/{51087.b072d1c0e53403535283.bundle.js → 51087.1e118e7fe32a8c09d6cb.bundle.js} +2 -2
  64. package/dist/51087.1e118e7fe32a8c09d6cb.bundle.js.map +1 -0
  65. package/dist/{55217.4769c1f0615e364d8c2a.bundle.js → 55217.98a70cf01c4b7a826e82.bundle.js} +2 -2
  66. package/dist/55217.98a70cf01c4b7a826e82.bundle.js.map +1 -0
  67. package/dist/{55862.5e8602827fbf72e60cc2.bundle.js → 55862.1c3f1e807c8a05b1b6ed.bundle.js} +2 -2
  68. package/dist/{55862.5e8602827fbf72e60cc2.bundle.js.map → 55862.1c3f1e807c8a05b1b6ed.bundle.js.map} +1 -1
  69. package/dist/{58306.94b9336f68d11bdd72f0.bundle.js → 58306.a45182d200e3f8793644.bundle.js} +2 -2
  70. package/dist/{58306.94b9336f68d11bdd72f0.bundle.js.map → 58306.a45182d200e3f8793644.bundle.js.map} +1 -1
  71. package/dist/60039.5f9e955234f5eaf33372.bundle.js +2 -0
  72. package/dist/60039.5f9e955234f5eaf33372.bundle.js.map +1 -0
  73. package/dist/63415.7a4dfa072b5665c5995b.bundle.js +2 -0
  74. package/dist/63415.7a4dfa072b5665c5995b.bundle.js.map +1 -0
  75. package/dist/64118.edc8ed6671017d09ff4e.bundle.js +2 -0
  76. package/dist/64118.edc8ed6671017d09ff4e.bundle.js.map +1 -0
  77. package/dist/67232.bc980f2f0df606493105.bundle.js +2 -0
  78. package/dist/67232.bc980f2f0df606493105.bundle.js.map +1 -0
  79. package/dist/{67888.772326168aed83cbad9c.bundle.js → 67888.e21c0e4c70be6214fcd7.bundle.js} +2 -2
  80. package/dist/{67888.772326168aed83cbad9c.bundle.js.map → 67888.e21c0e4c70be6214fcd7.bundle.js.map} +1 -1
  81. package/dist/70938.c489d3ca5b00ad297139.bundle.js +2 -0
  82. package/dist/70938.c489d3ca5b00ad297139.bundle.js.map +1 -0
  83. package/dist/71920.c171884910616d02e2c6.bundle.js +2 -0
  84. package/dist/71920.c171884910616d02e2c6.bundle.js.map +1 -0
  85. package/dist/{72379.8a3290df05f18f8c65bd.bundle.js → 72379.cb41e26c33271a25816e.bundle.js} +2 -2
  86. package/dist/{72379.8a3290df05f18f8c65bd.bundle.js.map → 72379.cb41e26c33271a25816e.bundle.js.map} +1 -1
  87. package/dist/{73667.52fdbdadddafe9e9559b.bundle.js → 73667.ad957853dba08fd3be30.bundle.js} +2 -2
  88. package/dist/{73667.52fdbdadddafe9e9559b.bundle.js.map → 73667.ad957853dba08fd3be30.bundle.js.map} +1 -1
  89. package/dist/{73793.7e812bab1754ddd5efb5.bundle.js → 73793.79a311b387e5db776506.bundle.js} +2 -2
  90. package/dist/{73793.7e812bab1754ddd5efb5.bundle.js.map → 73793.79a311b387e5db776506.bundle.js.map} +1 -1
  91. package/dist/73964.7a3038b5726d50c1a051.bundle.js +2 -0
  92. package/dist/73964.7a3038b5726d50c1a051.bundle.js.map +1 -0
  93. package/dist/{75282.2f97d3a7d7f3fdd7aebf.bundle.js → 75282.8be5dde957dc6452c86a.bundle.js} +2 -2
  94. package/dist/{75282.2f97d3a7d7f3fdd7aebf.bundle.js.map → 75282.8be5dde957dc6452c86a.bundle.js.map} +1 -1
  95. package/dist/75849.0f6bab8b5749be998286.bundle.js +2 -0
  96. package/dist/75849.0f6bab8b5749be998286.bundle.js.map +1 -0
  97. package/dist/76013.9e71103dbb91bd9a558c.bundle.js +2 -0
  98. package/dist/76013.9e71103dbb91bd9a558c.bundle.js.map +1 -0
  99. package/dist/{78250.73e3013c5b2ebdddbf38.bundle.js → 78250.dd9bdc3db3ca0c84b25a.bundle.js} +2 -2
  100. package/dist/{78250.73e3013c5b2ebdddbf38.bundle.js.map → 78250.dd9bdc3db3ca0c84b25a.bundle.js.map} +1 -1
  101. package/dist/7928.9ab4b363abb28bfc6bd5.bundle.js +2 -0
  102. package/dist/7928.9ab4b363abb28bfc6bd5.bundle.js.map +1 -0
  103. package/dist/{79329.3d912887ba7e96090fb4.bundle.js → 79329.24a5e42cccee5055311a.bundle.js} +2 -2
  104. package/dist/{79329.3d912887ba7e96090fb4.bundle.js.map → 79329.24a5e42cccee5055311a.bundle.js.map} +1 -1
  105. package/dist/{82926.93a59d42bf8d49aaac8e.bundle.js → 82926.02f08566fe1f948d9e1f.bundle.js} +2 -2
  106. package/dist/{82926.93a59d42bf8d49aaac8e.bundle.js.map → 82926.02f08566fe1f948d9e1f.bundle.js.map} +1 -1
  107. package/dist/85609.68438b4955212d5fcb84.bundle.js +2 -0
  108. package/dist/85609.68438b4955212d5fcb84.bundle.js.map +1 -0
  109. package/dist/85788.501c7244b890d519f8cf.bundle.js +2 -0
  110. package/dist/85788.501c7244b890d519f8cf.bundle.js.map +1 -0
  111. package/dist/86142.04f4e4759998d4c37ccd.bundle.js +2 -0
  112. package/dist/86142.04f4e4759998d4c37ccd.bundle.js.map +1 -0
  113. package/dist/{89695.4ee87c52d4088115c51e.bundle.js → 89695.b7e90a123bc2875ccae4.bundle.js} +2 -2
  114. package/dist/89695.b7e90a123bc2875ccae4.bundle.js.map +1 -0
  115. package/dist/{9062.3541de664710a36fdac7.bundle.js → 9062.e1ad16e157f04b8c9dd8.bundle.js} +2 -2
  116. package/dist/{9062.3541de664710a36fdac7.bundle.js.map → 9062.e1ad16e157f04b8c9dd8.bundle.js.map} +1 -1
  117. package/dist/96089.4317e132ef8cc0033f83.bundle.js +2 -0
  118. package/dist/96089.4317e132ef8cc0033f83.bundle.js.map +1 -0
  119. package/dist/{99448.384b74c734331e5f8909.bundle.js → 99448.93e01a6a24e4a1cb0546.bundle.js} +2 -2
  120. package/dist/{99448.384b74c734331e5f8909.bundle.js.map → 99448.93e01a6a24e4a1cb0546.bundle.js.map} +1 -1
  121. package/dist/css/ttyg/chat-item-details.css +1 -1
  122. package/dist/css/ttyg/chat-panel.css +1 -1
  123. package/dist/i18n/locale-en.json +5 -1
  124. package/dist/i18n/locale-fr.json +5 -1
  125. package/dist/index.html +8 -8
  126. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  127. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  128. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  129. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  130. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  131. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  132. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  133. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  134. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  135. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  136. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  137. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  138. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  139. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  140. package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
  141. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  142. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  143. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  144. package/dist/js/angular/security/templates/user.html +2 -2
  145. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  146. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  147. package/dist/js/angular/ttyg/templates/chat-item-detail.html +5 -5
  148. package/dist/js/angular/ttyg/templates/chat-list.html +2 -2
  149. package/dist/js/angular/ttyg/templates/chat-panel.html +12 -7
  150. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  151. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +2 -2
  152. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  153. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  154. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  155. package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js → legacyWorkbench.ecf6300fd72cfffbcdb6.js} +3 -3
  156. package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js.map → legacyWorkbench.ecf6300fd72cfffbcdb6.js.map} +1 -1
  157. package/dist/pages/aclmanagement.html +2 -2
  158. package/dist/pages/autocomplete.html +1 -1
  159. package/dist/pages/choose-repository-type.html +1 -1
  160. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  161. package/dist/pages/create-index.html +1 -1
  162. package/dist/pages/dependencies.html +1 -1
  163. package/dist/pages/domainRangeInfo.html +2 -2
  164. package/dist/pages/edit.html +1 -1
  165. package/dist/pages/explore.html +1 -1
  166. package/dist/pages/export.html +1 -1
  167. package/dist/pages/find.html +1 -1
  168. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  169. package/dist/pages/graphs-visualizations.html +7 -7
  170. package/dist/pages/guides.html +1 -1
  171. package/dist/pages/import.html +2 -2
  172. package/dist/pages/jdbc-create.html +1 -1
  173. package/dist/pages/login.html +1 -1
  174. package/dist/pages/monitor/backup-and-restore.html +1 -1
  175. package/dist/pages/monitor/queries.html +1 -1
  176. package/dist/pages/monitor/resources.html +1 -1
  177. package/dist/pages/namespaces.html +2 -2
  178. package/dist/pages/plugins.html +1 -1
  179. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  180. package/dist/pages/rdfrank.html +2 -2
  181. package/dist/pages/repositories.html +1 -1
  182. package/dist/pages/repository.html +1 -1
  183. package/dist/pages/similarity-indexes.html +1 -1
  184. package/dist/pages/sparql-editor.html +1 -1
  185. package/dist/pages/sparql-template-create.html +1 -1
  186. package/dist/pages/ux-test1.html +2 -2
  187. package/dist/pages/webapi.html +2 -2
  188. package/dist/plugins.js +1 -1
  189. package/dist/res/swagger5/index.html +11 -11
  190. package/package.json +1 -1
  191. package/dist/12358.2061f29dc113149946a3.bundle.js +0 -3
  192. package/dist/12358.2061f29dc113149946a3.bundle.js.map +0 -1
  193. package/dist/19402.07424b4b7c9dd775d860.bundle.js +0 -2
  194. package/dist/19402.07424b4b7c9dd775d860.bundle.js.map +0 -1
  195. package/dist/21142.ec45fad4d52b36961d17.bundle.js +0 -2
  196. package/dist/21142.ec45fad4d52b36961d17.bundle.js.map +0 -1
  197. package/dist/21195.caae6cc33d755ad52df4.bundle.js +0 -2
  198. package/dist/21195.caae6cc33d755ad52df4.bundle.js.map +0 -1
  199. package/dist/29350.9976c09d5cdaa48ecb19.bundle.js +0 -2
  200. package/dist/29350.9976c09d5cdaa48ecb19.bundle.js.map +0 -1
  201. package/dist/34330.4b46c3a52d19f05fc0b2.bundle.js.map +0 -1
  202. package/dist/36633.bd17a2028ef302870ec4.bundle.js +0 -2
  203. package/dist/36633.bd17a2028ef302870ec4.bundle.js.map +0 -1
  204. package/dist/36665.eda6cfdf545f2608a6c7.bundle.js +0 -2
  205. package/dist/36665.eda6cfdf545f2608a6c7.bundle.js.map +0 -1
  206. package/dist/40516.734b24eead67142c4045.bundle.js +0 -2
  207. package/dist/40516.734b24eead67142c4045.bundle.js.map +0 -1
  208. package/dist/42143.c11e5c28f2b8e9952dbb.bundle.js +0 -2
  209. package/dist/42143.c11e5c28f2b8e9952dbb.bundle.js.map +0 -1
  210. package/dist/44874.5854c207bbe2c4f2438e.bundle.js +0 -2
  211. package/dist/44874.5854c207bbe2c4f2438e.bundle.js.map +0 -1
  212. package/dist/49539.d253a79e8b9710776e48.bundle.js +0 -2
  213. package/dist/49539.d253a79e8b9710776e48.bundle.js.map +0 -1
  214. package/dist/51087.b072d1c0e53403535283.bundle.js.map +0 -1
  215. package/dist/55217.4769c1f0615e364d8c2a.bundle.js.map +0 -1
  216. package/dist/60039.cb9262af0bc63b635c76.bundle.js +0 -2
  217. package/dist/60039.cb9262af0bc63b635c76.bundle.js.map +0 -1
  218. package/dist/63415.81af22cc29be1144e07f.bundle.js +0 -2
  219. package/dist/63415.81af22cc29be1144e07f.bundle.js.map +0 -1
  220. package/dist/64118.fb6952c8ef6fc9117f35.bundle.js +0 -2
  221. package/dist/64118.fb6952c8ef6fc9117f35.bundle.js.map +0 -1
  222. package/dist/67232.e76f40f9d09e64ebb365.bundle.js +0 -2
  223. package/dist/67232.e76f40f9d09e64ebb365.bundle.js.map +0 -1
  224. package/dist/70938.6d0055f916f6d1bc91bb.bundle.js +0 -2
  225. package/dist/70938.6d0055f916f6d1bc91bb.bundle.js.map +0 -1
  226. package/dist/71920.46e7b0ec1d22adcd8e55.bundle.js +0 -2
  227. package/dist/71920.46e7b0ec1d22adcd8e55.bundle.js.map +0 -1
  228. package/dist/73964.fd1ad5e7aa228ad4cbbb.bundle.js +0 -2
  229. package/dist/73964.fd1ad5e7aa228ad4cbbb.bundle.js.map +0 -1
  230. package/dist/75849.bd0bdefa903741034a71.bundle.js +0 -2
  231. package/dist/75849.bd0bdefa903741034a71.bundle.js.map +0 -1
  232. package/dist/76013.3211939a02cf4fb2529e.bundle.js +0 -2
  233. package/dist/76013.3211939a02cf4fb2529e.bundle.js.map +0 -1
  234. package/dist/7928.7900a3911c83495d74dd.bundle.js +0 -2
  235. package/dist/7928.7900a3911c83495d74dd.bundle.js.map +0 -1
  236. package/dist/85609.680b755726c66ea1de34.bundle.js +0 -2
  237. package/dist/85609.680b755726c66ea1de34.bundle.js.map +0 -1
  238. package/dist/85788.4e0818c48b6f29153db4.bundle.js +0 -2
  239. package/dist/85788.4e0818c48b6f29153db4.bundle.js.map +0 -1
  240. package/dist/86142.c29959b68edc59a9b696.bundle.js +0 -2
  241. package/dist/86142.c29959b68edc59a9b696.bundle.js.map +0 -1
  242. package/dist/89695.4ee87c52d4088115c51e.bundle.js.map +0 -1
  243. package/dist/96089.7e28823f34c450de1f7e.bundle.js +0 -2
  244. package/dist/96089.7e28823f34c450de1f7e.bundle.js.map +0 -1
  245. /package/dist/{12358.2061f29dc113149946a3.bundle.js.LICENSE.txt → 12358.4be185f89eebea9c35bf.bundle.js.LICENSE.txt} +0 -0
  246. /package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js.LICENSE.txt → legacyWorkbench.ecf6300fd72cfffbcdb6.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- export const __webpack_id__=39539;export const __webpack_ids__=[39539];export const __webpack_modules__={39539:(e,i,d)=>{d.r(i),d.d(i,{default:()=>l});const l='<link href="css/dynamic-form.css?v=3.2.0-TR2" rel="stylesheet"/> <div class="dynamic-form-container"> <form name="dynamicForm" novalidate class="dynamic-form"> <div ng-repeat="model in formModel.models"> <div ng-if="model.groupId && (model.fields.length > 0 || showAllFields)" class="form-group"> <h5 class="group-title"> <span gdb-tooltip="{{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + \'.tooltip\') : null) | translate}}"> {{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + \'.label\') : model.groupId) | translate}} </span> </h5> <dynamic-form-field ng-repeat="field in model.fields" field="field" form="dynamicForm" translation-key-prefix="translationKeyPrefix"> </dynamic-form-field> <div class="hidden-fields"> <dynamic-form-field ng-if="showAllFields" ng-repeat="field in model.hiddenFields" field="field" form="dynamicForm" translation-key-prefix="translationKeyPrefix"> </dynamic-form-field> </div> </div> <dynamic-form-field ng-if="!model.groupId" field="model" form-name="dynamicForm" translation-key-prefix="translationKeyPrefix"> </dynamic-form-field> </div> </form> </div> '}};
2
- //# sourceMappingURL=39539.7cea6717cc3a5ba91617.bundle.js.map
1
+ export const __webpack_id__=39539;export const __webpack_ids__=[39539];export const __webpack_modules__={39539:(e,i,d)=>{d.r(i),d.d(i,{default:()=>l});const l='<link href="css/dynamic-form.css?v=3.2.0-TR4" rel="stylesheet"/> <div class="dynamic-form-container"> <form name="dynamicForm" novalidate class="dynamic-form"> <div ng-repeat="model in formModel.models"> <div ng-if="model.groupId && (model.fields.length > 0 || showAllFields)" class="form-group"> <h5 class="group-title"> <span gdb-tooltip="{{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + \'.tooltip\') : null) | translate}}"> {{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + \'.label\') : model.groupId) | translate}} </span> </h5> <dynamic-form-field ng-repeat="field in model.fields" field="field" form="dynamicForm" translation-key-prefix="translationKeyPrefix"> </dynamic-form-field> <div class="hidden-fields"> <dynamic-form-field ng-if="showAllFields" ng-repeat="field in model.hiddenFields" field="field" form="dynamicForm" translation-key-prefix="translationKeyPrefix"> </dynamic-form-field> </div> </div> <dynamic-form-field ng-if="!model.groupId" field="model" form-name="dynamicForm" translation-key-prefix="translationKeyPrefix"> </dynamic-form-field> </div> </form> </div> '}};
2
+ //# sourceMappingURL=39539.463ec29e136b100c0abe.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"39539.7cea6717cc3a5ba91617.bundle.js","mappings":"uJAGA,QAFW,omC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/dynamic-form/templates/dynamic-form.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/dynamic-form.css?v=3.2.0-TR2\" rel=\"stylesheet\"/> <div class=\"dynamic-form-container\"> <form name=\"dynamicForm\" novalidate class=\"dynamic-form\"> <div ng-repeat=\"model in formModel.models\"> <div ng-if=\"model.groupId && (model.fields.length > 0 || showAllFields)\" class=\"form-group\"> <h5 class=\"group-title\"> <span gdb-tooltip=\"{{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + '.tooltip') : null) | translate}}\"> {{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + '.label') : model.groupId) | translate}} </span> </h5> <dynamic-form-field ng-repeat=\"field in model.fields\" field=\"field\" form=\"dynamicForm\" translation-key-prefix=\"translationKeyPrefix\"> </dynamic-form-field> <div class=\"hidden-fields\"> <dynamic-form-field ng-if=\"showAllFields\" ng-repeat=\"field in model.hiddenFields\" field=\"field\" form=\"dynamicForm\" translation-key-prefix=\"translationKeyPrefix\"> </dynamic-form-field> </div> </div> <dynamic-form-field ng-if=\"!model.groupId\" field=\"model\" form-name=\"dynamicForm\" translation-key-prefix=\"translationKeyPrefix\"> </dynamic-form-field> </div> </form> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"39539.463ec29e136b100c0abe.bundle.js","mappings":"uJAGA,QAFW,omC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/dynamic-form/templates/dynamic-form.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/dynamic-form.css?v=3.2.0-TR4\" rel=\"stylesheet\"/> <div class=\"dynamic-form-container\"> <form name=\"dynamicForm\" novalidate class=\"dynamic-form\"> <div ng-repeat=\"model in formModel.models\"> <div ng-if=\"model.groupId && (model.fields.length > 0 || showAllFields)\" class=\"form-group\"> <h5 class=\"group-title\"> <span gdb-tooltip=\"{{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + '.tooltip') : null) | translate}}\"> {{(translationKeyPrefix ? (translationKeyPrefix + model.groupId + '.label') : model.groupId) | translate}} </span> </h5> <dynamic-form-field ng-repeat=\"field in model.fields\" field=\"field\" form=\"dynamicForm\" translation-key-prefix=\"translationKeyPrefix\"> </dynamic-form-field> <div class=\"hidden-fields\"> <dynamic-form-field ng-if=\"showAllFields\" ng-repeat=\"field in model.hiddenFields\" field=\"field\" form=\"dynamicForm\" translation-key-prefix=\"translationKeyPrefix\"> </dynamic-form-field> </div> </div> <dynamic-form-field ng-if=\"!model.groupId\" field=\"model\" form-name=\"dynamicForm\" translation-key-prefix=\"translationKeyPrefix\"> </dynamic-form-field> </div> </form> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_id__=40516;export const __webpack_ids__=[3909,36633,40516,63415,64871,87252];export const __webpack_modules__={3909:()=>{function e(){return{restrict:"E",require:"ngModel",scope:{ngModel:"=",ngDisabled:"=",placeholder:"@"},templateUrl:"js/angular/core/templates/editable-content/editable-content.html",link:function(e,t,s,a){const n=t.find("div"),i=()=>{e.ngDisabled||e.$apply(()=>{n.html().length&&!n.text().trim().length&&n.empty(),a.$setViewValue(n[0].innerText)})};a.$render=()=>{n.html(a.$viewValue||"")};const r=e=>{e.preventDefault();const t=(e.originalEvent||e).clipboardData.getData("text/plain"),s=window.getSelection();if(!s.rangeCount)return;s.deleteFromDocument();const a=s.getRangeAt(0),n=document.createDocumentFragment(),i=t.split("\n");i.forEach((e,t)=>{n.appendChild(document.createTextNode(e)),t<i.length-1&&n.appendChild(document.createElement("br"))}),a.insertNode(n),s.collapseToEnd()};e.$on("$destroy",()=>{n.off("blur keyup change input",i),n.off("paste",r)}),n.on("blur keyup change input",i),n.on("paste",r)}}}angular.module("graphdb.framework.core.directives.editable-content",[]).directive("editableContent",e),e.$inject=[]},13815:(e,t,s)=>{s.r(t),s(64118),s(3909);var a=s(71920),n=s(36633),i=s(63415),r=s(98980),o=s(69937);function h(e,t,s){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-panel.html",link:(e,h,d)=>{e.chat=void 0,e.selectedAgent=void 0,e.chatItem=void 0,e.askingChatItem=void 0,e.waitingForLastMessage=!1,e.loadingChat=!0,e.showCancelButton=!1,e.ask=()=>{e.chatItem.question.timestamp=Date.now(),e.askingChatItem=(0,r.cloneDeep)(e.chatItem),e.chatItem.chatId?u(e.chatItem):c(),e.chatItem=l(),p(),_()},e.cancelPendingQuestion=()=>{e.showCancelButton=!1,s.emit(a.TTYGEventName.CANCEL_PENDING_QUESTION,e.chatItem)},e.regenerateQuestion=t=>{const s=l();s.setQuestionMessage(t.getQuestionMessage()),s.question.timestamp=Date.now(),e.askingChatItem=s,u(s),p()},e.onKeypressOnInput=t=>{e.askingChatItem||"Enter"!==t.key||t.shiftKey||t.ctrlKey||e.ask()},e.onAskHowDeliveredAnswer=()=>{const s=l();s.setQuestionMessage(t.instant("ttyg.chat_panel.btn.derive_answer.label")),s.question.timestamp=Date.now(),e.askingChatItem=(0,r.cloneDeep)(s),u(s),p()},e.getAgentName=e=>{const a=s.getAgent(e);return a?a.name:(0,o.Gz)(t.instant("ttyg.chat_panel.deleted_agent"))};const c=()=>{s.emit(a.TTYGEventName.CREATE_CHAT,e.chatItem)},u=e=>{s.emit(a.TTYGEventName.ASK_QUESTION,e)},g=t=>{e.waitingForLastMessage=t,e.showCancelButton=t},m=()=>{e.chatItem=(0,r.cloneDeep)(e.askingChatItem),e.askingChatItem=void 0,g(!1)},l=()=>{const t=new i.ChatItemModel;return t.question=new n.ChatMessageModel({role:n.CHAT_MESSAGE_ROLE.USER}),e.chat&&(t.chatId=e.chat.id),e.selectedAgent&&(t.agentId=e.selectedAgent.id),t},_=()=>{setTimeout(()=>{const e=document.querySelector(".question-input");e&&e.focus()})},p=()=>{setTimeout(()=>{const e=h.find(".chat-details")[0];e&&(e.scrollTop=e.scrollHeight)})},I=()=>{e.chat=void 0,e.loadingChat=!1,e.chatItem=l(),e.askingChatItem=void 0,g(!1),_()},T=[];T.push(e.$watchCollection("chat.chatHistory.items",p)),T.push(s.onSelectedChatUpdated(t=>{if(e.chat=t,!e.chat||e.chat.isNew())return;e.loadingChat=!1;const a=e.chatItem.question.message;if(e.chatItem=l(),e.chatItem.question.message=a,e.askingChatItem=void 0,e.chat){const t=e.chat.chatHistory.getLast();t&&t.agentId&&s.selectAgent(s.getAgent(t.agentId))}_()})),T.push(s.onLastMessageReceived(()=>{g(!1)})),T.push(s.onSelectedAgentChanged(t=>{e.selectedAgent=t,e.selectedAgent&&e.chatItem&&(e.chatItem.agentId=e.selectedAgent.id),_()})),T.push(s.onSelectedChatChanged(t=>{t?(e.loadingChat=!t.isNew(),e.chatItem=l(),g(!1),_()):I()})),T.push(s.subscribe(a.TTYGEventName.LOAD_CHAT_FAILURE,()=>{e.loadingChat=!1,e.chatItem=l(),_()})),T.push(s.subscribe(a.TTYGEventName.ASK_QUESTION_FAILURE,m)),T.push(s.subscribe(a.TTYGEventName.CREATE_CHAT_FAILURE,m)),T.push(s.subscribe(a.TTYGEventName.DELETE_CHAT_SUCCESSFUL,t=>{e.chat&&t.id===e.chat.id&&I()})),T.push(s.subscribe(a.TTYGEventName.ASK_QUESTION_STARTING,()=>{g(!0)})),e.$on("$destroy",()=>{T.forEach(e=>e())}),e.chatItem=l(),_()}}}angular.module("graphdb.framework.ttyg.directives.chat-panel",["graphdb.framework.ttyg.directives.chat-item-detail","graphdb.framework.core.directives.editable-content"]).directive("chatPanel",h),h.$inject=["toastr","$translate","TTYGContextService"]},36633:(e,t,s)=>{s.r(t),s.d(t,{CHAT_MESSAGE_ROLE:()=>n,ChatMessageModel:()=>a});class a{constructor(e){this._id=e.id,this._role=e.role,this._message=e.message,this._timestamp=1e3*e.timestamp,this.tokenUsageInfo=e.tokenUsageInfo,this._isTerminalState=e.isTerminalState,this._status=e.status}addToChatAnswer(e){e.messages=[this]}get id(){return this._id}set id(e){this._id=e}get role(){return this._role}set role(e){this._role=e}get message(){return this._message}set message(e){this._message=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}get isTerminalState(){return this._isTerminalState}set isTerminalState(e){this._isTerminalState=e}get status(){return this._status}set status(e){this._status=e}}const n={USER:"user",ASSISTANT:"assistant"}},63415:(e,t,s)=>{s.r(t),s.d(t,{ChatItemModel:()=>n,ChatItemsListModel:()=>i});var a=s(36633);class n{constructor(e,t){this._chatId=e,this._agentId=void 0,this._question=t,this._answers=[]}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get agentId(){return this._agentId}set agentId(e){this._agentId=e}get question(){return this._question}set question(e){this._question=e}get answers(){return this._answers}set answers(e){this._answers=e}setQuestionMessage(e){this._question||(this._question=new a.ChatMessageModel({role:a.CHAT_MESSAGE_ROLE.USER})),this._question.message=e}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message,tzOffset:-(new Date).getTimezoneOffset()}}toExplainResponsePayload(e){return{conversationId:this._chatId,answerId:e}}}class i{constructor(e=[]){this._items=e}isEmpty(){return 0===this._items.length}appendItem(e){this._items.push(e)}get items(){return this._items}set items(e){this._items=e||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}},87252:(e,t,s)=>{s.r(t),s.d(t,{ExplainQueryMethodModel:()=>i,ExplainQueryMethodsListModel:()=>n,ExplainQueryType:()=>r,ExplainResponseModel:()=>a});class a{constructor(e={}){this._chatId=e.chatId,this._answerId=e.answerId,this._queryMethods=e.queryMethods,this._expanded=void 0===e.expanded||e.expanded}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get answerId(){return this._answerId}set answerId(e){this._answerId=e}get queryMethods(){return this._queryMethods}set queryMethods(e){this._queryMethods=e}get expanded(){return this._expanded}set expanded(e){this._expanded=e}}class n{constructor(e=[]){this._items=e}get items(){return this._items}set items(e){this._items=e}}class i{constructor(e={}){this._name=e.name,this._rawQuery=e.rawQuery,this._query=e.query,this._queryType=e.queryType,this._errorMessage=e.errorOutput}get name(){return this._name}set name(e){this._name=e}get rawQuery(){return this._rawQuery}set rawQuery(e){this._rawQuery=e}get query(){return this._query}set query(e){this._query=e}get queryType(){return this._queryType}set queryType(e){this._queryType=e}get errorMessage(){return this._errorMessage}set errorMessage(e){this._errorMessage=e}}const r={SPARQL:"sparql",JSON:"json",OTHER:"other"}}};
2
+ //# sourceMappingURL=40516.3cfaf1ff4704c038f944.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"40516.3cfaf1ff4704c038f944.bundle.js","mappings":"gJAoBA,SAASA,IACL,MAAO,CACHC,SAAU,IACVC,QAAS,UACTC,MAAO,CACHC,QAAS,IACTC,WAAY,IACZC,YAAa,KAEjBC,YAAa,mEACbC,KAAM,SAASL,EAAOM,EAASC,EAAOC,GAMlC,MAAMC,EAAcH,EAAQI,KAAK,OAU3BC,EAAmBA,KAChBX,EAAME,YACPF,EAAMY,OAAO,KACLH,EAAYI,OAAOC,SAAWL,EAAYM,OAAOC,OAAOF,QAExDL,EAAYQ,QAEhBT,EAAYU,cAAcT,EAAY,GAAGU,cAQrDX,EAAYY,QAAU,KAClBX,EAAYI,KAAKL,EAAYa,YAAc,KAU/C,MAAMC,EAAgBC,IAClBA,EAAMC,iBAEN,MAAMT,GAAQQ,EAAME,eAAiBF,GAAOG,cAAcC,QAAQ,cAC5DC,EAAYC,OAAOC,eAEzB,IAAKF,EAAUG,WAAY,OAE3BH,EAAUI,qBACV,MAAMC,EAAQL,EAAUM,WAAW,GAC7BC,EAAWC,SAASC,yBACpBC,EAAQvB,EAAKwB,MAAM,MAEzBD,EAAME,QAAQ,CAACC,EAAMC,KACjBP,EAASQ,YAAYP,SAASQ,eAAeH,IACzCC,EAAQJ,EAAMxB,OAAS,GACvBqB,EAASQ,YAAYP,SAASS,cAAc,SAIpDZ,EAAMa,WAAWX,GACjBP,EAAUmB,iBAed/C,EAAMgD,IAAI,WALmBC,KACzBxC,EAAYyC,IAAI,0BAA2BvC,GAC3CF,EAAYyC,IAAI,QAAS5B,KAI7Bb,EAAY0C,GAAG,0BAA2BxC,GAC1CF,EAAY0C,GAAG,QAAS7B,EAC5B,EAER,CAnGA8B,QACKC,OAAO,qDAHI,IAIXC,UAAU,kB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C,WAAahC,CACtB,CAEA,gBAAIoC,GACA,OAAOjD,KAAK+C,aAChB,CAEA,gBAAIE,CAAapC,GACbb,KAAK+C,cAAgBlC,CACzB,EAGG,MAAMqC,EAAmB,CAC5BC,OAAQ,SACRC,KAAM,OACNC,MAAO,Q","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/editable-content/editable-content.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/directives/chat-panel.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-message.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-item.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/explain-response.js"],"sourcesContent":["/**\n * @ngdoc directive\n * @name editableContent\n * @module graphdb.framework.core.directives.editable-content\n * @restrict E\n * @description\n * A reusable contenteditable directive bound to an ngModel. It allows editable plain-text input and supports disabling and placeholder text.\n *\n * @param {string} ngModel - The model to bind contenteditable input to.\n * @param {boolean=} ngDisabled - Disables the contenteditable field when true.\n * @param {string=} placeholder - Placeholder text to show when input is empty.\n */\nconst modules = [];\n\nangular\n .module('graphdb.framework.core.directives.editable-content', modules)\n .directive('editableContent', editableContent);\n\neditableContent.$inject = [];\n\nfunction editableContent() {\n return {\n restrict: 'E',\n require: 'ngModel',\n scope: {\n ngModel: '=',\n ngDisabled: '=',\n placeholder: '@'\n },\n templateUrl: 'js/angular/core/templates/editable-content/editable-content.html',\n link: function(scope, element, attrs, ngModelCtrl) {\n\n // =========================\n // Private variables\n // =========================\n\n const editableDiv = element.find('div');\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Updates the bound ngModel with the current contenteditable value.\n * Also clears invalid HTML when only whitespace remains.\n */\n const updateModelValue = () => {\n if (!scope.ngDisabled) {\n scope.$apply(() => {\n if (editableDiv.html().length && !editableDiv.text().trim().length) {\n // Fixes a problem with the placeholder when type some word and delete it.\n editableDiv.empty();\n }\n ngModelCtrl.$setViewValue(editableDiv[0].innerText);\n });\n }\n };\n\n /**\n * Renders the model value into the contenteditable element.\n */\n ngModelCtrl.$render = () => {\n editableDiv.html(ngModelCtrl.$viewValue || '');\n };\n\n /**\n * Handles paste events in the contenteditable element by inserting plain text only.\n * Prevents the default paste behavior and manually inserts the clipboard text as plain text,\n * preserving line breaks by converting them to <br> elements.\n *\n * @param {Event} event - The paste event object containing clipboard data.\n */\n const pasteHandler = (event) => {\n event.preventDefault();\n\n const text = (event.originalEvent || event).clipboardData.getData('text/plain');\n const selection = window.getSelection();\n\n if (!selection.rangeCount) return;\n\n selection.deleteFromDocument();\n const range = selection.getRangeAt(0);\n const fragment = document.createDocumentFragment();\n const lines = text.split('\\n');\n\n lines.forEach((line, index) => {\n fragment.appendChild(document.createTextNode(line));\n if (index < lines.length - 1) {\n fragment.appendChild(document.createElement('br'));\n }\n });\n\n range.insertNode(fragment);\n selection.collapseToEnd();\n }\n\n // =========================\n // Subscriptions\n // =========================\n\n /**\n * Unsubscribes from all watchers and event listeners to prevent memory leaks.\n */\n const removeAllSubscribers = () => {\n editableDiv.off('blur keyup change input', updateModelValue);\n editableDiv.off('paste', pasteHandler);\n };\n\n scope.$on('$destroy', removeAllSubscribers);\n editableDiv.on('blur keyup change input', updateModelValue);\n editableDiv.on('paste', pasteHandler)\n }\n };\n}\n","import './chat-item-detail.directive';\nimport 'angular/core/directives/editable-content/editable-content';\nimport {TTYGEventName} from \"../services/ttyg-context.service\";\nimport {CHAT_MESSAGE_ROLE, ChatMessageModel} from \"../../models/ttyg/chat-message\";\nimport {ChatItemModel} from \"../../models/ttyg/chat-item\";\nimport {cloneDeep} from \"lodash\";\nimport {decodeHTML} from \"../../../../app\";\n\nconst modules = [\n 'graphdb.framework.ttyg.directives.chat-item-detail',\n 'graphdb.framework.core.directives.editable-content',\n];\n\nangular\n .module('graphdb.framework.ttyg.directives.chat-panel', modules)\n .directive('chatPanel', ChatPanelComponent);\n\nChatPanelComponent.$inject = ['toastr', '$translate', 'TTYGContextService'];\n\n/**\n * @ngdoc directive\n * @name graphdb.framework.ttyg.directives.chat-panel:chatPanel\n * @restrict E\n * @description\n *\n * This directive represents a chat panel component that allows users to interact with a chat. It provides functionality for asking questions,\n * regenerating chat content, and other interactive features.\n *\n * It encapsulates the logic and presentation for displaying and managing chat-related interactions.\n *\n * @example\n * <chat-panel></chat-panel>\n */\nfunction ChatPanelComponent(toastr, $translate, TTYGContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/ttyg/templates/chat-panel.html',\n link: ($scope, element, attrs) => {\n // =========================\n // Public variables\n // =========================\n\n /**\n * @type {ChatModel}\n */\n $scope.chat = undefined;\n\n /**\n * @type {AgentModel}\n */\n $scope.selectedAgent = undefined;\n\n /**\n * @type {ChatItemModel}\n */\n $scope.chatItem = undefined;\n\n /**\n * @type {ChatItemModel}\n */\n $scope.askingChatItem = undefined;\n\n /**\n * True while a question is being handled. It may involve multiple requests until it turns back to false.\n * @type {boolean}\n */\n $scope.waitingForLastMessage = false;\n\n /**\n * Flag that indicates that the chat is about to be changed.\n * @type {boolean}\n */\n $scope.loadingChat = true;\n\n $scope.showCancelButton = false;\n\n // =========================\n // Private variables\n // =========================\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Handles the ask question action.\n */\n $scope.ask = () => {\n $scope.chatItem.question.timestamp = Date.now();\n $scope.askingChatItem = cloneDeep($scope.chatItem);\n if (!$scope.chatItem.chatId) {\n createNewChat();\n } else {\n askQuestion($scope.chatItem);\n }\n $scope.chatItem = getEmptyChatItem();\n scrollToBottom();\n focusQuestionInput();\n };\n\n\n /**\n * Cancels a pending question tied to the current scope.\n * Hides cancel button.\n */\n $scope.cancelPendingQuestion = () => {\n $scope.showCancelButton = false;\n TTYGContextService.emit(TTYGEventName.CANCEL_PENDING_QUESTION, $scope.chatItem);\n };\n\n /**\n * Regenerates the answer for the provided chat item.\n *\n * @param {ChatItemModel} chatItem - The chat item that contains the question to be regenerated.\n */\n $scope.regenerateQuestion = (chatItem) => {\n const regenerateChatItem = getEmptyChatItem();\n regenerateChatItem.setQuestionMessage(chatItem.getQuestionMessage());\n regenerateChatItem.question.timestamp = Date.now();\n $scope.askingChatItem = regenerateChatItem;\n askQuestion(regenerateChatItem);\n scrollToBottom();\n };\n\n /**\n * Handles pressing the Enter key in the question input.\n * Will not trigger if `Shift` or `Ctrl` keys are pressed, or if Ask button is disabled.\n *\n * @param {KeyboardEvent} $event - The keyboard event triggered by the user interaction.\n */\n $scope.onKeypressOnInput = ($event) => {\n if (!$scope.askingChatItem && $event.key === 'Enter' && !$event.shiftKey && !$event.ctrlKey) {\n $scope.ask();\n }\n };\n\n $scope.onAskHowDeliveredAnswer = () => {\n const askHowDerivedAnswerChatItem = getEmptyChatItem();\n askHowDerivedAnswerChatItem.setQuestionMessage($translate.instant('ttyg.chat_panel.btn.derive_answer.label'));\n askHowDerivedAnswerChatItem.question.timestamp = Date.now();\n $scope.askingChatItem = cloneDeep(askHowDerivedAnswerChatItem);\n askQuestion(askHowDerivedAnswerChatItem);\n scrollToBottom();\n };\n\n /**\n * Finds out if agent with such id exists and returns its name or a default message for deleted agent.\n * @param {string} agentId\n * @return {string}\n */\n $scope.getAgentName = (agentId) => {\n const agent = TTYGContextService.getAgent(agentId);\n return agent ? agent.name : decodeHTML($translate.instant('ttyg.chat_panel.deleted_agent'));\n };\n\n // =========================\n // Private functions\n // =========================\n\n const createNewChat = () => {\n TTYGContextService.emit(TTYGEventName.CREATE_CHAT, $scope.chatItem);\n };\n\n const askQuestion = (chatItem) => {\n TTYGContextService.emit(TTYGEventName.ASK_QUESTION, chatItem);\n };\n\n const setAskingState = (isAsking) => {\n $scope.waitingForLastMessage = isAsking;\n $scope.showCancelButton = isAsking;\n };\n\n const onAskQuestionStarted = () => {\n setAskingState(true);\n };\n\n /**\n * Handles the update of the selected chat.\n * @param {ChatModel} chat - the new selected chat.\n */\n const onSelectedChatUpdated = (chat) => {\n $scope.chat = chat;\n if (!$scope.chat || $scope.chat.isNew()) {\n // Do nothing if the chat is new and a question is currently being asked.\n return;\n }\n $scope.loadingChat = false;\n const message = $scope.chatItem.question.message;\n $scope.chatItem = getEmptyChatItem();\n $scope.chatItem.question.message = message;\n $scope.askingChatItem = undefined;\n if ($scope.chat) {\n // TODO: Why on earth this is here? The chat changed handler is in the ttyg.view. Why doesn't it handle this\n // but we need to go through 2 more events to achieve the same result?\n const lastChatItem = $scope.chat.chatHistory.getLast();\n if (lastChatItem && lastChatItem.agentId) {\n TTYGContextService.selectAgent(TTYGContextService.getAgent(lastChatItem.agentId));\n }\n }\n focusQuestionInput();\n };\n\n const onLastMessageReceived = () => {\n setAskingState(false);\n };\n\n /**\n * Handles the failure of loading the chat and the server returns 404. This might happen if the chat does\n * not exist anymore because it was deleted by another user for example.\n */\n const onLoadChatFailure = () => {\n $scope.loadingChat = false;\n $scope.chatItem = getEmptyChatItem();\n focusQuestionInput();\n };\n\n const onSelectedChatChanged = (chat) => {\n if (chat) {\n // Skip the loading indication if it is a new chat that hasn't received an answer yet.\n $scope.loadingChat = !chat.isNew();\n $scope.chatItem = getEmptyChatItem();\n setAskingState(false);\n focusQuestionInput();\n } else {\n reset();\n }\n };\n\n const onQuestionFailure = () => {\n $scope.chatItem = cloneDeep($scope.askingChatItem);\n $scope.askingChatItem = undefined;\n setAskingState(false);\n };\n\n /**\n * Handles the change of the selected agent.\n * @param {AgentModel} agent - the new selected agent.\n */\n const onSelectedAgentChanged = (agent) => {\n $scope.selectedAgent = agent;\n if ($scope.selectedAgent && $scope.chatItem) {\n $scope.chatItem.agentId = $scope.selectedAgent.id;\n }\n focusQuestionInput();\n };\n\n const onChatDeleted = (deletedChat) => {\n if ($scope.chat && deletedChat.id === $scope.chat.id) {\n reset();\n }\n };\n\n const getEmptyChatItem = () => {\n const chatItem = new ChatItemModel();\n chatItem.question = new ChatMessageModel({role: CHAT_MESSAGE_ROLE.USER});\n\n if ($scope.chat) {\n chatItem.chatId = $scope.chat.id;\n }\n\n if ($scope.selectedAgent) {\n chatItem.agentId = $scope.selectedAgent.id;\n }\n\n return chatItem;\n };\n\n const focusQuestionInput = () => {\n // Moving focus to the end of the JS call stack with a timeout, because on first Agent select,\n // the dropdown .agent-option steals the focus, or the browser assigns it to the document <body>.\n setTimeout(() => {\n const inputElement = document.querySelector('.question-input');\n if (inputElement) {\n inputElement.focus();\n }\n });\n };\n\n const scrollToBottom = () => {\n // Call it in a timeout to ensure that Angular's digest cycle is finished and all elements are displayed.\n setTimeout(() => {\n const chatDetailsElement = element.find(\".chat-details\")[0];\n if (chatDetailsElement) {\n chatDetailsElement.scrollTop = chatDetailsElement.scrollHeight;\n }\n });\n };\n\n const reset = () => {\n $scope.chat = undefined;\n $scope.loadingChat = false;\n $scope.chatItem = getEmptyChatItem();\n $scope.askingChatItem = undefined;\n setAskingState(false);\n focusQuestionInput();\n };\n\n const init = () => {\n $scope.chatItem = getEmptyChatItem();\n focusQuestionInput();\n };\n\n // =========================\n // Subscriptions\n // =========================\n const subscriptions = [];\n\n const removeAllSubscribers = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n subscriptions.push($scope.$watchCollection('chat.chatHistory.items', scrollToBottom));\n subscriptions.push(TTYGContextService.onSelectedChatUpdated(onSelectedChatUpdated));\n subscriptions.push(TTYGContextService.onLastMessageReceived(onLastMessageReceived));\n subscriptions.push(TTYGContextService.onSelectedAgentChanged(onSelectedAgentChanged));\n subscriptions.push(TTYGContextService.onSelectedChatChanged(onSelectedChatChanged));\n subscriptions.push(TTYGContextService.subscribe(TTYGEventName.LOAD_CHAT_FAILURE, onLoadChatFailure));\n subscriptions.push(TTYGContextService.subscribe(TTYGEventName.ASK_QUESTION_FAILURE, onQuestionFailure));\n subscriptions.push(TTYGContextService.subscribe(TTYGEventName.CREATE_CHAT_FAILURE, onQuestionFailure));\n subscriptions.push(TTYGContextService.subscribe(TTYGEventName.DELETE_CHAT_SUCCESSFUL, onChatDeleted));\n subscriptions.push(TTYGContextService.subscribe(TTYGEventName.ASK_QUESTION_STARTING, onAskQuestionStarted));\n\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n\n // =========================\n // Initialization\n // =========================\n init();\n },\n };\n}\n","export class ChatMessageModel {\n constructor(data) {\n\n /**\n * @type {string}\n */\n this._id = data.id;\n\n /**\n * @type @type {string} - A value from {@link CHAT_MESSAGE_ROLE}, determining the owner of the message (e.g., user, assistant).\n */\n this._role = data.role;\n\n /**\n * @type {string}\n */\n this._message = data.message;\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp * 1000;\n\n /**\n * Holds information about the number of tokens used for this answer, including prompt and completion tokens.\n * It is applicable only to the assistant role ({@link CHAT_MESSAGE_ROLE#ASSISTANT}).\n *\n * @type {TokenUsageInfo}\n */\n this.tokenUsageInfo = data.tokenUsageInfo;\n\n /**\n * If the message was terminated via the Abort button\n * @type {boolean}\n */\n this._isTerminalState = data.isTerminalState;\n\n /**\n * Reason for cancellation.\n * @private {string}\n */\n this._status = data.status\n }\n\n /**\n * Updates the chatAnswer.messages array with this message instance.\n * @param {ChatAnswerModel} chatAnswer - The answer object containing the messages.\n */\n addToChatAnswer(chatAnswer) {\n chatAnswer.messages = [this];\n }\n\n get id() {\n return this._id;\n }\n\n set id(value) {\n this._id = value;\n }\n\n get role() {\n return this._role;\n }\n\n set role(value) {\n this._role = value;\n }\n\n get message() {\n return this._message;\n }\n\n set message(value) {\n this._message = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n\n get isTerminalState() {\n return this._isTerminalState;\n }\n\n set isTerminalState(value) {\n this._isTerminalState = value;\n }\n\n get status() {\n return this._status;\n }\n\n set status(value) {\n this._status = value;\n }\n}\n\nexport const CHAT_MESSAGE_ROLE = {\n USER: 'user',\n ASSISTANT: 'assistant'\n};\n","import {CHAT_MESSAGE_ROLE, ChatMessageModel} from \"./chat-message\";\n\n/**\n *\n * Represents a model that holds a question and the answer of it in a chat.\n *\n */\nexport class ChatItemModel {\n\n /**\n * Creates an instance of ChatItemModel.\n *\n * @param {string} chatId - The unique identifier for the chat associated with this instance.\n * @param {ChatMessageModel} question - The message object representing the question.\n */\n constructor(chatId, question) {\n\n /**\n * @type {string | undefined}\n * @private\n */\n this._chatId = chatId;\n\n /**\n * @type {string | undefined}\n * @private\n */\n this._agentId = undefined;\n\n /**\n * @type {ChatMessageModel}\n * @private\n */\n this._question = question;\n\n /**\n *\n * @type {ChatMessageModel[] | undefined}\n * @private\n */\n this._answers = [];\n }\n\n get chatId() {\n return this._chatId;\n }\n\n set chatId(value) {\n this._chatId = value;\n }\n\n get agentId() {\n return this._agentId;\n }\n\n set agentId(value) {\n this._agentId = value;\n }\n\n get question() {\n return this._question;\n }\n\n set question(value) {\n this._question = value;\n }\n\n get answers() {\n return this._answers;\n }\n\n /**\n *\n * @param {ChatMessageModel[]} value\n */\n set answers(value) {\n this._answers = value;\n }\n\n /**\n * Sets the message for the user's question.\n *\n * @param {string} message - The message content for the user's question.\n */\n setQuestionMessage(message) {\n if (!this._question) {\n this._question = new ChatMessageModel({role: CHAT_MESSAGE_ROLE.USER});\n }\n this._question.message = message;\n }\n\n /**\n * Retrieves the message of the user's question.\n *\n * @return {string} - The message content of the user's question.\n */\n getQuestionMessage() {\n return this._question.message;\n }\n\n /**\n * Converts the instance to a create chat request payload.\n *\n * @return {{agentId: string, question: string}} An object representing the create request payload.\n */\n toCreateChatRequestPayload() {\n return {\n agentId: this._agentId,\n question: this._question.message\n };\n }\n\n /**\n * Converts the instance to an ask request payload.\n *\n * @return {{conversationId: string, agentId: string, question: string}} An object representing the ask request payload.\n */\n toAskRequestPayload() {\n return {\n conversationId: this._chatId,\n agentId: this._agentId,\n question: this._question.message,\n tzOffset: -new Date().getTimezoneOffset() // offsets are reversed here hence the minus\n };\n }\n\n toExplainResponsePayload(answerId) {\n return {\n conversationId: this._chatId,\n answerId\n };\n }\n}\n\nexport class ChatItemsListModel {\n\n /**\n * @param {ChatItemModel[]} items\n */\n constructor(items = []) {\n this._items = items;\n }\n\n isEmpty() {\n return this._items.length === 0;\n }\n\n /**\n * @param {ChatItemModel} chatItem\n */\n appendItem(chatItem) {\n this._items.push(chatItem);\n }\n\n get items() {\n return this._items;\n }\n\n set items(value) {\n this._items = value || [];\n }\n\n getLast() {\n if (!this.isEmpty()) {\n return this._items[this._items.length - 1];\n }\n }\n}\n","export class ExplainResponseModel {\n constructor(data = {}) {\n\n /**\n * @type {string}\n */\n this._chatId = data.chatId;\n\n /**\n * @type {string}\n */\n this._answerId = data.answerId;\n\n /**\n * @type {ExplainQueryMethodsListModel}\n */\n this._queryMethods = data.queryMethods;\n\n this._expanded = data.expanded !== undefined ? data.expanded : true;\n }\n\n get chatId() {\n return this._chatId;\n }\n\n set chatId(value) {\n this._chatId = value;\n }\n\n get answerId() {\n return this._answerId;\n }\n\n set answerId(value) {\n this._answerId = value;\n }\n\n get queryMethods() {\n return this._queryMethods;\n }\n\n set queryMethods(value) {\n this._queryMethods = value;\n }\n\n get expanded() {\n return this._expanded;\n }\n\n set expanded(value) {\n this._expanded = value;\n }\n}\n\nexport class ExplainQueryMethodsListModel {\n constructor(data = []) {\n this._items = data;\n }\n\n get items() {\n return this._items;\n }\n\n set items(value) {\n this._items = value;\n }\n}\n\nexport class ExplainQueryMethodModel {\n constructor(data = {}) {\n /**\n * @type {ExtractionMethod.FTS_SEARCH | ExtractionMethod.RETRIEVAL | ExtractionMethod.SPARQL | ExtractionMethod.SIMILARITY}\n */\n this._name = data.name;\n\n /**\n * @type {string}\n */\n this._rawQuery = data.rawQuery;\n\n /**\n * @type {string}\n */\n this._query = data.query;\n\n /**\n * @Type {ExplainQueryType}\n * @private\n */\n this._queryType = data.queryType;\n\n /**\n * @type {string | null}\n * @private\n */\n this._errorMessage = data.errorOutput;\n }\n\n get name() {\n return this._name;\n }\n\n set name(value) {\n this._name = value;\n }\n\n get rawQuery() {\n return this._rawQuery;\n }\n\n set rawQuery(value) {\n this._rawQuery = value;\n }\n\n get query() {\n return this._query;\n }\n\n set query(value) {\n this._query = value;\n }\n\n get queryType() {\n return this._queryType;\n }\n\n set queryType(value) {\n this._queryType = value;\n }\n\n get errorMessage() {\n return this._errorMessage;\n }\n\n set errorMessage(value) {\n this._errorMessage = value;\n }\n}\n\nexport const ExplainQueryType = {\n SPARQL: 'sparql',\n JSON: 'json',\n OTHER: 'other'\n};\n"],"names":["editableContent","restrict","require","scope","ngModel","ngDisabled","placeholder","templateUrl","link","element","attrs","ngModelCtrl","editableDiv","find","updateModelValue","$apply","html","length","text","trim","empty","$setViewValue","innerText","$render","$viewValue","pasteHandler","event","preventDefault","originalEvent","clipboardData","getData","selection","window","getSelection","rangeCount","deleteFromDocument","range","getRangeAt","fragment","document","createDocumentFragment","lines","split","forEach","line","index","appendChild","createTextNode","createElement","insertNode","collapseToEnd","$on","removeAllSubscribers","off","on","angular","module","directive","$inject","ChatPanelComponent","toastr","$translate","TTYGContextService","$scope","chat","undefined","selectedAgent","chatItem","askingChatItem","waitingForLastMessage","loadingChat","showCancelButton","ask","question","timestamp","Date","now","cloneDeep","chatId","askQuestion","createNewChat","getEmptyChatItem","scrollToBottom","focusQuestionInput","cancelPendingQuestion","emit","TTYGEventName","CANCEL_PENDING_QUESTION","regenerateQuestion","regenerateChatItem","setQuestionMessage","getQuestionMessage","onKeypressOnInput","$event","key","shiftKey","ctrlKey","onAskHowDeliveredAnswer","askHowDerivedAnswerChatItem","instant","getAgentName","agentId","agent","getAgent","name","decodeHTML","CREATE_CHAT","ASK_QUESTION","setAskingState","isAsking","onQuestionFailure","ChatItemModel","ChatMessageModel","role","CHAT_MESSAGE_ROLE","USER","id","setTimeout","inputElement","querySelector","focus","chatDetailsElement","scrollTop","scrollHeight","reset","subscriptions","push","$watchCollection","onSelectedChatUpdated","isNew","message","lastChatItem","chatHistory","getLast","selectAgent","onLastMessageReceived","onSelectedAgentChanged","onSelectedChatChanged","subscribe","LOAD_CHAT_FAILURE","onLoadChatFailure","ASK_QUESTION_FAILURE","CREATE_CHAT_FAILURE","DELETE_CHAT_SUCCESSFUL","deletedChat","ASK_QUESTION_STARTING","onAskQuestionStarted","subscription","constructor","data","this","_id","_role","_message","_timestamp","tokenUsageInfo","_isTerminalState","isTerminalState","_status","status","addToChatAnswer","chatAnswer","messages","value","ASSISTANT","_chatId","_agentId","_question","_answers","answers","toCreateChatRequestPayload","toAskRequestPayload","conversationId","tzOffset","getTimezoneOffset","toExplainResponsePayload","answerId","ChatItemsListModel","items","_items","isEmpty","appendItem","ExplainResponseModel","_answerId","_queryMethods","queryMethods","_expanded","expanded","ExplainQueryMethodsListModel","ExplainQueryMethodModel","_name","_rawQuery","rawQuery","_query","query","_queryType","queryType","_errorMessage","errorOutput","errorMessage","ExplainQueryType","SPARQL","JSON","OTHER"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_id__=41453;export const __webpack_ids__=[41453];export const __webpack_modules__={41453:(n,t,a)=>{a.r(t),a.d(t,{default:()=>e});const e='<link href="css/graphql/graphql-endpoint-configuration-modal.css?v=3.2.0-TR2" rel="stylesheet"/> <div class="modal-header"> <h3 class="modal-title">{{\'graphql.endpoints_management.endpoint_configuration_modal.title\' | translate}}</h3> <span ng-click="toggleAdvancedSettings()" class="toggle-advanced-settings"> <input type="checkbox" class="switch" ng-checked="showAdvancedSettings"/> <label></label> <span>{{\'graphql.endpoints_management.endpoint_configuration_modal.actions.show_advanced_settings.label\' | translate}}</span> </span> </div> <div class="modal-body graphql-endpoint-configuration-modal-body"> <div class="graphql-endpoint-configuration-loader" onto-loader-new hide-message="true" size="100" ng-show="loadingEndpointConfigurationSettings"></div> <dynamic-form ng-if="!loadingEndpointConfigurationSettings" form-model="endpointConfigurationSettings.settings" on-validity-change="handleValidityChange(valid)" show-all-fields="showAdvancedSettings" translation-key-prefix="graphql.endpoints_management.endpoint_configuration_modal.settings." form-ctrl="formCtrl"> </dynamic-form> </div> <div class="modal-footer mt-0"> <button type="button" class="btn btn-secondary cancel-btn" ng-click="cancel()">{{\'common.cancel.btn\' | translate}} </button> <button id="graphql-endpoint-configuration-modal-submit" class="btn btn-primary" ng-disabled="!endpointConfigurationSettingsValid || savingEndpointSettings || formCtrl.$pristine" ng-click="ok()" type="submit"> <span>{{\'save.changes.label\' | translate}}</span> <span class="saving-endpoint-settings" ng-if="savingEndpointSettings" onto-loader-fancy hide-message="true" size="15"></span> </button> </div> '}};
2
- //# sourceMappingURL=41453.4ae219d972a187c36bfc.bundle.js.map
1
+ export const __webpack_id__=41453;export const __webpack_ids__=[41453];export const __webpack_modules__={41453:(n,t,a)=>{a.r(t),a.d(t,{default:()=>e});const e='<link href="css/graphql/graphql-endpoint-configuration-modal.css?v=3.2.0-TR4" rel="stylesheet"/> <div class="modal-header"> <h3 class="modal-title">{{\'graphql.endpoints_management.endpoint_configuration_modal.title\' | translate}}</h3> <span ng-click="toggleAdvancedSettings()" class="toggle-advanced-settings"> <input type="checkbox" class="switch" ng-checked="showAdvancedSettings"/> <label></label> <span>{{\'graphql.endpoints_management.endpoint_configuration_modal.actions.show_advanced_settings.label\' | translate}}</span> </span> </div> <div class="modal-body graphql-endpoint-configuration-modal-body"> <div class="graphql-endpoint-configuration-loader" onto-loader-new hide-message="true" size="100" ng-show="loadingEndpointConfigurationSettings"></div> <dynamic-form ng-if="!loadingEndpointConfigurationSettings" form-model="endpointConfigurationSettings.settings" on-validity-change="handleValidityChange(valid)" show-all-fields="showAdvancedSettings" translation-key-prefix="graphql.endpoints_management.endpoint_configuration_modal.settings." form-ctrl="formCtrl"> </dynamic-form> </div> <div class="modal-footer mt-0"> <button type="button" class="btn btn-secondary cancel-btn" ng-click="cancel()">{{\'common.cancel.btn\' | translate}} </button> <button id="graphql-endpoint-configuration-modal-submit" class="btn btn-primary" ng-disabled="!endpointConfigurationSettingsValid || savingEndpointSettings || formCtrl.$pristine" ng-click="ok()" type="submit"> <span>{{\'save.changes.label\' | translate}}</span> <span class="saving-endpoint-settings" ng-if="savingEndpointSettings" onto-loader-fancy hide-message="true" size="15"></span> </button> </div> '}};
2
+ //# sourceMappingURL=41453.241761ce8ff75036e5e0.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"41453.4ae219d972a187c36bfc.bundle.js","mappings":"uJAGA,QAFW,qoD","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphql/templates/modal/endpoint-configuration-modal.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/graphql/graphql-endpoint-configuration-modal.css?v=3.2.0-TR2\" rel=\"stylesheet\"/> <div class=\"modal-header\"> <h3 class=\"modal-title\">{{'graphql.endpoints_management.endpoint_configuration_modal.title' | translate}}</h3> <span ng-click=\"toggleAdvancedSettings()\" class=\"toggle-advanced-settings\"> <input type=\"checkbox\" class=\"switch\" ng-checked=\"showAdvancedSettings\"/> <label></label> <span>{{'graphql.endpoints_management.endpoint_configuration_modal.actions.show_advanced_settings.label' | translate}}</span> </span> </div> <div class=\"modal-body graphql-endpoint-configuration-modal-body\"> <div class=\"graphql-endpoint-configuration-loader\" onto-loader-new hide-message=\"true\" size=\"100\" ng-show=\"loadingEndpointConfigurationSettings\"></div> <dynamic-form ng-if=\"!loadingEndpointConfigurationSettings\" form-model=\"endpointConfigurationSettings.settings\" on-validity-change=\"handleValidityChange(valid)\" show-all-fields=\"showAdvancedSettings\" translation-key-prefix=\"graphql.endpoints_management.endpoint_configuration_modal.settings.\" form-ctrl=\"formCtrl\"> </dynamic-form> </div> <div class=\"modal-footer mt-0\"> <button type=\"button\" class=\"btn btn-secondary cancel-btn\" ng-click=\"cancel()\">{{'common.cancel.btn' | translate}} </button> <button id=\"graphql-endpoint-configuration-modal-submit\" class=\"btn btn-primary\" ng-disabled=\"!endpointConfigurationSettingsValid || savingEndpointSettings || formCtrl.\\$pristine\" ng-click=\"ok()\" type=\"submit\"> <span>{{'save.changes.label' | translate}}</span> <span class=\"saving-endpoint-settings\" ng-if=\"savingEndpointSettings\" onto-loader-fancy hide-message=\"true\" size=\"15\"></span> </button> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"41453.241761ce8ff75036e5e0.bundle.js","mappings":"uJAGA,QAFW,qoD","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphql/templates/modal/endpoint-configuration-modal.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/graphql/graphql-endpoint-configuration-modal.css?v=3.2.0-TR4\" rel=\"stylesheet\"/> <div class=\"modal-header\"> <h3 class=\"modal-title\">{{'graphql.endpoints_management.endpoint_configuration_modal.title' | translate}}</h3> <span ng-click=\"toggleAdvancedSettings()\" class=\"toggle-advanced-settings\"> <input type=\"checkbox\" class=\"switch\" ng-checked=\"showAdvancedSettings\"/> <label></label> <span>{{'graphql.endpoints_management.endpoint_configuration_modal.actions.show_advanced_settings.label' | translate}}</span> </span> </div> <div class=\"modal-body graphql-endpoint-configuration-modal-body\"> <div class=\"graphql-endpoint-configuration-loader\" onto-loader-new hide-message=\"true\" size=\"100\" ng-show=\"loadingEndpointConfigurationSettings\"></div> <dynamic-form ng-if=\"!loadingEndpointConfigurationSettings\" form-model=\"endpointConfigurationSettings.settings\" on-validity-change=\"handleValidityChange(valid)\" show-all-fields=\"showAdvancedSettings\" translation-key-prefix=\"graphql.endpoints_management.endpoint_configuration_modal.settings.\" form-ctrl=\"formCtrl\"> </dynamic-form> </div> <div class=\"modal-footer mt-0\"> <button type=\"button\" class=\"btn btn-secondary cancel-btn\" ng-click=\"cancel()\">{{'common.cancel.btn' | translate}} </button> <button id=\"graphql-endpoint-configuration-modal-submit\" class=\"btn btn-primary\" ng-disabled=\"!endpointConfigurationSettingsValid || savingEndpointSettings || formCtrl.\\$pristine\" ng-click=\"ok()\" type=\"submit\"> <span>{{'save.changes.label' | translate}}</span> <span class=\"saving-endpoint-settings\" ng-if=\"savingEndpointSettings\" onto-loader-fancy hide-message=\"true\" size=\"15\"></span> </button> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_id__=42129;export const __webpack_ids__=[42129];export const __webpack_modules__={42129:(e,l,t)=>{t.r(l),t.d(l,{default:()=>s});const s='<link href="css/shuttle-multiselect.css?v=3.2.0-TR2" rel="stylesheet"/> <div class="shuttle-multiselect"> <div class="shuttle-panel available-options"> <div class="shuttle-panel-header"> <h5>{{labels.availableOptionsTitle | translate}}</h5> </div> <div class="shuttle-panel-toolbar toolbar-left"> <input type="text" class="form-control filter-selected" placeholder="{{labels.availableOptionsFilter | translate}}" ng-model="searchLeft"> <a href="#" ng-click="selectAll()" class="btn-link secondary add-all-btn" gdb-tooltip="{{labels.selectAllTooltip | translate}}" tooltip-placement="top">{{labels.selectAllLabel | translate}}</a> </div> <div class="options-list"> <div class="option-item" ng-repeat="item in availableOptions | searchFilter:searchLeft | orderBy:\'label\' track by $index"> <span>{{item.label}}</span> <a href="#" ng-click="selectOption(item)" class="btn-link secondary item-action add-btn" gdb-tooltip="{{labels.selectTooltip | translate}}" tooltip-placement="top"> <span class="fa fa-plus-circle"></span> </a> </div> </div> </div> <div class="shuttle-panel selected-options"> <div class="shuttle-panel-header"> <h5>{{labels.selectedOptionsTitle | translate}}</h5> </div> <div class="shuttle-panel-toolbar toolbar-right"> <div ng-if="selectedOptions.length" class="selected-items-message"> {{labels.selectedOptionsCount | translate:{count: selectedOptions.length} }} </div> <a href="#" ng-click="deselectAll()" class="btn-link secondary remove-all-btn" gdb-tooltip="{{labels.deselectAllTooltip | translate}}" tooltip-placement="top">{{labels.deselectAllLabel | translate}}</a> </div> <div class="options-list"> <div class="option-item" ng-repeat="item in selectedOptions | orderBy:\'label\' track by $index"> <span>{{item.label}}</span> <a href="#" ng-click="deselectOption(item)" class="btn-link secondary item-action remove-btn" gdb-tooltip="{{labels.deselectTooltip | translate}}" tooltip-placement="top"> <span class="fa fa-minus-circle"></span> </a> </div> </div> </div> </div> '}};
2
- //# sourceMappingURL=42129.0314e45b4b818b01b71f.bundle.js.map
1
+ export const __webpack_id__=42129;export const __webpack_ids__=[42129];export const __webpack_modules__={42129:(e,l,t)=>{t.r(l),t.d(l,{default:()=>s});const s='<link href="css/shuttle-multiselect.css?v=3.2.0-TR4" rel="stylesheet"/> <div class="shuttle-multiselect"> <div class="shuttle-panel available-options"> <div class="shuttle-panel-header"> <h5>{{labels.availableOptionsTitle | translate}}</h5> </div> <div class="shuttle-panel-toolbar toolbar-left"> <input type="text" class="form-control filter-selected" placeholder="{{labels.availableOptionsFilter | translate}}" ng-model="searchLeft"> <a href="#" ng-click="selectAll()" class="btn-link secondary add-all-btn" gdb-tooltip="{{labels.selectAllTooltip | translate}}" tooltip-placement="top">{{labels.selectAllLabel | translate}}</a> </div> <div class="options-list"> <div class="option-item" ng-repeat="item in availableOptions | searchFilter:searchLeft | orderBy:\'label\' track by $index"> <span>{{item.label}}</span> <a href="#" ng-click="selectOption(item)" class="btn-link secondary item-action add-btn" gdb-tooltip="{{labels.selectTooltip | translate}}" tooltip-placement="top"> <span class="fa fa-plus-circle"></span> </a> </div> </div> </div> <div class="shuttle-panel selected-options"> <div class="shuttle-panel-header"> <h5>{{labels.selectedOptionsTitle | translate}}</h5> </div> <div class="shuttle-panel-toolbar toolbar-right"> <div ng-if="selectedOptions.length" class="selected-items-message"> {{labels.selectedOptionsCount | translate:{count: selectedOptions.length} }} </div> <a href="#" ng-click="deselectAll()" class="btn-link secondary remove-all-btn" gdb-tooltip="{{labels.deselectAllTooltip | translate}}" tooltip-placement="top">{{labels.deselectAllLabel | translate}}</a> </div> <div class="options-list"> <div class="option-item" ng-repeat="item in selectedOptions | orderBy:\'label\' track by $index"> <span>{{item.label}}</span> <a href="#" ng-click="deselectOption(item)" class="btn-link secondary item-action remove-btn" gdb-tooltip="{{labels.deselectTooltip | translate}}" tooltip-placement="top"> <span class="fa fa-minus-circle"></span> </a> </div> </div> </div> </div> '}};
2
+ //# sourceMappingURL=42129.f67dc6029cdab567bf54.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"42129.0314e45b4b818b01b71f.bundle.js","mappings":"uJAGA,QAFW,i9D","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/shuttle-multiselect.css?v=3.2.0-TR2\" rel=\"stylesheet\"/> <div class=\"shuttle-multiselect\"> <div class=\"shuttle-panel available-options\"> <div class=\"shuttle-panel-header\"> <h5>{{labels.availableOptionsTitle | translate}}</h5> </div> <div class=\"shuttle-panel-toolbar toolbar-left\"> <input type=\"text\" class=\"form-control filter-selected\" placeholder=\"{{labels.availableOptionsFilter | translate}}\" ng-model=\"searchLeft\"> <a href=\"#\" ng-click=\"selectAll()\" class=\"btn-link secondary add-all-btn\" gdb-tooltip=\"{{labels.selectAllTooltip | translate}}\" tooltip-placement=\"top\">{{labels.selectAllLabel | translate}}</a> </div> <div class=\"options-list\"> <div class=\"option-item\" ng-repeat=\"item in availableOptions | searchFilter:searchLeft | orderBy:'label' track by \\$index\"> <span>{{item.label}}</span> <a href=\"#\" ng-click=\"selectOption(item)\" class=\"btn-link secondary item-action add-btn\" gdb-tooltip=\"{{labels.selectTooltip | translate}}\" tooltip-placement=\"top\"> <span class=\"fa fa-plus-circle\"></span> </a> </div> </div> </div> <div class=\"shuttle-panel selected-options\"> <div class=\"shuttle-panel-header\"> <h5>{{labels.selectedOptionsTitle | translate}}</h5> </div> <div class=\"shuttle-panel-toolbar toolbar-right\"> <div ng-if=\"selectedOptions.length\" class=\"selected-items-message\"> {{labels.selectedOptionsCount | translate:{count: selectedOptions.length} }} </div> <a href=\"#\" ng-click=\"deselectAll()\" class=\"btn-link secondary remove-all-btn\" gdb-tooltip=\"{{labels.deselectAllTooltip | translate}}\" tooltip-placement=\"top\">{{labels.deselectAllLabel | translate}}</a> </div> <div class=\"options-list\"> <div class=\"option-item\" ng-repeat=\"item in selectedOptions | orderBy:'label' track by \\$index\"> <span>{{item.label}}</span> <a href=\"#\" ng-click=\"deselectOption(item)\" class=\"btn-link secondary item-action remove-btn\" gdb-tooltip=\"{{labels.deselectTooltip | translate}}\" tooltip-placement=\"top\"> <span class=\"fa fa-minus-circle\"></span> </a> </div> </div> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"42129.f67dc6029cdab567bf54.bundle.js","mappings":"uJAGA,QAFW,i9D","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/shuttle-multiselect.css?v=3.2.0-TR4\" rel=\"stylesheet\"/> <div class=\"shuttle-multiselect\"> <div class=\"shuttle-panel available-options\"> <div class=\"shuttle-panel-header\"> <h5>{{labels.availableOptionsTitle | translate}}</h5> </div> <div class=\"shuttle-panel-toolbar toolbar-left\"> <input type=\"text\" class=\"form-control filter-selected\" placeholder=\"{{labels.availableOptionsFilter | translate}}\" ng-model=\"searchLeft\"> <a href=\"#\" ng-click=\"selectAll()\" class=\"btn-link secondary add-all-btn\" gdb-tooltip=\"{{labels.selectAllTooltip | translate}}\" tooltip-placement=\"top\">{{labels.selectAllLabel | translate}}</a> </div> <div class=\"options-list\"> <div class=\"option-item\" ng-repeat=\"item in availableOptions | searchFilter:searchLeft | orderBy:'label' track by \\$index\"> <span>{{item.label}}</span> <a href=\"#\" ng-click=\"selectOption(item)\" class=\"btn-link secondary item-action add-btn\" gdb-tooltip=\"{{labels.selectTooltip | translate}}\" tooltip-placement=\"top\"> <span class=\"fa fa-plus-circle\"></span> </a> </div> </div> </div> <div class=\"shuttle-panel selected-options\"> <div class=\"shuttle-panel-header\"> <h5>{{labels.selectedOptionsTitle | translate}}</h5> </div> <div class=\"shuttle-panel-toolbar toolbar-right\"> <div ng-if=\"selectedOptions.length\" class=\"selected-items-message\"> {{labels.selectedOptionsCount | translate:{count: selectedOptions.length} }} </div> <a href=\"#\" ng-click=\"deselectAll()\" class=\"btn-link secondary remove-all-btn\" gdb-tooltip=\"{{labels.deselectAllTooltip | translate}}\" tooltip-placement=\"top\">{{labels.deselectAllLabel | translate}}</a> </div> <div class=\"options-list\"> <div class=\"option-item\" ng-repeat=\"item in selectedOptions | orderBy:'label' track by \\$index\"> <span>{{item.label}}</span> <a href=\"#\" ng-click=\"deselectOption(item)\" class=\"btn-link secondary item-action remove-btn\" gdb-tooltip=\"{{labels.deselectTooltip | translate}}\" tooltip-placement=\"top\"> <span class=\"fa fa-minus-circle\"></span> </a> </div> </div> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_id__=42143;export const __webpack_ids__=[42143];export const __webpack_modules__={42143:()=>{const e="guide.step-action.import-file";PluginRegistry.add("guide.step",[{guideBlockName:"import-upload-rdf-file",getSteps:(t,i)=>{const o=i.GuideUtils,l=i.toastr,r=i.$translate,n=i.$interpolate,c=i.EventEmitterService,s=o.getGuideElementSelector("import-settings-import-button");let m;return[{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.import_rdf_file.content",class:"upload-rdf-file-button",...t.mainAction?{}:{title:e},...t,url:"import",elementSelector:o.getGuideElementSelector("uploadRdfFileButton"),advanceOn:void 0,show:e=>()=>{m=c.subscribe("filesForUploadSelected",i=>{(i.files||[]).some(e=>e.name===t.resourceFile)?o.isVisible(o.getGuideElementSelector("import-file-"+t.resourceFile))?o.getOrWaitFor(".confirm-duplicate-files-dialog").then(()=>e.next()):o.getOrWaitFor(s).then(()=>e.next()):i.cancel=!0})},hide:()=>()=>{m&&m()},onNextValidate:()=>Promise.allSettled([o.getOrWaitFor(".confirm-duplicate-files-dialog"),o.getOrWaitFor(o.getGuideElementSelector("import-file-"+t.resourceFile))]).then(([e,i])=>"rejected"!==e.status||"rejected"!==i.status||(o.noNextErrorToast(l,r,n,"guide.step_plugin.import_rdf_file.file-must-be-uploaded",t),!1)),onNextClick:e=>{o.getOrWaitFor(o.getGuideElementSelector("import-file-"+t.resourceFile)).then(e=>{e.click()}).catch(e=>{console.error(e)}).finally(()=>e.next())}}}]}},{guideBlockName:"import-confirm-duplicate-files",getSteps:(t,i)=>{const o=i.GuideUtils;return[{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.import_rdf_file.confirm_duplicate_files_dialog.content",...t.mainAction?{}:{title:e},placement:"bottom",class:"import-file-button",...t,url:"import",elementSelector:o.getElementSelector(".confirm-duplicate-files-dialog .confirm-overwrite-btn"),skipFromHistory:!0,showOn:()=>o.isVisible(o.getElementSelector(".confirm-duplicate-files-dialog")),onNextClick:()=>o.clickOnElement(".confirm-duplicate-files-dialog .confirm-overwrite-btn")(),onPreviousClick:()=>o.isVisible(o.getElementSelector(".confirm-duplicate-files-dialog"))?o.clickOnElement(".confirm-duplicate-files-dialog .cancel-btn"):Promise.resolve()}}]}},{guideBlockName:"import-click-on-import-button",getSteps:(t,i)=>{const o=i.GuideUtils,l=o.getGuideElementSelector("import-settings-import-button");return[{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.import_rdf_file.import-settings.import.button.content",...t.mainAction?{}:{title:e},placement:"top",class:"import-settings-import-file-button",...t,elementSelector:l,onPreviousClick:()=>new Promise(function(e){o.clickOnGuideElement("import-settings-cancel-button")().then(()=>e())}),beforeShowPromise:()=>i.GuideUtils.deferredShow(300)().then(()=>o.getOrWaitFor(l,3).catch(e=>(i.toastr.error(i.$translate.instant("guide.unexpected.error.message")),Promise.reject(e)))),onNextClick:()=>o.clickOnGuideElement("import-settings-import-button")(),canBePaused:!1}}]}},{guideBlockName:"import-show-progress",getSteps:(t,i)=>{const o=i.GuideUtils;return[{guideBlockName:"read-only-element",options:{content:"guide.step_plugin.import_status_info.content",...t.mainAction?{}:{title:e},class:"import-status-info",...t,url:"import",elementSelector:".import-resource-message",beforeShowPromise:()=>o.isVisible(".import-resource-message")?Promise.resolve():o.waitFor(".import-resource-message",10),onPreviousClick:()=>o.getOrWaitFor(o.getGuideElementSelector("import-file-"+t.resourceFile),10).then(e=>{e.click()})}}]}},{guideBlockName:"import-rdf-file",getSteps:(e,t)=>{e.mainAction="import-file";const i=[{guideBlockName:"click-main-menu",options:angular.extend({},{menu:"import",showIntro:!0},e)}];return e.resourcePath&&i.push({guideBlockName:"download-guide-resource",options:angular.extend({},{title:""},e)}),i.push({guideBlockName:"import-upload-rdf-file",options:{disablePreviousFlow:!1,...e}},{guideBlockName:"import-confirm-duplicate-files",options:{...e}},{guideBlockName:"import-click-on-import-button",options:{...e}},{guideBlockName:"import-show-progress",options:{...e}}),i}}])}};
2
+ //# sourceMappingURL=42143.6c37997677f5ec643731.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"42143.6c37997677f5ec643731.bundle.js","mappings":"oHAAA,MAAMA,EAAiC,gCAEvCC,eAAeC,IAAI,aAAc,CAC7B,CACIC,eAAgB,yBAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMC,EAAaD,EAASC,WACtBC,EAASF,EAASE,OAClBC,EAAaH,EAASG,WACtBC,EAAeJ,EAASI,aACxBC,EAAsBL,EAASK,oBAC/BC,EAA+BL,EAAWM,wBAAwB,iCACxE,IAAIC,EACJ,MAAO,CACH,CACIX,eAAgB,oBAChBE,QAAS,CACLU,QAAS,4CACTC,MAAO,4BAEHX,EAAQY,WAAa,CAAC,EAAI,CAACC,MAAOlB,MACnCK,EACHc,IAAK,SACLC,gBAAiBb,EAAWM,wBAAwB,uBAEpDQ,eAAWC,EACXC,KAAOC,GAAU,KAGbV,EAAqCH,EAAoBc,UAAU,yBAA4BC,KACrEA,EAAUC,OAAS,IACvBC,KAAMC,GAAiBA,EAAaC,OAASzB,EAAQ0B,cAI/DxB,EAAWyB,UAAUzB,EAAWM,wBAAwB,eAAiBR,EAAQ0B,eACjFxB,EAAW0B,aAAa,mCACnBC,KAAK,IAAMV,EAAMW,QAEtB5B,EAAW0B,aAAarB,GACnBsB,KAAK,IAAMV,EAAMW,QAK1BT,EAAUU,QAAS,KAI/BC,KAAMA,IAAM,KACJvB,GACAA,KAGRwB,eAAgBA,IACLC,QAAQC,WAAW,CAACjC,EAAW0B,aAAa,m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legacy-workbench/src/js/angular/guides/steps/complex/import-rdf-file/plugin.js"],"sourcesContent":["const IMPORT_FILE_DEFAULT_STEP_TITLE = \"guide.step-action.import-file\";\n\nPluginRegistry.add('guide.step', [\n {\n guideBlockName: 'import-upload-rdf-file',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const toastr = services.toastr;\n const $translate = services.$translate;\n const $interpolate = services.$interpolate;\n const EventEmitterService = services.EventEmitterService;\n const importSettingsButtonSelector = GuideUtils.getGuideElementSelector('import-settings-import-button');\n let filesForUploadSelectedSubscription;\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.import_rdf_file.content',\n class: 'upload-rdf-file-button',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: IMPORT_FILE_DEFAULT_STEP_TITLE}),\n ...options,\n url: 'import',\n elementSelector: GuideUtils.getGuideElementSelector('uploadRdfFileButton'),\n // Disable default behavior of service when element is clicked.\n advanceOn: undefined,\n show: (guide) => () => {\n // Subscribes to event \"filesForUploadSelected\", when the step is showing, this will give opportunity\n // to canceling uploading if user not choose correct file.\n filesForUploadSelectedSubscription = EventEmitterService.subscribe('filesForUploadSelected', ((eventData) => {\n const uploadedFiles = eventData.files || [];\n if (uploadedFiles.some((uploadedFile) => uploadedFile.name === options.resourceFile)) {\n // When tha correct file is selected, the guide can continue.\n\n // Check for duplicated name, if import button for guide rdf data exist.\n if (GuideUtils.isVisible(GuideUtils.getGuideElementSelector('import-file-' + options.resourceFile))) {\n GuideUtils.getOrWaitFor('.confirm-duplicate-files-dialog')\n .then(() => guide.next());\n } else {\n GuideUtils.getOrWaitFor(importSettingsButtonSelector)\n .then(() => guide.next());\n }\n } else {\n // Canceling the automatic uploading of files\n // because the guide rdf file is not selected.\n eventData.cancel = true;\n }\n }));\n },\n hide: () => () => {\n if (filesForUploadSelectedSubscription) {\n filesForUploadSelectedSubscription();\n }\n },\n onNextValidate: () => {\n return Promise.allSettled([GuideUtils.getOrWaitFor('.confirm-duplicate-files-dialog'), GuideUtils.getOrWaitFor(GuideUtils.getGuideElementSelector('import-file-' + options.resourceFile))])\n .then(([confirmDialogPromise, importButtonPromise]) => {\n // There are two ways to exit this step:\n // if the duplication dialog is opened\n // or if the import button for the guide file is displayed.\n // The first scenario indicates that the user is trying to upload the same file,\n // while the second scenario suggests\n // that the guide has been started more than once.\n if ('rejected' === confirmDialogPromise.status && 'rejected' === importButtonPromise.status) {\n GuideUtils.noNextErrorToast(toastr, $translate, $interpolate, 'guide.step_plugin.import_rdf_file.file-must-be-uploaded', options);\n return false;\n }\n return true;\n });\n },\n onNextClick: (guide) => {\n GuideUtils.getOrWaitFor(GuideUtils.getGuideElementSelector('import-file-' + options.resourceFile))\n .then((element) => {\n // If we have file import button for the guide rdf file,\n // this indicates that we go through this step for the second time.\n // This can happen if the user starts the guide for the second time.\n element.click();\n })\n .catch((error) => {\n // This shouldn't be happening.\n console.error(error);\n })\n .finally(() => guide.next());\n },\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'import-confirm-duplicate-files',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.import_rdf_file.confirm_duplicate_files_dialog.content',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: IMPORT_FILE_DEFAULT_STEP_TITLE}),\n placement: 'bottom',\n class: 'import-file-button',\n ...options,\n url: 'import',\n elementSelector: GuideUtils.getElementSelector('.confirm-duplicate-files-dialog .confirm-overwrite-btn'),\n skipFromHistory: true,\n // Checks whether the confirm dialog is currently open.\n showOn: () => GuideUtils.isVisible(GuideUtils.getElementSelector('.confirm-duplicate-files-dialog')),\n onNextClick: () => GuideUtils.clickOnElement('.confirm-duplicate-files-dialog .confirm-overwrite-btn')(),\n onPreviousClick: () => {\n if (GuideUtils.isVisible(GuideUtils.getElementSelector('.confirm-duplicate-files-dialog'))) {\n return GuideUtils.clickOnElement('.confirm-duplicate-files-dialog .cancel-btn');\n }\n return Promise.resolve();\n },\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'import-click-on-import-button',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const importSettingsButtonSelector = GuideUtils.getGuideElementSelector('import-settings-import-button');\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.import_rdf_file.import-settings.import.button.content',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: IMPORT_FILE_DEFAULT_STEP_TITLE}),\n placement: 'top',\n class: 'import-settings-import-file-button',\n ...options,\n elementSelector: importSettingsButtonSelector,\n onPreviousClick: () => new Promise(function(resolve) {\n GuideUtils.clickOnGuideElement('import-settings-cancel-button')()\n .then(() => resolve());\n }),\n beforeShowPromise: () => services.GuideUtils.deferredShow(300)()\n .then(() => GuideUtils.getOrWaitFor(importSettingsButtonSelector, 3)\n .catch((error) => {\n services.toastr.error(services.$translate.instant('guide.unexpected.error.message'));\n return Promise.reject(error);\n }),\n ),\n onNextClick: () => GuideUtils.clickOnGuideElement('import-settings-import-button')(),\n canBePaused: false,\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'import-show-progress',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n return [\n {\n guideBlockName: 'read-only-element',\n options: {\n content: 'guide.step_plugin.import_status_info.content',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: IMPORT_FILE_DEFAULT_STEP_TITLE}),\n class: 'import-status-info',\n ...options,\n url: 'import',\n elementSelector: '.import-resource-message',\n beforeShowPromise: () => {\n if (GuideUtils.isVisible('.import-resource-message')) {\n return Promise.resolve();\n }\n return GuideUtils.waitFor('.import-resource-message', 10);\n },\n onPreviousClick: () => GuideUtils.getOrWaitFor(GuideUtils.getGuideElementSelector('import-file-' + options.resourceFile), 10)\n .then((element) => {\n element.click();\n }),\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'import-rdf-file',\n getSteps: (options, services) => {\n options.mainAction = 'import-file';\n\n const steps = [\n {\n guideBlockName: 'click-main-menu',\n options: angular.extend({}, {\n menu: 'import',\n showIntro: true,\n }, options),\n },\n ];\n\n if (options.resourcePath) {\n steps.push(\n {\n guideBlockName: 'download-guide-resource',\n options: angular.extend({}, {\n title: '',\n }, options),\n },\n );\n }\n\n steps.push(...[\n {\n guideBlockName: 'import-upload-rdf-file', options: {\n disablePreviousFlow: false,\n ...options,\n },\n },\n // This step is optional and will only appear if the file we want to upload has already been uploaded.\n // If the file is already uploaded, a confirmation dialog will be opened, and this step will display the confirm button of the dialog.\n {\n guideBlockName: 'import-confirm-duplicate-files', options: {...options},\n },\n {\n guideBlockName: 'import-click-on-import-button', options: {...options},\n },\n {\n guideBlockName: 'import-show-progress', options: {...options},\n },\n ]);\n\n return steps;\n },\n },\n]);\n"],"names":["IMPORT_FILE_DEFAULT_STEP_TITLE","PluginRegistry","add","guideBlockName","getSteps","options","services","GuideUtils","toastr","$translate","$interpolate","EventEmitterService","importSettingsButtonSelector","getGuideElementSelector","filesForUploadSelectedSubscription","content","class","mainAction","title","url","elementSelector","advanceOn","undefined","show","guide","subscribe","eventData","files","some","uploadedFile","name","resourceFile","isVisible","getOrWaitFor","then","next","cancel","hide","onNextValidate","Promise","allSettled","confirmDialogPromise","importButtonPromise","status","noNextErrorToast","onNextClick","element","click","catch","error","console","finally","placement","getElementSelector","skipFromHistory","showOn","clickOnElement","onPreviousClick","resolve","clickOnGuideElement","beforeShowPromise","deferredShow","instant","reject","canBePaused","waitFor","steps","angular","extend","menu","showIntro","resourcePath","push","disablePreviousFlow"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_id__=44444;export const __webpack_ids__=[44444];export const __webpack_modules__={44444:(t,e,a)=>{a.r(e),a.d(e,{default:()=>s});const s='<link href="css/ttyg/no-agents-view.css?v=3.2.0-TR2" rel="stylesheet"/> <div class="no-agents-view-component" data-test="no-agents-view-component"> <div class="content"> <div class="alert alert-help mb-3" data-test="ttyg-info-message" ng-bind-html="\'ttyg.agent.messages.help_1\' | translate | trustAsHtml"></div> <div class="alert alert-help mb-3" data-test="ttyg-agent-message" ng-bind-html="\'ttyg.agent.messages.help_2\' | translate | trustAsHtml"></div> <div class="actions"> <button class="btn btn-outline-primary btn-lg text-xs-left create-agent-btn" gdb-tooltip="{{!canModifyAgent ? (\'ttyg.agent.fat_btn.create_agent.tooltip_disabled\' | translate) : \'\'}}" ng-disabled="!canModifyAgent" ng-click="onCreateAgent()" guide-selector="create-agent-btn"> <i class="fa fa-message-bot fa-xl"></i> <span class="text">{{\'ttyg.agent.fat_btn.create_agent.label\' | translate}}</span> </button> </div> <div class="alert alert-warning mt-3" data-test="ttyg-api-key-message"> <div ng-bind-html="\'ttyg.agent.messages.help_config\' | translate: {talkToGraphDocumentationLink: talkToGraphDocumentationLink} | trustAsHtml"></div> </div> </div> </div> '}};
2
- //# sourceMappingURL=44444.02026ff20e2a843dc05b.bundle.js.map
1
+ export const __webpack_id__=44444;export const __webpack_ids__=[44444];export const __webpack_modules__={44444:(t,e,a)=>{a.r(e),a.d(e,{default:()=>s});const s='<link href="css/ttyg/no-agents-view.css?v=3.2.0-TR4" rel="stylesheet"/> <div class="no-agents-view-component" data-test="no-agents-view-component"> <div class="content"> <div class="alert alert-help mb-3" data-test="ttyg-info-message" ng-bind-html="\'ttyg.agent.messages.help_1\' | translate | trustAsHtml"></div> <div class="alert alert-help mb-3" data-test="ttyg-agent-message" ng-bind-html="\'ttyg.agent.messages.help_2\' | translate | trustAsHtml"></div> <div class="actions"> <button class="btn btn-outline-primary btn-lg text-xs-left create-agent-btn" gdb-tooltip="{{!canModifyAgent ? (\'ttyg.agent.fat_btn.create_agent.tooltip_disabled\' | translate) : \'\'}}" ng-disabled="!canModifyAgent" ng-click="onCreateAgent()" guide-selector="create-agent-btn"> <i class="fa fa-message-bot fa-xl"></i> <span class="text">{{\'ttyg.agent.fat_btn.create_agent.label\' | translate}}</span> </button> </div> <div class="alert alert-warning mt-3" data-test="ttyg-api-key-message"> <div ng-bind-html="\'ttyg.agent.messages.help_config\' | translate: {talkToGraphDocumentationLink: talkToGraphDocumentationLink} | trustAsHtml"></div> </div> </div> </div> '}};
2
+ //# sourceMappingURL=44444.a1b29c2329c7d4a39cc5.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"44444.02026ff20e2a843dc05b.bundle.js","mappings":"uJAGA,QAFW,2nC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/templates/no-agents-view.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/ttyg/no-agents-view.css?v=3.2.0-TR2\" rel=\"stylesheet\"/> <div class=\"no-agents-view-component\" data-test=\"no-agents-view-component\"> <div class=\"content\"> <div class=\"alert alert-help mb-3\" data-test=\"ttyg-info-message\" ng-bind-html=\"'ttyg.agent.messages.help_1' | translate | trustAsHtml\"></div> <div class=\"alert alert-help mb-3\" data-test=\"ttyg-agent-message\" ng-bind-html=\"'ttyg.agent.messages.help_2' | translate | trustAsHtml\"></div> <div class=\"actions\"> <button class=\"btn btn-outline-primary btn-lg text-xs-left create-agent-btn\" gdb-tooltip=\"{{!canModifyAgent ? ('ttyg.agent.fat_btn.create_agent.tooltip_disabled' | translate) : ''}}\" ng-disabled=\"!canModifyAgent\" ng-click=\"onCreateAgent()\" guide-selector=\"create-agent-btn\"> <i class=\"fa fa-message-bot fa-xl\"></i> <span class=\"text\">{{'ttyg.agent.fat_btn.create_agent.label' | translate}}</span> </button> </div> <div class=\"alert alert-warning mt-3\" data-test=\"ttyg-api-key-message\"> <div ng-bind-html=\"'ttyg.agent.messages.help_config' | translate: {talkToGraphDocumentationLink: talkToGraphDocumentationLink} | trustAsHtml\"></div> </div> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"44444.a1b29c2329c7d4a39cc5.bundle.js","mappings":"uJAGA,QAFW,2nC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/templates/no-agents-view.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/ttyg/no-agents-view.css?v=3.2.0-TR4\" rel=\"stylesheet\"/> <div class=\"no-agents-view-component\" data-test=\"no-agents-view-component\"> <div class=\"content\"> <div class=\"alert alert-help mb-3\" data-test=\"ttyg-info-message\" ng-bind-html=\"'ttyg.agent.messages.help_1' | translate | trustAsHtml\"></div> <div class=\"alert alert-help mb-3\" data-test=\"ttyg-agent-message\" ng-bind-html=\"'ttyg.agent.messages.help_2' | translate | trustAsHtml\"></div> <div class=\"actions\"> <button class=\"btn btn-outline-primary btn-lg text-xs-left create-agent-btn\" gdb-tooltip=\"{{!canModifyAgent ? ('ttyg.agent.fat_btn.create_agent.tooltip_disabled' | translate) : ''}}\" ng-disabled=\"!canModifyAgent\" ng-click=\"onCreateAgent()\" guide-selector=\"create-agent-btn\"> <i class=\"fa fa-message-bot fa-xl\"></i> <span class=\"text\">{{'ttyg.agent.fat_btn.create_agent.label' | translate}}</span> </button> </div> <div class=\"alert alert-warning mt-3\" data-test=\"ttyg-api-key-message\"> <div ng-bind-html=\"'ttyg.agent.messages.help_config' | translate: {talkToGraphDocumentationLink: talkToGraphDocumentationLink} | trustAsHtml\"></div> </div> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_id__=44874;export const __webpack_ids__=[44874,49539,71920];export const __webpack_modules__={44874:(e,t,n)=>{n.r(t);var a=n(38940),E=n(71920);function A(e,t,n,A,_){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-select-menu.html",scope:{},link:n=>{n.agentOptionsList=[],n.selectedAgent=void 0,n.onAgentSelected=(a,o)=>{if(!o.isCompatible)return a.stopPropagation(),void a.preventDefault();if(i(o),_.saveAgent(o),n.selectedAgent=o,e.selectAgent(o),o.isRepositoryDeleted){const n=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.title"),a=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.body");A.openConfirmation(n,a,()=>e.emit(E.TTYGEventName.EDIT_AGENT,o))}};const i=e=>{n.agentOptionsList.forEach(t=>{t.selected=t.data.agent===e})},o=e=>{i(e),n.selectedAgent=e},s=[];s.push(e.onAgentsListChanged(t=>{var E;E=t,n.agentOptionsList=E.agents.map(e=>new a.SelectMenuOptionsModel({value:e.id,label:e.name,data:{agent:e}})),(()=>{let t;const a=_.getAgentId();a&&n.agentOptionsList.forEach(e=>{e.data.agent.id===a&&(t=e.data.agent)}),!t&&n.agentOptionsList[0]&&(t=n.agentOptionsList[0].data.agent),o(t),e.selectAgent(t)})()})),s.push(e.subscribe(E.TTYGEventName.AGENT_DELETED,t=>{n.selectedAgent&&n.selectedAgent.id===t.id&&(n.selectedAgent.isDeleted=!0,e.selectAgent(n.selectedAgent))})),s.push(e.onSelectedAgentChanged(o)),n.$on("$destroy",()=>{s.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.agent-select-menu",[]).directive("agentSelectMenu",A),A.$inject=["TTYGContextService","$translate","$sce","ModalService","TTYGStorageService"]},71920:(e,t,n)=>{n.r(t),n.d(t,{TTYGEventName:()=>A});var a=n(98980);function E(e){let t,n,E,_,i,o={},s=!1;const T=()=>(0,a.cloneDeep)(t),c=()=>(0,a.cloneDeep)(n),C=e=>{n=(0,a.cloneDeep)(e),u(A.CHAT_LIST_UPDATED,c())},d=e=>{n.appendChat(e),C(n)},l=()=>(0,a.cloneDeep)(E),g=e=>{E&&E.id===e.id||(E=(0,a.cloneDeep)(e),u(A.SELECT_CHAT,l()))},S=()=>(0,a.cloneDeep)(_),D=()=>(0,a.cloneDeep)(o),r=e=>!!o[e],p=()=>s,u=(t,n)=>{e.emitSync(t,(0,a.cloneDeep)(n))},L=(t,n)=>e.subscribeSync(t,e=>n(e));return{resetContext:()=>{t=void 0,n=void 0,E=void 0,_=void 0,o={},i=void 0,s=!1},emit:u,subscribe:L,getChats:c,updateChats:C,addChat:d,replaceChat:(e,t)=>{n.replaceChat(e,t),C(n)},createChat:e=>{d(e),g(e),u(A.CREATE_CHAT_SUCCESSFUL,e)},onChatsListChanged:e=>(n&&angular.isFunction(e)&&e(c()),L(A.CHAT_LIST_UPDATED,t=>e(t))),getSelectedChat:l,selectChat:g,deselectChat:()=>{E=void 0,u(A.SELECT_CHAT,l())},deleteChat:e=>{n.deleteChat(e),C(n)},onSelectedChatChanged:e=>(angular.isFunction(e)&&e(l()),L(A.SELECT_CHAT,t=>e(t))),updateSelectedChat:e=>{E&&E.id&&e&&E.id!==e.id||(E=(0,a.cloneDeep)(e),u(A.SELECTED_CHAT_UPDATED,l()))},onSelectedChatUpdated:e=>(E&&angular.isFunction(e)&&e(l()),L(A.SELECTED_CHAT_UPDATED,t=>e(t))),onLastMessageReceived:e=>(E&&angular.isFunction(e)&&e(l()),L(A.LAST_MESSAGE_RECEIVED,t=>e(t))),updateAgents:e=>{t=(0,a.cloneDeep)(e),u(A.AGENT_LIST_UPDATED,T())},onAgentsListChanged:e=>(t&&angular.isFunction(e)&&e(T()),L(A.AGENT_LIST_UPDATED,t=>e(t))),getAgents:T,getAgent:e=>{if(t)return(0,a.cloneDeep)(t.getAgent(e))},selectAgent:e=>{_=(0,a.cloneDeep)(e),u(A.AGENT_SELECTED,S())},getSelectedAgent:S,onSelectedAgentChanged:e=>(_&&angular.isFunction(e)&&e(S()),L(A.AGENT_SELECTED,t=>e(t))),getDefaultAgent:()=>(0,a.cloneDeep)(i),setDefaultAgent:e=>{i=e},setCanModifyAgent:e=>{s=(0,a.cloneDeep)(e),u(A.CAN_MODIFY_AGENT_UPDATED,p())},getCanModifyAgent:p,onCanUpdateAgentUpdated:e=>(angular.isFunction(e)&&e(p()),L(A.CAN_MODIFY_AGENT_UPDATED,t=>e(t))),hasExplainResponse:r,toggleExplainResponse:e=>{r(e)&&(o[e].expanded=!o[e].expanded,u(A.EXPLAIN_RESPONSE_CACHE_UPDATED,D()))},getExplainResponse:e=>(0,a.cloneDeep)(o[e]),addExplainResponseCache:e=>{o[e.answerId]=(0,a.cloneDeep)(e),u(A.EXPLAIN_RESPONSE_CACHE_UPDATED,D())},onExplainResponseCacheUpdated:e=>(angular.isFunction(e)&&e(D()),L(A.EXPLAIN_RESPONSE_CACHE_UPDATED,t=>e(t)))}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",E),E.$inject=["EventEmitterService","TTYGService"];const A={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",CANCEL_PENDING_QUESTION:"cancelPendingQuestion",PENDING_QUESTION_CANCELED_SUCCESSFUL:"pendingQuestionCanceledSuccessful",CANCEL_PENDING_QUESTION_FAILURE:"cancelPendingQuestionFailed",ASK_QUESTION_STARTING:"askQuestionStarting",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",GO_TO_AUTOCOMPLETE_INDEX_VIEW:"goToAutocompleteIndexView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated"}}};
2
+ //# sourceMappingURL=44874.b16be286176dfe4aa766.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"44874.b16be286176dfe4aa766.bundle.js","mappings":"sKAYA,SAASA,EAAyBC,EAAoBC,EAAYC,EAAMC,EAAcC,GAClF,MAAO,CACHC,SAAU,IACVC,YAAa,mDACbC,MAAO,CACP,EACAC,KAAOC,IAMHA,EAAOC,iBAAmB,GAM1BD,EAAOE,mBAAgBC,EAevBH,EAAOI,gBAAkB,CAACC,EAAQC,KAC9B,IAAKA,EAAMC,aAKP,OAFAF,EAAOG,uBACPH,EAAOI,iBAOX,GAJAC,EAAeJ,GACfX,EAAmBgB,UAAUL,GAC7BN,EAAOE,cAAgBI,EACvBf,EAAmBqB,YAAYN,GAC3BA,EAAMO,oBAAqB,CAC3B,MAAMC,EAAQtB,EAAWuB,QAAQ,4DAC3BC,EAAiBxB,EAAWuB,QAAQ,2DAC1CrB,EAAauB,iBAAiBH,EAAOE,EACjC,IAAMzB,EAAmB2B,KAAKC,EAAAA,cAAcC,WAAYd,GAEhE,GAWJ,MAAMI,EAAkBJ,IACpBN,EAAOC,iBAAiBoB,QAASC,IAC7BA,EAAYC,SAAWD,EAAYE,KAAKlB,QAAUA,KAyDpDmB,EAA0BnB,IAC5BI,EAAeJ,GACfN,EAAOE,cAAgBI,GAuBrBoB,EAAgB,GAMtBA,EAAcC,KAAKpC,EAAmBqC,oBAhFVC,IA0DIC,QAzDLD,EA0DvB7B,EAAOC,iBAAmB6B,EAAgBD,OAAOE,IAAKzB,GAC3C,IA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C,EAAc4F,+BAAgCtC,OAiHvDuC,mBAtIwBrC,IACjBf,EAAAA,EAAAA,WAAUH,EAAckB,IAsI/BsC,wBA9H6BC,IAC7BzD,EAAcyD,EAAgBvC,WAAYf,EAAAA,EAAAA,WAAUsD,GACpDhG,EAAKC,EAAc4F,+BAAgCtC,MA6HnD0C,8BAzGmCnC,IAC/BjC,QAAQyC,WAAWR,IACnBA,EAASP,KAENjC,EAAUrB,EAAc4F,+BAAiCK,GAAqBpC,EAASoC,KAuGtG,CApZArE,QACKC,OAAO,8CAA+C,IACtDqE,QAAQ,qBAAsB9H,GAEnCA,EAAmB2D,QAAU,CAAC,sBAAuB,eAkZ9C,MAAM/B,EAAgB,CAIzBmG,YAAa,aAKbhC,uBAAwB,cAKxBiC,oBAAqB,qBAErBC,YAAa,aACbC,uBAAwB,cACxBC,oBAAqB,qBAKrBnD,YAAa,aAKbuB,sBAAuB,oBAKvBG,sBAAuB,sBAMvB0B,cAAe,eAKfC,YAAa,aAKbC,uBAAwB,cASxBC,oBAAqB,qBAErBC,YAAa,aACbC,uBAAwB,oBACxBC,oBAAqB,oBACrBjE,kBAAmB,kBAKnBkE,aAAc,cAKdC,qBAAsB,qBAKtBC,kBAAmB,kBAKnBC,wBAAyB,wBAKzBC,qCAAsC,oCAKtCC,gCAAiC,8BAKjCC,sBAAuB,sBAKvBC,WAAY,YACZC,qBAAsB,kBACtBC,kBAAmB,kBAEnBxC,mBAAoB,mBAMpByC,oBAAqB,oBAKrBxH,WAAY,YAKZyH,YAAa,aAKbC,aAAc,cAKdrG,cAAe,eAMfsG,eAAgB,gBAKhBzC,eAAgB,gBAKhB0C,6BAA8B,2BAK9BC,sBAAuB,qBAKvBC,8BAA+B,4BAK/BC,iBAAkB,kBAKlBpC,+BAAgC,8BAKhCqC,oBAAqB,0BAErBzC,yBAA0B,wB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/directives/agent-select-menu.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/ttyg-context.service.js"],"sourcesContent":["import {SelectMenuOptionsModel} from \"../../models/form-fields\";\nimport {TTYGEventName} from \"../services/ttyg-context.service\";\n\nconst modules = [\n];\n\nangular\n .module('graphdb.framework.ttyg.directives.agent-select-menu', modules)\n .directive('agentSelectMenu', AgentSelectMenuComponent);\n\nAgentSelectMenuComponent.$inject = ['TTYGContextService', '$translate', '$sce', 'ModalService', 'TTYGStorageService'];\n\nfunction AgentSelectMenuComponent(TTYGContextService, $translate, $sce, ModalService, TTYGStorageService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/ttyg/templates/agent-select-menu.html',\n scope: {\n },\n link: ($scope) => {\n\n // =========================\n // Public variables\n // =========================\n\n $scope.agentOptionsList = [];\n\n /**\n * Selected agent ID.\n * @type {AgentModel|undefined}\n */\n $scope.selectedAgent = undefined;\n\n // =========================\n // Private variables\n // =========================\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Handles the agent selection.\n * @param {Event} $event - The DOM event triggered by the selection.\n * @param {AgentModel} agent - The selected agent instance.\n */\n $scope.onAgentSelected = ($event, agent) => {\n if (!agent.isCompatible) {\n // Prevents the dropdown from closing if the selected agent is not compatible\n // by stopping event propagation and preventing the default action.\n $event.stopPropagation();\n $event.preventDefault();\n return;\n }\n markAsSelected(agent);\n TTYGStorageService.saveAgent(agent);\n $scope.selectedAgent = agent;\n TTYGContextService.selectAgent(agent);\n if (agent.isRepositoryDeleted) {\n const title = $translate.instant('ttyg.agent.agent_select_menu.configure_agent_modal.title');\n const confirmMessage = $translate.instant('ttyg.agent.agent_select_menu.configure_agent_modal.body');\n ModalService.openConfirmation(title, confirmMessage,\n () => TTYGContextService.emit(TTYGEventName.EDIT_AGENT, agent)\n );\n }\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Marks the given agent as selected and deselects the rest.\n * @param {AgentModel} agent\n */\n const markAsSelected = (agent) => {\n $scope.agentOptionsList.forEach((agentOption) => {\n agentOption.selected = agentOption.data.agent === agent;\n });\n };\n\n /**\n * Handles the agent list change event.\n * @param {AgentListModel} agents\n */\n const onAgentListChanged = (agents) => {\n buildAgentOptionsModel(agents);\n selectLastUsedOrDefaultAgent();\n };\n\n /**\n * Function to select the most recently used agent (according to local store) or selects the first in the list\n * if no recent agent is available.\n *\n * @function\n */\n const selectLastUsedOrDefaultAgent = () => {\n let selectedAgent;\n const storedAgentId = TTYGStorageService.getAgentId();\n\n if (storedAgentId) {\n // If saved in the LocalStore, the user has selected it, so select it here\n $scope.agentOptionsList.forEach((agent) => {\n if (agent.data.agent.id === storedAgentId) {\n selectedAgent = agent.data.agent\n }\n });\n }\n\n // Otherwise, select the first in the option list\n if (!selectedAgent && $scope.agentOptionsList[0]) {\n selectedAgent = $scope.agentOptionsList[0].data.agent;\n }\n onSelectedAgentChanged(selectedAgent);\n TTYGContextService.selectAgent(selectedAgent);\n }\n\n /**\n * Handles the agent deleted event.\n * @param {AgentModel} deletedAgent - the deleted agent\n */\n const onAgentDeleted = (deletedAgent) => {\n if ($scope.selectedAgent && $scope.selectedAgent.id === deletedAgent.id) {\n $scope.selectedAgent.isDeleted = true;\n TTYGContextService.selectAgent($scope.selectedAgent);\n }\n };\n\n /**\n * Handles the selection of an agent. When an agent is selected by the user from this menu, the agent is then\n * saved in the local storage. When the TTYG view is initialized, the selected agent is retrieved from the\n * local and its details loaded through the API. Then this component is updated to reflect the selected agent.\n * @param {AgentModel} agent\n */\n const onSelectedAgentChanged = (agent) => {\n markAsSelected(agent);\n $scope.selectedAgent = agent;\n };\n\n /**\n * Builds the agent options model which is used to display the agents in the select menu.\n * @param {AgentListModel} agentsListModel\n */\n const buildAgentOptionsModel = (agentsListModel) => {\n $scope.agentOptionsList = agentsListModel.agents.map((agent) => {\n return new SelectMenuOptionsModel({\n value: agent.id,\n label: agent.name,\n data: {\n agent: agent\n }\n });\n });\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n const subscriptions = [];\n\n const removeAllSubscribers = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n subscriptions.push(TTYGContextService.onAgentsListChanged(onAgentListChanged));\n subscriptions.push(TTYGContextService.subscribe(TTYGEventName.AGENT_DELETED, onAgentDeleted));\n subscriptions.push(TTYGContextService.onSelectedAgentChanged(onSelectedAgentChanged));\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n\n // =========================\n // Initialization\n // =========================\n\n function initialize() {\n // buildAgentOptionsModel();\n }\n initialize();\n }\n };\n}\n","import {cloneDeep} from 'lodash';\n\nangular\n .module('graphdb.framework.ttyg.services.ttygcontext', [])\n .factory('TTYGContextService', TTYGContextService);\n\nTTYGContextService.$inject = ['EventEmitterService', 'TTYGService'];\n\nfunction TTYGContextService(EventEmitterService) {\n\n /**\n * The list of agents.\n * @type {AgentListModel}\n * @private\n */\n let _agents = undefined;\n\n /**\n * The ChatsListModel.\n * @type {ChatsListModel}\n * @private\n */\n let _chats = undefined;\n\n /**\n * The currently selected in the UI chat which is used for conversation.\n * @type {ChatModel|undefined}\n * @private\n */\n let _selectedChat = undefined;\n\n /**\n * The currently selected in the UI agent which is used for conversation.\n * @type {AgentModel|undefined}\n * @private\n */\n let _selectedAgent = undefined;\n\n /**\n * Stores information about loaded explain responses.\n * The key is the answer ID, and the value is an instance of {@see ExplainResponseModel} that holds the explanation message.\n *\n * @type {{[key: string]: ExplainResponseModel}}\n */\n let _explainCache = {};\n\n /**\n * The default agent values.\n * @type {AgentModel|undefined}\n * @private\n */\n let _defaultAgent = undefined;\n\n let _canModifyAgent = false;\n\n const resetContext = () => {\n _agents = undefined;\n _chats = undefined;\n _selectedChat = undefined;\n _selectedAgent = undefined;\n _explainCache = {};\n _defaultAgent = undefined;\n _canModifyAgent = false;\n };\n\n /**\n * @return {Promise<AgentModel>}\n */\n const getDefaultAgent = () => {\n return cloneDeep(_defaultAgent);\n };\n\n const setDefaultAgent = (agent) => {\n _defaultAgent = agent;\n };\n\n /**\n * @return {AgentListModel}\n */\n const getAgents = () => {\n return cloneDeep(_agents);\n };\n\n const getAgent = (agentId) => {\n if (_agents) {\n return cloneDeep(_agents.getAgent(agentId));\n }\n };\n\n /**\n * @return {ChatsListModel}\n */\n const getChats = () => {\n return cloneDeep(_chats);\n };\n\n /**\n * @param {ChatsListModel} chats\n */\n const updateChats = (chats) => {\n _chats = cloneDeep(chats);\n emit(TTYGEventName.CHAT_LIST_UPDATED, getChats());\n };\n\n /**\n * Deletes the chat with the provided <code>chatId</code>.\n * @param {ChatModel} chat\n */\n const deleteChat = (chat) => {\n _chats.deleteChat(chat);\n updateChats(_chats);\n };\n\n const addChat = (newChat) => {\n _chats.appendChat(newChat);\n updateChats(_chats);\n };\n\n const replaceChat = (newChat, oldChat) => {\n _chats.replaceChat(newChat, oldChat);\n updateChats(_chats);\n };\n\n const createChat = (newChat) => {\n addChat(newChat);\n selectChat(newChat);\n emit(TTYGEventName.CREATE_CHAT_SUCCESSFUL, newChat);\n }\n\n /** Subscribes to the 'chatListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onChatsListChanged = (callback) => {\n if (_chats && angular.isFunction(callback)) {\n callback(getChats());\n }\n return subscribe(TTYGEventName.CHAT_LIST_UPDATED, (chats) => callback(chats));\n };\n\n /**\n * @return {ChatModel}\n */\n const getSelectedChat = () => {\n return cloneDeep(_selectedChat);\n };\n\n /**\n * Updates the selected chat with the provided <code>selectedChat</code> and emits the 'selectChat' event\n * to notify listeners that a new chat has been selected.\n *\n * @param {ChatModel} selectedChat - The chat object to select.\n */\n const selectChat = (selectedChat) => {\n if (!_selectedChat || _selectedChat.id !== selectedChat.id) {\n _selectedChat = cloneDeep(selectedChat);\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n }\n };\n\n const deselectChat = () => {\n _selectedChat = undefined;\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n };\n\n /**\n * Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatChanged = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECT_CHAT, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the selected chat and emits the 'selectChatUpdated' event to notify listeners that a property\n * of the selected chat has changed.\n *\n * If the ID of the passed chat differs from the current selected chat, no action will occur.\n *\n * The selected chat can be updated through {@link TTYGContextService#selectChat}.\n *\n * @param {ChatModel} chat - The chat object that is being updated.\n */\n const updateSelectedChat = (chat) => {\n if (!_selectedChat || !_selectedChat.id || !chat || _selectedChat.id === chat.id) {\n _selectedChat = cloneDeep(chat);\n emit(TTYGEventName.SELECTED_CHAT_UPDATED, getSelectedChat());\n }\n };\n\n /** Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatUpdated = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECTED_CHAT_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /** Subscribes to the 'lastMessageReceived' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onLastMessageReceived = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.LAST_MESSAGE_RECEIVED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @param {AgentListModel} agents\n */\n const updateAgents = (agents) => {\n _agents = cloneDeep(agents);\n emit(TTYGEventName.AGENT_LIST_UPDATED, getAgents());\n };\n\n /**\n * Subscribes to the 'agentListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onAgentsListChanged = (callback) => {\n if (_agents && angular.isFunction(callback)) {\n callback(getAgents());\n }\n return subscribe(TTYGEventName.AGENT_LIST_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @return {AgentModel}\n */\n const getSelectedAgent = () => {\n return cloneDeep(_selectedAgent);\n };\n\n /**\n * Updates the selected agent with the provided <code>selectedAgent</code> and emits the 'agentSelected' event\n * to notify listeners that a new agent has been selected.\n *\n * @param {AgentModel} selectedAgent - The instance of selected agent.\n */\n const selectAgent = (selectedAgent) => {\n _selectedAgent = cloneDeep(selectedAgent);\n emit(TTYGEventName.AGENT_SELECTED, getSelectedAgent());\n };\n\n const _getExplainResponseCache = () => {\n return cloneDeep(_explainCache);\n };\n\n /**\n * Gets the explain response.\n * @param {string} answerId\n * @return {ExplainResponseModel}\n */\n const getExplainResponse = (answerId) => {\n return cloneDeep(_explainCache[answerId]);\n };\n\n /**\n * Adds the <code>explainResponse</code> into the explain response cache.\n *\n * @param {ExplainResponseModel} explainResponse\n */\n const addExplainResponseCache = (explainResponse) => {\n _explainCache[explainResponse.answerId] = cloneDeep(explainResponse);\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n };\n\n const hasExplainResponse = (answerId) => {\n return !!_explainCache[answerId];\n };\n\n const toggleExplainResponse = (answerId) => {\n if (hasExplainResponse(answerId)) {\n _explainCache[answerId].expanded = !_explainCache[answerId].expanded;\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n }\n };\n\n /**\n * Subscribes to the 'explainResponseCacheUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onExplainResponseCacheUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(_getExplainResponseCache());\n }\n return subscribe(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, (explainResponses) => callback(explainResponses));\n };\n\n /**\n * Subscribes to the 'agentSelected' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedAgentChanged = (callback) => {\n if (_selectedAgent && angular.isFunction(callback)) {\n callback(getSelectedAgent());\n }\n return subscribe(TTYGEventName.AGENT_SELECTED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the \"canModifyAgent\" flag and emits the 'canModifyAgentUpdated' event to notify listeners that the canModifyAgent flag is changed.\n *\n * @param {boolean} canModifyAgent\n */\n const setCanModifyAgent = (canModifyAgent) => {\n _canModifyAgent = cloneDeep(canModifyAgent);\n emit(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, getCanModifyAgent());\n };\n\n const getCanModifyAgent = () => {\n return _canModifyAgent;\n };\n\n /**\n * Subscribes to the 'canModifyAgentUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onCanUpdateAgentUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getCanModifyAgent());\n }\n return subscribe(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, (canModifyAgent) => callback(canModifyAgent));\n };\n\n /**\n * Emits an event with a deep-cloned payload using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to emit. It must be a value from {@link TTYGEventName}.\n * @param {*} payload - The data to emit with the event. The payload is deep-cloned before emission.\n */\n const emit = (tTYGEventName, payload) => {\n EventEmitterService.emitSync(tTYGEventName, cloneDeep(payload));\n };\n\n /**\n * Subscribes to an event with the specified callback using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to subscribe to. It must be a value from {@link TTYGEventName}.\n * @param {function} callback - The function to call when the event is emitted.\n * @return {function} - Returns a function that can be called to unsubscribe from the event.\n */\n const subscribe = (tTYGEventName, callback) => {\n return EventEmitterService.subscribeSync(tTYGEventName, (payload) => callback(payload));\n };\n\n return {\n resetContext,\n emit,\n subscribe,\n // chats\n getChats,\n updateChats,\n addChat,\n replaceChat,\n createChat,\n onChatsListChanged,\n getSelectedChat,\n selectChat,\n deselectChat,\n deleteChat,\n onSelectedChatChanged,\n updateSelectedChat,\n onSelectedChatUpdated,\n onLastMessageReceived,\n // agents\n updateAgents,\n onAgentsListChanged,\n getAgents,\n getAgent,\n selectAgent,\n getSelectedAgent,\n onSelectedAgentChanged,\n getDefaultAgent,\n setDefaultAgent,\n setCanModifyAgent,\n getCanModifyAgent,\n onCanUpdateAgentUpdated,\n // chat explain\n hasExplainResponse,\n toggleExplainResponse,\n getExplainResponse,\n addExplainResponseCache,\n onExplainResponseCacheUpdated\n };\n}\n\nexport const TTYGEventName = {\n /**\n * Emitting the \"createChat\" event triggers a backend request to create a new chat.\n */\n CREATE_CHAT: 'createChat',\n\n /**\n * This event is emitted when a chat is successfully created.\n */\n CREATE_CHAT_SUCCESSFUL: 'chatCreated',\n\n /**\n * This event is emitted when the creation of a chat fails.\n */\n CREATE_CHAT_FAILURE: 'chatCreationFailed',\n\n RENAME_CHAT: 'renameChat',\n RENAME_CHAT_SUCCESSFUL: 'chatRenamed',\n RENAME_CHAT_FAILURE: 'chatRenamedFailure',\n\n /**\n * Emitting the \"selectChat\" event when the selected chat has been changed.\n */\n SELECT_CHAT: 'selectChat',\n\n /**\n * Emitting the \"selectChatUpdated\" event when the selected chat has been updated.\n */\n SELECTED_CHAT_UPDATED: 'selectChatUpdated',\n\n /**\n * Emitting the \"lastMessageReceived\" event when the final answer message has been received.\n */\n LAST_MESSAGE_RECEIVED: 'lastMessageReceived',\n\n /**\n * This event will be emitted when the chat delete request is in progress. The payload will contain the chat ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_CHAT: 'deletingChat',\n\n /**\n * This event will be emitted when the delete chat process is triggered but before the chat delete request is sent.\n */\n DELETE_CHAT: 'deleteChat',\n\n /**\n * This event will be emitted when the chat was successfully deleted.\n */\n DELETE_CHAT_SUCCESSFUL: 'chatDeleted',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n\n /**\n * This event is emitted when the deletion of a chat fails.\n */\n DELETE_CHAT_FAILURE: 'chatDeletedFailure',\n\n CHAT_EXPORT: 'chatExport',\n CHAT_EXPORT_SUCCESSFUL: 'chatExportSuccess',\n CHAT_EXPORT_FAILURE: 'chatExportFailure',\n CHAT_LIST_UPDATED: 'chatListUpdated',\n\n /**\n * Emitting the \"askQuestion\" event triggers a request to the backend to retrieve an answer to a question.\n */\n ASK_QUESTION: 'askQuestion',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n ASK_QUESTION_FAILURE: 'askQuestionFailure',\n\n /**\n * Emitting the \"continueChatRun\" event triggers a request to the backend to retrieve more remaining answers from the same chat run.\n */\n CONTINUE_CHAT_RUN: 'continueChatRun',\n\n /**\n * Emitting the \"cancelPendingQuestion\" event triggers the cancellation of a pending question in a chat.\n */\n CANCEL_PENDING_QUESTION: \"cancelPendingQuestion\",\n\n /**\n * This event is emitted when the cancellation of the pending question succeeds.\n */\n PENDING_QUESTION_CANCELED_SUCCESSFUL: \"pendingQuestionCanceledSuccessful\",\n\n /**\n * This event is emitted when the cancellation of the pending question fails.\n */\n CANCEL_PENDING_QUESTION_FAILURE: \"cancelPendingQuestionFailed\",\n\n /**\n * This event will be fired before a question is sent to BE for processing.\n */\n ASK_QUESTION_STARTING: \"askQuestionStarting\",\n\n /**\n * Emitting the \"loadChats\" event will trigger an action to loads all chats from backend server.\n */\n LOAD_CHATS: 'loadChats',\n LOAD_CHAT_SUCCESSFUL: 'loadChatSuccess',\n LOAD_CHAT_FAILURE: 'loadChatFailure',\n\n AGENT_LIST_UPDATED: 'agentListUpdated',\n\n /**\n * This event will be emitted when the create agent process is triggered through the UI but before the agent create\n * request is sent. This is used to open the agent settings dialog.\n */\n OPEN_AGENT_SETTINGS: 'openAgentSettings',\n\n /**\n * This event will be emitted when an agent needs to be edited.\n */\n EDIT_AGENT: 'editAgent',\n\n /**\n * This event will be emitted when an agent needs to be cloned.\n */\n CLONE_AGENT: 'cloneAgent',\n\n /**\n * This event will be emitted when the delete agent process is triggered but before the agent delete request is sent.\n */\n DELETE_AGENT: 'deleteAgent',\n\n /**\n * This event will be emitted when the agent was successfully deleted.\n */\n AGENT_DELETED: 'agentDeleted',\n\n /**\n * This event will be emitted when the agent delete request is in progress. The payload will contain the agent ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_AGENT: 'deletingAgent',\n\n /**\n * This event will be emitted when an agent is selected by the user through the UI.\n */\n AGENT_SELECTED: 'agentSelected',\n\n /**\n * This event will trigger the opening of the similarity view.\n */\n GO_TO_CREATE_SIMILARITY_VIEW: \"goToCreateSimilarityView\",\n\n /**\n * This event will trigger the opening of the connectors view.\n */\n GO_TO_CONNECTORS_VIEW: \"goToConnectorsView\",\n\n /**\n * This event will trigger the opening of the \"Autocomplete index\" view.\n */\n GO_TO_AUTOCOMPLETE_INDEX_VIEW: \"goToAutocompleteIndexView\",\n\n /**\n * This event will trigger fetching a new explanation of how the answer was generated.\n */\n EXPLAIN_RESPONSE: \"explainResponse\",\n\n /**\n * This event will be emitted when the cache with explain responses changed.\n */\n EXPLAIN_RESPONSE_CACHE_UPDATED: \"explainResponseCacheUpdated\",\n\n /**\n * This event will trigger the opening of the sparql view.\n */\n GO_TO_SPARQL_EDITOR: \"openQueryInSparqlEditor\",\n\n CAN_MODIFY_AGENT_UPDATED: \"canModifyAgentUpdated\",\n};\n"],"names":["AgentSelectMenuComponent","TTYGContextService","$translate","$sce","ModalService","TTYGStorageService","restrict","templateUrl","scope","link","$scope","agentOptionsList","selectedAgent","undefined","onAgentSelected","$event","agent","isCompatible","stopPropagation","preventDefault","markAsSelected","saveAgent","selectAgent","isRepositoryDeleted","title","instant","confirmMessage","openConfirmation","emit","TTYGEventName","EDIT_AGENT","forEach","agentOption","selected","data","onSelectedAgentChanged","subscriptions","push","onAgentsListChanged","agents","agentsListModel","map","SelectMenuOptionsModel","value","id","label","name","selectLastUsedOrDefaultAgent","storedAgentId","getAgentId","subscribe","AGENT_DELETED","deletedAgent","isDeleted","$on","removeAllSubscribers","subscription","angular","module","directive","$inject","EventEmitterService","_agents","_chats","_selectedChat","_selectedAgent","_defaultAgent","_explainCache","_canModifyAgent","getAgents","cloneDeep","getChats","updateChats","chats","CHAT_LIST_UPDATED","addChat","newChat","appendChat","getSelectedChat","selectChat","selectedChat","SELECT_CHAT","getSelectedAgent","_getExplainResponseCache","hasExplainResponse","answerId","getCanModifyAgent","tTYGEventName","payload","emitSync","callback","subscribeSync","resetContext","replaceChat","oldChat","createChat","CREATE_CHAT_SUCCESSFUL","onChatsListChanged","isFunction","deselectChat","deleteChat","chat","onSelectedChatChanged","updateSelectedChat","SELECTED_CHAT_UPDATED","onSelectedChatUpdated","onLastMessageReceived","LAST_MESSAGE_RECEIVED","updateAgents","AGENT_LIST_UPDATED","getAgent","agentId","AGENT_SELECTED","getDefaultAgent","setDefaultAgent","setCanModifyAgent","canModifyAgent","CAN_MODIFY_AGENT_UPDATED","onCanUpdateAgentUpdated","toggleExplainResponse","expanded","EXPLAIN_RESPONSE_CACHE_UPDATED","getExplainResponse","addExplainResponseCache","explainResponse","onExplainResponseCacheUpdated","explainResponses","factory","CREATE_CHAT","CREATE_CHAT_FAILURE","RENAME_CHAT","RENAME_CHAT_SUCCESSFUL","RENAME_CHAT_FAILURE","DELETING_CHAT","DELETE_CHAT","DELETE_CHAT_SUCCESSFUL","DELETE_CHAT_FAILURE","CHAT_EXPORT","CHAT_EXPORT_SUCCESSFUL","CHAT_EXPORT_FAILURE","ASK_QUESTION","ASK_QUESTION_FAILURE","CONTINUE_CHAT_RUN","CANCEL_PENDING_QUESTION","PENDING_QUESTION_CANCELED_SUCCESSFUL","CANCEL_PENDING_QUESTION_FAILURE","ASK_QUESTION_STARTING","LOAD_CHATS","LOAD_CHAT_SUCCESSFUL","LOAD_CHAT_FAILURE","OPEN_AGENT_SETTINGS","CLONE_AGENT","DELETE_AGENT","DELETING_AGENT","GO_TO_CREATE_SIMILARITY_VIEW","GO_TO_CONNECTORS_VIEW","GO_TO_AUTOCOMPLETE_INDEX_VIEW","EXPLAIN_RESPONSE","GO_TO_SPARQL_EDITOR"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_id__=49539;export const __webpack_ids__=[49539,71920];export const __webpack_modules__={71920:(e,E,t)=>{t.r(E),t.d(E,{TTYGEventName:()=>_});var n=t(98980);function a(e){let E,t,a,C,A,T={},o=!1;const c=()=>(0,n.cloneDeep)(E),d=()=>(0,n.cloneDeep)(t),S=e=>{t=(0,n.cloneDeep)(e),N(_.CHAT_LIST_UPDATED,d())},i=e=>{t.appendChat(e),S(t)},D=()=>(0,n.cloneDeep)(a),l=e=>{a&&a.id===e.id||(a=(0,n.cloneDeep)(e),N(_.SELECT_CHAT,D()))},s=()=>(0,n.cloneDeep)(C),p=()=>(0,n.cloneDeep)(T),g=e=>!!T[e],L=()=>o,N=(E,t)=>{e.emitSync(E,(0,n.cloneDeep)(t))},U=(E,t)=>e.subscribeSync(E,e=>t(e));return{resetContext:()=>{E=void 0,t=void 0,a=void 0,C=void 0,T={},A=void 0,o=!1},emit:N,subscribe:U,getChats:d,updateChats:S,addChat:i,replaceChat:(e,E)=>{t.replaceChat(e,E),S(t)},createChat:e=>{i(e),l(e),N(_.CREATE_CHAT_SUCCESSFUL,e)},onChatsListChanged:e=>(t&&angular.isFunction(e)&&e(d()),U(_.CHAT_LIST_UPDATED,E=>e(E))),getSelectedChat:D,selectChat:l,deselectChat:()=>{a=void 0,N(_.SELECT_CHAT,D())},deleteChat:e=>{t.deleteChat(e),S(t)},onSelectedChatChanged:e=>(angular.isFunction(e)&&e(D()),U(_.SELECT_CHAT,E=>e(E))),updateSelectedChat:e=>{a&&a.id&&e&&a.id!==e.id||(a=(0,n.cloneDeep)(e),N(_.SELECTED_CHAT_UPDATED,D()))},onSelectedChatUpdated:e=>(a&&angular.isFunction(e)&&e(D()),U(_.SELECTED_CHAT_UPDATED,E=>e(E))),onLastMessageReceived:e=>(a&&angular.isFunction(e)&&e(D()),U(_.LAST_MESSAGE_RECEIVED,E=>e(E))),updateAgents:e=>{E=(0,n.cloneDeep)(e),N(_.AGENT_LIST_UPDATED,c())},onAgentsListChanged:e=>(E&&angular.isFunction(e)&&e(c()),U(_.AGENT_LIST_UPDATED,E=>e(E))),getAgents:c,getAgent:e=>{if(E)return(0,n.cloneDeep)(E.getAgent(e))},selectAgent:e=>{C=(0,n.cloneDeep)(e),N(_.AGENT_SELECTED,s())},getSelectedAgent:s,onSelectedAgentChanged:e=>(C&&angular.isFunction(e)&&e(s()),U(_.AGENT_SELECTED,E=>e(E))),getDefaultAgent:()=>(0,n.cloneDeep)(A),setDefaultAgent:e=>{A=e},setCanModifyAgent:e=>{o=(0,n.cloneDeep)(e),N(_.CAN_MODIFY_AGENT_UPDATED,L())},getCanModifyAgent:L,onCanUpdateAgentUpdated:e=>(angular.isFunction(e)&&e(L()),U(_.CAN_MODIFY_AGENT_UPDATED,E=>e(E))),hasExplainResponse:g,toggleExplainResponse:e=>{g(e)&&(T[e].expanded=!T[e].expanded,N(_.EXPLAIN_RESPONSE_CACHE_UPDATED,p()))},getExplainResponse:e=>(0,n.cloneDeep)(T[e]),addExplainResponseCache:e=>{T[e.answerId]=(0,n.cloneDeep)(e),N(_.EXPLAIN_RESPONSE_CACHE_UPDATED,p())},onExplainResponseCacheUpdated:e=>(angular.isFunction(e)&&e(p()),U(_.EXPLAIN_RESPONSE_CACHE_UPDATED,E=>e(E)))}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",a),a.$inject=["EventEmitterService","TTYGService"];const _={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",CANCEL_PENDING_QUESTION:"cancelPendingQuestion",PENDING_QUESTION_CANCELED_SUCCESSFUL:"pendingQuestionCanceledSuccessful",CANCEL_PENDING_QUESTION_FAILURE:"cancelPendingQuestionFailed",ASK_QUESTION_STARTING:"askQuestionStarting",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",GO_TO_AUTOCOMPLETE_INDEX_VIEW:"goToAutocompleteIndexView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated"}}};
2
+ //# sourceMappingURL=49539.63984d5b37bc8b9a7244.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"49539.63984d5b37bc8b9a7244.bundle.js","mappings":"kLAQA,SAASA,EAAmBC,GAOxB,IAAIC,EAOAC,EAOAC,EAOAC,EAeAC,EAPAC,EAAgB,CAAC,EASjBC,GAAkB,EAEtB,MAwBMC,EAAYA,KACPC,EAAAA,EAAAA,WAAUR,GAYfS,EAAWA,KACND,EAAAA,EAAAA,WAAUP,GAMfS,EAAeC,IACjBV,GAASO,EAAAA,EAAAA,WAAUG,GACnB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+BAAgC,8BAKhCyC,oBAAqB,0BAErB7C,yBAA0B,wB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/ttyg-context.service.js"],"sourcesContent":["import {cloneDeep} from 'lodash';\n\nangular\n .module('graphdb.framework.ttyg.services.ttygcontext', [])\n .factory('TTYGContextService', TTYGContextService);\n\nTTYGContextService.$inject = ['EventEmitterService', 'TTYGService'];\n\nfunction TTYGContextService(EventEmitterService) {\n\n /**\n * The list of agents.\n * @type {AgentListModel}\n * @private\n */\n let _agents = undefined;\n\n /**\n * The ChatsListModel.\n * @type {ChatsListModel}\n * @private\n */\n let _chats = undefined;\n\n /**\n * The currently selected in the UI chat which is used for conversation.\n * @type {ChatModel|undefined}\n * @private\n */\n let _selectedChat = undefined;\n\n /**\n * The currently selected in the UI agent which is used for conversation.\n * @type {AgentModel|undefined}\n * @private\n */\n let _selectedAgent = undefined;\n\n /**\n * Stores information about loaded explain responses.\n * The key is the answer ID, and the value is an instance of {@see ExplainResponseModel} that holds the explanation message.\n *\n * @type {{[key: string]: ExplainResponseModel}}\n */\n let _explainCache = {};\n\n /**\n * The default agent values.\n * @type {AgentModel|undefined}\n * @private\n */\n let _defaultAgent = undefined;\n\n let _canModifyAgent = false;\n\n const resetContext = () => {\n _agents = undefined;\n _chats = undefined;\n _selectedChat = undefined;\n _selectedAgent = undefined;\n _explainCache = {};\n _defaultAgent = undefined;\n _canModifyAgent = false;\n };\n\n /**\n * @return {Promise<AgentModel>}\n */\n const getDefaultAgent = () => {\n return cloneDeep(_defaultAgent);\n };\n\n const setDefaultAgent = (agent) => {\n _defaultAgent = agent;\n };\n\n /**\n * @return {AgentListModel}\n */\n const getAgents = () => {\n return cloneDeep(_agents);\n };\n\n const getAgent = (agentId) => {\n if (_agents) {\n return cloneDeep(_agents.getAgent(agentId));\n }\n };\n\n /**\n * @return {ChatsListModel}\n */\n const getChats = () => {\n return cloneDeep(_chats);\n };\n\n /**\n * @param {ChatsListModel} chats\n */\n const updateChats = (chats) => {\n _chats = cloneDeep(chats);\n emit(TTYGEventName.CHAT_LIST_UPDATED, getChats());\n };\n\n /**\n * Deletes the chat with the provided <code>chatId</code>.\n * @param {ChatModel} chat\n */\n const deleteChat = (chat) => {\n _chats.deleteChat(chat);\n updateChats(_chats);\n };\n\n const addChat = (newChat) => {\n _chats.appendChat(newChat);\n updateChats(_chats);\n };\n\n const replaceChat = (newChat, oldChat) => {\n _chats.replaceChat(newChat, oldChat);\n updateChats(_chats);\n };\n\n const createChat = (newChat) => {\n addChat(newChat);\n selectChat(newChat);\n emit(TTYGEventName.CREATE_CHAT_SUCCESSFUL, newChat);\n }\n\n /** Subscribes to the 'chatListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onChatsListChanged = (callback) => {\n if (_chats && angular.isFunction(callback)) {\n callback(getChats());\n }\n return subscribe(TTYGEventName.CHAT_LIST_UPDATED, (chats) => callback(chats));\n };\n\n /**\n * @return {ChatModel}\n */\n const getSelectedChat = () => {\n return cloneDeep(_selectedChat);\n };\n\n /**\n * Updates the selected chat with the provided <code>selectedChat</code> and emits the 'selectChat' event\n * to notify listeners that a new chat has been selected.\n *\n * @param {ChatModel} selectedChat - The chat object to select.\n */\n const selectChat = (selectedChat) => {\n if (!_selectedChat || _selectedChat.id !== selectedChat.id) {\n _selectedChat = cloneDeep(selectedChat);\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n }\n };\n\n const deselectChat = () => {\n _selectedChat = undefined;\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n };\n\n /**\n * Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatChanged = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECT_CHAT, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the selected chat and emits the 'selectChatUpdated' event to notify listeners that a property\n * of the selected chat has changed.\n *\n * If the ID of the passed chat differs from the current selected chat, no action will occur.\n *\n * The selected chat can be updated through {@link TTYGContextService#selectChat}.\n *\n * @param {ChatModel} chat - The chat object that is being updated.\n */\n const updateSelectedChat = (chat) => {\n if (!_selectedChat || !_selectedChat.id || !chat || _selectedChat.id === chat.id) {\n _selectedChat = cloneDeep(chat);\n emit(TTYGEventName.SELECTED_CHAT_UPDATED, getSelectedChat());\n }\n };\n\n /** Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatUpdated = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECTED_CHAT_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /** Subscribes to the 'lastMessageReceived' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onLastMessageReceived = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.LAST_MESSAGE_RECEIVED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @param {AgentListModel} agents\n */\n const updateAgents = (agents) => {\n _agents = cloneDeep(agents);\n emit(TTYGEventName.AGENT_LIST_UPDATED, getAgents());\n };\n\n /**\n * Subscribes to the 'agentListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onAgentsListChanged = (callback) => {\n if (_agents && angular.isFunction(callback)) {\n callback(getAgents());\n }\n return subscribe(TTYGEventName.AGENT_LIST_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @return {AgentModel}\n */\n const getSelectedAgent = () => {\n return cloneDeep(_selectedAgent);\n };\n\n /**\n * Updates the selected agent with the provided <code>selectedAgent</code> and emits the 'agentSelected' event\n * to notify listeners that a new agent has been selected.\n *\n * @param {AgentModel} selectedAgent - The instance of selected agent.\n */\n const selectAgent = (selectedAgent) => {\n _selectedAgent = cloneDeep(selectedAgent);\n emit(TTYGEventName.AGENT_SELECTED, getSelectedAgent());\n };\n\n const _getExplainResponseCache = () => {\n return cloneDeep(_explainCache);\n };\n\n /**\n * Gets the explain response.\n * @param {string} answerId\n * @return {ExplainResponseModel}\n */\n const getExplainResponse = (answerId) => {\n return cloneDeep(_explainCache[answerId]);\n };\n\n /**\n * Adds the <code>explainResponse</code> into the explain response cache.\n *\n * @param {ExplainResponseModel} explainResponse\n */\n const addExplainResponseCache = (explainResponse) => {\n _explainCache[explainResponse.answerId] = cloneDeep(explainResponse);\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n };\n\n const hasExplainResponse = (answerId) => {\n return !!_explainCache[answerId];\n };\n\n const toggleExplainResponse = (answerId) => {\n if (hasExplainResponse(answerId)) {\n _explainCache[answerId].expanded = !_explainCache[answerId].expanded;\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n }\n };\n\n /**\n * Subscribes to the 'explainResponseCacheUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onExplainResponseCacheUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(_getExplainResponseCache());\n }\n return subscribe(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, (explainResponses) => callback(explainResponses));\n };\n\n /**\n * Subscribes to the 'agentSelected' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedAgentChanged = (callback) => {\n if (_selectedAgent && angular.isFunction(callback)) {\n callback(getSelectedAgent());\n }\n return subscribe(TTYGEventName.AGENT_SELECTED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the \"canModifyAgent\" flag and emits the 'canModifyAgentUpdated' event to notify listeners that the canModifyAgent flag is changed.\n *\n * @param {boolean} canModifyAgent\n */\n const setCanModifyAgent = (canModifyAgent) => {\n _canModifyAgent = cloneDeep(canModifyAgent);\n emit(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, getCanModifyAgent());\n };\n\n const getCanModifyAgent = () => {\n return _canModifyAgent;\n };\n\n /**\n * Subscribes to the 'canModifyAgentUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onCanUpdateAgentUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getCanModifyAgent());\n }\n return subscribe(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, (canModifyAgent) => callback(canModifyAgent));\n };\n\n /**\n * Emits an event with a deep-cloned payload using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to emit. It must be a value from {@link TTYGEventName}.\n * @param {*} payload - The data to emit with the event. The payload is deep-cloned before emission.\n */\n const emit = (tTYGEventName, payload) => {\n EventEmitterService.emitSync(tTYGEventName, cloneDeep(payload));\n };\n\n /**\n * Subscribes to an event with the specified callback using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to subscribe to. It must be a value from {@link TTYGEventName}.\n * @param {function} callback - The function to call when the event is emitted.\n * @return {function} - Returns a function that can be called to unsubscribe from the event.\n */\n const subscribe = (tTYGEventName, callback) => {\n return EventEmitterService.subscribeSync(tTYGEventName, (payload) => callback(payload));\n };\n\n return {\n resetContext,\n emit,\n subscribe,\n // chats\n getChats,\n updateChats,\n addChat,\n replaceChat,\n createChat,\n onChatsListChanged,\n getSelectedChat,\n selectChat,\n deselectChat,\n deleteChat,\n onSelectedChatChanged,\n updateSelectedChat,\n onSelectedChatUpdated,\n onLastMessageReceived,\n // agents\n updateAgents,\n onAgentsListChanged,\n getAgents,\n getAgent,\n selectAgent,\n getSelectedAgent,\n onSelectedAgentChanged,\n getDefaultAgent,\n setDefaultAgent,\n setCanModifyAgent,\n getCanModifyAgent,\n onCanUpdateAgentUpdated,\n // chat explain\n hasExplainResponse,\n toggleExplainResponse,\n getExplainResponse,\n addExplainResponseCache,\n onExplainResponseCacheUpdated\n };\n}\n\nexport const TTYGEventName = {\n /**\n * Emitting the \"createChat\" event triggers a backend request to create a new chat.\n */\n CREATE_CHAT: 'createChat',\n\n /**\n * This event is emitted when a chat is successfully created.\n */\n CREATE_CHAT_SUCCESSFUL: 'chatCreated',\n\n /**\n * This event is emitted when the creation of a chat fails.\n */\n CREATE_CHAT_FAILURE: 'chatCreationFailed',\n\n RENAME_CHAT: 'renameChat',\n RENAME_CHAT_SUCCESSFUL: 'chatRenamed',\n RENAME_CHAT_FAILURE: 'chatRenamedFailure',\n\n /**\n * Emitting the \"selectChat\" event when the selected chat has been changed.\n */\n SELECT_CHAT: 'selectChat',\n\n /**\n * Emitting the \"selectChatUpdated\" event when the selected chat has been updated.\n */\n SELECTED_CHAT_UPDATED: 'selectChatUpdated',\n\n /**\n * Emitting the \"lastMessageReceived\" event when the final answer message has been received.\n */\n LAST_MESSAGE_RECEIVED: 'lastMessageReceived',\n\n /**\n * This event will be emitted when the chat delete request is in progress. The payload will contain the chat ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_CHAT: 'deletingChat',\n\n /**\n * This event will be emitted when the delete chat process is triggered but before the chat delete request is sent.\n */\n DELETE_CHAT: 'deleteChat',\n\n /**\n * This event will be emitted when the chat was successfully deleted.\n */\n DELETE_CHAT_SUCCESSFUL: 'chatDeleted',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n\n /**\n * This event is emitted when the deletion of a chat fails.\n */\n DELETE_CHAT_FAILURE: 'chatDeletedFailure',\n\n CHAT_EXPORT: 'chatExport',\n CHAT_EXPORT_SUCCESSFUL: 'chatExportSuccess',\n CHAT_EXPORT_FAILURE: 'chatExportFailure',\n CHAT_LIST_UPDATED: 'chatListUpdated',\n\n /**\n * Emitting the \"askQuestion\" event triggers a request to the backend to retrieve an answer to a question.\n */\n ASK_QUESTION: 'askQuestion',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n ASK_QUESTION_FAILURE: 'askQuestionFailure',\n\n /**\n * Emitting the \"continueChatRun\" event triggers a request to the backend to retrieve more remaining answers from the same chat run.\n */\n CONTINUE_CHAT_RUN: 'continueChatRun',\n\n /**\n * Emitting the \"cancelPendingQuestion\" event triggers the cancellation of a pending question in a chat.\n */\n CANCEL_PENDING_QUESTION: \"cancelPendingQuestion\",\n\n /**\n * This event is emitted when the cancellation of the pending question succeeds.\n */\n PENDING_QUESTION_CANCELED_SUCCESSFUL: \"pendingQuestionCanceledSuccessful\",\n\n /**\n * This event is emitted when the cancellation of the pending question fails.\n */\n CANCEL_PENDING_QUESTION_FAILURE: \"cancelPendingQuestionFailed\",\n\n /**\n * This event will be fired before a question is sent to BE for processing.\n */\n ASK_QUESTION_STARTING: \"askQuestionStarting\",\n\n /**\n * Emitting the \"loadChats\" event will trigger an action to loads all chats from backend server.\n */\n LOAD_CHATS: 'loadChats',\n LOAD_CHAT_SUCCESSFUL: 'loadChatSuccess',\n LOAD_CHAT_FAILURE: 'loadChatFailure',\n\n AGENT_LIST_UPDATED: 'agentListUpdated',\n\n /**\n * This event will be emitted when the create agent process is triggered through the UI but before the agent create\n * request is sent. This is used to open the agent settings dialog.\n */\n OPEN_AGENT_SETTINGS: 'openAgentSettings',\n\n /**\n * This event will be emitted when an agent needs to be edited.\n */\n EDIT_AGENT: 'editAgent',\n\n /**\n * This event will be emitted when an agent needs to be cloned.\n */\n CLONE_AGENT: 'cloneAgent',\n\n /**\n * This event will be emitted when the delete agent process is triggered but before the agent delete request is sent.\n */\n DELETE_AGENT: 'deleteAgent',\n\n /**\n * This event will be emitted when the agent was successfully deleted.\n */\n AGENT_DELETED: 'agentDeleted',\n\n /**\n * This event will be emitted when the agent delete request is in progress. The payload will contain the agent ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_AGENT: 'deletingAgent',\n\n /**\n * This event will be emitted when an agent is selected by the user through the UI.\n */\n AGENT_SELECTED: 'agentSelected',\n\n /**\n * This event will trigger the opening of the similarity view.\n */\n GO_TO_CREATE_SIMILARITY_VIEW: \"goToCreateSimilarityView\",\n\n /**\n * This event will trigger the opening of the connectors view.\n */\n GO_TO_CONNECTORS_VIEW: \"goToConnectorsView\",\n\n /**\n * This event will trigger the opening of the \"Autocomplete index\" view.\n */\n GO_TO_AUTOCOMPLETE_INDEX_VIEW: \"goToAutocompleteIndexView\",\n\n /**\n * This event will trigger fetching a new explanation of how the answer was generated.\n */\n EXPLAIN_RESPONSE: \"explainResponse\",\n\n /**\n * This event will be emitted when the cache with explain responses changed.\n */\n EXPLAIN_RESPONSE_CACHE_UPDATED: \"explainResponseCacheUpdated\",\n\n /**\n * This event will trigger the opening of the sparql view.\n */\n GO_TO_SPARQL_EDITOR: \"openQueryInSparqlEditor\",\n\n CAN_MODIFY_AGENT_UPDATED: \"canModifyAgentUpdated\",\n};\n"],"names":["TTYGContextService","EventEmitterService","_agents","_chats","_selectedChat","_selectedAgent","_defaultAgent","_explainCache","_canModifyAgent","getAgents","cloneDeep","getChats","updateChats","chats","emit","TTYGEventName","CHAT_LIST_UPDATED","addChat","newChat","appendChat","getSelectedChat","selectChat","selectedChat","id","SELECT_CHAT","getSelectedAgent","_getExplainResponseCache","hasExplainResponse","answerId","getCanModifyAgent","tTYGEventName","payload","emitSync","subscribe","callback","subscribeSync","resetContext","undefined","replaceChat","oldChat","createChat","CREATE_CHAT_SUCCESSFUL","onChatsListChanged","angular","isFunction","deselectChat","deleteChat","chat","onSelectedChatChanged","updateSelectedChat","SELECTED_CHAT_UPDATED","onSelectedChatUpdated","onLastMessageReceived","LAST_MESSAGE_RECEIVED","updateAgents","agents","AGENT_LIST_UPDATED","onAgentsListChanged","getAgent","agentId","selectAgent","selectedAgent","AGENT_SELECTED","onSelectedAgentChanged","getDefaultAgent","setDefaultAgent","agent","setCanModifyAgent","canModifyAgent","CAN_MODIFY_AGENT_UPDATED","onCanUpdateAgentUpdated","toggleExplainResponse","expanded","EXPLAIN_RESPONSE_CACHE_UPDATED","getExplainResponse","addExplainResponseCache","explainResponse","onExplainResponseCacheUpdated","explainResponses","module","factory","$inject","CREATE_CHAT","CREATE_CHAT_FAILURE","RENAME_CHAT","RENAME_CHAT_SUCCESSFUL","RENAME_CHAT_FAILURE","DELETING_CHAT","DELETE_CHAT","DELETE_CHAT_SUCCESSFUL","DELETE_CHAT_FAILURE","CHAT_EXPORT","CHAT_EXPORT_SUCCESSFUL","CHAT_EXPORT_FAILURE","ASK_QUESTION","ASK_QUESTION_FAILURE","CONTINUE_CHAT_RUN","CANCEL_PENDING_QUESTION","PENDING_QUESTION_CANCELED_SUCCESSFUL","CANCEL_PENDING_QUESTION_FAILURE","ASK_QUESTION_STARTING","LOAD_CHATS","LOAD_CHAT_SUCCESSFUL","LOAD_CHAT_FAILURE","OPEN_AGENT_SETTINGS","EDIT_AGENT","CLONE_AGENT","DELETE_AGENT","AGENT_DELETED","DELETING_AGENT","GO_TO_CREATE_SIMILARITY_VIEW","GO_TO_CONNECTORS_VIEW","GO_TO_AUTOCOMPLETE_INDEX_VIEW","EXPLAIN_RESPONSE","GO_TO_SPARQL_EDITOR"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_id__=51087;export const __webpack_ids__=[51087];export const __webpack_modules__={51087:()=>{const e="guide.step-action.ask-ttyg-agent",t="chat-details";PluginRegistry.add("guide.step",[{guideBlockName:"ttyg-ask-question",getSteps:(o,i)=>{const l=i.GuideUtils;return[{guideBlockName:"input-element",options:{content:"guide.step_plugin.ask-ttyg-agent.input-question",...o.mainAction?{}:{title:e},class:"input-question",disableNextFlow:!0,...o,url:"ttyg",elementSelector:l.getGuideElementSelector("question-input"),show:e=>()=>{const n=l.getGuideElementSelector("contenteditable");$(n).on("keydown",o=>{!$(n).text()||"Enter"!==o.key||o.shiftKey||o.ctrlKey||l.waitFor(l.getGuideElementSelector(t)).then(()=>e.next())})},hide:()=>()=>{const e=l.getGuideElementSelector("contenteditable");$(e).off("keydown")}}},n(l,o)]}},{guideBlockName:"ttyg-explain-response",getSteps:(t,o)=>{const i=o.GuideUtils,l=i.getLastGuideElementSelector("explain-response-btn"),s=i.getLastGuideElementSelector("chat-item",l);return[{guideBlockName:"info-message",options:angular.extend({},{url:"ttyg",beforeShowPromise:(e,t)=>i.waitFor(s,1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const n=t.id;setTimeout(()=>e.show(n+3))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.ask-ttyg-agent.explain-answer",...t.mainAction?{}:{title:e},class:"explain-answer",disableNextFlow:!0,...t,url:"ttyg",elementSelector:s}},n(i,t)]}},{guideBlockName:"ttyg-ask-agent-explore-sparql",getSteps:(t,n)=>{const o=n.GuideUtils,i=o.getLastGuideElementSelector("open-in-sparql-editor-btn"),l=o.getLastGuideElementSelector("chat-item",i);return[{guideBlockName:"info-message",options:angular.extend({},{url:"ttyg",beforeShowPromise:(e,t)=>o.waitFor(l,1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const n=t.id;setTimeout(()=>e.show(n+2))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.ask-ttyg-agent.explore-sparql",class:"explore-sparql",...t.mainAction?{}:{title:e},disableNextFlow:!0,...t,url:"ttyg",elementSelector:l}}]}},{guideBlockName:"ttyg-ask-explain-answer-more",getSteps:(t,o)=>{const i=o.GuideUtils,l=i.getLastGuideElementSelector("how-derive-answer-btn"),s=i.getLastGuideElementSelector("chat-item",l);return[{guideBlockName:"info-message",options:angular.extend({},{url:"ttyg",beforeShowPromise:(e,t)=>i.waitFor(s,1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const n=t.id;setTimeout(()=>e.show(n+3))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.ask-ttyg-agent.explain-answer-more",class:"input-agent-name",...t.mainAction?{}:{title:e},disableNextFlow:!0,...t,url:"ttyg",elementSelector:s,show:e=>()=>{$(s).on("click",()=>{e.next()})},hide:()=>()=>{$(s).off("click")}}},n(i,t)]}},{guideBlockName:"ask-ttyg-agent",getSteps:e=>{e.mainAction="ask-ttyg-agent",e.maxWaitTime=10,e.forceReload=!1;const t=e.explain,n=e.explainMore,o=e.exploreSparql,i=[{guideBlockName:"ttyg-ask-question",options:{...e,skipPoint:!0}}];return t&&i.push({guideBlockName:"ttyg-explain-response",options:{...e}}),t&&o&&i.push({guideBlockName:"ttyg-ask-agent-explore-sparql",options:{...e}}),t&&n&&i.push({guideBlockName:"ttyg-ask-explain-answer-more",options:{...e}}),i}}]);const n=(e,n)=>({guideBlockName:"hold-and-wait-until-hidden",options:angular.extend({},{content:"guide.step_plugin.ask-ttyg-agent.wait-for-answer",class:"wait-for-answer",url:"ttyg",placement:"left",elementSelector:e.getGuideElementSelector(t),elementSelectorToWait:e.getGuideElementSelector("question-loader")},n)})}};
2
- //# sourceMappingURL=51087.b072d1c0e53403535283.bundle.js.map
1
+ export const __webpack_id__=51087;export const __webpack_ids__=[51087];export const __webpack_modules__={51087:()=>{const e="guide.step-action.ask-ttyg-agent",t="chat-details";PluginRegistry.add("guide.step",[{guideBlockName:"ttyg-ask-question",getSteps:(o,i)=>{const l=i.GuideUtils;return[{guideBlockName:"input-element",options:{content:"guide.step_plugin.ask-ttyg-agent.input-question",...o.mainAction?{}:{title:e},class:"input-question",disableNextFlow:!0,...o,url:"ttyg",elementSelector:l.getGuideElementSelector("question-input"),show:e=>()=>{const n=l.getGuideElementSelector("contenteditable");$(n).on("keydown",o=>{!$(n).text()||"Enter"!==o.key||o.shiftKey||o.ctrlKey||l.waitFor(l.getGuideElementSelector(t)).then(()=>e.next())})},hide:()=>()=>{const e=l.getGuideElementSelector("contenteditable");$(e).off("keydown")}}},n(l,o)]}},{guideBlockName:"ttyg-explain-response",getSteps:(t,o)=>{const i=o.GuideUtils,l=i.getLastGuideElementSelector("explain-response-btn"),s=i.getLastGuideElementSelector("chat-item",l);return[{guideBlockName:"info-message",options:angular.extend({},{url:"ttyg",beforeShowPromise:(e,t)=>i.waitFor(s,1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const n=t.id;setTimeout(()=>e.show(n+3))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.ask-ttyg-agent.explain-answer",...t.mainAction?{}:{title:e},class:"explain-answer",disableNextFlow:!0,...t,url:"ttyg",elementSelector:s}},n(i,t)]}},{guideBlockName:"ttyg-ask-agent-explore-sparql",getSteps:(t,n)=>{const o=n.GuideUtils,i=o.getLastGuideElementSelector("open-in-sparql-editor-btn"),l=o.getLastGuideElementSelector("chat-item",i);return[{guideBlockName:"info-message",options:angular.extend({},{url:"ttyg",beforeShowPromise:(e,t)=>o.waitFor(l,1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const n=t.id;setTimeout(()=>e.show(n+2))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.ask-ttyg-agent.explore-sparql",class:"explore-sparql",...t.mainAction?{}:{title:e},disableNextFlow:!0,...t,url:"ttyg",elementSelector:l}}]}},{guideBlockName:"ttyg-ask-explain-answer-more",getSteps:(t,o)=>{const i=o.GuideUtils,l=i.getLastGuideElementSelector("how-derive-answer-btn"),s=i.getLastGuideElementSelector("chat-item",l);return[{guideBlockName:"info-message",options:angular.extend({},{url:"ttyg",beforeShowPromise:(e,t)=>i.waitFor(s,1).then(()=>{setTimeout(()=>e.next())}).catch(()=>{const n=t.id;setTimeout(()=>e.show(n+3))})},t)},{guideBlockName:"clickable-element",options:{content:"guide.step_plugin.ask-ttyg-agent.explain-answer-more",class:"input-agent-name",...t.mainAction?{}:{title:e},disableNextFlow:!0,...t,url:"ttyg",elementSelector:s,show:e=>()=>{$(s).on("click",()=>{e.next()})},hide:()=>()=>{$(s).off("click")}}},n(i,t)]}},{guideBlockName:"ask-ttyg-agent",getSteps:e=>{e.mainAction="ask-ttyg-agent",e.maxWaitTime=10,e.forceReload=!1;const t=e.explain,n=e.explainMore,o=e.exploreSparql,i=[{guideBlockName:"ttyg-ask-question",options:{...e,skipPoint:!0}}];return t&&i.push({guideBlockName:"ttyg-explain-response",options:{...e}}),t&&o&&i.push({guideBlockName:"ttyg-ask-agent-explore-sparql",options:{...e}}),t&&n&&i.push({guideBlockName:"ttyg-ask-explain-answer-more",options:{...e}}),i}}]);const n=(e,n)=>({guideBlockName:"hold-and-wait-until-hidden",options:angular.extend({},{content:"guide.step_plugin.ask-ttyg-agent.wait-for-answer",class:"wait-for-answer",url:"ttyg",elementSelector:e.getGuideElementSelector(t),elementSelectorToWait:e.getGuideElementSelector("question-loader")},n)})}};
2
+ //# sourceMappingURL=51087.1e118e7fe32a8c09d6cb.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"51087.1e118e7fe32a8c09d6cb.bundle.js","mappings":"oHAAA,MAAMA,EAAyB,mCACzBC,EAAwB,eAE9BC,eAAeC,IAAI,aAAc,CAC7B,CACIC,eAAgB,oBAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMC,EAAaD,EAASC,WAC5B,MAAO,CACH,CACIJ,eAAgB,gBAChBE,QAAS,CACLG,QAAS,qDAELH,EAAQI,WAAa,CAAC,EAAI,CAACC,MAAOX,GACtCY,MAAO,iBACPC,iBAAiB,KACdP,EACHQ,IAAK,OACLC,gBAAiBP,EAAWQ,wBAAwB,kBACpDC,KAAOC,GAAU,KACb,MAAMH,EAAkBP,EAAWQ,wBAAwB,mBAM3DG,EAAEJ,GAAiBK,GAAG,UAAYC,KAChBF,EAAEJ,GAAiBO,QAEN,UAAdD,EAAME,KAAoBF,EAAMG,UAAaH,EAAMI,SAC5DjB,EAAWkB,QAAQlB,EAAWQ,wBAAwBf,IACjD0B,KAAK,IAAMT,EAAMU,WAIlCC,KAAMA,IAAM,KACR,MAAMd,EAAkBP,EAAWQ,wBAAwB,mBAE3DG,EAAEJ,GAAiBe,IAAI,cAInCC,EAAqBvB,EAAYF,MAI7C,CACIF,eAAgB,wBAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMC,EAAaD,EAASC,WACtBwB,EAAqBxB,EAAWyB,4BAA4B,wBAC5DlB,EAAkBP,EAA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,sBAAuB5C,EAAWQ,wBAAwB,oBAC3DV,I","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/guides/steps/complex/ttyg/ask-ttyg-agent/plugin.js"],"sourcesContent":["const TTYG_ASK_DEFAULT_TITLE = 'guide.step-action.ask-ttyg-agent';\nconst CHAT_DETAILS_SELECTOR = 'chat-details';\n\nPluginRegistry.add('guide.step', [\n {\n guideBlockName: 'ttyg-ask-question',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n return [\n {\n guideBlockName: 'input-element',\n options: {\n content: `guide.step_plugin.ask-ttyg-agent.input-question`,\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_ASK_DEFAULT_TITLE}),\n class: 'input-question',\n disableNextFlow: true,\n ...options,\n url: 'ttyg',\n elementSelector: GuideUtils.getGuideElementSelector('question-input'),\n show: (guide) => () => {\n const elementSelector = GuideUtils.getGuideElementSelector('contenteditable');\n\n // Add \"keydown\" listener to the element.\n // The question-input directive listens for \"Enter\" keypress to trigger question asking.\n // When enter is pressed, proceed with next step.\n // Using 'keydown' to trigger before the directive 'keypress', which clears the value.\n $(elementSelector).on('keydown', (event) => {\n const value = $(elementSelector).text();\n\n if (value && event.key === 'Enter' && !event.shiftKey && !event.ctrlKey) {\n GuideUtils.waitFor(GuideUtils.getGuideElementSelector(CHAT_DETAILS_SELECTOR))\n .then(() => guide.next());\n }\n });\n },\n hide: () => () => {\n const elementSelector = GuideUtils.getGuideElementSelector('contenteditable');\n // Remove the \"keydown\" listener of the element. It is important when the step is hidden.\n $(elementSelector).off('keydown');\n },\n },\n },\n getWaitForAnswerStep(GuideUtils, options),\n ];\n },\n },\n {\n guideBlockName: 'ttyg-explain-response',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const explainBtnSelector = GuideUtils.getLastGuideElementSelector('explain-response-btn');\n const elementSelector = GuideUtils.getLastGuideElementSelector('chat-item', explainBtnSelector);\n return [\n {\n // If button is not visible for some reason, skip the whole step\n guideBlockName: 'info-message',\n options: angular.extend({}, {\n url: 'ttyg',\n beforeShowPromise: (guide, currentStep) => GuideUtils.waitFor(elementSelector, 1)\n .then(() => {\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.next());\n })\n .catch(() => {\n const stepId = currentStep.id;\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.show(stepId + 3));\n }),\n }, options),\n },\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.ask-ttyg-agent.explain-answer',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_ASK_DEFAULT_TITLE}),\n class: 'explain-answer',\n disableNextFlow: true,\n ...options,\n url: 'ttyg',\n elementSelector,\n },\n },\n getWaitForAnswerStep(GuideUtils, options),\n ];\n },\n },\n {\n guideBlockName: 'ttyg-ask-agent-explore-sparql',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const exploreSparqlBtnSelector = GuideUtils.getLastGuideElementSelector('open-in-sparql-editor-btn');\n const elementSelector = GuideUtils.getLastGuideElementSelector('chat-item', exploreSparqlBtnSelector);\n\n return [\n {\n // If button is not visible for some reason, skip the whole step\n guideBlockName: 'info-message',\n options: angular.extend({}, {\n url: 'ttyg',\n beforeShowPromise: (guide, currentStep) => GuideUtils.waitFor(elementSelector, 1)\n .then(() => {\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.next());\n })\n .catch(() => {\n const stepId = currentStep.id;\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.show(stepId + 2));\n }),\n }, options),\n },\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.ask-ttyg-agent.explore-sparql',\n class: 'explore-sparql',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_ASK_DEFAULT_TITLE}),\n disableNextFlow: true,\n ...options,\n url: 'ttyg',\n elementSelector,\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'ttyg-ask-explain-answer-more',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const explainMoreBtnSelector = GuideUtils.getLastGuideElementSelector('how-derive-answer-btn');\n const elementSelector = GuideUtils.getLastGuideElementSelector('chat-item', explainMoreBtnSelector);\n return [\n {\n // If button is not visible for some reason, skip the whole step\n guideBlockName: 'info-message',\n options: angular.extend({}, {\n url: 'ttyg',\n beforeShowPromise: (guide, currentStep) => {\n return GuideUtils.waitFor(elementSelector, 1)\n .then(() => {\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.next());\n })\n .catch(() => {\n const stepId = currentStep.id;\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.show(stepId + 3));\n });\n },\n }, options),\n },\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.ask-ttyg-agent.explain-answer-more',\n class: 'input-agent-name',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_ASK_DEFAULT_TITLE}),\n disableNextFlow: true,\n ...options,\n url: 'ttyg',\n elementSelector,\n show: (guide) => () => {\n // Add \"click\" listener to the element. Upon clicking the element is hidden and this breaks the default flow of the guide.\n // Adding a handler to proceed to next step\n $(elementSelector).on('click', () => {\n guide.next();\n });\n },\n hide: () => () => {\n // Remove the \"click\" listener of element. It is important when step is hidden.\n $(elementSelector).off('click');\n },\n },\n },\n getWaitForAnswerStep(GuideUtils, options),\n ];\n },\n },\n {\n guideBlockName: 'ask-ttyg-agent',\n getSteps: (options) => {\n options.mainAction = 'ask-ttyg-agent';\n options.maxWaitTime = 10;\n options.forceReload = false;\n\n const explain = options.explain;\n const explainMore = options.explainMore;\n const exploreSparql = options.exploreSparql;\n\n const steps = [\n {\n guideBlockName: 'ttyg-ask-question', options: {...options, skipPoint: true},\n },\n ];\n\n if (explain) {\n steps.push(\n {\n guideBlockName: 'ttyg-explain-response', options: {...options},\n },\n );\n }\n\n if (explain && exploreSparql) {\n steps.push(\n {\n guideBlockName: 'ttyg-ask-agent-explore-sparql', options: {...options},\n },\n );\n }\n\n if (explain && explainMore) {\n steps.push(\n {\n guideBlockName: 'ttyg-ask-explain-answer-more', options: {...options},\n },\n );\n }\n\n return steps;\n },\n },\n]);\n\nconst getWaitForAnswerStep = (GuideUtils, options) => {\n return {\n guideBlockName: 'hold-and-wait-until-hidden',\n options: angular.extend({}, {\n content: 'guide.step_plugin.ask-ttyg-agent.wait-for-answer',\n class: 'wait-for-answer',\n url: 'ttyg',\n elementSelector: GuideUtils.getGuideElementSelector(CHAT_DETAILS_SELECTOR),\n elementSelectorToWait: GuideUtils.getGuideElementSelector('question-loader'),\n }, options),\n };\n};\n"],"names":["TTYG_ASK_DEFAULT_TITLE","CHAT_DETAILS_SELECTOR","PluginRegistry","add","guideBlockName","getSteps","options","services","GuideUtils","content","mainAction","title","class","disableNextFlow","url","elementSelector","getGuideElementSelector","show","guide","$","on","event","text","key","shiftKey","ctrlKey","waitFor","then","next","hide","off","getWaitForAnswerStep","explainBtnSelector","getLastGuideElementSelector","angular","extend","beforeShowPromise","currentStep","setTimeout","catch","stepId","id","exploreSparqlBtnSelector","explainMoreBtnSelector","maxWaitTime","forceReload","explain","explainMore","exploreSparql","steps","skipPoint","push","elementSelectorToWait"],"sourceRoot":""}