graphdb-workbench 2.2.2-TR2 → 2.3.0-TR1

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 (312) hide show
  1. package/dist/10.2c7c4caeb5771a2a98d1.bundle.js +2 -0
  2. package/dist/10.2c7c4caeb5771a2a98d1.bundle.js.map +1 -0
  3. package/dist/102.850f372bb910e3a64905.bundle.js +2 -0
  4. package/dist/102.850f372bb910e3a64905.bundle.js.map +1 -0
  5. package/dist/104.2e04965e98d05ada03fd.bundle.js +2 -0
  6. package/dist/104.2e04965e98d05ada03fd.bundle.js.map +1 -0
  7. package/dist/{107.37693ea0237c39fda863.bundle.js → 107.e401af35eca7e21cc9c2.bundle.js} +2 -2
  8. package/dist/107.e401af35eca7e21cc9c2.bundle.js.map +1 -0
  9. package/dist/{108.3c3f9c242e6a3e18fff5.bundle.js → 108.90cf8908233ccb473643.bundle.js} +2 -2
  10. package/dist/108.90cf8908233ccb473643.bundle.js.map +1 -0
  11. package/dist/{11.f4c5533cd200c8568ff6.bundle.js → 11.f912f1a9f37160d23a3b.bundle.js} +2 -2
  12. package/dist/11.f912f1a9f37160d23a3b.bundle.js.map +1 -0
  13. package/dist/{124.6a31dfbe4ac2f9064a29.bundle.js → 124.82728aea87e9d1190441.bundle.js} +2 -2
  14. package/dist/124.82728aea87e9d1190441.bundle.js.map +1 -0
  15. package/dist/{126.48e00b0525b3ef8efbe8.bundle.js → 126.d21b0bf850be03830298.bundle.js} +2 -2
  16. package/dist/126.d21b0bf850be03830298.bundle.js.map +1 -0
  17. package/dist/140.08e0e8799d3d5fefcda5.bundle.js +2 -0
  18. package/dist/140.08e0e8799d3d5fefcda5.bundle.js.map +1 -0
  19. package/dist/141.c16968e963be850e7a7b.bundle.js +2 -0
  20. package/dist/141.c16968e963be850e7a7b.bundle.js.map +1 -0
  21. package/dist/142.0204215ce1bf7b2cf84d.bundle.js +2 -0
  22. package/dist/142.0204215ce1bf7b2cf84d.bundle.js.map +1 -0
  23. package/dist/143.c194ab0648b274f3b554.bundle.js +2 -0
  24. package/dist/143.c194ab0648b274f3b554.bundle.js.map +1 -0
  25. package/dist/145.828376c0cb6b5ba6e015.bundle.js +2 -0
  26. package/dist/145.828376c0cb6b5ba6e015.bundle.js.map +1 -0
  27. package/dist/146.581f1af823b55dc358d6.bundle.js +2 -0
  28. package/dist/146.581f1af823b55dc358d6.bundle.js.map +1 -0
  29. package/dist/147.66395fd5d79176a79c38.bundle.js +2 -0
  30. package/dist/147.66395fd5d79176a79c38.bundle.js.map +1 -0
  31. package/dist/{148.dd250d3cc5aafade33c6.bundle.js → 148.78e7398de964231883f3.bundle.js} +2 -2
  32. package/dist/{148.dd250d3cc5aafade33c6.bundle.js.map → 148.78e7398de964231883f3.bundle.js.map} +1 -1
  33. package/dist/{149.a0873076f2dd40830be9.bundle.js → 149.6eb6ef704b8da7bfc6ce.bundle.js} +2 -2
  34. package/dist/{149.a0873076f2dd40830be9.bundle.js.map → 149.6eb6ef704b8da7bfc6ce.bundle.js.map} +1 -1
  35. package/dist/{150.3bd8af24551408342185.bundle.js → 150.283dd1f6da002f1ca17f.bundle.js} +2 -2
  36. package/dist/{150.3bd8af24551408342185.bundle.js.map → 150.283dd1f6da002f1ca17f.bundle.js.map} +1 -1
  37. package/dist/154.056ec5c8aafbc07484e0.bundle.js +2 -0
  38. package/dist/154.056ec5c8aafbc07484e0.bundle.js.map +1 -0
  39. package/dist/156.e15f9befbcfaf6677387.bundle.js +2 -0
  40. package/dist/156.e15f9befbcfaf6677387.bundle.js.map +1 -0
  41. package/dist/158.29813ed563736e5c85b2.bundle.js +2 -0
  42. package/dist/158.29813ed563736e5c85b2.bundle.js.map +1 -0
  43. package/dist/16.b8bb2389b9f026a298f7.bundle.js +3 -0
  44. package/dist/16.b8bb2389b9f026a298f7.bundle.js.map +1 -0
  45. package/dist/160.d5f5ab14c56efd04e404.bundle.js +2 -0
  46. package/dist/160.d5f5ab14c56efd04e404.bundle.js.map +1 -0
  47. package/dist/161.f142c1fe18346f00882a.bundle.js +2 -0
  48. package/dist/161.f142c1fe18346f00882a.bundle.js.map +1 -0
  49. package/dist/164.d4b744057d28ed5e7e47.bundle.js +2 -0
  50. package/dist/164.d4b744057d28ed5e7e47.bundle.js.map +1 -0
  51. package/dist/166.256169db442fec472d9d.bundle.js +2 -0
  52. package/dist/166.256169db442fec472d9d.bundle.js.map +1 -0
  53. package/dist/167.f79a82f7de6734cca660.bundle.js +2 -0
  54. package/dist/167.f79a82f7de6734cca660.bundle.js.map +1 -0
  55. package/dist/169.16292782069da22a11c0.bundle.js +2 -0
  56. package/dist/169.16292782069da22a11c0.bundle.js.map +1 -0
  57. package/dist/17.675eef636eb095240fab.bundle.js +2 -0
  58. package/dist/17.675eef636eb095240fab.bundle.js.map +1 -0
  59. package/dist/171.2aecfe97c1fa24db3bf3.bundle.js +2 -0
  60. package/dist/171.2aecfe97c1fa24db3bf3.bundle.js.map +1 -0
  61. package/dist/172.558d9080f05080a0dac2.bundle.js +2 -0
  62. package/dist/172.558d9080f05080a0dac2.bundle.js.map +1 -0
  63. package/dist/173.c1546a02befda215609d.bundle.js +2 -0
  64. package/dist/173.c1546a02befda215609d.bundle.js.map +1 -0
  65. package/dist/175.943ac5019fe29113e1f2.bundle.js +2 -0
  66. package/dist/175.943ac5019fe29113e1f2.bundle.js.map +1 -0
  67. package/dist/176.96a2ffd87018134c7b29.bundle.js +2 -0
  68. package/dist/176.96a2ffd87018134c7b29.bundle.js.map +1 -0
  69. package/dist/177.443034c31f85d8ac396c.bundle.js +2 -0
  70. package/dist/177.443034c31f85d8ac396c.bundle.js.map +1 -0
  71. package/dist/180.384be4faad5d0b1716b5.bundle.js +2 -0
  72. package/dist/180.384be4faad5d0b1716b5.bundle.js.map +1 -0
  73. package/dist/181.ce536d7a1f4cb278f82c.bundle.js +2 -0
  74. package/dist/181.ce536d7a1f4cb278f82c.bundle.js.map +1 -0
  75. package/dist/182.6154b3558b619301bfdf.bundle.js +2 -0
  76. package/dist/{182.1b40c7e8a8424e87da32.bundle.js.map → 182.6154b3558b619301bfdf.bundle.js.map} +1 -1
  77. package/dist/183.67e81437028990463d1a.bundle.js +2 -0
  78. package/dist/183.67e81437028990463d1a.bundle.js.map +1 -0
  79. package/dist/20.fbcb31706f03a07e8827.bundle.js +1 -1
  80. package/dist/20.fbcb31706f03a07e8827.bundle.js.map +1 -1
  81. package/dist/21.081b98fe7cc1b3dbbd72.bundle.js +2 -0
  82. package/dist/21.081b98fe7cc1b3dbbd72.bundle.js.map +1 -0
  83. package/dist/{23.b945d0565ded44df49c5.bundle.js → 23.24787bc4590d48521f4b.bundle.js} +2 -2
  84. package/dist/23.24787bc4590d48521f4b.bundle.js.map +1 -0
  85. package/dist/24.7468162b4988a0ad6eaa.bundle.js +2 -0
  86. package/dist/24.7468162b4988a0ad6eaa.bundle.js.map +1 -0
  87. package/dist/{25.9d7a3d8f98840b1fc5da.bundle.js → 25.64b95438d07ae2d82d8c.bundle.js} +2 -2
  88. package/dist/25.64b95438d07ae2d82d8c.bundle.js.map +1 -0
  89. package/dist/{26.a15a1adb6b30ab849e62.bundle.js → 26.7b0b040185949c4eb865.bundle.js} +2 -2
  90. package/dist/26.7b0b040185949c4eb865.bundle.js.map +1 -0
  91. package/dist/{27.83b24ef9ec0fd6964d92.bundle.js → 27.78b1f59da6f702484766.bundle.js} +2 -2
  92. package/dist/27.78b1f59da6f702484766.bundle.js.map +1 -0
  93. package/dist/{3.7f19eec4e1cff6bb8ff2.bundle.js → 3.9b969c666ea9ed46ea4f.bundle.js} +2 -2
  94. package/dist/3.9b969c666ea9ed46ea4f.bundle.js.map +1 -0
  95. package/dist/{30.a2596e679fb09411b854.bundle.js → 30.67e342e8f1485d26a99b.bundle.js} +2 -2
  96. package/dist/30.67e342e8f1485d26a99b.bundle.js.map +1 -0
  97. package/dist/31.133397ed26eda58c7e18.bundle.js +2 -0
  98. package/dist/31.133397ed26eda58c7e18.bundle.js.map +1 -0
  99. package/dist/33.4d23fa109c9184727386.bundle.js +1 -1
  100. package/dist/33.4d23fa109c9184727386.bundle.js.map +1 -1
  101. package/dist/{35.8be1042671722a19f3b4.bundle.js → 35.541a97f880621d5f7031.bundle.js} +2 -2
  102. package/dist/35.541a97f880621d5f7031.bundle.js.map +1 -0
  103. package/dist/36.239dd56c03aeda760f8b.bundle.js +2 -0
  104. package/dist/36.239dd56c03aeda760f8b.bundle.js.map +1 -0
  105. package/dist/{38.f4b561d7ee5b236ba481.bundle.js → 38.c8620e7cbab859b6f236.bundle.js} +2 -2
  106. package/dist/38.c8620e7cbab859b6f236.bundle.js.map +1 -0
  107. package/dist/39.c630c0e36b0dc913bbe3.bundle.js +2 -0
  108. package/dist/39.c630c0e36b0dc913bbe3.bundle.js.map +1 -0
  109. package/dist/{4.186c084105c931abbe1a.bundle.js → 4.d3fb6d0dcca79643bcb3.bundle.js} +2 -2
  110. package/dist/4.d3fb6d0dcca79643bcb3.bundle.js.map +1 -0
  111. package/dist/40.50b40301c8cc69a70457.bundle.js +1 -1
  112. package/dist/40.50b40301c8cc69a70457.bundle.js.map +1 -1
  113. package/dist/42.45ee7b629beac3e06cc2.bundle.js +2 -0
  114. package/dist/42.45ee7b629beac3e06cc2.bundle.js.map +1 -0
  115. package/dist/43.72fbe7e5d290c40db9ec.bundle.js +2 -0
  116. package/dist/43.72fbe7e5d290c40db9ec.bundle.js.map +1 -0
  117. package/dist/{5.5f48e5c6fc10b52dd415.bundle.js → 5.a44aa21343f8bf48f0e0.bundle.js} +2 -2
  118. package/dist/5.a44aa21343f8bf48f0e0.bundle.js.map +1 -0
  119. package/dist/{53.78084dd64a27f7a6d2e8.bundle.js → 53.c6d488d0fb81a54a3e55.bundle.js} +2 -2
  120. package/dist/53.c6d488d0fb81a54a3e55.bundle.js.map +1 -0
  121. package/dist/{54.fe5e554af6ba2c5778c1.bundle.js → 54.6209da75289a30ff366b.bundle.js} +2 -2
  122. package/dist/54.6209da75289a30ff366b.bundle.js.map +1 -0
  123. package/dist/{56.9c6f6ecafc1909c42dda.bundle.js → 56.0d89e5b9f6403aab1c8e.bundle.js} +2 -2
  124. package/dist/56.0d89e5b9f6403aab1c8e.bundle.js.map +1 -0
  125. package/dist/61.6332e06d94ef4426f068.bundle.js +2 -0
  126. package/dist/61.6332e06d94ef4426f068.bundle.js.map +1 -0
  127. package/dist/{62.86f5ed4f7b582a8aa17d.bundle.js → 62.14d5882e16c3da266b6f.bundle.js} +2 -2
  128. package/dist/62.14d5882e16c3da266b6f.bundle.js.map +1 -0
  129. package/dist/{7.c7d8fb1dfdb444052435.bundle.js → 7.8ca1f2ef4d0aa49b93ac.bundle.js} +2 -2
  130. package/dist/7.8ca1f2ef4d0aa49b93ac.bundle.js.map +1 -0
  131. package/dist/{71.4dbbc366049697f736c5.bundle.js → 71.48a75ab912070cdb19f5.bundle.js} +2 -2
  132. package/dist/71.48a75ab912070cdb19f5.bundle.js.map +1 -0
  133. package/dist/9.3b571539df8c3b22cf6e.bundle.js +2 -0
  134. package/dist/9.3b571539df8c3b22cf6e.bundle.js.map +1 -0
  135. package/dist/94.38349f52df66313fbcc0.bundle.js +1 -1
  136. package/dist/94.38349f52df66313fbcc0.bundle.js.map +1 -1
  137. package/dist/97.df243fffeb4322e50f63.bundle.js +2 -0
  138. package/dist/97.df243fffeb4322e50f63.bundle.js.map +1 -0
  139. package/dist/bundle.73c02a0d535f14462730.bundle.js +92 -0
  140. package/dist/bundle.73c02a0d535f14462730.bundle.js.map +1 -0
  141. package/dist/index.html +7 -7
  142. package/dist/js/angular/clustermanagement/templates/modal/add-nodes-dialog.html +2 -2
  143. package/dist/js/angular/clustermanagement/templates/modal/cluster-create-dialog.html +8 -8
  144. package/dist/js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html +1 -1
  145. package/dist/js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html +5 -5
  146. package/dist/js/angular/core/directives/languageselector/templates/languageSelector.html +2 -2
  147. package/dist/js/angular/core/directives/queryeditor/templates/query-editor.html +19 -19
  148. package/dist/js/angular/core/directives/queryeditor/templates/query-sample.html +1 -1
  149. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +3 -3
  150. package/dist/js/angular/core/templates/core-errors.html +1 -1
  151. package/dist/js/angular/core/templates/inactive-plugin-warning-page.html +1 -1
  152. package/dist/js/angular/core/templates/search-resource-input.html +3 -3
  153. package/dist/js/angular/externalsync/templates/deleteConnector.html +1 -1
  154. package/dist/js/angular/graphexplore/templates/modal/save-graph.html +1 -1
  155. package/dist/js/angular/graphexplore/templates/rdfsCommentLabelTemplate.html +2 -2
  156. package/dist/js/angular/graphexplore/templates/searchIconInputTemplate.html +3 -3
  157. package/dist/js/angular/import/templates/filesTable.html +12 -12
  158. package/dist/js/angular/import/templates/settingsModal.html +19 -19
  159. package/dist/js/angular/import/templates/textSnippet.html +4 -4
  160. package/dist/js/angular/import/templates/urlImport.html +4 -4
  161. package/dist/js/angular/repositories/templates/fedx-repo.html +15 -15
  162. package/dist/js/angular/repositories/templates/ontop-repo.html +8 -8
  163. package/dist/js/angular/security/templates/modal/default-authorities.html +2 -2
  164. package/dist/js/angular/security/templates/user.html +13 -13
  165. package/dist/js/angular/security/templates/users.html +8 -8
  166. package/dist/js/angular/settings/modal/location-settings.html +1 -1
  167. package/dist/js/angular/templates/modal/add-location.html +3 -3
  168. package/dist/js/angular/templates/modal/edit-location.html +3 -3
  169. package/dist/js/angular/templates/modal/editRepoFile.html +1 -1
  170. package/dist/js/angular/templates/modal/upload-repository-config.html +2 -2
  171. package/dist/pages/autocomplete.html +8 -8
  172. package/dist/pages/choose-repository-type.html +1 -1
  173. package/dist/pages/cluster-management/clusterInfo.html +15 -15
  174. package/dist/pages/connectorsInfo.html +5 -5
  175. package/dist/pages/create-index.html +15 -15
  176. package/dist/pages/createConnector.html +23 -23
  177. package/dist/pages/dependencies.html +12 -12
  178. package/dist/pages/domainRangeInfo.html +6 -6
  179. package/dist/pages/edit.html +7 -7
  180. package/dist/pages/explore.html +10 -10
  181. package/dist/pages/export.html +14 -14
  182. package/dist/pages/find.html +2 -2
  183. package/dist/pages/graph-config/saveGraphConfig.html +22 -22
  184. package/dist/pages/graphs-visualizations.html +47 -47
  185. package/dist/pages/guides.html +6 -6
  186. package/dist/pages/home.html +10 -10
  187. package/dist/pages/import.html +7 -7
  188. package/dist/pages/info.html +16 -16
  189. package/dist/pages/jdbc-create.html +18 -18
  190. package/dist/pages/jdbc.html +3 -3
  191. package/dist/pages/licenseInfo.html +1 -1
  192. package/dist/pages/login.html +2 -2
  193. package/dist/pages/monitor/queries.html +5 -5
  194. package/dist/pages/monitor/resources.html +13 -13
  195. package/dist/pages/namespaces.html +14 -14
  196. package/dist/pages/plugins.html +4 -4
  197. package/dist/pages/rdfClassHierarchyInfo.html +16 -16
  198. package/dist/pages/rdfrank.html +17 -17
  199. package/dist/pages/registerLicenseInfo.html +3 -3
  200. package/dist/pages/repositories.html +20 -20
  201. package/dist/pages/repository.html +37 -37
  202. package/dist/pages/similarity-indexes.html +15 -15
  203. package/dist/pages/sparql-template-create.html +9 -9
  204. package/dist/pages/sparql-templates.html +3 -3
  205. package/dist/pages/sparql.html +8 -8
  206. package/dist/pages/webapi.html +3 -3
  207. package/dist/res/swagger/index.html +27 -27
  208. package/package.json +2 -2
  209. package/dist/10.973caeed3c05ef2cfd1c.bundle.js +0 -2
  210. package/dist/10.973caeed3c05ef2cfd1c.bundle.js.map +0 -1
  211. package/dist/102.93af0905ca1ff2be2dbf.bundle.js +0 -2
  212. package/dist/102.93af0905ca1ff2be2dbf.bundle.js.map +0 -1
  213. package/dist/104.b82229ea4c12400f6f5d.bundle.js +0 -2
  214. package/dist/104.b82229ea4c12400f6f5d.bundle.js.map +0 -1
  215. package/dist/107.37693ea0237c39fda863.bundle.js.map +0 -1
  216. package/dist/108.3c3f9c242e6a3e18fff5.bundle.js.map +0 -1
  217. package/dist/11.f4c5533cd200c8568ff6.bundle.js.map +0 -1
  218. package/dist/124.6a31dfbe4ac2f9064a29.bundle.js.map +0 -1
  219. package/dist/126.48e00b0525b3ef8efbe8.bundle.js.map +0 -1
  220. package/dist/140.8f22a20a0689c072368f.bundle.js +0 -2
  221. package/dist/140.8f22a20a0689c072368f.bundle.js.map +0 -1
  222. package/dist/141.6ffbf225a69b845e5e07.bundle.js +0 -2
  223. package/dist/141.6ffbf225a69b845e5e07.bundle.js.map +0 -1
  224. package/dist/142.355ab1a9716ce7315ad6.bundle.js +0 -2
  225. package/dist/142.355ab1a9716ce7315ad6.bundle.js.map +0 -1
  226. package/dist/143.64b1142c8e48b388717f.bundle.js +0 -2
  227. package/dist/143.64b1142c8e48b388717f.bundle.js.map +0 -1
  228. package/dist/145.9858a584e01b6c01a57c.bundle.js +0 -2
  229. package/dist/145.9858a584e01b6c01a57c.bundle.js.map +0 -1
  230. package/dist/146.15a2396be0b56a454857.bundle.js +0 -2
  231. package/dist/146.15a2396be0b56a454857.bundle.js.map +0 -1
  232. package/dist/147.638cfbfdf711a97e19f1.bundle.js +0 -2
  233. package/dist/147.638cfbfdf711a97e19f1.bundle.js.map +0 -1
  234. package/dist/154.6dadeaa5b9cdab265cb3.bundle.js +0 -2
  235. package/dist/154.6dadeaa5b9cdab265cb3.bundle.js.map +0 -1
  236. package/dist/156.4252f16fc656c91fba0c.bundle.js +0 -2
  237. package/dist/156.4252f16fc656c91fba0c.bundle.js.map +0 -1
  238. package/dist/158.13d4aafb2c7f02af028b.bundle.js +0 -2
  239. package/dist/158.13d4aafb2c7f02af028b.bundle.js.map +0 -1
  240. package/dist/16.61454b9a7360266e544a.bundle.js +0 -3
  241. package/dist/16.61454b9a7360266e544a.bundle.js.map +0 -1
  242. package/dist/160.3b604e0909b8a932d959.bundle.js +0 -2
  243. package/dist/160.3b604e0909b8a932d959.bundle.js.map +0 -1
  244. package/dist/161.c72cc3169ea1191e49e8.bundle.js +0 -2
  245. package/dist/161.c72cc3169ea1191e49e8.bundle.js.map +0 -1
  246. package/dist/164.a03f4da227b54ad97c18.bundle.js +0 -2
  247. package/dist/164.a03f4da227b54ad97c18.bundle.js.map +0 -1
  248. package/dist/166.b4fd0bd3df4985d3e74a.bundle.js +0 -2
  249. package/dist/166.b4fd0bd3df4985d3e74a.bundle.js.map +0 -1
  250. package/dist/167.0e3773d3b16936a2a72a.bundle.js +0 -2
  251. package/dist/167.0e3773d3b16936a2a72a.bundle.js.map +0 -1
  252. package/dist/169.a43d9e76a361ad2cabb5.bundle.js +0 -2
  253. package/dist/169.a43d9e76a361ad2cabb5.bundle.js.map +0 -1
  254. package/dist/17.545bc1027c226502e3b8.bundle.js +0 -2
  255. package/dist/17.545bc1027c226502e3b8.bundle.js.map +0 -1
  256. package/dist/171.584fa763e2fe9a4d34f4.bundle.js +0 -2
  257. package/dist/171.584fa763e2fe9a4d34f4.bundle.js.map +0 -1
  258. package/dist/172.67ba9379059ac602d509.bundle.js +0 -2
  259. package/dist/172.67ba9379059ac602d509.bundle.js.map +0 -1
  260. package/dist/173.fd7ee2abdf75fc0ed3a3.bundle.js +0 -2
  261. package/dist/173.fd7ee2abdf75fc0ed3a3.bundle.js.map +0 -1
  262. package/dist/175.341ea8612291026d2630.bundle.js +0 -2
  263. package/dist/175.341ea8612291026d2630.bundle.js.map +0 -1
  264. package/dist/176.7cdff30cd9372f424163.bundle.js +0 -2
  265. package/dist/176.7cdff30cd9372f424163.bundle.js.map +0 -1
  266. package/dist/177.57ac19484b6430c0f242.bundle.js +0 -2
  267. package/dist/177.57ac19484b6430c0f242.bundle.js.map +0 -1
  268. package/dist/180.f19924b6b550773f9163.bundle.js +0 -2
  269. package/dist/180.f19924b6b550773f9163.bundle.js.map +0 -1
  270. package/dist/181.db05a22a05f9c928b08c.bundle.js +0 -2
  271. package/dist/181.db05a22a05f9c928b08c.bundle.js.map +0 -1
  272. package/dist/182.1b40c7e8a8424e87da32.bundle.js +0 -2
  273. package/dist/183.1ed57fba52ab51806ec3.bundle.js +0 -2
  274. package/dist/183.1ed57fba52ab51806ec3.bundle.js.map +0 -1
  275. package/dist/21.ea150df1291050bc1c4a.bundle.js +0 -2
  276. package/dist/21.ea150df1291050bc1c4a.bundle.js.map +0 -1
  277. package/dist/23.b945d0565ded44df49c5.bundle.js.map +0 -1
  278. package/dist/24.77907cc1d707305663c9.bundle.js +0 -2
  279. package/dist/24.77907cc1d707305663c9.bundle.js.map +0 -1
  280. package/dist/25.9d7a3d8f98840b1fc5da.bundle.js.map +0 -1
  281. package/dist/26.a15a1adb6b30ab849e62.bundle.js.map +0 -1
  282. package/dist/27.83b24ef9ec0fd6964d92.bundle.js.map +0 -1
  283. package/dist/3.7f19eec4e1cff6bb8ff2.bundle.js.map +0 -1
  284. package/dist/30.a2596e679fb09411b854.bundle.js.map +0 -1
  285. package/dist/31.fbcd8b1840a84a281e47.bundle.js +0 -2
  286. package/dist/31.fbcd8b1840a84a281e47.bundle.js.map +0 -1
  287. package/dist/35.8be1042671722a19f3b4.bundle.js.map +0 -1
  288. package/dist/36.8d7becdfce12d9a0de33.bundle.js +0 -2
  289. package/dist/36.8d7becdfce12d9a0de33.bundle.js.map +0 -1
  290. package/dist/38.f4b561d7ee5b236ba481.bundle.js.map +0 -1
  291. package/dist/39.68f59c2a9aeb4c4100c9.bundle.js +0 -2
  292. package/dist/39.68f59c2a9aeb4c4100c9.bundle.js.map +0 -1
  293. package/dist/4.186c084105c931abbe1a.bundle.js.map +0 -1
  294. package/dist/42.87fe547d27ce0c30deef.bundle.js +0 -2
  295. package/dist/42.87fe547d27ce0c30deef.bundle.js.map +0 -1
  296. package/dist/43.34060633fa9548ec3437.bundle.js +0 -2
  297. package/dist/43.34060633fa9548ec3437.bundle.js.map +0 -1
  298. package/dist/5.5f48e5c6fc10b52dd415.bundle.js.map +0 -1
  299. package/dist/53.78084dd64a27f7a6d2e8.bundle.js.map +0 -1
  300. package/dist/54.fe5e554af6ba2c5778c1.bundle.js.map +0 -1
  301. package/dist/56.9c6f6ecafc1909c42dda.bundle.js.map +0 -1
  302. package/dist/61.faf4ab26276a053ccac5.bundle.js +0 -2
  303. package/dist/61.faf4ab26276a053ccac5.bundle.js.map +0 -1
  304. package/dist/62.86f5ed4f7b582a8aa17d.bundle.js.map +0 -1
  305. package/dist/7.c7d8fb1dfdb444052435.bundle.js.map +0 -1
  306. package/dist/71.4dbbc366049697f736c5.bundle.js.map +0 -1
  307. package/dist/9.7bdbee8225f687ec81bc.bundle.js +0 -2
  308. package/dist/9.7bdbee8225f687ec81bc.bundle.js.map +0 -1
  309. package/dist/97.e88574ad257bd44724c3.bundle.js +0 -2
  310. package/dist/97.e88574ad257bd44724c3.bundle.js.map +0 -1
  311. package/dist/bundle.f540ee201846422b1cb9.bundle.js +0 -92
  312. package/dist/bundle.f540ee201846422b1cb9.bundle.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/core/directives/queryeditor/query-editor.controller.js"],"names":["QueryEditorCtrl","$scope","$timeout","toastr","$repositories","$modal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys","$translate","defaultTabConfig","id","name","query","inference","sameAs","principal","checkQueryIntervalId","saveQueryToLocal","currentQueryTab","isActiveRepoOntopType","sameAsBtn","document","getElementById","currentQuery","disabled","removeAttribute","appSettings","DEFAULT_SAMEAS","shouldDisableSameAs","tabs","forEach","tab","index","set","TABS_STATE","setLoader","isRunning","progressMessage","extraMessage","noTimer","yasrInnerContainer","angular","element","queryIsRunning","queryStartTime","Date","now","countTimeouted","noLoaderTimer","addClass","currentTrackAlias","abortRequested","removeClass","$$phase","$apply","fixSizesOnHorizontalViewModeSwitch","verticalView","visibleWindowHeight","window","innerHeight","documentElement","clientHeight","body","orientationViewMode","viewMode","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","editor","timer","$on","cancel","yasr","container","resize","showHideEditor","deleteCachedSparqlResults","foo","params","newRepo","tabsData","get","item","yasrData","undefined","queryType","resultsCount","allResultsCount","sizeDelta","errorMessage","repositoryError","selectTab","$","runQuery","changePage","explain","executedQueryTab","getQueryType","warning","instant","explainRequested","currentTabConfig","resetCurrentTabConfig","lastRunQueryMode","getQueryMode","toggleSampleQueries","showSampleQueries","getSavedQueries","success","data","sampleQueries","collapse","width","error","msg","getError","getExistingTabId","existingTabId","showModal","modalSelector","shared","savedQuery","getValue","modal","findTabIndexByID","i","length","getPrincipal","then","response","scope","DEFAULT_INFERENCE","skipCountQuery","EXECUTE_COUNT","ignoreSharedQueries","IGNORE_SHARED_QUERIES","$watchCollection","newVal","oldVal","initTabs","this","hint","createElement","innerHTML","fontSize","color","backgroundColor","position","zIndex","$watch","newValue","elRect","appendChild","top","left","right","offsetWidth","parentNode","removeChild","pageSize","page","queryExists","saveTab","idx","loadTab","setValue","updateDownloadDropdown","$broadcast","options","output","outputType","customError","results","getException","setYasrResponse","textStatus","jqXhrOrErrorString","hasClass","click","TABS_STATE_CURRENT_ID","offset","allResultsCountExact","timeFinished","timeTook","customUpdateMessage","warningMessage","css","setInterval","showOrHideSaveAsDropDown","isOntop","isFedX","isActiveRepoFedXType","inferenceBtn","handleSameAsAndInferenceBtns","nocount","overrideSameAsInferenceAndNoCountIfNeeded","addNewTab","callback","tabName","isTabChangeOk","maxID","newID","newTab","push","TABS_STATE_MAXID","callbackArgs","Array","prototype","slice","call","arguments","apply","abortCurrentQuery","deleteQuery","getActiveRepository","editQuery","open","templateUrl","controller","resolve","title","edit","okButtonText","result","queryModal","addNewSavedQuery","deleteQueryHttp","editSavedQuery","getNamespaces","namespacesLoading","getRepositoryNamespaces","usedPrefixes","bindings","e","prefix","value","namespace","namespaces","finally","changePagination","addKnownPrefixes","JSON","stringify","isDefined","querySelected","tabId","highlightNextTabChange","savedQueryName","openSimpleModal","message","deleteSavedQuery","saveQuery","existingQueryErrMsg","saveQueryHttp","status","getLoaderMessage","timeSeconds","timeHuman","getHumanReadableSeconds","changeViewMode","VIEW_MODE","focusQueryEditor","find","is","focus","getActiveRepositoryNoError","onbeforeunload","clearInterval","mouseup","event","target","has","getQueryID","attr","$saveAsDropDown","queryValid","header","remove","isNew","info","tabEvent","relatedTarget","colors","times","highlightFun","editQueryModal","deleteQueryModal","saveQueryModal","getResultsDescription","desc","currentPageEnd","Math","min","getUpdateDescription","abs","getStaleWarningMessage","secondsAgo","round","bind","unbind","QuerySampleModalCtrl","$modalInstance","$sce","copy","trustAsHtml","ok","form","$valid","close","dismiss","module","$inject"],"mappings":"0FAAA,6BAcA,SAASA,EAAgBC,EAAQC,EAAUC,EAAQC,EAAeC,EAAQC,EAAcC,EAAmBC,EAASC,EAASC,EAAUC,EAA8BC,EAAuBC,EAAqBC,EAAQC,GACrN,MAAMC,EAAmB,CACrBC,GAAI,IACJC,KAAM,GACNC,MAAO,kDAGPC,WAAW,EACXC,QAAQ,GAGZ,IAAIC,EAWAC,EAmGJ,SAASC,EAAiBC,IA4wB1B,WAEI,GAAIrB,EAAcsB,wBACd,OAEJ,MAAMC,EAAYC,SAASC,eAAe,WACtCF,GAAc1B,EAAO6B,aAAaV,WAAcO,EAAUI,SAGnD9B,EAAO6B,aAAaV,WAAaO,EAAUI,WAClDJ,EAAUK,gBAAgB,YAC1B/B,EAAO6B,aAAaT,OAASC,EAAUW,YAAYC,iBAJnDP,EAAUI,UAAW,EACrB9B,EAAO6B,aAAaT,QAAS,GAnxBjCc,GACAlC,EAAOmC,KAAKC,SAAQ,SAAUC,EAAKC,GAC3BD,EAAIrB,KAAOQ,EAAgBR,KAC3BhB,EAAOmC,KAAKG,GAAOpB,MAAQM,EAAgBN,MAGtCf,EAAcsB,0BACfzB,EAAOmC,KAAKG,GAAOnB,UAAYK,EAAgBL,UAC/CnB,EAAOmC,KAAKG,GAAOlB,OAASI,EAAgBJ,YAIxDR,EAAoB2B,IAAI1B,EAAO2B,WAAYxC,EAAOmC,MAGtD,SAASM,EAAUC,EAAWC,EAAiBC,EAAcC,GACzD,MAAMC,EAAqBC,QAAQC,QAAQrB,SAASC,eAAe,eACnE5B,EAAO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,aAAc,GAEzB7K,EAAOkB,MAAQ6B,QAAQ4Q,KAAKlM,EAAKvG,OACjClB,EAAOwO,MAAQ/G,EAAK+G,MACpBxO,EAAOyO,KAAOhH,EAAKgH,KACnBzO,EAAO0O,aAAejH,EAAKiH,aAC5B1O,EAAOwQ,oBAAsBkD,EAAKE,YAAYnM,EAAK+I,qBAClDxQ,EAAO6T,GAAK,WACJ7T,EAAO8T,KAAKC,QACZN,EAAeO,MAAMhU,EAAOkB,QAIpClB,EAAOmF,OAAS,WACZsO,EAAeQ,QAAQ,WAj7B/BlR,QACKmR,OAAO,4DAA6D,CACjE,8CACA,0CAEH5F,WAAW,kBAAmBvO,GAC9BuO,WAAW,uBAAwBkF,GAExCzT,EAAgBoU,QAAU,CAAC,SAAU,WAAY,SAAU,gBAAiB,SAAU,eAAgB,oBAAqB,UAAW,UAAW,WAAY,+BAAgC,wBAAyB,sBAAuB,SAAU,cAu5BvPX,EAAqBW,QAAU,CAAC,SAAU,iBAAkB,OAAQ","file":"62.86f5ed4f7b582a8aa17d.bundle.js","sourcesContent":["import 'angular/utils/local-storage-adapter';\nimport 'angular/rest/sparql.rest.service';\nimport {decodeHTML} from \"../../../../../app\";\n\nangular\n .module('graphdb.framework.core.directives.queryeditor.controllers', [\n 'graphdb.framework.utils.localstorageadapter',\n 'graphdb.framework.rest.sparql.service'\n ])\n .controller('QueryEditorCtrl', QueryEditorCtrl)\n .controller('QuerySampleModalCtrl', QuerySampleModalCtrl);\n\nQueryEditorCtrl.$inject = ['$scope', '$timeout', 'toastr', '$repositories', '$modal', 'ModalService', 'SparqlRestService', '$filter', '$window', '$jwtAuth', 'RDF4JRepositoriesRestService', 'MonitoringRestService', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction QueryEditorCtrl($scope, $timeout, toastr, $repositories, $modal, ModalService, SparqlRestService, $filter, $window, $jwtAuth, RDF4JRepositoriesRestService, MonitoringRestService, LocalStorageAdapter, LSKeys, $translate) {\n const defaultTabConfig = {\n id: \"1\",\n name: '',\n query: 'select * where { \\n' +\n '\\t?s ?p ?o .\\n' +\n '} limit 100 \\n',\n inference: true,\n sameAs: true\n };\n\n let principal;\n // Wrapped in function for ease of testing\n $scope.getPrincipal = function () {\n return $jwtAuth.getPrincipal()\n .then((response) => {\n principal = response;\n initTabs($scope, principal);\n });\n };\n\n $scope.getPrincipal();\n let checkQueryIntervalId;\n\n function initTabs(scope, principal) {\n defaultTabConfig.inference = principal.appSettings.DEFAULT_INFERENCE;\n defaultTabConfig.sameAs = principal.appSettings.DEFAULT_SAMEAS;\n\n scope.skipCountQuery = !principal.appSettings.EXECUTE_COUNT;\n scope.ignoreSharedQueries = principal.appSettings.IGNORE_SHARED_QUERIES;\n scope.tabsData = scope.tabs = LocalStorageAdapter.get(LSKeys.TABS_STATE) || [defaultTabConfig];\n\n scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function (newVal, oldVal, scope) {\n saveQueryToLocal(scope.currentQuery);\n });\n\n scope.$on('repositoryIsSet', deleteCachedSparqlResults);\n }\n\n this.hint = document.createElement(\"span\");\n this.hint.innerHTML = $translate.instant('query.editor.autocomplete.hint');\n this.hint.style.fontSize = \"12px\";\n this.hint.style.color = \"gray\";\n this.hint.style.backgroundColor = \"white\";\n this.hint.style.position = \"absolute\";\n this.hint.style.zIndex = \"3\";\n this.hint.style.paddingLeft = 12 + \"px\";\n\n $scope.$watch(function() {\n return angular.element('.CodeMirror-hints').length;\n }, (newValue) => {\n if (newValue) {\n const elRect = angular.element('.CodeMirror-hints')[0].getBoundingClientRect();\n document.body.appendChild(this.hint);\n this.hint.style.top = elRect.top - 20 + \"px\";\n this.hint.style.left = elRect.right - this.hint.offsetWidth - 12 + \"px\";\n } else {\n this.hint && this.hint.parentNode && this.hint.parentNode.removeChild(this.hint);\n }\n });\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 1000,\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n $scope.isTabChangeOk = isTabChangeOk;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.abortCurrentQuery = abortCurrentQuery;\n $scope.editQuery = editQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.deleteQuery = deleteQuery;\n $scope.deleteQueryHttp = deleteQueryHttp;\n $scope.saveQuery = saveQuery;\n $scope.saveQueryHttp = saveQueryHttp;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = LocalStorageAdapter.get(LSKeys.VIEW_MODE) ? LocalStorageAdapter.get(LSKeys.VIEW_MODE) === \"true\" : true;\n $scope.viewMode = 'none';\n\n // start of repository actions\n // FIXME: do we need this??\n // $scope.getActiveRepository();\n $scope.getActiveRepository = function () {\n // same as getActiveRepository() but takes into account repo errors\n return $repositories.getActiveRepository();\n };\n\n $scope.getActiveRepositoryNoError = function () {\n if (!$scope.repositoryError) {\n return $repositories.getActiveRepository();\n }\n };\n\n function saveQueryToLocal(currentQueryTab) {\n shouldDisableSameAs();\n $scope.tabs.forEach(function (tab, index) {\n if (tab.id === currentQueryTab.id) {\n $scope.tabs[index].query = currentQueryTab.query;\n // Don't store inference and sameAs values for Ontop repository,\n // because they are overridden afterwards to true\n if (!$repositories.isActiveRepoOntopType()) {\n $scope.tabs[index].inference = currentQueryTab.inference;\n $scope.tabs[index].sameAs = currentQueryTab.sameAs;\n }\n }\n });\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n }\n\n function setLoader(isRunning, progressMessage, extraMessage, noTimer) {\n const yasrInnerContainer = angular.element(document.getElementById(\"yasr-inner\"));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n $scope.noLoaderTimer = noTimer;\n yasrInnerContainer.addClass(\"hide\");\n } else {\n $scope.progressMessage = \"\";\n $scope.extraMessage = \"\";\n $scope.noLoaderTimer = false;\n $scope.currentTrackAlias = null;\n $scope.abortRequested = false;\n yasrInnerContainer.removeClass(\"hide\");\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n let timeHuman = \"\";\n let message = \"\";\n\n if (!$scope.noLoaderTimer) {\n timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n }\n\n if ($scope.progressMessage) {\n message = $translate.instant('query.editor.progress.msg', {progressMessage: $scope.progressMessage, timeHuman: timeHuman});\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += $translate.instant('query.editor.extra.msg', {extraMessage: $scope.extraMessage});\n }\n\n return message;\n }\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalView) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector('.CodeMirror-wrap')) {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n //window.editor.refresh();\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView);\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on(\"$destroy\", function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n //window.editor.refresh();\n } else {\n $scope.noPadding = {};\n document.querySelector('.CodeMirror-wrap').style.height = '';\n //window.editor.refresh();\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode() {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n LocalStorageAdapter.set(LSKeys.VIEW_MODE, $scope.orientationViewMode);\n fixSizesOnHorizontalViewModeSwitch();\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(\":focus\")) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function deleteCachedSparqlResults(foo, params) {\n if (params.newRepo) {\n $scope.tabsData = LocalStorageAdapter.get(LSKeys.TABS_STATE);\n $scope.tabsData.forEach(function (item) {\n item.yasrData = undefined;\n item.queryType = undefined;\n item.resultsCount = 0;\n item.allResultsCount = 0;\n item.sizeDelta = undefined;\n });\n\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabsData);\n $scope.tabs = $scope.tabsData;\n\n // The repository is changed. Remove error messages as well, if any\n $scope.currentQuery = {};\n $scope.errorMessage = null;\n $scope.repositoryError = null;\n }\n }\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n window.onbeforeunload = function () {\n if ($scope.currentQuery) {\n $scope.saveTab($scope.currentQuery.id);\n }\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n };\n\n $scope.$on('$destroy', function () {\n if ($scope.currentQuery) {\n $scope.saveTab($scope.currentQuery.id);\n }\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n clearInterval(checkQueryIntervalId);\n });\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery ;\n if (explain) {\n if (!(window.editor.getQueryType() === 'SELECT' || window.editor.getQueryType() === 'CONSTRUCT')) {\n toastr.warning($translate.instant('query.editor.warning.msg'));\n return;\n }\n\n if ($repositories.isActiveRepoOntopType()) {\n toastr.warning($translate.instant('query.editor.virtual.repo.warning.msg'));\n return;\n }\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n $scope.lastRunQueryMode = window.editor.getQueryMode();\n\n if ($scope.lastRunQueryMode === 'update' && $repositories.isActiveRepoOntopType()) {\n toastr.warning($translate.instant('query.editor.virtual.repo.update.warning.msg'));\n return;\n }\n\n setLoader(true, $scope.lastRunQueryMode === 'update' ? $translate.instant('query.editor.executing.update') : $translate.instant('query.editor.evaluating.query'));\n if ($scope.viewMode !== 'none') {\n $scope.viewMode = 'none';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch();\n }\n const timer = $timeout(window.editor.query, 500);\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n } else {\n window.editor.query();\n }\n }\n }\n\n function abortCurrentQuery() {\n MonitoringRestService.deleteQuery($scope.currentTrackAlias, $repositories.getActiveRepository())\n .success(function () {\n $scope.abortRequested = true;\n });\n }\n\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n $scope.namespacesLoading = true;\n\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n $scope.namespacesLoading = false;\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n $scope.$on(\"$destroy\", function () {\n clearInterval(checkQueryIntervalId);\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n $scope.showSampleQueries = !$scope.showSampleQueries;\n if ($scope.showSampleQueries) {\n SparqlRestService.getSavedQueries()\n .success(function (data) {\n $scope.sampleQueries = data;\n $('#sampleQueriesCollapse').collapse('show').width('300px');\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('query.editor.get.saved.queries.error'));\n });\n } else {\n $('#sampleQueriesCollapse').collapse('hide');\n }\n }\n\n // Hide the sample queries when the user clicks somewhere else in the UI.\n $(document).mouseup(function (event) {\n const container = $('#sampleQueriesCollapse');\n if (!container.is(event.target) // if the target of the click isn't the container..\n && container.has(event.target).length === 0 //... nor a descendant of the container\n && $scope.showSampleQueries) {\n toggleSampleQueries();\n }\n });\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n\n if ($scope.isTabChangeOk(false)) {\n $scope.highlightNextTabChange = true;\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n $scope.tabsData.forEach(function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n return existingTabId;\n }\n\n function editQuery(query) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/core/directives/queryeditor/templates/query-sample.html',\n controller: 'QuerySampleModalCtrl',\n resolve: {\n data: function () {\n return {\n title: $translate.instant('query.editor.edit.saved.query', {name: query.name}),\n query: query,\n edit: true,\n okButtonText: $translate.instant('common.save.btn')\n };\n }\n }\n });\n\n modalInstance.result.then(function (queryModal) {\n const data = {\n name: queryModal.name,\n body: queryModal.body,\n shared: queryModal.shared\n };\n if (query.name !== queryModal.name) {\n SparqlRestService.addNewSavedQuery(data)\n .success(function () {\n $scope.deleteQueryHttp(query.name, true);\n })\n .error(function (error) {\n const msg = getError(error);\n toastr.error(msg, $translate.instant('query.editor.edit.saved.query.error'));\n });\n } else {\n SparqlRestService.editSavedQuery(data)\n .success(function () {\n $('#editQueryContainer').modal('hide');\n $scope.toggleSampleQueries();\n toastr.success($translate.instant('query.editor.edit.saved.query.success.msg', {name: query.name}));\n })\n .error(function (error) {\n const msg = getError(error);\n toastr.error(msg, $translate.instant('query.editor.edit.saved.query.error'));\n });\n }\n });\n }\n\n function deleteQueryHttp(savedQueryName, edit) {\n SparqlRestService.deleteSavedQuery(savedQueryName)\n .success(function () {\n $scope.toggleSampleQueries();\n if (!edit) {\n toastr.success($translate.instant('query.editor.delete.saved.query.success.msg', {savedQueryName: savedQueryName}));\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('query.editor.delete.saved.query.error'));\n });\n }\n\n function deleteQuery(savedQueryName) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: $translate.instant('query.editor.delete.saved.query.warning.msg', {savedQueryName: savedQueryName}),\n warning: true\n }).result\n .then(function () {\n $scope.deleteQueryHttp(savedQueryName);\n });\n }\n\n function saveQueryHttp(query) {\n SparqlRestService.addNewSavedQuery(query)\n .success(function () {\n toastr.success($translate.instant('query.editor.save.saved.query.success.msg', {name: query.name}));\n })\n .error(function (data, status) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('query.editor.create.saved.query.error'));\n let queryExists = false;\n if (status === 409) {\n queryExists = true;\n }\n query.query = query.body;\n $scope.saveQuery(query, queryExists);\n });\n }\n\n function saveQuery(query, queryExists) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/core/directives/queryeditor/templates/query-sample.html',\n controller: 'QuerySampleModalCtrl',\n resolve: {\n data: function () {\n return {\n title: $translate.instant('query.editor.create.saved.query.msg'),\n query: {name: query.name, body: query.query, shared: query.shared},\n edit: false,\n okButtonText: $translate.instant('common.create.btn'),\n queryExists: queryExists,\n existingQueryErrMsg: decodeHTML($translate.instant('query.sample.existing.query.warning', {name: query.name}))\n };\n }\n }\n });\n\n modalInstance.result.then(function (query) {\n $scope.saveQueryHttp(query);\n }, function () {\n });\n }\n\n // end of query operations\n\n function showModal(modalSelector) {\n return function (name, query, shared) {\n $scope.savedQuery = {\n name: name,\n query: query || window.editor.getValue(),\n shared: shared\n };\n $(modalSelector).modal('show');\n };\n }\n\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n //tab.query = window.editor.getValue();\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n let maxID = LocalStorageAdapter.get(LSKeys.TABS_STATE_MAXID) || 1;\n\n function addNewTab(callback, tabName, savedQuery) { // optional callback to call after tab has been added\n if (!isTabChangeOk(true)) {\n return;\n }\n let defaultTabConfig;\n if (tabName || savedQuery) {\n defaultTabConfig = {\n id: \"1\",\n name: tabName,\n query: savedQuery,\n inference: principal.appSettings.DEFAULT_INFERENCE,\n sameAs: principal.appSettings.DEFAULT_SAMEAS\n };\n } else {\n defaultTabConfig = {\n id: \"1\",\n name: '',\n query: 'select * where { \\n' +\n '\\t?s ?p ?o .\\n' +\n '} limit 100 \\n',\n inference: principal.appSettings.DEFAULT_INFERENCE,\n sameAs: principal.appSettings.DEFAULT_SAMEAS\n };\n }\n\n maxID++;\n const newID = '' + maxID;\n $scope.tabsData = $scope.tabs;\n\n const newTab = defaultTabConfig;\n newTab.id = newID;\n\n $scope.tabsData.push(newTab);\n\n LocalStorageAdapter.set(LSKeys.TABS_STATE_MAXID, maxID);\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabsData);\n const callbackArgs = Array.prototype.slice.call(arguments, 1); // skip one argument, i.e. the callback itself\n $timeout(function () {\n $scope.$apply();\n selectTab(newID);\n if (callback) {\n callback.apply(this, callbackArgs);\n }\n }, 0);\n $scope.tabs = $scope.tabsData;\n }\n\n function loadTab(id) {\n $scope.tabsData = LocalStorageAdapter.get(LSKeys.TABS_STATE) || [defaultTabConfig];\n\n // find available tab\n const idx = findTabIndexByID(id);\n const tab = $scope.tabsData[idx];\n\n if (tab.yasrData) {\n setLoader(true, $translate.instant('query.editor.render.results.msg'), null, true);\n }\n\n // set query in editor available on the current tab\n $timeout(function () {\n if ($scope.currentQuery.query === '') {\n $scope.currentQuery.query = \" \";\n }\n $timeout(function () {\n window.editor.setValue($scope.currentQuery.query);\n $scope.yasr.updateDownloadDropdown();\n $scope.$broadcast('tabLoaded', $scope.currentQuery.id);\n\n // set query results in query results sections after\n // previous query execution. Yasr response rendering depends on the\n // query type of window.editor!\n $scope.yasr.options.output = tab.outputType; // this may be undefined, that's fine!\n if (tab.yasrData) {\n if (tab.yasrData.customError) {\n // Our injected custom (not real HTTP) error\n $scope.yasr.results = {\n getException: function () {\n return tab.yasrData.customError;\n }\n };\n setLoader(false);\n } else {\n // Real YASR result\n $timeout(function () {\n $scope.setYasrResponse(tab.yasrData, tab.textStatus, tab.jqXhrOrErrorString);\n setLoader(false);\n if ($('.yasr_btnGroup li:nth-child(2)').hasClass(\"active\")) {\n $timeout(function () {\n $('.yasr_btnGroup li:nth-child(2) a').get(0).click();\n }, 0);\n }\n }, 0);\n }\n }\n }, 0);\n }, 0);\n\n\n // persist current tab id in local storage\n LocalStorageAdapter.set(LSKeys.TABS_STATE_CURRENT_ID, id);\n\n $scope.currentQuery = tab;\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.allResultsCountExact = tab.allResultsCountExact;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.currentTabConfig.customUpdateMessage = tab.customUpdateMessage;\n $scope.currentTabConfig.errorMessage = tab.errorMessage;\n $scope.currentTabConfig.warningMessage = tab.warningMessage;\n\n $scope.$apply();\n }, 0);\n\n //Remove paddign of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n\n if (!checkQueryIntervalId) {\n checkQueryIntervalId = setInterval(showOrHideSaveAsDropDown, 200);\n }\n overrideSameAsInferenceAndNoCountIfNeeded();\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n function showOrHideSaveAsDropDown() {\n // If selected tab has results and query in editor controller is invalid save as\n // dropdown menu will be removed and on fixing query latter will be added\n if ($scope.currentTabConfig.resultsCount >= 0) {\n const $saveAsDropDown = $('.saveAsDropDown');\n if ($saveAsDropDown.length > 0 && !window.editor.queryValid) {\n yasr.header.find('.saveAsDropDown').remove();\n } else if ($saveAsDropDown.length === 0 && window.editor.queryValid) {\n yasr.updateDownloadDropdown();\n }\n }\n }\n\n function isTabChangeOk(isNew) {\n if ($scope.queryIsRunning && !$scope.namespacesLoading) {\n if (isNew) {\n toastr.info($translate.instant('query.editor.new.tab.running.query.warning.msg'));\n } else {\n toastr.info($translate.instant('query.editor.tab.switching.running.query.warning.msg'));\n }\n\n return false;\n }\n\n return true;\n }\n\n // Raise this flag to provide visual feedback to the user the next time a tab changes\n // (either manually or by the system). See GDB-1983.\n $scope.highlightNextTabChange = false;\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n // Cancel any highlight timer that might have been left by the last highlight\n $timeout.cancel(tabEvent.relatedTarget.timer);\n $(tabEvent.relatedTarget).css('color', '');\n\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n\n $scope.loadTab(getQueryID(tabEvent.target));\n\n // These arrays define how the tab change will be visually enhanced.\n // colors contains the colors to set to the tab name,\n // while times defines the times in milliseconds to keep each color.\n // Once we cycle through the arrays we restore the default color.\n const colors = ['var(--onto-orange)', '', 'var(--onto-orange)'];\n const times = [400, 400, 400];\n if ($scope.highlightNextTabChange) {\n $scope.highlightNextTabChange = false;\n let index = 0;\n $(tabEvent.target).css('color', colors[index]);\n const highlightFun = function () {\n index++;\n if (index < colors.length) {\n $(tabEvent.target).css('color', colors[index]);\n tabEvent.target.timer = $timeout(highlightFun, times[index]);\n } else {\n $(tabEvent.target).css('color', '');\n }\n };\n $timeout(highlightFun, times[index]);\n }\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = {};\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n $scope.editQueryModal = showModal('#editQueryContainer');\n $scope.deleteQueryModal = showModal('#confirmDeleteContainer');\n $scope.saveQueryModal = showModal('#saveQueryContainer');\n\n $scope.getResultsDescription = function () {\n let desc;\n if ($scope.currentTabConfig.resultsCount === 0) {\n desc = \"No results.\";\n } else {\n const currentPageEnd = ($scope.currentTabConfig.page - 1) * $scope.currentTabConfig.pageSize\n + Math.min($scope.currentTabConfig.resultsCount, $scope.currentTabConfig.pageSize);\n desc = $translate.instant('query.editor.showing.results.from.msg') + $filter('currency')($scope.currentTabConfig.offset, '', 0)\n + $translate.instant('query.editor.to') + $filter('currency')(currentPageEnd, '', 0);\n if ($scope.currentTabConfig.allResultsCount > 0) {\n // Unsure total results count \"of at least\" happens if counting timed out or\n // counting was disabled and we got at least $pageSize + 1 results for the current page.\n // It may reset become exact when we navigate and reach the end of results.\n desc += $translate.instant(($scope.currentTabConfig.allResultsCountExact\n ? 'query.editor.of' : 'query.editor.of.at.least'));\n desc += $filter('currency')($scope.currentTabConfig.allResultsCount, '', 0);\n }\n desc += \".\";\n }\n\n return desc;\n };\n\n $scope.getUpdateDescription = function () {\n if ($scope.currentTabConfig.customUpdateMessage) {\n return $translate.instant($scope.currentTabConfig.customUpdateMessage.msg, {name: $scope.currentTabConfig.customUpdateMessage.name});\n } else if ($scope.currentTabConfig.sizeDelta === undefined) {\n return '';\n } else if ($scope.currentTabConfig.sizeDelta < 0) {\n return $translate.instant('yasr.removed.statements.result.msg', {sizeDelta: Math.abs($scope.currentTabConfig.sizeDelta)});\n } else if ($scope.currentTabConfig.sizeDelta > 0) {\n return $translate.instant('yasr.added.statements.result.msg', {sizeDelta: $scope.currentTabConfig.sizeDelta});\n } else {\n return $translate.instant('yasr.statements.no.change.msg');\n }\n };\n\n $scope.getStaleWarningMessage = function () {\n const secondsAgo = Math.round((Date.now() - $scope.currentTabConfig.timeFinished) / 60000) * 60;\n if (secondsAgo >= 3600) { // must be at least an hour\n return $translate.instant('yasr.stale.result.msg', {secondsAgo: $scope.getHumanReadableSeconds(secondsAgo)});\n }\n };\n\n const resize = function () {\n // $scope.fixSizesOnHorizontalViewModeSwitch();\n };\n\n angular.element($window).bind('resize', resize);\n\n $scope.$on('$destroy', function () {\n angular.element($window).unbind('resize', resize);\n });\n\n /**\n * In case of Ontop repository, sameAs, inference and nocount are\n * overridden to true and #sameAs and #inference buttons are disabled, In case of FedX repo nocount is overridden\n */\n function overrideSameAsInferenceAndNoCountIfNeeded() {\n const isOntop = $repositories.isActiveRepoOntopType();\n const isFedX = $repositories.isActiveRepoFedXType();\n handleSameAsAndInferenceBtns(isOntop);\n\n $scope.nocount = (isOntop || isFedX) ? true : !principal.appSettings.EXECUTE_COUNT;\n if (isOntop) {\n $scope.currentQuery.inference = true;\n $scope.currentQuery.sameAs = true;\n }\n }\n\n function handleSameAsAndInferenceBtns(isOntop) {\n const sameAsBtn = document.getElementById('sameAs');\n const inferenceBtn = document.getElementById('inference');\n\n if (sameAsBtn) {\n sameAsBtn.disabled = !!isOntop;\n }\n\n if (inferenceBtn) {\n inferenceBtn.disabled = !!isOntop;\n }\n }\n\n // The sameAs is meaningless without inference.\n // Set its value to false and disable button\n function shouldDisableSameAs() {\n // don't try to override sameAs if repository is Ontop type\n if ($repositories.isActiveRepoOntopType()) {\n return;\n }\n const sameAsBtn = document.getElementById('sameAs');\n if (sameAsBtn && !$scope.currentQuery.inference && !sameAsBtn.disabled) {\n sameAsBtn.disabled = true;\n $scope.currentQuery.sameAs = false;\n } else if ($scope.currentQuery.inference && sameAsBtn.disabled) {\n sameAsBtn.removeAttribute('disabled');\n $scope.currentQuery.sameAs = principal.appSettings.DEFAULT_SAMEAS;\n }\n }\n}\n\nQuerySampleModalCtrl.$inject = ['$scope', '$modalInstance', 'data', '$sce'];\n\nfunction QuerySampleModalCtrl($scope, $modalInstance, data, $sce) {\n if (data.queryExists) {\n $scope.queryExists = true;\n }\n $scope.query = angular.copy(data.query);\n $scope.title = data.title;\n $scope.edit = data.edit;\n $scope.okButtonText = data.okButtonText;\n $scope.existingQueryErrMsg = $sce.trustAsHtml(data.existingQueryErrMsg);\n $scope.ok = function () {\n if ($scope.form.$valid) {\n $modalInstance.close($scope.query);\n }\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/explore/controllers.js","webpack:///./src/js/lib/FileSaver-patch.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///./src/js/angular/utils/file-types.js"],"names":["ExploreCtrl","$scope","$http","$location","toastr","$routeParams","$repositories","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$languageService","$q","yasr","role","search","when","getPrincipal","then","principal","inference","appSettings","sameAs","loading","getActiveRepository","isTripleResource","tripleParam","encodeURIComponent","param","getRdfStarLocalNames","triple","localNames","slice","replace","split","forEach","uri","getLocalName","inferences","id","title","context","blanks","formats","window","editor","getQueryType","$watch","usedPrefixes","loadResource","getNamespaces","success","data","results","bindings","e","prefix","value","namespace","$on","destroy","document","getElementById","getUsedPrefixes","persistency","hideHeader","locale","getLanguage","translateHeaders","pluginsOptions","getYasrConfiguration","error","instant","getError","localName","uriParam","hash","absUrl","url","method","params","headers","details","encodeURI","exploreResource","isContextAvailable","goToGraphsViz","path","toggleOntoLoader","showLoader","yasrInnerContainer","angular","element","resultsLoader","addClass","removeClass","Promise","resolve","principalRequestPromise","$","ajax","bnodes","Accept","done","textStatus","jqXhr","setResponse","fail","downloadExport","format","encodedURI","type","response","indexOf","JSON","stringify","ua","navigator","userAgent","toLowerCase","open","extension","file","Blob","msg","changeRole","roleVar","changeInference","copyToClipboardResult","openCopyToClipboardModal","event","args","options","changeLanguage","FindResourceCtrl","$timeout","AutocompleteRestService","checkAutocompleteStatus","warningMsg","warning","allowHtml","autocompleteEnabled","getAllNamespacesForActiveRepository","namespaces","map","loader","validateRdfUri","hasAngleBrackets","lastIndexOf","length","noAngleBrackets","validProtocol","test","validPath","schemaSlashesIdx","substring","expandedUri","submit","setFormInvalid","isDirty","form","$dirty","getAutocompleteSuggestions","str","newExpandedUri","getNamespaceUriForPrefix","val","promise","query","inputChangedFn","selectedUriCallback","selected","selectedUri","name","isDefined","click","EditResourceCtrl","$modal","StatementsService","newRow","subject","object","datatype","newResource","datatypeOptions","getDatatypeOptions","activeRepository","getClassInstancesDetails","getDetails","getGraph","res","statements","buildStatements","addStatement","newRowPredicate","$setSubmitted","newRowObject","newRowContext","$valid","push","copy","$setPristine","$setUntouched","removeStatement","idx","splice","checkValid","isUndefined","validEditRow","rowform","viewTrig","templateUrl","controller","size","transformToTrig","save","timer","cancel","validateUri","check","text","count","match","undefined","trim","ViewTrigCtrl","$modalInstance","trig","dismiss","module","$inject","saveAs","view","doc","get_URL","URL","webkitURL","save_link","createElementNS","webkit_req_fs","webkitRequestFileSystem","req_fs","requestFileSystem","mozRequestFileSystem","throw_outside","ex","setImmediate","setTimeout","fs_min_size","revoke","revoker","revokeObjectURL","remove","chrome","dispatch","filesaver","event_types","i","concat","listener","call","auto_bom","blob","FileSaver","object_url","target_view","this","blob_changed","dispatch_all","fs_error","createObjectURL","location","href","safari","readyState","DONE","abortable","func","apply","arguments","create_if_not_found","create","exclusive","INIT","download","node","MouseEvent","dispatchEvent","webkitSlice","TEMPORARY","fs","root","getDirectory","dir","getFile","createWriter","writer","onwriteend","toURL","onerror","code","ABORT_ERR","write","abort","WRITING","NOT_FOUND_ERR","FS_proto","prototype","msSaveOrOpenBlob","onwritestart","onprogress","onwrite","onabort","self","content","exports","Error","__webpack_amd_options__"],"mappings":"8FAAA,2DA0BA,SAASA,EAAYC,EAAQC,EAAOC,EAAWC,EAAQC,EAAcC,EAAeC,EAA6BC,EAAcC,EAA8BC,EAAWC,EAAUC,EAAYC,EAAkBC,GAI5M,IAiD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,OAAX,QAAmC,MAAd,cAG/D,KAFU,EAAF,WACP,OAAOA,GACR,QAFM,OAEN,e,kBC1PHF,EAAOsF,QAAU,WAChB,MAAM,IAAIC,MAAM,oC,mBCDjB,YACAvF,EAAOsF,QAAUE,I,gCCDjBlO,QAAQ0I,OAAO,oCAAqC,IAC/C5K,MAAM,YAAa,CAChB,CAACoH,KAAM,OAAQ9D,KAAM,uBAAwBU,UAAW,SACxD,CAACoD,KAAM,UAAW9D,KAAM,sBAAuBU,UAAW,WAC1D,CAACoD,KAAM,UAAW9D,KAAM,sBAAuBU,UAAW,QAC1D,CAACoD,KAAM,KAAM9D,KAAM,cAAeU,UAAW,OAC7C,CAACoD,KAAM,YAAa9D,KAAM,aAAcU,UAAW,OACnD,CAACoD,KAAM,UAAW9D,KAAM,gBAAiBU,UAAW,OACpD,CAACoD,KAAM,SAAU9D,KAAM,cAAeU,UAAW,QACjD,CAACoD,KAAM,UAAW9D,KAAM,2BAA4BU,UAAW,SAC/D,CAACoD,KAAM,OAAQ9D,KAAM,mBAAoBU,UAAW,SACpD,CAACoD,KAAM,OAAQ9D,KAAM,qBAAsBU,UAAW,SACtD,CAACoD,KAAM,QAAS9D,KAAM,yBAA0BU,UAAW,UAC3D,CAACoD,KAAM,aAAc9D,KAAM,2BAA4BU,UAAW","file":"7.c7d8fb1dfdb444052435.bundle.js","sourcesContent":["import 'angular/utils/file-types';\nimport YASR from 'lib/yasr.bundled';\nimport {saveAs} from 'lib/FileSaver-patch';\nimport {decodeHTML} from \"../../../app\";\nimport {YasrUtils} from \"../utils/yasr-utils\";\n\nconst modules = [\n 'ngCookies',\n 'ngRoute',\n 'ui.bootstrap',\n 'toastr',\n 'graphdb.framework.core',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.explore.services',\n 'graphdb.workbench.utils.filetypes'\n];\n\nangular\n .module('graphdb.framework.explore.controllers', modules)\n .controller('FindResourceCtrl', FindResourceCtrl)\n .controller('ExploreCtrl', ExploreCtrl)\n .controller('EditResourceCtrl', EditResourceCtrl)\n .controller('ViewTrigCtrl', ViewTrigCtrl);\n\nExploreCtrl.$inject = ['$scope', '$http', '$location', 'toastr', '$routeParams', '$repositories', 'ClassInstanceDetailsService', 'ModalService', 'RDF4JRepositoriesRestService', 'FileTypes', '$jwtAuth', '$translate', '$languageService', '$q'];\n\nfunction ExploreCtrl($scope, $http, $location, toastr, $routeParams, $repositories, ClassInstanceDetailsService, ModalService, RDF4JRepositoriesRestService, FileTypes, $jwtAuth, $translate, $languageService, $q) {\n // Defaults\n $scope.role = $location.search().role ? $location.search().role : 'subject';\n\n let principalRequestPromise;\n // We need to get sameAs and inference for the current user\n // Using $q.when to proper set values in view\n $q.when($jwtAuth.getPrincipal())\n .then((principal) => {\n // Get the predefined settings for sameAs and inference per user\n $scope.inference = principal.appSettings['DEFAULT_INFERENCE'] && !$scope.role === 'context' ? 'all' : 'explicit';\n $scope.sameAs = principal.appSettings['DEFAULT_INFERENCE'] && principal.appSettings['DEFAULT_SAMEAS'];\n });\n\n $scope.loading = false;\n\n $scope.getActiveRepository = function () {\n return $repositories.getActiveRepository();\n };\n\n $scope.isTripleResource = function () {\n return !!$scope.tripleParam;\n };\n\n // TODO move this to core\n $scope.encodeURIComponent = function (param) {\n return encodeURIComponent(param);\n };\n\n $scope.getRdfStarLocalNames = function (triple) {\n let localNames = triple.slice();\n const trimmed = triple.replace(/[<>]+/g, '');\n trimmed.split(' ').forEach(uri => {\n localNames = localNames.replace(uri, ClassInstanceDetailsService.getLocalName(uri));\n });\n return localNames;\n };\n\n $scope.inferences = [\n {id: 'all', title: 'explore.explicit.implicit'},\n {id: 'explicit', title: 'explore.explicit'},\n {id: 'implicit', title: 'explore.implicit'}\n ];\n $scope.context = '';\n\n $scope.getLocalName = function (uri) {\n return ClassInstanceDetailsService.getLocalName(uri);\n };\n\n $scope.blanks = true;\n\n $scope.formats = FileTypes;\n\n let yasr;\n\n window.editor = {};\n window.editor.getQueryType = function () {\n return 'RESOURCE';\n };\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n if ($scope.getActiveRepository()) {\n if ($scope.usedPrefixes) {\n $scope.loadResource();\n } else {\n RDF4JRepositoriesRestService.getNamespaces($scope.getActiveRepository())\n .success(function (data) {\n $scope.usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n $scope.usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.$on('$destroy', function () {\n if (yasr) {\n yasr.destroy();\n }\n });\n yasr = YASR(document.getElementById('yasr'), { // eslint-disable-line new-cap\n //this way, the URLs in the results are prettified using the defined prefixes\n getUsedPrefixes: $scope.usedPrefixes,\n persistency: false,\n hideHeader: true,\n locale: $languageService.getLanguage(),\n // Additional option for translation.\n // For the explore view could be applied\n translateHeaders: true,\n pluginsOptions: YasrUtils.getYasrConfiguration()\n });\n $scope.loadResource();\n }).error(function (data) {\n toastr.error($translate.instant('get.namespaces.error.msg', {error: getError(data)}));\n });\n }\n }\n });\n\n $scope.loadResource = function () {\n if ($routeParams.prefix && $routeParams.localName && $scope.usedPrefixes[$routeParams.prefix]) {\n // /resource/PREFIX/LOCAL -> URI = expanded PREFIX + LOCAL\n $scope.uriParam = $scope.usedPrefixes[$routeParams.prefix] + $routeParams.localName;\n } else if ($location.search().uri) {\n // uri parameter -> URI\n $scope.uriParam = $location.search().uri + ($location.hash() ? '#' + $location.hash() : '');\n } else if ($location.search().triple) {\n // uri parameter -> URI\n $scope.tripleParam = $location.search().triple + ($location.hash() ? '#' + $location.hash() : '');\n } else {\n // absolute URI -> URI\n $scope.uriParam = $location.absUrl();\n }\n if ($routeParams.context != null) {\n $scope.context = $routeParams.context;\n }\n // remove angle brackets which were allowed when filling out the search input field\n // but are forbidden when passing the uri as a query parameter\n $scope.uriParam = $scope.uriParam && $scope.uriParam.replace(/<|>/g, \"\");\n\n // Get resource details\n $http({\n url: 'rest/explore/details',\n method: 'GET',\n params: {\n uri: $scope.uriParam,\n triple: $scope.tripleParam,\n context: $scope.context\n },\n headers: {\n 'Accept': 'application/json'\n }\n }).success(function (data) {\n $scope.details = data;\n $scope.context = $scope.details.context;\n if ($scope.details.uri !== 'object') {\n $scope.details.encodeURI = encodeURIComponent($scope.details.uri);\n }\n }).error(function (data) {\n toastr.error($translate.instant('explore.error.resource.details', {data: getError(data)}));\n });\n\n $scope.exploreResource();\n };\n\n $scope.isContextAvailable = function () {\n return $scope.context !== null && $scope.context === \"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph\";\n };\n\n $scope.goToGraphsViz = function () {\n $location.path('graphs-visualizations').search('uri', $scope.uriParam);\n };\n\n const toggleOntoLoader = function (showLoader) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n const resultsLoader = angular.element(document.getElementById('results-loader'));\n const opacityHideClass = 'opacity-hide';\n /* Angular b**it. For some reason the loader behaved strangely with ng-show not always showing */\n if (showLoader) {\n $scope.loading = true;\n yasrInnerContainer.addClass(opacityHideClass);\n resultsLoader.removeClass(opacityHideClass);\n } else {\n $scope.loading = false;\n yasrInnerContainer.removeClass(opacityHideClass);\n resultsLoader.addClass(opacityHideClass);\n }\n };\n\n // Get resource table\n $scope.exploreResource = function () {\n toggleOntoLoader(true);\n if ($routeParams.context != null) {\n $scope.context = $routeParams.context;\n }\n // Remember the role in the URL so the URL is stable and leads back to the same view\n $location.search('role', $scope.role);\n // wait for principal request if it has not finished and then fetch graph\n Promise.resolve(principalRequestPromise)\n .then(() => getGraph());\n };\n\n function getGraph() {\n const headers = {Accept: 'application/x-graphdb-table-results+json'};\n $.ajax({\n method: 'GET',\n url: 'rest/explore/graph',\n data: {\n uri: $scope.uriParam,\n triple: $scope.tripleParam,\n inference: $scope.inference,\n role: $scope.role,\n bnodes: $scope.blanks,\n sameAs: $scope.sameAs,\n context: $scope.context\n },\n headers: headers\n }).done(function (data, textStatus, jqXhr) {\n toggleOntoLoader(false);\n // Pass the xhr argument first as the yasr expects it that way. See https://ontotext.atlassian.net/browse/GDB-3939\n yasr.setResponse(jqXhr, textStatus);\n }).fail(function (data) {\n toastr.error($translate.instant('explore.error.resource', {data: getError(data)}));\n toggleOntoLoader(false);\n });\n }\n\n $scope.downloadExport = function (format) {\n let param;\n let encodedURI;\n if ($scope.uriParam) {\n param = 'uri=';\n encodedURI = encodeURIComponent($scope.uriParam);\n } else {\n param = 'triple=';\n encodedURI = encodeURIComponent($scope.tripleParam);\n }\n\n $http({\n method: 'GET',\n url: 'rest/explore/graph?' + param + encodedURI +\n \"&role=\" + $scope.role +\n \"&inference=\" + $scope.inference +\n \"&bnodes=\" + $scope.blanks +\n \"&sameAs=\" + $scope.sameAs +\n ($scope.context ? \"&context=\" + encodeURIComponent($scope.context) : \"\"),\n headers: {\n 'Accept': format.type\n }\n }).success(function (response) {\n let data = response;\n if (format.type.indexOf('json') > -1) {\n data = JSON.stringify(data);\n }\n // TODO: Use bowser library to get the browser type\n const ua = navigator.userAgent.toLowerCase();\n if (ua.indexOf('safari') !== -1 && ua.indexOf('chrome') === -1) {\n window.open('data:attachment/csv;filename=\"statements.' + format.extension + '\",' + encodeURIComponent(data), 'statements.' + format.extension);\n } else {\n const file = new Blob([data], {type: format.type});\n saveAs(file, 'statements' + format.extension);\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n });\n };\n\n $scope.changeRole = function (roleVar) {\n $scope.role = roleVar;\n if ($scope.role === 'context') {\n $scope.inference = 'explicit';\n }\n $scope.exploreResource();\n };\n\n $scope.changeInference = function (inference) {\n $scope.inference = inference;\n $scope.exploreResource();\n };\n\n $scope.copyToClipboardResult = function (uri) {\n ModalService.openCopyToClipboardModal(uri);\n };\n\n $scope.$on('language-changed', function (event, args) {\n if (yasr && yasr.options) {\n yasr.options.locale = args.locale;\n yasr.changeLanguage(args.locale);\n }\n });\n}\n\nFindResourceCtrl.$inject = ['$scope', '$http', '$location', '$repositories', '$q', '$timeout', 'toastr', 'AutocompleteRestService', 'ClassInstanceDetailsService', '$routeParams', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction FindResourceCtrl($scope, $http, $location, $repositories, $q, $timeout, toastr, AutocompleteRestService, ClassInstanceDetailsService, $routeParams, RDF4JRepositoriesRestService, $translate) {\n $scope.submit = submit;\n $scope.getAutocompleteSuggestions = getAutocompleteSuggestions;\n $scope.inputChangedFn = inputChangedFn;\n $scope.selectedUriCallback = selectedUriCallback;\n\n $scope.selectedUri = {name: \"\"};\n\n $scope.autocompleteEnabled = false;\n\n if (angular.isDefined($routeParams.search)) {\n $timeout(function () {\n $('#resources_finder_value').val($routeParams.search);\n $('.search-button').click();\n }, 500);\n }\n\n function checkAutocompleteStatus() {\n AutocompleteRestService.checkAutocompleteStatus()\n .success(function (response) {\n if (!response) {\n const warningMsg = decodeHTML($translate.instant('explore.autocomplete.warning.msg'));\n toastr.warning('', `<div class=\"autocomplete-toast\"><a href=\"autocomplete\">${warningMsg}</a></div>`,\n {allowHtml: true});\n }\n $scope.autocompleteEnabled = response;\n })\n .error(function () {\n toastr.error($translate.instant('explore.error.autocomplete'));\n });\n }\n\n function getAllNamespacesForActiveRepository() {\n RDF4JRepositoriesRestService.getNamespaces($repositories.getActiveRepository())\n .success(function (data) {\n $scope.namespaces = data.results.bindings.map(function (e) {\n return {\n prefix: e.prefix.value,\n uri: e.namespace.value\n };\n });\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n }\n\n function validateRdfUri(value) {\n // has a pair of angle brackets and the closing one is the last char of the string\n const hasAngleBrackets = value.indexOf(\"<\") >= 0 && value.lastIndexOf(\">\") === value.length - 1;\n\n // does not have a pair of angle bracket - if only one of the is available that is incorrect\n const noAngleBrackets = value.indexOf(\"<\") === -1 && value.lastIndexOf(\">\") === -1;\n\n const validProtocol = /^<?[http|urn].*>?$/.test(value) && (hasAngleBrackets || noAngleBrackets);\n let validPath = false;\n if (validProtocol) {\n if (value.indexOf(\"http\") >= 0) {\n const schemaSlashesIdx = value.indexOf('//');\n validPath = schemaSlashesIdx > 4\n && value.substring(schemaSlashesIdx + 2).length > 0;\n } else if (value.indexOf(\"urn\") >= 0) {\n validPath = value.substring(4).length > 0;\n }\n }\n return validProtocol && validPath;\n }\n\n let uri;\n\n function submit(uri) {\n function setFormInvalid(isDirty) {\n // does not work yet\n $timeout(function () {\n if ($scope.form) {\n $scope.form.$dirty = isDirty;\n }\n });\n }\n\n if (!uri) {\n uri = document.getElementById(\"resources_finder_value\").value;\n }\n if (uri && validateRdfUri(uri)) {\n setFormInvalid(false);\n $location\n .path('resource')\n .search('uri', uri);\n } else {\n setFormInvalid(true);\n if (uri) {\n toastr.error($translate.instant('explore.error.invalid.input'));\n }\n }\n }\n\n if ($scope.getActiveRepository()) {\n checkAutocompleteStatus();\n getAllNamespacesForActiveRepository();\n }\n\n // use a global var to keep old uri in order to change it when a new one appears\n let expandedUri;\n\n function getAutocompleteSuggestions(str) {\n // expand prefix to uri only if the last character of the input is a colon and\n // there are no angle brackets because they are allowed only for absolute uris\n const ANGLE_BRACKETS_REGEX = /<|>/;\n if (!ANGLE_BRACKETS_REGEX.test(str) && str.slice(-1) === ':') {\n const newExpandedUri = ClassInstanceDetailsService.getNamespaceUriForPrefix($scope.namespaces, str.slice(0, -1));\n expandedUri = (newExpandedUri !== expandedUri) ? newExpandedUri : expandedUri;\n if (expandedUri) {\n $(\"#resources_finder_value\").val(expandedUri);\n }\n }\n\n let promise;\n if ($scope.autocompleteEnabled) {\n // add semicolon after the expanded uri in order to filter only by local names for this uri\n const query = str.replace(expandedUri, expandedUri + ';');\n promise = AutocompleteRestService.getAutocompleteSuggestions(query);\n } else {\n // return empty promise\n promise = $q.when($scope.autocompleteEnabled);\n }\n return promise;\n }\n\n $scope.$on('repositoryIsSet', function () {\n checkAutocompleteStatus();\n getAllNamespacesForActiveRepository();\n });\n\n function inputChangedFn() {\n uri = document.getElementById(\"resources_finder_value\").value;\n $scope.form.$dirty = !(uri && validateRdfUri(uri));\n }\n\n function selectedUriCallback(selected) {\n $scope.selectedUri = {name: selected.title};\n submit($scope.selectedUri.name);\n }\n}\n\nEditResourceCtrl.$inject = ['$scope', '$http', '$location', 'toastr', '$repositories', '$modal', '$timeout', 'ClassInstanceDetailsService', 'StatementsService', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction EditResourceCtrl($scope, $http, $location, toastr, $repositories, $modal, $timeout, ClassInstanceDetailsService, StatementsService, RDF4JRepositoriesRestService, $translate) {\n $scope.uriParam = $location.search().uri;\n $scope.newRow = {\n subject: $scope.uriParam,\n object: {\n type: 'uri',\n datatype: ''\n }\n };\n $scope.newResource = false;\n $scope.datatypeOptions = StatementsService.getDatatypeOptions();\n\n $scope.activeRepository = function () {\n return $repositories.getActiveRepository();\n };\n\n $scope.getClassInstancesDetails = getClassInstancesDetails;\n $scope.addStatement = addStatement;\n $scope.removeStatement = removeStatement;\n $scope.getLocalName = getLocalName;\n $scope.checkValid = checkValid;\n $scope.validEditRow = validEditRow;\n $scope.viewTrig = viewTrig;\n $scope.save = save;\n\n function getClassInstancesDetails() {\n RDF4JRepositoriesRestService.getNamespaces($scope.activeRepository())\n .success(function (data) {\n $scope.namespaces = data.results.bindings.map(function (e) {\n return {\n prefix: e.prefix.value,\n uri: e.namespace.value\n };\n });\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n\n ClassInstanceDetailsService.getDetails($scope.uriParam)\n .success(function (data) {\n $scope.details = data;\n $scope.details.encodeURI = encodeURIComponent($scope.details.uri);\n }).error(function (data) {\n toastr.error($translate.instant('explore.error.resource.details', {data: getError(data)}));\n });\n\n ClassInstanceDetailsService.getGraph($scope.uriParam)\n .then(function (res) {\n const statements = StatementsService.buildStatements(res, $scope.uriParam);\n $scope.statements = statements;\n $scope.newResource = !statements.length;\n });\n }\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n if ($scope.activeRepository()) {\n $scope.getClassInstancesDetails();\n }\n });\n\n $scope.validateUri = function (val) {\n let check = true;\n const text = val ? val : '';\n\n if (text.indexOf(':') === -1) {\n check = false;\n } else {\n const prefix = text.substring(0, text.indexOf(':'));\n const uriForPrefixNotAvailable = ClassInstanceDetailsService.getNamespaceUriForPrefix($scope.namespaces, prefix) === '';\n if (uriForPrefixNotAvailable) {\n // TODO: There's this reported useless escape character for this regex, but I'm not sure if and can I fix it.\n if (/^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$/.test(text) === false) {\n check = false;\n }\n\n const count = text.match(/\\//g);\n\n if (count === undefined || count.length < 3) {\n check = false;\n }\n } else {\n const restText = text.substring(text.indexOf(':') + 1).trim();\n if (restText.length < 1) {\n check = false;\n }\n }\n }\n\n return check;\n };\n\n function addStatement() {\n $scope.newRowPredicate.$setSubmitted();\n $scope.newRowObject.$setSubmitted();\n $scope.newRowContext.$setSubmitted();\n if ($scope.newRowPredicate.$valid && $scope.newRowObject.$valid && $scope.newRowContext.$valid) {\n $scope.statements.push(angular.copy($scope.newRow));\n $scope.newRow = {\n subject: $scope.uriParam,\n object: {\n type: 'uri',\n datatype: ''\n }\n };\n $scope.newRowPredicate.$setPristine();\n $scope.newRowPredicate.$setUntouched();\n $scope.newRowObject.$setPristine();\n $scope.newRowObject.$setUntouched();\n $scope.newRowContext.$setPristine();\n $scope.newRowContext.$setUntouched();\n }\n }\n\n function checkValid(data) {\n if (!angular.isUndefined(data)) {\n return true;\n }\n return $translate.instant('explore.validation');\n }\n\n function validEditRow() {\n return $scope.rowform.$valid;\n }\n\n function removeStatement(idx) {\n $scope.statements.splice(idx, 1);\n }\n\n function getLocalName(uri) {\n return ClassInstanceDetailsService.getLocalName(uri);\n }\n\n function viewTrig() {\n $modal.open({\n templateUrl: 'js/angular/explore/templates/viewTrig.html',\n controller: 'ViewTrigCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return StatementsService.transformToTrig($scope.statements);\n }\n }\n });\n }\n\n function save() {\n const method = $scope.newResource ? 'POST' : 'PUT';\n $http({\n method: method,\n url: 'rest/resource?uri=' + encodeURIComponent($scope.uriParam),\n headers: {\n 'Content-Type': 'application/x-trig'\n },\n data: StatementsService.transformToTrig($scope.statements)\n }).success(function () {\n toastr.success($translate.instant('explore.resource.saved'));\n const timer = $timeout(function () {\n $location.path('resource').search('uri', $scope.uriParam);\n }, 500);\n $scope.$on(\"$destroy\", function () {\n $timeout.cancel(timer);\n });\n }).error(function (data) {\n toastr.error(getError(data));\n });\n }\n}\n\nViewTrigCtrl.$inject = ['$scope', '$modalInstance', 'data'];\n\nfunction ViewTrigCtrl($scope, $modalInstance, data) {\n $scope.trig = data;\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n","/* FileSaver.js\n * A saveAs() FileSaver implementation.\n * 2015-05-07.2\n *\n * By Eli Grey, http://eligrey.com\n * License: X11/MIT\n * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n */\n\n/*global self */\n/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\n\nvar saveAs = saveAs || (function(view) {\n\t\"use strict\";\n\t// IE <10 is explicitly unsupported\n\tif (typeof navigator !== \"undefined\" && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n\t\treturn;\n\t}\n\tvar\n\t\t doc = view.document\n\t\t // only get URL when necessary in case Blob.js hasn't overridden it yet\n\t\t, get_URL = function() {\n\t\t\treturn view.URL || view.webkitURL || view;\n\t\t}\n\t\t, save_link = doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"a\")\n\t\t, can_use_save_link = \"download\" in save_link\n\t\t, click = function(node) {\n\t\t\tvar event = new MouseEvent(\"click\");\n\t\t\tnode.dispatchEvent(event);\n\t\t}\n\t\t, webkit_req_fs = view.webkitRequestFileSystem\n\t\t, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem\n\t\t, throw_outside = function(ex) {\n\t\t\t(view.setImmediate || view.setTimeout)(function() {\n\t\t\t\tthrow ex;\n\t\t\t}, 0);\n\t\t}\n\t\t, force_saveable_type = \"application/octet-stream\"\n\t\t, fs_min_size = 0\n\t\t// See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and\n\t\t// https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047\n\t\t// for the reasoning behind the timeout and revocation flow\n\t\t, arbitrary_revoke_timeout = 500 // in ms\n\t\t, revoke = function(file) {\n\t\t\tvar revoker = function() {\n\t\t\t\tif (typeof file === \"string\") { // file is an object URL\n\t\t\t\t\tget_URL().revokeObjectURL(file);\n\t\t\t\t} else { // file is a File\n\t\t\t\t\tfile.remove();\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (view.chrome) {\n\t\t\t\trevoker();\n\t\t\t} else {\n\t\t\t\tsetTimeout(revoker, arbitrary_revoke_timeout);\n\t\t\t}\n\t\t}\n\t\t, dispatch = function(filesaver, event_types, event) {\n\t\t\tevent_types = [].concat(event_types);\n\t\t\tvar i = event_types.length;\n\t\t\twhile (i--) {\n\t\t\t\tvar listener = filesaver[\"on\" + event_types[i]];\n\t\t\t\tif (typeof listener === \"function\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener.call(filesaver, event || filesaver);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tthrow_outside(ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t, auto_bom = function(blob) {\n\t\t\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t\t\tif (/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\t\t\treturn new Blob([\"\\ufeff\", blob], {type: blob.type});\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t\t, FileSaver = function(blob, name) {\n\t\t\tblob = auto_bom(blob);\n\t\t\t// First try a.download, then web filesystem, then object URLs\n\t\t\tvar\n\t\t\t\t filesaver = this\n\t\t\t\t, type = blob.type\n\t\t\t\t, blob_changed = false\n\t\t\t\t, object_url\n\t\t\t\t, target_view\n\t\t\t\t, dispatch_all = function() {\n\t\t\t\t\tdispatch(filesaver, \"writestart progress write writeend\".split(\" \"));\n\t\t\t\t}\n\t\t\t\t// on any filesys errors revert to saving with object URLs\n\t\t\t\t, fs_error = function() {\n\t\t\t\t\t// don't create more object URLs than needed\n\t\t\t\t\tif (blob_changed || !object_url) {\n\t\t\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t\t}\n\t\t\t\t\tif (target_view) {\n\t\t\t\t\t\ttarget_view.location.href = object_url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar new_tab = view.open(object_url, \"_blank\");\n\t\t\t\t\t\tif (new_tab == undefined && typeof safari !== \"undefined\") {\n\t\t\t\t\t\t\t//Apple do not allow window.open, see http://bit.ly/1kZffRI\n\t\t\t\t\t\t\tview.location.href = object_url\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t}\n\t\t\t\t, abortable = function(func) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif (filesaver.readyState !== filesaver.DONE) {\n\t\t\t\t\t\t\treturn func.apply(this, arguments);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t, create_if_not_found = {create: true, exclusive: false}\n\t\t\t\t, slice\n\t\t\t;\n\t\t\tfilesaver.readyState = filesaver.INIT;\n\t\t\tif (!name) {\n\t\t\t\tname = \"download\";\n\t\t\t}\n\t\t\tif (save_link) {\n\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t//window.open('data:attachment/csv;charset=utf-8,' + object_url);\n\t\t\t\tsave_link.href = object_url;\n\t\t\t\tsave_link.download = name;\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tclick(save_link);\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Object and web filesystem URLs have a problem saving in Google Chrome when\n\t\t\t// viewed in a tab, so I force save with application/octet-stream\n\t\t\t// http://code.google.com/p/chromium/issues/detail?id=91158\n\t\t\t// Update: Google errantly closed 91158, I submitted it again:\n\t\t\t// https://code.google.com/p/chromium/issues/detail?id=389642\n\t\t\tif (view.chrome && type && type !== force_saveable_type) {\n\t\t\t\tslice = blob.slice || blob.webkitSlice;\n\t\t\t\tblob = slice.call(blob, 0, blob.size, force_saveable_type);\n\t\t\t\tblob_changed = true;\n\t\t\t}\n\t\t\t// Since I can't be sure that the guessed media type will trigger a download\n\t\t\t// in WebKit, I append .download to the filename.\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=65440\n\t\t\tif (webkit_req_fs && name !== \"download\") {\n\t\t\t\tname += \".download\";\n\t\t\t}\n\t\t\tif (type === force_saveable_type || webkit_req_fs) {\n\t\t\t\ttarget_view = view;\n\t\t\t}\n\t\t\tif (!req_fs) {\n\t\t\t\tfs_error();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfs_min_size += blob.size;\n\t\t\treq_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {\n\t\t\t\tfs.root.getDirectory(\"saved\", create_if_not_found, abortable(function(dir) {\n\t\t\t\t\tvar save = function() {\n\t\t\t\t\t\tdir.getFile(name, create_if_not_found, abortable(function(file) {\n\t\t\t\t\t\t\tfile.createWriter(abortable(function(writer) {\n\t\t\t\t\t\t\t\twriter.onwriteend = function(event) {\n\t\t\t\t\t\t\t\t\ttarget_view.location.href = file.toURL();\n\t\t\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\t\t\tdispatch(filesaver, \"writeend\", event);\n\t\t\t\t\t\t\t\t\trevoke(file);\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\twriter.onerror = function() {\n\t\t\t\t\t\t\t\t\tvar error = writer.error;\n\t\t\t\t\t\t\t\t\tif (error.code !== error.ABORT_ERR) {\n\t\t\t\t\t\t\t\t\t\tfs_error();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\"writestart progress write abort\".split(\" \").forEach(function(event) {\n\t\t\t\t\t\t\t\t\twriter[\"on\" + event] = filesaver[\"on\" + event];\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\twriter.write(blob);\n\t\t\t\t\t\t\t\tfilesaver.abort = function() {\n\t\t\t\t\t\t\t\t\twriter.abort();\n\t\t\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tfilesaver.readyState = filesaver.WRITING;\n\t\t\t\t\t\t\t}), fs_error);\n\t\t\t\t\t\t}), fs_error);\n\t\t\t\t\t};\n\t\t\t\t\tdir.getFile(name, {create: false}, abortable(function(file) {\n\t\t\t\t\t\t// delete file if it already exists\n\t\t\t\t\t\tfile.remove();\n\t\t\t\t\t\tsave();\n\t\t\t\t\t}), abortable(function(ex) {\n\t\t\t\t\t\tif (ex.code === ex.NOT_FOUND_ERR) {\n\t\t\t\t\t\t\tsave();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfs_error();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}), fs_error);\n\t\t\t}), fs_error);\n\t\t}\n\t\t, FS_proto = FileSaver.prototype\n\t\t, saveAs = function(blob, name) {\n\t\t\treturn new FileSaver(blob, name);\n\t\t}\n\t;\n\t// IE 10+ (native saveAs)\n\tif (typeof navigator !== \"undefined\" && navigator.msSaveOrOpenBlob) {\n\t\treturn function(blob, name) {\n\t\t\treturn navigator.msSaveOrOpenBlob(auto_bom(blob), name);\n\t\t};\n\t}\n\n\tFS_proto.abort = function() {\n\t\tvar filesaver = this;\n\t\tfilesaver.readyState = filesaver.DONE;\n\t\tdispatch(filesaver, \"abort\");\n\t};\n\tFS_proto.readyState = FS_proto.INIT = 0;\n\tFS_proto.WRITING = 1;\n\tFS_proto.DONE = 2;\n\n\tFS_proto.error =\n\tFS_proto.onwritestart =\n\tFS_proto.onprogress =\n\tFS_proto.onwrite =\n\tFS_proto.onabort =\n\tFS_proto.onerror =\n\tFS_proto.onwriteend =\n\t\tnull;\n\n\treturn saveAs;\n}(\n\t typeof self !== \"undefined\" && self\n\t|| typeof window !== \"undefined\" && window\n\t|| this.content\n));\n// `self` is undefined in Firefox for Android content script context\n// while `this` is nsIContentFrameMessageManager\n// with an attribute `content` that corresponds to the window\n\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports.saveAs = saveAs;\n} else if ((typeof define !== \"undefined\" && define !== null) && (define.amd != null)) {\n define([], function() {\n return saveAs;\n });\n}","module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n","angular.module('graphdb.workbench.utils.filetypes', [])\n .value('FileTypes', [\n {name: 'JSON', type: 'application/rdf+json', extension: '.json'},\n {name: 'JSON-LD', type: 'application/ld+json', extension: '.jsonld'},\n {name: 'RDF-XML', type: 'application/rdf+xml', extension: '.rdf'},\n {name: 'N3', type: 'text/rdf+n3', extension: '.n3'},\n {name: 'N-Triples', type: 'text/plain', extension: '.nt'},\n {name: 'N-Quads', type: 'text/x-nquads', extension: '.nq'},\n {name: 'Turtle', type: 'text/turtle', extension: '.ttl'},\n {name: 'Turtle*', type: 'application/x-turtlestar', extension: '.ttls'},\n {name: 'TriX', type: 'application/trix', extension: '.trix'},\n {name: 'TriG', type: 'application/x-trig', extension: '.trig'},\n {name: 'TriG*', type: 'application/x-trigstar', extension: '.trigs'},\n {name: 'Binary RDF', type: 'application/x-binary-rdf', extension: '.brf'}\n ]);\n"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/graphexplore/controllers/dependencies-chord.controller.js"],"names":["allGraphs","contextID","type","value","uri","humanize","number","exp","Math","floor","log","result","pow","toFixed","DependenciesChordCtrl","$scope","$rootScope","$repositories","toastr","$timeout","GraphDataRestService","UiScrollService","ModalService","LocalStorageAdapter","RDF4JRepositoriesRestService","$translate","timer","status","getActiveRepository","STATUS","selectedGraph","initView","resolveGraphs","success","graphsInRepo","results","bindings","length","slice","setSelectedGraphFromCache","isSystemRepository","getRelationshipsStatus","error","data","repositoryError","getError","instant","selGraphFromCache","get","some","graph","set","getRelationshipsData","selectedClasses","d3","select","html","direction","matrixData","dependenciesData","matrix","right","nodes","left","hasLinks","_","sum","map","arr","force","cancel","getRelationshipsClasses","classesData","allClasses","items","filter","classFilterFunc","allNotFilteredClasses","undefined","angular","isUndefined","warning","indexOf","substring","datasource","position","current","c","name","toLowerCase","classQuery","query","key","index","count","initLazyList","$watch","each","item","revision","adapterContainer","adapter","remain","reload","isActiveRepoFedXType","$on","isLoading","confirmCalculateDependencies","openSimpleModal","title","message","then","calculateDependencies","calculateRelationships","addClass","clazz","push","removeClass","remove","showClass","classToShow","isClassByNameShown","find","addClassByName","removeClassByName","removeAllClasses","repoIsSetListener","window","addEventListener","removeRepoIsSetListener","removeEventListener","selectGraph","getSelectedGraphValue","isAllGraphsSelected","Object","defineProperty","global","module","controller","config","$tooltipProvider","options","appendToBody","$inject"],"mappings":"8EAAA,oBACY,OADZ,EAEe,UAFf,EAGa,QAHb,EAImB,cAJnB,EAKa,QAWPA,EAAY,CACdC,UAAW,CACPC,KAAM,MACNC,MAAO,mBACPC,IAAK,KAiBb,SAASC,EAASC,GACd,GAAIA,EAAS,IACT,OAAOA,EAEX,MACMC,EAAMC,KAAKC,MAAMD,KAAKE,IAAIJ,GAAUE,KAAK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AAxCvB,EAAcW,uBAgBzB,MAAMkG,EAAoB/G,EAAO0F,IAAI,mBAbrC,WAEI1F,EAAO2E,WAAa,GACpB3E,EAAO2E,WAAWC,MAAQ,GAC1B5E,EAAO6B,gBAAkB,KACzBd,EAAgB9B,EACXiB,EAAcW,wBAAyBX,EAAcuF,uBAI1DzE,IAHIhB,EAAOY,OAASE,KAQxBkG,OAAOC,iBAAiB,gBAExB,SAASC,IACLH,IACAC,OAAOG,oBAAoB,eAAgBD,MAG/ClH,EAAOoH,YAAc,SAAUjF,GAC3BpB,EAAgBoB,EAChBT,GAAuB,GACvBlB,EAAoB4B,IAAI,8BAA8BlC,EAAcW,sBAAyBE,IAGjGf,EAAOqH,sBAAwB,WAC3B,OAAOtG,EAAc7B,UAAUE,OAGnCY,EAAOsH,oBAAsB,WACzB,MAA0C,qBAAnCtH,EAAOqH,yBAlTtBE,OAAOC,eAAeC,EAAQ,YAAa,CACvCxF,IAAK,IAAchD,IAGvB+E,QACK0D,OAAO,0DApBI,CACZ,mBACA,YACA,SACA,eACA,+CACA,gDAeCC,WAAW,wBAAyB5H,GACpC6H,OAAO,CAAC,mBAAoB,SAAUC,GACnCA,EAAiBC,QAAQ,CAACC,cAAc,OAE3CnE,OAAO,YAAY,WAChB,OAAOtE,KAcfS,EAAsBiI,QAAU,CAAC,SAAU,aAAc,gBAAiB,SAAU,WAAY,uBAAwB,kBAAmB,eAAgB,sBAAuB,+BAAgC,gB","file":"71.4dbbc366049697f736c5.bundle.js","sourcesContent":["const STATUS = {\n 'WAIT': 'WAIT',\n 'NO_REPO': 'NO_REPO',\n 'READY': 'READY',\n 'IN_PROGRESS': 'IN_PROGRESS',\n 'ERROR': 'ERROR'\n};\n\nconst modules = [\n 'ui.scroll.jqlite',\n 'ui.scroll',\n 'toastr',\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.utils.localstorageadapter'\n];\nconst allGraphs = {\n contextID: {\n type: \"all\",\n value: \"all.graphs.label\",\n uri: \"\"\n }\n};\nObject.defineProperty(global, 'allGraphs', {\n get: () => {return allGraphs;}\n});\n\nangular\n .module('graphdb.framework.graphexplore.controllers.dependencies', modules)\n .controller('DependenciesChordCtrl', DependenciesChordCtrl)\n .config(['$tooltipProvider', function ($tooltipProvider) {\n $tooltipProvider.options({appendToBody: true});\n }])\n .filter('humanize', function () {\n return humanize;\n });\n\nfunction humanize(number) {\n if (number < 1000) {\n return number;\n }\n const si = ['K', 'M', 'G', 'T', 'P', 'H'];\n const exp = Math.floor(Math.log(number) / Math.log(1000));\n let result = number / Math.pow(1000, exp);\n result = (result % 1 > (1 / Math.pow(1000, exp - 1))) ? result.toFixed(2) : result.toFixed(0);\n return result + si[exp - 1];\n}\n\nDependenciesChordCtrl.$inject = ['$scope', '$rootScope', '$repositories', 'toastr', '$timeout', 'GraphDataRestService', 'UiScrollService', 'ModalService', 'LocalStorageAdapter', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction DependenciesChordCtrl($scope, $rootScope, $repositories, toastr, $timeout, GraphDataRestService, UiScrollService, ModalService, LocalStorageAdapter, RDF4JRepositoriesRestService, $translate) {\n\n let timer = null;\n\n $scope.status = !$repositories.getActiveRepository() ? STATUS.NO_REPO : STATUS.WAIT;\n\n //allGraphs is used to include all graphs in the chosen repository and represent the Class Relationships diagram and table,\n // while graphsInRepo is sliced to 1000 if there are more than 1000 graphs in the repository, and they are present\n // in the drop-down menu otherwise browsers crash.\n let selectedGraph = allGraphs;\n\n const initView = function () {\n RDF4JRepositoriesRestService.resolveGraphs()\n .success(function (graphsInRepo) {\n $scope.graphsInRepo = graphsInRepo.results.bindings.length > 1002 ? graphsInRepo.results.bindings.slice(0, 1002) : graphsInRepo.results.bindings;\n setSelectedGraphFromCache();\n if (!$scope.isSystemRepository()) {\n $scope.status = 'WAIT';\n getRelationshipsStatus(true);\n } else if ($scope.status !== \"READY\") {\n getRelationshipsStatus();\n }\n }).error(function (data) {\n $scope.repositoryError = getError(data);\n toastr.error(getError(data), $translate.instant('graphexplore.error.getting.graph'));\n });\n };\n\n const setSelectedGraphFromCache = function () {\n const selGraphFromCache = LocalStorageAdapter.get(`dependencies-selectedGraph-${$repositories.getActiveRepository()}`);\n if (selGraphFromCache !== null && $scope.graphsInRepo.some(graph => graph.contextID.uri === selGraphFromCache.contextID.uri)) {\n selectedGraph = selGraphFromCache;\n } else {\n LocalStorageAdapter.set(`dependencies-selectedGraph-${$repositories.getActiveRepository()}`, selectedGraph);\n }\n };\n\n const getRelationshipsData = function (selectedClasses) {\n d3.select('#dependencies-chord').html('');\n\n $scope.status = STATUS.WAIT;\n\n GraphDataRestService.getRelationshipsData(selectedClasses, $scope.direction, selectedGraph.contextID.uri)\n .success(function (matrixData) {\n // Check classes empty\n $scope.dependenciesData = {\n matrix: matrixData.right,\n nodes: matrixData.left,\n hasLinks: _.sum(_.map(matrixData.right, function (arr) {\n return _.sum(arr);\n })) > 0,\n direction: $scope.direction\n };\n $scope.status = STATUS.READY;\n }).error(function (data) {\n $scope.status = STATUS.READY;\n toastr.error(getError(data), $translate.instant('graphexplore.error.dependencies.count'));\n });\n };\n\n const getRelationshipsClasses = function () {\n GraphDataRestService.getRelationshipsClasses($scope.direction, selectedGraph.contextID.uri)\n .success(function (classesData, status) {\n $scope.allClasses.items = _.filter(classesData, classFilterFunc);\n $scope.allNotFilteredClasses = classesData;\n $scope.selectedClasses = undefined;\n if (angular.isUndefined($scope.selectedClasses)) {\n $scope.selectedClasses = classesData.slice(0, 10);\n }\n getRelationshipsData($scope.selectedClasses);\n if (status === 207) {\n toastr.warning($translate.instant('graphexplore.update.diagram'), $translate.instant('graphexplore.repository.data.changed'));\n }\n });\n };\n\n const getRelationshipsStatus = function (force) {\n if ($scope.status === STATUS.READY && !force) {\n return;\n }\n $scope.status = STATUS.WAIT;\n GraphDataRestService.getRelationshipsStatus(selectedGraph.contextID.uri)\n .success(function (data) {\n $scope.status = data;\n if ($scope.status === STATUS.IN_PROGRESS) {\n if (timer !== null) {\n return;\n } else {\n timer = $timeout(getRelationshipsStatus, 2000);\n }\n }\n if ($scope.status === STATUS.READY) {\n if (timer !== null) {\n $timeout.cancel(timer);\n timer = null;\n }\n getRelationshipsClasses();\n }\n if ($scope.status.indexOf('ERROR;') === 0) {\n $scope.status = STATUS.ERROR;\n toastr.error($translate.instant('graphexplore.error.dependencies.calc', {error:$scope.status.substring('ERROR;'.length)}));\n }\n })\n .error(function (data) {\n $scope.status = STATUS.ERROR;\n toastr.error(getError(data), $translate.instant('graphexplore.error.dependencies.count.status'));\n });\n };\n\n $scope.allClasses = {};\n $scope.allClasses.items = [];\n $scope.allNotFilteredClasses = [];\n $scope.direction = 'all';\n\n const datasource = {};\n let position = 0;\n let current = 0;\n $rootScope.key = '';\n\n datasource.get = function (index, count, success) {\n return UiScrollService.initLazyList(index, count, success, position, $scope.allClasses.items);\n };\n\n $rootScope.$watch(function () {\n return $rootScope.key;\n }, function () {\n position = 0;\n _.each($scope.allClasses.items, function (item) {\n if ($rootScope.key > item) position++;\n });\n current++;\n });\n\n datasource.revision = function () {\n return current;\n };\n\n $scope.datasource = datasource;\n\n // adapter implementation for ui-scroll directive\n // reload\n $scope.adapterContainer = {adapter: {remain: true}};\n\n $scope.classQuery = {};\n $scope.classQuery.query = '';\n $scope.classFilterFunc = classFilterFunc;\n\n function classFilterFunc(c) {\n return c.name\n .toLowerCase()\n .indexOf($scope.classQuery.query.toLowerCase()) !== -1;\n }\n\n $scope.$watch('allClasses.items', function () {\n if ($scope.allClasses.items.length > 0) {\n $timeout(function () {\n $scope.adapterContainer.adapter.reload();\n }, 30);\n }\n });\n\n $scope.$watch('direction', function () {\n if (!$repositories.getActiveRepository() ||\n $scope.isSystemRepository() || $repositories.isActiveRepoFedXType()) {\n return;\n }\n initView();\n });\n\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n\n $scope.isLoading = function () {\n return $scope.status === STATUS.IN_PROGRESS || $scope.status === STATUS.WAIT;\n };\n\n $scope.confirmCalculateDependencies = function () {\n ModalService.openSimpleModal({\n title: $translate.instant('confirm.operation'),\n message: $translate.instant('graphexplore.calculating.relationships'),\n warning: true\n }).result\n .then(function () {\n $scope.calculateDependencies();\n });\n };\n\n $scope.calculateDependencies = function () {\n $scope.status = STATUS.WAIT;\n $scope.selectedClasses = undefined;\n GraphDataRestService.calculateRelationships(selectedGraph.contextID.uri)\n .success(function (data) {\n if (data.indexOf('ERROR;') === 0) {\n toastr.error($translate.instant('graphexplore.error.dependencies.calc', {error:$scope.status.substring('ERROR;'.length)}));\n } else {\n getRelationshipsStatus();\n }\n })\n .error(function (data) {\n toastr.error($translate.instant('graphexplore.error.could.not.force.count', {error: getError(data)}));\n });\n };\n\n $scope.addClass = function (clazz) {\n $scope.selectedClasses.push(clazz);\n getRelationshipsData($scope.selectedClasses);\n };\n\n $scope.removeClass = function (clazz) {\n _.remove($scope.selectedClasses, function (c) {\n return c.name === clazz.name;\n });\n getRelationshipsData($scope.selectedClasses);\n };\n\n $scope.showClass = function (clazz) {\n $scope.classToShow = clazz;\n };\n\n $scope.isClassByNameShown = function (name) {\n return _.find($scope.selectedClasses, {name: name}) !== undefined;\n };\n\n $scope.addClassByName = function (name) {\n $scope.selectedClasses.push(_.find($scope.allClasses.items, {name: name}));\n getRelationshipsData($scope.selectedClasses);\n };\n\n $scope.removeClassByName = function (name) {\n _.remove($scope.selectedClasses, function (c) {\n return c.name === name;\n });\n getRelationshipsData($scope.selectedClasses);\n };\n\n\n $scope.removeAllClasses = function () {\n $scope.selectedClasses = [];\n getRelationshipsData($scope.selectedClasses);\n };\n\n $scope.isSystemRepository = function () {\n return $repositories.getActiveRepository() === 'SYSTEM';\n };\n\n function onRepositoryIsSet() {\n // clear class search on changing the repository\n $scope.classQuery = {};\n $scope.classQuery.query = '';\n $scope.repositoryError = null;\n selectedGraph = allGraphs;\n if (!$repositories.getActiveRepository() || $repositories.isActiveRepoFedXType()) {\n $scope.status = STATUS.NO_REPO;\n return;\n }\n initView();\n }\n\n const repoIsSetListener = $scope.$on('repositoryIsSet', onRepositoryIsSet);\n\n window.addEventListener('beforeunload', removeRepoIsSetListener);\n\n function removeRepoIsSetListener() {\n repoIsSetListener();\n window.removeEventListener('beforeunload', removeRepoIsSetListener);\n }\n\n $scope.selectGraph = function (graph) {\n selectedGraph = graph;\n getRelationshipsStatus(true);\n LocalStorageAdapter.set(`dependencies-selectedGraph-${$repositories.getActiveRepository()}`, selectedGraph);\n };\n\n $scope.getSelectedGraphValue = function () {\n return selectedGraph.contextID.value;\n };\n\n $scope.isAllGraphsSelected = function () {\n return $scope.getSelectedGraphValue() === 'all.graphs.label';\n };\n}\n"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[9],{108:function(t,e,n){"use strict";n.r(e);n(4),n(14);const r="UPLOADING",i="PENDING",s="ERROR",a="DONE",o="NONE",l=angular.module("graphdb.framework.impex.import.controllers",["ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.utils.uriutils","graphdb.framework.guides.services"]);l.controller("CommonCtrl",["$scope","$http","toastr","$interval","$repositories","$modal","$filter","$jwtAuth","$location","$translate","LicenseRestService","GuidesService",function(t,e,n,r,i,o,l,c,u,p,f,m){t.files=[],t.fileChecked={},t.checkAll=!1,t.popoverTemplateUrl="settingsPopoverTemplate.html",t.fileQuery="",t.getAppData=function(){f.getInfo().success((function(e){t.appData={},t.appData.properties={};for(let n=0;n<e.length;n++)t.appData.properties[e[n].key]={source:e[n].source,value:e[n].value};t.maxUploadFileSizeMB=t.appData.properties["graphdb.workbench.maxUploadSize"].value/1048576})).error((function(t){const e=getError(t);n.error(e,p.instant("common.error"))}))},t.getAppData(),t.fileFormats=["ttl","ttls","rdf","rj","n3","nt","nq","trig","trigs","trix","brf","owl","jsonld"];{const e=_.map(t.fileFormats,(function(t){return"."+t+".gz"})),n=_.map(t.fileFormats,(function(t){return"."+t}));t.fileFormatsExtended=_.reduce(_.union(e,n,[".zip"]),(function(t,e){return t+", "+e})),t.fileFormatsHuman=_.reduce(n,(function(t,e){return t+" "+e}))+p.instant("import.gz.zip"),t.textFileFormatsHuman=_.reduce(_.filter(n,(function(t){return".brf"!==t})),(function(t,e){return t+" "+e}))}t.updateListHttp=function(r){e({method:"GET",url:t.getBaseUrl()}).success((function(e){0===t.files.length||r?(t.files=e,_.forEach(t.files,(function(e){e.type||(e.type=t.defaultType)})),t.rebatch()):t.files.forEach((function(n){const r=_.find(e,_.matches({name:n.name}));n.status&&r&&_.assign(n,r),n.type||(n.type=t.defaultType)})),r&&"user"===t.viewType&&(t.files=_.filter(t.files,(function(t){return void 0!==t.status}))),t.showClearStatuses=_.filter(t.files,(function(t){return t.status===a||t.status===s})).length>0,t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name"),t.loader=!1})).error((function(e){n.warning(p.instant("import.error.could.not.get.files",{data:getError(e)})),t.loader=!1}))},t.$watch((function(){return $(t.tabId).is(":visible")}),(function(){$(t.tabId).is(":visible")&&(t.updateListHttp(!1),u.hash(t.viewType))})),t.updateList=function(e){t.canWriteActiveRepo()&&$(t.tabId).is(":visible")&&t.updateListHttp(e)},t.init=function(){t.setRestricted(),t.isRestricted||(t.updateList(!0),t.getSettings())},t.$on("repositoryIsSet",t.init),t.pullList=function(){const e=r((function(){t.updating||t.updateList(!1)}),4e3);t.$on("$destroy",(function(){r.cancel(e)}))},t.getVisibleFiles=function(){return l("filter")(t.files,{name:t.fileQuery,type:t.getTypeFilter()})},t.getTypeFilter=function(){return"server"!==t.viewType||"file"!==t.showItems&&"directory"!==t.showItems?"":t.showItems},t.selectAllFiles=function(){t.getVisibleFiles().forEach((function(e){t.fileChecked[e.name]=t.checkAll&&t.importable(e)}))},t.getSettingsFor=function(e,n){return n||_.isEmpty(e)||_.isEmpty(t.savedSettings[e])?angular.copy(t.defaultSettings):t.savedSettings[e]},t.setSettingsFor=function(e,n){t.settingsFor=e,t.settings=t.getSettingsFor(e,n);const r={templateUrl:"js/angular/import/templates/settingsModal.html",controller:"SettingsModalCtrl",resolve:{settings:function(){return angular.copy(t.settings)},hasParserSettings:t.isLocalLocation,defaultSettings:function(){return t.defaultSettings},isMultiple:function(){return!e}},size:"lg"};m.isActive()&&(r.backdrop="static",r.keyboard=!1);o.open(r).result.then((function(e){t.settings=e,""===t.settingsFor?t.importSelected():t.importFile(t.settingsFor,!0)}),(function(e){t.settings=e}))},t.updateImport=function(e,n){t.settingsFor=e,t.settings=t.getSettingsFor(e,n),t.importFile(e,!1)},t.stopImport=function(r){e({method:"DELETE",url:t.getBaseUrl(),params:{name:r.name,type:r.type}}).success((function(){t.updateList()})).error((function(t){n.warning(p.instant("import.error.could.not.stop",{data:getError(t)}))}))},t.importable=function(){return!0},t.hasImportable=function(){return _.filter(t.files,(function(e){return t.importable(e)})).length>0},t.showTable=function(){const e=t.files.length>0&&("user"===t.viewType||"server"===t.viewType);return t.checkAll&&t.switchBatch(!0),e},t.switchBatch=function(e){e?t.selectAllFiles():t.checkAll&&(t.checkAll=!1),t.batch=_.map(_.filter(t.files,(function(e){return t.fileChecked[e.name]&&t.importable(e)})),"name").length>0},t.rebatch=function(){const e={};t.batch=!1,_.each(t.files,(function(n){e[n.name]=t.fileChecked[n.name],t.batch|=t.fileChecked[n.name]})),t.batch||(t.checkAll=!1),t.fileChecked=e},t.getSelectedFiles=function(){return _.map(_.filter(t.getVisibleFiles(),(function(e){return t.fileChecked[e.name]&&t.importable(e)})),"name")},t.importSelected=function(e){const n=t.getSelectedFiles(),r=function(){const i=n.shift();i&&(e&&(t.settings=t.getSettingsFor(i)),t.importFile(i,!0,r))};r()};const d=function(r,i){e({method:"DELETE",url:t.getBaseUrl()+"/status",params:{remove:i},data:r,headers:{"Content-type":"application/json;charset=utf-8"}}).success((function(){t.updateList(!0)})).error((function(t){n.warning(p.instant("import.error.could.not.clear",{data:getError(t)}))}))};t.resetStatus=function(t){d(t,!1)},t.resetStatusSelected=function(){t.resetStatus(t.getSelectedFiles())},t.removeEntry=function(t){d(t,!0)},t.removeEntrySelected=function(){t.removeEntry(t.getSelectedFiles())},t.isLocalLocation=function(){const t=i.getActiveLocation();return t&&t.local},t.filterSettings=function(e){let n=_.omitBy(t.savedSettings[e],_.isNull);return n=_.omit(n,["repoLocationHash","status","message","name","data","type","format","fileNames","$$hashKey"]),_.map(_.keys(n),(function(t){return[t,n[t]]}))},t.getSettings=function(){t.canWriteActiveRepo()&&e({method:"GET",url:"rest/repositories/"+i.getActiveRepository()+"/import/settings/default"}).success((function(e){t.defaultSettings=e})).error((function(t){n.warning(p.instant("import.error.default.settings",{data:getError(t)}))}))},t.getBaseUrl=function(){return"rest/repositories/"+i.getActiveRepository()+"/import/"+t.viewUrl},t.pritifySettings=function(t){return JSON.stringify(t,null," ")},t.toTitleCase=function(t){return t?_.upperFirst(t.toLowerCase()):t}}]),l.controller("ImportCtrl",["$scope","$http","toastr","$controller",function(t,e,n,r){t.loader=!0,angular.extend(this,r("CommonCtrl",{$scope:t})),t.viewUrl="server",t.defaultType="server",t.tabId="#import-server",t.showItems="all",t.pullList();const i=function(r,i){t.canWriteActiveRepo()&&e({method:"POST",url:t.getBaseUrl(),data:{importSettings:i?null:t.settings,fileNames:r}}).success((function(){t.updateList(),t.batch=!1,t.fileChecked={}})).error((function(t){n.error($translate.instant("import.could.not.send.file",{data:getError(t)}))}))};t.importSelected=function(e){const n=t.getSelectedFiles();i(n,e)},t.importFile=function(t){i([t])},t.init()}]),l.controller("UploadCtrl",["$scope","Upload","$http","toastr","$controller","$modal","$translate",function(t,e,n,a,l,c,u){t.loader=!0,angular.extend(this,l("CommonCtrl",{$scope:t})),t.viewUrl="upload",t.defaultType="file",t.tabId="#import-user",t.pullList(),t.currentFiles=[],t.importable=function(){return!0},t.fileSelected=function(t,e,n,r,i){i.length>0&&i.forEach((function(t){a.warning(u.instant("import.large.file",{name:t.name,size:Math.floor(t.size/1048576)}))}))},t.$watchCollection("currentFiles",(function(){t.currentFiles&&t.currentFiles.forEach((function(e){if("bz2"===e.name.substr(e.name.lastIndexOf(".")+1)){const n=t.currentFiles.indexOf(e);n>-1&&t.currentFiles.splice(n,1),a.error(u.instant("import.could.not.upload",{name:e.name}))}})),t.files=_.uniqBy(_.union(_.map(t.currentFiles,(function(t){return{name:t.name,type:"file",file:t}})),t.files),(function(t){return t.name})),t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name"),_.each(t.currentFiles,(function(e){t.updateImport(e.name)}))})),t.importFile=function(o,l,c){const p=_.findIndex(t.files,{name:o});if(p<0)a.warning(u.instant("import.no.such.file",{name:o}));else{const o=t.files[p];if("text"===o.type)t.settings.name=o.name,t.settings.type=o.type,t.settings.data=o.data,t.settings.format=o.format,o.status=i,n({method:"POST",url:t.getBaseUrl()+(l?"":"/update")+"/text",data:t.settings}).success((function(){t.updateList()})).error((function(t){a.error(u.instant("import.could.not.send.data",{data:getError(t)})),o.status=s,o.message=getError(t)})).finally(c||function(){});else if("url"===o.type)t.settings.name=o.name,t.settings.type=o.type,t.settings.data=o.data,t.settings.format=o.format,o.status=i,n({method:"POST",url:t.getBaseUrl()+(l?"":"/update")+"/url",data:t.settings}).success((function(){t.updateList()})).error((function(t){a.error(u.instant("import.could.not.send.url",{data:getError(t)}))})).finally(c||function(){});else{let n;t.settings.name=o.name,n=o.file?{file:o.file,importSettings:e.jsonBlob(t.settings)}:{importSettings:e.jsonBlob(t.settings)},e.upload({url:t.getBaseUrl()+(l?"":"/update")+"/file",data:n}).progress((function(t){if(o.file?(o.file=null,o.status=r):o.status!==r&&(o.status=i),o.status===r){const e=parseInt(100*t.loaded/t.total);o.message=e+"% uploaded"}})).success((function(){t.updateList()})).error((function(t){a.error(u.instant("import.could.not.upload.file",{data:getError(t)})),o.status=s,o.message=getError(t)})).finally(c||function(){})}}},t.updateTextImport=function(e){t.updating=!0,n({method:"POST",url:t.getBaseUrl()+"/update/text",data:e}).success((function(t){})).error((function(t){a.error(u.instant("import.could.not.update.text",{data:getError(t)}))})).finally((function(){t.updating=!1}))},t.pastedDataIdx=1;const p=function(){const t=new Date;return t.getFullYear()+"-"+_.padStart(t.getMonth()+1,2,"0")+"-"+_.padStart(t.getDate(),2,"0")+" "+_.padStart(t.getHours(),2,"0")+":"+_.padStart(t.getMinutes(),2,"0")+":"+_.padStart(t.getSeconds(),2,"0")+"."+_.padStart(t.getMilliseconds(),3,"0")};t.pasteData=function(e){e&&e.data;c.open({templateUrl:"js/angular/import/templates/textSnippet.html",controller:"TextCtrl",resolve:{text:function(){return e?e.data:""},format:function(){return e?e.format:"text/turtle"}}}).result.then((function(n){e?(e.data===n.text&&e.format===n.format||e.status===o||(e.status=o,e.message=u.instant("import.text.snippet.not.imported")),e.data=n.text,e.format=n.format,t.updateTextImport(e)):(e={type:"text",name:"Text snippet "+p(),format:n.format,data:n.text},t.files.unshift(e),t.updateImport(e.name)),n.startImport&&t.setSettingsFor(e.name)}))},t.rdfDataFromURL=function(){c.open({templateUrl:"js/angular/import/templates/urlImport.html",controller:"UrlCtrl",scope:t}).result.then((function(e){const n=_.find(t.files,{type:"url",name:e.url});n?n.format=e.format:t.files.unshift({type:"url",name:e.url,format:e.format,data:e.url}),t.updateImport(e.url,!0),e.startImport&&t.setSettingsFor(e.url,!0)}))},t.init()}]),l.controller("UrlCtrl",["$scope","$modalInstance","toastr",function(t,e){t.importFormat={name:"Auto",type:""},t.startImport=!0,t.cancel=function(){e.dismiss()},t.ok=function(){e.close({url:t.dataUrl,format:t.importFormat.type,startImport:t.startImport})}}]),l.controller("TextCtrl",["$scope","$modalInstance","text","format",function(t,e,n,r){t.importFormats=[{name:"RDF/JSON",type:"application/rdf+json"},{name:"JSON-LD",type:"application/ld+json"},{name:"RDF/XML",type:"application/rdf+xml"},{name:"N3",type:"text/rdf+n3"},{name:"N-Triples",type:"text/plain"},{name:"N-Quads",type:"text/x-nquads"},{name:"Turtle",type:"text/turtle"},{name:"Turtle*",type:"application/x-turtlestar"},{name:"TriX",type:"application/trix"},{name:"TriG",type:"application/x-trig"},{name:"TriG*",type:"application/x-trigstar"}],t.rdfText=n,t.importFormat=_.find(t.importFormats,{type:r}),t.startImport=!0,t.setFormat=function(e){t.importFormat=e},t.cancel=function(){e.dismiss()},t.ok=function(){e.close({text:t.rdfText,format:t.importFormat.type,startImport:t.startImport})}}]),l.controller("TabCtrl",["$scope","$location",function(t,e){t.viewType=e.hash(),"user"!==t.viewType&&"server"!==t.viewType&&(t.viewType="user"),t.isCollapsed=!1,"user"===t.viewType?t.templateUrl="js/angular/import/templates/uploadInfo.html":t.templateUrl="js/angular/import/templates/importInfo.html",t.changeHelpTemplate=function(e){t.templateUrl="js/angular/import/templates/"+e},t.commonUrl="js/angular/import/templates/commonInfo.html"}]),l.controller("SettingsModalCtrl",["$scope","$modalInstance","toastr","UriUtils","settings","hasParserSettings","defaultSettings","isMultiple","$translate",function(t,e,n,r,i,s,a,o,l){t.hasError=function(t,e){return _.find(t,(function(t){return e===t.$name}))},t.settings=i,t.hasParserSettings=s,t.settings.context?"default"===t.settings.context?(t.target="default",t.settings.context=""):t.target="named":t.target="data",t.isMultiple=o,t.enableReplace=!(!t.settings.replaceGraphs||!t.settings.replaceGraphs.length);const c=function(){"default"===t.target?t.settings.context="default":"data"===t.target&&(t.settings.context=""),t.enableReplace?"default"!==t.target&&"named"!==t.target||(t.settings.replaceGraphs=[t.settings.context]):t.settings.replaceGraphs=[]};t.ok=function(){t.settingsForm.replaceGraph.$setValidity("replaceGraph",!0),t.settingsForm.$valid&&(c(),e.close(t.settings))},t.cancel=function(){c(),e.dismiss(t.settings)},t.reset=function(){t.settings=angular.copy(a),t.target="data"},t.addReplaceGraph=function(e){let i=!0;"default"!==e&&(i=r.isValidIri(e)),t.settingsForm.replaceGraph.$setTouched(),t.settingsForm.replaceGraph.$setValidity("replaceGraph",i),t.settingsForm.replaceGraph.$valid&&(t.settings.replaceGraphs=t.settings.replaceGraphs||[],-1===_.indexOf(t.settings.replaceGraphs,e)?(t.replaceGraph="",t.settings.replaceGraphs.push(e)):n.warning(l.instant("import.graph.already.in.list")))},t.checkEnterReplaceGraph=function(e,n){13===e.keyCode&&(e.preventDefault(),t.addReplaceGraph(n))},t.showAdvancedSettings=!1,t.switchParserSettings=function(){t.showAdvancedSettings=!t.showAdvancedSettings}}])}}]);
2
- //# sourceMappingURL=9.7bdbee8225f687ec81bc.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/import/controllers.js"],"names":["FILE_STATUS","importCtrl","angular","module","controller","$scope","$http","toastr","$interval","$repositories","$modal","$filter","$jwtAuth","$location","$translate","LicenseRestService","GuidesService","files","fileChecked","checkAll","popoverTemplateUrl","fileQuery","getAppData","getInfo","success","data","appData","properties","i","length","key","source","value","maxUploadFileSizeMB","error","msg","getError","instant","fileFormats","gzs","_","map","f","basics","fileFormatsExtended","reduce","union","el","all","fileFormatsHuman","textFileFormatsHuman","filter","updateListHttp","force","method","url","getBaseUrl","forEach","type","defaultType","rebatch","remoteStatus","find","matches","name","status","assign","viewType","undefined","showClearStatuses","file","savedSettings","mapKeys","loader","warning","$watch","$","tabId","is","hash","updateList","canWriteActiveRepo","init","setRestricted","isRestricted","getSettings","$on","pullList","timer","updating","cancel","getVisibleFiles","getTypeFilter","showItems","selectAllFiles","importable","getSettingsFor","fileName","withDefaultSettings","isEmpty","copy","defaultSettings","setSettingsFor","settingsFor","settings","options","templateUrl","resolve","hasParserSettings","isLocalLocation","isMultiple","size","isActive","backdrop","keyboard","open","result","then","importSelected","importFile","updateImport","stopImport","params","hasImportable","showTable","switchBatch","batch","newFileChecked","each","getSelectedFiles","overrideSettings","selectedFileNames","importNext","shift","resetStatusOrRemoveEntry","names","remove","headers","resetStatus","resetStatusSelected","removeEntry","removeEntrySelected","location","getActiveLocation","local","filterSettings","filtered","omitBy","isNull","omit","keys","getActiveRepository","viewUrl","pritifySettings","JSON","stringify","toTitleCase","s","upperFirst","toLowerCase","$controller","extend","this","importServerFiles","importSettings","fileNames","Upload","currentFiles","fileSelected","$files","$file","$newFiles","$duplicateFiles","$invalidFiles","Math","floor","$watchCollection","substr","lastIndexOf","fileIdx","indexOf","splice","uniqBy","startImport","nextCallback","fileIndex","findIndex","format","message","finally","jsonBlob","upload","progress","evt","progressPercentage","parseInt","loaded","total","updateTextImport","pastedDataIdx","formattedDate","date","Date","getFullYear","padStart","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","pasteData","text","unshift","rdfDataFromURL","scope","existing","$modalInstance","importFormat","dismiss","ok","close","dataUrl","importFormats","rdfText","setFormat","isCollapsed","changeHelpTemplate","templateFile","commonUrl","UriUtils","hasError","input","o","context","target","enableReplace","replaceGraphs","fixSettings","settingsForm","replaceGraph","$setValidity","$valid","reset","addReplaceGraph","graph","valid","isValidIri","$setTouched","push","checkEnterReplaceGraph","event","keyCode","preventDefault","showAdvancedSettings","switchParserSettings"],"mappings":"0FAAA,kBAGA,MAAMA,EACW,YADXA,EAES,UAFTA,EAGO,QAHPA,EAIM,OAJNA,EAKM,OAWNC,EAAaC,QAAQC,OAAO,6CARlB,CACZ,eACA,SACA,+CACA,mCACA,sCAKJF,EAAWG,WAAW,aAAc,CAAC,SAAU,QAAS,SAAU,YAAa,gBAAiB,SAAU,UAAW,WAAY,YAAa,aAAc,qBAAsB,gBAC9K,SAAUC,EAAQC,EAAOC,EAAQC,EAAWC,EAAeC,EAAQC,EAASC,EAAUC,EAAWC,EAAYC,EAAoBC,GAC7HX,EAAOY,MAAQ,GACfZ,EAAOa,YAAc,GACrBb,EAAOc,UAAW,EAClBd,EAAOe,mBAAqB,+BAC5Bf,EAAOgB,UAAY,GAEnBhB,EAAOiB,WAAa,WAChBP,EAAmBQ,UAAUC,SAAQ,SAAUC,GAC3CpB,EAAOqB,QAAU,GAEjBrB,EAAOqB,QAAQC,WAAa,GAE5B,IAAK,IAAIC,EAAI,EAAGA,EAAIH,EAAKI,OAAQD,IAC7BvB,EAAOqB,QAAQC,WAAWF,EAAKG,GAAGE,KAAO,CACrCC,OAAQN,EAAKG,GAAGG,OAChBC,MAAOP,E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IAE1BrO,EAAOuO,cACe,YAAlBvO,EAAOsO,QAA0C,UAAlBtO,EAAOsO,SACtCtO,EAAOmG,SAASqI,cAAgB,CAACxO,EAAOmG,SAASkI,UAGrDrO,EAAOmG,SAASqI,cAAgB,IAIxCxO,EAAOuN,GAAK,WAERvN,EAAO0O,aAAaC,aAAaC,aAAa,gBAAgB,GAE1D5O,EAAO0O,aAAaG,SACpBJ,IACArB,EAAeI,MAAMxN,EAAOmG,YAIpCnG,EAAOqF,OAAS,WACZoJ,IACArB,EAAeE,QAAQtN,EAAOmG,WAGlCnG,EAAO8O,MAAQ,WACX9O,EAAOmG,SAAWtG,QAAQkG,KAAKC,GAC/BhG,EAAOsO,OAAS,QAGpBtO,EAAO+O,gBAAkB,SAAUC,GAC/B,IAAIC,GAAQ,EACE,YAAVD,IACAC,EAAQhB,EAASiB,WAAWF,IAEhChP,EAAO0O,aAAaC,aAAaQ,cACjCnP,EAAO0O,aAAaC,aAAaC,aAAa,eAAgBK,GAE1DjP,EAAO0O,aAAaC,aAAaE,SACjC7O,EAAOmG,SAASqI,cAAgBxO,EAAOmG,SAASqI,eAAiB,IACR,IAArDrM,EAAE4I,QAAQ/K,EAAOmG,SAASqI,cAAeQ,IACzChP,EAAO2O,aAAe,GACtB3O,EAAOmG,SAASqI,cAAcY,KAAKJ,IAEnC9O,EAAOmE,QAAQ5D,EAAWuB,QAAQ,mCAK9ChC,EAAOqP,uBAAyB,SAAUC,EAAON,GACvB,KAAlBM,EAAMC,UACND,EAAME,iBAENxP,EAAO+O,gBAAgBC,KAI/BhP,EAAOyP,sBAAuB,EAC9BzP,EAAO0P,qBAAuB,WAC1B1P,EAAOyP,sBAAwBzP,EAAOyP","file":"9.7bdbee8225f687ec81bc.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/utils/uri-utils';\n\nconst FILE_STATUS = {\n 'UPLOADING': 'UPLOADING',\n 'PENDING': 'PENDING',\n 'ERROR': 'ERROR',\n 'DONE': 'DONE',\n 'NONE': 'NONE'\n};\n\nconst modules = [\n 'ui.bootstrap',\n 'toastr',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.utils.uriutils',\n 'graphdb.framework.guides.services'\n];\n\nconst importCtrl = angular.module('graphdb.framework.impex.import.controllers', modules);\n\nimportCtrl.controller('CommonCtrl', ['$scope', '$http', 'toastr', '$interval', '$repositories', '$modal', '$filter', '$jwtAuth', '$location', '$translate', 'LicenseRestService', 'GuidesService',\n function ($scope, $http, toastr, $interval, $repositories, $modal, $filter, $jwtAuth, $location, $translate, LicenseRestService, GuidesService) {\n $scope.files = [];\n $scope.fileChecked = {};\n $scope.checkAll = false;\n $scope.popoverTemplateUrl = 'settingsPopoverTemplate.html';\n $scope.fileQuery = '';\n\n $scope.getAppData = function () {\n LicenseRestService.getInfo().success(function (data) {\n $scope.appData = {};\n\n $scope.appData.properties = {};\n\n for (let i = 0; i < data.length; i++) {\n $scope.appData.properties[data[i].key] = {\n source: data[i].source,\n value: data[i].value\n };\n }\n $scope.maxUploadFileSizeMB = $scope.appData.properties['graphdb.workbench.maxUploadSize'].value / (1024 * 1024);\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n });\n };\n\n $scope.getAppData();\n\n $scope.fileFormats = ['ttl', 'ttls', 'rdf', 'rj', 'n3', 'nt', 'nq', 'trig', 'trigs', 'trix', 'brf', 'owl', 'jsonld'];\n\n {\n const gzs = _.map($scope.fileFormats, function (f) {\n return '.' + f + '.gz';\n });\n const basics = _.map($scope.fileFormats, function (f) {\n return '.' + f;\n });\n $scope.fileFormatsExtended = _.reduce(_.union(gzs, basics, ['.zip']), function (el, all) {\n return el + ', ' + all;\n });\n $scope.fileFormatsHuman = _.reduce(basics, function (el, all) {\n return el + ' ' + all;\n }) + $translate.instant('import.gz.zip');\n $scope.textFileFormatsHuman = _.reduce(_.filter(basics, function (el) {\n return el !== '.brf';\n }),\n function (el, all) {\n return el + ' ' + all;\n });\n }\n\n $scope.updateListHttp = function (force) {\n $http({\n method: 'GET',\n url: $scope.getBaseUrl()\n }).success(function (data) {\n if ($scope.files.length === 0 || force) {\n $scope.files = data;\n _.forEach($scope.files, function (f) {\n if (!f.type) {\n f.type = $scope.defaultType;\n }\n });\n $scope.rebatch();\n } else {\n $scope.files.forEach(function (f) {\n const remoteStatus = _.find(data, _.matches({'name': f.name}));\n if (f.status && remoteStatus) {\n _.assign(f, remoteStatus);\n }\n if (!f.type) {\n f.type = $scope.defaultType;\n }\n });\n }\n // Need new status here\n if (force && 'user' === $scope.viewType) {\n $scope.files = _.filter($scope.files, function (f) {\n return f.status !== undefined;\n });\n }\n $scope.showClearStatuses = _.filter($scope.files, function (file) {\n return file.status === FILE_STATUS.DONE || file.status === FILE_STATUS.ERROR;\n }).length > 0;\n\n $scope.savedSettings = _.mapKeys(_.filter($scope.files, 'parserSettings'), 'name');\n\n $scope.loader = false;\n }).error(function (data) {\n toastr.warning($translate.instant('import.error.could.not.get.files', {data: getError(data)}));\n $scope.loader = false;\n });\n };\n\n // update the list instantly when the tab is changed\n $scope.$watch(function () {\n return $($scope.tabId).is(':visible');\n }, function () {\n if ($($scope.tabId).is(':visible')) {\n $scope.updateListHttp(false);\n $location.hash($scope.viewType);\n }\n });\n\n $scope.updateList = function (force) {\n if (!$scope.canWriteActiveRepo()) {\n return;\n }\n\n if (!$($scope.tabId).is(':visible')) {\n return;\n }\n $scope.updateListHttp(force);\n };\n\n $scope.init = function () {\n // Update restricted on repositoryIsSet\n $scope.setRestricted();\n if ($scope.isRestricted) {\n return;\n }\n $scope.updateList(true);\n $scope.getSettings();\n };\n\n $scope.$on('repositoryIsSet', $scope.init);\n\n $scope.pullList = function () {\n const timer = $interval(function () {\n // Skip iteration if we are updating something\n if (!$scope.updating) {\n $scope.updateList(false);\n }\n }, 4000);\n $scope.$on('$destroy', function () {\n $interval.cancel(timer);\n });\n };\n\n $scope.getVisibleFiles = function () {\n return $filter('filter')($scope.files, {name: $scope.fileQuery, type: $scope.getTypeFilter()});\n };\n\n $scope.getTypeFilter = function () {\n if ($scope.viewType === 'server' && ($scope.showItems === 'file' || $scope.showItems === 'directory')) {\n return $scope.showItems;\n } else {\n return '';\n }\n };\n\n $scope.selectAllFiles = function () {\n $scope.getVisibleFiles().forEach(function (file) {\n $scope.fileChecked[file.name] = $scope.checkAll && $scope.importable(file);\n });\n };\n\n $scope.getSettingsFor = function (fileName, withDefaultSettings) {\n if (!withDefaultSettings && !_.isEmpty(fileName) && !_.isEmpty($scope.savedSettings[fileName])) {\n return $scope.savedSettings[fileName];\n } else {\n return angular.copy($scope.defaultSettings);\n }\n };\n\n $scope.setSettingsFor = function (fileName, withDefaultSettings) {\n $scope.settingsFor = fileName;\n $scope.settings = $scope.getSettingsFor(fileName, withDefaultSettings);\n\n const options = {\n templateUrl: 'js/angular/import/templates/settingsModal.html',\n controller: 'SettingsModalCtrl',\n resolve: {\n settings: function () {\n return angular.copy($scope.settings);\n },\n hasParserSettings: $scope.isLocalLocation,\n defaultSettings: function () {\n return $scope.defaultSettings;\n },\n isMultiple: function () {\n return !fileName;\n }\n },\n size: 'lg'\n };\n\n if (GuidesService.isActive()) {\n // Prevents closing dialog when user click outside the if.\n options.backdrop = 'static';\n options.keyboard = false;\n }\n\n const modalInstance = $modal.open(options);\n\n\n modalInstance.result.then(function (settings) {\n $scope.settings = settings;\n if ($scope.settingsFor === '') {\n $scope.importSelected();\n } else {\n $scope.importFile($scope.settingsFor, true);\n }\n\n }, function (settings) {\n $scope.settings = settings;\n });\n };\n\n $scope.updateImport = function (fileName, withDefaultSettings) {\n $scope.settingsFor = fileName;\n $scope.settings = $scope.getSettingsFor(fileName, withDefaultSettings);\n\n $scope.importFile(fileName, false);\n };\n\n $scope.stopImport = function (file) {\n $http({\n method: 'DELETE',\n url: $scope.getBaseUrl(),\n params: {name: file.name, type: file.type}\n }).success(function () {\n $scope.updateList();\n }).error(function (data) {\n toastr.warning($translate.instant('import.error.could.not.stop', {data: getError(data)}));\n });\n };\n\n $scope.importable = function () {\n return true;\n };\n\n $scope.hasImportable = function () {\n return _.filter($scope.files, function (f) {\n return $scope.importable(f);\n }).length > 0;\n };\n\n $scope.showTable = function () {\n const showTable = $scope.files.length > 0 && ('user' === $scope.viewType || 'server' === $scope.viewType);\n if ($scope.checkAll) {\n $scope.switchBatch(true);\n }\n return showTable;\n };\n\n $scope.switchBatch = function (all) {\n if (all) {\n $scope.selectAllFiles();\n } else {\n if ($scope.checkAll) {\n $scope.checkAll = false;\n }\n }\n $scope.batch = _.map(_.filter($scope.files, function (f) {\n return $scope.fileChecked[f.name] && $scope.importable(f);\n }), 'name').length > 0;\n };\n\n $scope.rebatch = function () {\n const newFileChecked = {};\n $scope.batch = false;\n _.each($scope.files, function (file) {\n newFileChecked[file.name] = $scope.fileChecked[file.name];\n $scope.batch |= $scope.fileChecked[file.name];\n });\n if (!$scope.batch) {\n $scope.checkAll = false;\n }\n $scope.fileChecked = newFileChecked;\n };\n\n $scope.getSelectedFiles = function () {\n return _.map(_.filter($scope.getVisibleFiles(), function (f) {\n return $scope.fileChecked[f.name] && $scope.importable(f);\n }), 'name');\n };\n\n $scope.importSelected = function (overrideSettings) {\n const selectedFileNames = $scope.getSelectedFiles();\n\n // Calls the REST API sequentially for the selected files\n const importNext = function () {\n const fileName = selectedFileNames.shift();\n if (fileName) {\n if (overrideSettings) {\n $scope.settings = $scope.getSettingsFor(fileName);\n }\n $scope.importFile(fileName, true, importNext);\n }\n };\n\n importNext();\n };\n\n const resetStatusOrRemoveEntry = function (names, remove) {\n $http({\n method: 'DELETE',\n url: $scope.getBaseUrl() + '/status',\n params: {remove: remove},\n data: names,\n headers: {'Content-type': 'application/json;charset=utf-8'}\n }).success(function () {\n $scope.updateList(true);\n }).error(function (data) {\n toastr.warning($translate.instant('import.error.could.not.clear', {data: getError(data)}));\n });\n };\n\n $scope.resetStatus = function (names) {\n resetStatusOrRemoveEntry(names, false);\n };\n\n $scope.resetStatusSelected = function () {\n $scope.resetStatus($scope.getSelectedFiles());\n };\n\n $scope.removeEntry = function (names) {\n resetStatusOrRemoveEntry(names, true);\n };\n\n $scope.removeEntrySelected = function () {\n $scope.removeEntry($scope.getSelectedFiles());\n };\n\n $scope.isLocalLocation = function () {\n const location = $repositories.getActiveLocation();\n return location && location.local;\n };\n // Settings\n\n $scope.filterSettings = function (fileName) {\n let filtered = _.omitBy($scope.savedSettings[fileName], _.isNull);\n filtered = _.omit(filtered, ['repoLocationHash', 'status', 'message', 'name', 'data', 'type', 'format', 'fileNames', '$$hashKey']);\n return _.map(_.keys(filtered), function (key) {\n return [key, filtered[key]];\n });\n };\n\n $scope.getSettings = function () {\n if (!$scope.canWriteActiveRepo()) {\n return;\n }\n\n $http({\n method: 'GET',\n url: 'rest/repositories/' + $repositories.getActiveRepository() + '/import/settings/default'\n }).success(function (data) {\n $scope.defaultSettings = data;\n }).error(function (data) {\n toastr.warning($translate.instant('import.error.default.settings', {data: getError(data)}));\n });\n };\n\n $scope.getBaseUrl = function () {\n return 'rest/repositories/' + $repositories.getActiveRepository() + '/import/' + $scope.viewUrl;\n };\n\n $scope.pritifySettings = function (settings) {\n return JSON.stringify(settings, null, ' ');\n };\n\n $scope.toTitleCase = function (s) {\n if (!s) {\n return s;\n }\n return _.upperFirst(s.toLowerCase());\n };\n }]);\n\nimportCtrl.controller('ImportCtrl', ['$scope', '$http', 'toastr', '$controller', function ($scope, $http, toastr, $controller) {\n $scope.loader = true;\n angular.extend(this, $controller('CommonCtrl', {$scope: $scope}));\n $scope.viewUrl = 'server';\n $scope.defaultType = 'server';\n $scope.tabId = '#import-server';\n $scope.showItems = 'all';\n\n $scope.pullList();\n\n const importServerFiles = function (selectedFileNames, overrideSettings) {\n if (!$scope.canWriteActiveRepo()) {\n return;\n }\n\n $http({\n method: 'POST',\n url: $scope.getBaseUrl(),\n data: {importSettings: overrideSettings ? null : $scope.settings, fileNames: selectedFileNames}\n }).success(function () {\n $scope.updateList();\n $scope.batch = false;\n $scope.fileChecked = {};\n }).error(function (data) {\n toastr.error($translate.instant('import.could.not.send.file', {data: getError(data)}));\n });\n };\n\n $scope.importSelected = function (overrideSettings) {\n const selectedFileNames = $scope.getSelectedFiles();\n importServerFiles(selectedFileNames, overrideSettings);\n };\n\n $scope.importFile = function (fileName) {\n importServerFiles([fileName]);\n };\n\n $scope.init();\n}]);\n\nimportCtrl.controller('UploadCtrl', ['$scope', 'Upload', '$http', 'toastr', '$controller', '$modal', '$translate', function ($scope, Upload, $http, toastr, $controller, $modal, $translate) {\n $scope.loader = true;\n angular.extend(this, $controller('CommonCtrl', {$scope: $scope}));\n $scope.viewUrl = 'upload';\n $scope.defaultType = 'file';\n $scope.tabId = '#import-user';\n\n $scope.pullList();\n\n $scope.currentFiles = [];\n\n $scope.importable = function () {\n return true;\n };\n\n $scope.fileSelected = function ($files, $file, $newFiles, $duplicateFiles, $invalidFiles) {\n if ($invalidFiles.length > 0) {\n $invalidFiles.forEach(function (f) {\n toastr.warning($translate.instant('import.large.file', {name: f.name, size: Math.floor(f.size / (1024 * 1024))}));\n });\n }\n };\n\n $scope.$watchCollection('currentFiles', function () {\n function disallowBZip2Files() {\n $scope.currentFiles.forEach(function (f) {\n if (f.name.substr(f.name.lastIndexOf('.') + 1) === 'bz2') {\n const fileIdx = $scope.currentFiles.indexOf(f);\n if (fileIdx > -1) {\n $scope.currentFiles.splice(fileIdx, 1);\n }\n toastr.error($translate.instant('import.could.not.upload', {name: f.name}));\n }\n });\n }\n\n if ($scope.currentFiles) {\n // RDF4J does not support decompressing .bz2 files so we want to reject importing them\n disallowBZip2Files();\n }\n $scope.files = _.uniqBy(\n _.union(\n _.map($scope.currentFiles, function (file) {\n return {name: file.name, type: 'file', file: file}\n }),\n $scope.files\n ),\n function (file) {\n return file.name;\n }\n );\n $scope.savedSettings = _.mapKeys(_.filter($scope.files, 'parserSettings'), 'name');\n _.each($scope.currentFiles, function (file) {\n $scope.updateImport(file.name);\n });\n });\n\n $scope.importFile = function (fileName, startImport, nextCallback) {\n const fileIndex = _.findIndex($scope.files, {name: fileName});\n if (fileIndex < 0) {\n toastr.warning($translate.instant('import.no.such.file', {name: fileName}));\n } else {\n const file = $scope.files[fileIndex];\n if (file.type === 'text') {\n // Import text snippet\n $scope.settings.name = file.name;\n $scope.settings.type = file.type;\n $scope.settings.data = file.data;\n $scope.settings.format = file.format;\n file.status = FILE_STATUS.PENDING;\n $http({\n method: 'POST',\n url: $scope.getBaseUrl() + (startImport ? '' : '/update') + '/text',\n data: $scope.settings\n }).success(function () {\n $scope.updateList();\n }).error(function (data) {\n toastr.error($translate.instant('import.could.not.send.data', {data: getError(data)}));\n file.status = FILE_STATUS.ERROR;\n file.message = getError(data);\n }).finally(nextCallback || function () {\n });\n } else if (file.type === 'url') {\n // Submit URL\n $scope.settings.name = file.name;\n $scope.settings.type = file.type;\n $scope.settings.data = file.data;\n $scope.settings.format = file.format;\n file.status = FILE_STATUS.PENDING;\n $http({\n method: 'POST',\n url: $scope.getBaseUrl() + (startImport ? '' : '/update') + '/url',\n data: $scope.settings\n }).success(function () {\n $scope.updateList();\n }).error(function (data) {\n toastr.error($translate.instant('import.could.not.send.url', {data: getError(data)}));\n }).finally(nextCallback || function () {\n });\n } else {\n // Upload real file\n $scope.settings.name = file.name;\n let data;\n if (file.file) {\n data = {file: file.file, importSettings: Upload.jsonBlob($scope.settings)};\n } else {\n data = {importSettings: Upload.jsonBlob($scope.settings)};\n }\n Upload.upload({\n url: $scope.getBaseUrl() + (startImport ? '' : '/update') + '/file',\n data: data\n }).progress(function (evt) {\n if (file.file) {\n file.file = null;\n file.status = FILE_STATUS.UPLOADING;\n } else if (file.status !== FILE_STATUS.UPLOADING) {\n file.status = FILE_STATUS.PENDING;\n }\n\n if (file.status === FILE_STATUS.UPLOADING) {\n const progressPercentage = parseInt(100.0 * evt.loaded / evt.total);\n file.message = progressPercentage + '% uploaded';\n }\n }).success(function () {\n $scope.updateList();\n }).error(function (data) {\n toastr.error($translate.instant('import.could.not.upload.file', {data: getError(data)}));\n file.status = FILE_STATUS.ERROR;\n file.message = getError(data);\n }).finally(nextCallback || function () {\n });\n }\n }\n };\n\n $scope.updateTextImport = function (settings) {\n $scope.updating = true;\n $http({\n method: 'POST',\n url: $scope.getBaseUrl() + '/update/text',\n data: settings\n }).success(function (data) {\n }).error(function (data) {\n toastr.error($translate.instant('import.could.not.update.text', {data: getError(data)}));\n }).finally(function () {\n $scope.updating = false;\n });\n };\n\n $scope.pastedDataIdx = 1;\n\n const formattedDate = function () {\n const date = new Date();\n return date.getFullYear() + '-' + _.padStart(date.getMonth() + 1, 2, '0') + '-' + _.padStart(date.getDate(), 2, '0')\n + ' ' + _.padStart(date.getHours(), 2, '0') + ':' + _.padStart(date.getMinutes(), 2, '0') + ':' + _.padStart(date.getSeconds(), 2, '0')\n + '.' + _.padStart(date.getMilliseconds(), 3, '0');\n };\n\n $scope.pasteData = function (file) {\n const scope = {};\n if (file) {\n scope.rdfText = file.data;\n }\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/import/templates/textSnippet.html',\n controller: 'TextCtrl',\n resolve: {\n text: function () {\n return file ? file.data : '';\n },\n format: function () {\n return file ? file.format : 'text/turtle';\n }\n }\n });\n\n modalInstance.result.then(function (data) {\n if (file) {\n if ((file.data !== data.text || file.format !== data.format) && file.status !== FILE_STATUS.NONE) {\n file.status = FILE_STATUS.NONE;\n file.message = $translate.instant('import.text.snippet.not.imported');\n }\n file.data = data.text;\n file.format = data.format;\n $scope.updateTextImport(file);\n } else {\n file = {type: 'text', name: 'Text snippet ' + formattedDate(), format: data.format, data: data.text};\n $scope.files.unshift(file);\n $scope.updateImport(file.name);\n }\n if (data.startImport) {\n $scope.setSettingsFor(file.name);\n }\n });\n };\n\n $scope.rdfDataFromURL = function () {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/import/templates/urlImport.html',\n controller: 'UrlCtrl',\n scope: $scope\n });\n\n modalInstance.result.then(function (data) {\n // URL may already exist\n const existing = _.find($scope.files, {type: 'url', name: data.url});\n if (existing) {\n existing.format = data.format;\n } else {\n $scope.files.unshift({type: 'url', name: data.url, format: data.format, data: data.url});\n }\n $scope.updateImport(data.url, true);\n if (data.startImport) {\n $scope.setSettingsFor(data.url, true);\n }\n });\n };\n\n $scope.init();\n}]);\n\nimportCtrl.controller('UrlCtrl', ['$scope', '$modalInstance', 'toastr', function ($scope, $modalInstance) {\n $scope.importFormat = {name: 'Auto', type: ''};\n $scope.startImport = true;\n\n $scope.cancel = function () {\n $modalInstance.dismiss();\n };\n\n $scope.ok = function () {\n $modalInstance.close({\n url: $scope.dataUrl,\n format: $scope.importFormat.type,\n startImport: $scope.startImport\n });\n };\n}]);\n\nimportCtrl.controller('TextCtrl', ['$scope', '$modalInstance', 'text', 'format', function ($scope, $modalInstance, text, format) {\n $scope.importFormats = [\n {name: 'RDF/JSON', type: 'application/rdf+json'},\n {name: 'JSON-LD', type: 'application/ld+json'},\n {name: 'RDF/XML', type: 'application/rdf+xml'},\n {name: 'N3', type: 'text/rdf+n3'},\n {name: 'N-Triples', type: 'text/plain'},\n {name: 'N-Quads', type: 'text/x-nquads'},\n {name: 'Turtle', type: 'text/turtle'},\n {name: 'Turtle*', type: 'application/x-turtlestar'},\n {name: 'TriX', type: 'application/trix'},\n {name: 'TriG', type: 'application/x-trig'},\n {name: 'TriG*', type: 'application/x-trigstar'},\n ];\n\n $scope.rdfText = text;\n $scope.importFormat = _.find($scope.importFormats, {type: format});\n $scope.startImport = true;\n\n $scope.setFormat = function (format) {\n $scope.importFormat = format;\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss();\n };\n\n $scope.ok = function () {\n $modalInstance.close({\n text: $scope.rdfText,\n format: $scope.importFormat.type,\n startImport: $scope.startImport\n });\n };\n}]);\n\nimportCtrl.controller('TabCtrl', ['$scope', '$location', function ($scope, $location) {\n $scope.viewType = $location.hash();\n if ($scope.viewType !== 'user' && $scope.viewType !== 'server') {\n $scope.viewType = 'user';\n }\n $scope.isCollapsed = false;\n if ($scope.viewType === 'user') {\n $scope.templateUrl = 'js/angular/import/templates/uploadInfo.html';\n } else {\n $scope.templateUrl = 'js/angular/import/templates/importInfo.html';\n }\n $scope.changeHelpTemplate = function (templateFile) {\n $scope.templateUrl = 'js/angular/import/templates/' + templateFile;\n };\n $scope.commonUrl = 'js/angular/import/templates/commonInfo.html';\n}]);\n\nimportCtrl.controller('SettingsModalCtrl', ['$scope', '$modalInstance', 'toastr', 'UriUtils', 'settings', 'hasParserSettings', 'defaultSettings', 'isMultiple', '$translate',\n function ($scope, $modalInstance, toastr, UriUtils, settings, hasParserSettings, defaultSettings, isMultiple, $translate) {\n $scope.hasError = function (error, input) {\n return _.find(error, function (o) {\n return input === o['$name'];\n });\n };\n\n $scope.settings = settings;\n $scope.hasParserSettings = hasParserSettings;\n if ($scope.settings.context) {\n if ($scope.settings.context === 'default') {\n $scope.target = 'default';\n $scope.settings.context = '';\n } else {\n $scope.target = 'named';\n }\n } else {\n $scope.target = 'data';\n }\n $scope.isMultiple = isMultiple;\n $scope.enableReplace = !!($scope.settings.replaceGraphs && $scope.settings.replaceGraphs.length);\n\n const fixSettings = function () {\n if ($scope.target === 'default') {\n $scope.settings.context = 'default';\n } else if ($scope.target === 'data') {\n $scope.settings.context = '';\n }\n if ($scope.enableReplace) {\n if ($scope.target === 'default' || $scope.target === 'named') {\n $scope.settings.replaceGraphs = [$scope.settings.context];\n }\n } else {\n $scope.settings.replaceGraphs = [];\n }\n };\n\n $scope.ok = function () {\n // resets the validity of a field only used for temporary things\n $scope.settingsForm.replaceGraph.$setValidity('replaceGraph', true);\n\n if ($scope.settingsForm.$valid) {\n fixSettings();\n $modalInstance.close($scope.settings);\n }\n };\n\n $scope.cancel = function () {\n fixSettings();\n $modalInstance.dismiss($scope.settings);\n };\n\n $scope.reset = function () {\n $scope.settings = angular.copy(defaultSettings);\n $scope.target = 'data';\n };\n\n $scope.addReplaceGraph = function (graph) {\n let valid = true;\n if (graph !== 'default') {\n valid = UriUtils.isValidIri(graph);\n }\n $scope.settingsForm.replaceGraph.$setTouched();\n $scope.settingsForm.replaceGraph.$setValidity('replaceGraph', valid);\n\n if ($scope.settingsForm.replaceGraph.$valid) {\n $scope.settings.replaceGraphs = $scope.settings.replaceGraphs || [];\n if (_.indexOf($scope.settings.replaceGraphs, graph) === -1) {\n $scope.replaceGraph = '';\n $scope.settings.replaceGraphs.push(graph);\n } else {\n toastr.warning($translate.instant('import.graph.already.in.list'));\n }\n }\n };\n\n $scope.checkEnterReplaceGraph = function (event, graph) {\n if (event.keyCode === 13) {\n event.preventDefault();\n\n $scope.addReplaceGraph(graph);\n }\n };\n\n $scope.showAdvancedSettings = false;\n $scope.switchParserSettings = function () {\n $scope.showAdvancedSettings = !$scope.showAdvancedSettings;\n };\n}]);\n"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[97],{93:function(e,a,n){"use strict";n.r(a);n(4),n(12),n(10),n(15);const s=angular.module("graphdb.framework.namespaces.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.framework.rest.repositories.service","graphdb.framework.rest.rdf4j.repositories.service","toastr"]),c=function(){const e="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]",a="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|_|-|[0-9]|·|[̀-ͯ]|[‿-⁀]";return new RegExp("^(?:"+e+")(?:(?:"+a+"|\\.)*(?:"+a+"))?$")}();s.controller("NamespacesCtrl",["$scope","$http","$repositories","toastr","$modal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate",function(e,a,n,s,t,r,i,o,p){function l(a,c){let t;t="object"==typeof a?a.prefix:a,o.deleteNamespacePrefix(n.getActiveRepository(),t).success((function(){c&&c.length>0?l(a=c.shift(),c):(e.selectedAll=!1,e.namespace={},e.getNamespaces(),e.searchNamespaces="",e.haveSelected=!1,e.loader=!1,e.displayedNamespaces=[],void 0===c?s.success(p.instant("namespace.prefix.deleted.successfully",{prefix:t}),""):s.success(p.instant("namespace.selected.namespaces.deleted.successfully"),""))})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))}function m(e,a){return function(e){return""===e||e.match(c)}(e)?!angular.isUndefined(a)&&""!==a||(s.error(p.instant("namespace.warning.provide.namespace"),p.instant("common.error")),!1):(s.error(p.instant("namespace.invalid.prefix",{prefix:e},p.instant("common.error"))),!1)}e.namespaces={},e.namespace={},e.loader=!1,e.haveSelected=!1,e.pageSizeOptions=[10,20,50,100],e.page=1,e.pageSize=e.pageSizeOptions[0],e.displayedNamespaces=[],e.getNamespaces=function(){n.getActiveRepository()&&(e.loader=!0,e.namespaces={},o.getNamespaces(n.getActiveRepository()).success((function(a){e.namespaces=a.results.bindings.map((function(e){return{prefix:e.prefix.value,namespace:e.namespace.value}})),e.namespaces.length>0&&(e.namespaces.sort((function(e,a){const n=e.prefix.toUpperCase(),s=a.prefix.toUpperCase();return n<s?-1:n>s?1:0})),e.matchedElements=e.namespaces,e.changePagination()),0===e.namespaces.length&&(e.loader=!1)})).error((function(a){const n=getError(a);s.error(n),e.loader=!1})))},e.changePagination=function(){angular.isDefined(e.namespaces)&&(e.displayedNamespaces=e.namespaces.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(a){$(".ot-graph-page-size").removeClass("active"),e.page=1,e.searchNamespaces="",a&&(e.getNamespaces(),e.pageSize=a)},e.$watch("matchedElements",(function(){angular.isDefined(e.matchedElements)&&(e.displayedNamespaces=e.matchedElements.slice(e.pageSize*(e.page-1),e.pageSize*e.page))})),e.$watch((function(){return n.getActiveRepository()}),(function(){e.searchNamespaces="",e.getNamespaces(),e.selectedAll=!1})),e.onNamespaceSearch=function(){e.haveSelected=!1,e.selectedAll=!1,e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.namespaces,(function(a){-1===a.namespace.indexOf(e.searchNamespaces)&&-1===a.prefix.indexOf(e.searchNamespaces)||e.matchedElements.push(a)}))},e.saveNamespace=function(a,c){return e.loader=!0,o.updateNamespacePrefix(n.getActiveRepository(),c,a).success((function(){e.getNamespaces(),e.loader=!1})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))},e.editPrefix=function(a,c){e.loader=!0,i.getPrefix(n.getActiveRepository(),{from:a,to:c,location:n.getActiveRepositoryObject().location}).success((function(){e.getNamespaces(),e.loader=!1})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))},e.confirmReplace=function(e,a){r.openSimpleModal({title:p.instant("namespace.confirm.replace"),message:p.instant("namespace.already.exists.msg"),warning:!0}).result.then(e,a)},e.editPrefixAndNamespace=function(a,n,s){if(angular.isUndefined(a)&&(a=""),!m(a,n))return"";let c=!1;const t=s.prefix;angular.forEach(e.namespaces,(function(e){e.prefix===a&&t!==a&&(c=!0)})),c?e.confirmReplace((function(){e.saveNamespace(t,n).then((function(){t!==a&&e.editPrefix(t,a)}))}),(function(){e.getNamespaces()})):angular.isDefined(c)&&e.saveNamespace(t,n).then((function(){t!==a&&e.editPrefix(t,a)}))},e.addNamespace=function(){if(angular.isUndefined(e.namespace.prefix)&&(e.namespace.prefix=""),!m(e.namespace.prefix,e.namespace.namespace))return;e.selectedAll=!1;let a=!1;for(let n=0;n<e.namespaces.length;n++)e.namespaces[n].prefix===e.namespace.prefix&&(a=!0);a?e.confirmReplace((function(){e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace={}})):(e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace={})},e.removeNamespace=function(e){r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.msg",{prefix:e.prefix}),warning:!0}).result.then((function(){l(e)}))},e.checkAll=function(){angular.forEach(e.displayedNamespaces,(function(a){a.selected=e.selectedAll}))},e.deleteSelected=function(){let a=!1;angular.forEach(e.displayedNamespaces,(function(n){a||n.selected&&(a=!0,r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.selected"),warning:!0}).result.then((function(){e.loader=!0;const a=[];angular.forEach(e.displayedNamespaces,(function(e){e.selected&&a.push(e)})),l(a.shift(),a),e.selectedAll=!1}),(function(){e.getNamespaces(),e.selectedAll=!1,e.searchNamespaces=""})))}))},e.checkIfSelectedNamespace=function(){e.haveSelected=!1,angular.forEach(e.namespaces,(function(a){a.selected&&(e.haveSelected=!0)}))},e.deselectAll=function(){angular.forEach(e.namespaces,(function(e){e.selected=!1}))}}]),s.controller("StandartModalCtrl",["$scope","$modalInstance",function(e,a){e.ok=function(){a.close(!0)},e.cancel=function(){a.dismiss("cancel")}}])}}]);
2
- //# sourceMappingURL=97.e88574ad257bd44724c3.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/namespaces/controllers.js"],"names":["namespaces","angular","module","pnPrefixRe","pnCharsBase","pnChars","pnCharsU","RegExp","controller","$scope","$http","$repositories","toastr","$modal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate","deleteNamespace","namespace","prefix","deleteNamespacePrefix","getActiveRepository","success","length","shift","selectedAll","getNamespaces","searchNamespaces","haveSelected","loader","displayedNamespaces","undefined","instant","error","data","msg","getError","validatePrefixAndNamespace","match","validatePrefix","isUndefined","pageSizeOptions","page","pageSize","results","bindings","map","e","value","sort","a","b","prefixA","toUpperCase","prefixB","matchedElements","changePagination","isDefined","slice","changePageSize","size","$","removeClass","$watch","onNamespaceSearch","deselectAll","filterResults","forEach","item","indexOf","push","saveNamespace","updateNamespacePrefix","editPrefix","oldPrefix","newPrefix","getPrefix","from","to","location","getActiveRepositoryObject","confirmReplace","okCallback","cancelCallback","openSimpleModal","title","message","warning","result","then","editPrefixAndNamespace","namespaceObject","prefixExist","elem","addNamespace","i","removeNamespace","checkAll","selected","deleteSelected","modalInstanceOpened","checkIfSelectedNamespace","$modalInstance","ok","close","cancel","dismiss"],"mappings":"0FAAA,8BAKA,MASMA,EAAaC,QAAQC,OAAO,2CATlB,CACZ,eACA,+CACA,0CACA,8CACA,oDACA,WAOEC,EAAa,WACf,MAAMC,EAAc,gFAIdC,EAAUC,wGAEhB,OAAO,IAAIC,OAAO,OAASH,EAAc,UAAYC,EAAU,YAAcA,EAAU,QAPxE,GAcnBL,EAAWQ,WAAW,iBAAkB,CAAC,SAAU,QAAS,gBAAiB,SAAU,SAAU,eAAgB,0BAA2B,+BAAgC,aACxK,SAAUC,EAAQC,EAAOC,EAAeC,EAAQC,EAAQC,EAAcC,EAAyBC,EAA8BC,GAoPzH,SAASC,EAAgBC,EAAWnB,GAChC,IAAIoB,EAEAA,EADqB,iBAAdD,EACEA,EAAUC,OAEVD,EAEbH,EAA6BK,sBAAsBV,EAAcW,sBAAuBF,GACnFG,SAAQ,WACDvB,GAAcA,EAAWwB,OAAS,EAElCN,EADAC,EAAYnB,EAAWyB,QACIzB,IAE3BS,EAAOiB,aAAc,EACrBjB,EAAOU,UAAY,GACnBV,EAAOkB,gBACPlB,EAAOmB,iBAAmB,GAC1BnB,EAAOoB,cAAe,EACtBpB,EAAOqB,QAAS,EAChBrB,EAAOsB,oBAAsB,QACVC,IAAfhC,EACAY,EAAOW,QAAQN,EAAWgB,QAAQ,wCAAyC,CAACb,OAAQA,IAAU,IAE9FR,EAAOW,QAAQN,EAAWgB,QAAQ,sDAAuD,QAGlGC,OAAM,SAAUC,GACf,MAAMC,EAAMC,SAASF,GACrBvB,EAAOsB,MAAME,EAAKnB,EAAWgB,QAAQ,iBACrCxB,EAAOqB,QAAS,KAmB5B,SAASQ,EAA2BlB,EAAQD,GACxC,OA1SZ,SAAwBC,GACpB,MAAkB,KAAXA,GAAiBA,EAAOmB,MAAMpC,GAySxBqC,CAAepB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B,EAAOyD,YAAc,WACjBjE,QAAQmE,QAAQ3D,EAAOT,YAAY,SAAUqE,GACzCA,EAAK8B,UAAW,SAmBhCnG,EAAWQ,WAAW,oBAAqB,CAAC,SAAU,iBAAkB,SAAUC,EAAQ8F,GAEtF9F,EAAO+F,GAAK,WAERD,EAAeE,OADA,IAInBhG,EAAOiG,OAAS,WACZH,EAAeI,QAAQ","file":"97.e88574ad257bd44724c3.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/services/jwt-auth.service';\nimport 'angular/core/services/repositories.service';\nimport 'angular/rest/rdf4j.repositories.rest.service';\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.services.jwtauth',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.rest.rdf4j.repositories.service',\n 'toastr'\n];\n\nconst namespaces = angular.module('graphdb.framework.namespaces.controllers', modules);\n\n// A regular expression that validates a prefix according to the SPARQL 1.1 specification.\n// XXX: Technically this should include Unicode chars > 0xFFFF but those aren't fully supported in JavaScript\nconst pnPrefixRe = function () {\n const pnCharsBase = '[A-Z]|[a-z]|[\\u00C0-\\u00D6]|[\\u00D8-\\u00F6]|[\\u00F8-\\u02FF]|[\\u0370-\\u037D]'\n + '|[\\u037F-\\u1FFF]|[\\u200C-\\u200D]|[\\u2070-\\u218F]|[\\u2C00-\\u2FEF]|[\\u3001-\\uD7FF]'\n + '|[\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]';\n const pnCharsU = pnCharsBase + '|_';\n const pnChars = pnCharsU + '|-|[0-9]|\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]';\n\n return new RegExp('^(?:' + pnCharsBase + ')(?:(?:' + pnChars + '|\\\\.)*(?:' + pnChars + '))?$');\n}();\n\nfunction validatePrefix(prefix) {\n return prefix === '' || prefix.match(pnPrefixRe);\n}\n\nnamespaces.controller('NamespacesCtrl', ['$scope', '$http', '$repositories', 'toastr', '$modal', 'ModalService', 'RepositoriesRestService', 'RDF4JRepositoriesRestService', '$translate',\n function ($scope, $http, $repositories, toastr, $modal, ModalService, RepositoriesRestService, RDF4JRepositoriesRestService, $translate) {\n $scope.namespaces = {};\n $scope.namespace = {};\n $scope.loader = false;\n $scope.haveSelected = false;\n $scope.pageSizeOptions = [10, 20, 50, 100];\n $scope.page = 1;\n $scope.pageSize = $scope.pageSizeOptions[0];\n $scope.displayedNamespaces = [];\n\n $scope.getNamespaces = function () {\n if (!$repositories.getActiveRepository()) {\n return;\n }\n\n $scope.loader = true;\n $scope.namespaces = {};\n RDF4JRepositoriesRestService.getNamespaces($repositories.getActiveRepository())\n .success(function (data) {\n $scope.namespaces = data.results.bindings.map(function (e) {\n return {\n prefix: e.prefix.value,\n namespace: e.namespace.value\n };\n });\n if ($scope.namespaces.length > 0) {\n $scope.namespaces.sort(function (a, b) {\n const prefixA = a.prefix.toUpperCase(); // ignore upper and lowercase\n const prefixB = b.prefix.toUpperCase(); // ignore upper and lowercase\n if (prefixA < prefixB) {\n return -1;\n }\n if (prefixA > prefixB) {\n return 1;\n }\n return 0;\n });\n $scope.matchedElements = $scope.namespaces;\n $scope.changePagination();\n }\n if ($scope.namespaces.length === 0) {\n // Remove the loader ourselves\n $scope.loader = false;\n } // else let the loaderPostRepeatDirective do it\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg);\n $scope.loader = false;\n });\n };\n\n $scope.changePagination = function () {\n if (angular.isDefined($scope.namespaces)) {\n $scope.displayedNamespaces = $scope.namespaces.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n };\n\n $scope.changePageSize = function (size) {\n $('.ot-graph-page-size').removeClass('active');\n $scope.page = 1;\n $scope.searchNamespaces = '';\n if (size) {\n $scope.getNamespaces();\n $scope.pageSize = size;\n }\n };\n\n $scope.$watch('matchedElements', function () {\n if (angular.isDefined($scope.matchedElements)) {\n $scope.displayedNamespaces = $scope.matchedElements.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n });\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n $scope.searchNamespaces = '';\n $scope.getNamespaces();\n $scope.selectedAll = false;\n });\n\n $scope.onNamespaceSearch = function() {\n $scope.haveSelected = false;\n $scope.selectedAll = false;\n $scope.matchedElements = [];\n $scope.deselectAll();\n $scope.filterResults();\n };\n\n $scope.filterResults = function() {\n angular.forEach($scope.namespaces, function (item) {\n if (item.namespace.indexOf($scope.searchNamespaces) !== -1 || item.prefix.indexOf($scope.searchNamespaces) !== -1) {\n $scope.matchedElements.push(item);\n }\n });\n };\n\n $scope.saveNamespace = function (prefix, namespace) {\n $scope.loader = true;\n return RDF4JRepositoriesRestService.updateNamespacePrefix($repositories.getActiveRepository(), namespace, prefix)\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.editPrefix = function (oldPrefix, newPrefix) {\n $scope.loader = true;\n RepositoriesRestService.getPrefix($repositories.getActiveRepository(), {\n from: oldPrefix, to: newPrefix, location: $repositories.getActiveRepositoryObject().location})\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.confirmReplace = function (okCallback, cancelCallback) {\n ModalService.openSimpleModal({\n title: $translate.instant('namespace.confirm.replace'),\n message: $translate.instant('namespace.already.exists.msg'),\n warning: true\n }).result.then(okCallback, cancelCallback);\n };\n\n $scope.editPrefixAndNamespace = function (prefix, namespace, namespaceObject) {\n if (angular.isUndefined(prefix)) {\n prefix = '';\n }\n\n if (!validatePrefixAndNamespace(prefix, namespace)) {\n return '';\n }\n\n let prefixExist = false;\n const oldPrefix = namespaceObject.prefix;\n angular.forEach($scope.namespaces, function (elem) {\n if (elem.prefix === prefix && oldPrefix !== prefix) {\n prefixExist = true;\n }\n });\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }, function () {\n $scope.getNamespaces();\n });\n } else if (angular.isDefined(prefixExist)) {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }\n };\n\n $scope.addNamespace = function () {\n if (angular.isUndefined($scope.namespace.prefix)) {\n $scope.namespace.prefix = '';\n }\n\n if (!validatePrefixAndNamespace($scope.namespace.prefix, $scope.namespace.namespace)) {\n return;\n }\n\n $scope.selectedAll = false;\n let prefixExist = false;\n for (let i = 0; i < $scope.namespaces.length; i++) {\n if ($scope.namespaces[i].prefix === $scope.namespace.prefix) {\n prefixExist = true;\n }\n }\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n });\n } else {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n }\n };\n\n $scope.removeNamespace = function (namespace) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.msg', {prefix: namespace.prefix}),\n warning: true\n }).result.then(function () {\n deleteNamespace(namespace);\n });\n };\n\n $scope.checkAll = function () {\n angular.forEach($scope.displayedNamespaces, function (item) {\n item.selected = $scope.selectedAll;\n });\n };\n\n $scope.deleteSelected = function () {\n const openModalInstance = function () {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.selected'),\n warning: true\n }).result.then(function () {\n $scope.loader = true;\n const namespaces = [];\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (namespace.selected) {\n namespaces.push(namespace);\n }\n });\n deleteNamespace(namespaces.shift(), namespaces);\n $scope.selectedAll = false;\n }, function () {\n $scope.getNamespaces();\n $scope.selectedAll = false;\n $scope.searchNamespaces = '';\n });\n };\n\n let modalInstanceOpened = false;\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (!modalInstanceOpened) {\n if (namespace.selected) {\n modalInstanceOpened = true;\n openModalInstance();\n }\n }\n });\n };\n\n function deleteNamespace(namespace, namespaces) {\n let prefix;\n if (typeof namespace === 'object') {\n prefix = namespace.prefix;\n } else {\n prefix = namespace;\n }\n RDF4JRepositoriesRestService.deleteNamespacePrefix($repositories.getActiveRepository(), prefix)\n .success(function () {\n if (namespaces && namespaces.length > 0) {\n namespace = namespaces.shift();\n deleteNamespace(namespace, namespaces);\n } else {\n $scope.selectedAll = false;\n $scope.namespace = {};\n $scope.getNamespaces();\n $scope.searchNamespaces = '';\n $scope.haveSelected = false;\n $scope.loader = false;\n $scope.displayedNamespaces = [];\n if (namespaces === undefined) {\n toastr.success($translate.instant('namespace.prefix.deleted.successfully', {prefix: prefix}), '');\n } else {\n toastr.success($translate.instant('namespace.selected.namespaces.deleted.successfully'), '');\n }\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n }\n\n $scope.checkIfSelectedNamespace = function () {\n $scope.haveSelected = false;\n angular.forEach($scope.namespaces, function (item) {\n if (item.selected) {\n $scope.haveSelected = true;\n }\n });\n };\n\n $scope.deselectAll = function () {\n angular.forEach($scope.namespaces, function (item) {\n item.selected = false;\n });\n };\n\n function validatePrefixAndNamespace(prefix, namespace) {\n if (!validatePrefix(prefix)) {\n toastr.error($translate.instant('namespace.invalid.prefix', {prefix: prefix}, $translate.instant('common.error')));\n return false;\n }\n\n if (angular.isUndefined(namespace) || namespace === '') {\n toastr.error($translate.instant('namespace.warning.provide.namespace'), $translate.instant('common.error'));\n return false;\n }\n\n return true;\n }\n }]);\n\nnamespaces.controller('StandartModalCtrl', ['$scope', '$modalInstance', function ($scope, $modalInstance) {\n\n $scope.ok = function () {\n const result = true;\n $modalInstance.close(result);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}]);\n"],"sourceRoot":""}