graphdb-workbench 3.3.2 → 3.3.3-RC2

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 (220) hide show
  1. package/dist/{10759.b2e1d643d681ebd9c124.bundle.js → 10759.57059f90014058a86952.bundle.js} +2 -2
  2. package/dist/10759.57059f90014058a86952.bundle.js.map +1 -0
  3. package/dist/{13231.d7107e7549453805e13a.bundle.js → 13231.8bbbe30c10e6c0dfdba3.bundle.js} +2 -2
  4. package/dist/13231.8bbbe30c10e6c0dfdba3.bundle.js.map +1 -0
  5. package/dist/{18961.01ff5fcc0f4b9f99236e.bundle.js → 18961.732c0c355509452ac6da.bundle.js} +2 -2
  6. package/dist/18961.732c0c355509452ac6da.bundle.js.map +1 -0
  7. package/dist/{20694.4becb7771236462dcc5a.bundle.js → 20694.03b5abf23347ae0bad65.bundle.js} +2 -2
  8. package/dist/{20694.4becb7771236462dcc5a.bundle.js.map → 20694.03b5abf23347ae0bad65.bundle.js.map} +1 -1
  9. package/dist/21015.6db2b66597f78d4b83cc.bundle.js +2 -0
  10. package/dist/21015.6db2b66597f78d4b83cc.bundle.js.map +1 -0
  11. package/dist/2975.c5ebc3e3ad52df3ab907.bundle.js +2 -0
  12. package/dist/2975.c5ebc3e3ad52df3ab907.bundle.js.map +1 -0
  13. package/dist/38644.95e9083c584fed8acdc1.bundle.js +2 -0
  14. package/dist/38644.95e9083c584fed8acdc1.bundle.js.map +1 -0
  15. package/dist/39518.952b269313461489181c.bundle.js +2 -0
  16. package/dist/{39518.4d72b74fffba395c6b2a.bundle.js.map → 39518.952b269313461489181c.bundle.js.map} +1 -1
  17. package/dist/{39874.710e94f211579215f997.bundle.js → 39874.17dde6245fc4cc91bb58.bundle.js} +2 -2
  18. package/dist/39874.17dde6245fc4cc91bb58.bundle.js.map +1 -0
  19. package/dist/{45758.1212136a37dd4f7528f8.bundle.js → 45758.b9ce5fe0ed6c8c4fc141.bundle.js} +2 -2
  20. package/dist/45758.b9ce5fe0ed6c8c4fc141.bundle.js.map +1 -0
  21. package/dist/{60560.6ba1b091a34af6c00770.bundle.js → 60560.62ed0cb0b3d07fecbf28.bundle.js} +2 -2
  22. package/dist/60560.62ed0cb0b3d07fecbf28.bundle.js.map +1 -0
  23. package/dist/{60730.35493812d428872eddb6.bundle.js → 60730.a9fc5342637039776562.bundle.js} +2 -2
  24. package/dist/60730.a9fc5342637039776562.bundle.js.map +1 -0
  25. package/dist/{64118.b06aebc9f8d7e822244f.bundle.js → 64118.177457589341de779668.bundle.js} +2 -2
  26. package/dist/64118.177457589341de779668.bundle.js.map +1 -0
  27. package/dist/67888.bc281108507cb9ca2ff5.bundle.js +2 -0
  28. package/dist/67888.bc281108507cb9ca2ff5.bundle.js.map +1 -0
  29. package/dist/71099.ba1073458b96d9789756.bundle.js +2 -0
  30. package/dist/71099.ba1073458b96d9789756.bundle.js.map +1 -0
  31. package/dist/75881.148ce498d06784abfd6c.bundle.js +2 -0
  32. package/dist/75881.148ce498d06784abfd6c.bundle.js.map +1 -0
  33. package/dist/78070.d54ede951a08e1c8689d.bundle.js +2 -0
  34. package/dist/78070.d54ede951a08e1c8689d.bundle.js.map +1 -0
  35. package/dist/{7815.2aec5ebbcd434f5582ff.bundle.js → 7815.89cc59b6625e84913351.bundle.js} +2 -2
  36. package/dist/7815.89cc59b6625e84913351.bundle.js.map +1 -0
  37. package/dist/{78681.9e1d4e064e9e1fb5fb21.bundle.js → 78681.6c8614aad7e5465be505.bundle.js} +2 -2
  38. package/dist/78681.6c8614aad7e5465be505.bundle.js.map +1 -0
  39. package/dist/{82206.229877d7931849236456.bundle.js → 82206.473f6d4f79e12f6a9da6.bundle.js} +2 -2
  40. package/dist/82206.473f6d4f79e12f6a9da6.bundle.js.map +1 -0
  41. package/dist/{82926.ce1d6bf65b09288a2b10.bundle.js → 82926.0bc447d56f8bcff3aa6c.bundle.js} +2 -2
  42. package/dist/{82926.ce1d6bf65b09288a2b10.bundle.js.map → 82926.0bc447d56f8bcff3aa6c.bundle.js.map} +1 -1
  43. package/dist/{94229.47dbdba202106c61dff1.bundle.js → 94229.5a853fae006f6ef633af.bundle.js} +2 -2
  44. package/dist/94229.5a853fae006f6ef633af.bundle.js.map +1 -0
  45. package/dist/95953.1350a9dc14b22372b4e2.bundle.js +2 -0
  46. package/dist/95953.1350a9dc14b22372b4e2.bundle.js.map +1 -0
  47. package/dist/98268.a1bd17e40ede031a0a00.bundle.js +2 -0
  48. package/dist/98268.a1bd17e40ede031a0a00.bundle.js.map +1 -0
  49. package/dist/99448.313d3ccb611777cf8125.bundle.js +2 -0
  50. package/dist/99448.313d3ccb611777cf8125.bundle.js.map +1 -0
  51. package/dist/index.html +9 -9
  52. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  53. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  54. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  55. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  56. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  57. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  58. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +2 -2
  59. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  60. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  61. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  62. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  63. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  64. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  65. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  66. package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
  67. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  68. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  69. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  70. package/dist/js/angular/security/templates/user.html +2 -2
  71. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  72. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  73. package/dist/js/angular/ttyg/templates/chat-item-detail.html +3 -2
  74. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  75. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  76. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  77. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
  78. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  79. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  80. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  81. package/dist/legacyWorkbench.e97c21d179749854900d.js +3 -0
  82. package/dist/{legacyWorkbench.40eba9e09196e1483221.js.map → legacyWorkbench.e97c21d179749854900d.js.map} +1 -1
  83. package/dist/main.a67c284710a8b9a98ca2.js +3 -0
  84. package/dist/main.a67c284710a8b9a98ca2.js.map +1 -0
  85. package/dist/pages/aclmanagement.html +1 -1
  86. package/dist/pages/autocomplete.html +1 -1
  87. package/dist/pages/choose-repository-type.html +1 -1
  88. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  89. package/dist/pages/create-index.html +1 -1
  90. package/dist/pages/dependencies.html +1 -1
  91. package/dist/pages/domainRangeInfo.html +2 -2
  92. package/dist/pages/edit.html +1 -1
  93. package/dist/pages/explore.html +1 -1
  94. package/dist/pages/export.html +1 -1
  95. package/dist/pages/find.html +1 -1
  96. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  97. package/dist/pages/graphs-visualizations.html +7 -7
  98. package/dist/pages/guides.html +1 -1
  99. package/dist/pages/home.html +1 -1
  100. package/dist/pages/import.html +2 -2
  101. package/dist/pages/jdbc-create.html +1 -1
  102. package/dist/pages/jdbc.html +1 -1
  103. package/dist/pages/monitor/backup-and-restore.html +1 -1
  104. package/dist/pages/monitor/queries.html +1 -1
  105. package/dist/pages/monitor/resources.html +1 -1
  106. package/dist/pages/namespaces.html +2 -2
  107. package/dist/pages/plugins.html +1 -1
  108. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  109. package/dist/pages/rdfrank.html +2 -2
  110. package/dist/pages/repositories.html +1 -1
  111. package/dist/pages/repository.html +1 -1
  112. package/dist/pages/similarity-indexes.html +1 -1
  113. package/dist/pages/sparql-editor.html +1 -1
  114. package/dist/pages/sparql-template-create.html +1 -1
  115. package/dist/pages/sparql-templates.html +1 -1
  116. package/dist/pages/ux-test1.html +2 -2
  117. package/dist/pages/webapi.html +4 -3
  118. package/dist/res/swagger5/index.html +11 -11
  119. package/dist/res/swagger5/swagger-initializer.js +1 -1
  120. package/dist/shared-components/cjs/index-CTK5NoJt.js +2 -0
  121. package/dist/shared-components/cjs/loader.cjs.js +1 -1
  122. package/dist/shared-components/cjs/onto-cookie-consent_2.cjs.entry.js +1 -1
  123. package/dist/shared-components/cjs/onto-dialog_2.cjs.entry.js +1 -1
  124. package/dist/shared-components/cjs/onto-dropdown.cjs.entry.js +1 -1
  125. package/dist/shared-components/cjs/onto-footer_5.cjs.entry.js +1 -1
  126. package/dist/shared-components/cjs/onto-language-selector_9.cjs.entry.js +1 -1
  127. package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
  128. package/dist/shared-components/cjs/onto-permission-banner.cjs.entry.js +1 -1
  129. package/dist/shared-components/cjs/onto-test-context.cjs.entry.js +1 -1
  130. package/dist/shared-components/cjs/onto-toastr.cjs.entry.js +1 -1
  131. package/dist/shared-components/cjs/shared-components.cjs.js +1 -1
  132. package/dist/shared-components/cjs/translate-label.cjs.entry.js +1 -1
  133. package/dist/shared-components/collection/collection-manifest.json +2 -2
  134. package/dist/shared-components/collection/components/dialogs/onto-dialog.js +1 -1
  135. package/dist/shared-components/collection/components/onto-dropdown/onto-dropdown.js +1 -1
  136. package/dist/shared-components/collection/components/onto-language-selector/onto-language-selector.js +1 -1
  137. package/dist/shared-components/collection/components/onto-license-alert/onto-license-alert.js +1 -1
  138. package/dist/shared-components/collection/components/onto-loader/onto-loader.js +1 -1
  139. package/dist/shared-components/collection/components/onto-navbar/onto-navbar.js +1 -1
  140. package/dist/shared-components/collection/components/onto-operations-notification/onto-operations-notification.js +1 -1
  141. package/dist/shared-components/collection/components/onto-repository-selector/onto-repository-selector.js +1 -1
  142. package/dist/shared-components/collection/components/onto-search-resource-input/onto-search-resource-input.js +1 -1
  143. package/dist/shared-components/collection/components/onto-test-context/onto-test-context.js +1 -1
  144. package/dist/shared-components/collection/components/onto-toggle-switch/onto-toggle-switch.js +1 -1
  145. package/dist/shared-components/collection/components/onto-user-menu/onto-user-menu.js +1 -1
  146. package/dist/shared-components/collection/components/translate-label/translate-label.js +1 -1
  147. package/dist/shared-components/esm/index-EiAqSNMq.js +2 -0
  148. package/dist/shared-components/esm/loader.js +1 -1
  149. package/dist/shared-components/esm/onto-cookie-consent_2.entry.js +1 -1
  150. package/dist/shared-components/esm/onto-dialog_2.entry.js +1 -1
  151. package/dist/shared-components/esm/onto-dropdown.entry.js +1 -1
  152. package/dist/shared-components/esm/onto-footer_5.entry.js +1 -1
  153. package/dist/shared-components/esm/onto-language-selector_9.entry.js +1 -1
  154. package/dist/shared-components/esm/onto-layout.entry.js +1 -1
  155. package/dist/shared-components/esm/onto-permission-banner.entry.js +1 -1
  156. package/dist/shared-components/esm/onto-test-context.entry.js +1 -1
  157. package/dist/shared-components/esm/onto-toastr.entry.js +1 -1
  158. package/dist/shared-components/esm/shared-components.js +1 -1
  159. package/dist/shared-components/esm/translate-label.entry.js +1 -1
  160. package/dist/shared-components/shared-components/{p-6d34b2cb.entry.js → p-1103d100.entry.js} +1 -1
  161. package/dist/shared-components/shared-components/{p-9b2c6e80.entry.js → p-2e2bb175.entry.js} +1 -1
  162. package/dist/shared-components/shared-components/{p-b754971e.entry.js → p-50735428.entry.js} +1 -1
  163. package/dist/shared-components/shared-components/{p-7e47d850.entry.js → p-59707503.entry.js} +1 -1
  164. package/dist/shared-components/shared-components/{p-598d33d7.entry.js → p-6a37f808.entry.js} +1 -1
  165. package/dist/shared-components/shared-components/{p-9214bb16.entry.js → p-6fb5eec5.entry.js} +1 -1
  166. package/dist/shared-components/shared-components/{p-c27fe716.entry.js → p-97930684.entry.js} +1 -1
  167. package/dist/shared-components/shared-components/p-EiAqSNMq.js +2 -0
  168. package/dist/shared-components/shared-components/{p-b5d4081d.entry.js → p-a5a49d87.entry.js} +1 -1
  169. package/dist/shared-components/shared-components/{p-74888633.entry.js → p-d134e207.entry.js} +1 -1
  170. package/dist/shared-components/shared-components/{p-5886e663.entry.js → p-ec2f4ea5.entry.js} +1 -1
  171. package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
  172. package/dist/shared-components/types/stencil-public-runtime.d.ts +10 -147
  173. package/package.json +1 -1
  174. package/dist/10759.b2e1d643d681ebd9c124.bundle.js.map +0 -1
  175. package/dist/13231.d7107e7549453805e13a.bundle.js.map +0 -1
  176. package/dist/18961.01ff5fcc0f4b9f99236e.bundle.js.map +0 -1
  177. package/dist/21015.ea34b563b4149ad0975e.bundle.js +0 -2
  178. package/dist/21015.ea34b563b4149ad0975e.bundle.js.map +0 -1
  179. package/dist/2975.8be1a79816fd811be223.bundle.js +0 -2
  180. package/dist/2975.8be1a79816fd811be223.bundle.js.map +0 -1
  181. package/dist/38644.0e8652c647a0f341abd7.bundle.js +0 -2
  182. package/dist/38644.0e8652c647a0f341abd7.bundle.js.map +0 -1
  183. package/dist/39518.4d72b74fffba395c6b2a.bundle.js +0 -2
  184. package/dist/39874.710e94f211579215f997.bundle.js.map +0 -1
  185. package/dist/45758.1212136a37dd4f7528f8.bundle.js.map +0 -1
  186. package/dist/60560.6ba1b091a34af6c00770.bundle.js.map +0 -1
  187. package/dist/60730.35493812d428872eddb6.bundle.js.map +0 -1
  188. package/dist/64118.b06aebc9f8d7e822244f.bundle.js.map +0 -1
  189. package/dist/67888.41803878170b6c7a5ca5.bundle.js +0 -2
  190. package/dist/67888.41803878170b6c7a5ca5.bundle.js.map +0 -1
  191. package/dist/71099.ca7720893604e9d908d6.bundle.js +0 -2
  192. package/dist/71099.ca7720893604e9d908d6.bundle.js.map +0 -1
  193. package/dist/75881.54dc716f79b6fe29232a.bundle.js +0 -2
  194. package/dist/75881.54dc716f79b6fe29232a.bundle.js.map +0 -1
  195. package/dist/78070.13538271878de6a98862.bundle.js +0 -2
  196. package/dist/78070.13538271878de6a98862.bundle.js.map +0 -1
  197. package/dist/7815.2aec5ebbcd434f5582ff.bundle.js.map +0 -1
  198. package/dist/78681.9e1d4e064e9e1fb5fb21.bundle.js.map +0 -1
  199. package/dist/82206.229877d7931849236456.bundle.js.map +0 -1
  200. package/dist/94229.47dbdba202106c61dff1.bundle.js.map +0 -1
  201. package/dist/95953.ec1b9d5e568d43ec3dcf.bundle.js +0 -2
  202. package/dist/95953.ec1b9d5e568d43ec3dcf.bundle.js.map +0 -1
  203. package/dist/98268.86ff371dde616b4e2a76.bundle.js +0 -2
  204. package/dist/98268.86ff371dde616b4e2a76.bundle.js.map +0 -1
  205. package/dist/99448.2a87f387a8062617d893.bundle.js +0 -2
  206. package/dist/99448.2a87f387a8062617d893.bundle.js.map +0 -1
  207. package/dist/legacyWorkbench.40eba9e09196e1483221.js +0 -3
  208. package/dist/main.14f083264cd64618d96a.js +0 -3
  209. package/dist/main.14f083264cd64618d96a.js.map +0 -1
  210. package/dist/shared-components/cjs/app-globals-V2Kpy_OQ.js +0 -1
  211. package/dist/shared-components/cjs/index-L_ZmIeD5.js +0 -2
  212. package/dist/shared-components/esm/app-globals-DQuL1Twl.js +0 -1
  213. package/dist/shared-components/esm/index-CGqARDX4.js +0 -2
  214. package/dist/shared-components/shared-components/p-CGqARDX4.js +0 -2
  215. package/dist/shared-components/shared-components/p-DQuL1Twl.js +0 -1
  216. /package/dist/{legacyWorkbench.40eba9e09196e1483221.js.LICENSE.txt → legacyWorkbench.e97c21d179749854900d.js.LICENSE.txt} +0 -0
  217. /package/dist/{main.14f083264cd64618d96a.js.LICENSE.txt → main.a67c284710a8b9a98ca2.js.LICENSE.txt} +0 -0
  218. /package/dist/shared-components/cjs/{index-L_ZmIeD5.js.LICENSE.txt → index-CTK5NoJt.js.LICENSE.txt} +0 -0
  219. /package/dist/shared-components/esm/{index-CGqARDX4.js.LICENSE.txt → index-EiAqSNMq.js.LICENSE.txt} +0 -0
  220. /package/dist/shared-components/shared-components/{p-CGqARDX4.js.LICENSE.txt → p-EiAqSNMq.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"95953.ec1b9d5e568d43ec3dcf.bundle.js","mappings":"+IACIA,QAAQC,OAAO,gDAAiD,IAC3DC,UAAU,sBAAuB,WAC9B,MAAO,CACHC,SAAU,IACVC,MAAO,CACHC,MAAO,IACPC,YAAa,KACbC,SAAU,KAYVC,UAAW,MAEfC,YAAa,kFACbC,WAAY,CAAC,SAAU,YAAa,WAAY,UAAW,WAAY,SAASC,EAAQC,EAAWC,EAAUC,EAASC,GAKlHJ,EAAOK,MAAO,EACdL,EAAOM,OAAS,CAACC,MAAO,IACxBP,EAAOQ,aAAe,GAMtB,MAAMC,EAAgB,GAWhBC,EAAaC,GACF,OAANA,EAAa,IAAM,GAAKA,GAAGC,cAMhCC,EAAkBA,KACpB,MAAMC,EAAOC,MAAMC,QAAQhB,EAAON,OAASM,EAAON,MAAQ,GACpDuB,EAAkBP,EAAUV,EAAOM,OAAOC,OAE5CP,EAAOQ,aADPS,EACsBH,EAAKI,OAAQC,GAAMT,EAAUS,EAAEC,OAAOC,SAASJ,IAE/CH,GAcxBQ,EAAcC,IACXvB,EAAOK,OAGPH,EAAS,GAAGsB,SAASD,EAAEE,SAb5BzB,EAAO0B,YAAY,WACf1B,EAAOK,MAAO,CAClB,KA4CJL,EAAO2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IjDD,EAAiDzK,IAC9CA,EAAiBpG,UAElBrC,EAAO2I,kBAAkB4D,aAAa,wBAAwB,GAElEvM,EAAOmJ,8BAA8BV,IAGnCiE,EAAqBA,CAACzB,GAAsB,EAAOmI,GAAmC,KACxFpT,EAAO6L,oBACP7L,EAAOgL,4BAA4BC,GACnCjL,EAAOuL,8BAA8B6H,GACrCpT,EAAOmJ,iCAGLkK,EAAyBA,KACtBC,SAASC,QACV7G,KAIF8G,EAAoBA,CAACC,EAAW5F,KAClC,MAAM6F,EAASJ,SAASK,eAAeF,GACnCC,IACAA,EAAO7F,MAAQA,IAYvByF,SAASM,iBAAiB,mBAAoBP,GAG9CrT,EAAOqD,IAAI,WAPkBwQ,KACzBP,SAASQ,oBAAoB,mBAAoBT,KAelBvG,IACH7C,eACxBjK,EAAOiH,eAAegD,aAAe,MAGzC8J,WAAWlL,EAAmC,GAC9ClF,EAAkBqQ,SAAShP,KAAK,KAC5BwO,EAAkB,oBAAqBxT,EAAOiH,eAAe2G,YAAYC,OACzE2F,EAAkB,aAAcxT,EAAOiH,eAAegN,KAAKpG,QAIvE,CA38BAxO,QACKC,OAAO,0DAA2D,CAC/D,6CACA,6CACA,8CACA,sEACA,2DACA,cACA,kDAEH4U,SAAS,4BAA6B,CACnC,qBAAwB,uBACxB,kCAAqC,sCAExChT,OAAO,MAAO,WACX,OAAO,SAASiT,EAAKlS,GACjB,OAAKlB,MAAMC,QAAQmT,GAGZA,EAAIxF,IAAI,SAASyF,GACpB,OAAOA,EAAEnS,EACb,GAJWkS,CAKf,CACJ,GACCpU,WAAW,+BAAgCmG,GAEhDA,EAA6BzB,QAAU,CACnC,SACA,oBACA,eACA,YACA,oBACA,oBACA,0BACA,OACA,SACA,WACA,aACA,cACA,qBACA,cACA,4BACA,sBACA,0BACA,kCACA,c","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/multiselect-search/multiselect-search.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-instance-type.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/controllers/external-integration-configuration-modal.controller.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/externalIntegrationModal.service.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/controllers/agent-settings-modal.controller.js"],"sourcesContent":["(function() {\n angular.module('graphdb.framework.core.directives.multiselect', [])\n .directive('multiSelectDropdown', function() {\n return {\n restrict: 'E',\n scope: {\n items: '=',\n placeholder: '@?',\n onChange: '&?',\n /**\n * Keys for labels used in the multiselect dropdown.\n * <code>\n * {\n * \"select_all\": \"All\",\n * \"search_placeholder\": \"Select options\",\n * \"selected_count\": \"{{count}} selected\",\n * \"no_matches\": \"No matches\"\n * }\n * </code>\n */\n labelKeys: '=?',\n },\n templateUrl: 'js/angular/core/directives/multiselect-search/templates/multiselect-search.html',\n controller: ['$scope', '$document', '$element', '$filter', '$timeout', function($scope, $document, $element, $filter, $timeout) {\n // =========================\n // Public variables\n // =========================\n\n $scope.open = false;\n $scope.search = {query: ''};\n $scope.visibleItems = [];\n\n // =========================\n // Private variables\n // =========================\n\n const subscriptions = [];\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Normalize string for searching.\n * @param v {string|null}\n * @returns {string|string}\n */\n const normalize = (v) => {\n return v === null ? '' : ('' + v).toLowerCase();\n };\n\n /**\n * Build filtered list when query or items change.\n */\n const rebuildFiltered = () => {\n const list = Array.isArray($scope.items) ? $scope.items : [];\n const normalizedQuery = normalize($scope.search.query);\n if (normalizedQuery) {\n $scope.visibleItems = list.filter((i) => normalize(i.label).includes(normalizedQuery));\n } else {\n $scope.visibleItems = list;\n }\n };\n\n const dropTheOpenFlag = () => {\n $scope.$applyAsync(function() {\n $scope.open = false;\n });\n };\n\n /**\n * Closes the menu when clicking outside.\n * @param e {MouseEvent} The click event.\n */\n const onDocClick = (e) => {\n if (!$scope.open) {\n return;\n }\n if (!$element[0].contains(e.target)) {\n dropTheOpenFlag();\n }\n };\n\n const focusSearchInput = () => {\n // wait for the menu to open before focusing the input\n $timeout(function() {\n const input = $element[0].querySelector('.multiselect-search');\n if (input) {\n input.focus();\n }\n });\n };\n\n const focusMultiselectButton = () => {\n // wait for the menu to be removed before focusing the button\n $timeout(function() {\n const btn = $element[0].querySelector('.multiselect-button');\n if (btn) {\n btn.focus();\n }\n });\n };\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Toggles the menu open/closed.\n * @param e {MouseEvent} The click event.\n */\n $scope.toggleOpen = function(e) {\n e && e.stopPropagation();\n $scope.open = !$scope.open;\n if ($scope.open) {\n focusSearchInput();\n }\n };\n\n /**\n * Handles keydown events in the menu (for Escape key) and closes the menu.\n * @param e {KeyboardEvent} The keydown event.\n */\n $scope.onKeydownMenu = function(e) {\n if (e.key === 'Escape') {\n $scope.open = false;\n e.stopPropagation();\n e.preventDefault();\n focusMultiselectButton();\n }\n };\n\n /**\n * Gets count of selected items.\n * @returns {*|number}\n */\n $scope.selectedCount = function() {\n if (!Array.isArray($scope.items)) {\n return 0;\n }\n return $scope.items.filter((i) => i.selected).length;\n };\n\n /**\n * Checks if all filtered items are selected.\n * @returns {this is T[]|boolean}\n */\n $scope.allFilteredSelected = function() {\n const list = $scope.visibleItems || [];\n if (list.length === 0) {\n return false;\n }\n return list.every((i) => i.selected);\n };\n\n /**\n * Checks if some (but not all) filtered items are selected.\n * @returns {boolean}\n */\n $scope.someFilteredSelected = function() {\n const list = $scope.visibleItems || [];\n const any = list.some((i) => i.selected);\n const all = list.every((i) => i.selected);\n return any && !all;\n };\n\n /**\n * Toggles select all filtered items.\n * @param e {MouseEvent} The click event.\n */\n $scope.toggleSelectAll = function(e) {\n e && e.stopPropagation();\n const list = $scope.visibleItems || [];\n const makeSelected = !$scope.allFilteredSelected();\n for (const item of list) {\n item.selected = makeSelected;\n }\n $scope.emitChange();\n };\n\n /**\n * Emits change event.\n */\n $scope.emitChange = function() {\n if (typeof $scope.onChange === 'function') {\n const selected = ($scope.items || []).filter((i) => i.selected);\n $scope.onChange({selected: selected});\n }\n };\n\n // =========================\n // Watches & Listeners\n // =========================\n\n $document.on('click', onDocClick);\n subscriptions.push(\n $scope.$watch('search.query', rebuildFiltered),\n $scope.$watchCollection('items', rebuildFiltered),\n );\n\n const onDestroyCallback = () => {\n $document.off('click', onDocClick);\n for (const unsubscribe of subscriptions) {\n unsubscribe();\n }\n };\n $scope.$on('$destroy', onDestroyCallback);\n\n rebuildFiltered();\n }],\n };\n });\n})();\n","export const SimilarityInstanceType = {\n 'SIMILARITY': 'similarity',\n 'ELASTICSEARCH': 'elasticsearch',\n 'OPENSEARCH': 'opensearch',\n};\n","angular\n .module('graphdb.framework.ttyg.controllers.external-integration-configuration-modal', [])\n .controller('ExternalIntegrationConfigurationModalController', ExternalIntegrationConfigurationModalController);\n\nExternalIntegrationConfigurationModalController.$inject = [\n '$scope',\n '$uibModalInstance',\n 'ModalService',\n '$translate',\n 'dialogModel'\n];\n\nfunction ExternalIntegrationConfigurationModalController($scope, $uibModalInstance, ModalService, $translate, dialogModel) {\n // =========================\n // Public variables\n // =========================\n\n $scope.externalIntegrationConfiguration = dialogModel.externalIntegrationConfiguration;\n $scope.difyExtension = dialogModel.difyExtensionUrl;\n $scope.queryMethods = dialogModel.queryMethodsUrl;\n $scope.agentId = dialogModel.agentId;\n $scope.agentName = dialogModel.agentName;\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Closes the modal when the user clicks the close button.\n */\n $scope.close = () => {\n $uibModalInstance.dismiss({});\n };\n\n $scope.onCloseExternalIntegrationConfigurationModal = () => {\n $uibModalInstance.dismiss({});\n };\n}\n","import 'angular/ttyg/controllers/external-integration-configuration-modal.controller';\nimport {TTYG_ERROR_MSG_LENGTH} from \"./constants\";\n\nangular\n .module('graphdb.framework.ttyg.services.externalIntegrationModal',\n ['graphdb.framework.ttyg.controllers.external-integration-configuration-modal'])\n .factory('ExternalIntegrationModalService', ExternalIntegrationModalService)\n\nExternalIntegrationModalService.$inject = ['$uibModal', 'LocationsRestService', 'toastr'];\n\nfunction ExternalIntegrationModalService($uibModal, LocationsRestService, toastr) {\n function buildDialogModel(agent, baseUrl) {\n return {\n agentName: agent.name,\n agentId: agent.id,\n queryMethodsUrl: `${baseUrl}/rest/llm/tool/ttyg/${agent.id}`,\n difyExtensionUrl: `${baseUrl}/rest/llm/ttyg/${agent.id}/dify`\n };\n }\n\n function open(agent) {\n return LocationsRestService.getExternalUrl()\n .then((response) => {\n const dialogModel = buildDialogModel(agent, response.data);\n\n return $uibModal.open({\n templateUrl: 'js/angular/ttyg/templates/modal/external-integration-configuration-modal.html',\n controller: 'ExternalIntegrationConfigurationModalController',\n windowClass: 'external-integration-configuration-modal',\n backdrop: 'static',\n resolve: {\n dialogModel: () => dialogModel\n }\n }).result\n .then(() => {\n // Modal was closed with success - do nothing\n })\n .catch(() => {\n // Modal was dismissed — do nothing\n });\n })\n .catch((error) => {\n // Catches API failure\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n });\n }\n\n return {open};\n}\n","import {decodeHTML} from \"../../../../app\";\nimport {AdditionalExtractionMethod, ExtractionMethod} from \"../../models/ttyg/agents\";\nimport 'angular/core/services/similarity.service';\nimport 'angular/core/services/connectors.service';\nimport 'angular/core/services/ttyg.service';\nimport 'angular/core/directives/multiselect-search/multiselect-search.directive';\nimport 'angular/rest/repositories.rest.service';\nimport 'angular/ttyg/controllers/agent-instructions-explain-modal.controller';\nimport 'angular/ttyg/services/externalIntegrationModal.service';\nimport {REPOSITORY_PARAMS} from \"../../models/repository/repository\";\nimport {TTYGEventName} from \"../services/ttyg-context.service\";\nimport {AGENT_OPERATION, TTYG_ERROR_MSG_LENGTH} from \"../services/constants\";\nimport {mapUriAsNtripleAutocompleteResponse} from \"../../rest/mappers/autocomplete-mapper\";\nimport {DocumentationUrlResolver} from \"../../utils/documentation-url-resolver\";\nimport {LoggerProvider} from \"../../core/services/logger-provider\";\nimport {SelectMenuOptionsModel} from \"../../models/form-fields\";\nimport {SimilarityInstanceType} from '../../models/similarity/similarity-instance-type';\n\nconst logger = LoggerProvider.logger;\n/**\n * @typedef {Object} SimilarityIndexOption\n * @property {string} provider\n * @property {string} label\n * @property {string} value\n * @property {string} group\n */\n\n\nangular\n .module('graphdb.framework.ttyg.controllers.agent-settings-modal', [\n 'graphdb.framework.core.services.similarity',\n 'graphdb.framework.core.services.connectors',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.ttyg.controllers.agent-instructions-explain-modal',\n 'graphdb.framework.ttyg.services.externalIntegrationModal',\n 'ngTagsInput',\n 'graphdb.framework.core.directives.multiselect',\n ])\n .constant('ExtractionMethodTemplates', {\n 'iri_discovery_search': 'iri-discovery-search',\n 'autocomplete_iri_discovery_search': 'autocomplete-iri-discovery-search',\n })\n .filter('map', function() {\n return function(arr, key) {\n if (!Array.isArray(arr)) {\n return arr;\n }\n return arr.map(function(o) {\n return o[key];\n });\n };\n })\n .controller('AgentSettingsModalController', AgentSettingsModalController);\n\nAgentSettingsModalController.$inject = [\n '$scope',\n '$uibModalInstance',\n 'ModalService',\n '$uibModal',\n 'SimilarityService',\n 'ConnectorsService',\n 'RepositoriesRestService',\n '$sce',\n 'toastr',\n 'UriUtils',\n '$translate',\n 'dialogModel',\n 'TTYGContextService',\n 'TTYGService',\n 'ExtractionMethodTemplates',\n 'AutocompleteService',\n 'AutocompleteRestService',\n 'ExternalIntegrationModalService',\n 'productInfo'];\n\nfunction AgentSettingsModalController(\n $scope,\n $uibModalInstance,\n ModalService,\n $uibModal,\n SimilarityService,\n ConnectorsService,\n RepositoriesRestService,\n $sce,\n toastr,\n UriUtils,\n $translate,\n dialogModel,\n TTYGContextService,\n TTYGService,\n ExtractionMethodTemplates,\n AutocompleteService,\n AutocompleteRestService,\n ExternalIntegrationModalService,\n productInfo) {\n // =========================\n // Private variables\n // =========================\n\n const CHAT_GPT_RETRIEVAL_CONNECTOR_NAME = 'ChatGPT Retrieval';\n\n // =========================\n // Public variables\n // =========================\n\n $scope.AGENT_OPERATION = AGENT_OPERATION;\n\n /**\n * The operation type for the modal. This can be one of <code>AGENT_OPERATION</code> constants.\n */\n $scope.operation = dialogModel.operation;\n\n /**\n * Flag to control the visibility of the loader when creating an agent.\n * @type {boolean}\n */\n $scope.savingAgent = false;\n\n /**\n * The model used in the form.\n * @type {AgentFormModel|*}\n */\n $scope.agentFormModel = dialogModel.agentFormModel;\n\n /**\n * The active repository info model.\n * @type {RepositoryInfoModel|*}\n */\n $scope.activeRepositoryInfo = dialogModel.activeRepositoryInfo;\n\n /**\n * Flags used to show/hide the loader for the extraction methods when the user opens a panel and some data needs to\n * be loaded.\n * @type {{[string]: boolean}} - the key is the extraction method types in <code>ExtractionMethod</code>\n */\n $scope.extractionMethodLoaderFlags = {\n [ExtractionMethod.SIMILARITY]: false,\n };\n\n /**\n * The repository select menu options model.\n * @type {SelectMenuOptionsModel[]}\n */\n $scope.activeRepositoryList = dialogModel.activeRepositoryList;\n\n /**\n * The extraction method types constants.\n * @type {{SPARQL: string, FTS_SEARCH: string, SIMILARITY: string, RETRIEVAL: string}}\n */\n $scope.extractionMethods = ExtractionMethod;\n\n /**\n * The additional extraction method types constants.\n * @type {{IRI_DISCOVERY_SEARCH: string, AUTOCOMPLETE_IRI_DISCOVERY_SEARCH: string}}\n */\n $scope.additionalExtractionMethods = AdditionalExtractionMethod;\n\n /**\n * The names of the template files, containing the Extraction Method Templates.\n * @type {Object<string, string>}\n */\n $scope.ExtractionMethodTemplates = ExtractionMethodTemplates;\n\n /**\n * Flag used to show/hide the advanced settings in the modal.\n * @type {boolean}\n */\n $scope.showAdvancedSettings = false;\n\n /**\n * Flag used to show/hide the high temperature warning in the modal.\n * @type {boolean}\n */\n $scope.showHighTemperatureWarning = false;\n\n /**\n * Flag used to control the visibility of the system instruction warning.\n * @type {boolean}\n */\n $scope.showSystemInstructionWarning = false;\n\n /**\n * The retrieval connectors to be used for the retrieval extraction method as select menu options.\n * @type {SelectMenuOptionsModel[]}\n */\n $scope.retrievalConnectors = [];\n\n /**\n * Flag used to show/hide the FTS enabled state in the modal.\n * @type {boolean}\n */\n $scope.ftsEnabled = false;\n\n /**\n * The autocomplete suggestions source for the 'Autocomplete IRI discovery' extraction method.\n * @type {*[]}\n */\n $scope.autocompleteSuggestions = [];\n\n /**\n * Flag to determine if the context size field should be visible in the form.\n * @type {boolean}\n */\n $scope.showContextSize = ($scope.agentFormModel.contextSize !== null);\n\n /**\n * The model for the vector fields select dropdown (Similarity search method).\n * @type {string[]}\n */\n $scope.vectorFields = [];\n\n $scope.documentationUrlForSimilarity = DocumentationUrlResolver.getDocumentationUrl(productInfo.productShortVersion, 'talk-to-graph.html#prerequisites-and-configuration');\n\n /**\n * The similarity index select options grouped by provider for the similarity search extraction method.\n * @type {*[]}\n */\n $scope.similarityOptionsGrouped = [];\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Sets the UI touched state and validation state for the extraction methods property so that the UI can show if\n * the user has selected at least one extraction method and warn him if he hasn't.\n *\n * @param {ExtractionMethodFormModel} extractionMethod\n */\n $scope.toggleExtractionMethod = (extractionMethod) => {\n extractionMethod.expanded = extractionMethod.selected;\n $scope.agentSettingsForm.extractionMethods.$setTouched();\n setExtractionMethodValidityStatus();\n extractionPanelToggleHandlers[extractionMethod.method](extractionMethod);\n };\n\n /**\n * Handles the panel toggle event for the extraction method. This is used to do some initialization when the user\n * opens the panel for a specific extraction method.\n * @param {ExtractionMethodFormModel} extractionMethod\n */\n $scope.onExtractionMethodPanelToggle = (extractionMethod) => {\n extractionMethod.toggleCollapse();\n extractionPanelToggleHandlers[extractionMethod.method](extractionMethod);\n };\n\n /**\n * Sets the UI touched state and validation state for the additional extraction methods property so that the UI can show if\n * the user has selected at least one extraction method.\n *\n * @param {AdditionalExtractionMethodFormModel} extractionMethod\n */\n $scope.toggleAdditionalExtractionMethod = (extractionMethod) => {\n extractionMethod.expanded = extractionMethod.selected;\n $scope.checkAutocompleteIndexEnabled();\n additionalExtractionPanelToggleHandlers[extractionMethod.method](extractionMethod);\n };\n\n /**\n * Handles the panel toggle event for the additional extraction method. This is used to do some initialization when the user\n * opens the panel for a specific extraction method.\n * @param {AdditionalExtractionMethodFormModel} extractionMethod\n */\n $scope.onAdditionalExtractionMethodPanelToggle = (extractionMethod) => {\n extractionMethod.toggleCollapse();\n additionalExtractionPanelToggleHandlers[extractionMethod.method](extractionMethod);\n };\n\n $scope.helpInfoForModel = {\n ttygHelpInfo: getModelHelpMessage(),\n linkText: $translate.instant('ttyg.agent.create_agent_modal.form.model.link_text'),\n documentationUrl: DocumentationUrlResolver.getDocumentationUrl(productInfo.productShortVersion, 'talk-to-graph.html#prerequisites-and-configuration'),\n };\n\n /**\n * Resolves the hint for the FTS search missing message. This is needed because the hint contains a html link that\n * should be properly rendered.\n * @return {*}\n */\n $scope.getFTSDisabledHelpMessage = () => {\n // The hint contains a html link which should be properly rendered.\n const message = decodeHTML(\n $translate.instant(\n 'ttyg.agent.create_agent_modal.form.fts_search.fts_disabled_message',\n {repositoryEditPage: 'repository/edit/' + $scope.agentFormModel.repositoryId},\n ),\n );\n return $sce.trustAsHtml(message);\n };\n\n /**\n * Opens the 'Autocomplete index' view in a new tab.\n */\n $scope.goToAutocompleteView = (event) => {\n event.preventDefault();\n TTYGContextService.emit(TTYGEventName.GO_TO_AUTOCOMPLETE_INDEX_VIEW, {repositoryId: $scope.agentFormModel.repositoryId});\n };\n\n /**\n * Opens the 'Create Similarity' view in a new tab.\n */\n $scope.goToCreateSimilarityView = (event) => {\n event.preventDefault();\n TTYGContextService.emit(TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW, {repositoryId: $scope.agentFormModel.repositoryId});\n };\n\n /**\n * Opens the 'Connectors' view in a new tab.\n */\n $scope.goToConnectorsView = (event) => {\n event.preventDefault();\n TTYGContextService.emit(TTYGEventName.GO_TO_CONNECTORS_VIEW, {repositoryId: $scope.agentFormModel.repositoryId});\n };\n\n /**\n * Handles the selected agent operation which can be one of <code>AGENT_OPERATION</code> types. Respective handler\n * is called based on the operation type with the agent payload build based on the form model.\n * @return {Promise<void>}\n */\n $scope.ok = () => {\n const agentPayload = $scope.agentFormModel.toPayload();\n return agentOperationHandlers[$scope.operation](agentPayload);\n };\n\n /**\n * Closes the modal when the user cancels the agent creation.\n */\n $scope.cancel = () => {\n $uibModalInstance.dismiss({});\n };\n\n /**\n * Closes the modal when the user clicks the close button.\n */\n $scope.close = () => {\n $uibModalInstance.dismiss({});\n };\n\n /**\n * Updates the similarity search panel.\n *\n * @param {boolean} clearIndexSelection - If true, the selected index will be cleared.\n */\n $scope.updateSimilaritySearchPanel = (clearIndexSelection = false) => {\n const similaritySearchExtractionMethod = $scope.agentFormModel.assistantExtractionMethods.getSimilarityExtractionMethod();\n if (!similaritySearchExtractionMethod.selected) {\n return;\n }\n if (clearIndexSelection) {\n similaritySearchExtractionMethod.similarityIndex = null;\n }\n handleSimilaritySearchExtractionMethodPanelToggle(similaritySearchExtractionMethod, true);\n };\n\n /**\n * Updates the ChatGPT retrieval connector panel.\n *\n * @param {boolean} clearSelection - If true, the selected connector will be cleared.\n */\n $scope.updateRetrievalConnectorPanel = (clearSelection = false) => {\n const retrievalExtractionExtractionMethod = $scope.agentFormModel.assistantExtractionMethods.getRetrievalExtractionMethod();\n if (!retrievalExtractionExtractionMethod.selected) {\n return;\n }\n if (clearSelection) {\n retrievalExtractionExtractionMethod.retrievalConnectorInstance = null;\n }\n handleRetrievalConnectorExtractionMethodPanelToggle(retrievalExtractionExtractionMethod);\n };\n\n /**\n * Checks if the Full-Text Search (FTS) index is enabled for the selected repository.\n * Sets form validation state based on whether FTS is enabled and required.\n */\n $scope.checkIfFTSEnabled = () => {\n if (!$scope.agentFormModel.repositoryId) {\n $scope.agentSettingsForm.$setValidity('FTSDisabled', false);\n return;\n }\n\n const ftsSearchExtractionMethod = $scope.agentFormModel.assistantExtractionMethods.getFTSSearchExtractionMethod();\n if (!ftsSearchExtractionMethod.selected) {\n // clear the validation status if method is deselected.\n $scope.agentSettingsForm.$setValidity('FTSDisabled', true);\n return;\n }\n\n $scope.extractionMethodLoaderFlags[ExtractionMethod.FTS_SEARCH] = true;\n\n // pass a fake repository info object with only an id because we don't care for the location\n RepositoriesRestService.getRepositoryModel({id: $scope.agentFormModel.repositoryId}).then((repositoryModel) => {\n $scope.ftsEnabled = repositoryModel.getParamValue(REPOSITORY_PARAMS.enableFtsIndex);\n })\n .catch((error) => {\n logAndShowError(error, 'ttyg.agent.messages.error_repository_config_loading');\n })\n .finally(() => {\n $scope.extractionMethodLoaderFlags[ExtractionMethod.FTS_SEARCH] = false;\n $scope.agentSettingsForm.$setValidity('FTSDisabled', $scope.ftsEnabled);\n });\n };\n\n /**\n * Opens a modal to copy the external integration for the currently edited agent.\n *\n * @function\n */\n $scope.openExternalIntegrationConfig = () => {\n const agent = $scope.agentFormModel;\n ExternalIntegrationModalService.open(agent);\n };\n\n /**\n * Handles the change in the repository id field. This is needed because\n * the FTS method configuration depends on the selected repository to be\n * able to validate if the FTS is enabled for that selected repository.\n */\n $scope.onRepositoryChange = () => {\n refreshValidations(true, true);\n };\n\n /**\n * Checks the status of the autocomplete index.\n * @param {AdditionalExtractionMethodFormModel|undefined} method - The extraction method to check the autocomplete\n * index for. This function can be called in the visibilitychange handler, so the method might not be defined.\n * If not provided, it will check the 'Autocomplete IRI discovery search' method from the additional extraction\n * methods.\n */\n $scope.checkAutocompleteIndexEnabled = (method) => {\n if (!method) {\n method = $scope.agentFormModel.additionalExtractionMethods.additionalExtractionMethods\n .find((extractionMethod) => extractionMethod.method === AdditionalExtractionMethod.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH);\n }\n // If the method is not selected, we don't need to check the autocomplete index status.\n // Also, if the repository id is not set, we can't check the autocomplete index status.\n if (method && !method.selected || !$scope.agentFormModel.repositoryId) {\n return;\n }\n const selectedRepositoryInfo = getSelectedRepositoryInfo();\n AutocompleteService.checkAutocompleteStatus(selectedRepositoryInfo.repositoryId, selectedRepositoryInfo.repositoryLocation)\n .then((autocompleteEnabled) => {\n $scope.autocompleteEnabled = autocompleteEnabled;\n $scope.agentSettingsForm.$setValidity('autocompleteDisabled', autocompleteEnabled);\n })\n .catch((error) => {\n $scope.agentSettingsForm.$setValidity('autocompleteDisabled', false);\n toastr.error(getError(error));\n });\n };\n\n /**\n * Restores the default context size.\n */\n $scope.onRestoreDefaultContextSize = () => {\n $scope.agentFormModel.contextSize = $scope.agentFormModel.contextSizeCopy;\n };\n\n /**\n * Restores the default system instructions.\n */\n $scope.onRestoreDefaultSystemInstructions = () => {\n $scope.agentFormModel.instructions.systemInstruction = $scope.agentFormModel.instructions.systemInstructionCopy;\n };\n\n /**\n * Restores the default user instructions.\n */\n $scope.onRestoreDefaultUserInstructions = () => {\n $scope.agentFormModel.instructions.userInstruction = $scope.agentFormModel.instructions.userInstructionCopy;\n };\n\n /**\n * Handles the change in the temperature field. This is needed because the high temperature warning should be shown\n * when the temperature is higher than 1.\n */\n $scope.onTemperatureChange = () => {\n $scope.showHighTemperatureWarning = $scope.agentFormModel.temperature.value > 1;\n };\n\n /**\n * Handles the change in the system instructions field.\n */\n $scope.onSystemInstructionChange = () => {\n if ($scope.agentFormModel.instructions.systemInstruction !== '' && !$scope.showSystemInstructionWarning) {\n $scope.showSystemInstructionWarning = true;\n ModalService.openModalAlert({\n title: $translate.instant('ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.title'),\n message: $translate.instant('ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body'),\n }).result\n .then(function() {\n // Do nothing, just warning the user\n });\n }\n if ($scope.agentFormModel.instructions.systemInstruction === '') {\n $scope.showSystemInstructionWarning = false;\n }\n };\n\n /**\n * Opens the agent instructions explain modal.\n */\n $scope.onExplainAgentSettings = () => {\n const agentPayload = $scope.agentFormModel.toPayload();\n TTYGService.explainAgentSettings(agentPayload)\n .then((agentInstructionsExplain) => {\n const options = {\n templateUrl: 'js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html',\n controller: 'AgentInstructionsExplainModalController',\n windowClass: 'agent-instructions-explain-modal',\n backdrop: 'static',\n resolve: {\n dialogModel: function() {\n return {\n agentInstructionsExplain,\n };\n },\n },\n size: 'lg',\n };\n $uibModal.open(options).result\n .then(() => {\n // Do nothing\n });\n }).catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n });\n };\n\n /**\n * Populates autocomplete suggestions for the given input text.\n * @param {Event} event - The input event containing the search text.\n */\n $scope.getSuggestions = (event) => {\n const inputText = event.target.value;\n AutocompleteRestService.getAutocompleteSuggestions(inputText)\n .then(mapUriAsNtripleAutocompleteResponse)\n .then((suggestions) => {\n $scope.autocompleteSuggestions = suggestions.map((item) => ({text: item.value}));\n }).catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n });\n };\n\n /**\n * Handles the change event for the vector fields select dropdown.\n * Updates the connector fields based on the selected vector field.\n * @param {ExtractionMethodFormModel} extractionMethod - The extraction method being updated.\n */\n $scope.onVectorFieldsChange = function(extractionMethod) {\n extractionMethod.connectorFields = extractionMethod.selectedConnectorField ? [extractionMethod.selectedConnectorField] : [];\n };\n\n /**\n * Determines whether there is connector data available for the similarity search extraction method.\n * @returns {boolean} True if connector data exists, false otherwise.\n */\n $scope.hasConnectorData = () => {\n return !!($scope.connectorMap && Object.keys($scope.connectorMap).length);\n };\n\n /**\n * Determines whether the vector fields select dropdown should be shown for the similarity search extraction method.\n * @param {ExtractionMethodFormModel} extractionMethod - The extraction method to check.\n * @returns {boolean} True if vector fields dropdown should be shown, false otherwise.\n */\n $scope.shouldShowVectorFields = (extractionMethod) => {\n if (!extractionMethod) {\n return false;\n }\n\n const provider = extractionMethod.connectorType;\n const indexName = extractionMethod.similarityIndex;\n\n if (!isVectorProvider(provider)) {\n return false;\n }\n\n if (Array.isArray($scope.vectorFields)) {\n return $scope.vectorFields.length > 0;\n }\n\n const fields = getVectorFieldsFromMap(provider, indexName);\n\n return Array.isArray(fields) && fields.length > 0;\n };\n\n /**\n * Handles the change event for the similarity index select menu.\n * Updates the connector type, similarity index, and refreshes available vector fields.\n * @param {ExtractionMethodFormModel} extractionMethod - The extraction method being updated.\n */\n $scope.onSimilarityIndexChange = (extractionMethod) => {\n const option = extractionMethod && extractionMethod.similarityIndexOption;\n // The user needs to select a vector field again.\n extractionMethod.selectedConnectorField = undefined;\n extractionMethod.connectorFields = [];\n\n if (!option) {\n extractionMethod.connectorType = null;\n extractionMethod.similarityIndex = '';\n $scope.vectorFields = [];\n return;\n }\n\n extractionMethod.connectorType = option.provider;\n extractionMethod.similarityIndex = option.value;\n\n $scope.vectorFields = getVectorFieldsFromMap(option.provider, option.value);\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Gets vector fields from the connector map for a given provider and index name.\n * @param {string} provider - The provider type.\n * @param {string} indexName - The index name.\n * @returns {Array} The vector fields array, or an empty array if not found.\n */\n const getVectorFieldsFromMap = (provider, indexName) => {\n const map = $scope.connectorMap || {};\n return (map[provider] && map[provider][indexName])\n ? map[provider][indexName]\n : [];\n };\n\n /**\n * Updates the vector fields in the select dropdown based on the selected extraction method.\n * @param extractionMethod\n */\n const updateVectorFields = (extractionMethod) => {\n const provider = extractionMethod.connectorType;\n const indexName = extractionMethod.similarityIndex;\n\n if (!isVectorProvider(provider)) {\n $scope.vectorFields = [];\n return;\n }\n\n $scope.vectorFields = getVectorFieldsFromMap(provider, indexName);\n };\n\n /**\n * Resolves the hint message for the agent model property.\n * This is needed because the hint contains a html link that\n * should be properly rendered.\n * @return {*}\n */\n function getModelHelpMessage() {\n // The hint contains a html link which should be properly rendered.\n const message = decodeHTML($translate.instant('ttyg.agent.create_agent_modal.form.model.hint'));\n return $sce.trustAsHtml(message);\n }\n\n /**\n * Mapping of agent operations to their respective handlers.\n * @type {{[AGENT_OPERATION.EDIT]: (function(*): Promise<void>), [AGENT_OPERATION.CLONE]: (function(*): Promise<void>), [AGENT_OPERATION.CREATE]: (function(*): Promise<void>)}}\n */\n const agentOperationHandlers = {\n [AGENT_OPERATION.CREATE]: (payload) => createAgent(payload),\n [AGENT_OPERATION.EDIT]: (payload) => editAgent(payload),\n [AGENT_OPERATION.CLONE]: (payload) => cloneAgent(payload),\n };\n\n /**\n * Creates a new agent with the given payload and closes the modal if no errors occur.\n * @param {*} newAgentPayload - the payload for the new agent.\n * @return {Promise<void>}\n */\n const createAgent = (newAgentPayload) => {\n $scope.savingAgent = true;\n return TTYGService.createAgent(newAgentPayload)\n .then((agentModel) => {\n $uibModalInstance.close(agentModel);\n toastr.success($translate.instant('ttyg.agent.messages.agent_save_successfully', {agentName: agentModel.name}));\n })\n .catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n })\n .finally(() => {\n $scope.savingAgent = false;\n });\n };\n\n /**\n * Sends the edit agent payload to the server and closes the modal if no errors occur.\n * @param {*} agentPayload - the payload for the agent to be edited.\n * @return {Promise<void>}\n */\n const editAgent = (agentPayload) => {\n $scope.savingAgent = true;\n return TTYGService.editAgent(agentPayload)\n .then((updatedAgent) => {\n $uibModalInstance.close(updatedAgent);\n toastr.success($translate.instant('ttyg.agent.messages.agent_save_successfully', {agentName: updatedAgent.name}));\n })\n .catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n })\n .finally(() => {\n $scope.savingAgent = false;\n });\n };\n\n /**\n * Clones the agent with the given payload and closes the modal if no errors occur.\n * @param {*} agentPayload\n * @return {Promise<void>}\n */\n const cloneAgent = (agentPayload) => {\n $scope.savingAgent = true;\n return TTYGService.createAgent(agentPayload)\n .then((updatedAgent) => {\n $uibModalInstance.close(updatedAgent);\n toastr.success($translate.instant(\"ttyg.agent.messages.agent_save_successfully\", {agentName: updatedAgent.name}));\n })\n .catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n })\n .finally(() => {\n $scope.savingAgent = false;\n });\n };\n\n const logAndShowError = (error, errorMessageKey) => {\n logger.error(error);\n toastr.error($translate.instant(errorMessageKey));\n };\n\n const setExtractionMethodValidityStatus = () => {\n $scope.agentSettingsForm.extractionMethods.$setValidity('required', $scope.agentFormModel.hasExtractionMethodSelected());\n };\n\n const handleFTSExtractionMethodPanelToggle = (extractionMethod) => {\n $scope.checkIfFTSEnabled();\n };\n\n /**\n * Returns the repository info model for the selected repository in the form.\n *\n * @return {{repositoryLocation: (*|undefined), repositoryId: (*|undefined)}}\n */\n const getSelectedRepositoryInfo = () => {\n const selectRepositoryInfo = $scope.activeRepositoryList.find((repository) => repository.value === $scope.agentFormModel.repositoryId);\n return {\n repositoryId: selectRepositoryInfo ? selectRepositoryInfo.data.repository.id : undefined,\n repositoryLocation: selectRepositoryInfo ? selectRepositoryInfo.data.repository.location : undefined,\n };\n };\n\n const isVectorProvider = (p) => p === SimilarityInstanceType.OPENSEARCH || p === SimilarityInstanceType.ELASTICSEARCH;\n\n /**\n * Creates grouped options for ng-options with optgroups.\n * @param connectorMap - The connector map with similarity indexes.\n */\n const buildSimilarityIndexSelectOptions = (connectorMap) => {\n /** @type {SimilarityIndexOption[]} */\n $scope.similarityOptionsGrouped = [];\n Object.entries(connectorMap).forEach(([provider, types]) => {\n const groupLabel = $translate.instant(`ttyg.agent.create_agent_modal.form.similarity_instance_type_label.${provider}`);\n Object.keys(types || {}).forEach((typeName) => {\n $scope.similarityOptionsGrouped.push({\n provider,\n label: typeName,\n value: typeName,\n group: groupLabel,\n });\n });\n });\n };\n\n const handleSimilaritySearchExtractionMethodPanelToggle = (extractionMethod, clearSelectedVectorField = false) => {\n if (!extractionMethod.selected) {\n // clear the validation status if method is deselected.\n $scope.agentSettingsForm.$setValidity('missingIndex', true);\n }\n if (extractionMethod.selected) {\n // Check if the connector instances select is pristine (unchanged). Treat the field as pristine until it exists.\n // Because it's loaded with ng-if, on first pass through here, it won't exist yet, so we treat it as pristine.\n const connectorField = $scope.agentSettingsForm && $scope.agentSettingsForm.connectorInstances;\n const isConnectorPristine = connectorField ? connectorField.$pristine : true;\n // Don't reload the indexes and override the user selection if the connector instances field is pristine\n if ($scope.connectorMap && !isConnectorPristine) {\n return;\n }\n }\n if (!$scope.agentFormModel.repositoryId) {\n return;\n }\n if (extractionMethod.expanded) {\n $scope.extractionMethodLoaderFlags[extractionMethod.method] = true;\n const selectedRepositoryInfo = getSelectedRepositoryInfo();\n SimilarityService.getSimilarityIndexesWithVectorFields(selectedRepositoryInfo.repositoryId)\n .then((connectorMap) => {\n $scope.connectorMap = connectorMap;\n const indexes = buildSelectMenuOptions(connectorMap);\n // if no indexes are found, selection (connectorsMap) will be cleaned and the info message will be\n // shown to the user again\n buildSimilarityIndexSelectOptions(connectorMap);\n updateSelectedSimilarityIndex(indexes, extractionMethod);\n updateVectorFields(extractionMethod);\n\n $scope.agentSettingsForm.$setValidity('missingIndex', !extractionMethod.selected || $scope.hasConnectorData());\n // Initially, when there is no selection, the first index is selected, and we need to trigger the\n // onSimilarityIndexChange to set the connector fields.\n if (clearSelectedVectorField || (extractionMethod.connectorFields && extractionMethod.connectorFields.length === 0)) {\n $scope.onSimilarityIndexChange(extractionMethod);\n }\n })\n .catch((error) => {\n $scope.connectorMap = null;\n $scope.agentSettingsForm.$setValidity('missingIndex', false);\n logAndShowError(error, 'ttyg.agent.messages.error_similarity_indexes_loading');\n })\n .finally(() => {\n $scope.extractionMethodLoaderFlags[extractionMethod.method] = false;\n });\n }\n };\n\n /**\n * Updates the selected similarity index for the extraction method.\n *\n * @param {SelectMenuOptionsModel[]} indexes - The list of all available similarity indexes.\n * @param {Object} extractionMethod - The extraction method object containing the currently selected similarity index.\n */\n const updateSelectedSimilarityIndex = (indexes, extractionMethod) => {\n if (!indexes.length) {\n extractionMethod.connectorType = '';\n extractionMethod.similarityIndex = '';\n extractionMethod.similarityIndexOption = undefined;\n return;\n }\n\n const currentType = extractionMethod.connectorType;\n const currentName = extractionMethod.similarityIndex;\n\n // Find previously selected index or default to the first one\n const matchedIndex = indexes.find((index) =>\n index.data.connectorType === currentType &&\n index.value === currentName,\n );\n const selectedIndex = matchedIndex || indexes[0];\n\n extractionMethod.connectorType = selectedIndex.data.connectorType;\n extractionMethod.similarityIndex = selectedIndex.value;\n\n const options = $scope.similarityOptionsGrouped || [];\n const opt = options.find((option) =>\n option.provider === extractionMethod.connectorType &&\n option.value === extractionMethod.similarityIndex,\n );\n\n extractionMethod.similarityIndexOption = opt || undefined;\n };\n\n const buildSelectMenuOptions = (data) => {\n const result = [];\n\n Object.entries(data).forEach(([connectorType, indexes]) => {\n Object.entries(indexes).forEach(([indexName, fields]) => {\n result.push(\n new SelectMenuOptionsModel({\n label: indexName,\n value: indexName,\n data: {connectorType, connectorFields: fields},\n }),\n );\n });\n });\n\n return result;\n };\n\n const handleRetrievalConnectorExtractionMethodPanelToggle = (extractionMethod) => {\n if (!$scope.agentFormModel.repositoryId) {\n return;\n }\n if (!extractionMethod.selected) {\n // clear the validation status if method is deselected.\n $scope.agentSettingsForm.$setValidity('missingConnector', true);\n }\n\n if (extractionMethod.expanded) {\n $scope.extractionMethodLoaderFlags[extractionMethod.method] = true;\n const selectedRepositoryInfo = getSelectedRepositoryInfo();\n ConnectorsService.getConnectorPrefixByName(CHAT_GPT_RETRIEVAL_CONNECTOR_NAME, selectedRepositoryInfo.repositoryId, selectedRepositoryInfo.repositoryLocation)\n .then((prefix) => ConnectorsService.getConnectorsByTypeAsSelectMenuOptions(prefix, selectedRepositoryInfo.repositoryId, selectedRepositoryInfo.repositoryLocation))\n .then((connectors) => {\n $scope.retrievalConnectors = connectors;\n $scope.agentSettingsForm.$setValidity('missingConnector', !extractionMethod.selected || !!(connectors && connectors.length));\n updateSelectedRetrievalConnector($scope.retrievalConnectors, extractionMethod);\n })\n .catch((error) => {\n $scope.agentSettingsForm.$setValidity('missingConnector', false);\n logAndShowError(error, 'ttyg.agent.messages.error_retrieval_connectors_loading');\n })\n .finally(() => {\n $scope.extractionMethodLoaderFlags[extractionMethod.method] = false;\n });\n }\n };\n\n /**\n * Updates the selected retrieval connector for the extraction method.\n *\n * @param {SelectMenuOptionsModel[]} retrievalConnectors - The list of all available connectors.\n * @param {Object} extractionMethod - The extraction method object containing the currently selected retrieval connector.\n */\n const updateSelectedRetrievalConnector = (retrievalConnectors, extractionMethod) => {\n if (retrievalConnectors.length === 0) {\n // If no connector are available, clear the similarity index.\n extractionMethod.retrievalConnectorInstance = null;\n return;\n }\n const selectedConnector = retrievalConnectors.find((connector) => connector.value === extractionMethod.retrievalConnectorInstance);\n\n // If the selected connector is not found in the current list, default to the first index.\n extractionMethod.retrievalConnectorInstance = selectedConnector\n ? selectedConnector.value\n : retrievalConnectors[0].value;\n };\n\n const extractionPanelToggleHandlers = {\n [ExtractionMethod.FTS_SEARCH]: (extractionMethod) => handleFTSExtractionMethodPanelToggle(extractionMethod),\n [ExtractionMethod.SPARQL]: (extractionMethod) => {\n },\n [ExtractionMethod.SIMILARITY]: (extractionMethod) => handleSimilaritySearchExtractionMethodPanelToggle(extractionMethod),\n [ExtractionMethod.RETRIEVAL]: (extractionMethod) => handleRetrievalConnectorExtractionMethodPanelToggle(extractionMethod),\n };\n\n const additionalExtractionPanelToggleHandlers = {\n [AdditionalExtractionMethod.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH]: (extractionMethod) => handleAutocompleteExtractionMethodPanelToggle(extractionMethod),\n [AdditionalExtractionMethod.IRI_DISCOVERY_SEARCH]: () => {\n },\n };\n\n const handleAutocompleteExtractionMethodPanelToggle = (extractionMethod) => {\n if (!extractionMethod.selected) {\n // clear the validation status if method is deselected.\n $scope.agentSettingsForm.$setValidity('autocompleteDisabled', true);\n }\n $scope.checkAutocompleteIndexEnabled(extractionMethod);\n };\n\n const refreshValidations = (clearIndexSelection = false, clearRetrievalConnectorSelection = false) => {\n $scope.checkIfFTSEnabled();\n $scope.updateSimilaritySearchPanel(clearIndexSelection);\n $scope.updateRetrievalConnectorPanel(clearRetrievalConnectorSelection);\n $scope.checkAutocompleteIndexEnabled();\n };\n\n const onTabVisibilityChanged = () => {\n if (!document.hidden) {\n refreshValidations();\n }\n };\n\n const refreshSliderById = (elementId, value) => {\n const slider = document.getElementById(elementId);\n if (slider) {\n slider.value = value;\n }\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n const removeAllSubscribers = () => {\n document.removeEventListener(\"visibilitychange\", onTabVisibilityChanged);\n };\n\n document.addEventListener(\"visibilitychange\", onTabVisibilityChanged);\n\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n\n\n // =========================\n // Initialization\n // =========================\n\n const init = () => {\n // Set repository id to null if it is missing from the list of active repositories\n const selectedRepositoryInfo = getSelectedRepositoryInfo();\n if (!selectedRepositoryInfo.repositoryId) {\n $scope.agentFormModel.repositoryId = null;\n }\n // Delay the validation status setting because angular form ngmodel is not present immediately\n setTimeout(setExtractionMethodValidityStatus, 0);\n $uibModalInstance.rendered.then(() => {\n refreshSliderById('temperatureSlider', $scope.agentFormModel.temperature.value);\n refreshSliderById('topPSlider', $scope.agentFormModel.topP.value);\n });\n };\n init();\n}\n"],"names":["angular","module","directive","restrict","scope","items","placeholder","onChange","labelKeys","templateUrl","controller","$scope","$document","$element","$filter","$timeout","open","search","query","visibleItems","subscriptions","normalize","v","toLowerCase","rebuildFiltered","list","Array","isArray","normalizedQuery","filter","i","label","includes","onDocClick","e","contains","target","$applyAsync","toggleOpen","stopPropagation","input","querySelector","focus","onKeydownMenu","key","preventDefault","btn","selectedCount","selected","length","allFilteredSelected","every","someFilteredSelected","any","some","all","toggleSelectAll","makeSelected","item","emitChange","on","push","$watch","$watchCollection","$on","onDestroyCallback","off","unsubscribe","SimilarityInstanceType","ExternalIntegrationConfigurationModalController","$uibModalInstance","ModalService","$translate","dialogModel","externalIntegrationConfiguration","difyExtension","difyExtensionUrl","queryMethods","queryMethodsUrl","agentId","agentName","close","dismiss","onCloseExternalIntegrationConfigurationModal","$inject","ExternalIntegrationModalService","$uibModal","LocationsRestService","toastr","agent","getExternalUrl","then","response","baseUrl","name","id","buildDialogModel","data","windowClass","backdrop","resolve","result","catch","error","getError","TTYG_ERROR_MSG_LENGTH","factory","logger","LoggerProvider","AgentSettingsModalController","SimilarityService","ConnectorsService","RepositoriesRestService","$sce","UriUtils","TTYGContextService","TTYGService","ExtractionMethodTemplates","AutocompleteService","AutocompleteRestService","productInfo","AGENT_OPERATION","operation","savingAgent","agentFormModel","activeRepositoryInfo","extractionMethodLoaderFlags","ExtractionMethod","SIMILARITY","activeRepositoryList","extractionMethods","additionalExtractionMethods","AdditionalExtractionMethod","showAdvancedSettings","showHighTemperatureWarning","showSystemInstructionWarning","retrievalConnectors","ftsEnabled","autocompleteSuggestions","showContextSize","contextSize","vectorFields","documentationUrlForSimilarity","DocumentationUrlResolver","getDocumentationUrl","productShortVersion","similarityOptionsGrouped","toggleExtractionMethod","extractionMethod","expanded","agentSettingsForm","$setTouched","setExtractionMethodValidityStatus","extractionPanelToggleHandlers","method","onExtractionMethodPanelToggle","toggleCollapse","toggleAdditionalExtractionMethod","checkAutocompleteIndexEnabled","additionalExtractionPanelToggleHandlers","onAdditionalExtractionMethodPanelToggle","helpInfoForModel","ttygHelpInfo","message","decodeHTML","instant","trustAsHtml","getModelHelpMessage","linkText","documentationUrl","getFTSDisabledHelpMessage","repositoryEditPage","repositoryId","goToAutocompleteView","event","emit","TTYGEventName","GO_TO_AUTOCOMPLETE_INDEX_VIEW","goToCreateSimilarityView","GO_TO_CREATE_SIMILARITY_VIEW","goToConnectorsView","GO_TO_CONNECTORS_VIEW","ok","agentPayload","toPayload","agentOperationHandlers","cancel","updateSimilaritySearchPanel","clearIndexSelection","similaritySearchExtractionMethod","assistantExtractionMethods","getSimilarityExtractionMethod","similarityIndex","handleSimilaritySearchExtractionMethodPanelToggle","updateRetrievalConnectorPanel","clearSelection","retrievalExtractionExtractionMethod","getRetrievalExtractionMethod","retrievalConnectorInstance","handleRetrievalConnectorExtractionMethodPanelToggle","checkIfFTSEnabled","getFTSSearchExtractionMethod","FTS_SEARCH","getRepositoryModel","repositoryModel","getParamValue","REPOSITORY_PARAMS","enableFtsIndex","logAndShowError","finally","$setValidity","openExternalIntegrationConfig","onRepositoryChange","refreshValidations","find","AUTOCOMPLETE_IRI_DISCOVERY_SEARCH","selectedRepositoryInfo","getSelectedRepositoryInfo","checkAutocompleteStatus","repositoryLocation","autocompleteEnabled","onRestoreDefaultContextSize","contextSizeCopy","onRestoreDefaultSystemInstructions","instructions","systemInstruction","systemInstructionCopy","onRestoreDefaultUserInstructions","userInstruction","userInstructionCopy","onTemperatureChange","temperature","value","onSystemInstructionChange","openModalAlert","title","onExplainAgentSettings","explainAgentSettings","agentInstructionsExplain","options","size","getSuggestions","inputText","getAutocompleteSuggestions","mapUriAsNtripleAutocompleteResponse","suggestions","map","text","onVectorFieldsChange","connectorFields","selectedConnectorField","hasConnectorData","connectorMap","Object","keys","shouldShowVectorFields","provider","connectorType","indexName","isVectorProvider","fields","getVectorFieldsFromMap","onSimilarityIndexChange","option","similarityIndexOption","undefined","CREATE","payload","createAgent","EDIT","editAgent","CLONE","cloneAgent","newAgentPayload","agentModel","success","updatedAgent","errorMessageKey","hasExtractionMethodSelected","selectRepositoryInfo","repository","location","p","OPENSEARCH","ELASTICSEARCH","clearSelectedVectorField","connectorField","connectorInstances","isConnectorPristine","$pristine","getSimilarityIndexesWithVectorFields","indexes","buildSelectMenuOptions","entries","forEach","types","groupLabel","typeName","group","buildSimilarityIndexSelectOptions","updateSelectedSimilarityIndex","updateVectorFields","currentType","currentName","selectedIndex","index","opt","SelectMenuOptionsModel","getConnectorPrefixByName","prefix","getConnectorsByTypeAsSelectMenuOptions","connectors","updateSelectedRetrievalConnector","selectedConnector","connector","SPARQL","RETRIEVAL","handleAutocompleteExtractionMethodPanelToggle","IRI_DISCOVERY_SEARCH","clearRetrievalConnectorSelection","onTabVisibilityChanged","document","hidden","refreshSliderById","elementId","slider","getElementById","addEventListener","removeAllSubscribers","removeEventListener","setTimeout","rendered","topP","constant","arr","o"],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=98268;export const __webpack_esm_ids__=[98268];export const __webpack_esm_modules__={98268(e,t,n){var o=n(60529);function r(e,t,n,r){return{template:'\n <style>\n .open-in-sparql-editor-btn {\n line-height: 0.75;\n }\n .open-in-sparql-editor-btn .fa:nth-child(2) {\n margin-left: -0.2em;\n margin-right: -0.2em;\n font-size: 0.9em;\n }\n </style>\n <button class="btn btn-link btn-sm open-in-sparql-editor-btn"\n data-test="open-in-sparql-editor-btn"\n gdb-tooltip="{{\'ttyg.chat_panel.btn.open_in_sparql_editor.tooltip\' | translate}}" ng-click="onGoToSparqlEditorView()" guide-selector="open-in-sparql-editor-btn">\n <i class="ri-braces-line"></i>\n </button>\n ',restrict:"E",scope:{query:"@",repositoryId:"@",executeQuery:"@"},link:function(i,p){i.tooltipText="ttyg.chat_panel.btn.open_in_sparql_editor.tooltip";const s="true"===i.executeQuery;i.onGoToSparqlEditorView=()=>{const r=e.getActiveRepository();r&&r===i.repositoryId?a(i.query):n.openConfirmationModal({title:t.instant("common.confirm"),message:(0,o.Gz)(t.instant("ttyg.chat_panel.dialog.confirm_repository_change.body",{repositoryId:i.repositoryId})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},()=>{e.setRepository(e.getRepository(i.repositoryId)),a(i.query)})};const a=e=>{r.open(`sparql?query=${encodeURIComponent(e)}&execute=${s}`,"_blank")}}}}angular.module("graphdb.framework.core.directives.open-in-sparql-editor",[]).directive("openInSparqlEditor",r),r.$inject=["$repositories","$translate","ModalService","$window"]}};
2
- //# sourceMappingURL=98268.86ff371dde616b4e2a76.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"98268.86ff371dde616b4e2a76.bundle.js","mappings":"iJAwCA,SAASA,EAA4BC,EAAeC,EAAYC,EAAcC,GAC1E,MAAO,CAGHC,SAAU,mvBAiBVC,SAAU,IACVC,MAAO,CACHC,MAAO,IACPC,aAAc,IACdC,aAAc,KAElBC,KAAM,SAASC,EAAQC,GAKnBD,EAAOE,YAAc,oDAIrB,MAAMC,EAAkC,SAAxBH,EAAOF,aASvBE,EAAOI,uBAAyB,KAC5B,MAAMC,EAAqBhB,EAAciB,sBACpCD,GAAsBA,IAAuBL,EAAOH,aAerDU,EAA2BP,EAAOJ,OAblCL,EAAaiB,sBACT,CACIC,MAAOnB,EAAWoB,QAAQ,kBAC1BC,SAASC,EAAAA,EAAAA,IAAWtB,EAAWoB,QAAQ,wDAAyD,CAACb,aAAcG,EAAOH,gBACtHgB,iBAAkB,qCAEtB,KACIxB,EAAcyB,cAAczB,EAAc0B,cAAcf,EAAOH,eAC/DU,EAA2BP,EAAOJ,UAgBlD,MAAMW,EAA8BX,IAEhCJ,EAAQwB,KAAK,gBAAgBC,mBAAmBrB,cAAkBO,IAAW,UAErF,EAER,CArFAe,QACKC,OAAO,0DAA2D,IAClEC,UAAU,qBAAsBhC,GAErCA,EAA4BiC,QAAU,CAAC,gBAAiB,aAAc,eAAgB,U","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/open-in-sparql-editor/open-in-sparql-editor.directive.js"],"sourcesContent":["import {decodeHTML} from \"../../../../../app\";\n\n/**\n * @ngdoc directive\n * @name graphdb.framework.core.directives.open-in-sparql-editor.directive:openInSparqlEditor\n * @restrict E\n *\n * @description\n * This directive provides a button that allows users to open the SPARQL editor with a pre-defined query.\n * Optionally, it can handle repository switching before opening the editor and executing the query.\n * The directive can also trigger the query execution automatically if specified.\n *\n * @scope\n *\n * @param {string} query The SPARQL query to be opened and optionally executed in the SPARQL editor.\n * @param {string} repositoryId The ID of the repository to be selected before opening the SPARQL editor.\n * @param {string} executeQuery Flag that determines whether the query should be executed upon opening the editor.\n * It accepts 'true' or 'false'. If 'true', the query will be automatically executed.\n *\n * @example\n * <open-in-sparql-editor\n * query=\"SELECT * WHERE {?s ?p ?o}\"\n * repository-id=\"myRepository\"\n * execute-query=\"true\">\n * </open-in-sparql-editor>\n *\n * @requires $repositories\n * @requires $translate\n * @requires ModalService\n * @requires $window\n *\n * @param {string} query The SPARQL query to be executed in the new tab.\n */\n\nangular\n .module('graphdb.framework.core.directives.open-in-sparql-editor', [])\n .directive('openInSparqlEditor', openInSparqlEditorDirective);\n\nopenInSparqlEditorDirective.$inject = ['$repositories', '$translate', 'ModalService', '$window'];\n\nfunction openInSparqlEditorDirective($repositories, $translate, ModalService, $window) {\n return {\n // Note: the line-height of the element must match the line-height of the icon.\n // This defines a composite FontAwesome icon to match the style of the surrounding icons.\n template: `\n <style>\n .open-in-sparql-editor-btn {\n line-height: 0.75;\n }\n .open-in-sparql-editor-btn .fa:nth-child(2) {\n margin-left: -0.2em;\n margin-right: -0.2em;\n font-size: 0.9em;\n }\n </style>\n <button class=\"btn btn-link btn-sm open-in-sparql-editor-btn\"\n data-test=\"open-in-sparql-editor-btn\"\n gdb-tooltip=\"{{'ttyg.chat_panel.btn.open_in_sparql_editor.tooltip' | translate}}\" ng-click=\"onGoToSparqlEditorView()\" guide-selector=\"open-in-sparql-editor-btn\">\n <i class=\"ri-braces-line\"></i>\n </button>\n `,\n restrict: 'E',\n scope: {\n query: '@',\n repositoryId: '@',\n executeQuery: '@',\n },\n link: function($scope, element) {\n // =========================\n // Public variables\n // =========================\n\n $scope.tooltipText = 'ttyg.chat_panel.btn.open_in_sparql_editor.tooltip';\n // =========================\n // Private functions\n // =========================\n const execute = $scope.executeQuery === 'true';\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Opens the SPARQL editor in a new browser tab with the specified query and optional execution.\n */\n $scope.onGoToSparqlEditorView = () => {\n const activeRepositoryId = $repositories.getActiveRepository();\n if (!activeRepositoryId || activeRepositoryId !== $scope.repositoryId) {\n // Open a confirmation modal before switching the repository\n ModalService.openConfirmationModal(\n {\n title: $translate.instant('common.confirm'),\n message: decodeHTML($translate.instant('ttyg.chat_panel.dialog.confirm_repository_change.body', {repositoryId: $scope.repositoryId})),\n confirmButtonKey: 'ttyg.chat_panel.btn.proceed.label',\n },\n () => {\n $repositories.setRepository($repositories.getRepository($scope.repositoryId));\n openInSparqlEditorInNewTab($scope.query);\n },\n );\n } else {\n // No repository switch needed, just open the SPARQL editor\n openInSparqlEditorInNewTab($scope.query);\n }\n };\n // =========================\n // Private functions\n // =========================\n\n /**\n * Opens SPARQL editor view with passed query and handles repository switch if necessary.\n * @param {string} query\n */\n const openInSparqlEditorInNewTab = (query) => {\n // Open the SPARQL editor in a new tab and execute the query\n $window.open(`sparql?query=${encodeURIComponent(query)}&execute=${execute}`, '_blank');\n };\n },\n };\n}\n"],"names":["openInSparqlEditorDirective","$repositories","$translate","ModalService","$window","template","restrict","scope","query","repositoryId","executeQuery","link","$scope","element","tooltipText","execute","onGoToSparqlEditorView","activeRepositoryId","getActiveRepository","openInSparqlEditorInNewTab","openConfirmationModal","title","instant","message","decodeHTML","confirmButtonKey","setRepository","getRepository","open","encodeURIComponent","angular","module","directive","$inject"],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=99448;export const __webpack_esm_ids__=[99448];export const __webpack_esm_modules__={64088(e,t,n){n.d(t,{A:()=>r});var a=a||{};a.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var a=0;a<t.children.length;a++)e(t.children[a]);if(1===t.children.length){var r=1.2*t.size;n&&(r=.1*t.children[0].size),t.children.push({name:"placeholder",size:r})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var a=t[n];"placeholder"===a.data.name?t.splice(n,1):a.children&&e(a.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var a=n.x-n.children[0].x;n.children[0].x+=a,r(n.children[0],a)}}function r(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,r(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,a=0;a<e.length;a++){var r=e[a];r.x-=t,r.y-=n}}};const r=a},88141(e,t,n){n.d(t,{A:()=>i}),n(62979);const a={selectAll:n(93462).selectAll};var r=r||{};r.Export={getCSSRules:function(e){const t=$('link[href="'+e+'"]')[0].sheet.rules;let n="";return _.each(t,function(e){n+=e.cssText}),n},generateBase64ImageSource:function(e){e||(e="svg");const t=a.selectAll(e).attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(t)))}};const i=r},99448(e,t,n){var a=n(75468),r=n(64088),i=n(19935),s=n(93462),c=n(88141),o=(n(32150),n(57154));function l(e,t,n,l,d,h,u,f,p,g,x,m){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(y,A,v){!function(y){let A=!1;let v,S;const C=s.pack().size([780,780]),R=s.scaleLinear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(s.interpolateHcl),E=s.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function P(){return E.append("svg:g").attrs({id:"main-group",transform:"translate(400,400)"})}function w(){return"true"===g.get(x.CLASS_HIERARCHY_HIDE_PREFIXES)}function H(){const e=c.A.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=3.3.2");s.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),s.selectAll("g").style("opacity",1);const t=c.A.Export.generateBase64ImageSource("#classChart svg");s.select(this).attrs({href:t,download:"class-hierarchy-"+h.getActiveRepository()+".svg"})}y.hidePrefixes=w();let I=P();const T=!!y.classHierarchyData?.classCount,L=h.getActiveRepository()&&!h.isSystemRepository();let D,k,N,b,F;(0,o.service)(o.LicenseContextService).onLicenseChanged(t=>{t?.valid&&!T&&L&&function(){e.loader=!0,e.hierarchyError=!1;const t=g.get(`classHierarchy-selectedGraph-${h.getActiveRepository()}`);n.getClassHierarchyData(null!==t?t.contextID.uri:"").success(function(t,n){e.loader=!1,207===n&&u.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),y.classHierarchyData=t,s.select("#download-svg").on("mouseover",H)}).error(function(t){e.loader=!1,e.hierarchyError=getError(t),u.error(m.instant("graphexplore.error.request.failed",{name:p,error:getError(t)}))})}()});const z={};function O(n,c,o,h){b&&b(),F&&F(),s.selectAll("#main-group").remove(),I=P(),r.A.SingleChild.addPlaceholders(n,!0),S=s.hierarchy(n),S.sum(function(e){return e.size}),N=o||S,C(S);const u=S.descendants();let g;N.isInFocusTransitive=!0,r.A.SingleChild.removePlaceholders(u),r.A.SingleChild.centerNodes(u),r.A.SingleChild.makePositionsRelativeToZero(u),v||(v=(0,a.A)().attr("class","d3-tip").customPosition(function(e,t){return{top:"inherit",bottom:l.innerHeight-t.clientY+"px",right:l.innerWidth-t.clientX+"px"}}).html(function(e){return e.data.name}),E.call(v));const x=I.selectAll("circle").data(u).enter().append("g");c.doFade&&x.each(function(e){i.A.Transition.fadeIn(s.select(this),550)});let m=[];const w=x.append("circle").attr("class",function(e){return e.data.role}).attr("data-test",function(e){return"class-"+e.data.name}).attr("guide-selector",function(e){return"class-"+e.data.name}).style("fill",function(e){return e.children?R(e.depth):"#E0D0D0"}).each(function(e){if(e.circle=s.select(this),e.data.name!==p){const t=e.data.name;m.push({name:t}),z[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",function(t){c.noPrefixes||e.textHidden?v.show(e,t):v.hide(e)}),e.circle.on("mouseout",v.hide)}}).on("gdb-focus",(e,t)=>k(t)).on("gdb-zoom",(e,t)=>Z(t));let H;function T(e){s.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),H=e}function L(){y.showClassInfoPanel=!1}m&&(m=_.uniqBy(m,"name"),y.flattenedClassNames=m);const $=i.A.Click.delayDblClick();s.selectAll(".parent, .topLevelParent, .child, .root").call($),k=function(e){Z(e),e.data.name===p?(L(),s.selectAll(".selected").classed("selected",!1)):(T(e),A||(y.selectedClass=H,y.showClassInfoPanel=!0),y.$on("sidePanelClosed",function(t){s.selectAll(".selected").classed("selected",e.selected=!1)}))},$.on("click",function(e,t){t.data.id&&l.history.pushState({id:t.data.id},"classHierarchyPage"+t.data.id,"hierarchy#"+t.data.id),v.hide(),k(t)}),$.on("dblclick",function(t,a){a!==n&&(v.hide(),T(a),e.$broadcast("goToDomainRangeGraphView",H,N),t.stopPropagation())});let O=0;E.on("wheel",function(e){v.hide(),e.preventDefault(),e.stopPropagation();const t=Date.now();if(!(t-O>100))return;O=t;let n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");let a=e.target.__data__;if(a||(a=N),"in"===n){if(a!==N){for(;a.parent&&!a.parent.isInFocusTransitive;)a=a.parent;a.depth<N.depth&&(a=N)}if(a===N&&a.children){let e=a.children[0];for(let t=1;t<a.children.length;t++)a.children[t].sortingRank>e.sortingRank&&(e=a.children[t]);e.children&&(a=e)}else a.children||(a=a.parent);Z(a,!0)}else"out"===n&&(a=N.parent,a&&Z(a,!0));N.data.name===p&&l.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),U()});const Y=I.selectAll("text").data(u).enter().append("text").attr("class",function(e){return e.children&&e.children.length?"label":"label child-label"}).each(function(e){e.textSel=s.select(this)});c.noPrefixes?(Y.each(function(e){const t=e.data.name.indexOf(":");e.data.name.indexOf("http://")>-1?e.noPrefixName=e.data.name:t>-1&&(e.noPrefixName=e.data.name.substring(t+1))}),Y.style("font-size",function(e){return i.A.Text.calcFontSize(e.noPrefixName,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)})):Y.style("font-size",function(e){return i.A.Text.calcFontSize(e.data.name,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r/3)}),Y.style("display",function(e){return e.parent&&e.parent.data===N.data?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")}),c.doFade&&!c.keepPrevState&&Y.each(function(e){i.A.Transition.fadeIn(s.select(this),550)}),D=function(){function e(e){e&&w.each(function(t){+e===t.data.id&&k(t)})}const n=t.hash();l.onpopstate=function(t){t.state&&e(t.state.id)},e(n)};const B=I.selectAll("circle, text");function V(e,t){const n=800/e[2];g=e,B.attr("transform",function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"}),w.attr("r",function(e){return e.r*n}),t&&Y.each(function(e){e.data.fullName!==N.data.topLevelParentUri&&N.data.topLevelParentUri!==p||(e.textSel.style("display","none"),N.children&&N.children.length?_.each(N.children,function(e){e.textSel.style("display","inline")}):N.textSel.style("display","inline"),N.parent&&_.each(N.parent.children,function(e){e.data.name!==N.data.name&&e.textSel.style("display","inline")}))}),Y.style("font-size",function(e){return c.noPrefixes?i.A.Text.calcFontSize(e.noPrefixName,e.r*n):i.A.Text.calcFontSize(e.data.name,e.r*n)}).text(function(e){return c.noPrefixes?i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r*n/3)})}function M(e){let t=2*e+20;return 2*e/t<.3&&(t=2*e+2),t}function W(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display=""):(e.textHidden=!0,this.style.display="none")}function Z(e,t){if(d(function(){y.showExternalElements=e.data.name===p}),N===e)return;if(e.data.id&&l.history.replaceState({id:e.data.id},"classHierarchyPage"+e.data.id,"hierarchy#"+e.data.id),!e.children&&(e=e.parent,N===e))return;if(t&&(L(),s.selectAll(".selected").classed("selected",!1)),N.parent){let e=N;for(;e;)e.isInFocusTransitive=!1,e=e.parent}let n=e;for(;n;)n.isInFocusTransitive=!!n.children,n=n.parent;N=e,2*N.r/(2*N.r+20)<.3||y.currentSliderValue>y.currentBrowserLimit?(V([N.x,N.y,M(N.r)]),Y.each(function(e){W.call(this,e)})):s.transition().duration(f).tween("zoom",function(e){const t=s.interpolateZoom(g,[N.x,N.y,M(N.r)]);return function(e){V(t(e))}}).selectAll("text").each(W)}V([N.x,N.y,M(N.r)],h),b=y.$on("rootFocus",function(){l.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),k(S)}),F=y.$on("classSearch",function(e){k(e)})}function U(){const t=y.classHierarchyData.classCount;let n=g.get(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,g.set(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}let Y,B,V,M;window.addEventListener("resize",U),window.addEventListener("beforeunload",function e(){window.removeEventListener("resize",U),window.removeEventListener("beforeunload",e)}),y.$watch("classHierarchyData",function(){Y&&Y(),B&&B(),V&&V(),M&&M();let e=w();if(y.classHierarchyData.classCount){U();const t=structuredClone(y.classHierarchyData);const n=s.hierarchy(t).descendants().sort(function(e,t){return e.data.sortingRank>t.data.sortingRank?-1:e.data.sortingRank<t.data.sortingRank||e.data.depth>t.data.depth?1:e.data.depth<t.data.depth?-1:0});let a,r;function i(e,t){const n={keepPrevState:!0,noPrefixes:w()};r=n.noPrefixes,O(a||e,n,N,!0),d(()=>{g.set(x.CLASS_HIERARCHY_SWITCH_PREFIXES,t),D(),A=!1},70)}function c(e,n,s){if(!e)return;g.set(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),a={name:p,children:[]};const c=new Set;for(let t=1;t<=e;t++)c.add(n[t].data.id),n[t].parent===n[0]&&a.children.push(n[t].data);(function e(t){if(!t.children)return;const n=[];for(const e of t.children)c.has(e.id)&&n.push($.extend({},e));t.children=n;for(const n of t.children)e(n)})(a),s?(r=angular.isUndefined(r)?w():r,O(a,{noPrefixes:r})):i(t)}const o=g.get(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(o)c(o,n);else{const h={doFade:!0,keepPrevState:!0,noPrefixes:w()};O(t,h),D()}let l;Y=y.$watch("hidePrefixes",function(n){angular.isUndefined(n)||e?e=void 0:d(function(){A=!0,function(e){angular.isUndefined(e)||g.set(x.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),i(t,!0)},50)},!0),B=y.$watch("currentSliderValue",function(e){c(e,n,!0)},!0),M=y.$on("onEnterKeypressSearchAction",function(e){l&&k(l)}),V=y.$on("searchedClass",function(e,t){l=z[t.name],l&&k(l)})}},!0)}(y)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",l),l.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]}};
2
- //# sourceMappingURL=99448.2a87f387a8062617d893.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"99448.2a87f387a8062617d893.bundle.js","mappings":"mJAAA,IAAIA,EAAgBA,GAAiB,CAAC,EAEtCA,EAAcC,YA4EH,CACHC,gBAxEJ,SAASA,EAAgBC,EAAMC,GAC3B,GAAID,EAAKE,SAAU,CACf,IAAK,IAAIC,EAAI,EAAGA,EAAIH,EAAKE,SAASE,OAAQD,IAEtCJ,EADYC,EAAKE,SAASC,IAI9B,GAA6B,IAAzBH,EAAKE,SAASE,OAAc,CAC5B,IAAIC,EAA8B,IAAZL,EAAKM,KACvBL,IACAI,EAA0C,GAAxBL,EAAKE,SAAS,GAAGI,MAEvCN,EAAKE,SAASK,KAAK,CACfC,KAAM,cAAeF,KAAMD,GAGnC,CACJ,CACJ,EAuDII,mBArDJ,SAASA,EAAmBC,GACxB,IAAK,IAAIP,EAAIO,EAAMN,OAAS,EAAGD,GAAK,EAAGA,IAAK,CACxC,IAAIH,EAAOU,EAAMP,GAEM,gBAAnBH,EAAKW,KAAKH,KACVE,EAAME,OAAOT,EAAG,GAEZH,EAAKE,UAC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lO,GAEpCA,EAAwBmO,QAAU,CAAC,aAAc,YAAa,uBAAwB,UAAW,WAAY,gBAAiB,SAAU,gBAAiB,gBAAiB,sBAAuB,SAAU,a","sources":["webpack://root-config/./packages/legacy-workbench/src/js/lib/common/circle-packing.js","webpack://root-config/./packages/legacy-workbench/src/js/lib/common/svg-export.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/graphexplore/directives/rdf-class-hierarchy.directive.js"],"sourcesContent":["var CirclePacking = CirclePacking || {};\n\nCirclePacking.SingleChild = function () {\n /*\n Functions that enable single child circles to display properly, see\n http://stackoverflow.com/questions/22307486/d3-js-packed-circle-layout-how-to-adjust-child-radius\n */\n function addPlaceholders(node, first) {\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n var child = node.children[i];\n addPlaceholders(child);\n }\n\n if (node.children.length === 1) {\n var placeholderSize = node.size * 1.2;\n if (first) {\n placeholderSize = node.children[0].size * 0.1;\n }\n node.children.push({\n name: 'placeholder', size: placeholderSize,\n // children: []\n });\n }\n }\n }\n\n function removePlaceholders(nodes) {\n for (var i = nodes.length - 1; i >= 0; i--) {\n var node = nodes[i];\n\n if (node.data.name === 'placeholder') {\n nodes.splice(i, 1);\n } else {\n if (node.children) {\n removePlaceholders(node.children);\n }\n }\n }\n }\n\n function centerNodes(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.children) {\n if (node.children.length === 1) {\n var offset = node.x - node.children[0].x;\n node.children[0].x += offset;\n reposition(node.children[0], offset);\n }\n }\n }\n\n function reposition(node, offset) {\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n node.children[i].x += offset;\n reposition(node.children[i], offset);\n }\n }\n }\n }\n\n function makePositionsRelativeToZero(nodes) {\n //use this to have vis centered at 0,0,0 (easier for positioning)\n var offsetX = nodes[0].x;\n var offsetY = nodes[0].y;\n\n for (var i = 0; i < nodes.length; i++) {\n\n var node = nodes[i];\n\n node.x -= offsetX;\n node.y -= offsetY;\n }\n }\n\n return {\n addPlaceholders: addPlaceholders,\n removePlaceholders: removePlaceholders,\n centerNodes: centerNodes,\n makePositionsRelativeToZero: makePositionsRelativeToZero\n }\n}();\n\nexport default CirclePacking;\n","import 'lib/d3.patch.js'\nimport {selectAll} from 'd3';\n\nconst d3 = {selectAll};\nvar SVG = SVG || {};\n\nSVG.Export = function () {\n function getCSSRules(cssSourceFilePath) {\n const cssRules = $('link[href=\"' + cssSourceFilePath + '\"]')[0].sheet.rules;\n let cssStr = \"\";\n _.each(cssRules, function (value) {\n cssStr += value.cssText;\n });\n return cssStr;\n }\n\n function generateBase64ImageSource(svgSelectorClass) {\n if (!svgSelectorClass) {\n svgSelectorClass = \"svg\";\n }\n // add needed xml namespace\n const exportSvg = d3.selectAll(svgSelectorClass)\n .attr(\"version\", \"1.1\")\n .attr(\"xmlns\", \"http://www.w3.org/2000/svg\")\n .node().parentNode.innerHTML;\n\n // convert selected html to base64\n return \"data:image/svg+xml;charset=utf-8;base64,\" + btoa(unescape(encodeURIComponent(exportSvg)));\n }\n\n return {\n getCSSRules: getCSSRules,\n generateBase64ImageSource: generateBase64ImageSource\n };\n}();\n\nexport default SVG;\n","/* eslint-disable no-invalid-this */\nimport d3tip from 'lib/d3-tip/d3-tip-patch';\nimport CirclePacking from 'lib/common/circle-packing';\nimport D3 from 'lib/common/d3-utils';\nimport * as d3 from 'd3';\nimport SVG from 'lib/common/svg-export';\nimport 'angular/utils/local-storage-adapter';\nimport {service, LicenseContextService} from '@ontotext/workbench-api';\n\nangular\n .module('graphdb.framework.graphexplore.directives.class', [\n 'graphdb.framework.graphexplore.controllers.class',\n 'graphdb.framework.utils.localstorageadapter',\n ])\n .constant(\"ZOOM_DURATION\", 500)\n .constant(\"ROOT_OBJ_NAME\", \"RDF Class Hierarchy\")\n .directive('rdfClassHierarchy', classHierarchyDirective);\n\nclassHierarchyDirective.$inject = ['$rootScope', '$location', 'GraphDataRestService', '$window', '$timeout', '$repositories', 'toastr', 'ZOOM_DURATION', 'ROOT_OBJ_NAME', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction classHierarchyDirective($rootScope, $location, GraphDataRestService, $window, $timeout, $repositories, toastr, ZOOM_DURATION, ROOT_OBJ_NAME, LocalStorageAdapter, LSKeys, $translate) {\n return {\n restrict: 'AE',\n template: '<div id=\"classChart\"></div>',\n scope: {\n classHierarchyData: '=',\n flattenedClassNames: '=',\n selectedClass: '=',\n currentSliderValue: '=',\n showClassInfoPanel: '=',\n showExternalElements: '=',\n hidePrefixes: '=',\n currentBrowserLimit: '=',\n },\n link: linkFunc,\n };\n\n function linkFunc(scope, element, attrs) {\n renderCirclePacking(scope, element);\n }\n\n function renderCirclePacking(scope, element) {\n /**\n * A boolean flag that determines whether the opening of the side info panel\n * should be suppressed when focusing on the chart while a class is selected.\n */\n let suppressPanelOpen = false;\n\n const width = 800;\n const height = 800;\n const diameter = height;\n const margin = 20;\n let tip;\n let rootHierarchy;\n\n const packLayout = d3.pack()\n .size([diameter - margin, diameter - margin]);\n\n const color = d3.scaleLinear()\n .domain([0, 4])\n .range([\"hsl(19, 70%, 90%)\", \"hsl(19, 70%, 50%)\"])\n .interpolate(d3.interpolateHcl);\n\n const svg = d3.select(\"#classChart\")\n .insert(\"svg:svg\", \"h2\")\n .attr(\"viewBox\", \"0 0 \" + width + \" \" + height)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\")\n .on(\"dblclick.zoom\", null);\n\n function appendMainGroup() {\n return svg.append(\"svg:g\")\n .attrs({\n id: \"main-group\",\n transform: \"translate(\" + width / 2 + \",\" + height / 2 + \")\",\n });\n }\n\n function savePrefixesState(hidePrefixes) {\n if (!angular.isUndefined(hidePrefixes)) {\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_HIDE_PREFIXES, hidePrefixes);\n }\n }\n\n function getPrefixesState() {\n return LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_HIDE_PREFIXES) === \"true\";\n }\n\n /*\n * Prepares SVG document image export by adding xml namespaces and\n * additional style information\n */\n function prepareForSVGImageExport() {\n // get css rules for the diagram\n const cssRules = SVG.Export.getCSSRules(\"css/rdf-class-hierarchy-labels.css?v=3.3.2\");\n // inline css rules in a defs tag\n d3.selectAll(\"#main-group\")\n .append(\"defs\");\n $(\"defs\").append('<style type=\"text/css\"><![CDATA[' + cssRules + ']]></style>');\n\n // switch opacity to visible\n d3.selectAll(\"g\")\n .style(\"opacity\", 1);\n\n // convert selected html to base64\n const imgSrc = SVG.Export.generateBase64ImageSource(\"#classChart svg\");\n\n // set the binary image and a name for the downloadable file on the export button\n d3.select(this).attrs({\n href: imgSrc,\n download: \"class-hierarchy-\" + $repositories.getActiveRepository() + \".svg\",\n });\n }\n\n scope.hidePrefixes = getPrefixesState();\n\n let g = appendMainGroup();\n\n function fetchClassHierarchy() {\n $rootScope.loader = true;\n $rootScope.hierarchyError = false;\n const selGraphFromCache = LocalStorageAdapter.get(`classHierarchy-selectedGraph-${$repositories.getActiveRepository()}`);\n GraphDataRestService.getClassHierarchyData(selGraphFromCache !== null ? selGraphFromCache.contextID.uri : \"\")\n .success(function(response, status) {\n $rootScope.loader = false;\n if (status === 207) {\n toastr.warning(\n $translate.instant('graphexplore.update.diagram'),\n $translate.instant('graphexplore.repository.data.changed'),\n );\n }\n scope.classHierarchyData = response;\n d3.select(\"#download-svg\").on(\"mouseover\", prepareForSVGImageExport);\n })\n .error(function(response) {\n $rootScope.loader = false;\n $rootScope.hierarchyError = getError(response);\n toastr.error(\n $translate.instant('graphexplore.error.request.failed', {\n name: ROOT_OBJ_NAME,\n error: getError(response),\n }),\n );\n });\n }\n\n const hasData = !!scope.classHierarchyData?.classCount;\n const canUseRepo = $repositories.getActiveRepository() && !$repositories.isSystemRepository();\n\n service(LicenseContextService).onLicenseChanged((license) => {\n if (license?.valid && !hasData && canUseRepo) {\n fetchClassHierarchy();\n }\n });\n\n let autoZoomToPreviousState;\n let doFocus;\n\n let focus;\n let rootFocusEvent;\n let classSearchEvent;\n const flattenedClassData = {};\n\n function drawDiagram(root, config, newFocus, switchPrefixes) {\n if (rootFocusEvent) rootFocusEvent();\n if (classSearchEvent) classSearchEvent();\n // remove old group tag containing the diagram\n d3.selectAll(\"#main-group\").remove();\n\n // append new empty group tag in order to rerender new diagram\n g = appendMainGroup();\n\n // fix for single child classes\n CirclePacking.SingleChild.addPlaceholders(root, true);\n\n rootHierarchy = d3.hierarchy(root);\n rootHierarchy.sum(function(d) {\n return d.size;\n });\n focus = newFocus ? newFocus : rootHierarchy;\n\n packLayout(rootHierarchy);\n\n const nodes = rootHierarchy.descendants();\n let view;\n\n focus.isInFocusTransitive = true;\n\n // fixes for single child classes\n CirclePacking.SingleChild.removePlaceholders(nodes);\n CirclePacking.SingleChild.centerNodes(nodes);\n CirclePacking.SingleChild.makePositionsRelativeToZero(nodes);\n\n if (!tip) {\n tip = d3tip()\n .attr('class', 'd3-tip')\n .customPosition(function(d, event) {\n return {\n top: 'inherit',\n bottom: ($window.innerHeight - event.clientY) + 'px',\n right: ($window.innerWidth - event.clientX) + 'px',\n };\n })\n .html(function(d) {\n return d.data.name;\n });\n svg.call(tip);\n }\n\n const circleGroup = g.selectAll(\"circle\")\n .data(nodes)\n .enter().append(\"g\");\n\n if (config.doFade) {\n circleGroup.each(function(d) {\n D3.Transition.fadeIn(d3.select(this), 550);\n });\n }\n\n let flattenedClassNames = [];\n\n const circle = circleGroup\n .append(\"circle\")\n .attr(\"class\", function(d) {\n return d.data.role;\n })\n .attr(\"data-test\", function(d) {\n return \"class-\" + d.data.name;\n })\n .attr(\"guide-selector\", function(d) {\n return \"class-\" + d.data.name;\n })\n .style(\"fill\", function(d) {\n //return colors[d.depth % 6];\n return d.children ? color(d.depth) : \"#E0D0D0\";\n })\n .each(function(d) {\n d.circle = d3.select(this);\n if (d.data.name !== ROOT_OBJ_NAME) {\n const key = d.data.name;\n flattenedClassNames.push({name: key});\n flattenedClassData[[key]] = d;\n\n d.circle.classed(\"rdf-class\", true);\n d.circle.on('mouseover', function(event) {\n if (config.noPrefixes) {\n tip.show(d, event);\n } else if (!d.textHidden) {\n tip.hide(d);\n } else {\n tip.show(d, event);\n }\n });\n d.circle.on('mouseout', tip.hide);\n }\n })\n // custom event used when user is following a guide\n .on(\"gdb-focus\", (event, d) => doFocus(d))\n .on(\"gdb-zoom\", (event, d) => zoom(d));\n\n\n if (flattenedClassNames) {\n flattenedClassNames = _.uniqBy(flattenedClassNames, 'name');\n scope.flattenedClassNames = flattenedClassNames;\n }\n\n let selectedClass;\n\n function getCurrentClassDataAndMarkSelected(obj) {\n d3.selectAll(\".selected\").classed(\"selected\", obj.selected = false);\n obj.circle.classed(\"selected\", obj.selected = true);\n selectedClass = obj;\n }\n\n function showClassInfoPanel() {\n scope.selectedClass = selectedClass;\n scope.showClassInfoPanel = true;\n }\n\n function closeClassInfoPanel() {\n scope.showClassInfoPanel = false;\n }\n\n function goToDomainRangeGraphView() {\n $rootScope.$broadcast('goToDomainRangeGraphView', selectedClass, focus);\n }\n\n const clickCancel = D3.Click.delayDblClick();\n d3.selectAll(\".parent, .topLevelParent, .child, .root\")\n .call(clickCancel);\n\n doFocus = function(obj) {\n zoom(obj);\n\n if (obj.data.name === ROOT_OBJ_NAME) {\n closeClassInfoPanel();\n d3.selectAll(\".selected\").classed(\"selected\", false);\n } else {\n getCurrentClassDataAndMarkSelected(obj);\n if (!suppressPanelOpen) {\n showClassInfoPanel();\n }\n\n // FIXME: is it ok to bind this event handler every time and not just once?\n scope.$on('sidePanelClosed', function(event) {\n d3.selectAll(\".selected\").classed(\"selected\", obj.selected = false);\n });\n }\n\n\n //do not stop event propagation here\n };\n\n clickCancel.on(\"click\", function(event, obj) {\n // add clicked class to browser history\n if (obj.data.id) {\n $window.history.pushState({id: obj.data.id}, \"classHierarchyPage\" + obj.data.id, \"hierarchy#\" + obj.data.id);\n }\n\n //hide current d3-tip tooltip\n tip.hide();\n\n doFocus(obj);\n });\n\n clickCancel.on(\"dblclick\", function(event, obj) {\n if (obj === root) {\n return;\n }\n // hide current d3-tip tooltip in order not to appear in the next view\n tip.hide();\n getCurrentClassDataAndMarkSelected(obj);\n goToDomainRangeGraphView();\n\n event.stopPropagation();\n });\n\n let lastTimeWheel = 0;\n svg.on('wheel', function(event) {\n // hide current d3-tip tooltip\n tip.hide();\n\n event.preventDefault();\n event.stopPropagation();\n\n // at least 100ms must have passed since last time we updated\n const now = Date.now();\n if (now - lastTimeWheel > 100) {\n lastTimeWheel = now;\n } else {\n return;\n }\n\n let direction = '';\n if (event.deltaY <= -1) {\n direction = 'in';\n } else if (event.deltaY >= 1) {\n direction = 'out';\n }\n\n let obj = event.target.__data__;\n\n if (!obj) {\n // scroll outside the big circle\n obj = focus;\n }\n\n if (direction === 'in') {\n // determine object to zoom to\n\n if (obj !== focus) {\n // consider the object on which the scroll event occurred\n // and find the furthest parent that has no focused children\n while (obj.parent && !obj.parent.isInFocusTransitive) {\n obj = obj.parent;\n }\n if (obj.depth < focus.depth) {\n // however if that parent is of lower depth than the focus we ignore it\n obj = focus;\n }\n }\n\n if (obj === focus && obj.children) {\n // if object is in focus and it has children we zoom to its biggest child\n // TODO: sort children on backend\n let newobj = obj.children[0];\n for (let i = 1; i < obj.children.length; i++) {\n if (obj.children[i].sortingRank > newobj.sortingRank) {\n newobj = obj.children[i];\n }\n }\n if (newobj.children) {\n // Use the child only if it has children\n obj = newobj;\n }\n } else if (!obj.children) {\n // If node has no children use its parent instead\n obj = obj.parent;\n }\n\n zoom(obj, true);\n } else if (direction === 'out') {\n // zooming out simply goes one parent up\n obj = focus.parent;\n if (obj) {\n zoom(obj, true);\n }\n }\n\n if (focus.data.name === ROOT_OBJ_NAME) {\n $window.history.replaceState({id: 1}, \"classHierarchyPage1\", \"hierarchy#1\");\n }\n\n // redraw slider on zoom out\n sendSliderData();\n });\n\n const text = g.selectAll(\"text\")\n .data(nodes)\n .enter().append(\"text\")\n .attr(\"class\", function(d) {\n return d.children && d.children.length ? \"label\" : \"label child-label\";\n })\n .each(function(d) {\n d.textSel = d3.select(this);\n });\n\n function trimPrefixes(d) {\n const idx = d.data.name.indexOf(\":\");\n const absUriIdx = d.data.name.indexOf(\"http://\");\n if (absUriIdx > -1) {\n // if we have no prefix available ignore\n d.noPrefixName = d.data.name;\n } else if (idx > -1) {\n d.noPrefixName = d.data.name.substring(idx + 1);\n }\n }\n\n if (config.noPrefixes) {\n text.each(trimPrefixes);\n text\n .style(\"font-size\", function(d) {\n return D3.Text.calcFontSize(d.noPrefixName, d.r);\n })\n .text(function(d) {\n return D3.Text.getTextWithElipsisIfNeeded(d.noPrefixName, d.r / 3);\n });\n } else {\n text\n .style(\"font-size\", function(d) {\n return D3.Text.calcFontSize(d.data.name, d.r);\n })\n .text(function(d) {\n return D3.Text.getTextWithElipsisIfNeeded(d.data.name, d.r / 3);\n });\n }\n\n // TODO: make this use the full version (same as zoom)\n text.style(\"display\", function(d) {\n if (d.parent && d.parent.data === focus.data) {\n d.textHidden = this.textContent.indexOf(\"...\") + 3 === this.textContent.length;\n return null;\n } else {\n d.textHidden = true;\n return \"none\";\n }\n });\n\n if (config.doFade && !config.keepPrevState) {\n text.each(function(d) {\n D3.Transition.fadeIn(d3.select(this), 550);\n });\n }\n\n autoZoomToPreviousState = function() {\n function focusOnCurrentClass(focusHistoryId) {\n if (focusHistoryId) {\n circle.each(function(d) {\n if (+focusHistoryId === d.data.id) {\n doFocus(d);\n }\n });\n }\n }\n\n const focusHistoryId = $location.hash();\n\n $window.onpopstate = function(event) {\n if (event.state) {\n const focusHistoryId = event.state.id;\n focusOnCurrentClass(focusHistoryId);\n }\n };\n\n focusOnCurrentClass(focusHistoryId);\n };\n\n const node = g.selectAll(\"circle, text\");\n\n function zoomTo(v, switchPrefixes) {\n const k = diameter / v[2];\n view = v;\n\n node.attr(\"transform\", function(d) {\n return \"translate(\" + (d.x - v[0]) * k + \",\" + (d.y - v[1]) * k + \")\";\n });\n\n circle.attr(\"r\", function(d) {\n return d.r * k;\n });\n\n function switchPrefixesInPlace(d) {\n // if uris match with the topLevelParentUri of the focused element\n // or your focus is a top level parent hide its label and if it is not\n // a child element show all of its child labels. If it is a child element\n // only show its label.\n if (d.data.fullName === focus.data.topLevelParentUri || focus.data.topLevelParentUri === ROOT_OBJ_NAME) {\n d.textSel.style(\"display\", \"none\");\n if (focus.children && focus.children.length) {\n _.each(focus.children, function(c) {\n c.textSel.style(\"display\", \"inline\");\n });\n } else {\n focus.textSel.style(\"display\", \"inline\");\n }\n\n // in order to show prefixes of siblings check if the focused\n // element has a parent and show all of its children except\n // for the name of the focused element because you need to see\n // its children\n if (focus.parent) {\n _.each(focus.parent.children, function(c) {\n if (c.data.name !== focus.data.name) {\n c.textSel.style(\"display\", \"inline\");\n }\n });\n }\n }\n }\n\n if (switchPrefixes) {\n text.each(switchPrefixesInPlace);\n }\n\n text\n .style(\"font-size\", function(d) {\n if (config.noPrefixes) {\n return D3.Text.calcFontSize(d.noPrefixName, d.r * k);\n }\n return D3.Text.calcFontSize(d.data.name, d.r * k);\n })\n .text(function(d) {\n if (config.noPrefixes) {\n return D3.Text.getTextWithElipsisIfNeeded(d.noPrefixName, d.r * k / 3);\n }\n return D3.Text.getTextWithElipsisIfNeeded(d.data.name, d.r * k / 3);\n });\n }\n\n\n function adjustRadius(r) {\n let newr = r * 2 + margin;\n if (r * 2 / newr < 0.3) {\n // for very small circles we need to adjust\n newr = r * 2 + 2;\n }\n return newr;\n }\n\n zoomTo([focus.x, focus.y, adjustRadius(focus.r)], switchPrefixes);\n\n function textUpdate(d) {\n if (d.isInFocusTransitive || !(d.parent && d.parent.isInFocusTransitive)) {\n // hide labels of classes that are in focus (including children) OR whose parents aren't in focus\n d.textHidden = true;\n this.style.display = \"none\";\n } else {\n // show all other labels\n d.textHidden = this.textContent.indexOf(\"...\") + 3 === this.textContent.length;\n this.style.display = \"\";\n }\n }\n\n function zoom(d, shouldClosePanel) {\n // use empty timeout to force the following code to be executed on the next $digest cycle\n // in order to avoid '$digest in progress' error\n $timeout(function() {\n scope.showExternalElements = (d.data.name === ROOT_OBJ_NAME);\n });\n\n if (focus === d) {\n // Node is already zoomed to\n // Important to return before we modify the history, otherwise we choke the browser\n return;\n }\n\n if (d.data.id) {\n $window.history.replaceState({id: d.data.id}, \"classHierarchyPage\" + d.data.id, \"hierarchy#\" + d.data.id);\n }\n\n if (!d.children) {\n // No children - zoom to parent instead\n d = d.parent;\n if (focus === d) {\n // Parent is already zoomed to\n return;\n }\n }\n\n if (shouldClosePanel) {\n closeClassInfoPanel();\n d3.selectAll(\".selected\").classed(\"selected\", false);\n }\n\n if (focus.parent) {\n let p = focus;\n while (p) {\n p.isInFocusTransitive = false;\n p = p.parent;\n }\n }\n\n let p = d;\n while (p) {\n p.isInFocusTransitive = !!p.children;\n p = p.parent;\n }\n\n focus = d;\n\n const isVerySmallCircle = focus.r * 2 / (focus.r * 2 + margin) < 0.3;\n\n if (isVerySmallCircle || scope.currentSliderValue > scope.currentBrowserLimit) {\n // no fancy animation for slower browsers if above the limit or if zooming to a very small circle\n zoomTo([focus.x, focus.y, adjustRadius(focus.r)]);\n\n text.each(function(d) {\n textUpdate.call(this, d);\n });\n } else {\n // the fancy version for faster browsers\n const transition = d3.transition()\n .duration(ZOOM_DURATION)\n .tween(\"zoom\", function(d) {\n const i = d3.interpolateZoom(view, [focus.x, focus.y, adjustRadius(focus.r)]);\n return function(t) {\n zoomTo(i(t));\n };\n });\n\n transition.selectAll(\"text\")\n // Experimental: hide texts to be hidden on \"start\", show texts to be shown on \"end\"\n .each(textUpdate);\n }\n }\n\n rootFocusEvent = scope.$on('rootFocus', function() {\n $window.history.pushState({id: 1}, \"classHierarchyPage1\", \"hierarchy#1\");\n doFocus(rootHierarchy);\n });\n\n classSearchEvent = scope.$on('classSearch', function(selectedClass) {\n doFocus(selectedClass);\n });\n }\n\n function sendSliderData() {\n const currentClassCount = scope.classHierarchyData.classCount;\n let currentSliderValue = LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);\n\n if (!currentSliderValue || currentSliderValue > currentClassCount) {\n currentSliderValue = currentClassCount;\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE, currentSliderValue);\n }\n\n $rootScope.$broadcast(\"classCount\", currentClassCount, currentSliderValue);\n }\n\n window.addEventListener('resize', sendSliderData);\n\n window.addEventListener('beforeunload', removeResizeListener);\n\n function removeResizeListener() {\n window.removeEventListener('resize', sendSliderData);\n window.removeEventListener('beforeunload', removeResizeListener);\n }\n\n let prefixesWatch;\n let currentClassCountWatch;\n let searchedClassBroadcast;\n let onEnterClassSearchBroadcast;\n\n scope.$watch('classHierarchyData', function() {\n // when data changes unregister watchers by calling them\n if (prefixesWatch) prefixesWatch();\n if (currentClassCountWatch) currentClassCountWatch();\n if (searchedClassBroadcast) searchedClassBroadcast();\n if (onEnterClassSearchBroadcast) onEnterClassSearchBroadcast();\n\n // get initial state of prefixes (hidden or not) when changing repositories\n // in order to avoid triggering an unwanted prefixes watch\n let initialPrefixesState = getPrefixesState();\n\n if (scope.classHierarchyData.classCount) {\n sendSliderData();\n\n const rootData = structuredClone(scope.classHierarchyData);\n\n const root = d3.hierarchy(rootData);\n\n function sortRoot(root) {\n // add all classes to a flat array, add parent information\n // and sort according to instancesCount DESC, depth ASC\n\n return root.descendants()\n .sort(function(a, b) {\n if (a.data.sortingRank > b.data.sortingRank) {\n return -1;\n } else if (a.data.sortingRank < b.data.sortingRank) {\n return 1;\n } else if (a.data.depth > b.data.depth) {\n return 1;\n } else if (a.data.depth < b.data.depth) {\n return -1;\n } else {\n return 0;\n }\n });\n }\n\n const sortedChildren = sortRoot(root);\n\n // we start with an empty new rootData\n let filteredRootData;\n let noPrefixesGlobal;\n\n\n function restoreDiagramState(currentRootData, switchPrefixes) {\n const prefixesConfig = {\n keepPrevState: true,\n noPrefixes: getPrefixesState(),\n };\n\n // get noPrefixes flag from drawDiagram configuration params\n noPrefixesGlobal = prefixesConfig.noPrefixes;\n\n if (filteredRootData) {\n drawDiagram(filteredRootData, prefixesConfig, focus, true);\n } else {\n drawDiagram(currentRootData, prefixesConfig, focus, true);\n }\n\n $timeout(() => {\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_SWITCH_PREFIXES, switchPrefixes);\n autoZoomToPreviousState();\n // Need to set this to false to enable the info panel to work when selecting a class.\n // The panel opening will be suppressed only when the prefixes are toggled.\n suppressPanelOpen = false;\n }, 70);\n }\n\n function redrawFilteredDiagram(currentSliderValue, sortedChildrenArray, useSlider) {\n if (!currentSliderValue) {\n return;\n }\n\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE, currentSliderValue);\n\n filteredRootData = {\n name: ROOT_OBJ_NAME,\n children: [],\n };\n\n // walk through the given count of (sortedChildrenArray) classes\n // - record the id of each class we've seen\n // - add the rootData level classes to the new rootData\n const addedIds = new Set();\n for (let k = 1; k <= currentSliderValue; k++) {\n addedIds.add(sortedChildrenArray[k].data.id);\n if (sortedChildrenArray[k].parent === sortedChildrenArray[0]) { // i.e. the parent is the \"class hierarchy\"\n filteredRootData.children.push(sortedChildrenArray[k].data);\n }\n }\n\n // walk through all the classes in the new rootData and only keep those that have an \"added id\"\n // we create separate copies of the arrays in order not to contaminate the original data\n // we also copy each class's object ($.extend ...) for the same reason\n function fixChildren(node) {\n if (!node.children) {\n return;\n }\n const newChildren = [];\n for (const child of node.children) {\n if (addedIds.has(child.id)) {\n newChildren.push($.extend({}, child));\n }\n }\n node.children = newChildren;\n for (const child of node.children) {\n fixChildren(child);\n }\n }\n\n fixChildren(filteredRootData);\n\n if (useSlider) {\n // redraw diagram when slider value changes and persist current state\n // in local storage\n noPrefixesGlobal = angular.isUndefined(noPrefixesGlobal) ? getPrefixesState() : noPrefixesGlobal;\n const redrawConfig = {\n noPrefixes: noPrefixesGlobal,\n };\n drawDiagram(filteredRootData, redrawConfig);\n } else {\n // if the user returns to the diagram with back browser button\n // read the saved state (show/hide prefixes, current slider value)\n // from local storage and render the diagram according to the saved metrics\n restoreDiagramState(rootData);\n }\n }\n\n const currentSliderValue = LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);\n if (currentSliderValue) {\n redrawFilteredDiagram(currentSliderValue, sortedChildren);\n } else {\n const basicConfig = {\n doFade: true,\n keepPrevState: true,\n noPrefixes: getPrefixesState(),\n };\n drawDiagram(rootData, basicConfig);\n autoZoomToPreviousState();\n }\n\n prefixesWatch = scope.$watch('hidePrefixes', function(hidePrefixes) {\n if (angular.isUndefined(hidePrefixes) || initialPrefixesState) {\n initialPrefixesState = undefined;\n return;\n }\n // if digest overflows a possible fix might be wrapping this in $timeout\n $timeout(function() {\n suppressPanelOpen = true;\n savePrefixesState(hidePrefixes);\n restoreDiagramState(rootData, true);\n }, 50);\n }, true);\n\n currentClassCountWatch = scope.$watch('currentSliderValue', function(currentSliderValue) {\n redrawFilteredDiagram(currentSliderValue, sortedChildren, true);\n }, true);\n\n // we handle this event for the cases where we already have searched for a given class and\n // hit enter again on the already selected class in order again react and zoom to it again\n // if we are not at the moment\n let currentSearchedClass;\n onEnterClassSearchBroadcast = scope.$on('onEnterKeypressSearchAction', function(event) {\n if (currentSearchedClass) {\n doFocus(currentSearchedClass);\n }\n });\n\n searchedClassBroadcast = scope.$on('searchedClass', function(event, searchedClass) {\n currentSearchedClass = flattenedClassData[searchedClass.name];\n if (currentSearchedClass) {\n doFocus(currentSearchedClass);\n }\n });\n }\n }, true);\n }\n}\n"],"names":["CirclePacking","SingleChild","addPlaceholders","node","first","children","i","length","placeholderSize","size","push","name","removePlaceholders","nodes","data","splice","centerNodes","offset","x","reposition","makePositionsRelativeToZero","offsetX","offsetY","y","d3","selectAll","SVG","Export","getCSSRules","cssSourceFilePath","cssRules","$","sheet","rules","cssStr","_","each","value","cssText","generateBase64ImageSource","svgSelectorClass","exportSvg","attr","parentNode","innerHTML","btoa","unescape","encodeURIComponent","classHierarchyDirective","$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate","restrict","template","scope","classHierarchyData","flattenedClassNames","selectedClass","currentSliderValue","showClassInfoPanel","showExternalElements","hidePrefixes","currentBrowserLimit","link","element","attrs","suppressPanelOpen","tip","rootHierarchy","packLayout","diameter","color","domain","range","interpolate","svg","insert","on","appendMainGroup","append","id","transform","getPrefixesState","get","CLASS_HIERARCHY_HIDE_PREFIXES","prepareForSVGImageExport","style","imgSrc","this","href","download","getActiveRepository","g","hasData","classCount","canUseRepo","isSystemRepository","autoZoomToPreviousState","doFocus","focus","rootFocusEvent","classSearchEvent","service","LicenseContextService","onLicenseChanged","license","valid","loader","hierarchyError","selGraphFromCache","getClassHierarchyData","contextID","uri","success","response","status","warning","instant","error","getError","fetchClassHierarchy","flattenedClassData","drawDiagram","root","config","newFocus","switchPrefixes","remove","sum","d","descendants","view","isInFocusTransitive","d3tip","customPosition","event","top","bottom","innerHeight","clientY","right","innerWidth","clientX","html","call","circleGroup","enter","doFade","D3","Transition","fadeIn","circle","role","depth","key","classed","noPrefixes","textHidden","show","hide","zoom","getCurrentClassDataAndMarkSelected","obj","selected","closeClassInfoPanel","uniqBy","clickCancel","Click","delayDblClick","$on","history","pushState","$broadcast","stopPropagation","lastTimeWheel","preventDefault","now","Date","direction","deltaY","target","__data__","parent","newobj","sortingRank","replaceState","sendSliderData","text","textSel","idx","indexOf","noPrefixName","substring","Text","calcFontSize","r","getTextWithElipsisIfNeeded","textContent","keepPrevState","focusOnCurrentClass","focusHistoryId","hash","onpopstate","state","zoomTo","v","k","fullName","topLevelParentUri","c","adjustRadius","newr","textUpdate","display","shouldClosePanel","p","duration","tween","t","currentClassCount","CLASS_HIERARCHY_CURRENT_SLIDER_VALUE","set","prefixesWatch","currentClassCountWatch","searchedClassBroadcast","onEnterClassSearchBroadcast","window","addEventListener","removeResizeListener","removeEventListener","$watch","initialPrefixesState","rootData","structuredClone","sortedChildren","sort","a","b","filteredRootData","noPrefixesGlobal","restoreDiagramState","currentRootData","prefixesConfig","CLASS_HIERARCHY_SWITCH_PREFIXES","redrawFilteredDiagram","sortedChildrenArray","useSlider","addedIds","Set","add","fixChildren","newChildren","child","has","extend","angular","isUndefined","basicConfig","currentSearchedClass","undefined","savePrefixesState","searchedClass","renderCirclePacking","module","constant","directive","$inject"],"ignoreList":[],"sourceRoot":""}