graphdb-workbench 3.2.0-TR1 → 3.2.0-TR2

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 (345) hide show
  1. package/dist/10142.dae0223e0a1d85ad72fe.bundle.js +2 -0
  2. package/dist/10142.dae0223e0a1d85ad72fe.bundle.js.map +1 -0
  3. package/dist/{10376.e89fa63ff898d45f45fd.bundle.js → 10376.2723c52982b51c64bffb.bundle.js} +2 -2
  4. package/dist/10376.2723c52982b51c64bffb.bundle.js.map +1 -0
  5. package/dist/{12396.4c26c8da50c790b0f39a.bundle.js → 12396.9a7f2862146b6f9adcb1.bundle.js} +2 -2
  6. package/dist/{12396.4c26c8da50c790b0f39a.bundle.js.map → 12396.9a7f2862146b6f9adcb1.bundle.js.map} +1 -1
  7. package/dist/12940.7a45ae43d5f3ba6e7d83.bundle.js +2 -0
  8. package/dist/12940.7a45ae43d5f3ba6e7d83.bundle.js.map +1 -0
  9. package/dist/14824.a3bc164c5bf4313f5276.bundle.js +2 -0
  10. package/dist/14824.a3bc164c5bf4313f5276.bundle.js.map +1 -0
  11. package/dist/{15535.ce8d657c04f3401b9539.bundle.js → 15535.7b170e17ee0a58970ab6.bundle.js} +2 -2
  12. package/dist/{15535.ce8d657c04f3401b9539.bundle.js.map → 15535.7b170e17ee0a58970ab6.bundle.js.map} +1 -1
  13. package/dist/{16162.8f482628d1b34d41d496.bundle.js → 16162.67e7c1f5f313481b1e80.bundle.js} +2 -2
  14. package/dist/{16162.8f482628d1b34d41d496.bundle.js.map → 16162.67e7c1f5f313481b1e80.bundle.js.map} +1 -1
  15. package/dist/18961.5e34171366c281038fe5.bundle.js +2 -0
  16. package/dist/18961.5e34171366c281038fe5.bundle.js.map +1 -0
  17. package/dist/20227.a9333aa1320edea7264b.bundle.js +2 -0
  18. package/dist/20227.a9333aa1320edea7264b.bundle.js.map +1 -0
  19. package/dist/{20287.c42f9d1d913c36e46931.bundle.js → 20287.dd5bc263fe26adf34965.bundle.js} +2 -2
  20. package/dist/{20287.c42f9d1d913c36e46931.bundle.js.map → 20287.dd5bc263fe26adf34965.bundle.js.map} +1 -1
  21. package/dist/{21136.199caea09a1c9ad90393.bundle.js → 21136.b7efcb40fb956ff1109c.bundle.js} +2 -2
  22. package/dist/{21136.199caea09a1c9ad90393.bundle.js.map → 21136.b7efcb40fb956ff1109c.bundle.js.map} +1 -1
  23. package/dist/{21142.b690e00c8884fddb2bb3.bundle.js → 21142.ec45fad4d52b36961d17.bundle.js} +2 -2
  24. package/dist/{21142.b690e00c8884fddb2bb3.bundle.js.map → 21142.ec45fad4d52b36961d17.bundle.js.map} +1 -1
  25. package/dist/{21170.d5e3041241741d21080c.bundle.js → 21170.7832554eab9eaade6ffb.bundle.js} +2 -2
  26. package/dist/{21170.d5e3041241741d21080c.bundle.js.map → 21170.7832554eab9eaade6ffb.bundle.js.map} +1 -1
  27. package/dist/{21195.267abc9d42b711d0f17a.bundle.js → 21195.caae6cc33d755ad52df4.bundle.js} +2 -2
  28. package/dist/{21195.267abc9d42b711d0f17a.bundle.js.map → 21195.caae6cc33d755ad52df4.bundle.js.map} +1 -1
  29. package/dist/{25747.4e00941ec221c4d6ce8f.bundle.js → 25747.c01110e23b922cdd3d9e.bundle.js} +2 -2
  30. package/dist/{25747.4e00941ec221c4d6ce8f.bundle.js.map → 25747.c01110e23b922cdd3d9e.bundle.js.map} +1 -1
  31. package/dist/{27580.f71ebbc69dd1c7785ef3.bundle.js → 27580.5a421770ab66d2dedc37.bundle.js} +2 -2
  32. package/dist/{27580.f71ebbc69dd1c7785ef3.bundle.js.map → 27580.5a421770ab66d2dedc37.bundle.js.map} +1 -1
  33. package/dist/{28050.8ca1fa760c892bfc5466.bundle.js → 28050.6960a4a0961a07a94743.bundle.js} +2 -2
  34. package/dist/28050.6960a4a0961a07a94743.bundle.js.map +1 -0
  35. package/dist/{31636.e34ccc2d6f2dec577446.bundle.js → 31636.54e2817f8ae3998a34b3.bundle.js} +2 -2
  36. package/dist/{31636.e34ccc2d6f2dec577446.bundle.js.map → 31636.54e2817f8ae3998a34b3.bundle.js.map} +1 -1
  37. package/dist/{32489.97fac2c3daa49b143d13.bundle.js → 32489.f7a2dc39cd61c2cd8874.bundle.js} +2 -2
  38. package/dist/{32489.97fac2c3daa49b143d13.bundle.js.map → 32489.f7a2dc39cd61c2cd8874.bundle.js.map} +1 -1
  39. package/dist/33524.79f7e98ef89a46d4aa58.bundle.js +2 -0
  40. package/dist/33524.79f7e98ef89a46d4aa58.bundle.js.map +1 -0
  41. package/dist/{34495.cfa15bda8009fa37c6ff.bundle.js → 34495.be67c06c39909114bbe4.bundle.js} +2 -2
  42. package/dist/{34495.cfa15bda8009fa37c6ff.bundle.js.map → 34495.be67c06c39909114bbe4.bundle.js.map} +1 -1
  43. package/dist/{38360.0a90e77042876c86b279.bundle.js → 38360.efec913bb97c3b8588a4.bundle.js} +2 -2
  44. package/dist/{38360.0a90e77042876c86b279.bundle.js.map → 38360.efec913bb97c3b8588a4.bundle.js.map} +1 -1
  45. package/dist/{38644.3a0954c798ec413a3810.bundle.js → 38644.800252af49cd67310834.bundle.js} +2 -2
  46. package/dist/{38644.3a0954c798ec413a3810.bundle.js.map → 38644.800252af49cd67310834.bundle.js.map} +1 -1
  47. package/dist/{38843.5ef7a063337524ce3bb2.bundle.js → 38843.29e34a5e5293cee51566.bundle.js} +2 -2
  48. package/dist/{38843.5ef7a063337524ce3bb2.bundle.js.map → 38843.29e34a5e5293cee51566.bundle.js.map} +1 -1
  49. package/dist/{39518.4199684f3273d29d9105.bundle.js → 39518.0ca97879b92271d7c5e2.bundle.js} +2 -2
  50. package/dist/{39518.4199684f3273d29d9105.bundle.js.map → 39518.0ca97879b92271d7c5e2.bundle.js.map} +1 -1
  51. package/dist/{39539.c23e4878044d73f2505b.bundle.js → 39539.7cea6717cc3a5ba91617.bundle.js} +2 -2
  52. package/dist/{39539.c23e4878044d73f2505b.bundle.js.map → 39539.7cea6717cc3a5ba91617.bundle.js.map} +1 -1
  53. package/dist/{41453.8bb4c783da2c5077a6e9.bundle.js → 41453.4ae219d972a187c36bfc.bundle.js} +2 -2
  54. package/dist/{41453.8bb4c783da2c5077a6e9.bundle.js.map → 41453.4ae219d972a187c36bfc.bundle.js.map} +1 -1
  55. package/dist/41621.624ba3d867bc05b5c3cc.bundle.js +2 -0
  56. package/dist/41621.624ba3d867bc05b5c3cc.bundle.js.map +1 -0
  57. package/dist/{42129.f44b7b20f9cd376c6e59.bundle.js → 42129.0314e45b4b818b01b71f.bundle.js} +2 -2
  58. package/dist/{42129.f44b7b20f9cd376c6e59.bundle.js.map → 42129.0314e45b4b818b01b71f.bundle.js.map} +1 -1
  59. package/dist/{44444.ad66c8256bc5b653de1a.bundle.js → 44444.02026ff20e2a843dc05b.bundle.js} +2 -2
  60. package/dist/{44444.ad66c8256bc5b653de1a.bundle.js.map → 44444.02026ff20e2a843dc05b.bundle.js.map} +1 -1
  61. package/dist/45069.82993bf600a550fac275.bundle.js +2 -0
  62. package/dist/45069.82993bf600a550fac275.bundle.js.map +1 -0
  63. package/dist/{456.6118cb99d130f4c0410c.bundle.js → 456.634597f220a97bfbeab8.bundle.js} +2 -2
  64. package/dist/456.634597f220a97bfbeab8.bundle.js.map +1 -0
  65. package/dist/45758.9ffd8e7d5f99e2c394a2.bundle.js +2 -0
  66. package/dist/45758.9ffd8e7d5f99e2c394a2.bundle.js.map +1 -0
  67. package/dist/{52264.99261393a7f6e631da3b.bundle.js → 52264.4cf2f1a18d16484f0af1.bundle.js} +2 -2
  68. package/dist/52264.4cf2f1a18d16484f0af1.bundle.js.map +1 -0
  69. package/dist/54419.aec242a64c27ceda6e02.bundle.js +2 -0
  70. package/dist/54419.aec242a64c27ceda6e02.bundle.js.map +1 -0
  71. package/dist/5470.58e107e4c61ae7c22d48.bundle.js +2 -0
  72. package/dist/5470.58e107e4c61ae7c22d48.bundle.js.map +1 -0
  73. package/dist/{55862.1fb5abd075ba11a7e93c.bundle.js → 55862.5e8602827fbf72e60cc2.bundle.js} +2 -2
  74. package/dist/{55862.1fb5abd075ba11a7e93c.bundle.js.map → 55862.5e8602827fbf72e60cc2.bundle.js.map} +1 -1
  75. package/dist/{58306.ba9545cbaee021ebcbce.bundle.js → 58306.94b9336f68d11bdd72f0.bundle.js} +2 -2
  76. package/dist/{58306.ba9545cbaee021ebcbce.bundle.js.map → 58306.94b9336f68d11bdd72f0.bundle.js.map} +1 -1
  77. package/dist/58334.8a2bdb0560e0ce23f792.bundle.js +2 -0
  78. package/dist/58334.8a2bdb0560e0ce23f792.bundle.js.map +1 -0
  79. package/dist/60560.2ef51d3e2d9674450419.bundle.js +2 -0
  80. package/dist/60560.2ef51d3e2d9674450419.bundle.js.map +1 -0
  81. package/dist/64118.fb6952c8ef6fc9117f35.bundle.js +2 -0
  82. package/dist/64118.fb6952c8ef6fc9117f35.bundle.js.map +1 -0
  83. package/dist/66014.d9f7b86d6829ebfe9d0e.bundle.js +2 -0
  84. package/dist/66014.d9f7b86d6829ebfe9d0e.bundle.js.map +1 -0
  85. package/dist/{67888.7d4966e0a22ba655f1b8.bundle.js → 67888.772326168aed83cbad9c.bundle.js} +2 -2
  86. package/dist/67888.772326168aed83cbad9c.bundle.js.map +1 -0
  87. package/dist/69724.56df2d5b2ba312cb8118.bundle.js +2 -0
  88. package/dist/69724.56df2d5b2ba312cb8118.bundle.js.map +1 -0
  89. package/dist/{72379.bac50d0011665a85b6cd.bundle.js → 72379.8a3290df05f18f8c65bd.bundle.js} +2 -2
  90. package/dist/{72379.bac50d0011665a85b6cd.bundle.js.map → 72379.8a3290df05f18f8c65bd.bundle.js.map} +1 -1
  91. package/dist/{73667.3dd4f377e7ef54fd8758.bundle.js → 73667.52fdbdadddafe9e9559b.bundle.js} +2 -2
  92. package/dist/{73667.3dd4f377e7ef54fd8758.bundle.js.map → 73667.52fdbdadddafe9e9559b.bundle.js.map} +1 -1
  93. package/dist/{73793.6d80d47c26ed60a587fd.bundle.js → 73793.7e812bab1754ddd5efb5.bundle.js} +2 -2
  94. package/dist/{73793.6d80d47c26ed60a587fd.bundle.js.map → 73793.7e812bab1754ddd5efb5.bundle.js.map} +1 -1
  95. package/dist/{75282.88819e851ed18720b275.bundle.js → 75282.2f97d3a7d7f3fdd7aebf.bundle.js} +2 -2
  96. package/dist/{75282.88819e851ed18720b275.bundle.js.map → 75282.2f97d3a7d7f3fdd7aebf.bundle.js.map} +1 -1
  97. package/dist/{75849.51ade15bf0074eab76f3.bundle.js → 75849.bd0bdefa903741034a71.bundle.js} +2 -2
  98. package/dist/{75849.51ade15bf0074eab76f3.bundle.js.map → 75849.bd0bdefa903741034a71.bundle.js.map} +1 -1
  99. package/dist/77143.e0cb9ab61d798d7b5e0b.bundle.js +2 -0
  100. package/dist/77143.e0cb9ab61d798d7b5e0b.bundle.js.map +1 -0
  101. package/dist/78070.21b221881c2b49603eb9.bundle.js +2 -0
  102. package/dist/78070.21b221881c2b49603eb9.bundle.js.map +1 -0
  103. package/dist/{78250.6db42146a120459280e4.bundle.js → 78250.73e3013c5b2ebdddbf38.bundle.js} +2 -2
  104. package/dist/{78250.6db42146a120459280e4.bundle.js.map → 78250.73e3013c5b2ebdddbf38.bundle.js.map} +1 -1
  105. package/dist/78681.7b1c9100e03c2346550a.bundle.js +2 -0
  106. package/dist/78681.7b1c9100e03c2346550a.bundle.js.map +1 -0
  107. package/dist/{79329.5a5cbfa466d1c62af915.bundle.js → 79329.3d912887ba7e96090fb4.bundle.js} +2 -2
  108. package/dist/{79329.5a5cbfa466d1c62af915.bundle.js.map → 79329.3d912887ba7e96090fb4.bundle.js.map} +1 -1
  109. package/dist/81837.a989b5e255a0ce6176b2.bundle.js +2 -0
  110. package/dist/81837.a989b5e255a0ce6176b2.bundle.js.map +1 -0
  111. package/dist/82206.fd868720394b9dc2adac.bundle.js +2 -0
  112. package/dist/82206.fd868720394b9dc2adac.bundle.js.map +1 -0
  113. package/dist/82293.5e41c8378272aabf99f6.bundle.js +2 -0
  114. package/dist/82293.5e41c8378272aabf99f6.bundle.js.map +1 -0
  115. package/dist/82896.4787d205b19befaf263a.bundle.js +2 -0
  116. package/dist/82896.4787d205b19befaf263a.bundle.js.map +1 -0
  117. package/dist/{82926.93dbf44f2bcccba34e9b.bundle.js → 82926.93a59d42bf8d49aaac8e.bundle.js} +2 -2
  118. package/dist/{82926.93dbf44f2bcccba34e9b.bundle.js.map → 82926.93a59d42bf8d49aaac8e.bundle.js.map} +1 -1
  119. package/dist/{83136.56d692623cbc60048e03.bundle.js → 83136.4941a19a85eb34ca370a.bundle.js} +2 -2
  120. package/dist/83136.4941a19a85eb34ca370a.bundle.js.map +1 -0
  121. package/dist/{84727.b93b2f9857352d39b241.bundle.js → 84727.2e3214ad60bd59f435e2.bundle.js} +2 -2
  122. package/dist/84727.2e3214ad60bd59f435e2.bundle.js.map +1 -0
  123. package/dist/85281.76d06e1c26137bb4b417.bundle.js +2 -0
  124. package/dist/85281.76d06e1c26137bb4b417.bundle.js.map +1 -0
  125. package/dist/{86639.ab85108411ef0f006e10.bundle.js → 86639.d28da26b8f138f5eb19b.bundle.js} +2 -2
  126. package/dist/86639.d28da26b8f138f5eb19b.bundle.js.map +1 -0
  127. package/dist/89647.219c4eb306757647ae1c.bundle.js +2 -0
  128. package/dist/89647.219c4eb306757647ae1c.bundle.js.map +1 -0
  129. package/dist/{9062.d9049833d076191d3e1a.bundle.js → 9062.3541de664710a36fdac7.bundle.js} +2 -2
  130. package/dist/{9062.d9049833d076191d3e1a.bundle.js.map → 9062.3541de664710a36fdac7.bundle.js.map} +1 -1
  131. package/dist/95953.44049d81dd4879f745f9.bundle.js +2 -0
  132. package/dist/95953.44049d81dd4879f745f9.bundle.js.map +1 -0
  133. package/dist/96248.83e4f0c66a9f58161a66.bundle.js +2 -0
  134. package/dist/96248.83e4f0c66a9f58161a66.bundle.js.map +1 -0
  135. package/dist/98494.969124a68766ebbdee3c.bundle.js +3 -0
  136. package/dist/98494.969124a68766ebbdee3c.bundle.js.map +1 -0
  137. package/dist/99379.1b108abf4421ccee2973.bundle.js +2 -0
  138. package/dist/99379.1b108abf4421ccee2973.bundle.js.map +1 -0
  139. package/dist/{99448.314018d0afb1af150ddf.bundle.js → 99448.384b74c734331e5f8909.bundle.js} +2 -2
  140. package/dist/{99448.314018d0afb1af150ddf.bundle.js.map → 99448.384b74c734331e5f8909.bundle.js.map} +1 -1
  141. package/dist/99893.6ac254ca3f59996b2a52.bundle.js +2 -0
  142. package/dist/99893.6ac254ca3f59996b2a52.bundle.js.map +1 -0
  143. package/dist/api/models/configuration/configuration.d.ts +5 -0
  144. package/dist/api/models/logging/log-level.d.ts +7 -0
  145. package/dist/api/models/logging/logger-config.d.ts +19 -0
  146. package/dist/api/models/logging/logger-definitions.d.ts +7 -0
  147. package/dist/api/models/logging/logger-type.d.ts +3 -0
  148. package/dist/api/models/logging/logger.d.ts +15 -0
  149. package/dist/api/models/storage/storage-data.d.ts +1 -0
  150. package/dist/api/ontotext-workbench-api.d.ts +1 -0
  151. package/dist/api/ontotext-workbench-api.js +1 -1
  152. package/dist/api/ontotext-workbench-api.js.map +1 -1
  153. package/dist/api/services/logging/console/console-logger.service.d.ts +19 -0
  154. package/dist/api/services/logging/index.d.ts +2 -0
  155. package/dist/api/services/logging/logger-provider.d.ts +11 -0
  156. package/dist/api/services/logging/logger-service.d.ts +63 -0
  157. package/dist/api/services/logging/loggers.d.ts +15 -0
  158. package/dist/api/services/logging/test/loggers.spec.d.ts +1 -0
  159. package/dist/api/services/plugins/plugins-rest.service.d.ts +1 -0
  160. package/dist/api/services/plugins/plugins.service.d.ts +1 -0
  161. package/dist/api/services/repository/repository-storage.service.d.ts +1 -0
  162. package/dist/api/services/storage/local-storage-subscription-handler.service.d.ts +1 -0
  163. package/dist/api/services/utils/routing-utils.d.ts +1 -1
  164. package/dist/assets/configuration.default.json +5 -1
  165. package/dist/index.html +10 -8
  166. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  167. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  168. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  169. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  170. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  171. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  172. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  173. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  174. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  175. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  176. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  177. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  178. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  179. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  180. package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
  181. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  182. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  183. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  184. package/dist/js/angular/security/templates/user.html +2 -2
  185. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  186. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  187. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  188. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  189. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  190. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  191. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +2 -2
  192. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  193. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  194. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  195. package/dist/legacyWorkbench.2bd696723af2573e8bb7.js +3 -0
  196. package/dist/{legacyWorkbench.57fc12c172f6350ac4c5.js.map → legacyWorkbench.2bd696723af2573e8bb7.js.map} +1 -1
  197. package/dist/{main.b9a83da68ffc43c91de0.js → main.be51ba05166a17f051a0.js} +3 -3
  198. package/dist/main.be51ba05166a17f051a0.js.map +1 -0
  199. package/dist/pages/aclmanagement.html +2 -2
  200. package/dist/pages/autocomplete.html +1 -1
  201. package/dist/pages/choose-repository-type.html +1 -1
  202. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  203. package/dist/pages/create-index.html +1 -1
  204. package/dist/pages/dependencies.html +1 -1
  205. package/dist/pages/domainRangeInfo.html +2 -2
  206. package/dist/pages/edit.html +1 -1
  207. package/dist/pages/explore.html +1 -1
  208. package/dist/pages/export.html +1 -1
  209. package/dist/pages/find.html +1 -1
  210. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  211. package/dist/pages/graphs-visualizations.html +7 -7
  212. package/dist/pages/guides.html +1 -1
  213. package/dist/pages/import.html +2 -2
  214. package/dist/pages/jdbc-create.html +1 -1
  215. package/dist/pages/login.html +1 -1
  216. package/dist/pages/monitor/backup-and-restore.html +1 -1
  217. package/dist/pages/monitor/queries.html +1 -1
  218. package/dist/pages/monitor/resources.html +1 -1
  219. package/dist/pages/namespaces.html +2 -2
  220. package/dist/pages/plugins.html +1 -1
  221. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  222. package/dist/pages/rdfrank.html +2 -2
  223. package/dist/pages/repositories.html +1 -1
  224. package/dist/pages/repository.html +1 -1
  225. package/dist/pages/similarity-indexes.html +1 -1
  226. package/dist/pages/sparql-editor.html +1 -1
  227. package/dist/pages/sparql-template-create.html +1 -1
  228. package/dist/pages/ux-test1.html +2 -2
  229. package/dist/pages/webapi.html +2 -2
  230. package/dist/plugins.js +1 -1
  231. package/dist/res/swagger5/index.html +11 -11
  232. package/dist/shared-components/cjs/onto-cookie-consent_2.cjs.entry.js +1 -1
  233. package/dist/shared-components/cjs/onto-dialog_2.cjs.entry.js +1 -1
  234. package/dist/shared-components/cjs/onto-dropdown.cjs.entry.js +1 -1
  235. package/dist/shared-components/cjs/onto-footer_6.cjs.entry.js +1 -1
  236. package/dist/shared-components/cjs/onto-language-selector_9.cjs.entry.js +1 -1
  237. package/dist/shared-components/cjs/translate-label.cjs.entry.js +1 -1
  238. package/dist/shared-components/cjs/translation.service-CC6jY4U-.js +1 -0
  239. package/dist/shared-components/collection/components/dialogs/onto-cookie-policy-dialog/onto-cookie-policy-dialog.js +1 -1
  240. package/dist/shared-components/collection/components/onto-dropdown/onto-dropdown.js +1 -1
  241. package/dist/shared-components/collection/components/onto-navbar/navbar-service.js +1 -1
  242. package/dist/shared-components/collection/services/logger-provider.js +1 -0
  243. package/dist/shared-components/collection/services/translation.service.js +1 -1
  244. package/dist/shared-components/esm/onto-cookie-consent_2.entry.js +1 -1
  245. package/dist/shared-components/esm/onto-dialog_2.entry.js +1 -1
  246. package/dist/shared-components/esm/onto-dropdown.entry.js +1 -1
  247. package/dist/shared-components/esm/onto-footer_6.entry.js +1 -1
  248. package/dist/shared-components/esm/onto-language-selector_9.entry.js +1 -1
  249. package/dist/shared-components/esm/translate-label.entry.js +1 -1
  250. package/dist/shared-components/esm/translation.service-nljGIprK.js +1 -0
  251. package/dist/shared-components/shared-components/p-09a97d11.entry.js +1 -0
  252. package/dist/shared-components/shared-components/p-21b82a97.entry.js +1 -0
  253. package/dist/shared-components/shared-components/p-8d20ae56.entry.js +1 -0
  254. package/dist/shared-components/shared-components/{p-91ad7f7f.entry.js → p-9131b137.entry.js} +1 -1
  255. package/dist/shared-components/shared-components/{p-1bc2ac8e.entry.js → p-e454ffc9.entry.js} +1 -1
  256. package/dist/shared-components/shared-components/{p-17bac1e3.entry.js → p-f9aa2123.entry.js} +1 -1
  257. package/dist/shared-components/shared-components/p-nljGIprK.js +1 -0
  258. package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
  259. package/dist/shared-components/types/components/dialogs/onto-cookie-policy-dialog/onto-cookie-policy-dialog.d.ts +1 -0
  260. package/dist/shared-components/types/components/onto-dropdown/onto-dropdown.d.ts +1 -0
  261. package/dist/shared-components/types/services/logger-provider.d.ts +11 -0
  262. package/dist/shared-components/types/services/translation.service.d.ts +1 -0
  263. package/dist/styleguide.9451f25d197464f4079c.js +2 -0
  264. package/dist/styleguide.9451f25d197464f4079c.js.map +1 -0
  265. package/dist/workbench/workbench/workbenchApp.js +1 -1
  266. package/package.json +1 -1
  267. package/dist/10142.f47cd2aec05492fce7ce.bundle.js +0 -2
  268. package/dist/10142.f47cd2aec05492fce7ce.bundle.js.map +0 -1
  269. package/dist/10376.e89fa63ff898d45f45fd.bundle.js.map +0 -1
  270. package/dist/12940.5b35c2cf5958d8769c0a.bundle.js +0 -2
  271. package/dist/12940.5b35c2cf5958d8769c0a.bundle.js.map +0 -1
  272. package/dist/14824.5d5041c05fca4c0373fa.bundle.js +0 -2
  273. package/dist/14824.5d5041c05fca4c0373fa.bundle.js.map +0 -1
  274. package/dist/18961.c6505525fb0491b48f8b.bundle.js +0 -2
  275. package/dist/18961.c6505525fb0491b48f8b.bundle.js.map +0 -1
  276. package/dist/19968.fdb823f9a12e11a633ec.bundle.js +0 -2
  277. package/dist/19968.fdb823f9a12e11a633ec.bundle.js.map +0 -1
  278. package/dist/20227.ab5dfaab392dbb16ba31.bundle.js +0 -2
  279. package/dist/20227.ab5dfaab392dbb16ba31.bundle.js.map +0 -1
  280. package/dist/28050.8ca1fa760c892bfc5466.bundle.js.map +0 -1
  281. package/dist/33524.35fe079bcb99a78babaf.bundle.js +0 -2
  282. package/dist/33524.35fe079bcb99a78babaf.bundle.js.map +0 -1
  283. package/dist/41621.68c5ebc2104a62e2b41d.bundle.js +0 -2
  284. package/dist/41621.68c5ebc2104a62e2b41d.bundle.js.map +0 -1
  285. package/dist/456.6118cb99d130f4c0410c.bundle.js.map +0 -1
  286. package/dist/45758.6ceb731cbe0576149f31.bundle.js +0 -2
  287. package/dist/45758.6ceb731cbe0576149f31.bundle.js.map +0 -1
  288. package/dist/52264.99261393a7f6e631da3b.bundle.js.map +0 -1
  289. package/dist/54419.f09240da9349be115ab3.bundle.js +0 -2
  290. package/dist/54419.f09240da9349be115ab3.bundle.js.map +0 -1
  291. package/dist/5470.7c17c7d3b58c8c0d0786.bundle.js +0 -2
  292. package/dist/5470.7c17c7d3b58c8c0d0786.bundle.js.map +0 -1
  293. package/dist/58334.6fdc74532b5f755916d8.bundle.js +0 -2
  294. package/dist/58334.6fdc74532b5f755916d8.bundle.js.map +0 -1
  295. package/dist/60560.37740d97b418899a5d21.bundle.js +0 -2
  296. package/dist/60560.37740d97b418899a5d21.bundle.js.map +0 -1
  297. package/dist/64118.9841bd3b9724868b8a63.bundle.js +0 -2
  298. package/dist/64118.9841bd3b9724868b8a63.bundle.js.map +0 -1
  299. package/dist/66014.336bc4291da2fbc96cd1.bundle.js +0 -2
  300. package/dist/66014.336bc4291da2fbc96cd1.bundle.js.map +0 -1
  301. package/dist/67888.7d4966e0a22ba655f1b8.bundle.js.map +0 -1
  302. package/dist/69724.1a97fa707ee1379409e9.bundle.js +0 -2
  303. package/dist/69724.1a97fa707ee1379409e9.bundle.js.map +0 -1
  304. package/dist/77143.f23d8a7fa51df083741c.bundle.js +0 -2
  305. package/dist/77143.f23d8a7fa51df083741c.bundle.js.map +0 -1
  306. package/dist/78070.b5e22ffae27cc3ca7a6f.bundle.js +0 -2
  307. package/dist/78070.b5e22ffae27cc3ca7a6f.bundle.js.map +0 -1
  308. package/dist/78681.39694d37c0f75ea04df6.bundle.js +0 -2
  309. package/dist/78681.39694d37c0f75ea04df6.bundle.js.map +0 -1
  310. package/dist/81837.f10e22eaf72a0642b50e.bundle.js +0 -2
  311. package/dist/81837.f10e22eaf72a0642b50e.bundle.js.map +0 -1
  312. package/dist/82206.8ec983edcf675cfd4531.bundle.js +0 -2
  313. package/dist/82206.8ec983edcf675cfd4531.bundle.js.map +0 -1
  314. package/dist/82293.a9bb9cd640c007cc1e91.bundle.js +0 -2
  315. package/dist/82293.a9bb9cd640c007cc1e91.bundle.js.map +0 -1
  316. package/dist/82896.9aed45baf67510717c6f.bundle.js +0 -2
  317. package/dist/82896.9aed45baf67510717c6f.bundle.js.map +0 -1
  318. package/dist/83136.56d692623cbc60048e03.bundle.js.map +0 -1
  319. package/dist/84727.b93b2f9857352d39b241.bundle.js.map +0 -1
  320. package/dist/85281.27b5a1eb8e7ac2cf8459.bundle.js +0 -2
  321. package/dist/85281.27b5a1eb8e7ac2cf8459.bundle.js.map +0 -1
  322. package/dist/86639.ab85108411ef0f006e10.bundle.js.map +0 -1
  323. package/dist/89647.b1a4e522d685f0b5d60f.bundle.js +0 -2
  324. package/dist/89647.b1a4e522d685f0b5d60f.bundle.js.map +0 -1
  325. package/dist/95953.4ea6a7c68a22779ba299.bundle.js +0 -2
  326. package/dist/95953.4ea6a7c68a22779ba299.bundle.js.map +0 -1
  327. package/dist/96248.1b85f989b0a7852c9b7b.bundle.js +0 -2
  328. package/dist/96248.1b85f989b0a7852c9b7b.bundle.js.map +0 -1
  329. package/dist/98494.a2cdb2a1c5d32d0094f3.bundle.js +0 -3
  330. package/dist/98494.a2cdb2a1c5d32d0094f3.bundle.js.map +0 -1
  331. package/dist/99379.be6c85ef305af6667dc1.bundle.js +0 -2
  332. package/dist/99379.be6c85ef305af6667dc1.bundle.js.map +0 -1
  333. package/dist/99893.2537d77ee1f4df0c846b.bundle.js +0 -2
  334. package/dist/99893.2537d77ee1f4df0c846b.bundle.js.map +0 -1
  335. package/dist/legacyWorkbench.57fc12c172f6350ac4c5.js +0 -3
  336. package/dist/main.b9a83da68ffc43c91de0.js.map +0 -1
  337. package/dist/shared-components/cjs/translation.service-DjdwDpXN.js +0 -1
  338. package/dist/shared-components/esm/translation.service-Hf6024E7.js +0 -1
  339. package/dist/shared-components/shared-components/p-2433b25f.entry.js +0 -1
  340. package/dist/shared-components/shared-components/p-25fa0ee5.entry.js +0 -1
  341. package/dist/shared-components/shared-components/p-6266be98.entry.js +0 -1
  342. package/dist/shared-components/shared-components/p-Hf6024E7.js +0 -1
  343. /package/dist/{98494.a2cdb2a1c5d32d0094f3.bundle.js.LICENSE.txt → 98494.969124a68766ebbdee3c.bundle.js.LICENSE.txt} +0 -0
  344. /package/dist/{legacyWorkbench.57fc12c172f6350ac4c5.js.LICENSE.txt → legacyWorkbench.2bd696723af2573e8bb7.js.LICENSE.txt} +0 -0
  345. /package/dist/{main.b9a83da68ffc43c91de0.js.LICENSE.txt → main.be51ba05166a17f051a0.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"45758.9ffd8e7d5f99e2c394a2.bundle.js","mappings":"kMAIA,MAEMA,EAAiB,MACnBC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBC,KAAMF,GACvBE,KAAKC,8BAAgC,KAIrCD,KAAKE,sBAAwB,EACjC,CACAC,iBAAAA,GACIH,KAAKC,8BAAgCG,EAAAA,EAAmBC,YAAYL,KAAKM,SAAUN,KAAKE,sBAAwBK,GAAoBP,KAAKO,gBAAkBA,EAC/J,CACAC,oBAAAA,GACQR,KAAKC,gCACLD,KAAKC,gCACLD,KAAKC,8BAAgC,KAE7C,CACAQ,MAAAA,GACI,OAAQC,EAAAA,EAAAA,GAAEC,EAAAA,EAAM,CAAEC,IAAK,4CAA8CZ,KAAKO,gBAC9E,GAEJX,EAAeiB,MAxBW,uB,kECF1B,SAASC,EAAaC,GAClB,MAAMC,EAAUC,SAASC,cAAc,YAEvC,OADAF,EAAQG,UAAYJ,EACbC,EAAQI,KACnB,CAMA,MAAMC,EAMF,iBAAWC,GACP,OAAOC,EAAAA,QAAQC,kBAXH,mBAYhB,EAMJ,MAAMC,EACF5B,WAAAA,GACIG,KAAK0B,uBAAyBC,EAAAA,gBAAgBC,IAAIC,EAAAA,wBAClD7B,KAAK8B,4BAA8B,CAAC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D,OAAoB,IAAhBS,EAAKK,OACED,EAEsB,iBAAtBA,EAEHJ,EAAKK,OAAS,EACP1D,KAAKuD,eAAeE,EAAmBJ,GAE3CI,OALX,CAQJ,CACAR,eAAAA,CAAgBH,EAAaR,GACzB,OAAIA,EACOA,EAAWqB,OAElB,CAACb,EAAac,IAAcnC,EAAkCoC,WAAWf,EAAac,GAAYd,GAE/FA,CACX,CACA,iBAAOe,CAAWf,EAAac,GAC3B,OAAOA,EAAYd,EAAYQ,MAAM,KAAKM,EAAUhD,SAASkD,KAAKF,EAAUxC,OAAS0B,CACzF,CACAiB,yBAAAA,GACIC,OAAOC,KAAKjE,KAAK8B,6BAA6BoC,QAASC,KACjCnE,KAAK8B,4BAA4BqC,IAAc,IACvDD,QAAS7B,GAAaA,EAASE,SAASvC,KAAKyC,UAAU0B,EAAW9B,EAASC,eAE7F,CACAL,uBAAAA,GACIjC,KAAKoE,2BAA6BpE,KAAK0B,uBAAuB2C,wBAAyBlB,IAC/EA,IACAnD,KAAKgD,cAAgBG,EACrBnD,KAAK+D,8BAGjB,CACAO,OAAAA,GACQtE,KAAKoE,4BACLpE,KAAKoE,4BAEb,EAEJ,MAAMhE,EAAqB,IAAIqB,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/translate-label.entry.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-nljGIprK.js"],"sourcesContent":["import { r as registerInstance, h, a as Host } from './index-I_gcXFWK.js';\nimport { T as TranslationService } from './translation.service-nljGIprK.js';\nimport '@ontotext/workbench-api';\n\nconst translateLabelCss = \":host{display:inline}\";\n\nconst TranslateLabel = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.unsubscribeTranslationChanged = null;\n /**\n * Represents an array of translation parameters.\n */\n this.translationParameters = [];\n }\n connectedCallback() {\n this.unsubscribeTranslationChanged = TranslationService.onTranslate(this.labelKey, this.translationParameters, (translatedLabel) => this.translatedLabel = translatedLabel);\n }\n disconnectedCallback() {\n if (this.unsubscribeTranslationChanged) {\n this.unsubscribeTranslationChanged();\n this.unsubscribeTranslationChanged = null;\n }\n }\n render() {\n return (h(Host, { key: 'ae48f9b9f9d91494190d3666aa96f77c98da20f1' }, this.translatedLabel));\n }\n};\nTranslateLabel.style = translateLabelCss;\n\nexport { TranslateLabel as translate_label };\n","import { Loggers, ServiceProvider, LanguageContextService } from '@ontotext/workbench-api';\n\nfunction sanitizeHTML(html) {\n const element = document.createElement('textarea');\n element.innerHTML = html;\n return element.value;\n}\n\nconst MODULE_NAME = 'SharedComponents';\n/**\n * Logger for the Shared Components module.\n */\nclass LoggerProvider {\n /**\n * Gets the logger instance for the Shared Components module.\n *\n * @returns LoggerService instance for the Shared Components module\n */\n static get logger() {\n return Loggers.getLoggerInstance(MODULE_NAME);\n }\n}\n\n/**\n * Service responsible for translation operations in the component.\n */\nclass TranslationServiceClassDefinition {\n constructor() {\n this.languageContextService = ServiceProvider.get(LanguageContextService);\n this.translationChangedObservers = {};\n this.logger = LoggerProvider.logger;\n // log with background color\n this.defaultBundle = this.languageContextService.getDefaultBundle();\n this.subscribeToBundleChange();\n }\n /**\n * Translates the <code>messageLabelKey</code> with <code>translationParameter</code> and call <code>translationCallback</code> with translation of current language.\n * The <code>translationCallback</code> is called upon subscription and whenever the selected language is changed.\n *\n * @param messageLabelKey - The label key for the translation.\n * @param translationParameter - Parameters, if needed, for translation.\n * @param translationCallback - A function to be called when translating the `messageLabelKey`.\n * @returns A function that, when called, unsubscribes the provided callback from further translation updates.\n */\n onTranslate(messageLabelKey, translationParameter = [], translationCallback = () => { }) {\n this.translationChangedObservers[messageLabelKey] = this.translationChangedObservers[messageLabelKey] || [];\n const observer = { parameters: translationParameter, callback: translationCallback };\n this.translationChangedObservers[messageLabelKey].push(observer);\n translationCallback(this.translate(messageLabelKey, translationParameter));\n return () => {\n const index = this.translationChangedObservers[messageLabelKey].indexOf(observer);\n if (index !== -1) {\n this.translationChangedObservers[messageLabelKey].splice(index, 1);\n }\n };\n }\n /**\n * Translates the provided key using the currently selected language by applying the parameters if\n * provided.\n * @param key The key for the label which needs to be translated.\n * @param parameters Optional parameters which to be applied during the translation.\n */\n translate(key, parameters) {\n return this.translateInLocale(key, parameters);\n }\n /**\n * Translates a given key into the specified locale. If parameters are provided,\n * they will be applied to the translation.\n *\n * @param key - The translation key, which can be dot-separated for nested translations.\n * @param parameters - Optional parameters to be substituted into the translation string.\n * @returns The translated string with parameters applied if available, or the key itself if not found.\n */\n translateInLocale(key, parameters) {\n // Attempt to retrieve the translation from the specified locale's bundle.\n let translation = this.translateFromBundle(this.currentBundle, key);\n // If not found, fall back to the default language bundle.\n if (!translation) {\n translation = this.translateFromBundle(this.defaultBundle, key);\n }\n // If translation was found, apply any parameters provided and return the result.\n if (translation) {\n translation = this.applyParameters(translation, parameters);\n return sanitizeHTML(translation);\n }\n this.logger.warn(`Missing translation for key: [${key}]`);\n return key;\n }\n /**\n * Retrieves a translation from a specified translation bundle using the given key.\n * If the key represents a nested JSON path, it attempts to resolve the key as such.\n *\n * @param bundle - The translation bundle for the specified locale.\n * @param key - The key to translate, which may be a simple key or dot-separated for nested keys.\n * @returns The translation string if found, or `undefined` if not available.\n */\n translateFromBundle(bundle, key) {\n if (!bundle) {\n return undefined;\n }\n // Try to retrieve the translation directly if it is defined as a whole string,\n // for instance as \"some_function.btn.label\".\n let translation = bundle[key];\n // If not found, attempt to retrieve the translation if it is defined as a JSON object.\n if (typeof translation !== 'string') {\n translation = this.translateAsJsonObject(bundle, key);\n }\n return translation;\n }\n /**\n * Resolves a nested translation key by treating it as a path in a JSON object.\n * For example, if the key is \"some.key.path\", this method will navigate through\n * the JSON object structure to retrieve the value at that path.\n *\n * @param bundle - The translation bundle containing nested keys.\n * @param key - The dot-separated key representing the path to the translation.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n translateAsJsonObject(bundle, key) {\n let path = key.split('.');\n return this.getTranslation(bundle, path);\n }\n /**\n * Recursively navigates through a JSON object based on a path array to retrieve\n * a translation string. Each element in the path array represents a nested key.\n *\n * @param jsonObject - The current JSON object or nested object being searched.\n * @param path - An array representing the path to the translation, where each element is a key.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n getTranslation(jsonObject, path) {\n // Stop the recursion if path or reach the inner element\n if (!path || !jsonObject) {\n return undefined;\n }\n const jsonOrTranslation = jsonObject[path.splice(0, 1)[0]];\n if (path.length === 0) {\n return jsonOrTranslation;\n }\n if (typeof jsonOrTranslation !== 'string') {\n // continue if the inner element is not reached.\n if (path.length > 0) {\n return this.getTranslation(jsonOrTranslation, path);\n }\n return jsonOrTranslation;\n }\n return undefined;\n }\n applyParameters(translation, parameters) {\n if (parameters) {\n return parameters.reduce(\n // replace all occurrence of parameter key with parameter value.\n (translation, parameter) => TranslationServiceClassDefinition.replaceAll(translation, parameter), translation);\n }\n return translation;\n }\n static replaceAll(translation, parameter) {\n return parameter ? translation.split(`{{${parameter.key}}}`).join(parameter.value) : translation;\n }\n notifyTranslationsChanged() {\n Object.keys(this.translationChangedObservers).forEach((eventName) => {\n const observers = this.translationChangedObservers[eventName] || [];\n observers.forEach((observer) => observer.callback(this.translate(eventName, observer.parameters)));\n });\n }\n subscribeToBundleChange() {\n this.languageChangeSubscription = this.languageContextService.onLanguageBundleChanged((bundle) => {\n if (bundle) {\n this.currentBundle = bundle;\n this.notifyTranslationsChanged();\n }\n });\n }\n destroy() {\n if (this.languageChangeSubscription) {\n this.languageChangeSubscription();\n }\n }\n}\nconst TranslationService = new TranslationServiceClassDefinition();\n\nexport { LoggerProvider as L, TranslationService as T, sanitizeHTML as s };\n"],"names":["TranslateLabel","constructor","hostRef","registerInstance","this","unsubscribeTranslationChanged","translationParameters","connectedCallback","TranslationService","onTranslate","labelKey","translatedLabel","disconnectedCallback","render","h","Host","key","style","sanitizeHTML","html","element","document","createElement","innerHTML","value","LoggerProvider","logger","Loggers","getLoggerInstance","TranslationServiceClassDefinition","languageContextService","ServiceProvider","get","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","translate","index","indexOf","splice","translateInLocale","translation","translateFromBundle","currentBundle","applyParameters","warn","bundle","translateAsJsonObject","path","split","getTranslation","jsonObject","jsonOrTranslation","length","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","forEach","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_id__=52264;export const __webpack_ids__=[23686,52264];export const __webpack_modules__={23686:(t,e,i)=>{i.r(e),i.d(e,{EndpointDefinitionFile:()=>l,EndpointDefinitionFileList:()=>r,ImportStatus:()=>n,ImportStatusLabelKeys:()=>s,ImportStatusToViewMapping:()=>o});const n={PENDING:"PENDING",SUCCESS:"SUCCESS",FAIL:"FAIL",SKIP:"SKIP"},s={[n.PENDING]:"graphql.endpoints_management.import_definition_modal.status.pending",[n.SUCCESS]:"graphql.endpoints_management.import_definition_modal.status.completed",[n.FAIL]:"graphql.endpoints_management.import_definition_modal.status.failed",[n.SKIP]:"graphql.endpoints_management.import_definition_modal.status.not_allowed"},o={[n.PENDING]:"tag-warning",[n.SUCCESS]:"tag-success",[n.FAIL]:"tag-danger",[n.SKIP]:"tag-info"};class r{_list;_size;constructor(t=[]){this._list=t,this._size=t.length}processWith(t){this.list.forEach(t)}findDefinitionFileByName(t){return this.list.find(e=>e.file.name===t)}getFileNames(){return this.list.map(t=>t.file.name)}appendFiles(t){this.list.push(...t),this._size=this.list.length}removeFile(t){this.list=this.list.filter(e=>e.file!==t.file)}get size(){return this._size}set size(t){this._size=t}set list(t){this._list=t,this._size=t.length}get list(){return this._list}}class l{_list;_file;_filename;_status;_viewStatus;_statusMessage;_endpointId;_report;constructor(t,e,i,n){this._file=t,this._status=e,this._viewStatus=o[e],this._statusMessage=i,this._list=n}set file(t){this._file=t}get file(){return this._file}set filename(t){this._filename=t}get filename(){return this._filename}set status(t){this._status=t,this._viewStatus=o[t]}get status(){return this._status}set viewStatus(t){this._viewStatus=t}get viewStatus(){return this._viewStatus}set statusMessage(t){this._statusMessage=t}get statusMessage(){return this._statusMessage}set endpointId(t){this._endpointId=t}get endpointId(){return this._endpointId}set report(t){this._report=t}get report(){return this._report}get list(){return this._list}set list(t){this._list=t}}},24025:(t,e,i)=>{i.r(e),i.d(e,{fileToImportDefinitionMapper:()=>r,fileToImportDefinitionsMapper:()=>o,importEndpointDefinitionListMapper:()=>l});var n=i(23686),s=i(34894);const o=(t,e)=>{const i=t.map(t=>r(t,e));return new n.EndpointDefinitionFileList(i)},r=(t,e)=>new n.EndpointDefinitionFile(t,e,n.ImportStatusLabelKeys[e]),l=(t,e,i)=>{if(!t||!t.length)return new n.EndpointDefinitionFileList;const o=t=>{const r=t.id,l=t.filename,a=t.status.toUpperCase();let p=i.findDefinitionFileByName(l)||new n.EndpointDefinitionFile;if(p.endpointId=r,p.filename=l,p.status=a,p.statusMessage=n.ImportStatusLabelKeys[a],p.report=(0,s.importEndpointDefinitionReportMapper)(t,r,e),t.subFiles){const e=t.subFiles.map(o);p.list=new n.EndpointDefinitionFileList(e)}return p};return t.forEach(o),new n.EndpointDefinitionFileList([...i.list])}},52264:(t,e,i)=>{i.r(e),i(14874);var n=i(23686),s=i(24025),o=i(90275),r=i(74081);function l(t,e,i,l,a,p,d,u){const f=[".zip",".yaml",".yml"];t.allowedFileTypesString=f.join(","),t.ImportStatus=n.ImportStatus,t.repositoryId=p.repositoryId,t.definitionFiles=new n.EndpointDefinitionFileList,t.progress=void 0,t.uploadFinished=!1,t.onFilesChange=(e,i,o,r,l)=>{let a=o||[];const p=a.filter(t=>{const e="."+t.name.split(".").pop().toLowerCase();return!f.includes(e)});if(p.length&&console.error(`The following files have invalid extensions: ${p.map(t=>t.name).join(", ")}`),a=a.filter(t=>{const e="."+t.name.split(".").pop().toLowerCase();return f.includes(e)}),!a||!a.length)return;t.progress=void 0;const d=new Set(t.definitionFiles.getFileNames()),u=a.filter(t=>!d.has(t.name));t.definitionFiles.appendFiles((0,s.fileToImportDefinitionsMapper)(u,n.ImportStatus.PENDING).list)},t.onImport=()=>{t.uploadFinished=!1;const e=m();d.importEndpointDefinition(t.repositoryId,e).progress(e=>{t.uploadFinished||(t.progress=Math.min(100,parseInt(100*e.loaded/e.total)))}).success(e=>{t.progress=void 0,t.uploadFinished=!0,t.definitionFiles=(0,s.importEndpointDefinitionListMapper)(e,t.repositoryId,t.definitionFiles)}).error(e=>{t.progress=void 0,t.uploadFinished=!0,i.error(getError(e))})},t.onRemoveFile=e=>{t.definitionFiles.removeFile(e),0===t.definitionFiles.size&&(t.progress=void 0)},t.onExploreEndpoint=t=>{const e=(0,o.resolvePlaygroundUrlWithEndpoint)(t);u.setSelectedEndpoint(new r.GraphqlEndpointInfo({endpointId:t})),window.open(e,"_blank","noopener,noreferrer")},t.onOpenReport=(t,e)=>(t.preventDefault(),l.open({templateUrl:"js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html",controller:"EndpointGenerationResultFailureModalController",windowClass:"endpoint-generation-failure-result-modal",size:"lg",backdrop:"static",keyboard:!1,resolve:{data:()=>({endpointReport:e})}}).result),t.close=()=>{a.dismiss("cancel")};const m=()=>{let e=new FormData;return t.definitionFiles.processWith(t=>{e.append("importFiles",t.file,t.file.name)}),e}}angular.module("graphdb.framework.graphql.controllers.import-endpoint-definition-modal",["ngFileUpload","graphdb.framework.core.services.graphql-service"]).controller("ImportEndpointDefinitionModalController",l),l.$inject=["$scope","$q","toastr","$uibModal","$uibModalInstance","data","GraphqlService","GraphqlContextService"]}};
2
- //# sourceMappingURL=52264.99261393a7f6e631da3b.bundle.js.map
1
+ export const __webpack_id__=52264;export const __webpack_ids__=[23686,52264];export const __webpack_modules__={23686:(t,e,i)=>{i.r(e),i.d(e,{EndpointDefinitionFile:()=>l,EndpointDefinitionFileList:()=>r,ImportStatus:()=>n,ImportStatusLabelKeys:()=>s,ImportStatusToViewMapping:()=>o});const n={PENDING:"PENDING",SUCCESS:"SUCCESS",FAIL:"FAIL",SKIP:"SKIP"},s={[n.PENDING]:"graphql.endpoints_management.import_definition_modal.status.pending",[n.SUCCESS]:"graphql.endpoints_management.import_definition_modal.status.completed",[n.FAIL]:"graphql.endpoints_management.import_definition_modal.status.failed",[n.SKIP]:"graphql.endpoints_management.import_definition_modal.status.not_allowed"},o={[n.PENDING]:"tag-warning",[n.SUCCESS]:"tag-success",[n.FAIL]:"tag-danger",[n.SKIP]:"tag-info"};class r{_list;_size;constructor(t=[]){this._list=t,this._size=t.length}processWith(t){this.list.forEach(t)}findDefinitionFileByName(t){return this.list.find(e=>e.file.name===t)}getFileNames(){return this.list.map(t=>t.file.name)}appendFiles(t){this.list.push(...t),this._size=this.list.length}removeFile(t){this.list=this.list.filter(e=>e.file!==t.file)}get size(){return this._size}set size(t){this._size=t}set list(t){this._list=t,this._size=t.length}get list(){return this._list}}class l{_list;_file;_filename;_status;_viewStatus;_statusMessage;_endpointId;_report;constructor(t,e,i,n){this._file=t,this._status=e,this._viewStatus=o[e],this._statusMessage=i,this._list=n}set file(t){this._file=t}get file(){return this._file}set filename(t){this._filename=t}get filename(){return this._filename}set status(t){this._status=t,this._viewStatus=o[t]}get status(){return this._status}set viewStatus(t){this._viewStatus=t}get viewStatus(){return this._viewStatus}set statusMessage(t){this._statusMessage=t}get statusMessage(){return this._statusMessage}set endpointId(t){this._endpointId=t}get endpointId(){return this._endpointId}set report(t){this._report=t}get report(){return this._report}get list(){return this._list}set list(t){this._list=t}}},24025:(t,e,i)=>{i.r(e),i.d(e,{fileToImportDefinitionMapper:()=>r,fileToImportDefinitionsMapper:()=>o,importEndpointDefinitionListMapper:()=>l});var n=i(23686),s=i(34894);const o=(t,e)=>{const i=t.map(t=>r(t,e));return new n.EndpointDefinitionFileList(i)},r=(t,e)=>new n.EndpointDefinitionFile(t,e,n.ImportStatusLabelKeys[e]),l=(t,e,i)=>{if(!t||!t.length)return new n.EndpointDefinitionFileList;const o=t=>{const r=t.id,l=t.filename,a=t.status.toUpperCase();let p=i.findDefinitionFileByName(l)||new n.EndpointDefinitionFile;if(p.endpointId=r,p.filename=l,p.status=a,p.statusMessage=n.ImportStatusLabelKeys[a],p.report=(0,s.importEndpointDefinitionReportMapper)(t,r,e),t.subFiles){const e=t.subFiles.map(o);p.list=new n.EndpointDefinitionFileList(e)}return p};return t.forEach(o),new n.EndpointDefinitionFileList([...i.list])}},52264:(t,e,i)=>{i.r(e),i(14874);var n=i(23686),s=i(24025),o=i(90275),r=i(74081);const l=i(304).LoggerProvider.logger;function a(t,e,i,a,p,d,u,f){const m=[".zip",".yaml",".yml"];t.allowedFileTypesString=m.join(","),t.ImportStatus=n.ImportStatus,t.repositoryId=d.repositoryId,t.definitionFiles=new n.EndpointDefinitionFileList,t.progress=void 0,t.uploadFinished=!1,t.onFilesChange=(e,i,o,r,a)=>{let p=o||[];const d=p.filter(t=>{const e="."+t.name.split(".").pop().toLowerCase();return!m.includes(e)});if(d.length&&l.error(`The following files have invalid extensions: ${d.map(t=>t.name).join(", ")}`),p=p.filter(t=>{const e="."+t.name.split(".").pop().toLowerCase();return m.includes(e)}),!p||!p.length)return;t.progress=void 0;const u=new Set(t.definitionFiles.getFileNames()),f=p.filter(t=>!u.has(t.name));t.definitionFiles.appendFiles((0,s.fileToImportDefinitionsMapper)(f,n.ImportStatus.PENDING).list)},t.onImport=()=>{t.uploadFinished=!1;const e=h();u.importEndpointDefinition(t.repositoryId,e).progress(e=>{t.uploadFinished||(t.progress=Math.min(100,parseInt(100*e.loaded/e.total)))}).success(e=>{t.progress=void 0,t.uploadFinished=!0,t.definitionFiles=(0,s.importEndpointDefinitionListMapper)(e,t.repositoryId,t.definitionFiles)}).error(e=>{t.progress=void 0,t.uploadFinished=!0,i.error(getError(e))})},t.onRemoveFile=e=>{t.definitionFiles.removeFile(e),0===t.definitionFiles.size&&(t.progress=void 0)},t.onExploreEndpoint=t=>{const e=(0,o.resolvePlaygroundUrlWithEndpoint)(t);f.setSelectedEndpoint(new r.GraphqlEndpointInfo({endpointId:t})),window.open(e,"_blank","noopener,noreferrer")},t.onOpenReport=(t,e)=>(t.preventDefault(),a.open({templateUrl:"js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html",controller:"EndpointGenerationResultFailureModalController",windowClass:"endpoint-generation-failure-result-modal",size:"lg",backdrop:"static",keyboard:!1,resolve:{data:()=>({endpointReport:e})}}).result),t.close=()=>{p.dismiss("cancel")};const h=()=>{const e=new FormData;return t.definitionFiles.processWith(t=>{e.append("importFiles",t.file,t.file.name)}),e}}angular.module("graphdb.framework.graphql.controllers.import-endpoint-definition-modal",["ngFileUpload","graphdb.framework.core.services.graphql-service"]).controller("ImportEndpointDefinitionModalController",a),a.$inject=["$scope","$q","toastr","$uibModal","$uibModalInstance","data","GraphqlService","GraphqlContextService"]}};
2
+ //# sourceMappingURL=52264.4cf2f1a18d16484f0af1.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"52264.4cf2f1a18d16484f0af1.bundle.js","mappings":"4RAIO,MAAMA,EAAe,CACxBC,QAAS,UACTC,QAAS,UACTC,KAAM,OACNC,KAAM,QAOGC,EAAwB,CACjC,CAACL,EAAaC,SAAU,sEACxB,CAACD,EAAaE,SAAU,wEACxB,CAACF,EAAaG,MAAO,qEACrB,CAACH,EAAaI,MAAO,2EAOZE,EAA4B,CACrC,CAACN,EAAaC,SAAU,cACxB,CAACD,EAAaE,SAAU,cACxB,CAACF,EAAaG,MAAO,aACrB,CAACH,EAAaI,MAAO,YAQlB,MAAMG,EAKTC,MAKAC,MAEAC,WAAAA,CAAYC,EAAkB,IAC1BC,KAAKJ,MAAQG,EACbC,KAAKH,MAAQE,EAAgBE,MACjC,CAMAC,WAAAA,CAAYC,GACRH,KAAKI,KAAKC,QAAQF,EACtB,CAOAG,wBAAAA,CAAyBC,GACrB,OAAOP,KAAKI,KAAKI,KAAKC,GAAkBA,EAAeC,KAAKH,OAASA,EACzE,CAMAI,YAAAA,GACI,OAAOX,KAAKI,KAAKQ,IAAIH,GAAkBA,EAAeC,K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,EAAAA,oCAAmCI,EAAUS,EAAOX,aAAcW,EAAOnD,mBAErG6E,MAAOgB,IACJ1C,EAAOU,cAAWC,EAClBX,EAAOY,gBAAiB,EACxBV,EAAOwB,MAAMiB,SAASD,OAQlC1C,EAAO4C,aAAgBrF,IACnByC,EAAOnD,gBAAgBgB,WAAWN,GACE,IAAhCyC,EAAOnD,gBAAgBmB,OACvBgC,EAAOU,cAAWC,IAS1BX,EAAO6C,kBAAqBhE,IACxB,MAAMiE,GAAMC,EAAAA,EAAAA,kCAAiClE,GAC7CyB,EAAsB0C,oBAAoB,IAAIC,EAAAA,oBAAoB,CAC9DpE,gBAEJqE,OAAOC,KAAKL,EAAK,SAAU,wBAS/B9C,EAAOoD,aAAe,CAACC,EAAOC,KAC1BD,EAAME,iBACCpD,EAAUgD,KAAK,CAClBK,YAAa,mFACbC,WAAY,iDACZC,YAAa,2CACb1F,KAAM,KACN2F,SAAU,SACVC,UAAU,EACVC,QAAS,CACLzE,KAAMA,KACK,CACH0E,eAAgBR,OAI7BS,QAMP/D,EAAOgE,MAAQ,KACX5D,EAAkB6D,QAAQ,WAW9B,MAAMhC,EAA2BA,KAC7B,MAAMD,EAAU,IAAIkC,SAIpB,OAHAlE,EAAOnD,gBAAgBG,YAAamH,IAChCnC,EAAQoC,OAAO,cAAeD,EAAW3G,KAAM2G,EAAW3G,KAAKH,QAE5D2E,EAWf,CApMAqC,QACKC,OAAO,yEANI,CACZ,eACA,oDAKCb,WAAW,0CAA2C1D,GAE3DA,EAAwCwE,QAAU,CAAC,SAAU,KAAM,SAAU,YAAa,oBAAqB,OAAQ,iBAAkB,wB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/models/graphql/endpoint-definition-file.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/graphql/services/file-to-import-definition.mapper.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/graphql/controllers/import-endpoint-definition-modal.controller.js"],"sourcesContent":["/**\n * The status of an import graphql endpoint definition operation.\n * @type {{PENDING: string, SUCCESS: string, FAIL: string, SKIP: string}}\n */\nexport const ImportStatus = {\n PENDING: 'PENDING',\n SUCCESS: 'SUCCESS',\n FAIL: 'FAIL',\n SKIP: 'SKIP'\n}\n\n/**\n * The keys for the import status labels.\n * @type {{[p: string]: string}}\n */\nexport const ImportStatusLabelKeys = {\n [ImportStatus.PENDING]: 'graphql.endpoints_management.import_definition_modal.status.pending',\n [ImportStatus.SUCCESS]: 'graphql.endpoints_management.import_definition_modal.status.completed',\n [ImportStatus.FAIL]: 'graphql.endpoints_management.import_definition_modal.status.failed',\n [ImportStatus.SKIP]: 'graphql.endpoints_management.import_definition_modal.status.not_allowed'\n};\n\n/**\n * The mapping of import status to view status. This is used to control the css class of the status tag.\n * @type {{[p: string]: string}}\n */\nexport const ImportStatusToViewMapping = {\n [ImportStatus.PENDING]: 'tag-warning',\n [ImportStatus.SUCCESS]: 'tag-success',\n [ImportStatus.FAIL]: 'tag-danger',\n [ImportStatus.SKIP]: 'tag-info'\n};\n\n/**\n * A class that is a wrapper around a list of definition files. This class provides utility methods to work with the\n * definition files list and exposes some precalculated properties for easier access and optimization of the template\n * bindings.\n */\nexport class EndpointDefinitionFileList {\n /**\n * @type {Array<EndpointDefinitionFile>}\n * @private\n */\n _list;\n /**\n * @type {number}\n * @private\n */\n _size;\n\n constructor(definitionFiles = []) {\n this._list = definitionFiles;\n this._size = definitionFiles.length;\n }\n\n /**\n * Processes the list of definition files with the given predicate.\n * @param {function(EndpointDefinitionFile): void} predicate The predicate to process the files with.\n */\n processWith(predicate) {\n this.list.forEach(predicate);\n }\n\n /**\n * Finds a definition file by file name.\n * @param {string} name The name of the file to find.\n * @returns {EndpointDefinitionFile}\n */\n findDefinitionFileByName(name) {\n return this.list.find(definitionFile => definitionFile.file.name === name);\n }\n\n /**\n * Extracts the file names from the list of definition files.\n * @returns {string[]}\n */\n getFileNames() {\n return this.list.map(definitionFile => definitionFile.file.name);\n }\n\n /**\n * Appends the given files to the list of definition files.\n * @param {EndpointDefinitionFile[]} definitionFiles The files to append.\n */\n appendFiles(definitionFiles) {\n this.list.push(...definitionFiles);\n this._size = this.list.length;\n }\n\n /**\n * Removes the given file from the list of definition files.\n * @param {EndpointDefinitionFile} definitionFileToRemove The file to remove.\n */\n removeFile(definitionFileToRemove) {\n this.list = this.list.filter(definitionFile => definitionFile.file !== definitionFileToRemove.file);\n }\n\n get size() {\n return this._size;\n }\n\n set size(size) {\n this._size = size;\n }\n\n set list(definitionFiles) {\n this._list = definitionFiles;\n this._size = definitionFiles.length;\n }\n\n get list() {\n return this._list;\n }\n}\n\n/**\n * A class that represents a single endpoint definition file. This class contains all the information about the file\n * and the status of the import operation. It is needed to keep all related with the definition file import in one place\n * and expose the necessary properties for the template bindings.\n */\nexport class EndpointDefinitionFile {\n /**\n * @type {EndpointDefinitionFileList}\n * @private\n */\n _list;\n /**\n * @type {File}\n * @private\n */\n _file;\n /**\n * The file name of the definition file. This is the name of the file that was uploaded and can also be obtained\n * from the file object. The reason for having it here is that when an archive is uploaded, the file object will\n * contain the name of the archive file, but the definition files are extracted from the archive and each of them\n * has a different name. This property is used to keep track of the original file name.\n * @type {string}\n * @private\n */\n _filename;\n /**\n * @type {'pending'|'success'|'fail'|'not_allowed'}\n * @private\n */\n _status;\n /**\n * This is a string which is a css class name that will be used to display the status as a tag.\n * @type {string}\n * @private\n */\n _viewStatus;\n /**\n * @type {string}\n * @private\n */\n _statusMessage;\n /**\n * @type {string|null}\n * @private\n */\n _endpointId;\n /**\n * @type {EndpointGenerationReport|undefined}\n * @private\n */\n _report;\n\n constructor(file, status, statusMessage, list) {\n this._file = file;\n this._status = status;\n this._viewStatus = ImportStatusToViewMapping[status];\n this._statusMessage = statusMessage;\n this._list = list;\n }\n\n set file(file) {\n this._file = file;\n }\n\n get file() {\n return this._file;\n }\n\n set filename(filename) {\n this._filename = filename;\n }\n\n get filename() {\n return this._filename;\n }\n\n set status(status) {\n this._status = status;\n this._viewStatus = ImportStatusToViewMapping[status];\n }\n\n get status() {\n return this._status;\n }\n\n set viewStatus(viewStatus) {\n this._viewStatus = viewStatus;\n }\n\n get viewStatus() {\n return this._viewStatus;\n }\n\n set statusMessage(statusMessage) {\n this._statusMessage = statusMessage;\n }\n\n get statusMessage() {\n return this._statusMessage;\n }\n\n set endpointId(endpointId) {\n this._endpointId = endpointId;\n }\n\n get endpointId() {\n return this._endpointId;\n }\n\n set report(report) {\n this._report = report;\n }\n\n get report() {\n return this._report;\n }\n\n get list() {\n return this._list;\n }\n\n set list(list) {\n this._list = list;\n }\n}\n","import {\n EndpointDefinitionFile, EndpointDefinitionFileList,\n ImportStatusLabelKeys\n} from \"../../models/graphql/endpoint-definition-file\";\nimport {importEndpointDefinitionReportMapper} from \"./endpoint-generation-report.mapper\";\n\n/**\n * Maps a list of files to a list of import definitions.\n * @param {File[]} files - The list of files to map.\n * @param {string} importStatus - The status of the import.\n * @returns {EndpointDefinitionFileList}\n */\nexport const fileToImportDefinitionsMapper = (files, importStatus) => {\n const definitionFiles = files.map(file => fileToImportDefinitionMapper(file, importStatus));\n return new EndpointDefinitionFileList(definitionFiles);\n};\n\n/**\n * Maps a file to an import definition.\n * @param {File} file - The file to map.\n * @param {string} importStatus - The status of the import.\n * @returns {EndpointDefinitionFile}\n */\nexport const fileToImportDefinitionMapper = (file, importStatus) => {\n return new EndpointDefinitionFile(file, importStatus, ImportStatusLabelKeys[importStatus]);\n};\n\n/**\n * Maps the server response to EndpointDefinitionFileList.\n * @param {*} data The server response data.\n * @param {string} repositoryId The repository ID.\n * @param {EndpointDefinitionFileList} definitionFiles The list of definition files.\n * @returns {EndpointDefinitionFileList}\n */\nexport const importEndpointDefinitionListMapper = (data, repositoryId, definitionFiles) => {\n if (!data || !data.length) {\n return new EndpointDefinitionFileList();\n }\n\n const processEntry = (response) => {\n const endpointId = response.id;\n const filename = response.filename;\n const status = response.status.toUpperCase();\n let definitionFile = definitionFiles.findDefinitionFileByName(filename) || new EndpointDefinitionFile();\n definitionFile.endpointId = endpointId;\n definitionFile.filename = filename;\n definitionFile.status = status;\n definitionFile.statusMessage = ImportStatusLabelKeys[status];\n definitionFile.report = importEndpointDefinitionReportMapper(response, endpointId, repositoryId);\n if (response.subFiles) {\n const subFileDefinitions = response.subFiles.map(processEntry);\n definitionFile.list = new EndpointDefinitionFileList(subFileDefinitions);\n }\n return definitionFile;\n }\n\n data.forEach(processEntry);\n\n return new EndpointDefinitionFileList([...definitionFiles.list]);\n}\n","import '../../core/services/graphql.service';\nimport {\n EndpointDefinitionFileList,\n ImportStatus,\n} from \"../../models/graphql/endpoint-definition-file\";\nimport {\n fileToImportDefinitionsMapper, importEndpointDefinitionListMapper,\n} from \"../services/file-to-import-definition.mapper\";\nimport {resolvePlaygroundUrlWithEndpoint} from \"../services/endpoint-utils\";\nimport {GraphqlEndpointInfo} from \"../../models/graphql/graphql-endpoints-info\";\nimport {LoggerProvider} from \"../../core/services/logger-provider\";\n\nconst logger = LoggerProvider.logger;\n\nconst modules = [\n 'ngFileUpload',\n 'graphdb.framework.core.services.graphql-service',\n];\n\nangular\n .module('graphdb.framework.graphql.controllers.import-endpoint-definition-modal', modules)\n .controller('ImportEndpointDefinitionModalController', ImportEndpointDefinitionModalController);\n\nImportEndpointDefinitionModalController.$inject = ['$scope', '$q', 'toastr', '$uibModal', '$uibModalInstance', 'data', 'GraphqlService', 'GraphqlContextService'];\n\nfunction ImportEndpointDefinitionModalController($scope, $q, toastr, $uibModal, $uibModalInstance, data, GraphqlService, GraphqlContextService) {\n // =========================\n // Private variables\n // =========================\n\n const allowedFileTypes = ['.zip', '.yaml', '.yml'];\n\n // =========================\n // Public variables\n // =========================\n\n $scope.allowedFileTypesString = allowedFileTypes.join(',');\n\n /**\n * The import status enum.\n * @type {{PENDING: string, SUCCESS: string, FAIL: string, SKIP: string}}\n */\n $scope.ImportStatus = ImportStatus;\n\n /**\n * Current active repository ID.\n */\n $scope.repositoryId = data.repositoryId;\n\n /**\n * The list of files selected for import.\n * @type {EndpointDefinitionFileList}\n */\n $scope.definitionFiles = new EndpointDefinitionFileList();\n\n /**\n * The progress of the upload.\n * @type {number|undefined}\n */\n $scope.progress = undefined;\n\n /**\n * Flag indicating if the upload has finished. Used to show/hide the progress bar which in some cases might remain\n * because the progress event might come out of sync and a come after the success event. This clearly happens during\n * UI tests, but it might happen in real life as well.\n * @type {boolean}\n */\n $scope.uploadFinished = false;\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Event handler triggered when files are selected in the file input.\n * @param {Array} $files The selected files.\n * @param {File} $file The selected file.\n * @param {Array} $newFiles The new files selected.\n * @param {Array} $duplicateFiles The duplicate files selected.\n * @param {Array} $invalidFiles The invalid files selected.\n */\n $scope.onFilesChange = ($files, $file, $newFiles, $duplicateFiles, $invalidFiles) => {\n let selectedFiles = $newFiles || [];\n\n // find out files with invalid extensions in the list\n const invalidFiles = selectedFiles.filter((file) => {\n const extension = '.' + file.name.split('.').pop().toLowerCase();\n return !allowedFileTypes.includes(extension);\n });\n if (invalidFiles.length) {\n logger.error(`The following files have invalid extensions: ${invalidFiles.map((file) => file.name).join(', ')}`);\n }\n // filter out invalid files\n selectedFiles = selectedFiles.filter((file) => {\n const extension = '.' + file.name.split('.').pop().toLowerCase();\n return allowedFileTypes.includes(extension);\n });\n // if no valid files are left, return\n if (!selectedFiles || !selectedFiles.length) {\n return;\n }\n // Reset error state when adding new files\n $scope.progress = undefined;\n // Filter out duplicates by comparing file names\n const existingFileNames = new Set($scope.definitionFiles.getFileNames());\n const filesToAdd = selectedFiles.filter((file) => !existingFileNames.has(file.name));\n $scope.definitionFiles.appendFiles(fileToImportDefinitionsMapper(filesToAdd, ImportStatus.PENDING).list);\n };\n\n /**\n * Event handler triggered when the user clicks the upload button. The selected files are uploaded to the server\n * which then processes them and if definitions are valid, graphql endpoints are created for each definition.\n * The server response contains reports for each definition file.\n */\n $scope.onImport = () => {\n $scope.uploadFinished = false;\n const payload = buildUploadPayloadObject();\n GraphqlService.importEndpointDefinition($scope.repositoryId, payload)\n .progress((evt) => {\n if (!$scope.uploadFinished) {\n $scope.progress = Math.min(100, parseInt(100.0 * evt.loaded / evt.total));\n }\n })\n .success((response) => {\n $scope.progress = undefined;\n $scope.uploadFinished = true;\n $scope.definitionFiles = importEndpointDefinitionListMapper(response, $scope.repositoryId, $scope.definitionFiles);\n })\n .error((errors) => {\n $scope.progress = undefined;\n $scope.uploadFinished = true;\n toastr.error(getError(errors));\n });\n };\n\n /**\n * Triggered when the user clicks the remove file button. The file is removed from the list of selected files.\n * @param {EndpointDefinitionFile} definitionFile The file to be removed.\n */\n $scope.onRemoveFile = (definitionFile) => {\n $scope.definitionFiles.removeFile(definitionFile);\n if ($scope.definitionFiles.size === 0) {\n $scope.progress = undefined;\n }\n };\n\n /**\n * Event handler triggered when the user clicks on the generated endpoint link. Opens the GraphQL Playground with\n * the selected endpoint.\n * @param {string} endpointId The ID of the endpoint to explore.\n */\n $scope.onExploreEndpoint = (endpointId) => {\n const url = resolvePlaygroundUrlWithEndpoint(endpointId);\n GraphqlContextService.setSelectedEndpoint(new GraphqlEndpointInfo({\n endpointId,\n }));\n window.open(url, '_blank', 'noopener,noreferrer');\n };\n\n /**\n * Event handler triggered when the user clicks the view report link. Opens the report modal with the given\n * definition file.\n * @param {EndpointGenerationReport} endpointGenerationReport The report to display.\n * @returns {Promise} The promise that resolves when the modal is closed.\n */\n $scope.onOpenReport = (event, endpointGenerationReport) => {\n event.preventDefault();\n return $uibModal.open({\n templateUrl: 'js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html',\n controller: 'EndpointGenerationResultFailureModalController',\n windowClass: 'endpoint-generation-failure-result-modal',\n size: 'lg',\n backdrop: 'static',\n keyboard: false,\n resolve: {\n data: () => {\n return {\n endpointReport: endpointGenerationReport,\n };\n },\n },\n }).result;\n };\n\n /**\n * Closes the modal.\n */\n $scope.close = () => {\n $uibModalInstance.dismiss('cancel');\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Builds the payload object for the import request. FormData object is created and the files are appended to it.\n * @returns {FormData} The payload object.\n */\n const buildUploadPayloadObject = () => {\n const payload = new FormData();\n $scope.definitionFiles.processWith((definition) => {\n payload.append('importFiles', definition.file, definition.file.name);\n });\n return payload;\n };\n\n const init = () => {\n };\n\n // =========================\n // Initialization\n // =========================\n\n init();\n}\n"],"names":["ImportStatus","PENDING","SUCCESS","FAIL","SKIP","ImportStatusLabelKeys","ImportStatusToViewMapping","EndpointDefinitionFileList","_list","_size","constructor","definitionFiles","this","length","processWith","predicate","list","forEach","findDefinitionFileByName","name","find","definitionFile","file","getFileNames","map","appendFiles","push","removeFile","definitionFileToRemove","filter","size","EndpointDefinitionFile","_file","_filename","_status","_viewStatus","_statusMessage","_endpointId","_report","status","statusMessage","filename","viewStatus","endpointId","report","fileToImportDefinitionsMapper","files","importStatus","fileToImportDefinitionMapper","importEndpointDefinitionListMapper","data","repositoryId","processEntry","response","id","toUpperCase","importEndpointDefinitionReportMapper","subFiles","subFileDefinitions","logger","LoggerProvider","ImportEndpointDefinitionModalController","$scope","$q","toastr","$uibModal","$uibModalInstance","GraphqlService","GraphqlContextService","allowedFileTypes","allowedFileTypesString","join","progress","undefined","uploadFinished","onFilesChange","$files","$file","$newFiles","$duplicateFiles","$invalidFiles","selectedFiles","invalidFiles","extension","split","pop","toLowerCase","includes","error","existingFileNames","Set","filesToAdd","has","onImport","payload","buildUploadPayloadObject","importEndpointDefinition","evt","Math","min","parseInt","loaded","total","success","errors","getError","onRemoveFile","onExploreEndpoint","url","resolvePlaygroundUrlWithEndpoint","setSelectedEndpoint","GraphqlEndpointInfo","window","open","onOpenReport","event","endpointGenerationReport","preventDefault","templateUrl","controller","windowClass","backdrop","keyboard","resolve","endpointReport","result","close","dismiss","FormData","definition","append","angular","module","$inject"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_id__=54419;export const __webpack_ids__=[28847,54419,78618,96248];export const __webpack_modules__={28847:(e,r,o)=>{o.r(r),o.d(r,{ImportResourceStatus:()=>s});const s={NONE:"NONE",UPLOADING:"UPLOADING",UPLOAD_ERROR:"UPLOAD_ERROR",UPLOADED:"UPLOADED",PENDING:"PENDING",IMPORTING:"IMPORTING",DONE:"DONE",ERROR:"ERROR",INTERRUPTING:"INTERRUPTING"}},54419:(e,r,o)=>{o.r(r),o(96248);var s=o(28847),t=o(78618);function a(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:r=>{r.ImportResourceStatus=s.ImportResourceStatus,r.toTitleCase=e=>t.toTitleCase(e),r.showMessage=r=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return r?r.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",a),a.$inject=["$uibModal"]},78618:(e,r,o)=>{o.r(r),o.d(r,{removeSpecialChars:()=>t,toBoolean:()=>a,toTitleCase:()=>i});var s=o(98980);const t=e=>e.replace(/[()']/g,""),a=e=>"string"==typeof e?"true"===e:Boolean(e),i=e=>e?(0,s.upperFirst)(e.toLowerCase()):e},96248:(e,r,o)=>{o.r(r);var s=o(304);angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",a),a.$inject=["$scope","$uibModalInstance","$translate","toastr","message"];const t=s.LoggerProvider.logger;function a(e,r,o,s,a){e.message=a,e.close=()=>{r.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{s.success(o.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{t.error("Could not copy text: ",e)})}}}};
2
+ //# sourceMappingURL=54419.aec242a64c27ceda6e02.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"54419.aec242a64c27ceda6e02.bundle.js","mappings":"sLAKO,MAAMA,EAAuB,CAIhC,KAAQ,OACR,UAAa,YACb,aAAgB,eAIhB,SAAY,WAIZ,QAAW,UAIX,UAAa,YAIb,KAAQ,OAIR,MAAS,QAIT,aAAgB,e,4DCvBpB,SAASC,EAA+BC,GACpC,MAAO,CACHC,SAAU,IACVC,YAAa,2DACbC,MAAO,CACHC,SAAU,KAEdC,KAAOC,IACHA,EAAOR,qBAAuBA,EAAAA,qBAC9BQ,EAAOC,YAAeC,GAAQC,EAAAA,YAAwBD,GAMtDF,EAAOI,YAAeC,IAClBX,EAAUY,KAAK,CACXV,YAAa,kEACbW,WAAY,wCACZC,KAAM,KACNC,YAAa,iCACbC,SAAU,SACVC,QAAS,CACLC,QAAS,WACL,OAAOP,EAAsBA,EAAoBQ,eAAeD,QAAU,EAC9E,OAMxB,CArCAE,QACKC,OAAO,8DAHI,CAAC,8EAIZC,UAAU,wBAAyBvB,GAExCA,EAA+BwB,QAAU,CAAC,Y,4GCC1C,MAAMC,EAAsBC,GACjBA,EAAOC,QAAQ,SAAU,IAG9BC,EAAaC,GACM,iBAAVA,EACU,SAAVA,EAEJC,QAAQD,GAGbrB,EAAeuB,GACZA,GAGEC,EAAAA,EAAAA,YAAWD,EAAKE,eAFZF,C,sCCtBfV,QACKC,OAAO,4EAA6E,IACpFR,WAAW,wCAAyCoB,GAEzDA,EAAsCV,QAAU,CAAC,SAAU,oBAAqB,aAAc,SAAU,WAExG,MAAMW,EAASC,EAAAA,eAAeD,OAE9B,SAASD,EAAsC3B,EAAQ8B,EAAmBC,EAAYC,EAAQpB,GAC1FZ,EAAOY,QAAUA,EAGjBZ,EAAOiC,MAAQ,KACXH,EAAkBI,WAGtBlC,EAAOmC,gBAAkB,KACrBC,UAAUC,UAAUC,UAAUtC,EAAOY,SAChC2B,KAAK,KACFP,EAAOQ,QAAQT,EAAWU,QAAQ,6CAClCzC,EAAOiC,SACPS,IACAd,EAAOe,MAAM,wBAAyBD,KAGtD,C","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/models/import/import-resource-status.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-resource-message.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/utils/string-utils.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/controllers/import-resource-message-dialog.controller.js"],"sourcesContent":["/**\n * Represents progress status of an import rdf resource.\n *\n * @type {{DONE: string, INTERRUPTING: string, IMPORTING: string, ERROR: string, PENDING: string, NONE: string}}\n */\nexport const ImportResourceStatus = {\n /**\n * Initial state. The rdf resources in this state are available in the server, but its data is not inserted into GraphDB.\n */\n 'NONE': 'NONE',\n 'UPLOADING': 'UPLOADING',\n 'UPLOAD_ERROR': 'UPLOAD_ERROR',\n /**\n * Marks resource as uploaded.\n */\n 'UPLOADED': 'UPLOADED',\n /**\n * The import of rdf resources in this state was not started because GraphDB was stopped.\n */\n 'PENDING': 'PENDING',\n /**\n * The rdf resource inserting is in progress .\n */\n 'IMPORTING': 'IMPORTING',\n /**\n * The rdf resource is inserted into GraphDB.\n */\n 'DONE': 'DONE',\n /**\n * Marks rdf resources as not inserted into GraphDB for some reason.\n */\n 'ERROR': 'ERROR',\n /**\n * The rdf resources in this status are interrupted or are marked for interruption.\n */\n 'INTERRUPTING': 'INTERRUPTING'\n};\n","import 'angular/import/controllers/import-resource-message-dialog.controller';\nimport {ImportResourceStatus} from \"../../models/import/import-resource-status\";\nimport * as stringUtils from \"../../utils/string-utils\";\n\nconst modules = ['graphdb.framework.impex.import.controllers.import-resource-message-dialog'];\n\nangular\n .module('graphdb.framework.import.directives.import-resource-message', modules)\n .directive('importResourceMessage', importResourceMessageDirective);\n\nimportResourceMessageDirective.$inject = ['$uibModal'];\n\nfunction importResourceMessageDirective($uibModal) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/import/templates/import-resource-message.html',\n scope: {\n resource: '='\n },\n link: ($scope) => {\n $scope.ImportResourceStatus = ImportResourceStatus;\n $scope.toTitleCase = (str) => stringUtils.toTitleCase(str);\n\n /**\n *\n * @param {ImportResourceTreeElement} resourceTreeElement\n */\n $scope.showMessage = (resourceTreeElement) => {\n $uibModal.open({\n templateUrl: 'js/angular/import/templates/import-resource-message-dialog.html',\n controller: 'ImportResourceMessageDialogController',\n size: 'lg',\n windowClass: 'import-resource-message-dialog',\n backdrop: 'static',\n resolve: {\n message: function () {\n return resourceTreeElement ? resourceTreeElement.importResource.message : '';\n }\n }\n });\n }\n }\n };\n}\n","import {upperFirst} from \"lodash\";\n\n/**\n * Removes brackets and serial commas from IRIs\n * when used to create ids for links and markers,\n * because elements with ids that contain such\n * are not valid XHTML and cause a host problems\n * when trying to style individual elements\n * @param {string} string The string to be processed.\n * @return {string} A string where the special characters are removed.\n */\nconst removeSpecialChars = (string) => {\n return string.replace(/[()']/g, \"\");\n};\n\nconst toBoolean = (value) => {\n if (typeof value === 'string') {\n return value === 'true';\n }\n return Boolean(value);\n};\n\nconst toTitleCase = (text) => {\n if (!text) {\n return text;\n }\n return upperFirst(text.toLowerCase());\n};\n\nexport {\n removeSpecialChars,\n toBoolean,\n toTitleCase\n};\n\n","import {LoggerProvider} from \"../../core/services/logger-provider\";\n\nangular\n .module('graphdb.framework.impex.import.controllers.import-resource-message-dialog', [])\n .controller('ImportResourceMessageDialogController', ImportResourceMessageDialogController);\n\nImportResourceMessageDialogController.$inject = ['$scope', '$uibModalInstance', '$translate', 'toastr', 'message'];\n\nconst logger = LoggerProvider.logger;\n\nfunction ImportResourceMessageDialogController($scope, $uibModalInstance, $translate, toastr, message) {\n $scope.message = message;\n\n\n $scope.close = () => {\n $uibModalInstance.dismiss();\n };\n\n $scope.copyToClipboard = () => {\n navigator.clipboard.writeText($scope.message)\n .then(() => {\n toastr.success($translate.instant('import.help.messages.copied_to_clipboard'));\n $scope.close();\n }, (err) => {\n logger.error('Could not copy text: ', err);\n });\n };\n}\n"],"names":["ImportResourceStatus","importResourceMessageDirective","$uibModal","restrict","templateUrl","scope","resource","link","$scope","toTitleCase","str","stringUtils","showMessage","resourceTreeElement","open","controller","size","windowClass","backdrop","resolve","message","importResource","angular","module","directive","$inject","removeSpecialChars","string","replace","toBoolean","value","Boolean","text","upperFirst","toLowerCase","ImportResourceMessageDialogController","logger","LoggerProvider","$uibModalInstance","$translate","toastr","close","dismiss","copyToClipboard","navigator","clipboard","writeText","then","success","instant","err","error"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_id__=5470;export const __webpack_ids__=[5470,11637,14102,15435,22093,27473,41233,50083,50479,56139,71156,98551];export const __webpack_modules__={5470:(e,i,t)=>{t.r(i),t(56139),t(32150),t(81655);var r=t(27473),n=t(85727),s=t(15435),a=t(71156),y=t(22093),l=t(98551),o=t(50479),d=t(41233),u=t(14604),c=t(50083),I=t(57154),m=t(304);angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",p),p.$inject=["$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService"];const S=m.LoggerProvider.logger;function p(e,i,t,m,p,h,T,x,g,Q,E,A,f,v,R,L){e.productInfo=x,e.SimilarityQueryType=l.SimilarityQueryType,e.SimilarityIndexType=o.SimilarityIndexType,e.similarityIndexInfo=void 0,e.samples=void 0,e.yasguiConfig=void 0,e.saveOrUpdateExecuted=!1,e.loadingControllerResources=!1,e.helpHidden=1===E.get(A.HIDE_SIMILARITY_HELP),e.savingIndex=!1;let w,C,M,D=!1,N=y.SimilarityViewMode.CREATE,O=!0;e.changeSimilarityIndexType=(i,t=l.SimilarityQueryType.DATA)=>{e.similarityIndexInfo.setType(i),e.similarityIndexInfo.isPredicationType()?e.samples=C[o.SimilarityIndexType.PREDICATION]:e.samples=C[o.SimilarityIndexType.TEXT],e.changeQueryTab(t).then(i=>{q(e.similarityIndexInfo),e.setEditorQuery(e.similarityIndexInfo.getQuery())})},e.changeQueryTab=i=>{const t=e.similarityIndexInfo.getSelectedQueryType();return t===i?Promise.resolve():(e.similarityIndexInfo.setSelectedQueryType(i),P(e.similarityIndexInfo,t).then(e=>ee(e,t)).then(e=>Z(e,t)).catch(e=>{e instanceof d.SimilarityIndexError||S.info(e)}).finally(()=>{const i=G();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode()),e.similarityIndexInfo.isDataQueryTypeSelected()?i.showYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]):i.hideYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]),i.setQuery(e.similarityIndexInfo.getQuery())}))},e.createSimilarityIndex=()=>{e.saveOrUpdateExecuted=!0,e.savingIndex=!0,P(e.similarityIndexInfo).then(ee).then(Z).then(z).then(F).then(e=>b(e.getSimilarityIndex())).then(()=>H()).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),f.instant("similarity.could.not.get.indexes.error"))}).finally(()=>{e.savingIndex=!1})},e.viewQuery=()=>{P(e.similarityIndexInfo).then(z).then(Y).then(_).catch(e=>i.error(getError(e)))},e.preview=()=>{P(e.similarityIndexInfo).then(Z).then(ee).then(()=>{const i=G();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASR),i.query(e.similarityIndexInfo.getSelectedYasguiRenderMode())})},e.saveSearchQuery=function(){D?(e.saveOrUpdateExecuted=!0,e.savingIndex=!0,P(e.similarityIndexInfo).then(X).then(ee).then(Z).then(J).then(K).then(V).then(e=>g.showToastMessageWithDelay(e?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg")).then(()=>{T.url("similarity")}).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),f.instant("similarity.change.query.error"))}).finally(()=>{e.savingIndex=!1})):T.url("similarity")},e.setEditorQuery=i=>{e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1),e.yasguiConfig?G().setQuery(i):B({initialQuery:i||" "})},e.similarityIndexNameChanged=()=>{e.setDirty(),e.similarityIndexInfo.isNameExist=!1},e.queryChanged=()=>{e.setDirty(),e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1)},e.isCloneViewMode=()=>y.SimilarityViewMode.CLONE===N,e.isEditViewMode=()=>y.SimilarityViewMode.EDIT===N,e.isCreateViewMode=()=>y.SimilarityViewMode.CREATE===N,e.setDirty=()=>{D=!0},e.isYasqeShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasqeRenderMode(),e.isYasrShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasrRenderMode(),e.showEditor=()=>{const i=G();i.abortQuery().then(()=>i.setQuery(e.similarityIndexInfo.getQuery())).then(()=>(e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode())))},e.toggleHelp=i=>{void 0===i&&(i=E.get(A.HIDE_SIMILARITY_HELP)),1!==i?(E.set(A.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(E.set(A.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.getCloseBtnMsg=function(){const i=e.editSearchQuery?f.instant("similarity.query.edition.msg"):f.instant("similarity.index.creation.msg");return f.instant("similarity.close.btn.msg",{operation:i})},e.hasQueryError=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();return l.SimilarityQueryType.DATA===i?e.hasSelectQueryError():l.SimilarityQueryType.SEARCH===i?e.hasSearchQueryError():l.SimilarityQueryType.ANALOGICAL===i&&e.hasAnalogicalQueryError()},e.hasSelectQueryError=()=>!e.similarityIndexInfo.hasSelectQuery()||e.similarityIndexInfo.invalidSelectQuery||e.similarityIndexInfo.invalidSelectQueryType,e.hasSearchQueryError=()=>!e.similarityIndexInfo.hasSearchQuery()||e.similarityIndexInfo.invalidSearchQuery||e.similarityIndexInfo.invalidSearchQueryType,e.hasAnalogicalQueryError=()=>!e.similarityIndexInfo.hasAnalogicalQuery()||e.similarityIndexInfo.invalidAnalogicalQuery||e.similarityIndexInfo.invalidAnalogicalQueryType,e.getQueryErrorMessage=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();let t=!1,r=!1,n=!1;l.SimilarityQueryType.DATA===i?(t=!e.similarityIndexInfo.hasSelectQuery(),r=e.similarityIndexInfo.invalidSelectQueryType,n=e.similarityIndexInfo.invalidSelectQuery):l.SimilarityQueryType.SEARCH===i?(t=!e.similarityIndexInfo.hasSearchQuery(),r=e.similarityIndexInfo.invalidSearchQueryType,n=e.similarityIndexInfo.invalidSearchQuery):l.SimilarityQueryType.ANALOGICAL===i&&(t=!e.similarityIndexInfo.hasAnalogicalQuery(),r=e.similarityIndexInfo.invalidAnalogicalQueryType,n=e.similarityIndexInfo.invalidAnalogicalQuery);const s={queryType:f.instant(`similarity.query.type.${i}.name`)};return t?f.instant("similarity.error.query.empty",s):n?f.instant("similarity.error.query.invalid",s):r?f.instant("similarity.error.query.invalid_type",s):""};const P=(e,i=void 0)=>G().getQuery().then(t=>e.setQuery(t,i)).then(()=>e),Y=e=>p.getQuery({indexName:e.getName(),indexOptions:e.getOptions(),query:e.getQuery(),indexStopList:e.getStopList(),queryInference:e.getInference(),querySameAs:e.getSameAs(),viewType:e.getSelectedQueryType(),indexAnalyzer:e.getAnalyzer()}).then(e=>e.data),_=e=>{e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},q=i=>{const t=i.getType();if(!e.isEditViewMode()&&w&&(i.setQuery(w[t],l.SimilarityQueryType.SEARCH),i.setQuery(w.analogical,l.SimilarityQueryType.ANALOGICAL)),C)if(o.SimilarityIndexType.PREDICATION===t){const e=C[o.SimilarityIndexType.PREDICATION].predication;i.setQuery(e,l.SimilarityQueryType.DATA)}else{const e=C[o.SimilarityIndexType.TEXT].literals;i.setQuery(e,l.SimilarityQueryType.DATA)}},B=i=>{const t={endpoint:U,componentId:"create-index",showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,showYasqeResizer:!1,pageSize:100,prefixes:M,render:e.similarityIndexInfo.getSelectedYasguiRenderMode(),yasqeActionButtons:e.isEditViewMode()||!e.similarityIndexInfo.isDataQueryTypeSelected()?n.DISABLE_YASQE_BUTTONS_CONFIGURATION:n.INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,maxPersistentResponseSize:0,yasqeMode:e.canWriteActiveRepo()?a.YasqeMode.WRITE:a.YasqeMode.READ},r={};angular.extend(r,t,i),e.yasguiConfig=r},U=()=>`repositories/${v.getActiveRepository()}`,b=t=>{if(void 0!==e.literalIndexes){const i=t.inputIndex;i!==e.literalIndexes[0]&&(t.options=t.options+(""===t.options?"":" ")+"-input_index "+i)}return"true"===t.isLiteralIndex&&(t.options=t.options+(""===t.options?"":" ")+"-literal_index true",t.type=o.SimilarityIndexType.TEXT_LITERAL),D=!1,p.createIndex("POST",t.name,t.options,t.selectQuery,t.searchQuery,t.isPredicationType()?t.analogicalQuery:"",t.stopList,t.infer,t.sameAs,t.type,t.analyzer).then(()=>(i.success(f.instant("similarity.create.index.successfully")),t)).catch(function(e){const t=getError(e);return i.error(t,f.instant("similarity.create.index.error")),S.info(t),Promise.reject(new d.SimilarityIndexError("Could not create index."))})},V=e=>{const i=e.isSearchQueryTypeSelected(),t={name:e.getSimilarityIndex().name,changedQuery:e.getQuery(),isSearchQuery:i};return p.saveSearchQuery(JSON.stringify(t)).then(()=>(D=!1,i))},H=()=>{m(()=>T.url("similarity"),100)},G=()=>n.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),$=()=>{const i=T.search().name||"";return e.isCloneViewMode()?`${f.instant("similarity.copy_of.prefix")}_${i}`:i},j=()=>{const e=T.search().type;return void 0===e||e.startsWith("text")?o.SimilarityIndexType.TEXT:e},k=(e,i)=>{const t=e.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===i&&r+1<t.length){const i=t[r+1];return delete t[r],delete t[r+1],e.options=t.join(" "),i}},z=e=>Promise.all([X(e).then(W).then(J).then(K).then(Z).then(ee)]).then(()=>e),F=e=>p.getIndexes().then(i=>i.data.some(i=>i.name===e.getName())?(e.isNameExist=!0,Promise.reject(new d.SimilarityIndexError("Similarity index name exists."))):e),X=e=>e.getSimilarityIndex().name?e.isNameValid()?Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Invalid similarity name.")):Promise.reject(new d.SimilarityIndexError("Missing similarity name.")),W=e=>e.hasSelectQuery()?e.invalidSelectQuery?Promise.reject(new d.SimilarityIndexError("Invalid select query")):e.invalidSelectQueryType?Promise.reject(new d.SimilarityIndexError("Invalid select query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing select query.")),J=e=>e.hasSearchQuery()?e.invalidSearchQuery?Promise.reject(new d.SimilarityIndexError("Invalid search query")):e.invalidSearchQueryType?Promise.reject(new d.SimilarityIndexError("Invalid search query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing search query.")),K=e=>e.isPredicationType()&&!e.hasAnalogicalQuery()?Promise.reject(new d.SimilarityIndexError("Missing analogical query.")):e.invalidAnalogicalQuery?Promise.reject(new d.SimilarityIndexError("Invalid analogical query")):e.invalidAnalogicalQueryType?Promise.reject(new d.SimilarityIndexError("Invalid analogical query type")):Promise.resolve(e),Z=(e,i=void 0)=>G().getQueryType().then(t=>u.QueryType.SELECT!==t?(e.markInvalidQueryType(i),Promise.reject(new d.SimilarityIndexError("Query type is not valid."))):(e.markInvalidQueryType(i,!1),e)),ee=(e,i=void 0)=>G().isQueryValid().then(t=>t?(e.markInvalidQuery(i,!1),e):(e.markInvalidQuery(i),Promise.reject(new d.SimilarityIndexError("Query is not valid.")))),ie=(e,i,t,r)=>{L.openSimpleModal({title:e,message:i,warning:!0}).result.then(function(){angular.isFunction(t)&&t()},function(){angular.isFunction(r)&&r()})},te=()=>{e.isYasrShown()&&e.similarityIndexInfo.isDataQueryTypeSelected()&&e.showEditor(),e.canEditActiveRepo=e.canWriteActiveRepo();const i={...e.yasguiConfig,yasqeMode:e.canWriteActiveRepo()};B(i)},re=e=>{D&&(e.returnValue=!0)},ne=()=>{window.removeEventListener("beforeunload",re),se.forEach(e=>e())},se=[],ae=I.ServiceProvider.get(I.RepositoryContextService).onSelectedRepositoryChanged(e=>{e&&(O?O=!1:H())},()=>new Promise(function(i){if(e.isCreateViewMode()||e.isCloneViewMode())return void i(!0);const t=()=>{D=!1,i(!0)};if(D){const e=()=>{i(!1)},r=f.instant("common.confirm"),n=f.instant("similarity.warning.unsaved.changes");ie(r,n,t,e)}else t()}));se.push(ae),se.push(e.$on("$locationChangeStart",(e,i)=>{if(D){e.preventDefault();const t=f.instant("common.confirm"),r=f.instant("similarity.warning.unsaved.changes");ie(t,r,()=>{ne();const e=T.absUrl().length-T.url().length,t=i.substring(e);T.path(t)})}else ne()})),se.push(e.$on("$destroy",ne)),window.addEventListener("beforeunload",re),N=(()=>{if(void 0===T.search().name)return y.SimilarityViewMode.CREATE;const e=T.search().editSearchQuery;return void 0===e?y.SimilarityViewMode.CLONE:"string"==typeof e?"false"===e?y.SimilarityViewMode.CLONE:y.SimilarityViewMode.EDIT:e?y.SimilarityViewMode.EDIT:y.SimilarityViewMode.CLONE})();const ye=e.$watch(function(){return e.getActiveRepositoryObject()},function(t){t&&(e.loadingControllerResources=!0,Promise.all([p.getSearchQueries(),p.getSamples(),v.getPrefixes(t.id)]).then(([t,n,s])=>{e.canEditActiveRepo=e.canWriteActiveRepo(),w=t?t.data:[],C=n?n.data:[],M=s,(()=>{const t=new c.SimilarityIndexInfo;t.setName($()),t.setType(j()),t.setSelectedQueryType(e.isEditViewMode()?l.SimilarityQueryType.SEARCH:l.SimilarityQueryType.DATA);const n=T.search().options;n?t.setOptions(n):t.setOptions(t.isTextType()?"-termweight idf":""),q(t);const s=T.search().searchQuery;s&&t.setQuery(s,l.SimilarityQueryType.SEARCH);const a=T.search().selectQuery;a&&t.setQuery(a,l.SimilarityQueryType.DATA);const y=T.search().analogicalQuery;if(y&&t.setQuery(y,l.SimilarityQueryType.ANALOGICAL),t.isTextType()){t.setStopList(T.search().stopList),t.setAnalyzer(T.search().analyzer);const e=k(t.getSimilarityIndex(),"-literal_index");void 0!==e&&t.setLiteralIndex(e)}return t.isPredicationType()?p.getIndexes().then(i=>{const n=(0,r.mapIndexesResponseToSimilarityIndex)(i.data).filter(e=>e.isTextLiteralType()&&(e.isBuiltStatus()||e.isOutdatedStatus())).map(e=>e.name);if(e.literalIndexes=["no-index"].concat(n),void 0===t.getInputIndex()){const i=k(t.getSimilarityIndex(),"-input_index");if(void 0!==i)for(let r=0;r<e.literalIndexes.length;r++)i===e.literalIndexes[r]&&t.setInputIndex(e.literalIndexes[r])}return void 0===t.getInputIndex()&&t.setInputIndex(e.literalIndexes[0]),t}).catch(function(e){const t=getError(e);i.error(t,f.instant("similarity.could.not.get.indexes.error"))}):Promise.resolve(t)})().then(i=>{e.similarityIndexInfo=i;let t=l.SimilarityQueryType.DATA;e.isEditViewMode()&&(t=l.SimilarityQueryType.SEARCH),e.changeSimilarityIndexType(i.getType(),t)})}).catch(i=>{S.info(i),e.repositoryError=getError(i)}).finally(()=>{se.push(e.$on("repositoryIsSet",te)),ye(),e.loadingControllerResources=!1}))})}},11637:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexStatus:()=>r});const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},14102:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndex:()=>s});var r=t(50479),n=t(11637);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return n.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return n.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return n.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return n.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return n.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return n.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return n.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return n.SimilarityIndexStatus.isFailedStatus(this.status)}}},15435:(e,i,t)=>{t.r(i),t.d(i,{RenderingMode:()=>r});const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},22093:(e,i,t)=>{t.r(i),t.d(i,{SimilarityViewMode:()=>r});const r={CREATE:"CREATE",EDIT:"EDIT",CLONE:"CLONE"}},27473:(e,i,t)=>{t.r(i),t.d(i,{mapIndexesResponseToSimilarityIndex:()=>n});var r=t(14102);const n=e=>e.map(e=>{const i=new r.SimilarityIndex;return i.type=e.type,i.stopList=e.stopList,i.status=e.status,i.selectQuery=e.selectQuery,i.searchQuery=e.searchQuery,i.sameAs=e.sameAs,i.options=e.options,i.name=e.name,i.infer=e.infer,i.analyzer=e.analyzer,i.analogicalQuery=e.analogicalQuery,i})},41233:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexError:()=>r});class r extends Error{}},50083:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexInfo:()=>y});var r=t(14102),n=t(98551),s=t(15435);const a=new RegExp("^[a-zA-Z0-9-_]+$");class y{constructor(){this.similarityIndex=new r.SimilarityIndex,this.isNameExist=!1,this.invalidSelectQueryType=!1,this.invalidSelectQuery=!1,this.invalidSearchQueryType=!1,this.invalidSearchQuery=!1,this.invalidAnalogicalQueryType=!1,this.invalidAnalogicalQuery=!1,this.selectedQueryType=n.SimilarityQueryType.DATA,this.selectedYasguiRenderMode=s.RenderingMode.YASQE}setQuery(e,i=void 0){const t=i||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.similarityIndex.analogicalQuery=e):this.similarityIndex.searchQuery=e:this.similarityIndex.selectQuery=e}getQuery(e=void 0){switch(e||this.selectedQueryType){case n.SimilarityQueryType.DATA:return this.similarityIndex.selectQuery;case n.SimilarityQueryType.SEARCH:return this.similarityIndex.searchQuery;case n.SimilarityQueryType.ANALOGICAL:return this.similarityIndex.analogicalQuery}}markInvalidQuery(e=void 0,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQuery=i):this.invalidSearchQuery=i:this.invalidSelectQuery=i}markInvalidQueryType(e=void 0,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQueryType=i):this.invalidSearchQueryType=i:this.invalidSelectQueryType=i}setSelectedQueryType(e){this.selectedQueryType=e}getSelectedQueryType(){return this.selectedQueryType}setSelectedYasguiRenderMode(e){this.selectedYasguiRenderMode=e}getSelectedYasguiRenderMode(){return this.selectedYasguiRenderMode}isDataQueryTypeSelected(){return n.SimilarityQueryType.DATA===this.selectedQueryType}isSearchQueryTypeSelected(){return n.SimilarityQueryType.SEARCH===this.selectedQueryType}isAnalogicalQueryTypeSelected(){return n.SimilarityQueryType.ANALOGICAL===this.selectedQueryType}isTextType(){return this.similarityIndex.isTextType()}isPredicationType(){return this.similarityIndex.isPredicationType()}isTextLiteralType(){return this.similarityIndex.isTextLiteralType()}hasName(){return!!this.similarityIndex.name}isNameValid(){return a.test(this.similarityIndex.name)}hasSelectQuery(){return!!this.similarityIndex.selectQuery}hasSearchQuery(){return!!this.similarityIndex.searchQuery}hasAnalogicalQuery(){return!!this.similarityIndex.analogicalQuery}isYasqeRenderMode(){return s.RenderingMode.YASQE===this.getSelectedYasguiRenderMode()}isYasrRenderMode(){return s.RenderingMode.YASR===this.getSelectedYasguiRenderMode()}getName(){return this.similarityIndex.name}setName(e){this.similarityIndex.name=e}setInputIndex(e){this.similarityIndex.inputIndex=e}getInputIndex(){return this.similarityIndex.inputIndex}setLiteralIndex(e=!1){this.similarityIndex.isLiteralIndex=e}getSimilarityIndex(){return this.similarityIndex}setStopList(e){this.similarityIndex.stopList=e}getStopList(){return this.similarityIndex.stopList}setAnalyzer(e="org.apache.lucene.analysis.en.EnglishAnalyzer"){this.similarityIndex.analyzer=e}getAnalyzer(){return this.similarityIndex.analyzer}setType(e){this.similarityIndex.type=e}getType(){return this.similarityIndex.type}setOptions(e){this.similarityIndex.options=e}getOptions(){return this.similarityIndex.options}getInference(){return this.similarityIndex.infer}getSameAs(){return this.similarityIndex.sameAs}}},50479:(e,i,t)=>{t.r(i),t.d(i,{SimilarityIndexType:()=>r});const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},56139:()=>{function e(e,i){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(i.instant(t)),setTimeout(r,300)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",e),e.$inject=["toastr","$translate"]},71156:(e,i,t)=>{t.r(i),t.d(i,{YasqeMode:()=>r});const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},98551:(e,i,t)=>{t.r(i),t.d(i,{SimilarityQueryType:()=>r});const r={DATA:"DATA",SEARCH:"SEARCH",ANALOGICAL:"ANALOGICAL"}}};
2
+ //# sourceMappingURL=5470.58e107e4c61ae7c22d48.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"5470.58e107e4c61ae7c22d48.bundle.js","mappings":"gWAkBAA,QACKC,OAAO,kDAAmD,CACvD,wCACA,gDAEHC,WAAW,0BAA2BC,GAE3CA,EAAwBC,QAAU,CAC9B,SACA,SACA,YACA,WACA,wBACA,oBACA,YACA,cACA,gBACA,+BACA,sBACA,SACA,aACA,gBACA,sBACA,gBAGJ,MAAMC,EAASC,EAAAA,eAAeD,OAE9B,SAASF,EACLI,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAKAf,EAAOO,YAAcA,EAErBP,EAAOgB,oBAAsBA,EAAAA,oBAC7BhB,EAAOiB,oBAAsBA,EAAAA,oBAK7BjB,EAAOkB,yBAAsBC,EAC7BnB,EAAOoB,aAAUD,EACjBnB,EAAOqB,kBAAeF,EACtBnB,EAAOsB,sBAAuB,EAC9BtB,EAAOuB,4BAA6B,EACpCvB,EAAOwB,WAAsE,IAAzDd,EAAoBe,IAAId,EAAOe,sBAKnD1B,EAAO2B,aAAc,EAErB,IACIC,EACAC,EACAC,EAHAC,GAAU,EAIVC,EAAWC,EAAAA,mBAAmBC,OAK9BC,GAA2B,EAa/BnC,EAAOoC,0BAA4B,CAACC,EAAqBC,EAAsBtB,EAAAA,oBAAoBuB,QAC/FvC,EAAOkB,oBAAoBsB,QAAQH,GAC/BrC,EAAOkB,oBAAoB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,KAChC,CAEAlD,SAAAA,GACI,OAAOyK,KAAKnI,gBAAgBa,MAChC,E,4DCxPG,MAAM5L,EAAsB,CAC/B,KAAQ,OACR,aAAgB,cAChB,YAAe,cAEf,WAAeoL,GACJpL,EAAoB0B,OAAS0J,EAGxC,kBAAsBA,GACXpL,EAAoBqL,eAAiBD,EAGhD,kBAAsBA,GACXpL,EAAoByB,cAAgB2J,E,aCRnD,SAAS7L,EAAcP,EAAQW,GAC3B,MAAO,CACHoF,0BASJ,SAAmCmJ,GAC/B,OAAO,IAAIhM,QAASoS,IAChBtV,EAAO8M,QAAQnM,EAAWuE,QAAQgK,IAClCqG,WAAWD,EAAG,MAEtB,EACJ,CAvBA9V,QACKC,OAAO,wCAAyC,IAChD+V,QAAQ,gBAAiBjV,GAE9BA,EAAcX,QAAU,CAAC,SAAU,a,kDCJ5B,MAAM8L,EAAY,CAIrBC,MAAO,QAKPC,KAAM,OAKN6J,UAAW,Y,4DCdR,MAAM1U,EAAsB,CAC/B,KAAQ,OACR,OAAU,SACV,WAAc,a","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/similarity/controllers/create-index.controller.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index-status.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ontotext-yasgui/rendering-mode.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-view-mode.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/rest/mappers/similarity-index-mapper.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index-error.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index-info.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-index-type.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/utils/notifications.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ontotext-yasgui/yasqe-mode.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-query-type.js"],"sourcesContent":["import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\nimport 'angular/core/services/event-emitter-service';\nimport {mapIndexesResponseToSimilarityIndex} from \"../../rest/mappers/similarity-index-mapper\";\nimport {\n DISABLE_YASQE_BUTTONS_CONFIGURATION, INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION, YasguiComponentDirectiveUtil, YasqeButtonName,\n} from \"../../core/directives/yasgui-component/yasgui-component-directive.util\";\nimport {RenderingMode} from \"../../models/ontotext-yasgui/rendering-mode\";\nimport {YasqeMode} from \"../../models/ontotext-yasgui/yasqe-mode\";\nimport {SimilarityViewMode} from \"../../models/similarity/similarity-view-mode\";\nimport {SimilarityQueryType} from \"../../models/similarity/similarity-query-type\";\nimport {SimilarityIndexType} from \"../../models/similarity/similarity-index-type\";\nimport {SimilarityIndexError} from \"../../models/similarity/similarity-index-error\";\nimport {QueryType} from \"../../models/ontotext-yasgui/query-type\";\nimport {SimilarityIndexInfo} from \"../../models/similarity/similarity-index-info\";\nimport {RepositoryContextService, ServiceProvider} from \"@ontotext/workbench-api\";\nimport {LoggerProvider} from \"../../core/services/logger-provider\";\n\nangular\n .module('graphdb.framework.similarity.controllers.create', [\n 'graphdb.framework.utils.notifications',\n 'graphdb.framework.utils.localstorageadapter',\n ])\n .controller('CreateSimilarityIdxCtrl', CreateSimilarityIdxCtrl);\n\nCreateSimilarityIdxCtrl.$inject = [\n '$scope',\n 'toastr',\n '$uibModal',\n '$timeout',\n 'SimilarityRestService',\n 'SparqlRestService',\n '$location',\n 'productInfo',\n 'Notifications',\n 'RDF4JRepositoriesRestService',\n 'LocalStorageAdapter',\n 'LSKeys',\n '$translate',\n '$repositories',\n 'EventEmitterService',\n 'ModalService',\n];\n\nconst logger = LoggerProvider.logger;\n\nfunction CreateSimilarityIdxCtrl(\n $scope,\n toastr,\n $uibModal,\n $timeout,\n SimilarityRestService,\n SparqlRestService,\n $location,\n productInfo,\n Notifications,\n RDF4JRepositoriesRestService,\n LocalStorageAdapter,\n LSKeys,\n $translate,\n $repositories,\n EventEmitterService,\n ModalService,\n) {\n /**\n * @type {ProductInfo}\n */\n $scope.productInfo = productInfo;\n\n $scope.SimilarityQueryType = SimilarityQueryType;\n $scope.SimilarityIndexType = SimilarityIndexType;\n\n /**\n * @type {SimilarityIndexInfo}\n */\n $scope.similarityIndexInfo = undefined;\n $scope.samples = undefined;\n $scope.yasguiConfig = undefined;\n $scope.saveOrUpdateExecuted = false;\n $scope.loadingControllerResources = false;\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP) === 1;\n /**\n * Flag that indicates if the index save operation is in progress.\n * @type {boolean}\n */\n $scope.savingIndex = false;\n\n let isDirty = false;\n let searchQueries = undefined;\n let allSamples = undefined;\n let usedPrefixes = undefined;\n let viewMode = SimilarityViewMode.CREATE;\n const textDefaultOptions = '-termweight idf';\n const predDefaultOptions = '';\n\n // This flag is used to prevent triggering the repository change event listener on initial subscription.\n let initialRepoChangeTrigger = true;\n\n\n // =========================\n // Public functions\n // =========================\n /**\n * Changes the similarity index type. (\"Create text similarity index\" or \"Create predication index\").\n *\n * @param {string} similarityIndexType - the new value of similarity index type. The value have to be one of {@link SimilarityIndexType}.\n * @param {string} similarityQueryType - the type of similarity query that have to be shown. Default value is data query.\n * The value have to be one of {@link SimilarityQueryType}.\n */\n $scope.changeSimilarityIndexType = (similarityIndexType, similarityQueryType = SimilarityQueryType.DATA) => {\n $scope.similarityIndexInfo.setType(similarityIndexType);\n if ($scope.similarityIndexInfo.isPredicationType()) {\n $scope.samples = allSamples[SimilarityIndexType.PREDICATION];\n } else {\n $scope.samples = allSamples[SimilarityIndexType.TEXT];\n }\n $scope.changeQueryTab(similarityQueryType)\n .then((similarityIndexInfo) => {\n setDefaultQueries($scope.similarityIndexInfo);\n $scope.setEditorQuery($scope.similarityIndexInfo.getQuery());\n });\n };\n\n /**\n * Changes the query tab. (\"Data query\", \"Search query\" or \"Analogical query\").\n *\n * @param {string} similarityQueryType - the type of query that have to be shown. The value have to be one of {@link SimilarityQueryType}.\n */\n $scope.changeQueryTab = (similarityQueryType) => {\n const oldSimilarityQueryType = $scope.similarityIndexInfo.getSelectedQueryType();\n if (oldSimilarityQueryType === similarityQueryType) {\n return Promise.resolve();\n }\n $scope.similarityIndexInfo.setSelectedQueryType(similarityQueryType);\n return updateQueryFromEditor($scope.similarityIndexInfo, oldSimilarityQueryType)\n .then((similarityIndexInfo) => validateQuery(similarityIndexInfo, oldSimilarityQueryType))\n .then((similarityIndexInfo) => validateQueryType(similarityIndexInfo, oldSimilarityQueryType))\n .catch((error) => {\n if (!(error instanceof SimilarityIndexError)) {\n logger.info(error);\n }\n })\n .finally(() => {\n const ontotextYasgui = getOntotextYasgui();\n $scope.similarityIndexInfo.setSelectedYasguiRenderMode(RenderingMode.YASQE);\n ontotextYasgui.changeRenderMode($scope.similarityIndexInfo.getSelectedYasguiRenderMode());\n if ($scope.similarityIndexInfo.isDataQueryTypeSelected()) {\n ontotextYasgui.showYasqeActionButton([YasqeButtonName.INFER_STATEMENTS, YasqeButtonName.EXPANDS_RESULTS]);\n } else {\n ontotextYasgui.hideYasqeActionButton([YasqeButtonName.INFER_STATEMENTS, YasqeButtonName.EXPANDS_RESULTS]);\n }\n ontotextYasgui.setQuery($scope.similarityIndexInfo.getQuery());\n });\n };\n\n /**\n * Validates all similarity index data, and if everything is ok calls backend server to create an index.\n */\n $scope.createSimilarityIndex = () => {\n $scope.saveOrUpdateExecuted = true;\n $scope.savingIndex = true;\n updateQueryFromEditor($scope.similarityIndexInfo)\n .then(validateQuery)\n .then(validateQueryType)\n .then(validateSimilarityIndex)\n .then(validateSimilarityIndexNameExistence)\n .then((similarityIndexInfo) => createIndex(similarityIndexInfo.getSimilarityIndex()))\n .then(() => goToSimilarityIndexesView())\n .catch((error) => {\n if (!(error instanceof SimilarityIndexError)) {\n toastr.error(getError(error), $translate.instant('similarity.could.not.get.indexes.error'));\n }\n })\n .finally(() => {\n $scope.savingIndex = false;\n });\n };\n\n /**\n * Opens a modal dialog and displays the sparql query of currently selected index type query.\n */\n $scope.viewQuery = () => {\n updateQueryFromEditor($scope.similarityIndexInfo)\n .then(validateSimilarityIndex)\n .then(fetchSparqlQuery)\n .then(showSparqlQuery)\n .catch((error) => toastr.error(getError(error)));\n };\n\n /**\n * Executes the query.\n */\n $scope.preview = () => {\n updateQueryFromEditor($scope.similarityIndexInfo)\n .then(validateQueryType)\n .then(validateQuery)\n .then(() => {\n const ontotextYasgui = getOntotextYasgui();\n $scope.similarityIndexInfo.setSelectedYasguiRenderMode(RenderingMode.YASR);\n ontotextYasgui.query($scope.similarityIndexInfo.getSelectedYasguiRenderMode());\n });\n };\n\n $scope.saveSearchQuery = function() {\n if (!isDirty) {\n $location.url('similarity');\n } else {\n $scope.saveOrUpdateExecuted = true;\n $scope.savingIndex = true;\n updateQueryFromEditor($scope.similarityIndexInfo)\n .then(validateSimilarityIndexName)\n .then(validateQuery)\n .then(validateQueryType)\n .then(validateSearchQuery)\n .then(validateAnalogicalQuery)\n .then(saveQuery)\n .then((isSearchQuery) => {\n // toastr should be triggered before the redirect because the redirect will remove the toast\n return Notifications.showToastMessageWithDelay(isSearchQuery ? 'similarity.changed.search.query.msg' : 'similarity.changed.analogical.query.msg');\n })\n .then(() => {\n $location.url('similarity');\n })\n .catch((error) => {\n if (!(error instanceof SimilarityIndexError)) {\n toastr.error(getError(error), $translate.instant('similarity.change.query.error'));\n }\n })\n .finally(() => {\n $scope.savingIndex = false;\n });\n }\n };\n\n /**\n * Sets the <code>query</code> to the sparql editor.\n *\n * @param {string} query - a sparql query.\n */\n $scope.setEditorQuery = (query) => {\n $scope.similarityIndexInfo.markInvalidQuery(undefined, false);\n $scope.similarityIndexInfo.markInvalidQueryType(undefined, false);\n if ($scope.yasguiConfig) {\n getOntotextYasgui().setQuery(query);\n } else {\n updateYasguiComponent({initialQuery: query || ' '});\n }\n };\n\n $scope.similarityIndexNameChanged = () => {\n $scope.setDirty();\n $scope.similarityIndexInfo.isNameExist = false;\n };\n\n $scope.queryChanged = () => {\n $scope.setDirty();\n $scope.similarityIndexInfo.markInvalidQuery(undefined, false);\n $scope.similarityIndexInfo.markInvalidQueryType(undefined, false);\n };\n\n $scope.isCloneViewMode = () => {\n return SimilarityViewMode.CLONE === viewMode;\n };\n\n $scope.isEditViewMode = () => {\n return SimilarityViewMode.EDIT === viewMode;\n };\n\n $scope.isCreateViewMode = () => {\n return SimilarityViewMode.CREATE === viewMode;\n };\n\n $scope.setDirty = () => {\n isDirty = true;\n };\n\n $scope.isYasqeShown = () => {\n return $scope.similarityIndexInfo && $scope.similarityIndexInfo.isYasqeRenderMode();\n };\n\n $scope.isYasrShown = () => {\n return $scope.similarityIndexInfo && $scope.similarityIndexInfo.isYasrRenderMode();\n };\n\n $scope.showEditor = () => {\n const ontotextYasgui = getOntotextYasgui();\n ontotextYasgui.abortQuery().then(() => {\n return ontotextYasgui.setQuery($scope.similarityIndexInfo.getQuery());\n }).then(() => {\n $scope.similarityIndexInfo.setSelectedYasguiRenderMode(RenderingMode.YASQE);\n return ontotextYasgui.changeRenderMode($scope.similarityIndexInfo.getSelectedYasguiRenderMode());\n });\n };\n\n $scope.toggleHelp = (value) => {\n if (value === undefined) {\n value = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP);\n }\n if (value !== 1) {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 1);\n $scope.helpHidden = true;\n } else {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 0);\n $scope.helpHidden = false;\n }\n };\n\n $scope.getCloseBtnMsg = function() {\n const operationType = $scope.editSearchQuery ? $translate.instant('similarity.query.edition.msg') : $translate.instant('similarity.index.creation.msg');\n return $translate.instant('similarity.close.btn.msg', {operation: operationType});\n };\n\n $scope.hasQueryError = () => {\n const similarityQueryType = $scope.similarityIndexInfo.getSelectedQueryType();\n\n if (SimilarityQueryType.DATA === similarityQueryType) {\n return $scope.hasSelectQueryError();\n }\n\n if (SimilarityQueryType.SEARCH === similarityQueryType) {\n return $scope.hasSearchQueryError();\n }\n\n if (SimilarityQueryType.ANALOGICAL === similarityQueryType) {\n return $scope.hasAnalogicalQueryError();\n }\n\n return false;\n };\n\n $scope.hasSelectQueryError = () => {\n return !$scope.similarityIndexInfo.hasSelectQuery() ||\n $scope.similarityIndexInfo.invalidSelectQuery ||\n $scope.similarityIndexInfo.invalidSelectQueryType;\n };\n\n $scope.hasSearchQueryError = () => {\n return !$scope.similarityIndexInfo.hasSearchQuery() ||\n $scope.similarityIndexInfo.invalidSearchQuery ||\n $scope.similarityIndexInfo.invalidSearchQueryType;\n };\n\n $scope.hasAnalogicalQueryError = () => {\n return !$scope.similarityIndexInfo.hasAnalogicalQuery() ||\n $scope.similarityIndexInfo.invalidAnalogicalQuery ||\n $scope.similarityIndexInfo.invalidAnalogicalQueryType;\n };\n\n $scope.getQueryErrorMessage = () => {\n const similarityQueryType = $scope.similarityIndexInfo.getSelectedQueryType();\n let isEmpty = false;\n let invalidQueryType = false;\n let invalidQuery = false;\n\n if (SimilarityQueryType.DATA === similarityQueryType) {\n isEmpty = !$scope.similarityIndexInfo.hasSelectQuery();\n invalidQueryType = $scope.similarityIndexInfo.invalidSelectQueryType;\n invalidQuery = $scope.similarityIndexInfo.invalidSelectQuery;\n } else if (SimilarityQueryType.SEARCH === similarityQueryType) {\n isEmpty = !$scope.similarityIndexInfo.hasSearchQuery();\n invalidQueryType = $scope.similarityIndexInfo.invalidSearchQueryType;\n invalidQuery = $scope.similarityIndexInfo.invalidSearchQuery;\n } else if (SimilarityQueryType.ANALOGICAL === similarityQueryType) {\n isEmpty = !$scope.similarityIndexInfo.hasAnalogicalQuery();\n invalidQueryType = $scope.similarityIndexInfo.invalidAnalogicalQueryType;\n invalidQuery = $scope.similarityIndexInfo.invalidAnalogicalQuery;\n }\n\n const labelParams = {queryType: $translate.instant(`similarity.query.type.${similarityQueryType}.name`)};\n if (isEmpty) {\n return $translate.instant('similarity.error.query.empty', labelParams);\n } else if (invalidQuery) {\n return $translate.instant('similarity.error.query.invalid', labelParams);\n } else if (invalidQueryType) {\n return $translate.instant('similarity.error.query.invalid_type', labelParams);\n }\n\n return '';\n };\n // =========================\n // Private functions\n // =========================\n /**\n * Initializes all view components.\n */\n const init = () => {\n getSimilarityIndex()\n .then((similarityIndexInfo) => {\n $scope.similarityIndexInfo = similarityIndexInfo;\n let initialQueryTab = SimilarityQueryType.DATA;\n if ($scope.isEditViewMode()) {\n initialQueryTab = SimilarityQueryType.SEARCH;\n }\n $scope.changeSimilarityIndexType(similarityIndexInfo.getType(), initialQueryTab);\n });\n };\n\n /**\n * Validates the editor query and updates error statuses of <code>SimilarityIndexInfo</code>. Updates <code>SimilarityIndexInfo</code> query with editor one.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @param {string} similarityQueryType - the type of similarity query that have to be shown. If parameter is undefined then currently selected query type will be used.\n * The value have to be one of {@link SimilarityQueryType}.\n * @return {Promise<SimilarityIndexInfo>}\n */\n const updateQueryFromEditor = (similarityIndexInfo, similarityQueryType = undefined) => {\n return getOntotextYasgui().getQuery()\n .then((query) => similarityIndexInfo.setQuery(query, similarityQueryType))\n .then(() => similarityIndexInfo);\n };\n\n /**\n * Fetches the sparql query of currently chosen query type from the backed server.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<string>} the sparql query of currently chosen query type.\n */\n const fetchSparqlQuery = (similarityIndexInfo) => {\n return SimilarityRestService.getQuery({\n indexName: similarityIndexInfo.getName(),\n indexOptions: similarityIndexInfo.getOptions(),\n query: similarityIndexInfo.getQuery(),\n indexStopList: similarityIndexInfo.getStopList(),\n queryInference: similarityIndexInfo.getInference(),\n querySameAs: similarityIndexInfo.getSameAs(),\n viewType: similarityIndexInfo.getSelectedQueryType(),\n indexAnalyzer: similarityIndexInfo.getAnalyzer(),\n }).then((response) => response.data);\n };\n\n /**\n * Shows a modal dialog that displays the <code>query</code>.\n *\n * @param {string} query which will be displayed.\n */\n const showSparqlQuery = (query) => {\n if (query) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function() {\n return query;\n },\n },\n });\n }\n };\n\n const setDefaultQueries = (similarityIndexInfo) => {\n const similarityIndexType = similarityIndexInfo.getType();\n if (!$scope.isEditViewMode() && searchQueries) {\n similarityIndexInfo.setQuery(searchQueries[similarityIndexType], SimilarityQueryType.SEARCH);\n similarityIndexInfo.setQuery(searchQueries['analogical'], SimilarityQueryType.ANALOGICAL);\n }\n\n if (allSamples) {\n if (SimilarityIndexType.PREDICATION === similarityIndexType) {\n const allSampleElement = allSamples[SimilarityIndexType.PREDICATION]['predication'];\n similarityIndexInfo.setQuery(allSampleElement, SimilarityQueryType.DATA);\n } else {\n const allSampleElement1 = allSamples[SimilarityIndexType.TEXT]['literals'];\n similarityIndexInfo.setQuery(allSampleElement1, SimilarityQueryType.DATA);\n }\n }\n };\n\n /**\n * Initializes the similarity index info object with default values if view is opened for create or populates values from url if\n * view is opened for edit.\n *\n * @return {Promise<SimilarityIndexInfo>}\n */\n const getSimilarityIndex = () => {\n const similarityIndexInfo = new SimilarityIndexInfo();\n similarityIndexInfo.setName(getSimilarityIndexName());\n similarityIndexInfo.setType(getSimilarityType());\n similarityIndexInfo.setSelectedQueryType($scope.isEditViewMode() ? SimilarityQueryType.SEARCH : SimilarityQueryType.DATA);\n const options = $location.search().options;\n if (options) {\n similarityIndexInfo.setOptions(options);\n } else {\n similarityIndexInfo.setOptions(similarityIndexInfo.isTextType() ? textDefaultOptions : predDefaultOptions);\n }\n\n setDefaultQueries(similarityIndexInfo);\n const searchQuery = $location.search().searchQuery;\n if (searchQuery) {\n similarityIndexInfo.setQuery(searchQuery, SimilarityQueryType.SEARCH);\n }\n\n\n const selectQuery = $location.search().selectQuery;\n if (selectQuery) {\n similarityIndexInfo.setQuery(selectQuery, SimilarityQueryType.DATA);\n }\n\n const analogicalQuery = $location.search().analogicalQuery;\n if (analogicalQuery) {\n similarityIndexInfo.setQuery(analogicalQuery, SimilarityQueryType.ANALOGICAL);\n }\n\n if (similarityIndexInfo.isTextType()) {\n similarityIndexInfo.setStopList($location.search().stopList);\n similarityIndexInfo.setAnalyzer($location.search().analyzer);\n const isLiteralIndex = getAndRemoveOption(similarityIndexInfo.getSimilarityIndex(), '-literal_index');\n if (isLiteralIndex !== undefined) {\n similarityIndexInfo.setLiteralIndex(isLiteralIndex);\n }\n }\n\n if (similarityIndexInfo.isPredicationType()) {\n return SimilarityRestService.getIndexes()\n .then((response) => {\n const indexesNotInProgress = mapIndexesResponseToSimilarityIndex(response.data)\n .filter((similarityIndex) => similarityIndex.isTextLiteralType() && (similarityIndex.isBuiltStatus() || similarityIndex.isOutdatedStatus()))\n .map((similarityIndex) => similarityIndex.name);\n\n $scope.literalIndexes = ['no-index'].concat(indexesNotInProgress);\n\n if (similarityIndexInfo.getInputIndex() === undefined) {\n const desiredIdx = getAndRemoveOption(similarityIndexInfo.getSimilarityIndex(), '-input_index');\n if (desiredIdx !== undefined) {\n for (let j = 0; j < $scope.literalIndexes.length; j++) {\n if (desiredIdx === $scope.literalIndexes[j]) {\n similarityIndexInfo.setInputIndex($scope.literalIndexes[j]);\n }\n }\n }\n }\n if (similarityIndexInfo.getInputIndex() === undefined) {\n similarityIndexInfo.setInputIndex($scope.literalIndexes[0]);\n }\n return similarityIndexInfo;\n })\n .catch(function(error) {\n const msg = getError(error);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n }\n\n return Promise.resolve(similarityIndexInfo);\n };\n\n const updateYasguiComponent = (config) => {\n const defaultConfig = {\n endpoint: getQueryEndpoint,\n componentId: 'create-index',\n showEditorTabs: false,\n showToolbar: false,\n showResultTabs: false,\n showYasqeActionButtons: false,\n showQueryButton: false,\n downloadAsOn: false,\n showResultInfo: false,\n showYasqeResizer: false,\n pageSize: 100,\n prefixes: usedPrefixes,\n render: $scope.similarityIndexInfo.getSelectedYasguiRenderMode(),\n yasqeActionButtons: $scope.isEditViewMode() || !$scope.similarityIndexInfo.isDataQueryTypeSelected() ? DISABLE_YASQE_BUTTONS_CONFIGURATION : INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,\n maxPersistentResponseSize: 0,\n yasqeMode: $scope.canWriteActiveRepo() ? YasqeMode.WRITE : YasqeMode.READ,\n };\n\n const yasguiConfig = {};\n angular.extend(yasguiConfig, defaultConfig, config);\n $scope.yasguiConfig = yasguiConfig;\n };\n\n const getQueryEndpoint = () => {\n return `repositories/${$repositories.getActiveRepository()}`;\n };\n\n /**\n * Call backend server to create a similarity index with data filled in <code>similarityIndexInfo</code>.\n *\n * @param {SimilarityIndex} similarityIndex - objects holds all needed data to create a similarity index.\n * @return {*}\n */\n const createIndex = (similarityIndex) => {\n if ($scope.literalIndexes !== undefined) {\n const inputIndex = similarityIndex.inputIndex;\n if (inputIndex !== $scope.literalIndexes[0]) {\n similarityIndex.options = similarityIndex.options + (similarityIndex.options === '' ? '' : ' ') + '-input_index' + ' ' + inputIndex;\n }\n }\n if (similarityIndex.isLiteralIndex === 'true') {\n similarityIndex.options = similarityIndex.options + (similarityIndex.options === '' ? '' : ' ') + '-literal_index' + ' true';\n similarityIndex.type = SimilarityIndexType.TEXT_LITERAL;\n }\n isDirty = false;\n return SimilarityRestService.createIndex('POST',\n similarityIndex.name,\n similarityIndex.options,\n similarityIndex.selectQuery,\n similarityIndex.searchQuery,\n similarityIndex.isPredicationType() ? similarityIndex.analogicalQuery : '',\n similarityIndex.stopList,\n similarityIndex.infer,\n similarityIndex.sameAs,\n similarityIndex.type,\n similarityIndex.analyzer)\n .then(() => {\n toastr.success($translate.instant('similarity.create.index.successfully'));\n return similarityIndex;\n })\n .catch(function(err) {\n const errorMessage = getError(err);\n toastr.error(errorMessage, $translate.instant('similarity.create.index.error'));\n logger.info(errorMessage);\n return Promise.reject(new SimilarityIndexError('Could not create index.'));\n });\n };\n\n const saveQuery = (similarityIndexInfo) => {\n const isSearchQuery = similarityIndexInfo.isSearchQueryTypeSelected();\n const data = {\n name: similarityIndexInfo.getSimilarityIndex().name,\n changedQuery: similarityIndexInfo.getQuery(),\n isSearchQuery,\n };\n return SimilarityRestService.saveSearchQuery(JSON.stringify(data))\n .then(() => {\n isDirty = false;\n return isSearchQuery;\n });\n };\n\n const goToSimilarityIndexesView = () => {\n $timeout(() =>\n $location.url('similarity')\n , 100);\n };\n\n const getOntotextYasgui = () => {\n return YasguiComponentDirectiveUtil.getOntotextYasguiElement('#query-editor');\n };\n\n /**\n * Fetches similarity index name from url parameters. Adds clone prefix if view mode is in clone mode.\n *\n * @return {string}\n */\n const getSimilarityIndexName = () => {\n const indexNameFromLocation = $location.search().name || '';\n return $scope.isCloneViewMode() ? `${$translate.instant('similarity.copy_of.prefix')}_${indexNameFromLocation}` : indexNameFromLocation;\n };\n\n /**\n * Fetches similarity index type from url parameters if any. Default value is {@see SimilarityIndexType.TEXT}.\n *\n * @return {*|string}\n */\n const getSimilarityType = () => {\n const indexType = $location.search().type;\n if (indexType === undefined || indexType.startsWith('text')) {\n return SimilarityIndexType.TEXT;\n } else {\n return indexType;\n }\n };\n\n // TODO simplify\n const getAndRemoveOption = (similarityIndex, key) => {\n const optArr = similarityIndex.options.split(' ');\n for (let i = 0; i < optArr.length; i++) {\n if (optArr[i] === key && i + 1 < optArr.length) {\n const value = optArr[i + 1];\n\n delete optArr[i];\n delete optArr[i + 1];\n similarityIndex.options = optArr.join(' ');\n\n return value;\n }\n }\n return undefined;\n };\n\n /**\n * Calculates the view mode. The view mode can be any value of {@see SimilarityViewMode}.\n * @return {string}\n */\n const getViewMode = () => {\n if ($location.search().name === undefined) {\n return SimilarityViewMode.CREATE;\n }\n\n const editSearchQuery = $location.search().editSearchQuery;\n if (editSearchQuery === undefined) {\n return SimilarityViewMode.CLONE;\n }\n\n // Cast is needed because when view is opened from another view the type value is boolean but if\n // page is refreshed the value is boolean (\"false\" for example).\n // TODO: Check why this happened.\n if (typeof editSearchQuery === 'string') {\n return editSearchQuery === 'false' ? SimilarityViewMode.CLONE : SimilarityViewMode.EDIT;\n }\n\n return editSearchQuery ? SimilarityViewMode.EDIT : SimilarityViewMode.CLONE;\n };\n\n\n // =========================\n // Validation functions\n // =========================\n /**\n * Validates all similarity index data and updates the error fields of the similarityIndexInfo object according to the validations.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n */\n const validateSimilarityIndex = (similarityIndexInfo) => {\n return Promise.all([validateSimilarityIndexName(similarityIndexInfo)\n .then(validateSelectQuery)\n .then(validateSearchQuery)\n .then(validateAnalogicalQuery)\n .then(validateQueryType)\n .then(validateQuery)])\n .then(() => similarityIndexInfo);\n };\n\n /**\n * Checks if typed similarity index name already exist.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if similarity already exist.\n */\n const validateSimilarityIndexNameExistence = (similarityIndexInfo) => {\n return SimilarityRestService.getIndexes()\n .then((response) => {\n if (response.data.some((index) => index.name === similarityIndexInfo.getName())) {\n similarityIndexInfo.isNameExist = true;\n return Promise.reject(new SimilarityIndexError('Similarity index name exists.'));\n }\n\n return similarityIndexInfo;\n });\n };\n\n /**\n * Check if similarity index name is filed and if is filled if it's value is correct.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if similarity index name is empty, or it's name is not correct.\n */\n const validateSimilarityIndexName = (similarityIndexInfo) => {\n if (!similarityIndexInfo.getSimilarityIndex().name) {\n return Promise.reject(new SimilarityIndexError('Missing similarity name.'));\n }\n if (!similarityIndexInfo.isNameValid()) {\n return Promise.reject(new SimilarityIndexError('Invalid similarity name.'));\n }\n return Promise.resolve(similarityIndexInfo);\n };\n\n /**\n * Validates if similarity index select query exist.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if select query is empty.\n */\n const validateSelectQuery = (similarityIndexInfo) => {\n if (!similarityIndexInfo.hasSelectQuery()) {\n return Promise.reject(new SimilarityIndexError('Missing select query.'));\n } else if (similarityIndexInfo.invalidSelectQuery) {\n return Promise.reject(new SimilarityIndexError('Invalid select query'));\n } else if (similarityIndexInfo.invalidSelectQueryType) {\n return Promise.reject(new SimilarityIndexError('Invalid select query type'));\n }\n return Promise.resolve(similarityIndexInfo);\n };\n\n /**\n * Validates if similarity index search query exist.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if search query is empty.\n */\n const validateSearchQuery = (similarityIndexInfo) => {\n if (!similarityIndexInfo.hasSearchQuery()) {\n return Promise.reject(new SimilarityIndexError('Missing search query.'));\n } else if (similarityIndexInfo.invalidSearchQuery) {\n return Promise.reject(new SimilarityIndexError('Invalid search query'));\n } else if (similarityIndexInfo.invalidSearchQueryType) {\n return Promise.reject(new SimilarityIndexError('Invalid search query type'));\n }\n return Promise.resolve(similarityIndexInfo);\n };\n\n /**\n * Validates if analogical index search query exist.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if analogical query is empty.\n */\n const validateAnalogicalQuery = (similarityIndexInfo) => {\n if (similarityIndexInfo.isPredicationType() && !similarityIndexInfo.hasAnalogicalQuery()) {\n return Promise.reject(new SimilarityIndexError('Missing analogical query.'));\n } else if (similarityIndexInfo.invalidAnalogicalQuery) {\n return Promise.reject(new SimilarityIndexError('Invalid analogical query'));\n } else if (similarityIndexInfo.invalidAnalogicalQueryType) {\n return Promise.reject(new SimilarityIndexError('Invalid analogical query type'));\n }\n return Promise.resolve(similarityIndexInfo);\n };\n\n /**\n * Checks if query mode is valid. The mode have to be \"SELECT\".\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if query type is not ot type \"SELECT\".\n */\n const validateQueryType = (similarityIndexInfo, similarityQueryType = undefined) => {\n return getOntotextYasgui().getQueryType()\n .then((queryType) => {\n if (QueryType.SELECT !== queryType) {\n similarityIndexInfo.markInvalidQueryType(similarityQueryType);\n return Promise.reject(new SimilarityIndexError('Query type is not valid.'));\n } else {\n similarityIndexInfo.markInvalidQueryType(similarityQueryType, false);\n }\n return similarityIndexInfo;\n });\n };\n\n /**\n * Checks if query is valid.\n *\n * @param {SimilarityIndexInfo} similarityIndexInfo - holds similarity index data (queries, sameAs, infer ...) and information about errors if any.\n * @return {Promise<SimilarityIndexInfo>}\n * @throws {SimilarityIndexError} if query is not valid.\n */\n const validateQuery = (similarityIndexInfo, similarityQueryType = undefined) => {\n return getOntotextYasgui().isQueryValid()\n .then((valid) => {\n if (!valid) {\n similarityIndexInfo.markInvalidQuery(similarityQueryType);\n return Promise.reject(new SimilarityIndexError('Query is not valid.'));\n } else {\n similarityIndexInfo.markInvalidQuery(similarityQueryType, false);\n }\n return similarityIndexInfo;\n });\n };\n\n const openConfirmDialog = (title, message, onConfirm, onCancel) => {\n ModalService.openSimpleModal({\n title,\n message,\n warning: true,\n }).result.then(function() {\n if (angular.isFunction(onConfirm)) {\n onConfirm();\n }\n }, function() {\n if (angular.isFunction(onCancel)) {\n onCancel();\n }\n });\n };\n\n // =========================\n // Subscriptions handlers\n // =========================\n const repositoryWillChangeHandler = () => {\n return new Promise(function(resolve) {\n if ($scope.isCreateViewMode() || $scope.isCloneViewMode()) {\n resolve(true);\n return;\n }\n\n const onConfirm = () => {\n isDirty = false;\n resolve(true);\n };\n\n if (isDirty) {\n const onCancel = () => {\n resolve(false);\n };\n const title = $translate.instant('common.confirm');\n const message = $translate.instant('similarity.warning.unsaved.changes');\n openConfirmDialog(title, message, onConfirm, onCancel);\n } else {\n onConfirm();\n }\n });\n };\n\n const repositoryChangedHandler = (repository) => {\n if (!repository) {\n return;\n }\n if (initialRepoChangeTrigger) {\n initialRepoChangeTrigger = false;\n } else {\n goToSimilarityIndexesView();\n }\n };\n\n const activeRepositoryHandler = () => {\n // when repository is changed we have to switch yasgui back to editor mode\n if ($scope.isYasrShown() && $scope.similarityIndexInfo.isDataQueryTypeSelected()) {\n $scope.showEditor();\n }\n $scope.canEditActiveRepo = $scope.canWriteActiveRepo();\n const config = {...$scope.yasguiConfig, yasqeMode: $scope.canWriteActiveRepo()};\n updateYasguiComponent(config);\n };\n\n const locationChangedHandler = (event, newPath) => {\n if (isDirty) {\n event.preventDefault();\n const title = $translate.instant('common.confirm');\n const message = $translate.instant('similarity.warning.unsaved.changes');\n const onConfirm = () => {\n removeAllListeners();\n const baseLen = $location.absUrl().length - $location.url().length;\n const path = newPath.substring(baseLen);\n $location.path(path);\n };\n openConfirmDialog(title, message, onConfirm);\n } else {\n removeAllListeners();\n }\n };\n\n const beforeunloadHandler = (event) => {\n if (isDirty) {\n event.returnValue = true;\n }\n };\n\n const removeAllListeners = () => {\n window.removeEventListener('beforeunload', beforeunloadHandler);\n subscriptions.forEach((subscription) => subscription());\n };\n\n // =========================\n // Subscriptions\n // =========================\n const subscriptions = [];\n\n const repositoryContextService = ServiceProvider.get(RepositoryContextService);\n const repositoryChangeSubscription = repositoryContextService.onSelectedRepositoryChanged(repositoryChangedHandler, repositoryWillChangeHandler);\n\n subscriptions.push(repositoryChangeSubscription);\n subscriptions.push($scope.$on('$locationChangeStart', locationChangedHandler));\n subscriptions.push($scope.$on('$destroy', removeAllListeners));\n // Prevent go out of the current page? check\n window.addEventListener('beforeunload', beforeunloadHandler);\n\n viewMode = getViewMode();\n\n // Wait until the active repository object is set, otherwise \"canWriteActiveRepo()\" may return a wrong result and the \"ontotext-yasgui\"\n // readOnly configuration may be incorrect.\n const repoIsInitialized = $scope.$watch(function() {\n return $scope.getActiveRepositoryObject();\n }, function(activeRepo) {\n if (activeRepo) {\n $scope.loadingControllerResources = true;\n Promise.all([SimilarityRestService.getSearchQueries(), SimilarityRestService.getSamples(), $repositories.getPrefixes(activeRepo.id)])\n .then(([searchQueriesResponses, samplesResponse, usedPrefixesResponse]) => {\n $scope.canEditActiveRepo = $scope.canWriteActiveRepo();\n searchQueries = searchQueriesResponses ? searchQueriesResponses.data : [];\n allSamples = samplesResponse ? samplesResponse.data : [];\n usedPrefixes = usedPrefixesResponse;\n init();\n }).catch((error) => {\n logger.info(error);\n $scope.repositoryError = getError(error);\n }).finally(() => {\n subscriptions.push($scope.$on('repositoryIsSet', activeRepositoryHandler));\n repoIsInitialized();\n $scope.loadingControllerResources = false;\n });\n }\n });\n}\n","export const SimilarityIndexStatus = {\n 'CREATING': 'CREATING',\n 'BUILDING': 'BUILDING',\n 'BUILT': 'BUILT',\n 'REBUILDING': 'REBUILDING',\n 'OUTDATED': 'OUTDATED',\n 'INTERRUPTED': 'INTERRUPTED',\n 'OBSOLETE': 'OBSOLETE',\n 'FAILED': 'FAILED',\n\n 'isCreatingStatus': (status) => {\n return SimilarityIndexStatus.CREATING === status;\n },\n\n 'isBuildingStatus': (status) => {\n return SimilarityIndexStatus.BUILDING === status;\n },\n\n 'isBuiltStatus': (status) => {\n return SimilarityIndexStatus.BUILT === status;\n },\n\n 'isRebuildingStatus': (status) => {\n return SimilarityIndexStatus.REBUILDING === status;\n },\n\n 'isOutdatedStatus': (status) => {\n return SimilarityIndexStatus.OUTDATED === status;\n },\n\n 'isInterruptedStatus': (status) => {\n return SimilarityIndexStatus.INTERRUPTED === status;\n },\n\n 'isObsoleteStatus': (status) => {\n return SimilarityIndexStatus.OBSOLETE === status;\n },\n\n 'isFailedStatus': (status) => {\n return SimilarityIndexStatus.FAILED === status;\n }\n};\n","import {SimilarityIndexType} from \"./similarity-index-type\";\nimport {SimilarityIndexStatus} from \"./similarity-index-status\";\n\nexport class SimilarityIndex {\n constructor() {\n this.analyzer = '';\n this.infer = true;\n this.options = '';\n this.sameAs = true;\n this.searchQuery = '';\n this.selectQuery = '';\n this.stopList = undefined;\n this.name = '';\n\n /**\n * The similarity index type.\n *\n * @type {string}\n */\n this.type = SimilarityIndexType.TEXT;\n\n /**\n * The similarity index type.\n *\n * @type {SimilarityIndexStatus}\n */\n this.status = undefined;\n\n this.analogicalQuery = undefined;\n this.inputIndex = undefined;\n this.isLiteralIndex = '';\n }\n\n isTextType() {\n return SimilarityIndexType.isTextType(this.type);\n }\n\n isTextLiteralType() {\n return SimilarityIndexType.isTextLiteralType(this.type);\n }\n\n isPredicationType() {\n return SimilarityIndexType.isPredicationType(this.type);\n }\n\n isCreatingStatus() {\n return SimilarityIndexStatus.isCreatingStatus(this.status);\n }\n\n isBuildingStatus() {\n return SimilarityIndexStatus.isBuildingStatus(this.status);\n }\n\n isBuiltStatus() {\n return SimilarityIndexStatus.isBuiltStatus(this.status);\n }\n\n isRebuildingStatus() {\n return SimilarityIndexStatus.isRebuildingStatus(this.status);\n }\n\n isOutdatedStatus() {\n return SimilarityIndexStatus.isOutdatedStatus(this.status);\n }\n\n isInterruptedStatus() {\n return SimilarityIndexStatus.isInterruptedStatus(this.status);\n }\n\n isObsoleteStatus() {\n return SimilarityIndexStatus.isObsoleteStatus(this.status);\n }\n\n isFailedStatus() {\n return SimilarityIndexStatus.isFailedStatus(this.status);\n }\n}\n","export const RenderingMode = {\n YASGUI: 'mode-yasgui',\n YASQE: 'mode-yasqe',\n YASR: 'mode-yasr'\n};\n","export const SimilarityViewMode = {\n 'CREATE': 'CREATE',\n 'EDIT': 'EDIT',\n 'CLONE': 'CLONE'\n};\n","import {SimilarityIndex} from \"../../models/similarity/similarity-index\";\n\n/**\n * Maps the response data to SimilarityIndex objects.\n * @param {*} responseData\n * @return {SimilarityIndex[]}\n */\nexport const mapIndexesResponseToSimilarityIndex = (responseData) => {\n return responseData.map((index) => {\n const similarityIndex = new SimilarityIndex();\n similarityIndex.type = index.type;\n similarityIndex.stopList = index.stopList;\n similarityIndex.status = index.status;\n similarityIndex.selectQuery = index.selectQuery;\n similarityIndex.searchQuery = index.searchQuery;\n similarityIndex.sameAs = index.sameAs;\n similarityIndex.options = index.options;\n similarityIndex.name = index.name;\n similarityIndex.infer = index.infer;\n similarityIndex.analyzer = index.analyzer;\n similarityIndex.analogicalQuery = index.analogicalQuery;\n return similarityIndex;\n });\n};\n","export class SimilarityIndexError extends Error {\n\n}\n","import {SimilarityIndex} from \"./similarity-index\";\nimport {SimilarityQueryType} from \"./similarity-query-type\";\nimport {RenderingMode} from \"../ontotext-yasgui/rendering-mode\";\n\nconst filenamePattern = new RegExp('^[a-zA-Z0-9-_]+$');\n\nexport class SimilarityIndexInfo {\n constructor() {\n this.similarityIndex = new SimilarityIndex();\n this.isNameExist = false;\n this.invalidSelectQueryType = false;\n this.invalidSelectQuery = false;\n this.invalidSearchQueryType = false;\n this.invalidSearchQuery = false;\n this.invalidAnalogicalQueryType = false;\n this.invalidAnalogicalQuery = false;\n /**\n * Holds the type of the selected query to be displayed, which determines the active tab.\n *\n * @type {string} - any of {@SimilarityQueryType} values.\n */\n this.selectedQueryType = SimilarityQueryType.DATA;\n this.selectedYasguiRenderMode = RenderingMode.YASQE;\n }\n\n /**\n * Sets the <code>query</code> as query of type <code>similarityQueryType</code>. If <code>similarityQueryType</code> not passed then the\n * currently selected type will be used. {@see SimilarityIndexInfo#selectedQueryType}.\n *\n * @param {string} query - the query to be set.\n * @param {string | undefined} similarityQueryType - the new value of similarity index type. The value have to be one of {@link SimilarityQueryType}.\n */\n setQuery(query, similarityQueryType = undefined) {\n const queryType = similarityQueryType || this.selectedQueryType;\n if (SimilarityQueryType.DATA === queryType) {\n this.similarityIndex.selectQuery = query;\n return;\n }\n\n if (SimilarityQueryType.SEARCH === queryType) {\n this.similarityIndex.searchQuery = query;\n return;\n }\n\n if (SimilarityQueryType.ANALOGICAL === queryType) {\n this.similarityIndex.analogicalQuery = query;\n }\n }\n\n /**\n * Fetches the query depends on <code>similarityQueryType</code>. If <code>similarityQueryType</code> not passed then the\n * currently selected type will be used. {@see SimilarityIndexInfo#selectedQueryType}.\n *\n * @param {string | undefined} similarityQueryType - the type of query that have to be returned. The value have to be one of {@link SimilarityQueryType}.\n * @return {string} the requested query.\n */\n getQuery(similarityQueryType = undefined) {\n const queryType = similarityQueryType || this.selectedQueryType;\n switch (queryType) {\n case SimilarityQueryType.DATA:\n return this.similarityIndex.selectQuery;\n case SimilarityQueryType.SEARCH:\n return this.similarityIndex.searchQuery;\n case SimilarityQueryType.ANALOGICAL:\n return this.similarityIndex.analogicalQuery;\n }\n }\n\n /**\n * Marks a SPARQL query as valid/invalid depends on the <code>isValid</code> value. If <code>similarityQueryType</code> is not passed,\n * then the currently selected type will be used.\n *\n * @param {string} similarityQueryType - the type of SPARQL query, that have to be marked as valid/invalid. The value must be one of {@see SimilarityQueryType} values.\n * @param {boolean} isInvalid - if true the SPARQL query of type <code>similarityQueryType</code> will be marked as invalid, If false will be marked as valid.\n */\n markInvalidQuery(similarityQueryType = undefined, isInvalid = true) {\n const queryType = similarityQueryType || this.selectedQueryType;\n if (SimilarityQueryType.DATA === queryType) {\n this.invalidSelectQuery = isInvalid;\n return;\n }\n\n if (SimilarityQueryType.SEARCH === queryType) {\n this.invalidSearchQuery = isInvalid;\n return;\n }\n if (SimilarityQueryType.ANALOGICAL === queryType) {\n this.invalidAnalogicalQuery = isInvalid;\n }\n }\n\n /**\n * Marks a SPARQL query type as valid/invalid depends on the <code>isValid</code> value. If <code>similarityQueryType</code> is not passed,\n * then the currently selected type will be used.\n *\n * @param {string} similarityQueryType - the type of similarity query, that have to be marked as valid/invalid query type. The value must be one of {@see SimilarityQueryType} values.\n * @param {boolean} isInvalid - if true the SPARQL query of type <code>similarityQueryType</code> will be marked as invalid SPARQL query type, If false will be marked as valid.\n */\n markInvalidQueryType(similarityQueryType = undefined, isInvalid = true) {\n const queryType = similarityQueryType || this.selectedQueryType;\n if (SimilarityQueryType.DATA === queryType) {\n this.invalidSelectQueryType = isInvalid;\n return;\n }\n\n if (SimilarityQueryType.SEARCH === queryType) {\n this.invalidSearchQueryType = isInvalid;\n return;\n }\n if (SimilarityQueryType.ANALOGICAL === queryType) {\n this.invalidAnalogicalQueryType = isInvalid;\n }\n }\n\n setSelectedQueryType(queryType) {\n this.selectedQueryType = queryType;\n }\n\n getSelectedQueryType() {\n return this.selectedQueryType;\n }\n\n setSelectedYasguiRenderMode(renderMode) {\n this.selectedYasguiRenderMode = renderMode;\n }\n\n getSelectedYasguiRenderMode() {\n return this.selectedYasguiRenderMode;\n }\n\n isDataQueryTypeSelected() {\n return SimilarityQueryType.DATA === this.selectedQueryType;\n }\n\n isSearchQueryTypeSelected() {\n return SimilarityQueryType.SEARCH === this.selectedQueryType;\n }\n\n isAnalogicalQueryTypeSelected() {\n return SimilarityQueryType.ANALOGICAL === this.selectedQueryType;\n }\n\n isTextType() {\n return this.similarityIndex.isTextType();\n }\n\n isPredicationType() {\n return this.similarityIndex.isPredicationType();\n }\n\n isTextLiteralType() {\n return this.similarityIndex.isTextLiteralType();\n }\n\n hasName() {\n return !!this.similarityIndex.name;\n }\n\n isNameValid() {\n return filenamePattern.test(this.similarityIndex.name);\n }\n\n hasSelectQuery() {\n return !!this.similarityIndex.selectQuery;\n }\n\n hasSearchQuery() {\n return !!this.similarityIndex.searchQuery;\n }\n\n hasAnalogicalQuery() {\n return !!this.similarityIndex.analogicalQuery;\n }\n\n isYasqeRenderMode() {\n return RenderingMode.YASQE === this.getSelectedYasguiRenderMode();\n }\n\n isYasrRenderMode() {\n return RenderingMode.YASR === this.getSelectedYasguiRenderMode();\n }\n\n ///////////////////////////////////////\n // Similarity index getters and setters\n ///////////////////////////////////////\n\n getName() {\n return this.similarityIndex.name;\n }\n\n setName(name) {\n this.similarityIndex.name = name;\n }\n\n setInputIndex(inputIndex) {\n this.similarityIndex.inputIndex = inputIndex;\n }\n\n getInputIndex() {\n return this.similarityIndex.inputIndex;\n }\n\n setLiteralIndex(literalIndex = false) {\n this.similarityIndex.isLiteralIndex = literalIndex;\n }\n\n getSimilarityIndex() {\n return this.similarityIndex;\n }\n\n setStopList(stopList) {\n this.similarityIndex.stopList = stopList;\n }\n\n getStopList() {\n return this.similarityIndex.stopList;\n }\n\n setAnalyzer(analyzer = 'org.apache.lucene.analysis.en.EnglishAnalyzer') {\n this.similarityIndex.analyzer = analyzer;\n }\n\n getAnalyzer() {\n return this.similarityIndex.analyzer;\n }\n\n setType(type) {\n this.similarityIndex.type = type;\n }\n\n getType() {\n return this.similarityIndex.type;\n }\n\n setOptions(options) {\n this.similarityIndex.options = options;\n }\n\n getOptions() {\n return this.similarityIndex.options;\n }\n\n getInference() {\n return this.similarityIndex.infer;\n }\n\n getSameAs() {\n return this.similarityIndex.sameAs;\n }\n}\n","export const SimilarityIndexType = {\n 'TEXT': 'text',\n 'TEXT_LITERAL': 'textLiteral',\n 'PREDICATION': 'predication',\n\n 'isTextType': (type) => {\n return SimilarityIndexType.TEXT === type;\n },\n\n 'isTextLiteralType': (type) => {\n return SimilarityIndexType.TEXT_LITERAL === type;\n },\n\n 'isPredicationType': (type) => {\n return SimilarityIndexType.PREDICATION === type;\n }\n};\n","angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr', '$translate'];\n\nfunction Notifications(toastr, $translate) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success($translate.instant(message));\n setTimeout(r, 300);\n });\n }\n}\n","export const YasqeMode = {\n /**\n * The query can be edited.\n */\n WRITE: 'WRITE',\n\n /**\n * The editor is read-only, but the query can be copied.\n */\n READ: 'READ',\n\n /**\n * The editor is read-only and the query can't be copied.\n */\n PROTECTED: 'PROTECTED'\n};\n","export const SimilarityQueryType = {\n 'DATA': 'DATA',\n 'SEARCH': 'SEARCH',\n 'ANALOGICAL': 'ANALOGICAL'\n};\n"],"names":["angular","module","controller","CreateSimilarityIdxCtrl","$inject","logger","LoggerProvider","$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService","SimilarityQueryType","SimilarityIndexType","similarityIndexInfo","undefined","samples","yasguiConfig","saveOrUpdateExecuted","loadingControllerResources","helpHidden","get","HIDE_SIMILARITY_HELP","savingIndex","searchQueries","allSamples","usedPrefixes","isDirty","viewMode","SimilarityViewMode","CREATE","initialRepoChangeTrigger","changeSimilarityIndexType","similarityIndexType","similarityQueryType","DATA","setType","isPredicationType","PREDICATION","TEXT","changeQueryTab","then","setDefaultQueries","setEditorQuery","getQuery","oldSimilarityQueryType","getSelectedQueryType","Promise","resolve","setSelectedQueryType","updateQueryFromEditor","validateQuery","validateQueryType","catch","error","SimilarityIndexError","info","finally","ontotextYasgui","getOntotextYasgui","setSelectedYasguiRenderMode","RenderingMode","YASQE","changeRenderMode","getSelectedYasguiRenderMode","isDataQueryTypeSelected","showYasqeActionButton","YasqeButtonName","INFER_STATEMENTS","EXPANDS_RESULTS","hideYasqeActionButton","setQuery","createSimilarityIndex","validateSimilarityIndex","validateSimilarityIndexNameExistence","createIndex","getSimilarityIndex","goToSimilarityIndexesView","getError","instant","viewQuery","fetchSparqlQuery","showSparqlQuery","preview","YASR","query","saveSearchQuery","validateSimilarityIndexName","validateSearchQuery","validateAnalogicalQuery","saveQuery","isSearchQuery","showToastMessageWithDelay","url","markInvalidQuery","markInvalidQueryType","updateYasguiComponent","initialQuery","similarityIndexNameChanged","setDirty","isNameExist","queryChanged","isCloneViewMode","CLONE","isEditViewMode","EDIT","isCreateViewMode","isYasqeShown","isYasqeRenderMode","isYasrShown","isYasrRenderMode","showEditor","abortQuery","toggleHelp","value","set","getCloseBtnMsg","operationType","editSearchQuery","operation","hasQueryError","hasSelectQueryError","SEARCH","hasSearchQueryError","ANALOGICAL","hasAnalogicalQueryError","hasSelectQuery","invalidSelectQuery","invalidSelectQueryType","hasSearchQuery","invalidSearchQuery","invalidSearchQueryType","hasAnalogicalQuery","invalidAnalogicalQuery","invalidAnalogicalQueryType","getQueryErrorMessage","isEmpty","invalidQueryType","invalidQuery","labelParams","queryType","indexName","getName","indexOptions","getOptions","indexStopList","getStopList","queryInference","getInference","querySameAs","getSameAs","viewType","indexAnalyzer","getAnalyzer","response","data","open","templateUrl","getType","allSampleElement","allSampleElement1","config","defaultConfig","endpoint","getQueryEndpoint","componentId","showEditorTabs","showToolbar","showResultTabs","showYasqeActionButtons","showQueryButton","downloadAsOn","showResultInfo","showYasqeResizer","pageSize","prefixes","render","yasqeActionButtons","DISABLE_YASQE_BUTTONS_CONFIGURATION","INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION","maxPersistentResponseSize","yasqeMode","canWriteActiveRepo","YasqeMode","WRITE","READ","extend","getActiveRepository","similarityIndex","literalIndexes","inputIndex","options","isLiteralIndex","type","TEXT_LITERAL","name","selectQuery","searchQuery","analogicalQuery","stopList","infer","sameAs","analyzer","success","err","errorMessage","reject","isSearchQueryTypeSelected","changedQuery","JSON","stringify","YasguiComponentDirectiveUtil","getOntotextYasguiElement","getSimilarityIndexName","indexNameFromLocation","search","getSimilarityType","indexType","startsWith","getAndRemoveOption","key","optArr","split","i","length","join","all","validateSelectQuery","getIndexes","some","index","isNameValid","getQueryType","QueryType","SELECT","isQueryValid","valid","openConfirmDialog","title","message","onConfirm","onCancel","openSimpleModal","warning","result","isFunction","activeRepositoryHandler","canEditActiveRepo","beforeunloadHandler","event","returnValue","removeAllListeners","window","removeEventListener","subscriptions","forEach","subscription","repositoryChangeSubscription","ServiceProvider","RepositoryContextService","onSelectedRepositoryChanged","repository","repositoryWillChangeHandler","push","$on","locationChangedHandler","newPath","preventDefault","baseLen","absUrl","path","substring","addEventListener","getViewMode","repoIsInitialized","$watch","getActiveRepositoryObject","activeRepo","getSearchQueries","getSamples","getPrefixes","id","searchQueriesResponses","samplesResponse","usedPrefixesResponse","SimilarityIndexInfo","setName","setOptions","isTextType","setStopList","setAnalyzer","setLiteralIndex","indexesNotInProgress","mapIndexesResponseToSimilarityIndex","filter","isTextLiteralType","isBuiltStatus","isOutdatedStatus","map","concat","getInputIndex","desiredIdx","j","setInputIndex","msg","initialQueryTab","repositoryError","SimilarityIndexStatus","status","CREATING","BUILDING","BUILT","REBUILDING","OUTDATED","INTERRUPTED","OBSOLETE","FAILED","SimilarityIndex","constructor","this","isCreatingStatus","isBuildingStatus","isRebuildingStatus","isInterruptedStatus","isObsoleteStatus","isFailedStatus","YASGUI","responseData","Error","filenamePattern","RegExp","selectedQueryType","selectedYasguiRenderMode","isInvalid","renderMode","isAnalogicalQueryTypeSelected","hasName","test","literalIndex","r","setTimeout","factory","PROTECTED"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_id__=55862;export const __webpack_ids__=[55862];export const __webpack_modules__={55862:(e,r,n)=>{n.r(r),n.d(r,{default:()=>t});const t='<link href="css/graphql/endpoint-generation-failure-result-modal.css?v=3.2.0-TR1" rel="stylesheet"/> <div class="modal-header"> <button type="button" class="close" ng-click="close()"></button> <h3 class="modal-title"> {{\'graphql.endpoints_management.generation_failure_report_modal.title\' | translate}}</h3> </div> <div class="modal-body endpoint-generation-failure-result-modal-body"> <div ng-if="endpointReport.errors > 0" class="alert alert-danger"> {{\'graphql.endpoints_management.generation_failure_report_modal.failing_reason_message\' | translate}} </div> <div ng-if="endpointReport.warnings > 0 && endpointReport.errors === 0" class="alert alert-info"> {{\'graphql.endpoints_management.generation_failure_report_modal.warning_reason_message\' | translate}} </div> <table class="report table table-bordered" aria-label="Endpoint generation failure report table"> <thead> <tr class="labels-row"> <th scope="col"> <strong class="errors-count mr-2">{{\'graphql.endpoints_management.generation_failure_report_modal.errors\' | translate: {errorCount: endpointReport.errors} }}</strong> <strong class="warnings-count">{{\'graphql.endpoints_management.generation_failure_report_modal.warnings\' | translate: {warningCount: endpointReport.warnings} }}</strong> </th> </tr> </thead> <tbody> <tr ng-repeat="error in endpointReport.messages.errors" class="error-row"> <td> <div class="alert alert-danger">{{error}}</div> </td> </tr> <tr ng-repeat="warning in endpointReport.messages.warnings" class="warning-row"> <td> <div class="alert alert-warning">{{warning}}</div> </td> </tr> </tbody> </table> </div> <div class="modal-footer mt-0"> <button id="download-failure-report" class="btn btn-secondary mr-1" ng-click="downloadReport()"> <i class="fa fa-arrow-down-to-line"></i> <span>{{\'graphql.endpoints_management.generation_failure_report_modal.actions.download_report.label\' | translate}}</span> </button> <button ng-if="endpointReport.errors === 0 && endpointReport.warnings > 0" id="delete-warnings" class="btn btn-primary" ng-click="deleteReport()"> <span>{{\'graphql.endpoints_management.generation_failure_report_modal.actions.delete_report.label\' | translate}}</span> </button> </div> '}};
2
- //# sourceMappingURL=55862.1fb5abd075ba11a7e93c.bundle.js.map
1
+ export const __webpack_id__=55862;export const __webpack_ids__=[55862];export const __webpack_modules__={55862:(e,r,n)=>{n.r(r),n.d(r,{default:()=>t});const t='<link href="css/graphql/endpoint-generation-failure-result-modal.css?v=3.2.0-TR2" rel="stylesheet"/> <div class="modal-header"> <button type="button" class="close" ng-click="close()"></button> <h3 class="modal-title"> {{\'graphql.endpoints_management.generation_failure_report_modal.title\' | translate}}</h3> </div> <div class="modal-body endpoint-generation-failure-result-modal-body"> <div ng-if="endpointReport.errors > 0" class="alert alert-danger"> {{\'graphql.endpoints_management.generation_failure_report_modal.failing_reason_message\' | translate}} </div> <div ng-if="endpointReport.warnings > 0 && endpointReport.errors === 0" class="alert alert-info"> {{\'graphql.endpoints_management.generation_failure_report_modal.warning_reason_message\' | translate}} </div> <table class="report table table-bordered" aria-label="Endpoint generation failure report table"> <thead> <tr class="labels-row"> <th scope="col"> <strong class="errors-count mr-2">{{\'graphql.endpoints_management.generation_failure_report_modal.errors\' | translate: {errorCount: endpointReport.errors} }}</strong> <strong class="warnings-count">{{\'graphql.endpoints_management.generation_failure_report_modal.warnings\' | translate: {warningCount: endpointReport.warnings} }}</strong> </th> </tr> </thead> <tbody> <tr ng-repeat="error in endpointReport.messages.errors" class="error-row"> <td> <div class="alert alert-danger">{{error}}</div> </td> </tr> <tr ng-repeat="warning in endpointReport.messages.warnings" class="warning-row"> <td> <div class="alert alert-warning">{{warning}}</div> </td> </tr> </tbody> </table> </div> <div class="modal-footer mt-0"> <button id="download-failure-report" class="btn btn-secondary mr-1" ng-click="downloadReport()"> <i class="fa fa-arrow-down-to-line"></i> <span>{{\'graphql.endpoints_management.generation_failure_report_modal.actions.download_report.label\' | translate}}</span> </button> <button ng-if="endpointReport.errors === 0 && endpointReport.warnings > 0" id="delete-warnings" class="btn btn-primary" ng-click="deleteReport()"> <span>{{\'graphql.endpoints_management.generation_failure_report_modal.actions.delete_report.label\' | translate}}</span> </button> </div> '}};
2
+ //# sourceMappingURL=55862.5e8602827fbf72e60cc2.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"55862.1fb5abd075ba11a7e93c.bundle.js","mappings":"uJAGA,QAFW,spE","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/graphql/endpoint-generation-failure-result-modal.css?v=3.2.0-TR1\" rel=\"stylesheet\"/> <div class=\"modal-header\"> <button type=\"button\" class=\"close\" ng-click=\"close()\"></button> <h3 class=\"modal-title\"> {{'graphql.endpoints_management.generation_failure_report_modal.title' | translate}}</h3> </div> <div class=\"modal-body endpoint-generation-failure-result-modal-body\"> <div ng-if=\"endpointReport.errors > 0\" class=\"alert alert-danger\"> {{'graphql.endpoints_management.generation_failure_report_modal.failing_reason_message' | translate}} </div> <div ng-if=\"endpointReport.warnings > 0 && endpointReport.errors === 0\" class=\"alert alert-info\"> {{'graphql.endpoints_management.generation_failure_report_modal.warning_reason_message' | translate}} </div> <table class=\"report table table-bordered\" aria-label=\"Endpoint generation failure report table\"> <thead> <tr class=\"labels-row\"> <th scope=\"col\"> <strong class=\"errors-count mr-2\">{{'graphql.endpoints_management.generation_failure_report_modal.errors' | translate: {errorCount: endpointReport.errors} }}</strong> <strong class=\"warnings-count\">{{'graphql.endpoints_management.generation_failure_report_modal.warnings' | translate: {warningCount: endpointReport.warnings} }}</strong> </th> </tr> </thead> <tbody> <tr ng-repeat=\"error in endpointReport.messages.errors\" class=\"error-row\"> <td> <div class=\"alert alert-danger\">{{error}}</div> </td> </tr> <tr ng-repeat=\"warning in endpointReport.messages.warnings\" class=\"warning-row\"> <td> <div class=\"alert alert-warning\">{{warning}}</div> </td> </tr> </tbody> </table> </div> <div class=\"modal-footer mt-0\"> <button id=\"download-failure-report\" class=\"btn btn-secondary mr-1\" ng-click=\"downloadReport()\"> <i class=\"fa fa-arrow-down-to-line\"></i> <span>{{'graphql.endpoints_management.generation_failure_report_modal.actions.download_report.label' | translate}}</span> </button> <button ng-if=\"endpointReport.errors === 0 && endpointReport.warnings > 0\" id=\"delete-warnings\" class=\"btn btn-primary\" ng-click=\"deleteReport()\"> <span>{{'graphql.endpoints_management.generation_failure_report_modal.actions.delete_report.label' | translate}}</span> </button> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"55862.5e8602827fbf72e60cc2.bundle.js","mappings":"uJAGA,QAFW,spE","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/graphql/endpoint-generation-failure-result-modal.css?v=3.2.0-TR2\" rel=\"stylesheet\"/> <div class=\"modal-header\"> <button type=\"button\" class=\"close\" ng-click=\"close()\"></button> <h3 class=\"modal-title\"> {{'graphql.endpoints_management.generation_failure_report_modal.title' | translate}}</h3> </div> <div class=\"modal-body endpoint-generation-failure-result-modal-body\"> <div ng-if=\"endpointReport.errors > 0\" class=\"alert alert-danger\"> {{'graphql.endpoints_management.generation_failure_report_modal.failing_reason_message' | translate}} </div> <div ng-if=\"endpointReport.warnings > 0 && endpointReport.errors === 0\" class=\"alert alert-info\"> {{'graphql.endpoints_management.generation_failure_report_modal.warning_reason_message' | translate}} </div> <table class=\"report table table-bordered\" aria-label=\"Endpoint generation failure report table\"> <thead> <tr class=\"labels-row\"> <th scope=\"col\"> <strong class=\"errors-count mr-2\">{{'graphql.endpoints_management.generation_failure_report_modal.errors' | translate: {errorCount: endpointReport.errors} }}</strong> <strong class=\"warnings-count\">{{'graphql.endpoints_management.generation_failure_report_modal.warnings' | translate: {warningCount: endpointReport.warnings} }}</strong> </th> </tr> </thead> <tbody> <tr ng-repeat=\"error in endpointReport.messages.errors\" class=\"error-row\"> <td> <div class=\"alert alert-danger\">{{error}}</div> </td> </tr> <tr ng-repeat=\"warning in endpointReport.messages.warnings\" class=\"warning-row\"> <td> <div class=\"alert alert-warning\">{{warning}}</div> </td> </tr> </tbody> </table> </div> <div class=\"modal-footer mt-0\"> <button id=\"download-failure-report\" class=\"btn btn-secondary mr-1\" ng-click=\"downloadReport()\"> <i class=\"fa fa-arrow-down-to-line\"></i> <span>{{'graphql.endpoints_management.generation_failure_report_modal.actions.download_report.label' | translate}}</span> </button> <button ng-if=\"endpointReport.errors === 0 && endpointReport.warnings > 0\" id=\"delete-warnings\" class=\"btn btn-primary\" ng-click=\"deleteReport()\"> <span>{{'graphql.endpoints_management.generation_failure_report_modal.actions.delete_report.label' | translate}}</span> </button> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_id__=58306;export const __webpack_ids__=[58306];export const __webpack_modules__={58306:(t,e,s)=>{s.r(e),s.d(e,{default:()=>n});const n='<link href="css/ttyg/ttyg.css?v=3.2.0-TR1" rel="stylesheet"/> <div class="ttyg-view" ng-class="{\'help-visible\': isHelpVisible}"> <h1 id="ttyg-view-title"> {{ title }} <page-info-tooltip></page-info-tooltip> </h1> <div core-errors></div> <div uib-collapse="!isHelpVisible" class="alert alert-info"> <button type="button" ng-click="isHelpVisible = false" gdb-tooltip="{{\'common.close\' | translate}}" class="close" aria-label="Close"></button> <div ng-include="helpTemplateUrl"></div> </div> <div onto-loader-new ng-show="loadingAgents" class="ttyg-page-loader" size="100"> </div> <no-agents-view ng-cloak ng-if="initialized && getActiveRepository() && !loadingAgents && !reloadingAgents && (!agents || agents.isEmpty())"></no-agents-view> <div id="ttyg-container" class="ttyg-container" ng-show="getActiveRepository() && !loadingAgents && agents && !agents.isEmpty()"> <div id="left-sidebar" class="left-sidebar sidebar" ng-class="showChats ? \'expanded\' : \'collapsed\'"> <div class="toolbar"> <button class="btn btn-link btn-sm toggle-chats-sidebar-btn" ng-if="true" ng-click="toggleChatsListSidebar()" ng-disabled="false" gdb-tooltip="{{\'ttyg.chat.btn.\' + (showChats ? \'close_sidebar\' : \'open_sidebar\') + \'.tooltip\' | translate}}"> <i class="fa fa-sidebar"></i> </button> <button class="btn btn-link btn-sm create-chat-btn" guide-selector="create-chat-btn" ng-if="chats && !chats.isEmpty()" ng-click="startNewChat()" ng-disabled="false" gdb-tooltip="{{\'ttyg.chat.btn.create_chat.tooltip\' | translate}}"> <i class="fa fa-pen-to-square"></i> </button> </div> <pageslide ps-class="chat-list-panel slide-panel" ps-container="left-sidebar" ps-open="showChats" onopen="onopen" onclose="onclose" ps-side="left" ps-click-outside="false" ps-size="80vw"> <div class="sidebar-content"> <chat-list ng-if="chats"></chat-list> <div class="chat-list-panel-loader" ng-if="!chats && loadingChats"> <div onto-loader-fancy message="{{\'ttyg.chat.loading_chats\' | translate}}" size="25"></div> </div> </div> </pageslide> </div> <div class="chat-content"> <div class="chat"> <div class="toolbar mb-2"> <agent-select-menu class="mr-1"></agent-select-menu> <button class="btn btn-link btn-sm edit-current-agent-btn mr-1" guide-selector="edit-current-agent" ng-if="selectedAgent" ng-click="onOpenAgentSettings()" ng-disabled="!canModifyAgent" gdb-tooltip="{{ (canModifyAgent ? \'ttyg.agent.btn.edit_agent.tooltip\' : \'ttyg.agent.btn.edit_agent.tooltip_disabled\') | translate}}"> <i class="icon-settings"></i> </button> </div> <div uib-collapse="!isCollapsed" id="ot-help-text" class="alert alert-info"> <button type="button" ng-click="isCollapsed = false" gdb-tooltip="{{\'common.close\' | translate}}" class="close" aria-label="Close"></button> <div ng-include="helpTemplateUrl"></div> </div> <chat-panel class="selected-chat-panel"></chat-panel> </div> </div> <div id="right-sidebar" class="right-sidebar sidebar" ng-class="showAgents ? \'expanded\' : \'collapsed\'"> <div class="toolbar"> <button class="btn btn-link btn-sm help-btn" ng-if="true" ng-click="onToggleHelp()" ng-disabled="false" gdb-tooltip="{{\'ttyg.help.btn.show_help.tooltip\' | translate}}"> <i class="icon-help"></i> </button> <button class="btn btn-link btn-sm create-agent-btn" ng-disabled="!canModifyAgent" ng-click="onOpenNewAgentSettings()" ng-disabled="false" gdb-tooltip="{{ (canModifyAgent ? \'ttyg.agent.btn.create_agent.tooltip\' : \'ttyg.agent.btn.create_agent.tooltip_disabled\') | translate}}" guide-selector="create-agent-btn"> <i class="icon-plus"></i> </button> <button class="btn btn-link btn-sm toggle-agents-sidebar-btn" ng-if="!showAgents" ng-click="toggleAgentsListSidebar()" ng-disabled="!canModifyAgent" gdb-tooltip="{{\'ttyg.agent.btn.open_sidebar.\' + (canModifyAgent ? \'tooltip\' : \'tooltip_disabled\') | translate}}"> <i class="fa fa-message-bot"></i> </button> <button class="btn btn-link btn-sm toggle-agents-sidebar-btn" ng-if="showAgents" ng-click="toggleAgentsListSidebar()" ng-disabled="false" gdb-tooltip="{{\'ttyg.agent.btn.close_sidebar\' + \'.tooltip\' | translate}}"> <i class="icon-close"></i> </button> </div> <pageslide ps-class="agent-list-panel slide-panel" ps-container="right-sidebar" ps-open="showAgents" onopen="onopen" onclose="onclose" ps-side="right" ps-click-outside="false" ps-size="80vw"> <div class="sidebar-content"> <agent-list ng-if="agents && agentListFilterModel.length && !reloadingAgents" agent-list="agents" agent-list-filter-model="agentListFilterModel"></agent-list> <div ng-if="reloadingAgents" onto-loader-fancy message="{{\'ttyg.agent.loading_agents\' | translate}}" class="agent-list-loader" size="25" style="display:flex"></div> </div> </pageslide> </div> </div> </div> '}};
2
- //# sourceMappingURL=58306.ba9545cbaee021ebcbce.bundle.js.map
1
+ export const __webpack_id__=58306;export const __webpack_ids__=[58306];export const __webpack_modules__={58306:(t,e,s)=>{s.r(e),s.d(e,{default:()=>n});const n='<link href="css/ttyg/ttyg.css?v=3.2.0-TR2" rel="stylesheet"/> <div class="ttyg-view" ng-class="{\'help-visible\': isHelpVisible}"> <h1 id="ttyg-view-title"> {{ title }} <page-info-tooltip></page-info-tooltip> </h1> <div core-errors></div> <div uib-collapse="!isHelpVisible" class="alert alert-info"> <button type="button" ng-click="isHelpVisible = false" gdb-tooltip="{{\'common.close\' | translate}}" class="close" aria-label="Close"></button> <div ng-include="helpTemplateUrl"></div> </div> <div onto-loader-new ng-show="loadingAgents" class="ttyg-page-loader" size="100"> </div> <no-agents-view ng-cloak ng-if="initialized && getActiveRepository() && !loadingAgents && !reloadingAgents && (!agents || agents.isEmpty())"></no-agents-view> <div id="ttyg-container" class="ttyg-container" ng-show="getActiveRepository() && !loadingAgents && agents && !agents.isEmpty()"> <div id="left-sidebar" class="left-sidebar sidebar" ng-class="showChats ? \'expanded\' : \'collapsed\'"> <div class="toolbar"> <button class="btn btn-link btn-sm toggle-chats-sidebar-btn" ng-if="true" ng-click="toggleChatsListSidebar()" ng-disabled="false" gdb-tooltip="{{\'ttyg.chat.btn.\' + (showChats ? \'close_sidebar\' : \'open_sidebar\') + \'.tooltip\' | translate}}"> <i class="fa fa-sidebar"></i> </button> <button class="btn btn-link btn-sm create-chat-btn" guide-selector="create-chat-btn" ng-if="chats && !chats.isEmpty()" ng-click="startNewChat()" ng-disabled="false" gdb-tooltip="{{\'ttyg.chat.btn.create_chat.tooltip\' | translate}}"> <i class="fa fa-pen-to-square"></i> </button> </div> <pageslide ps-class="chat-list-panel slide-panel" ps-container="left-sidebar" ps-open="showChats" onopen="onopen" onclose="onclose" ps-side="left" ps-click-outside="false" ps-size="80vw"> <div class="sidebar-content"> <chat-list ng-if="chats"></chat-list> <div class="chat-list-panel-loader" ng-if="!chats && loadingChats"> <div onto-loader-fancy message="{{\'ttyg.chat.loading_chats\' | translate}}" size="25"></div> </div> </div> </pageslide> </div> <div class="chat-content"> <div class="chat"> <div class="toolbar mb-2"> <agent-select-menu class="mr-1"></agent-select-menu> <button class="btn btn-link btn-sm edit-current-agent-btn mr-1" guide-selector="edit-current-agent" ng-if="selectedAgent" ng-click="onOpenAgentSettings()" ng-disabled="!canModifyAgent" gdb-tooltip="{{ (canModifyAgent ? \'ttyg.agent.btn.edit_agent.tooltip\' : \'ttyg.agent.btn.edit_agent.tooltip_disabled\') | translate}}"> <i class="icon-settings"></i> </button> </div> <div uib-collapse="!isCollapsed" id="ot-help-text" class="alert alert-info"> <button type="button" ng-click="isCollapsed = false" gdb-tooltip="{{\'common.close\' | translate}}" class="close" aria-label="Close"></button> <div ng-include="helpTemplateUrl"></div> </div> <chat-panel class="selected-chat-panel"></chat-panel> </div> </div> <div id="right-sidebar" class="right-sidebar sidebar" ng-class="showAgents ? \'expanded\' : \'collapsed\'"> <div class="toolbar"> <button class="btn btn-link btn-sm help-btn" ng-if="true" ng-click="onToggleHelp()" ng-disabled="false" gdb-tooltip="{{\'ttyg.help.btn.show_help.tooltip\' | translate}}"> <i class="icon-help"></i> </button> <button class="btn btn-link btn-sm create-agent-btn" ng-disabled="!canModifyAgent" ng-click="onOpenNewAgentSettings()" ng-disabled="false" gdb-tooltip="{{ (canModifyAgent ? \'ttyg.agent.btn.create_agent.tooltip\' : \'ttyg.agent.btn.create_agent.tooltip_disabled\') | translate}}" guide-selector="create-agent-btn"> <i class="icon-plus"></i> </button> <button class="btn btn-link btn-sm toggle-agents-sidebar-btn" ng-if="!showAgents" ng-click="toggleAgentsListSidebar()" ng-disabled="!canModifyAgent" gdb-tooltip="{{\'ttyg.agent.btn.open_sidebar.\' + (canModifyAgent ? \'tooltip\' : \'tooltip_disabled\') | translate}}"> <i class="fa fa-message-bot"></i> </button> <button class="btn btn-link btn-sm toggle-agents-sidebar-btn" ng-if="showAgents" ng-click="toggleAgentsListSidebar()" ng-disabled="false" gdb-tooltip="{{\'ttyg.agent.btn.close_sidebar\' + \'.tooltip\' | translate}}"> <i class="icon-close"></i> </button> </div> <pageslide ps-class="agent-list-panel slide-panel" ps-container="right-sidebar" ps-open="showAgents" onopen="onopen" onclose="onclose" ps-side="right" ps-click-outside="false" ps-size="80vw"> <div class="sidebar-content"> <agent-list ng-if="agents && agentListFilterModel.length && !reloadingAgents" agent-list="agents" agent-list-filter-model="agentListFilterModel"></agent-list> <div ng-if="reloadingAgents" onto-loader-fancy message="{{\'ttyg.agent.loading_agents\' | translate}}" class="agent-list-loader" size="25" style="display:flex"></div> </div> </pageslide> </div> </div> </div> '}};
2
+ //# sourceMappingURL=58306.94b9336f68d11bdd72f0.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"58306.ba9545cbaee021ebcbce.bundle.js","mappings":"uJAGA,QAFW,smJ","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/templates/ttyg.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/ttyg/ttyg.css?v=3.2.0-TR1\" rel=\"stylesheet\"/> <div class=\"ttyg-view\" ng-class=\"{'help-visible': isHelpVisible}\"> <h1 id=\"ttyg-view-title\"> {{ title }} <page-info-tooltip></page-info-tooltip> </h1> <div core-errors></div> <div uib-collapse=\"!isHelpVisible\" class=\"alert alert-info\"> <button type=\"button\" ng-click=\"isHelpVisible = false\" gdb-tooltip=\"{{'common.close' | translate}}\" class=\"close\" aria-label=\"Close\"></button> <div ng-include=\"helpTemplateUrl\"></div> </div> <div onto-loader-new ng-show=\"loadingAgents\" class=\"ttyg-page-loader\" size=\"100\"> </div> <no-agents-view ng-cloak ng-if=\"initialized && getActiveRepository() && !loadingAgents && !reloadingAgents && (!agents || agents.isEmpty())\"></no-agents-view> <div id=\"ttyg-container\" class=\"ttyg-container\" ng-show=\"getActiveRepository() && !loadingAgents && agents && !agents.isEmpty()\"> <div id=\"left-sidebar\" class=\"left-sidebar sidebar\" ng-class=\"showChats ? 'expanded' : 'collapsed'\"> <div class=\"toolbar\"> <button class=\"btn btn-link btn-sm toggle-chats-sidebar-btn\" ng-if=\"true\" ng-click=\"toggleChatsListSidebar()\" ng-disabled=\"false\" gdb-tooltip=\"{{'ttyg.chat.btn.' + (showChats ? 'close_sidebar' : 'open_sidebar') + '.tooltip' | translate}}\"> <i class=\"fa fa-sidebar\"></i> </button> <button class=\"btn btn-link btn-sm create-chat-btn\" guide-selector=\"create-chat-btn\" ng-if=\"chats && !chats.isEmpty()\" ng-click=\"startNewChat()\" ng-disabled=\"false\" gdb-tooltip=\"{{'ttyg.chat.btn.create_chat.tooltip' | translate}}\"> <i class=\"fa fa-pen-to-square\"></i> </button> </div> <pageslide ps-class=\"chat-list-panel slide-panel\" ps-container=\"left-sidebar\" ps-open=\"showChats\" onopen=\"onopen\" onclose=\"onclose\" ps-side=\"left\" ps-click-outside=\"false\" ps-size=\"80vw\"> <div class=\"sidebar-content\"> <chat-list ng-if=\"chats\"></chat-list> <div class=\"chat-list-panel-loader\" ng-if=\"!chats && loadingChats\"> <div onto-loader-fancy message=\"{{'ttyg.chat.loading_chats' | translate}}\" size=\"25\"></div> </div> </div> </pageslide> </div> <div class=\"chat-content\"> <div class=\"chat\"> <div class=\"toolbar mb-2\"> <agent-select-menu class=\"mr-1\"></agent-select-menu> <button class=\"btn btn-link btn-sm edit-current-agent-btn mr-1\" guide-selector=\"edit-current-agent\" ng-if=\"selectedAgent\" ng-click=\"onOpenAgentSettings()\" ng-disabled=\"!canModifyAgent\" gdb-tooltip=\"{{ (canModifyAgent ? 'ttyg.agent.btn.edit_agent.tooltip' : 'ttyg.agent.btn.edit_agent.tooltip_disabled') | translate}}\"> <i class=\"icon-settings\"></i> </button> </div> <div uib-collapse=\"!isCollapsed\" id=\"ot-help-text\" class=\"alert alert-info\"> <button type=\"button\" ng-click=\"isCollapsed = false\" gdb-tooltip=\"{{'common.close' | translate}}\" class=\"close\" aria-label=\"Close\"></button> <div ng-include=\"helpTemplateUrl\"></div> </div> <chat-panel class=\"selected-chat-panel\"></chat-panel> </div> </div> <div id=\"right-sidebar\" class=\"right-sidebar sidebar\" ng-class=\"showAgents ? 'expanded' : 'collapsed'\"> <div class=\"toolbar\"> <button class=\"btn btn-link btn-sm help-btn\" ng-if=\"true\" ng-click=\"onToggleHelp()\" ng-disabled=\"false\" gdb-tooltip=\"{{'ttyg.help.btn.show_help.tooltip' | translate}}\"> <i class=\"icon-help\"></i> </button> <button class=\"btn btn-link btn-sm create-agent-btn\" ng-disabled=\"!canModifyAgent\" ng-click=\"onOpenNewAgentSettings()\" ng-disabled=\"false\" gdb-tooltip=\"{{ (canModifyAgent ? 'ttyg.agent.btn.create_agent.tooltip' : 'ttyg.agent.btn.create_agent.tooltip_disabled') | translate}}\" guide-selector=\"create-agent-btn\"> <i class=\"icon-plus\"></i> </button> <button class=\"btn btn-link btn-sm toggle-agents-sidebar-btn\" ng-if=\"!showAgents\" ng-click=\"toggleAgentsListSidebar()\" ng-disabled=\"!canModifyAgent\" gdb-tooltip=\"{{'ttyg.agent.btn.open_sidebar.' + (canModifyAgent ? 'tooltip' : 'tooltip_disabled') | translate}}\"> <i class=\"fa fa-message-bot\"></i> </button> <button class=\"btn btn-link btn-sm toggle-agents-sidebar-btn\" ng-if=\"showAgents\" ng-click=\"toggleAgentsListSidebar()\" ng-disabled=\"false\" gdb-tooltip=\"{{'ttyg.agent.btn.close_sidebar' + '.tooltip' | translate}}\"> <i class=\"icon-close\"></i> </button> </div> <pageslide ps-class=\"agent-list-panel slide-panel\" ps-container=\"right-sidebar\" ps-open=\"showAgents\" onopen=\"onopen\" onclose=\"onclose\" ps-side=\"right\" ps-click-outside=\"false\" ps-size=\"80vw\"> <div class=\"sidebar-content\"> <agent-list ng-if=\"agents && agentListFilterModel.length && !reloadingAgents\" agent-list=\"agents\" agent-list-filter-model=\"agentListFilterModel\"></agent-list> <div ng-if=\"reloadingAgents\" onto-loader-fancy message=\"{{'ttyg.agent.loading_agents' | translate}}\" class=\"agent-list-loader\" size=\"25\" style=\"display:flex\"></div> </div> </pageslide> </div> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"58306.94b9336f68d11bdd72f0.bundle.js","mappings":"uJAGA,QAFW,smJ","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/templates/ttyg.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/ttyg/ttyg.css?v=3.2.0-TR2\" rel=\"stylesheet\"/> <div class=\"ttyg-view\" ng-class=\"{'help-visible': isHelpVisible}\"> <h1 id=\"ttyg-view-title\"> {{ title }} <page-info-tooltip></page-info-tooltip> </h1> <div core-errors></div> <div uib-collapse=\"!isHelpVisible\" class=\"alert alert-info\"> <button type=\"button\" ng-click=\"isHelpVisible = false\" gdb-tooltip=\"{{'common.close' | translate}}\" class=\"close\" aria-label=\"Close\"></button> <div ng-include=\"helpTemplateUrl\"></div> </div> <div onto-loader-new ng-show=\"loadingAgents\" class=\"ttyg-page-loader\" size=\"100\"> </div> <no-agents-view ng-cloak ng-if=\"initialized && getActiveRepository() && !loadingAgents && !reloadingAgents && (!agents || agents.isEmpty())\"></no-agents-view> <div id=\"ttyg-container\" class=\"ttyg-container\" ng-show=\"getActiveRepository() && !loadingAgents && agents && !agents.isEmpty()\"> <div id=\"left-sidebar\" class=\"left-sidebar sidebar\" ng-class=\"showChats ? 'expanded' : 'collapsed'\"> <div class=\"toolbar\"> <button class=\"btn btn-link btn-sm toggle-chats-sidebar-btn\" ng-if=\"true\" ng-click=\"toggleChatsListSidebar()\" ng-disabled=\"false\" gdb-tooltip=\"{{'ttyg.chat.btn.' + (showChats ? 'close_sidebar' : 'open_sidebar') + '.tooltip' | translate}}\"> <i class=\"fa fa-sidebar\"></i> </button> <button class=\"btn btn-link btn-sm create-chat-btn\" guide-selector=\"create-chat-btn\" ng-if=\"chats && !chats.isEmpty()\" ng-click=\"startNewChat()\" ng-disabled=\"false\" gdb-tooltip=\"{{'ttyg.chat.btn.create_chat.tooltip' | translate}}\"> <i class=\"fa fa-pen-to-square\"></i> </button> </div> <pageslide ps-class=\"chat-list-panel slide-panel\" ps-container=\"left-sidebar\" ps-open=\"showChats\" onopen=\"onopen\" onclose=\"onclose\" ps-side=\"left\" ps-click-outside=\"false\" ps-size=\"80vw\"> <div class=\"sidebar-content\"> <chat-list ng-if=\"chats\"></chat-list> <div class=\"chat-list-panel-loader\" ng-if=\"!chats && loadingChats\"> <div onto-loader-fancy message=\"{{'ttyg.chat.loading_chats' | translate}}\" size=\"25\"></div> </div> </div> </pageslide> </div> <div class=\"chat-content\"> <div class=\"chat\"> <div class=\"toolbar mb-2\"> <agent-select-menu class=\"mr-1\"></agent-select-menu> <button class=\"btn btn-link btn-sm edit-current-agent-btn mr-1\" guide-selector=\"edit-current-agent\" ng-if=\"selectedAgent\" ng-click=\"onOpenAgentSettings()\" ng-disabled=\"!canModifyAgent\" gdb-tooltip=\"{{ (canModifyAgent ? 'ttyg.agent.btn.edit_agent.tooltip' : 'ttyg.agent.btn.edit_agent.tooltip_disabled') | translate}}\"> <i class=\"icon-settings\"></i> </button> </div> <div uib-collapse=\"!isCollapsed\" id=\"ot-help-text\" class=\"alert alert-info\"> <button type=\"button\" ng-click=\"isCollapsed = false\" gdb-tooltip=\"{{'common.close' | translate}}\" class=\"close\" aria-label=\"Close\"></button> <div ng-include=\"helpTemplateUrl\"></div> </div> <chat-panel class=\"selected-chat-panel\"></chat-panel> </div> </div> <div id=\"right-sidebar\" class=\"right-sidebar sidebar\" ng-class=\"showAgents ? 'expanded' : 'collapsed'\"> <div class=\"toolbar\"> <button class=\"btn btn-link btn-sm help-btn\" ng-if=\"true\" ng-click=\"onToggleHelp()\" ng-disabled=\"false\" gdb-tooltip=\"{{'ttyg.help.btn.show_help.tooltip' | translate}}\"> <i class=\"icon-help\"></i> </button> <button class=\"btn btn-link btn-sm create-agent-btn\" ng-disabled=\"!canModifyAgent\" ng-click=\"onOpenNewAgentSettings()\" ng-disabled=\"false\" gdb-tooltip=\"{{ (canModifyAgent ? 'ttyg.agent.btn.create_agent.tooltip' : 'ttyg.agent.btn.create_agent.tooltip_disabled') | translate}}\" guide-selector=\"create-agent-btn\"> <i class=\"icon-plus\"></i> </button> <button class=\"btn btn-link btn-sm toggle-agents-sidebar-btn\" ng-if=\"!showAgents\" ng-click=\"toggleAgentsListSidebar()\" ng-disabled=\"!canModifyAgent\" gdb-tooltip=\"{{'ttyg.agent.btn.open_sidebar.' + (canModifyAgent ? 'tooltip' : 'tooltip_disabled') | translate}}\"> <i class=\"fa fa-message-bot\"></i> </button> <button class=\"btn btn-link btn-sm toggle-agents-sidebar-btn\" ng-if=\"showAgents\" ng-click=\"toggleAgentsListSidebar()\" ng-disabled=\"false\" gdb-tooltip=\"{{'ttyg.agent.btn.close_sidebar' + '.tooltip' | translate}}\"> <i class=\"icon-close\"></i> </button> </div> <pageslide ps-class=\"agent-list-panel slide-panel\" ps-container=\"right-sidebar\" ps-open=\"showAgents\" onopen=\"onopen\" onclose=\"onclose\" ps-side=\"right\" ps-click-outside=\"false\" ps-size=\"80vw\"> <div class=\"sidebar-content\"> <agent-list ng-if=\"agents && agentListFilterModel.length && !reloadingAgents\" agent-list=\"agents\" agent-list-filter-model=\"agentListFilterModel\"></agent-list> <div ng-if=\"reloadingAgents\" onto-loader-fancy message=\"{{'ttyg.agent.loading_agents' | translate}}\" class=\"agent-list-loader\" size=\"25\" style=\"display:flex\"></div> </div> </pageslide> </div> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_id__=58334;export const __webpack_ids__=[3588,10307,58334];export const __webpack_modules__={3588:(r,e,o)=>{o.r(e),o.d(e,{FIELD_TYPE:()=>t});const t={STRING:"string",TEXT:"text",BOOLEAN:"boolean",JSON:"json",SELECT:"select",MULTI_SELECT:"multi_select"}},10307:(r,e,o)=>{o.r(e);var t=o(3588);function i(r){return{restrict:"E",scope:{field:"=",form:"=",translationKeyPrefix:"="},templateUrl:"js/angular/core/directives/dynamic-form/templates/form-field-template.html",link:function(r){r.FIELD_TYPE=t.FIELD_TYPE}}}angular.module("graphdb.framework.core.directives.dynamic-form-field",[]).directive("dynamicFormField",i),i.$inject=[]},58334:(r,e,o)=>{o.r(e),o(10307);var t=o(3588),i=o(304);angular.module("graphdb.framework.core.directives.dynamic-form",["graphdb.framework.core.directives.dynamic-form-field"]).directive("dynamicForm",n),n.$inject=[];const l=i.LoggerProvider.logger;function n(){return{restrict:"E",scope:{formModel:"=",showAllFields:"=?",onValidityChange:"&?",formCtrl:"=?",translationKeyPrefix:"@?"},templateUrl:"js/angular/core/directives/dynamic-form/templates/dynamic-form.html",link:function(r,e){r.FIELD_TYPE=t.FIELD_TYPE,r.formCtrl=void 0,r.showAllFields=r.showAllFields||!1,(()=>{const o=e.find("form").controller("form");if(!o)return void l.error("Form controller not found!");r.formCtrl=o;const t=o.$setValidity;r.formCtrl.$setValidity=function(e,i,l){t.call(o,e,i,l),r.onValidityChange&&r.onValidityChange({valid:o.$valid})}})()}}}}};
2
+ //# sourceMappingURL=58334.8a2bdb0560e0ce23f792.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"58334.8a2bdb0560e0ce23f792.bundle.js","mappings":"oKAKO,MAAMA,EAAa,CACtBC,OAAQ,SACRC,KAAM,OACNC,QAAS,UACTC,KAAM,OACNC,OAAQ,SACRC,aAAc,e,uCCFlB,SAASC,EAA0BC,GAC/B,MAAO,CACHC,SAAU,IACVC,MAAO,CACHC,MAAO,IACPC,KAAM,IACNC,qBAAsB,KAE1BC,YAAa,6EACbC,KAAM,SAASC,GACXA,EAAOhB,WAAaA,EAAAA,UACxB,EAER,CAnBAiB,QACKC,OAAO,uDAFI,IAGXC,UAAU,mBAAoBZ,GAEnCA,EAA0Ba,QAAU,E,yDC2BpCH,QACKC,OAAO,iDAFI,CAAC,yDAGZC,UAAU,cAAeE,GAE9BA,EAAqBD,QAAU,GAE/B,MAAME,EAASC,EAAAA,eAAeD,OAE9B,SAASD,IACL,MAAO,CACHZ,SAAU,IACVC,MAAO,CAIHc,UAAW,IAKXC,cAAe,KACfC,iBAAkB,KAClBC,SAAU,KACVd,qBAAsB,MAE1BC,YAAa,sEACbC,KAAM,SAASC,EAAQY,GAInBZ,EAAOhB,WAAaA,EAAAA,WACpBgB,EAAOW,cAAWE,EAClBb,EAAOS,cAAgBT,EAAOS,gBAAiB,EAKlCK,MACT,MACMH,EADcC,EAAQG,KAAK,QACJC,WAAW,QAExC,IAAKL,EAED,YADAL,EAAOW,MAAM,8BAIjBjB,EAAOW,SAAWA,EAClB,MAAMO,EAAsBP,EAASQ,aACrCnB,EAAOW,SAASQ,aAAe,SAASC,EAAiBC,EAASC,GAC9DJ,EAAoBK,KAAKZ,EAAUS,EAAiBC,EAASC,GACzDtB,EAAOU,kBACPV,EAAOU,iBAAiB,CAACc,MAAOb,EAASc,QAEjD,GAMJX,EACJ,EAER,C","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/dynamic-form/field-type.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/dynamic-form/dynamic-form-field.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/dynamic-form/dynamic-form.directive.js"],"sourcesContent":["/**\n * Enum for field types.\n * @readonly\n * @enum {string}\n */\nexport const FIELD_TYPE = {\n STRING: 'string',\n TEXT: 'text',\n BOOLEAN: 'boolean',\n JSON: 'json',\n SELECT: 'select',\n MULTI_SELECT: 'multi_select'\n}\n","import {FIELD_TYPE} from \"./field-type\";\n\nconst modules = [];\nangular\n .module('graphdb.framework.core.directives.dynamic-form-field', modules)\n .directive('dynamicFormField', dynamicFormFieldDirective);\n\ndynamicFormFieldDirective.$inject = [];\n\nfunction dynamicFormFieldDirective($compile) {\n return {\n restrict: 'E',\n scope: {\n field: '=',\n form: '=',\n translationKeyPrefix: '='\n },\n templateUrl: 'js/angular/core/directives/dynamic-form/templates/form-field-template.html',\n link: function($scope) {\n $scope.FIELD_TYPE = FIELD_TYPE;\n }\n };\n}\n","import 'angular/core/directives/dynamic-form/dynamic-form-field.directive';\nimport {FIELD_TYPE} from \"./field-type\";\nimport {LoggerProvider} from \"../../services/logger-provider\";\n\n/**\n * @function dynamicFormDirective\n * @description\n * A directive for rendering a dynamic form based on an array of field objects.\n *\n * This directive creates a form where each object in the provided formModel defines the type of input to render\n * (for example, text input, checkbox, dropdown, multi-select, or textarea for JSON data). The directive uses the\n * {@link FIELD_TYPE} enum to determine which input type to display. For select and multi-select fields, the\n * {@link SelectMenuOptionsModel} should be used to model the options.\n *\n * Additionally, the directive supports an optional `onValidityChange` callback that will be called whenever the overall\n * validity of the form changes. This is useful for informing a parent component or controller about the current form validity.\n *\n * @example\n * ### HTML Usage:\n * ```html\n * <dynamic-form formModel=\"myFields\" on-validity-change=\"handleValidityChange(valid)\"></dynamic-form>\n * ```\n *\n * @param {Object[]} field - The array of field objects used to render the form fields.\n * @param {string} field[].label - The label displayed for the input.\n * @param {string} field[].type - The type of field input. Should be one of the values defined in {@link FIELD_TYPE}.\n * @param {*} field[].value - The current value of the field.\n * @param {SelectMenuOptionsModel[]} [field[].values] - The array of possible options for select and multi-select fields.\n * @param {(string|RegExp)} [field[].regex] - A regular expression or its string representation for validating the field value.\n * @param {boolean} [field[].required=false] - Indicates whether the field is required.\n *\n * @returns {Object} The directive definition object.\n */\nconst modules = ['graphdb.framework.core.directives.dynamic-form-field'];\nangular\n .module('graphdb.framework.core.directives.dynamic-form', modules)\n .directive('dynamicForm', dynamicFormDirective);\n\ndynamicFormDirective.$inject = [];\n\nconst logger = LoggerProvider.logger;\n\nfunction dynamicFormDirective() {\n return {\n restrict: 'E',\n scope: {\n /**\n * @type {DynamicFormModel}\n */\n formModel: '=',\n /**\n * Controls whether to show all fields or only the ones that are not hidden in the model.\n * @type {boolean}\n */\n showAllFields: '=?',\n onValidityChange: '&?',\n formCtrl: '=?',\n translationKeyPrefix: '@?',\n },\n templateUrl: 'js/angular/core/directives/dynamic-form/templates/dynamic-form.html',\n link: function($scope, element) {\n // =========================\n // Public variables\n // =========================\n $scope.FIELD_TYPE = FIELD_TYPE;\n $scope.formCtrl = undefined;\n $scope.showAllFields = $scope.showAllFields || false;\n\n // =========================\n // Private function\n // =========================\n const init = () => {\n const formElement = element.find('form');\n const formCtrl = formElement.controller('form');\n\n if (!formCtrl) {\n logger.error('Form controller not found!');\n return;\n }\n\n $scope.formCtrl = formCtrl;\n const originalSetValidity = formCtrl.$setValidity;\n $scope.formCtrl.$setValidity = function(validationToken, isValid, modelCtrl) {\n originalSetValidity.call(formCtrl, validationToken, isValid, modelCtrl);\n if ($scope.onValidityChange) {\n $scope.onValidityChange({valid: formCtrl.$valid});\n }\n };\n };\n\n // =========================\n // Initialization\n // =========================\n init();\n },\n };\n}\n\n\n"],"names":["FIELD_TYPE","STRING","TEXT","BOOLEAN","JSON","SELECT","MULTI_SELECT","dynamicFormFieldDirective","$compile","restrict","scope","field","form","translationKeyPrefix","templateUrl","link","$scope","angular","module","directive","$inject","dynamicFormDirective","logger","LoggerProvider","formModel","showAllFields","onValidityChange","formCtrl","element","undefined","init","find","controller","error","originalSetValidity","$setValidity","validationToken","isValid","modelCtrl","call","valid","$valid"],"sourceRoot":""}