graphdb-workbench 3.3.3-TR1 → 3.3.3

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 (183) hide show
  1. package/dist/{10759.b2e1d643d681ebd9c124.bundle.js → 10759.57059f90014058a86952.bundle.js} +2 -2
  2. package/dist/10759.57059f90014058a86952.bundle.js.map +1 -0
  3. package/dist/{18961.01ff5fcc0f4b9f99236e.bundle.js → 18961.732c0c355509452ac6da.bundle.js} +2 -2
  4. package/dist/18961.732c0c355509452ac6da.bundle.js.map +1 -0
  5. package/dist/{20694.4becb7771236462dcc5a.bundle.js → 20694.03b5abf23347ae0bad65.bundle.js} +2 -2
  6. package/dist/{20694.4becb7771236462dcc5a.bundle.js.map → 20694.03b5abf23347ae0bad65.bundle.js.map} +1 -1
  7. package/dist/38644.7c01b17edbb63f7bf2cc.bundle.js +2 -0
  8. package/dist/38644.7c01b17edbb63f7bf2cc.bundle.js.map +1 -0
  9. package/dist/39518.a40451f994622fd35756.bundle.js +2 -0
  10. package/dist/{39518.1c641a7dc1c50a526845.bundle.js.map → 39518.a40451f994622fd35756.bundle.js.map} +1 -1
  11. package/dist/{39874.710e94f211579215f997.bundle.js → 39874.17dde6245fc4cc91bb58.bundle.js} +2 -2
  12. package/dist/39874.17dde6245fc4cc91bb58.bundle.js.map +1 -0
  13. package/dist/{45758.1212136a37dd4f7528f8.bundle.js → 45758.b9ce5fe0ed6c8c4fc141.bundle.js} +2 -2
  14. package/dist/45758.b9ce5fe0ed6c8c4fc141.bundle.js.map +1 -0
  15. package/dist/{60560.6ba1b091a34af6c00770.bundle.js → 60560.62ed0cb0b3d07fecbf28.bundle.js} +2 -2
  16. package/dist/60560.62ed0cb0b3d07fecbf28.bundle.js.map +1 -0
  17. package/dist/{60730.35493812d428872eddb6.bundle.js → 60730.a9fc5342637039776562.bundle.js} +2 -2
  18. package/dist/60730.a9fc5342637039776562.bundle.js.map +1 -0
  19. package/dist/67888.6279be833ab8b2f2f9e6.bundle.js +2 -0
  20. package/dist/67888.6279be833ab8b2f2f9e6.bundle.js.map +1 -0
  21. package/dist/{7815.2aec5ebbcd434f5582ff.bundle.js → 7815.89cc59b6625e84913351.bundle.js} +2 -2
  22. package/dist/7815.89cc59b6625e84913351.bundle.js.map +1 -0
  23. package/dist/{78681.9e1d4e064e9e1fb5fb21.bundle.js → 78681.6c8614aad7e5465be505.bundle.js} +2 -2
  24. package/dist/78681.6c8614aad7e5465be505.bundle.js.map +1 -0
  25. package/dist/{82206.229877d7931849236456.bundle.js → 82206.473f6d4f79e12f6a9da6.bundle.js} +2 -2
  26. package/dist/82206.473f6d4f79e12f6a9da6.bundle.js.map +1 -0
  27. package/dist/{82926.bbdac6a7e9eb883ae97b.bundle.js → 82926.164acb5a9d5ffd8e8ce3.bundle.js} +2 -2
  28. package/dist/{82926.bbdac6a7e9eb883ae97b.bundle.js.map → 82926.164acb5a9d5ffd8e8ce3.bundle.js.map} +1 -1
  29. package/dist/99448.b8ccb0c0fd74bb99d5a5.bundle.js +2 -0
  30. package/dist/99448.b8ccb0c0fd74bb99d5a5.bundle.js.map +1 -0
  31. package/dist/css/splash-screen.css +1 -1
  32. package/dist/index.html +9 -9
  33. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  34. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  35. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  36. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  37. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  38. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  39. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +2 -2
  40. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  41. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  42. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  43. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  44. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  45. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  46. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  47. package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
  48. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  49. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  50. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  51. package/dist/js/angular/security/templates/user.html +2 -2
  52. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  53. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  54. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  55. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  56. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  57. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  58. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
  59. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  60. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  61. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  62. package/dist/legacyWorkbench.ce850285bee5789a585d.js +3 -0
  63. package/dist/{legacyWorkbench.4d8a4e8dde83fc9ac427.js.map → legacyWorkbench.ce850285bee5789a585d.js.map} +1 -1
  64. package/dist/main.83f9d186d9b0827c6774.js +3 -0
  65. package/dist/main.83f9d186d9b0827c6774.js.map +1 -0
  66. package/dist/pages/aclmanagement.html +1 -1
  67. package/dist/pages/autocomplete.html +1 -1
  68. package/dist/pages/choose-repository-type.html +1 -1
  69. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  70. package/dist/pages/create-index.html +1 -1
  71. package/dist/pages/dependencies.html +1 -1
  72. package/dist/pages/domainRangeInfo.html +2 -2
  73. package/dist/pages/edit.html +1 -1
  74. package/dist/pages/explore.html +1 -1
  75. package/dist/pages/export.html +1 -1
  76. package/dist/pages/find.html +1 -1
  77. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  78. package/dist/pages/graphs-visualizations.html +7 -7
  79. package/dist/pages/guides.html +1 -1
  80. package/dist/pages/home.html +1 -1
  81. package/dist/pages/import.html +2 -2
  82. package/dist/pages/jdbc-create.html +1 -1
  83. package/dist/pages/jdbc.html +1 -1
  84. package/dist/pages/monitor/backup-and-restore.html +1 -1
  85. package/dist/pages/monitor/queries.html +1 -1
  86. package/dist/pages/monitor/resources.html +1 -1
  87. package/dist/pages/namespaces.html +2 -2
  88. package/dist/pages/plugins.html +1 -1
  89. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  90. package/dist/pages/rdfrank.html +2 -2
  91. package/dist/pages/repositories.html +1 -1
  92. package/dist/pages/repository.html +1 -1
  93. package/dist/pages/similarity-indexes.html +1 -1
  94. package/dist/pages/sparql-editor.html +1 -1
  95. package/dist/pages/sparql-template-create.html +1 -1
  96. package/dist/pages/sparql-templates.html +1 -1
  97. package/dist/pages/ux-test1.html +2 -2
  98. package/dist/pages/webapi.html +2 -2
  99. package/dist/res/swagger5/index.html +11 -11
  100. package/dist/shared-components/cjs/index-CTK5NoJt.js +2 -0
  101. package/dist/shared-components/cjs/loader.cjs.js +1 -1
  102. package/dist/shared-components/cjs/onto-cookie-consent_2.cjs.entry.js +1 -1
  103. package/dist/shared-components/cjs/onto-dialog_2.cjs.entry.js +1 -1
  104. package/dist/shared-components/cjs/onto-dropdown.cjs.entry.js +1 -1
  105. package/dist/shared-components/cjs/onto-footer_5.cjs.entry.js +1 -1
  106. package/dist/shared-components/cjs/onto-language-selector_9.cjs.entry.js +1 -1
  107. package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
  108. package/dist/shared-components/cjs/onto-permission-banner.cjs.entry.js +1 -1
  109. package/dist/shared-components/cjs/onto-test-context.cjs.entry.js +1 -1
  110. package/dist/shared-components/cjs/onto-toastr.cjs.entry.js +1 -1
  111. package/dist/shared-components/cjs/shared-components.cjs.js +1 -1
  112. package/dist/shared-components/cjs/translate-label.cjs.entry.js +1 -1
  113. package/dist/shared-components/collection/collection-manifest.json +2 -2
  114. package/dist/shared-components/collection/components/dialogs/onto-dialog.js +1 -1
  115. package/dist/shared-components/collection/components/onto-dropdown/onto-dropdown.js +1 -1
  116. package/dist/shared-components/collection/components/onto-language-selector/onto-language-selector.js +1 -1
  117. package/dist/shared-components/collection/components/onto-license-alert/onto-license-alert.js +1 -1
  118. package/dist/shared-components/collection/components/onto-loader/onto-loader.js +1 -1
  119. package/dist/shared-components/collection/components/onto-navbar/onto-navbar.js +1 -1
  120. package/dist/shared-components/collection/components/onto-operations-notification/onto-operations-notification.js +1 -1
  121. package/dist/shared-components/collection/components/onto-repository-selector/onto-repository-selector.js +1 -1
  122. package/dist/shared-components/collection/components/onto-search-resource-input/onto-search-resource-input.js +1 -1
  123. package/dist/shared-components/collection/components/onto-test-context/onto-test-context.js +1 -1
  124. package/dist/shared-components/collection/components/onto-toggle-switch/onto-toggle-switch.js +1 -1
  125. package/dist/shared-components/collection/components/onto-user-menu/onto-user-menu.js +1 -1
  126. package/dist/shared-components/collection/components/translate-label/translate-label.js +1 -1
  127. package/dist/shared-components/esm/index-EiAqSNMq.js +2 -0
  128. package/dist/shared-components/esm/loader.js +1 -1
  129. package/dist/shared-components/esm/onto-cookie-consent_2.entry.js +1 -1
  130. package/dist/shared-components/esm/onto-dialog_2.entry.js +1 -1
  131. package/dist/shared-components/esm/onto-dropdown.entry.js +1 -1
  132. package/dist/shared-components/esm/onto-footer_5.entry.js +1 -1
  133. package/dist/shared-components/esm/onto-language-selector_9.entry.js +1 -1
  134. package/dist/shared-components/esm/onto-layout.entry.js +1 -1
  135. package/dist/shared-components/esm/onto-permission-banner.entry.js +1 -1
  136. package/dist/shared-components/esm/onto-test-context.entry.js +1 -1
  137. package/dist/shared-components/esm/onto-toastr.entry.js +1 -1
  138. package/dist/shared-components/esm/shared-components.js +1 -1
  139. package/dist/shared-components/esm/translate-label.entry.js +1 -1
  140. package/dist/shared-components/shared-components/{p-6d34b2cb.entry.js → p-1103d100.entry.js} +1 -1
  141. package/dist/shared-components/shared-components/{p-9b2c6e80.entry.js → p-2e2bb175.entry.js} +1 -1
  142. package/dist/shared-components/shared-components/{p-b754971e.entry.js → p-50735428.entry.js} +1 -1
  143. package/dist/shared-components/shared-components/{p-7e47d850.entry.js → p-59707503.entry.js} +1 -1
  144. package/dist/shared-components/shared-components/{p-598d33d7.entry.js → p-6a37f808.entry.js} +1 -1
  145. package/dist/shared-components/shared-components/{p-9214bb16.entry.js → p-6fb5eec5.entry.js} +1 -1
  146. package/dist/shared-components/shared-components/{p-c27fe716.entry.js → p-97930684.entry.js} +1 -1
  147. package/dist/shared-components/shared-components/p-EiAqSNMq.js +2 -0
  148. package/dist/shared-components/shared-components/{p-b5d4081d.entry.js → p-a5a49d87.entry.js} +1 -1
  149. package/dist/shared-components/shared-components/{p-74888633.entry.js → p-d134e207.entry.js} +1 -1
  150. package/dist/shared-components/shared-components/{p-5886e663.entry.js → p-ec2f4ea5.entry.js} +1 -1
  151. package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
  152. package/dist/shared-components/types/stencil-public-runtime.d.ts +10 -147
  153. package/package.json +1 -1
  154. package/dist/10759.b2e1d643d681ebd9c124.bundle.js.map +0 -1
  155. package/dist/18961.01ff5fcc0f4b9f99236e.bundle.js.map +0 -1
  156. package/dist/38644.cc471c67239fa24901cc.bundle.js +0 -2
  157. package/dist/38644.cc471c67239fa24901cc.bundle.js.map +0 -1
  158. package/dist/39518.1c641a7dc1c50a526845.bundle.js +0 -2
  159. package/dist/39874.710e94f211579215f997.bundle.js.map +0 -1
  160. package/dist/45758.1212136a37dd4f7528f8.bundle.js.map +0 -1
  161. package/dist/60560.6ba1b091a34af6c00770.bundle.js.map +0 -1
  162. package/dist/60730.35493812d428872eddb6.bundle.js.map +0 -1
  163. package/dist/67888.7224e1b2689d73c4d468.bundle.js +0 -2
  164. package/dist/67888.7224e1b2689d73c4d468.bundle.js.map +0 -1
  165. package/dist/7815.2aec5ebbcd434f5582ff.bundle.js.map +0 -1
  166. package/dist/78681.9e1d4e064e9e1fb5fb21.bundle.js.map +0 -1
  167. package/dist/82206.229877d7931849236456.bundle.js.map +0 -1
  168. package/dist/99448.b9922814bd15808a9d1c.bundle.js +0 -2
  169. package/dist/99448.b9922814bd15808a9d1c.bundle.js.map +0 -1
  170. package/dist/legacyWorkbench.4d8a4e8dde83fc9ac427.js +0 -3
  171. package/dist/main.14f083264cd64618d96a.js +0 -3
  172. package/dist/main.14f083264cd64618d96a.js.map +0 -1
  173. package/dist/shared-components/cjs/app-globals-V2Kpy_OQ.js +0 -1
  174. package/dist/shared-components/cjs/index-L_ZmIeD5.js +0 -2
  175. package/dist/shared-components/esm/app-globals-DQuL1Twl.js +0 -1
  176. package/dist/shared-components/esm/index-CGqARDX4.js +0 -2
  177. package/dist/shared-components/shared-components/p-CGqARDX4.js +0 -2
  178. package/dist/shared-components/shared-components/p-DQuL1Twl.js +0 -1
  179. /package/dist/{legacyWorkbench.4d8a4e8dde83fc9ac427.js.LICENSE.txt → legacyWorkbench.ce850285bee5789a585d.js.LICENSE.txt} +0 -0
  180. /package/dist/{main.14f083264cd64618d96a.js.LICENSE.txt → main.83f9d186d9b0827c6774.js.LICENSE.txt} +0 -0
  181. /package/dist/shared-components/cjs/{index-L_ZmIeD5.js.LICENSE.txt → index-CTK5NoJt.js.LICENSE.txt} +0 -0
  182. /package/dist/shared-components/esm/{index-CGqARDX4.js.LICENSE.txt → index-EiAqSNMq.js.LICENSE.txt} +0 -0
  183. /package/dist/shared-components/shared-components/{p-CGqARDX4.js.LICENSE.txt → p-EiAqSNMq.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- export const __webpack_esm_id__=39874;export const __webpack_esm_ids__=[39874];export const __webpack_esm_modules__={39874(e,t,i){i.r(t),i.d(t,{onto_layout:()=>o});var a=i(55508),s=i(63952),n=i(57154),r=i(79939);const o=class{constructor(e){(0,a.r)(this,e),this.authenticationService=(0,n.service)(n.AuthenticationService),this.authorizationService=(0,n.service)(n.AuthorizationService),this.navigationContextService=(0,n.service)(n.NavigationContextService),this.authStorageService=(0,n.service)(n.AuthenticationStorageService),this.runtimeConfigurationContextService=(0,n.service)(n.RuntimeConfigurationContextService),this.eventService=(0,n.service)(n.EventService),this.applicationLifecycleContextService=(0,n.service)(n.ApplicationLifecycleContextService),this.fullJwtKey=`${n.StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.jwtKey}`,this.fullAuthenticatedKey=`${n.StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.authenticatedKey}`,this.authEvents=[this.fullJwtKey,this.fullAuthenticatedKey],this.isLowResolution=!1,this.showHeader=this.isAuthenticatedFully(),this.showNavbar=!1,this.isEmbedded=!1,this.loading=!0,this.subscriptions=new n.SubscriptionList,this.isNavbarCollapsed=!1,this.handleStorageChange=e=>{(0,n.service)(n.LocalStorageSubscriptionHandlerService).handleStorageChange(e),this.handleAuthChange(e.key)},this.windowResizeObserver=(0,s.d)(()=>this.windowResizeHandler(),50),n.WindowService.getWindow().addEventListener("storage",this.handleStorageChange)}componentDidLoad(){this.windowResizeHandler()}connectedCallback(){this.subscribeToSecurityChanges(),this.updateVisibility(),this.subscribeToNavigationEnd(),this.subscribeToRuntimeConfigurationChanges(),this.subscribeToApplicationChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){return(0,a.h)(a.a,{key:"b8cbbca1f12bf6af844e18397d2a725d6ab4e1fc",class:{"wb-layout":!0,"is-embedded":this.isEmbedded,"hide-navbar":!this.showNavbar}},(0,a.h)("div",{key:"f2e3b7a238b82536bd7605196966bd758330c521",class:"default-slot-wrapper"},(0,a.h)("slot",{key:"5d391e2f612d9aead6c07b2ef3641b961eddc504",name:"default"})),!this.isEmbedded&&(0,a.h)("header",{key:"e43c5b68d590e12b2b3e95d4c414505f1fc82abb",class:"wb-header"},this.showHeader&&(0,a.h)("onto-header",{key:"21102b279bed2dd3ee857b399683d14c5f3eaf57"})),!this.isEmbedded&&this.showNavbar&&(0,a.h)("nav",{key:"67dcbf444a30ac933ba83f86ae9f8d08fe5f995f",class:"wb-navbar"},(0,a.h)("onto-navbar",{key:"a9816369cbbac4d5b58f607be61277d6074556bd",ref:this.assignNavbarRef(),"navbar-collapsed":this.isLowResolution})),(0,a.h)("div",{key:"f3ff0e1734eecc433dc20717e0b9f2871ea40dae",class:{"main-slot-wrapper":!0,loading:this.loading}},this.loading&&(0,a.h)("div",{key:"17d9a8024d280f70ad8684e5d114c38b184b529d",class:"loader-wrapper"},(0,a.h)("onto-loader",{key:"534a5d8f89b92051822d1d7750ca56894013c142",size:96,messageText:r.T.translate("common.loading")})),(0,a.h)("slot",{key:"bcd21d932551dc6f9b9365ccbbafae690f8b7245",name:"main"})),!this.isEmbedded&&(0,a.h)("footer",{key:"9fcd224439dbb7fd35bb4c277dc343eccab40087",class:"wb-footer"},(0,a.h)("onto-footer",{key:"39d5d1c8275c527ca16aa74f6f15dc3f0cc3686c"})),(0,a.h)("onto-tooltip",{key:"6a70e6d2d67e8a9aa6b8eda66b6768735c0f6dcd"}))}onNavbarToggled(e){this.isNavbarCollapsed=e.detail.payload,this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}onResize(){this.windowResizeObserver()}windowResizeHandler(){this.isLowResolution=n.WindowService.getWindow().innerWidth<=768,this.isLowResolution||this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}handleAuthChange(e){var t;e&&this.authEvents.includes(e)&&(this.authStorageService.isAuthenticated()?(0,n.navigate)(null!==(t=this.navigationContextService.getPreviousRoute())&&void 0!==t?t:"./"):(0,n.navigate)("login"),n.WindowService.getWindow().location.reload())}subscribeToSecurityChanges(){const e=(0,n.service)(n.SecurityContextService);this.subscriptions.add(e.onAuthenticatedUserChanged(e=>{this.authenticatedUser=e,this.updateVisibility()})),this.subscriptions.add(e.onSecurityConfigChanged(e=>{this.securityConfig=e,this.updateVisibility()})),this.subscriptions.add(this.eventService.subscribe(n.EventName.LOGIN,()=>{this.setNavbarItemVisibility(),this.updateVisibility()})),this.subscriptions.add(this.eventService.subscribe(n.EventName.LOGOUT,()=>{this.setNavbarItemVisibility(),this.updateVisibility(),(0,n.navigate)("login")}))}subscribeToRuntimeConfigurationChanges(){this.subscriptions.add(this.runtimeConfigurationContextService.onRuntimeConfigurationChanged(e=>{var t;this.isEmbedded=null!==(t=null==e?void 0:e.isEmbedded)&&void 0!==t&&t}))}updateVisibility(){this.authenticationService.isSecurityEnabled()?(this.showHeader=this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess(),this.showNavbar=this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess()):(this.showNavbar=!0,this.showHeader=!0)}isAuthenticatedFully(){return!this.authenticationService.isSecurityEnabled()||this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess()}shouldShowMenu(e){return this.isAuthenticatedFully()&&this.authorizationService.hasRole(e)}assignNavbarRef(){return e=>{this.navbarRef=e,this.navbarRef&&(this.navbarRef.menuItems=n.WindowService.getWindow().PluginRegistry.get("main.menu"),this.setNavbarItemVisibility())}}setNavbarItemVisibility(){var e,t,i;if(!(null===(e=this.navbarRef)||void 0===e?void 0:e.menuItems))return;const a=e=>{var t;e.shouldShow=this.shouldShowMenu(e.role),(null===(t=e.children)||void 0===t?void 0:t.length)&&e.children.forEach(a)};null===(i=null===(t=this.navbarRef)||void 0===t?void 0:t.menuItems)||void 0===i||i.forEach(e=>{e.items.forEach(a)}),this.navbarRef.menuItems=[...this.navbarRef.menuItems]}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(n.EventName.NAVIGATION_END,e=>{this.navigationContextService.updatePreviousRoute(e.oldUrl)}))}subscribeToApplicationChange(){this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateBeforeChange(e=>{e&&(this.loading=!0)})),this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateChange(e=>{e&&(this.loading=!1)}))}get hostElement(){return(0,a.g)(this)}};o.style=':host{display:block;height:100%}.wb-layout{display:grid;grid-template:"header header" auto "nav main" 1fr "nav footer" auto/15rem minmax(200px, 1fr);min-height:100vh;margin:0;}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout.is-embedded{grid-template-columns:1fr;grid-template-areas:"main";padding-top:1rem}.wb-layout.hide-navbar{grid-template:"header" auto "main" 1fr "footer" auto/1fr;}.wb-layout.hide-navbar.expanded{grid-template-columns:1fr}.wb-layout main .main-container{margin-left:0}.wb-layout .main-slot-wrapper .loader-wrapper{flex-grow:1;display:flex;align-items:center;justify-content:center}.wb-layout .main-slot-wrapper.loading{display:flex;flex-direction:column}.wb-layout .main-slot-wrapper.loading .page-content{visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout header{grid-area:header}.wb-layout main{grid-area:main}.wb-layout footer{grid-area:footer}'},63952(e,t,i){function a(e,t=300){let i;return(...a)=>{clearTimeout(i),i=setTimeout(()=>e.apply(this,a),t)}}i.d(t,{d:()=>a})},79939(e,t,i){i.d(t,{L:()=>n,T:()=>o,s:()=>s});var a=i(57154);function s(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}class n{static get logger(){return a.Loggers.getLoggerInstance("SharedComponents")}}class r{constructor(){this.languageContextService=a.ServiceProvider.get(a.LanguageContextService),this.translationChangedObservers={},this.logger=n.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],i=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const a={parameters:t,callback:i};return this.translationChangedObservers[e].push(a),i(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(a);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let i=this.translateFromBundle(this.currentBundle,e);return i||(i=this.translateFromBundle(this.defaultBundle,e)),i?(i=this.applyParameters(i,t),s(i)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let i=e[t];return"string"!=typeof i&&(i=this.translateAsJsonObject(e,t)),i}translateAsJsonObject(e,t){let i=t.split(".");return this.getTranslation(e,i)}getTranslation(e,t){if(!t||!e)return;const i=e[t.splice(0,1)[0]];return 0===t.length?i:"string"!=typeof i?t.length>0?this.getTranslation(i,t):i:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>r.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const o=new r}};
2
- //# sourceMappingURL=39874.710e94f211579215f997.bundle.js.map
1
+ export const __webpack_esm_id__=39874;export const __webpack_esm_ids__=[39874];export const __webpack_esm_modules__={39874(e,t,i){i.r(t),i.d(t,{onto_layout:()=>o});var a=i(76133),s=i(63952),n=i(57154),r=i(79939);const o=class{constructor(e){(0,a.r)(this,e),this.authenticationService=(0,n.service)(n.AuthenticationService),this.authorizationService=(0,n.service)(n.AuthorizationService),this.navigationContextService=(0,n.service)(n.NavigationContextService),this.authStorageService=(0,n.service)(n.AuthenticationStorageService),this.runtimeConfigurationContextService=(0,n.service)(n.RuntimeConfigurationContextService),this.eventService=(0,n.service)(n.EventService),this.applicationLifecycleContextService=(0,n.service)(n.ApplicationLifecycleContextService),this.fullJwtKey=`${n.StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.jwtKey}`,this.fullAuthenticatedKey=`${n.StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.authenticatedKey}`,this.authEvents=[this.fullJwtKey,this.fullAuthenticatedKey],this.isLowResolution=!1,this.showHeader=this.isAuthenticatedFully(),this.showNavbar=!1,this.isEmbedded=!1,this.loading=!0,this.subscriptions=new n.SubscriptionList,this.isNavbarCollapsed=!1,this.handleStorageChange=e=>{(0,n.service)(n.LocalStorageSubscriptionHandlerService).handleStorageChange(e),this.handleAuthChange(e.key)},this.windowResizeObserver=(0,s.d)(()=>this.windowResizeHandler(),50),n.WindowService.getWindow().addEventListener("storage",this.handleStorageChange)}componentDidLoad(){this.windowResizeHandler()}connectedCallback(){this.subscribeToSecurityChanges(),this.updateVisibility(),this.subscribeToNavigationEnd(),this.subscribeToRuntimeConfigurationChanges(),this.subscribeToApplicationChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){return(0,a.h)(a.a,{key:"b8cbbca1f12bf6af844e18397d2a725d6ab4e1fc",class:{"wb-layout":!0,"is-embedded":this.isEmbedded,"hide-navbar":!this.showNavbar}},(0,a.h)("div",{key:"f2e3b7a238b82536bd7605196966bd758330c521",class:"default-slot-wrapper"},(0,a.h)("slot",{key:"5d391e2f612d9aead6c07b2ef3641b961eddc504",name:"default"})),!this.isEmbedded&&(0,a.h)("header",{key:"e43c5b68d590e12b2b3e95d4c414505f1fc82abb",class:"wb-header"},this.showHeader&&(0,a.h)("onto-header",{key:"21102b279bed2dd3ee857b399683d14c5f3eaf57"})),!this.isEmbedded&&this.showNavbar&&(0,a.h)("nav",{key:"67dcbf444a30ac933ba83f86ae9f8d08fe5f995f",class:"wb-navbar"},(0,a.h)("onto-navbar",{key:"a9816369cbbac4d5b58f607be61277d6074556bd",ref:this.assignNavbarRef(),"navbar-collapsed":this.isLowResolution})),(0,a.h)("div",{key:"f3ff0e1734eecc433dc20717e0b9f2871ea40dae",class:{"main-slot-wrapper":!0,loading:this.loading}},this.loading&&(0,a.h)("div",{key:"17d9a8024d280f70ad8684e5d114c38b184b529d",class:"loader-wrapper"},(0,a.h)("onto-loader",{key:"534a5d8f89b92051822d1d7750ca56894013c142",size:96,messageText:r.T.translate("common.loading")})),(0,a.h)("slot",{key:"bcd21d932551dc6f9b9365ccbbafae690f8b7245",name:"main"})),!this.isEmbedded&&(0,a.h)("footer",{key:"9fcd224439dbb7fd35bb4c277dc343eccab40087",class:"wb-footer"},(0,a.h)("onto-footer",{key:"39d5d1c8275c527ca16aa74f6f15dc3f0cc3686c"})),(0,a.h)("onto-tooltip",{key:"6a70e6d2d67e8a9aa6b8eda66b6768735c0f6dcd"}))}onNavbarToggled(e){this.isNavbarCollapsed=e.detail.payload,this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}onResize(){this.windowResizeObserver()}windowResizeHandler(){this.isLowResolution=n.WindowService.getWindow().innerWidth<=768,this.isLowResolution||this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}handleAuthChange(e){var t;e&&this.authEvents.includes(e)&&(this.authStorageService.isAuthenticated()?(0,n.navigate)(null!==(t=this.navigationContextService.getPreviousRoute())&&void 0!==t?t:"./"):(0,n.navigate)("login"),n.WindowService.getWindow().location.reload())}subscribeToSecurityChanges(){const e=(0,n.service)(n.SecurityContextService);this.subscriptions.add(e.onAuthenticatedUserChanged(e=>{this.authenticatedUser=e,this.updateVisibility()})),this.subscriptions.add(e.onSecurityConfigChanged(e=>{this.securityConfig=e,this.updateVisibility()})),this.subscriptions.add(this.eventService.subscribe(n.EventName.LOGIN,()=>{this.setNavbarItemVisibility(),this.updateVisibility()})),this.subscriptions.add(this.eventService.subscribe(n.EventName.LOGOUT,()=>{this.setNavbarItemVisibility(),this.updateVisibility(),(0,n.navigate)("login")}))}subscribeToRuntimeConfigurationChanges(){this.subscriptions.add(this.runtimeConfigurationContextService.onRuntimeConfigurationChanged(e=>{var t;this.isEmbedded=null!==(t=null==e?void 0:e.isEmbedded)&&void 0!==t&&t}))}updateVisibility(){this.authenticationService.isSecurityEnabled()?(this.showHeader=this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess(),this.showNavbar=this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess()):(this.showNavbar=!0,this.showHeader=!0)}isAuthenticatedFully(){return!this.authenticationService.isSecurityEnabled()||this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess()}shouldShowMenu(e){return this.isAuthenticatedFully()&&this.authorizationService.hasRole(e)}assignNavbarRef(){return e=>{this.navbarRef=e,this.navbarRef&&(this.navbarRef.menuItems=n.WindowService.getWindow().PluginRegistry.get("main.menu"),this.setNavbarItemVisibility())}}setNavbarItemVisibility(){var e,t,i;if(!(null===(e=this.navbarRef)||void 0===e?void 0:e.menuItems))return;const a=e=>{var t;e.shouldShow=this.shouldShowMenu(e.role),(null===(t=e.children)||void 0===t?void 0:t.length)&&e.children.forEach(a)};null===(i=null===(t=this.navbarRef)||void 0===t?void 0:t.menuItems)||void 0===i||i.forEach(e=>{e.items.forEach(a)}),this.navbarRef.menuItems=[...this.navbarRef.menuItems]}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(n.EventName.NAVIGATION_END,e=>{this.navigationContextService.updatePreviousRoute(e.oldUrl)}))}subscribeToApplicationChange(){this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateBeforeChange(e=>{e&&(this.loading=!0)})),this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateChange(e=>{e&&(this.loading=!1)}))}get hostElement(){return(0,a.c)(this)}};o.style=':host{display:block;height:100%}.wb-layout{display:grid;grid-template:"header header" auto "nav main" 1fr "nav footer" auto/15rem minmax(200px, 1fr);min-height:100vh;margin:0;}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout.is-embedded{grid-template-columns:1fr;grid-template-areas:"main";padding-top:1rem}.wb-layout.hide-navbar{grid-template:"header" auto "main" 1fr "footer" auto/1fr;}.wb-layout.hide-navbar.expanded{grid-template-columns:1fr}.wb-layout main .main-container{margin-left:0}.wb-layout .main-slot-wrapper .loader-wrapper{flex-grow:1;display:flex;align-items:center;justify-content:center}.wb-layout .main-slot-wrapper.loading{display:flex;flex-direction:column}.wb-layout .main-slot-wrapper.loading .page-content{visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout header{grid-area:header}.wb-layout main{grid-area:main}.wb-layout footer{grid-area:footer}'},63952(e,t,i){function a(e,t=300){let i;return(...a)=>{clearTimeout(i),i=setTimeout(()=>e.apply(this,a),t)}}i.d(t,{d:()=>a})},79939(e,t,i){i.d(t,{L:()=>n,T:()=>o,s:()=>s});var a=i(57154);function s(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}class n{static get logger(){return a.Loggers.getLoggerInstance("SharedComponents")}}class r{constructor(){this.languageContextService=a.ServiceProvider.get(a.LanguageContextService),this.translationChangedObservers={},this.logger=n.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],i=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const a={parameters:t,callback:i};return this.translationChangedObservers[e].push(a),i(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(a);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let i=this.translateFromBundle(this.currentBundle,e);return i||(i=this.translateFromBundle(this.defaultBundle,e)),i?(i=this.applyParameters(i,t),s(i)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let i=e[t];return"string"!=typeof i&&(i=this.translateAsJsonObject(e,t)),i}translateAsJsonObject(e,t){let i=t.split(".");return this.getTranslation(e,i)}getTranslation(e,t){if(!t||!e)return;const i=e[t.splice(0,1)[0]];return 0===t.length?i:"string"!=typeof i?t.length>0?this.getTranslation(i,t):i:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>r.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const o=new r}};
2
+ //# sourceMappingURL=39874.17dde6245fc4cc91bb58.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"39874.17dde6245fc4cc91bb58.bundle.js","mappings":"oNAKA,MASMA,EAAa,MAIfC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBC,KAAMF,GAIvBE,KAAKC,uBAAwBC,EAAAA,EAAAA,SAAQC,EAAAA,uBACrCH,KAAKI,sBAAuBF,EAAAA,EAAAA,SAAQG,EAAAA,sBACpCL,KAAKM,0BAA2BJ,EAAAA,EAAAA,SAAQK,EAAAA,0BACxCP,KAAKQ,oBAAqBN,EAAAA,EAAAA,SAAQO,EAAAA,8BAClCT,KAAKU,oCAAqCR,EAAAA,EAAAA,SAAQS,EAAAA,oCAClDX,KAAKY,cAAeV,EAAAA,EAAAA,SAAQW,EAAAA,cAC5Bb,KAAKc,oCAAqCZ,EAAAA,EAAAA,SAAQa,EAAAA,oCAClDf,KAAKgB,WAAa,GAAGC,EAAAA,WAAWC,oBAAoBlB,KAAKQ,mBAAmBW,aAAanB,KAAKQ,mBAAmBY,SACjHpB,KAAKqB,qBAAuB,GAAGJ,EAAAA,WAAWC,oBAAoBlB,KAAKQ,mB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,mBAAAA,CAAoBI,EAAQjI,GACxB,IAAKiI,EACD,OAIJ,IAAIL,EAAcK,EAAOjI,GAKzB,MAH2B,iBAAhB4H,IACPA,EAAcjK,KAAKuK,sBAAsBD,EAAQjI,IAE9C4H,CACX,CAUAM,qBAAAA,CAAsBD,EAAQjI,GAC1B,IAAImI,EAAOnI,EAAIoI,MAAM,KACrB,OAAOzK,KAAK0K,eAAeJ,EAAQE,EACvC,CASAE,cAAAA,CAAeC,EAAYH,GAEvB,IAAKA,IAASG,EACV,OAEJ,MAAMC,EAAoBD,EAAWH,EAAKT,OAAO,EAAG,GAAG,IACvD,OAAoB,IAAhBS,EAAK1D,OACE8D,EAEsB,iBAAtBA,EAEHJ,EAAK1D,OAAS,EACP9G,KAAK0K,eAAeE,EAAmBJ,GAE3CI,OALX,CAQJ,CACAR,eAAAA,CAAgBH,EAAaP,GACzB,OAAIA,EACOA,EAAWmB,OAElB,CAACZ,EAAaa,IAAcjC,EAAkCkC,WAAWd,EAAaa,GAAYb,GAE/FA,CACX,CACA,iBAAOc,CAAWd,EAAaa,GAC3B,OAAOA,EAAYb,EAAYQ,MAAM,KAAKK,EAAUzI,SAAS2I,KAAKF,EAAUtC,OAASyB,CACzF,CACAgB,yBAAAA,GACIC,OAAOC,KAAKnL,KAAKiJ,6BAA6BlC,QAASqE,KACjCpL,KAAKiJ,4BAA4BmC,IAAc,IACvDrE,QAAS0C,GAAaA,EAASE,SAAS3J,KAAK+D,UAAUqH,EAAW3B,EAASC,eAE7F,CACAN,uBAAAA,GACIpJ,KAAKqL,2BAA6BrL,KAAK8I,uBAAuBwC,wBAAyBhB,IAC/EA,IACAtK,KAAKmK,cAAgBG,EACrBtK,KAAKiL,8BAGjB,CACAM,OAAAA,GACQvL,KAAKqL,4BACLrL,KAAKqL,4BAEb,EAEJ,MAAMvH,EAAqB,IAAI+E,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/onto-layout.entry.js","webpack://root-config/./packages/shared-components/dist/esm/function-utils-D1ZpXQQS.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-nljGIprK.js"],"sourcesContent":["import { r as registerInstance, h, a as Host, c as getElement } from './index-EiAqSNMq.js';\nimport { d as debounce } from './function-utils-D1ZpXQQS.js';\nimport { service, AuthenticationService, AuthorizationService, NavigationContextService, AuthenticationStorageService, RuntimeConfigurationContextService, EventService, ApplicationLifecycleContextService, StorageKey, SubscriptionList, LocalStorageSubscriptionHandlerService, WindowService, navigate, SecurityContextService, EventName } from '@ontotext/workbench-api';\nimport { T as TranslationService } from './translation.service-nljGIprK.js';\n\nconst RESPONSIVE_BREAKPOINTS = {\n MD: 768};\n/**\n * The width of the window in pixels at which the navbar should collapse.\n */\nconst WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR = RESPONSIVE_BREAKPOINTS.MD;\n\nconst ontoLayoutCss = \":host{display:block;height:100%}.wb-layout{display:grid;grid-template:\\\"header header\\\" auto \\\"nav main\\\" 1fr \\\"nav footer\\\" auto/15rem minmax(200px, 1fr);min-height:100vh;margin:0;}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout.is-embedded{grid-template-columns:1fr;grid-template-areas:\\\"main\\\";padding-top:1rem}.wb-layout.hide-navbar{grid-template:\\\"header\\\" auto \\\"main\\\" 1fr \\\"footer\\\" auto/1fr;}.wb-layout.hide-navbar.expanded{grid-template-columns:1fr}.wb-layout main .main-container{margin-left:0}.wb-layout .main-slot-wrapper .loader-wrapper{flex-grow:1;display:flex;align-items:center;justify-content:center}.wb-layout .main-slot-wrapper.loading{display:flex;flex-direction:column}.wb-layout .main-slot-wrapper.loading .page-content{visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout header{grid-area:header}.wb-layout main{grid-area:main}.wb-layout footer{grid-area:footer}\";\n\nconst OntoLayout = class {\n // ========================\n // Lifecycle methods\n // ========================\n constructor(hostRef) {\n registerInstance(this, hostRef);\n // ========================\n // Services\n // ========================\n this.authenticationService = service(AuthenticationService);\n this.authorizationService = service(AuthorizationService);\n this.navigationContextService = service(NavigationContextService);\n this.authStorageService = service(AuthenticationStorageService);\n this.runtimeConfigurationContextService = service(RuntimeConfigurationContextService);\n this.eventService = service(EventService);\n this.applicationLifecycleContextService = service(ApplicationLifecycleContextService);\n this.fullJwtKey = `${StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.jwtKey}`;\n this.fullAuthenticatedKey = `${StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.authenticatedKey}`;\n this.authEvents = [this.fullJwtKey, this.fullAuthenticatedKey];\n this.isLowResolution = false;\n this.showHeader = this.isAuthenticatedFully();\n this.showNavbar = false;\n this.isEmbedded = false;\n this.loading = true;\n // ========================\n // Private\n // ========================\n /**\n * List of subscriptions to manage component lifecycle\n * */\n this.subscriptions = new SubscriptionList();\n this.isNavbarCollapsed = false;\n this.handleStorageChange = (event) => {\n const localStorageSubscriptionHandlerService = service(LocalStorageSubscriptionHandlerService);\n localStorageSubscriptionHandlerService.handleStorageChange(event);\n this.handleAuthChange(event.key);\n };\n this.windowResizeObserver = debounce(() => this.windowResizeHandler(), 50);\n WindowService.getWindow().addEventListener('storage', this.handleStorageChange);\n }\n componentDidLoad() {\n this.windowResizeHandler();\n }\n connectedCallback() {\n this.subscribeToSecurityChanges();\n this.updateVisibility();\n this.subscribeToNavigationEnd();\n this.subscribeToRuntimeConfigurationChanges();\n this.subscribeToApplicationChange();\n }\n /**\n * Lifecycle method called when the component is about to be removed from the DOM.\n * Unsubscribes from all subscriptions to prevent memory leaks.\n */\n disconnectedCallback() {\n this.subscriptions.unsubscribeAll();\n }\n render() {\n return (h(Host, { key: 'b8cbbca1f12bf6af844e18397d2a725d6ab4e1fc', class: {\n 'wb-layout': true,\n 'is-embedded': this.isEmbedded,\n 'hide-navbar': !this.showNavbar\n } }, h(\"div\", { key: 'f2e3b7a238b82536bd7605196966bd758330c521', class: \"default-slot-wrapper\" }, h(\"slot\", { key: '5d391e2f612d9aead6c07b2ef3641b961eddc504', name: \"default\" })), !this.isEmbedded &&\n h(\"header\", { key: 'e43c5b68d590e12b2b3e95d4c414505f1fc82abb', class: \"wb-header\" }, this.showHeader && h(\"onto-header\", { key: '21102b279bed2dd3ee857b399683d14c5f3eaf57' })), !this.isEmbedded && this.showNavbar &&\n h(\"nav\", { key: '67dcbf444a30ac933ba83f86ae9f8d08fe5f995f', class: \"wb-navbar\" }, h(\"onto-navbar\", { key: 'a9816369cbbac4d5b58f607be61277d6074556bd', ref: this.assignNavbarRef(), \"navbar-collapsed\": this.isLowResolution })), h(\"div\", { key: 'f3ff0e1734eecc433dc20717e0b9f2871ea40dae', class: { 'main-slot-wrapper': true, 'loading': this.loading } }, this.loading && h(\"div\", { key: '17d9a8024d280f70ad8684e5d114c38b184b529d', class: \"loader-wrapper\" }, h(\"onto-loader\", { key: '534a5d8f89b92051822d1d7750ca56894013c142', size: 96, messageText: TranslationService.translate('common.loading') })), h(\"slot\", { key: 'bcd21d932551dc6f9b9365ccbbafae690f8b7245', name: \"main\" })), !this.isEmbedded &&\n h(\"footer\", { key: '9fcd224439dbb7fd35bb4c277dc343eccab40087', class: \"wb-footer\" }, h(\"onto-footer\", { key: '39d5d1c8275c527ca16aa74f6f15dc3f0cc3686c' })), h(\"onto-tooltip\", { key: '6a70e6d2d67e8a9aa6b8eda66b6768735c0f6dcd' })));\n }\n // ========================\n // Event Listeners\n // ========================\n /**\n * Event listener for the navbar toggled event. The layout needs to respond properly when the navbar is toggled in\n * order to fit the content.\n * @param event\n */\n onNavbarToggled(event) {\n this.isNavbarCollapsed = event.detail.payload;\n if (this.isNavbarCollapsed) {\n this.hostElement.classList.add('expanded');\n }\n else {\n this.hostElement.classList.remove('expanded');\n }\n }\n /**\n * Event listener for window resize event. We need to handle this in order to allow the navbar to collapse when the\n * window is resized.\n */\n onResize() {\n this.windowResizeObserver();\n }\n // ========================\n // Handlers\n // ========================\n windowResizeHandler() {\n this.isLowResolution = WindowService.getWindow().innerWidth <= WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR;\n if (!this.isLowResolution && !this.isNavbarCollapsed) {\n this.hostElement.classList.remove('expanded');\n }\n else {\n this.hostElement.classList.add('expanded');\n }\n }\n handleAuthChange(changedKey) {\n var _a;\n if (!changedKey) {\n return;\n }\n if (this.authEvents.includes(changedKey)) {\n const authenticated = this.authStorageService.isAuthenticated();\n if (authenticated) {\n navigate((_a = this.navigationContextService.getPreviousRoute()) !== null && _a !== void 0 ? _a : './');\n }\n else {\n navigate('login');\n }\n WindowService.getWindow().location.reload();\n }\n }\n // ========================\n // Security & Permissions\n // ========================\n subscribeToSecurityChanges() {\n const securityContextService = service(SecurityContextService);\n this.subscriptions.add(securityContextService.onAuthenticatedUserChanged((authenticatedUser) => {\n this.authenticatedUser = authenticatedUser;\n this.updateVisibility();\n }));\n this.subscriptions.add(securityContextService.onSecurityConfigChanged((securityConfig) => {\n this.securityConfig = securityConfig;\n this.updateVisibility();\n }));\n this.subscriptions.add(this.eventService.subscribe(EventName.LOGIN, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n }));\n this.subscriptions.add(this.eventService.subscribe(EventName.LOGOUT, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n navigate('login');\n }));\n }\n subscribeToRuntimeConfigurationChanges() {\n this.subscriptions.add(this.runtimeConfigurationContextService.onRuntimeConfigurationChanged((config) => {\n var _a;\n this.isEmbedded = (_a = config === null || config === void 0 ? void 0 : config.isEmbedded) !== null && _a !== void 0 ? _a : false;\n }));\n }\n updateVisibility() {\n if (!this.authenticationService.isSecurityEnabled()) {\n this.showNavbar = true;\n this.showHeader = true;\n }\n else {\n this.showHeader = this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n this.showNavbar = this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n }\n }\n isAuthenticatedFully() {\n return !this.authenticationService.isSecurityEnabled() || this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n }\n shouldShowMenu(role) {\n return this.isAuthenticatedFully() && this.authorizationService.hasRole(role);\n }\n // ========================\n // Navbar logic\n // ========================\n assignNavbarRef() {\n return (navbar) => {\n this.navbarRef = navbar;\n if (!this.navbarRef) {\n return;\n }\n this.navbarRef.menuItems = WindowService.getWindow().PluginRegistry.get('main.menu');\n this.setNavbarItemVisibility();\n };\n }\n setNavbarItemVisibility() {\n var _a, _b, _c;\n if (!((_a = this.navbarRef) === null || _a === void 0 ? void 0 : _a.menuItems)) {\n return;\n }\n // recursively check for children and set their shouldShow property\n const processItem = (item) => {\n var _a;\n item.shouldShow = this.shouldShowMenu(item.role);\n if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {\n item.children.forEach(processItem);\n }\n };\n (_c = (_b = this.navbarRef) === null || _b === void 0 ? void 0 : _b.menuItems) === null || _c === void 0 ? void 0 : _c.forEach(plugin => {\n plugin.items.forEach(processItem);\n });\n // Update the reference to trigger a re-render\n this.navbarRef.menuItems = [...this.navbarRef.menuItems];\n }\n subscribeToNavigationEnd() {\n this.subscriptions.add(this.eventService.subscribe(EventName.NAVIGATION_END, (navigationEndPayload) => {\n this.navigationContextService.updatePreviousRoute(navigationEndPayload.oldUrl);\n }));\n }\n subscribeToApplicationChange() {\n this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateBeforeChange((state) => {\n if (state) {\n this.loading = true;\n }\n }));\n this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateChange((state) => {\n if (state) {\n this.loading = false;\n }\n }));\n }\n get hostElement() { return getElement(this); }\n};\nOntoLayout.style = ontoLayoutCss;\n\nexport { OntoLayout as onto_layout };\n","function debounce(func, wait = 300) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => func.apply(this, args), wait);\n };\n}\n\nexport { debounce as d };\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":["OntoLayout","constructor","hostRef","registerInstance","this","authenticationService","service","AuthenticationService","authorizationService","AuthorizationService","navigationContextService","NavigationContextService","authStorageService","AuthenticationStorageService","runtimeConfigurationContextService","RuntimeConfigurationContextService","eventService","EventService","applicationLifecycleContextService","ApplicationLifecycleContextService","fullJwtKey","StorageKey","GLOBAL_NAMESPACE","NAMESPACE","jwtKey","fullAuthenticatedKey","authenticatedKey","authEvents","isLowResolution","showHeader","isAuthenticatedFully","showNavbar","isEmbedded","loading","subscriptions","SubscriptionList","isNavbarCollapsed","handleStorageChange","event","LocalStorageSubscriptionHandlerService","handleAuthChange","key","windowResizeObserver","debounce","windowResizeHandler","WindowService","getWindow","addEventListener","componentDidLoad","connectedCallback","subscribeToSecurityChanges","updateVisibility","subscribeToNavigationEnd","subscribeToRuntimeConfigurationChanges","subscribeToApplicationChange","disconnectedCallback","unsubscribeAll","render","h","Host","class","name","ref","assignNavbarRef","size","messageText","TranslationService","translate","onNavbarToggled","detail","payload","hostElement","classList","add","remove","onResize","innerWidth","changedKey","_a","includes","isAuthenticated","navigate","getPreviousRoute","location","reload","securityContextService","SecurityContextService","onAuthenticatedUserChanged","authenticatedUser","onSecurityConfigChanged","securityConfig","subscribe","EventName","LOGIN","setNavbarItemVisibility","LOGOUT","onRuntimeConfigurationChanged","config","isSecurityEnabled","hasFreeAccess","shouldShowMenu","role","hasRole","navbar","navbarRef","menuItems","PluginRegistry","get","_b","_c","processItem","item","shouldShow","children","length","forEach","plugin","items","NAVIGATION_END","navigationEndPayload","updatePreviousRoute","oldUrl","onApplicationStateBeforeChange","state","onApplicationStateChange","getElement","style","func","wait","timer","args","clearTimeout","setTimeout","apply","sanitizeHTML","html","element","document","createElement","innerHTML","value","LoggerProvider","logger","Loggers","getLoggerInstance","TranslationServiceClassDefinition","languageContextService","ServiceProvider","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","onTranslate","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","index","indexOf","splice","translateInLocale","translation","translateFromBundle","currentBundle","applyParameters","warn","bundle","translateAsJsonObject","path","split","getTranslation","jsonObject","jsonOrTranslation","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_esm_id__=45758;export const __webpack_esm_ids__=[45758];export const __webpack_esm_modules__={45758(e,t,n){n.r(t),n.d(t,{translate_label:()=>r});var s=n(55508),a=n(79939);n(57154);const r=class{constructor(e){(0,s.r)(this,e),this.unsubscribeTranslationChanged=null,this.translationParameters=[]}connectedCallback(){this.unsubscribeTranslationChanged=a.T.onTranslate(this.labelKey,this.translationParameters,e=>this.translatedLabel=e)}disconnectedCallback(){this.unsubscribeTranslationChanged&&(this.unsubscribeTranslationChanged(),this.unsubscribeTranslationChanged=null)}render(){return(0,s.h)(s.a,{key:"6f43411609ffbb55a072585c7c1bdd149422b066"},this.translatedLabel)}};r.style=":host{display:inline}"},79939(e,t,n){n.d(t,{L:()=>r,T:()=>l,s:()=>a});var s=n(57154);function a(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}class r{static get logger(){return s.Loggers.getLoggerInstance("SharedComponents")}}class i{constructor(){this.languageContextService=s.ServiceProvider.get(s.LanguageContextService),this.translationChangedObservers={},this.logger=r.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],n=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const s={parameters:t,callback:n};return this.translationChangedObservers[e].push(s),n(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(s);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let n=this.translateFromBundle(this.currentBundle,e);return n||(n=this.translateFromBundle(this.defaultBundle,e)),n?(n=this.applyParameters(n,t),a(n)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let n=e[t];return"string"!=typeof n&&(n=this.translateAsJsonObject(e,t)),n}translateAsJsonObject(e,t){let n=t.split(".");return this.getTranslation(e,n)}getTranslation(e,t){if(!t||!e)return;const n=e[t.splice(0,1)[0]];return 0===t.length?n:"string"!=typeof n?t.length>0?this.getTranslation(n,t):n:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>i.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const l=new i}};
2
- //# sourceMappingURL=45758.1212136a37dd4f7528f8.bundle.js.map
1
+ export const __webpack_esm_id__=45758;export const __webpack_esm_ids__=[45758];export const __webpack_esm_modules__={45758(e,t,n){n.r(t),n.d(t,{translate_label:()=>r});var s=n(76133),a=n(79939);n(57154);const r=class{constructor(e){(0,s.r)(this,e),this.unsubscribeTranslationChanged=null,this.translationParameters=[]}connectedCallback(){this.unsubscribeTranslationChanged=a.T.onTranslate(this.labelKey,this.translationParameters,e=>this.translatedLabel=e)}disconnectedCallback(){this.unsubscribeTranslationChanged&&(this.unsubscribeTranslationChanged(),this.unsubscribeTranslationChanged=null)}render(){return(0,s.h)(s.a,{key:"6f43411609ffbb55a072585c7c1bdd149422b066"},this.translatedLabel)}};r.style=":host{display:inline}"},79939(e,t,n){n.d(t,{L:()=>r,T:()=>l,s:()=>a});var s=n(57154);function a(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}class r{static get logger(){return s.Loggers.getLoggerInstance("SharedComponents")}}class i{constructor(){this.languageContextService=s.ServiceProvider.get(s.LanguageContextService),this.translationChangedObservers={},this.logger=r.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],n=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const s={parameters:t,callback:n};return this.translationChangedObservers[e].push(s),n(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(s);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let n=this.translateFromBundle(this.currentBundle,e);return n||(n=this.translateFromBundle(this.defaultBundle,e)),n?(n=this.applyParameters(n,t),a(n)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let n=e[t];return"string"!=typeof n&&(n=this.translateAsJsonObject(e,t)),n}translateAsJsonObject(e,t){let n=t.split(".");return this.getTranslation(e,n)}getTranslation(e,t){if(!t||!e)return;const n=e[t.splice(0,1)[0]];return 0===t.length?n:"string"!=typeof n?t.length>0?this.getTranslation(n,t):n:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>i.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const l=new i}};
2
+ //# sourceMappingURL=45758.b9ce5fe0ed6c8c4fc141.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"45758.b9ce5fe0ed6c8c4fc141.bundle.js","mappings":"2MAIA,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,+DCF1B,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,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H,GAEvB,IAAKA,IAASG,EACV,OAEJ,MAAMC,EAAoBD,EAAWH,EAAKT,OAAO,EAAG,GAAG,IACvD,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-EiAqSNMq.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: '6f43411609ffbb55a072585c7c1bdd149422b066' }, 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"],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_esm_id__=60560;export const __webpack_esm_ids__=[60560];export const __webpack_esm_modules__={60560(e,t,a){a.r(t),a.d(t,{onto_cookie_consent:()=>s,onto_cookie_policy_dialog:()=>r});var o=a(55508),c=a(79939),i=a(57154),n=a(63952);const s=class{constructor(e){(0,o.r)(this,e),this.consentGiven=(0,o.c)(this,"consentGiven"),this.showModal=!1,this.openModal=e=>{e.preventDefault(),this.showModal=!0},this.handleConsentClick=()=>{this.consentGiven.emit()}}onDialogClose(){this.showModal=!1}render(){return(0,o.h)(o.a,{key:"dba3fc373e9ad60ada7f86d11acbe1b1ed24a92d"},(0,o.h)("div",{key:"8f1dff5a6b271f721d2079ec44a14207eff38025",class:"cookie-consent-banner"},(0,o.h)("section",{key:"93d51c3f88e12ff6fc5a57506eab507eca5420cb",class:"cookie-consent-content"},(0,o.h)("span",{key:"72be975026e8717da4ab4d99d5560f96017d4436"},(0,o.h)("translate-label",{key:"b49c8182a2e94cffb22abb03dd4f2e6c9a7c6b5e",labelKey:"cookie.cookie_consent"}),(0,o.h)("a",{key:"79675cf4d9c026666093ff3205818f48b845083f",id:"cookie-policy-link",href:"#",onClick:this.openModal,class:"btn btn-link p-0"},(0,o.h)("translate-label",{key:"8c83694879ff4fb7cce5aa8f3363220767b54c13",labelKey:"cookie.cookie_policy_url_label"})),"."),(0,o.h)("button",{key:"dfa75c1bd990929564a7b3b61264e1978ea24c95",id:"accept-cookie-policy",class:"onto-btn onto-btn-primary",onClick:this.handleConsentClick},(0,o.h)("translate-label",{key:"7a36cad2b993c7aa29f4d64adcf8e359331bdb28",labelKey:"common.button.ok"})))),this.showModal&&(0,o.h)("onto-cookie-policy-dialog",{key:"1daa9af32d60159763f1ea052c1c87e6f4bfdb3e"}))}};var l;s.style=".cookie-consent-banner{position:fixed;bottom:0;left:0;right:0;background-color:var(--gw-dialog-background);box-shadow:0 -2px 10px rgba(0, 0, 0, 0.1);padding:20px;z-index:1050;width:100%}.cookie-consent-banner .cookie-consent-content{display:flex;justify-content:center;align-items:center}.cookie-consent-banner .cookie-consent-content button{margin-left:12px}.cookie-policy-modal{padding:24px 40px;overflow-y:auto}.cookie-policy-modal .modal-dialog{width:60% !important;max-width:60% !important}.cookie-policy-modal .title{font-size:xx-large;font-weight:bolder}.cookie-policy-modal .heading{font-size:x-large;font-weight:bolder;margin-top:12px}.cookie-policy-modal .subheading{font-size:large;font-weight:bolder;margin-top:8px}.cookie-policy-modal .text{font-size:math}",function(e){e.THIRD_PARTY="thirdParty",e.STATISTIC="statistic"}(l||(l={}));const r=class{constructor(e){(0,o.r)(this,e),this.closeDialog=(0,o.c)(this,"closeDialog"),this.logger=c.L.logger,this.securityContextService=(0,i.service)(i.SecurityContextService),this.securityService=(0,i.service)(i.SecurityService),this.trackingService=(0,i.service)(i.TrackingService),this.toggleChangedDebounced=(0,n.d)(e=>this.toggleChanged(e),300)}toggleChangeHandler(e){this.toggleChangedDebounced(e)}toggleChanged(e){this.setUserCookieConsent(this.updateCookieConsent(e.detail)),this.securityService.updateAuthenticatedUser(this.user.toUser()).then(()=>this.securityContextService.updateAuthenticatedUser(this.user)).catch(this.logger.error).finally(()=>this.trackingService.applyTrackingConsent())}connectedCallback(){this.user=this.securityContextService.getAuthenticatedUser(),this.cookieConsent=this.trackingService.getCookieConsent()}render(){var e,t;const a={dialogTitle:c.T.translate("cookie.policy.title"),onClose:()=>this.closePolicyDialog(),modalClass:"cookie-policy-modal"};return(0,o.h)("onto-dialog",{key:"bdd402a836636e6c15811b3615703ea1eebd8d7c",config:a},(0,o.h)("div",{key:"1f1b4d80214907ae882b7322c48190f2152e12d9",slot:"body"},(0,o.h)("section",{key:"1b1a59be322de2736ca62ad373a51d18a1a06b79"},(0,o.h)("h4",{key:"dede6b4f005e6a661675479f5531ddad7a0235d4"},(0,o.h)("translate-label",{key:"ee1741896c0ff590ab9efbec9bf0a5025a30909f",labelKey:"cookie.policy.purpose_heading"})),(0,o.h)("p",{key:"e4a5b233c2809f901dd182f8d9aec0de27fc2099"},(0,o.h)("translate-label",{key:"631d8eb62fb92be49d0ded38b6aa1a280948ae19",labelKey:"cookie.policy.purpose_text"})),(0,o.h)("p",{key:"1254f3f2632b00bb296c00454a7df7d5b383ece5"},(0,o.h)("translate-label",{key:"5ceda3dada67081dbd17e1afa867a24a9016a564",labelKey:"cookie.policy.purpose_enterprise_text"}))),(0,o.h)("section",{key:"4796f96a4798348052387f6d379fcb2057c4b660"},(0,o.h)("h4",{key:"2ef14f483c1ff6fd1ecb891f7b9a6ed57b628805"},(0,o.h)("translate-label",{key:"09481c09192b35faa19b2006bdc3b21a9589cbdc",labelKey:"cookie.policy.privacy_commitment_heading"})),(0,o.h)("p",{key:"2cca9fe31f8f315c9ea123240bffc22f43bdfa77"},(0,o.h)("translate-label",{key:"4e8a55d364dffb76ea88c395967abd1681ceeec0",labelKey:"cookie.policy.privacy_commitment_text"})),(0,o.h)("ul",{key:"ceac17908898768e92263452faa0d05b654355aa"},(0,o.h)("li",{key:"c72361f5d3c17e068041f66e1986ba2152153f56"},(0,o.h)("translate-label",{key:"66a3534fd00d05e038c566c47c27a817e0840312",labelKey:"cookie.policy.privacy_commitment_1"})),(0,o.h)("li",{key:"f64a3900424c3df46fabaa81b710626445dd25b9"},(0,o.h)("translate-label",{key:"1e0e45ea0bba3f66f483217514006e685544f7ce",labelKey:"cookie.policy.privacy_commitment_2"})))),(0,o.h)("section",{key:"5046d6f2a87f421da264d8ca56e586c96806c8d2"},(0,o.h)("h4",{key:"f29934a5affad89f5f29bc18aaf4e0a7431a676c"},(0,o.h)("translate-label",{key:"88786391aa0c7dfee08e8a69c44cdc8f2fdf86ba",labelKey:"cookie.policy.cookies_heading"})),(0,o.h)("p",{key:"30445e55fede20a71babaac4656b2aa04bf95029"},(0,o.h)("translate-label",{key:"f0a85e21c58d6192b7173a2fdcdadb0cac500d51",labelKey:"cookie.policy.cookies_text"}))),(0,o.h)("section",{key:"6d63492ca8e98e66ee3dac34a9f2d4804598aae3"},(0,o.h)("h4",{key:"2acb72a66961b4a7669421631c567ae220c37340"},(0,o.h)("translate-label",{key:"150994d027db50124deb8382ff86defd4d9f73ca",labelKey:"cookie.policy.manage_cookies_heading"})),(0,o.h)("onto-toggle-switch",{key:"abe22d435107f38ff392ece9b1e93436b18d8865",class:"statistic-cookies-toggle",checked:null===(e=this.cookieConsent)||void 0===e?void 0:e.statistic,labelKey:"cookie.policy.statistic_cookies",tooltipTranslationKey:"cookie.policy.statistic_tooltip",context:l.STATISTIC}),(0,o.h)("p",{key:"c58bd5346cbf64fc806476af9aca4114ffdf2f19"},(0,o.h)("translate-label",{key:"5494f13d7c4e5e9b8ad1dd2833d61dcf8abbaadb",labelKey:"cookie.policy.statistic_text"})),(0,o.h)("onto-toggle-switch",{key:"a126d4e367ac72f3afabf4cbcad60600c1674256",class:"third-party-cookies-toggle",checked:null===(t=this.cookieConsent)||void 0===t?void 0:t.thirdParty,labelKey:"cookie.policy.third_party_cookies",tooltipTranslationKey:"cookie.policy.third_party_tooltip",context:l.THIRD_PARTY}),(0,o.h)("p",{key:"98eaa1cd8bf32b975fbf6158151c23ecb75ae775"},(0,o.h)("translate-label",{key:"3e3480010862cba108e3b2a2ea132e2ec8f7d38f",labelKey:"cookie.policy.third_party_cookies_text"}))),(0,o.h)("p",{key:"2f229fbfb8e618771c96ff69022bdbe41ae073aa"},(0,o.h)("span",{key:"89601e4bda0080f30395f7ab7717ed2894003df4"},(0,o.h)("translate-label",{key:"7e1c004df16f9c96593bd08ed572f330980f9b1f",labelKey:"cookie.policy.change_cookies"}),(0,o.h)("i",{key:"0b63d510ac728e75687dbfb89baf199a7ff789ac"}," ",(0,o.h)("translate-label",{key:"84ca2e5206973463bb76e464c0de825778b5161c",labelKey:"menu.setup.label"})," > ",(0,o.h)("translate-label",{key:"8cd61ed1aa3b45d15845da57adba70c0136cc465",labelKey:"menu.my.settings.label"})," > ",(0,o.h)("translate-label",{key:"a540e7209ce07f18cade46ca26593c067f0e5967",labelKey:"security.user.settings"})," > ",(0,o.h)("translate-label",{key:"122e0f07061903adb8e68ac632766cdce0544140",labelKey:"cookie.policy.change_cookies_location4"})," ")))))}closePolicyDialog(){this.closeDialog.emit()}updateCookieConsent(e){return this.cookieConsent[e.context]=e.checked,this.cookieConsent.updatedAt=i.DateUtil.now(),this.cookieConsent}setUserCookieConsent(e){this.user.appSettings||this.user.setAppSettings(),this.user.appSettings.COOKIE_CONSENT=e}};r.style="section h4{font-size:x-large;font-weight:bolder;margin-top:12px}"},63952(e,t,a){function o(e,t=300){let a;return(...o)=>{clearTimeout(a),a=setTimeout(()=>e.apply(this,o),t)}}a.d(t,{d:()=>o})},79939(e,t,a){a.d(t,{L:()=>i,T:()=>s,s:()=>c});var o=a(57154);function c(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}class i{static get logger(){return o.Loggers.getLoggerInstance("SharedComponents")}}class n{constructor(){this.languageContextService=o.ServiceProvider.get(o.LanguageContextService),this.translationChangedObservers={},this.logger=i.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],a=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const o={parameters:t,callback:a};return this.translationChangedObservers[e].push(o),a(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(o);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let a=this.translateFromBundle(this.currentBundle,e);return a||(a=this.translateFromBundle(this.defaultBundle,e)),a?(a=this.applyParameters(a,t),c(a)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let a=e[t];return"string"!=typeof a&&(a=this.translateAsJsonObject(e,t)),a}translateAsJsonObject(e,t){let a=t.split(".");return this.getTranslation(e,a)}getTranslation(e,t){if(!t||!e)return;const a=e[t.splice(0,1)[0]];return 0===t.length?a:"string"!=typeof a?t.length>0?this.getTranslation(a,t):a:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>n.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const s=new n}};
2
- //# sourceMappingURL=60560.6ba1b091a34af6c00770.bundle.js.map
1
+ export const __webpack_esm_id__=60560;export const __webpack_esm_ids__=[60560];export const __webpack_esm_modules__={60560(e,t,a){a.r(t),a.d(t,{onto_cookie_consent:()=>s,onto_cookie_policy_dialog:()=>r});var o=a(76133),i=a(79939),c=a(57154),n=a(63952);const s=class{constructor(e){(0,o.r)(this,e),this.consentGiven=(0,o.d)(this,"consentGiven"),this.showModal=!1,this.openModal=e=>{e.preventDefault(),this.showModal=!0},this.handleConsentClick=()=>{this.consentGiven.emit()}}onDialogClose(){this.showModal=!1}render(){return(0,o.h)(o.a,{key:"dba3fc373e9ad60ada7f86d11acbe1b1ed24a92d"},(0,o.h)("div",{key:"8f1dff5a6b271f721d2079ec44a14207eff38025",class:"cookie-consent-banner"},(0,o.h)("section",{key:"93d51c3f88e12ff6fc5a57506eab507eca5420cb",class:"cookie-consent-content"},(0,o.h)("span",{key:"72be975026e8717da4ab4d99d5560f96017d4436"},(0,o.h)("translate-label",{key:"b49c8182a2e94cffb22abb03dd4f2e6c9a7c6b5e",labelKey:"cookie.cookie_consent"}),(0,o.h)("a",{key:"79675cf4d9c026666093ff3205818f48b845083f",id:"cookie-policy-link",href:"#",onClick:this.openModal,class:"btn btn-link p-0"},(0,o.h)("translate-label",{key:"8c83694879ff4fb7cce5aa8f3363220767b54c13",labelKey:"cookie.cookie_policy_url_label"})),"."),(0,o.h)("button",{key:"dfa75c1bd990929564a7b3b61264e1978ea24c95",id:"accept-cookie-policy",class:"onto-btn onto-btn-primary",onClick:this.handleConsentClick},(0,o.h)("translate-label",{key:"7a36cad2b993c7aa29f4d64adcf8e359331bdb28",labelKey:"common.button.ok"})))),this.showModal&&(0,o.h)("onto-cookie-policy-dialog",{key:"1daa9af32d60159763f1ea052c1c87e6f4bfdb3e"}))}};var l;s.style=".cookie-consent-banner{position:fixed;bottom:0;left:0;right:0;background-color:var(--gw-dialog-background);box-shadow:0 -2px 10px rgba(0, 0, 0, 0.1);padding:20px;z-index:1050;width:100%}.cookie-consent-banner .cookie-consent-content{display:flex;justify-content:center;align-items:center}.cookie-consent-banner .cookie-consent-content button{margin-left:12px}.cookie-policy-modal{padding:24px 40px;overflow-y:auto}.cookie-policy-modal .modal-dialog{width:60% !important;max-width:60% !important}.cookie-policy-modal .title{font-size:xx-large;font-weight:bolder}.cookie-policy-modal .heading{font-size:x-large;font-weight:bolder;margin-top:12px}.cookie-policy-modal .subheading{font-size:large;font-weight:bolder;margin-top:8px}.cookie-policy-modal .text{font-size:math}",function(e){e.THIRD_PARTY="thirdParty",e.STATISTIC="statistic"}(l||(l={}));const r=class{constructor(e){(0,o.r)(this,e),this.closeDialog=(0,o.d)(this,"closeDialog"),this.logger=i.L.logger,this.securityContextService=(0,c.service)(c.SecurityContextService),this.securityService=(0,c.service)(c.SecurityService),this.trackingService=(0,c.service)(c.TrackingService),this.toggleChangedDebounced=(0,n.d)(e=>this.toggleChanged(e),300)}toggleChangeHandler(e){this.toggleChangedDebounced(e)}toggleChanged(e){this.setUserCookieConsent(this.updateCookieConsent(e.detail)),this.securityService.updateAuthenticatedUser(this.user.toUser()).then(()=>this.securityContextService.updateAuthenticatedUser(this.user)).catch(this.logger.error).finally(()=>this.trackingService.applyTrackingConsent())}connectedCallback(){this.user=this.securityContextService.getAuthenticatedUser(),this.cookieConsent=this.trackingService.getCookieConsent()}render(){var e,t;const a={dialogTitle:i.T.translate("cookie.policy.title"),onClose:()=>this.closePolicyDialog(),modalClass:"cookie-policy-modal"};return(0,o.h)("onto-dialog",{key:"bdd402a836636e6c15811b3615703ea1eebd8d7c",config:a},(0,o.h)("div",{key:"1f1b4d80214907ae882b7322c48190f2152e12d9",slot:"body"},(0,o.h)("section",{key:"1b1a59be322de2736ca62ad373a51d18a1a06b79"},(0,o.h)("h4",{key:"dede6b4f005e6a661675479f5531ddad7a0235d4"},(0,o.h)("translate-label",{key:"ee1741896c0ff590ab9efbec9bf0a5025a30909f",labelKey:"cookie.policy.purpose_heading"})),(0,o.h)("p",{key:"e4a5b233c2809f901dd182f8d9aec0de27fc2099"},(0,o.h)("translate-label",{key:"631d8eb62fb92be49d0ded38b6aa1a280948ae19",labelKey:"cookie.policy.purpose_text"})),(0,o.h)("p",{key:"1254f3f2632b00bb296c00454a7df7d5b383ece5"},(0,o.h)("translate-label",{key:"5ceda3dada67081dbd17e1afa867a24a9016a564",labelKey:"cookie.policy.purpose_enterprise_text"}))),(0,o.h)("section",{key:"4796f96a4798348052387f6d379fcb2057c4b660"},(0,o.h)("h4",{key:"2ef14f483c1ff6fd1ecb891f7b9a6ed57b628805"},(0,o.h)("translate-label",{key:"09481c09192b35faa19b2006bdc3b21a9589cbdc",labelKey:"cookie.policy.privacy_commitment_heading"})),(0,o.h)("p",{key:"2cca9fe31f8f315c9ea123240bffc22f43bdfa77"},(0,o.h)("translate-label",{key:"4e8a55d364dffb76ea88c395967abd1681ceeec0",labelKey:"cookie.policy.privacy_commitment_text"})),(0,o.h)("ul",{key:"ceac17908898768e92263452faa0d05b654355aa"},(0,o.h)("li",{key:"c72361f5d3c17e068041f66e1986ba2152153f56"},(0,o.h)("translate-label",{key:"66a3534fd00d05e038c566c47c27a817e0840312",labelKey:"cookie.policy.privacy_commitment_1"})),(0,o.h)("li",{key:"f64a3900424c3df46fabaa81b710626445dd25b9"},(0,o.h)("translate-label",{key:"1e0e45ea0bba3f66f483217514006e685544f7ce",labelKey:"cookie.policy.privacy_commitment_2"})))),(0,o.h)("section",{key:"5046d6f2a87f421da264d8ca56e586c96806c8d2"},(0,o.h)("h4",{key:"f29934a5affad89f5f29bc18aaf4e0a7431a676c"},(0,o.h)("translate-label",{key:"88786391aa0c7dfee08e8a69c44cdc8f2fdf86ba",labelKey:"cookie.policy.cookies_heading"})),(0,o.h)("p",{key:"30445e55fede20a71babaac4656b2aa04bf95029"},(0,o.h)("translate-label",{key:"f0a85e21c58d6192b7173a2fdcdadb0cac500d51",labelKey:"cookie.policy.cookies_text"}))),(0,o.h)("section",{key:"6d63492ca8e98e66ee3dac34a9f2d4804598aae3"},(0,o.h)("h4",{key:"2acb72a66961b4a7669421631c567ae220c37340"},(0,o.h)("translate-label",{key:"150994d027db50124deb8382ff86defd4d9f73ca",labelKey:"cookie.policy.manage_cookies_heading"})),(0,o.h)("onto-toggle-switch",{key:"abe22d435107f38ff392ece9b1e93436b18d8865",class:"statistic-cookies-toggle",checked:null===(e=this.cookieConsent)||void 0===e?void 0:e.statistic,labelKey:"cookie.policy.statistic_cookies",tooltipTranslationKey:"cookie.policy.statistic_tooltip",context:l.STATISTIC}),(0,o.h)("p",{key:"c58bd5346cbf64fc806476af9aca4114ffdf2f19"},(0,o.h)("translate-label",{key:"5494f13d7c4e5e9b8ad1dd2833d61dcf8abbaadb",labelKey:"cookie.policy.statistic_text"})),(0,o.h)("onto-toggle-switch",{key:"a126d4e367ac72f3afabf4cbcad60600c1674256",class:"third-party-cookies-toggle",checked:null===(t=this.cookieConsent)||void 0===t?void 0:t.thirdParty,labelKey:"cookie.policy.third_party_cookies",tooltipTranslationKey:"cookie.policy.third_party_tooltip",context:l.THIRD_PARTY}),(0,o.h)("p",{key:"98eaa1cd8bf32b975fbf6158151c23ecb75ae775"},(0,o.h)("translate-label",{key:"3e3480010862cba108e3b2a2ea132e2ec8f7d38f",labelKey:"cookie.policy.third_party_cookies_text"}))),(0,o.h)("p",{key:"2f229fbfb8e618771c96ff69022bdbe41ae073aa"},(0,o.h)("span",{key:"89601e4bda0080f30395f7ab7717ed2894003df4"},(0,o.h)("translate-label",{key:"7e1c004df16f9c96593bd08ed572f330980f9b1f",labelKey:"cookie.policy.change_cookies"}),(0,o.h)("i",{key:"0b63d510ac728e75687dbfb89baf199a7ff789ac"}," ",(0,o.h)("translate-label",{key:"84ca2e5206973463bb76e464c0de825778b5161c",labelKey:"menu.setup.label"})," > ",(0,o.h)("translate-label",{key:"8cd61ed1aa3b45d15845da57adba70c0136cc465",labelKey:"menu.my.settings.label"})," > ",(0,o.h)("translate-label",{key:"a540e7209ce07f18cade46ca26593c067f0e5967",labelKey:"security.user.settings"})," > ",(0,o.h)("translate-label",{key:"122e0f07061903adb8e68ac632766cdce0544140",labelKey:"cookie.policy.change_cookies_location4"})," ")))))}closePolicyDialog(){this.closeDialog.emit()}updateCookieConsent(e){return this.cookieConsent[e.context]=e.checked,this.cookieConsent.updatedAt=c.DateUtil.now(),this.cookieConsent}setUserCookieConsent(e){this.user.appSettings||this.user.setAppSettings(),this.user.appSettings.COOKIE_CONSENT=e}};r.style="section h4{font-size:x-large;font-weight:bolder;margin-top:12px}"},63952(e,t,a){function o(e,t=300){let a;return(...o)=>{clearTimeout(a),a=setTimeout(()=>e.apply(this,o),t)}}a.d(t,{d:()=>o})},79939(e,t,a){a.d(t,{L:()=>c,T:()=>s,s:()=>i});var o=a(57154);function i(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}class c{static get logger(){return o.Loggers.getLoggerInstance("SharedComponents")}}class n{constructor(){this.languageContextService=o.ServiceProvider.get(o.LanguageContextService),this.translationChangedObservers={},this.logger=c.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],a=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const o={parameters:t,callback:a};return this.translationChangedObservers[e].push(o),a(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(o);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let a=this.translateFromBundle(this.currentBundle,e);return a||(a=this.translateFromBundle(this.defaultBundle,e)),a?(a=this.applyParameters(a,t),i(a)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let a=e[t];return"string"!=typeof a&&(a=this.translateAsJsonObject(e,t)),a}translateAsJsonObject(e,t){let a=t.split(".");return this.getTranslation(e,a)}getTranslation(e,t){if(!t||!e)return;const a=e[t.splice(0,1)[0]];return 0===t.length?a:"string"!=typeof a?t.length>0?this.getTranslation(a,t):a:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>n.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const s=new n}};
2
+ //# sourceMappingURL=60560.62ed0cb0b3d07fecbf28.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"60560.62ed0cb0b3d07fecbf28.bundle.js","mappings":"4PAKA,MAEMA,EAAoB,MACtBC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBC,KAAMF,GACvBE,KAAKC,cA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eAE7F,CACAN,uBAAAA,GACInG,KAAKsI,2BAA6BtI,KAAK4F,uBAAuB2C,wBAAyBlB,IAC/EA,IACArH,KAAKkH,cAAgBG,EACrBrH,KAAKiI,8BAGjB,CACAO,OAAAA,GACQxI,KAAKsI,4BACLtI,KAAKsI,4BAEb,EAEJ,MAAM/E,EAAqB,IAAIoC,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/onto-cookie-consent_2.entry.js","webpack://root-config/./packages/shared-components/dist/esm/function-utils-D1ZpXQQS.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-nljGIprK.js"],"sourcesContent":["import { r as registerInstance, d as createEvent, h, a as Host } from './index-EiAqSNMq.js';\nimport { L as LoggerProvider, T as TranslationService } from './translation.service-nljGIprK.js';\nimport { service, SecurityContextService, SecurityService, TrackingService, DateUtil } from '@ontotext/workbench-api';\nimport { d as debounce } from './function-utils-D1ZpXQQS.js';\n\nconst ontoCookieConsentCss = \".cookie-consent-banner{position:fixed;bottom:0;left:0;right:0;background-color:var(--gw-dialog-background);box-shadow:0 -2px 10px rgba(0, 0, 0, 0.1);padding:20px;z-index:1050;width:100%}.cookie-consent-banner .cookie-consent-content{display:flex;justify-content:center;align-items:center}.cookie-consent-banner .cookie-consent-content button{margin-left:12px}.cookie-policy-modal{padding:24px 40px;overflow-y:auto}.cookie-policy-modal .modal-dialog{width:60% !important;max-width:60% !important}.cookie-policy-modal .title{font-size:xx-large;font-weight:bolder}.cookie-policy-modal .heading{font-size:x-large;font-weight:bolder;margin-top:12px}.cookie-policy-modal .subheading{font-size:large;font-weight:bolder;margin-top:8px}.cookie-policy-modal .text{font-size:math}\";\n\nconst OntoCookieConsent = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.consentGiven = createEvent(this, \"consentGiven\");\n /** State to control the visibility of the cookie policy modal */\n this.showModal = false;\n /**\n * Opens the cookie policy modal.\n * @param {Event} event - The event that triggered the modal opening.\n */\n this.openModal = (event) => {\n event.preventDefault();\n this.showModal = true;\n };\n /**\n * Handles the click event on the consent button.\n * Emits the consentGiven event.\n */\n this.handleConsentClick = () => {\n this.consentGiven.emit();\n };\n }\n /**\n * Listener for the closeDialog event emitted by the cookie policy dialog.\n * Sets the showModal state to false to hide the dialog.\n */\n onDialogClose() {\n this.showModal = false;\n }\n render() {\n return (h(Host, { key: 'dba3fc373e9ad60ada7f86d11acbe1b1ed24a92d' }, h(\"div\", { key: '8f1dff5a6b271f721d2079ec44a14207eff38025', class: \"cookie-consent-banner\" }, h(\"section\", { key: '93d51c3f88e12ff6fc5a57506eab507eca5420cb', class: \"cookie-consent-content\" }, h(\"span\", { key: '72be975026e8717da4ab4d99d5560f96017d4436' }, h(\"translate-label\", { key: 'b49c8182a2e94cffb22abb03dd4f2e6c9a7c6b5e', labelKey: 'cookie.cookie_consent' }), h(\"a\", { key: '79675cf4d9c026666093ff3205818f48b845083f', id: \"cookie-policy-link\", href: \"#\", onClick: this.openModal, class: \"btn btn-link p-0\" }, h(\"translate-label\", { key: '8c83694879ff4fb7cce5aa8f3363220767b54c13', labelKey: 'cookie.cookie_policy_url_label' })), \".\"), h(\"button\", { key: 'dfa75c1bd990929564a7b3b61264e1978ea24c95', id: \"accept-cookie-policy\", class: \"onto-btn onto-btn-primary\", onClick: this.handleConsentClick }, h(\"translate-label\", { key: '7a36cad2b993c7aa29f4d64adcf8e359331bdb28', labelKey: 'common.button.ok' })))), this.showModal && h(\"onto-cookie-policy-dialog\", { key: '1daa9af32d60159763f1ea052c1c87e6f4bfdb3e' })));\n }\n};\nOntoCookieConsent.style = ontoCookieConsentCss;\n\nconst ontoCookiePolicyDialogCss = \"section h4{font-size:x-large;font-weight:bolder;margin-top:12px}\";\n\nvar CookieType;\n(function (CookieType) {\n CookieType[\"THIRD_PARTY\"] = \"thirdParty\";\n CookieType[\"STATISTIC\"] = \"statistic\";\n})(CookieType || (CookieType = {}));\nconst OntoCookiePolicyDialog = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.closeDialog = createEvent(this, \"closeDialog\");\n this.logger = LoggerProvider.logger;\n this.securityContextService = service(SecurityContextService);\n this.securityService = service(SecurityService);\n this.trackingService = service(TrackingService);\n /**\n * Debounced version of the `toggleChanged` method to prevent rapid consecutive calls when the user toggles cookie\n * consent options multiple times in quick succession.\n * This is needed because the `toggleChanged` method involves adding and removing tracking scripts based on the user's\n * consent, and rapid toggling can lead to multiple unnecessary script manipulations, which can cause performance\n * issues and unintended side effects.\n */\n this.toggleChangedDebounced = debounce((event) => this.toggleChanged(event), 300);\n }\n toggleChangeHandler(event) {\n this.toggleChangedDebounced(event);\n }\n toggleChanged(event) {\n this.setUserCookieConsent(this.updateCookieConsent(event.detail));\n this.securityService.updateAuthenticatedUser(this.user.toUser())\n .then(() => this.securityContextService.updateAuthenticatedUser(this.user))\n .catch(this.logger.error)\n .finally(() => this.trackingService.applyTrackingConsent());\n }\n connectedCallback() {\n this.user = this.securityContextService.getAuthenticatedUser();\n this.cookieConsent = this.trackingService.getCookieConsent();\n }\n render() {\n var _a, _b;\n const config = {\n dialogTitle: TranslationService.translate('cookie.policy.title'),\n onClose: () => this.closePolicyDialog(),\n modalClass: 'cookie-policy-modal',\n };\n return (h(\"onto-dialog\", { key: 'bdd402a836636e6c15811b3615703ea1eebd8d7c', config: config }, h(\"div\", { key: '1f1b4d80214907ae882b7322c48190f2152e12d9', slot: 'body' }, h(\"section\", { key: '1b1a59be322de2736ca62ad373a51d18a1a06b79' }, h(\"h4\", { key: 'dede6b4f005e6a661675479f5531ddad7a0235d4' }, h(\"translate-label\", { key: 'ee1741896c0ff590ab9efbec9bf0a5025a30909f', labelKey: 'cookie.policy.purpose_heading' })), h(\"p\", { key: 'e4a5b233c2809f901dd182f8d9aec0de27fc2099' }, h(\"translate-label\", { key: '631d8eb62fb92be49d0ded38b6aa1a280948ae19', labelKey: 'cookie.policy.purpose_text' })), h(\"p\", { key: '1254f3f2632b00bb296c00454a7df7d5b383ece5' }, h(\"translate-label\", { key: '5ceda3dada67081dbd17e1afa867a24a9016a564', labelKey: 'cookie.policy.purpose_enterprise_text' }))), h(\"section\", { key: '4796f96a4798348052387f6d379fcb2057c4b660' }, h(\"h4\", { key: '2ef14f483c1ff6fd1ecb891f7b9a6ed57b628805' }, h(\"translate-label\", { key: '09481c09192b35faa19b2006bdc3b21a9589cbdc', labelKey: 'cookie.policy.privacy_commitment_heading' })), h(\"p\", { key: '2cca9fe31f8f315c9ea123240bffc22f43bdfa77' }, h(\"translate-label\", { key: '4e8a55d364dffb76ea88c395967abd1681ceeec0', labelKey: 'cookie.policy.privacy_commitment_text' })), h(\"ul\", { key: 'ceac17908898768e92263452faa0d05b654355aa' }, h(\"li\", { key: 'c72361f5d3c17e068041f66e1986ba2152153f56' }, h(\"translate-label\", { key: '66a3534fd00d05e038c566c47c27a817e0840312', labelKey: 'cookie.policy.privacy_commitment_1' })), h(\"li\", { key: 'f64a3900424c3df46fabaa81b710626445dd25b9' }, h(\"translate-label\", { key: '1e0e45ea0bba3f66f483217514006e685544f7ce', labelKey: 'cookie.policy.privacy_commitment_2' })))), h(\"section\", { key: '5046d6f2a87f421da264d8ca56e586c96806c8d2' }, h(\"h4\", { key: 'f29934a5affad89f5f29bc18aaf4e0a7431a676c' }, h(\"translate-label\", { key: '88786391aa0c7dfee08e8a69c44cdc8f2fdf86ba', labelKey: 'cookie.policy.cookies_heading' })), h(\"p\", { key: '30445e55fede20a71babaac4656b2aa04bf95029' }, h(\"translate-label\", { key: 'f0a85e21c58d6192b7173a2fdcdadb0cac500d51', labelKey: 'cookie.policy.cookies_text' }))), h(\"section\", { key: '6d63492ca8e98e66ee3dac34a9f2d4804598aae3' }, h(\"h4\", { key: '2acb72a66961b4a7669421631c567ae220c37340' }, h(\"translate-label\", { key: '150994d027db50124deb8382ff86defd4d9f73ca', labelKey: 'cookie.policy.manage_cookies_heading' })), h(\"onto-toggle-switch\", { key: 'abe22d435107f38ff392ece9b1e93436b18d8865', class: \"statistic-cookies-toggle\", checked: (_a = this.cookieConsent) === null || _a === void 0 ? void 0 : _a.statistic, labelKey: 'cookie.policy.statistic_cookies', tooltipTranslationKey: 'cookie.policy.statistic_tooltip', context: CookieType.STATISTIC }), h(\"p\", { key: 'c58bd5346cbf64fc806476af9aca4114ffdf2f19' }, h(\"translate-label\", { key: '5494f13d7c4e5e9b8ad1dd2833d61dcf8abbaadb', labelKey: 'cookie.policy.statistic_text' })), h(\"onto-toggle-switch\", { key: 'a126d4e367ac72f3afabf4cbcad60600c1674256', class: \"third-party-cookies-toggle\", checked: (_b = this.cookieConsent) === null || _b === void 0 ? void 0 : _b.thirdParty, labelKey: 'cookie.policy.third_party_cookies', tooltipTranslationKey: 'cookie.policy.third_party_tooltip', context: CookieType.THIRD_PARTY }), h(\"p\", { key: '98eaa1cd8bf32b975fbf6158151c23ecb75ae775' }, h(\"translate-label\", { key: '3e3480010862cba108e3b2a2ea132e2ec8f7d38f', labelKey: 'cookie.policy.third_party_cookies_text' }))), h(\"p\", { key: '2f229fbfb8e618771c96ff69022bdbe41ae073aa' }, h(\"span\", { key: '89601e4bda0080f30395f7ab7717ed2894003df4' }, h(\"translate-label\", { key: '7e1c004df16f9c96593bd08ed572f330980f9b1f', labelKey: 'cookie.policy.change_cookies' }), h(\"i\", { key: '0b63d510ac728e75687dbfb89baf199a7ff789ac' }, \"\\u00A0\", h(\"translate-label\", { key: '84ca2e5206973463bb76e464c0de825778b5161c', labelKey: 'menu.setup.label' }), \"\\u00A0>\\u00A0\", h(\"translate-label\", { key: '8cd61ed1aa3b45d15845da57adba70c0136cc465', labelKey: 'menu.my.settings.label' }), \"\\u00A0>\\u00A0\", h(\"translate-label\", { key: 'a540e7209ce07f18cade46ca26593c067f0e5967', labelKey: 'security.user.settings' }), \"\\u00A0>\\u00A0\", h(\"translate-label\", { key: '122e0f07061903adb8e68ac632766cdce0544140', labelKey: 'cookie.policy.change_cookies_location4' }), \"\\u00A0\"))))));\n }\n /**\n * TODO: This is comment from the previous implementation in the legacy and needs to be re-evaluated and updated if necessary.\n *\n * Closes the modal and passes a result to indicate if the page should be reloaded.\n * - The page reloads only if the user has\n * (1) toggled third-party consent multiple times (`didAbusedThirdPartyToggle`),\n * (2) left third-party consent as enabled (`hasThirdPartyConsent`), and\n * (3) previously accepted the overall policy (`hasPolicyAccepted`)\n * - This reload is necessary in cases where multiple third-party consent changes\n * lead to duplicate and redundant tracking data being loaded.\n */\n closePolicyDialog() {\n this.closeDialog.emit();\n }\n updateCookieConsent(payload) {\n // Context is either 'thirdParty' or 'statistic'\n this.cookieConsent[payload.context] = payload.checked;\n this.cookieConsent.updatedAt = DateUtil.now();\n return this.cookieConsent;\n }\n setUserCookieConsent(cookieConsent) {\n if (!this.user.appSettings) {\n this.user.setAppSettings();\n }\n this.user.appSettings.COOKIE_CONSENT = cookieConsent;\n }\n};\nOntoCookiePolicyDialog.style = ontoCookiePolicyDialogCss;\n\nexport { OntoCookieConsent as onto_cookie_consent, OntoCookiePolicyDialog as onto_cookie_policy_dialog };\n","function debounce(func, wait = 300) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => func.apply(this, args), wait);\n };\n}\n\nexport { debounce as d };\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":["OntoCookieConsent","constructor","hostRef","registerInstance","this","consentGiven","createEvent","showModal","openModal","event","preventDefault","handleConsentClick","emit","onDialogClose","render","h","Host","key","class","labelKey","id","href","onClick","CookieType","style","OntoCookiePolicyDialog","closeDialog","logger","LoggerProvider","securityContextService","service","SecurityContextService","securityService","SecurityService","trackingService","TrackingService","toggleChangedDebounced","debounce","toggleChanged","toggleChangeHandler","setUserCookieConsent","updateCookieConsent","detail","updateAuthenticatedUser","user","toUser","then","catch","error","finally","applyTrackingConsent","connectedCallback","getAuthenticatedUser","cookieConsent","getCookieConsent","_a","_b","config","dialogTitle","TranslationService","translate","onClose","closePolicyDialog","modalClass","slot","checked","statistic","tooltipTranslationKey","context","STATISTIC","thirdParty","THIRD_PARTY","payload","updatedAt","DateUtil","now","appSettings","setAppSettings","COOKIE_CONSENT","func","wait","timer","args","clearTimeout","setTimeout","apply","sanitizeHTML","html","element","document","createElement","innerHTML","value","Loggers","getLoggerInstance","TranslationServiceClassDefinition","languageContextService","ServiceProvider","get","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","onTranslate","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","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"],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_esm_id__=60730;export const __webpack_esm_ids__=[60730];export const __webpack_esm_modules__={60730(e,n,a){a.r(n),a.d(n,{onto_permission_banner:()=>s});var r=a(55508);const s=class{constructor(e){(0,r.r)(this,e)}render(){return(0,r.h)(r.a,{key:"9119b184de876a5409f0f5335b644fb4e2325a0f",class:"permission-banner"},(0,r.h)("p",{key:"1b54e279971683070fdb30b923e4943827be42a4",class:"permission-banner-content onto-alert onto-alert-danger"},(0,r.h)("div",{key:"eaf0e5a1e4803c2aaf039ff34f83137429646fec",class:"ri-alert-line"}),(0,r.h)("div",{key:"1b77e50106a3f09621328ce78d92194dfe6a3509",class:"label-container"},(0,r.h)("translate-label",{key:"1aeefa5016d3c4dc3494433f5a9e9f17851c6c52",labelKey:"permission_banner.no_access_error"}),(0,r.h)("translate-label",{key:"68f57ed9009c2c89056ef763ece875eeeb927e35",labelKey:"permission_banner.change_menu_or_user_warning"}))))}};s.style=':host{display:block}.permission-banner{margin:0 1rem}.permission-banner-content{display:flex;align-items:center;margin:1rem;padding:0 2rem 3rem 2rem}.label-container{display:flex;flex-direction:column;margin-left:1rem}.icon-warning::before{font-family:"icomoon", sans-serif;content:"\\e920";display:block;font-size:1.5em;pointer-events:none}'}};
2
- //# sourceMappingURL=60730.35493812d428872eddb6.bundle.js.map
1
+ export const __webpack_esm_id__=60730;export const __webpack_esm_ids__=[60730];export const __webpack_esm_modules__={60730(e,n,a){a.r(n),a.d(n,{onto_permission_banner:()=>s});var r=a(76133);const s=class{constructor(e){(0,r.r)(this,e)}render(){return(0,r.h)(r.a,{key:"9119b184de876a5409f0f5335b644fb4e2325a0f",class:"permission-banner"},(0,r.h)("p",{key:"1b54e279971683070fdb30b923e4943827be42a4",class:"permission-banner-content onto-alert onto-alert-danger"},(0,r.h)("div",{key:"eaf0e5a1e4803c2aaf039ff34f83137429646fec",class:"ri-alert-line"}),(0,r.h)("div",{key:"1b77e50106a3f09621328ce78d92194dfe6a3509",class:"label-container"},(0,r.h)("translate-label",{key:"1aeefa5016d3c4dc3494433f5a9e9f17851c6c52",labelKey:"permission_banner.no_access_error"}),(0,r.h)("translate-label",{key:"68f57ed9009c2c89056ef763ece875eeeb927e35",labelKey:"permission_banner.change_menu_or_user_warning"}))))}};s.style=':host{display:block}.permission-banner{margin:0 1rem}.permission-banner-content{display:flex;align-items:center;margin:1rem;padding:0 2rem 3rem 2rem}.label-container{display:flex;flex-direction:column;margin-left:1rem}.icon-warning::before{font-family:"icomoon", sans-serif;content:"\\e920";display:block;font-size:1.5em;pointer-events:none}'}};
2
+ //# sourceMappingURL=60730.a9fc5342637039776562.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"60730.a9fc5342637039776562.bundle.js","mappings":"8LAEA,MAEMA,EAAuB,MACzBC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBC,KAAMF,EAC3B,CACAG,MAAAA,GACI,OAAQC,EAAAA,EAAAA,GAAEC,EAAAA,EAAM,CAAEC,IAAK,2CAA4CC,MAAO,sBAAuBH,EAAAA,EAAAA,GAAE,IAAK,CAAEE,IAAK,2CAA4CC,MAAO,2DAA4DH,EAAAA,EAAAA,GAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,mBAAoBH,EAAAA,EAAAA,GAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,oBAAqBH,EAAAA,EAAAA,GAAE,kBAAmB,CAAEE,IAAK,2CAA4CE,SAAU,uCAAwCJ,EAAAA,EAAAA,GAAE,kBAAmB,CAAEE,IAAK,2CAA4CE,SAAU,oDAC7lB,GAEJV,EAAqBW,MAVW,uV","sources":["webpack://root-config/./packages/shared-components/dist/esm/onto-permission-banner.entry.js"],"sourcesContent":["import { r as registerInstance, h, a as Host } from './index-EiAqSNMq.js';\n\nconst ontoPermissionBannerCss = \":host{display:block}.permission-banner{margin:0 1rem}.permission-banner-content{display:flex;align-items:center;margin:1rem;padding:0 2rem 3rem 2rem}.label-container{display:flex;flex-direction:column;margin-left:1rem}.icon-warning::before{font-family:\\\"icomoon\\\", sans-serif;content:\\\"\\\\e920\\\";display:block;font-size:1.5em;pointer-events:none}\";\n\nconst OntoPermissionBanner = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n }\n render() {\n return (h(Host, { key: '9119b184de876a5409f0f5335b644fb4e2325a0f', class: \"permission-banner\" }, h(\"p\", { key: '1b54e279971683070fdb30b923e4943827be42a4', class: \"permission-banner-content onto-alert onto-alert-danger\" }, h(\"div\", { key: 'eaf0e5a1e4803c2aaf039ff34f83137429646fec', class: \"ri-alert-line\" }), h(\"div\", { key: '1b77e50106a3f09621328ce78d92194dfe6a3509', class: \"label-container\" }, h(\"translate-label\", { key: '1aeefa5016d3c4dc3494433f5a9e9f17851c6c52', labelKey: 'permission_banner.no_access_error' }), h(\"translate-label\", { key: '68f57ed9009c2c89056ef763ece875eeeb927e35', labelKey: 'permission_banner.change_menu_or_user_warning' })))));\n }\n};\nOntoPermissionBanner.style = ontoPermissionBannerCss;\n\nexport { OntoPermissionBanner as onto_permission_banner };\n"],"names":["OntoPermissionBanner","constructor","hostRef","registerInstance","this","render","h","Host","key","class","labelKey","style"],"ignoreList":[],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_esm_id__=67888;export const __webpack_esm_ids__=[9717,67888,73702,82926,96248];export const __webpack_esm_modules__={9717(){function e(e,r){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:o=>{const t=[];o.popoverTemplate="resourceStatusInfoTemplate.html",o.popoverIsOpen=!1,o.context=o.resource.importResource.context,o.replaceGraphs=o.resource.importResource.replaceGraphs,o.baseUrl=decodeURIComponent(o.resource.importResource.baseURI),o.forceSerial=o.resource.importResource.forceSerial,o.importedOn=o.resource.importResource.importedOn,o.parserSettings=o.resource.importResource.parserSettings,o.open=()=>{o.closeAllDialogs(),o.popoverIsOpen=!0},o.closeAllDialogs=()=>{e.$broadcast("closePopovers")},o.close=()=>{o.popoverIsOpen=!1};const s=e=>{"Escape"===e.key&&o.$apply(()=>{o.close()})};t.push(o.$on("closePopovers",o.close)),r.on("keydown",s),o.$on("$destroy",()=>{r.off("keydown",s),t.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",e),e.$inject=["$rootScope","$document"]},54419(e,r,o){o(96248);var t=o(28847),s=o(78618);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:r=>{r.ImportResourceStatus=t.I,r.toTitleCase=e=>s.Sn(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",i),i.$inject=["$uibModal"]},67888(e,r,o){o(82493),o(5687),o(39324),o(73702),o(82926),o(83136),o(76933),o(47195),o(56669),angular.module("graphdb.framework.impex.import",["toastr","ngRoute","ngFileUpload","ui.bootstrap","graphdb.framework.impex.import.controllers","graphdb.framework.core.services.repositories","graphdb.framework.import.directives.validate-uri","graphdb.framework.import.directives.import-progress-indicator","graphdb.framework.import.directives.import-resource-tree"])},73702(){function e(e){return{restrict:"A",require:"ngModel",link:function(r,o,t,s){s.$parsers.unshift(function(r){if(s.$setValidity("validateUri",!0),!s.$isEmpty(r)){const o=e.isValidIri(r,r.toString());s.$setValidity("validateUri",o)}return r})}}}angular.module("graphdb.framework.import.directives.validate-uri",[]).directive("validateUri",e),e.$inject=["UriUtils"]},82926(){function e(){return{link:function(e,r,o){e.$watch("file.status",function(){"IMPORTING"!==e.file.status&&"UPLOADING"!==e.file.status||!$(r).has("object").length>0&&$(r).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.3.3">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",e),e.$inject=[]},83136(e,r,o){var t=o(28847),s=(o(54419),o(9717),o(18025)),i=o(57436),c=o(7796),a=o(56636),l=o(57154);const p={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},n={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function u(e,r){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(o,u,m)=>{o.resources=new i.k,o.displayResources=[],o.TYPE_FILTER_OPTIONS=p,o.filterByType=p.ALL,o.filterByFileName="",o.STATUS_OPTIONS=n,o.selectedByStatus=void 0,o.areAllDisplayedImportResourcesSelected=!1,o.areAllDisplayedImportResourcesPartialSelected=!1,o.ImportResourceStatus=t.I,o.canRemoveResource=angular.isDefined(m.onRemove),o.canResetSelectedResources=!1,o.SORTING_TYPES=s.R,o.sortAsc=!angular.isDefined(m.asc)||o.asc,o.sortedBy=o.sortBy,o.showLoader=r.getShowLoader(),o.hasSelection=!1,o.selectionChanged=e=>{e.setSelection(e.selected),I(),d(),g()},o.selectResourceWithStatus=e=>{o.selectedByStatus=e,o.resources.setSelection(!1),n.ALL===o.selectedByStatus?o.resources.setSelection(!0):n.IMPORTED===o.selectedByStatus?o.resources.selectAllWithStatus([t.I.DONE]):n.NOT_IMPORTED===o.selectedByStatus&&o.resources.selectAllWithStatus([t.I.IMPORTING,t.I.NONE,t.I.ERROR,t.I.PENDING,t.I.INTERRUPTING]),R(),d()},o.filterByTypeChanged=e=>{o.filterByType=e,R()},o.filterByFileNameChanged=e=>{o.filterByFileName=e,N(R,100)},o.onResetStatus=()=>{const e=o.resources.getAllSelected().map(e=>e.path);e.length>0&&o.onReset({resources:e})},o.resetStatus=e=>{o.onReset({resources:[e.path]})},o.onRemoveResources=()=>{const e=o.resources.getAllSelected();e&&e.length>0&&o.onRemove({resources:e})},o.removeResource=e=>{o.onRemove({resources:[e]})},o.importAll=e=>{const r=o.resources.getAllSelectedForImport();r.length>0&&o.onImportAll({selectedResources:r,withoutChangingSettings:e})},o.stopImport=e=>{o.onStopImport({resource:e})},o.sort=e=>{o.sortedBy===e?o.sortAsc=!o.sortAsc:o.sortAsc=!0,o.sortedBy=e,R()},o.editResource=e=>{o.onEditResource({resource:e})};const d=()=>{o.canResetSelectedResources=o.resources.getSelectedImportedResources()},R=()=>{o.resources.getRoot().updateSelectionState(),y(),o.displayResources=o.resources.toList().filter(A).filter(E),g(),I()},g=()=>{const e=o.resources.getAllSelectedFilesNames();o.hasSelection=e.length>0,r.updateSelectedFilesNames(e)},I=()=>{const e=o.displayResources.some(e=>!e.selected),r=o.displayResources.some(e=>e.selected);o.areAllDisplayedImportResourcesSelected=r&&!e,o.areAllDisplayedImportResourcesPartialSelected=r&&e},y=()=>{s.R.NAME===o.sortedBy?o.resources.sort(f(o.sortAsc)):s.R.SIZE===o.sortedBy?o.resources.sort(h(o.sortAsc)):s.R.MODIFIED===o.sortedBy?o.resources.sort(S(o.sortAsc)):s.R.IMPORTED===o.sortedBy?o.resources.sort(T(o.sortAsc)):s.R.CONTEXT===o.sortedBy&&o.resources.sort(v(o.sortAsc))},f=e=>(r,o)=>e?r.importResource.name.localeCompare(o.importResource.name):o.importResource.name.localeCompare(r.importResource.name),h=e=>(r,o)=>{const t=l.ByteUtils.convertToBytes(r.importResource.size),s=l.ByteUtils.convertToBytes(o.importResource.size);return e?t-s:s-t},S=e=>(r,o)=>{const t=r.importResource.modifiedOn||Number.MAX_VALUE,s=o.importResource.modifiedOn||Number.MAX_VALUE;return e?t-s:s-t},T=e=>(r,o)=>{const t=r.importResource.importedOn||Number.MAX_VALUE,s=o.importResource.importedOn||Number.MAX_VALUE;return e?t-s:s-t},v=e=>(r,o)=>e?r.importResource.context.localeCompare(o.importResource.context):o.importResource.context.localeCompare(r.importResource.context),A=e=>p.ALL===o.filterByType||(o.filterByType===p.FILE?e.isFile():o.filterByType===p.DIRECTORY&&e.isDirectory()),E=e=>!o.filterByFileName||(o.filterByType===p.DIRECTORY?e.hasTextInDirectoriesName(o.filterByFileName):o.filterByType===p.FILE?e.hasTextInFilesName(o.filterByFileName):e.hasTextInResourcesName(o.filterByFileName));let O;const N=(r,o)=>{O&&e.cancel(O),O=e(r,o)},b=[];b.push(r.onResourcesUpdated((e=[])=>{const t=c.D.USER===r.getActiveTabId();o.resources.isEmpty()?(o.resources=a.Fp.toImportResourceTree(e,t),t&&(o.sortedBy=s.R.MODIFIED)):a.Fp.mergeResourceTree(o.resources,e,t),a.Fp.calculateElementIndent(o.resources),a.Fp.setupAfterTreeInitProperties(o.resources),R(),d()})),b.push(r.onShowLoaderUpdated(e=>o.showLoader=e)),b.push(r.onActiveTabIdUpdated(()=>o.resources=new i.k)),o.$on("$destroy",()=>{b.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",u),u.$inject=["$timeout","ImportContextService"]},96248(e,r,o){var t=o(304);angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",i),i.$inject=["$scope","$uibModalInstance","$translate","toastr","message"];const s=t.I.logger;function i(e,r,o,t,i){e.message=i,e.close=()=>{r.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{t.success(o.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{s.error("Could not copy text: ",e)})}}}};
2
+ //# sourceMappingURL=67888.6279be833ab8b2f2f9e6.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"67888.6279be833ab8b2f2f9e6.bundle.js","mappings":"mJAQA,SAASA,EAAkCC,EAAYC,GACnD,MAAO,CACHC,SAAU,IACVC,YAAa,+DACbC,MAAO,CACHC,SAA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,6BAA6B1M,EAAOmF,WAC9DqC,IACAb,OASJkF,EAAcxK,KAAKkD,EAAqBoI,oBAAqBvG,GAAepG,EAAOoG,WAAaA,IAChGyF,EAAcxK,KAAKkD,EAAqBqI,qBAAqB,IAAM5M,EAAOmF,UAAY,IAAIC,EAAAA,IAO1FpF,EAAOsB,IAAI,WALkBuL,KACzBhB,EAAcpK,QAASqL,GAAiBA,QAOxD,CAvTAnL,QACKC,OAAO,2DANI,CACZ,8DACA,oEAKCC,UAAU,qBAAsBwC,GAErCA,EAA4BvC,QAAU,CAAC,WAAY,uB,4BC/BnDH,QACKC,OAAO,4EAA6E,IACpFW,WAAW,wCAAyCwK,GAEzDA,EAAsCjL,QAAU,CAAC,SAAU,oBAAqB,aAAc,SAAU,WAExG,MAAMkL,EAASC,EAAAA,EAAeD,OAE9B,SAASD,EAAsC/M,EAAQkN,EAAmBC,EAAYC,EAAQxK,GAC1F5C,EAAO4C,QAAUA,EAGjB5C,EAAOgB,MAAQ,KACXkM,EAAkBG,WAGtBrN,EAAOsN,gBAAkB,KACrBC,UAAUC,UAAUC,UAAUzN,EAAO4C,SAChC8K,KAAK,KACFN,EAAOO,QAAQR,EAAWS,QAAQ,6CAClC5N,EAAOgB,SACP6M,IACAb,EAAOc,MAAM,wBAAyBD,KAGtD,C","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-resource-status-info.directive.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/import/app.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/validate-uri.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-progress-indicator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-resource-tree.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/controllers/import-resource-message-dialog.controller.js"],"sourcesContent":["const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-resource-status-info', modules)\n .directive('importResourceStatusInfo', importResourceStatusInfoDirective);\n\nimportResourceStatusInfoDirective.$inject = ['$rootScope', '$document'];\n\nfunction importResourceStatusInfoDirective($rootScope, $document) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/import/templates/import-resource-status-info.html',\n scope: {\n resource: '='\n },\n link: ($scope) => {\n const subscribers = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.popoverTemplate = 'resourceStatusInfoTemplate.html';\n $scope.popoverIsOpen = false;\n $scope.context = $scope.resource.importResource.context;\n $scope.replaceGraphs = $scope.resource.importResource.replaceGraphs;\n $scope.baseUrl = decodeURIComponent($scope.resource.importResource.baseURI);\n $scope.forceSerial = $scope.resource.importResource.forceSerial;\n $scope.importedOn = $scope.resource.importResource.importedOn;\n $scope.parserSettings = $scope.resource.importResource.parserSettings;\n\n // =========================\n // Public functions\n // =========================\n $scope.open = () => {\n $scope.closeAllDialogs();\n $scope.popoverIsOpen = true;\n };\n\n $scope.closeAllDialogs = () => {\n $rootScope.$broadcast('closePopovers');\n };\n\n $scope.close = () => {\n $scope.popoverIsOpen = false;\n };\n\n const handleEscapeKeyPress = (event) => {\n if (event.key === 'Escape') {\n $scope.$apply(() => {\n $scope.close();\n });\n }\n };\n\n const removeAllSubscribers = () => {\n subscribers.forEach((subscriber) => subscriber());\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n subscribers.push($scope.$on('closePopovers', $scope.close));\n $document.on('keydown', handleEscapeKeyPress);\n\n $scope.$on('$destroy', () => {\n $document.off('keydown', handleEscapeKeyPress);\n removeAllSubscribers();\n });\n }\n };\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 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/import/controllers/import-view.controller';\nimport 'angular/import/directives/validate-uri.directive';\nimport 'angular/import/directives/import-progress-indicator.directive';\nimport 'angular/import/directives/import-resource-tree.directive';\nimport 'angular/core/services/repositories.service';\nimport 'ng-file-upload/dist/ng-file-upload.min';\nimport 'ng-file-upload/dist/ng-file-upload-shim.min';\n\nconst modules = [\n 'toastr',\n 'ngRoute',\n 'ngFileUpload',\n 'ui.bootstrap',\n 'graphdb.framework.impex.import.controllers',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.import.directives.validate-uri',\n 'graphdb.framework.import.directives.import-progress-indicator',\n 'graphdb.framework.import.directives.import-resource-tree'\n];\n\nangular.module('graphdb.framework.impex.import', modules);\n","/**\n * This AngularJS directive validates whether an input value is a valid URI (IRI).\n *\n * @directive validateUri\n * @restrict A (Attribute)\n * @requires ngModel\n *\n * @example\n * <input type=\"text\" name=\"url\" ng-model=\"url\" validate-uri>\n */\nconst modules = [];\n\nangular\n .module('graphdb.framework.import.directives.validate-uri', modules)\n .directive('validateUri', validateUri);\n\nvalidateUri.$inject = ['UriUtils'];\n\n/**\n * @function validateUri\n * @param {UriUtils} UriUtils - Service for URI validation.\n */\nfunction validateUri(UriUtils) {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function (scope, element, attr, ctrl) {\n ctrl.$parsers.unshift(function (value) {\n ctrl.$setValidity('validateUri', true);\n if (!ctrl.$isEmpty(value)) {\n const valid = UriUtils.isValidIri(value, value.toString());\n ctrl.$setValidity('validateUri', valid);\n }\n return value;\n });\n }\n };\n}\n","const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-progress-indicator', modules)\n .directive('ImportProgressIndicator', ImportProgressIndicator);\n\nImportProgressIndicator.$inject = [];\n\n// importDirectives.directive('filesOntoLoader',\nfunction ImportProgressIndicator() {\n return {\n link: function (scope, element, attr) {\n scope.$watch('file.status', function () {\n if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {\n if (!$(element).has('object').length > 0) {\n $(element).append('<object width=\"' + attr.size + '\" height=\"' + attr.size + '\" data=\"js/angular/templates/loader/ot-loader.svg?v=3.3.3\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n}\n","import {ImportResourceStatus} from \"../../models/import/import-resource-status\";\nimport 'angular/import/directives/import-resource-message.directive';\nimport 'angular/import/directives/import-resource-status-info.directive';\nimport {SortingType} from \"../../models/import/sorting-type\";\nimport {ImportResourceTreeElement} from \"../../models/import/import-resource-tree-element\";\nimport {TABS} from \"../services/import-context.service\";\nimport {ImportResourceTreeService} from \"../services/import-resource-tree.service\";\nimport {\n ByteUtils,\n} from \"@ontotext/workbench-api\";\n\nconst TYPE_FILTER_OPTIONS = {\n 'FILE': 'FILE',\n 'DIRECTORY': 'DIRECTORY',\n 'ALL': 'ALL',\n};\n\nconst STATUS_OPTIONS = {\n 'ALL': 'ALL',\n 'NONE': 'NONE',\n 'IMPORTED': 'IMPORTED',\n 'NOT_IMPORTED': 'NOT_IMPORTED',\n};\n\nconst modules = [\n 'graphdb.framework.import.directives.import-resource-message',\n 'graphdb.framework.import.directives.import-resource-status-info',\n];\n\nangular\n .module('graphdb.framework.import.directives.import-resource-tree', modules)\n .directive('importResourceTree', importResourceTreeDirective);\n\nimportResourceTreeDirective.$inject = ['$timeout', 'ImportContextService'];\n\nfunction importResourceTreeDirective($timeout, ImportContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/import/templates/import-resource-tree.html',\n scope: {\n /**\n * Contains mapping of the column names to label keys. Should contain\n * keys for: name, size, imported, modified, context column names.\n */\n columnKeys: '=',\n /**\n * If the type filter buttons should be visible.\n */\n showTypeFilter: '=',\n /**\n * The default field to sort the resources by.\n */\n sortBy: '=',\n asc: '=',\n onImport: '&',\n onImportAll: '&',\n onReset: '&',\n onRemove: '&',\n onStopImport: '&',\n onEditResource: '&',\n },\n link: ($scope, element, attrs) => {\n // =========================\n // Public variables\n // =========================\n $scope.resources = new ImportResourceTreeElement();\n $scope.displayResources = [];\n $scope.TYPE_FILTER_OPTIONS = TYPE_FILTER_OPTIONS;\n $scope.filterByType = TYPE_FILTER_OPTIONS.ALL;\n $scope.filterByFileName = '';\n $scope.STATUS_OPTIONS = STATUS_OPTIONS;\n $scope.selectedByStatus = undefined;\n $scope.areAllDisplayedImportResourcesSelected = false;\n $scope.areAllDisplayedImportResourcesPartialSelected = false;\n $scope.ImportResourceStatus = ImportResourceStatus;\n $scope.canRemoveResource = angular.isDefined(attrs.onRemove);\n $scope.canResetSelectedResources = false;\n $scope.SORTING_TYPES = SortingType;\n $scope.sortAsc = angular.isDefined(attrs.asc) ? $scope.asc : true;\n $scope.sortedBy = $scope.sortBy;\n $scope.showLoader = ImportContextService.getShowLoader();\n $scope.hasSelection = false;\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Updates the selection model when a resource is selected or unselected.\n * @param {ImportResourceTreeElement} resource The resource that was selected or unselected.\n */\n $scope.selectionChanged = ((resource) => {\n resource.setSelection(resource.selected);\n updateSelectByStateDropdownModel();\n setCanResetResourcesFlag();\n updateHasSelection();\n });\n\n $scope.selectResourceWithStatus = (resourceStatus) => {\n $scope.selectedByStatus = resourceStatus;\n $scope.resources.setSelection(false);\n\n if (STATUS_OPTIONS.ALL === $scope.selectedByStatus) {\n $scope.resources.setSelection(true);\n } else if (STATUS_OPTIONS.IMPORTED === $scope.selectedByStatus) {\n $scope.resources.selectAllWithStatus([ImportResourceStatus.DONE]);\n } else if (STATUS_OPTIONS.NOT_IMPORTED === $scope.selectedByStatus) {\n $scope.resources.selectAllWithStatus([ImportResourceStatus.IMPORTING, ImportResourceStatus.NONE, ImportResourceStatus.ERROR, ImportResourceStatus.PENDING, ImportResourceStatus.INTERRUPTING]);\n }\n\n updateListedImportResources();\n setCanResetResourcesFlag();\n };\n\n $scope.filterByTypeChanged = (newType) => {\n $scope.filterByType = newType;\n updateListedImportResources();\n };\n\n $scope.filterByFileNameChanged = (filterByFileName) => {\n $scope.filterByFileName = filterByFileName;\n debounce(updateListedImportResources, 100);\n };\n\n /**\n * Resets the status of the selected resources.\n */\n $scope.onResetStatus = () => {\n const resourcesNames = $scope.resources.getAllSelected()\n .map((resource) => resource.path);\n if (resourcesNames.length > 0) {\n $scope.onReset({resources: resourcesNames});\n }\n };\n\n /**\n * Resets the status of the given resource.\n * @param {ImportResourceTreeElement} importResource\n */\n $scope.resetStatus = (importResource) => {\n $scope.onReset({resources: [importResource.path]});\n };\n\n $scope.onRemoveResources = () => {\n const selectedResources = $scope.resources.getAllSelected();\n if (selectedResources && selectedResources.length > 0) {\n $scope.onRemove({resources: selectedResources});\n }\n };\n\n $scope.removeResource = (resource) => {\n $scope.onRemove({resources: [resource]});\n };\n\n $scope.importAll = (withoutChangingSettings) => {\n const selectedResources = $scope.resources.getAllSelectedForImport();\n if (selectedResources.length > 0) {\n $scope.onImportAll({selectedResources: selectedResources, withoutChangingSettings});\n }\n };\n\n $scope.stopImport = (importResource) => {\n $scope.onStopImport({resource: importResource});\n };\n\n /**\n * Sorts resources by provided sorting type.\n * @param {SortingType} sortedBy The sorting type to use.\n */\n $scope.sort = (sortedBy) => {\n if ($scope.sortedBy === sortedBy) {\n $scope.sortAsc = !$scope.sortAsc;\n } else {\n $scope.sortAsc = true;\n }\n $scope.sortedBy = sortedBy;\n updateListedImportResources();\n };\n\n $scope.editResource = (resource) => {\n $scope.onEditResource({resource});\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Sets the flag showing if any of the selected resources is already imported\n * and can have their states reset.\n */\n const setCanResetResourcesFlag = () => {\n $scope.canResetSelectedResources = $scope.resources.getSelectedImportedResources();\n };\n\n const updateListedImportResources = () => {\n $scope.resources.getRoot().updateSelectionState();\n sortResources();\n $scope.displayResources = $scope.resources.toList()\n .filter(filterByType)\n .filter(filterByName);\n\n updateHasSelection();\n updateSelectByStateDropdownModel();\n };\n\n const updateHasSelection = () => {\n const allSelectedFilesNames = $scope.resources.getAllSelectedFilesNames();\n $scope.hasSelection = allSelectedFilesNames.length > 0;\n ImportContextService.updateSelectedFilesNames(allSelectedFilesNames);\n };\n\n const updateSelectByStateDropdownModel = () => {\n const hasUnselectedDisplayedImportResource = $scope.displayResources.some((resource) => !resource.selected);\n const hasSelectedDisplayedImportResource = $scope.displayResources.some((resource) => resource.selected);\n $scope.areAllDisplayedImportResourcesSelected = hasSelectedDisplayedImportResource && !hasUnselectedDisplayedImportResource;\n $scope.areAllDisplayedImportResourcesPartialSelected = hasSelectedDisplayedImportResource && hasUnselectedDisplayedImportResource;\n };\n\n const sortResources = () => {\n if (SortingType.NAME === $scope.sortedBy) {\n $scope.resources.sort(compareByName($scope.sortAsc));\n } else if (SortingType.SIZE === $scope.sortedBy) {\n $scope.resources.sort(compareBySize($scope.sortAsc));\n } else if (SortingType.MODIFIED === $scope.sortedBy) {\n $scope.resources.sort(compareByModified($scope.sortAsc));\n } else if (SortingType.IMPORTED === $scope.sortedBy) {\n $scope.resources.sort(compareByImportedOn($scope.sortAsc));\n } else if (SortingType.CONTEXT === $scope.sortedBy) {\n $scope.resources.sort(compareByContext($scope.sortAsc));\n }\n };\n\n const compareByName = (acs) => (r1, r2) => {\n return acs ? r1.importResource.name.localeCompare(r2.importResource.name) : r2.importResource.name.localeCompare(r1.importResource.name);\n };\n\n const compareBySize = (acs) => (r1, r2) => {\n // The format of size returned by the backend has changed, but we need to keep the old format for backward compatibility.\n // Therefore, we convert the size to always be in bytes.\n const r1Size = ByteUtils.convertToBytes(r1.importResource.size);\n const r2Size = ByteUtils.convertToBytes(r2.importResource.size);\n return acs ? r1Size - r2Size : r2Size - r1Size;\n };\n\n const compareByModified = (acs) => (r1, r2) => {\n const r1ModifiedOn = r1.importResource.modifiedOn || Number.MAX_VALUE;\n const r2ModifiedOn = r2.importResource.modifiedOn || Number.MAX_VALUE;\n return acs ? r1ModifiedOn - r2ModifiedOn : r2ModifiedOn - r1ModifiedOn;\n };\n\n const compareByImportedOn = (acs) => (r1, r2) => {\n const r1ImportedOn = r1.importResource.importedOn || Number.MAX_VALUE;\n const r2ImportedOn = r2.importResource.importedOn || Number.MAX_VALUE;\n return acs ? r1ImportedOn - r2ImportedOn : r2ImportedOn - r1ImportedOn;\n };\n\n const compareByContext = (acs) => (r1, r2) => {\n return acs ? r1.importResource.context.localeCompare(r2.importResource.context) : r2.importResource.context.localeCompare(r1.importResource.context);\n };\n\n const filterByType = (resource) => {\n if (TYPE_FILTER_OPTIONS.ALL === $scope.filterByType) {\n return true;\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.FILE) {\n return resource.isFile();\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.DIRECTORY) {\n return resource.isDirectory();\n }\n\n return false;\n };\n\n const filterByName = (resource) => {\n if (!$scope.filterByFileName) {\n return true;\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.DIRECTORY) {\n return resource.hasTextInDirectoriesName($scope.filterByFileName);\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.FILE) {\n return resource.hasTextInFilesName($scope.filterByFileName);\n }\n return resource.hasTextInResourcesName($scope.filterByFileName);\n };\n\n let debounceTimeout;\n const debounce = (func, delay) => {\n // Clear previous timeout\n if (debounceTimeout) {\n $timeout.cancel(debounceTimeout);\n }\n\n // Set new timeout\n debounceTimeout = $timeout(func, delay);\n };\n\n // =========================\n // Subscription handlers\n // =========================\n\n const onResourcesUpdatedHandler = (newResources = []) => {\n const isUserImport = TABS.USER === ImportContextService.getActiveTabId();\n if ($scope.resources.isEmpty()) {\n $scope.resources = ImportResourceTreeService.toImportResourceTree(newResources, isUserImport);\n if (isUserImport) {\n $scope.sortedBy = SortingType.MODIFIED;\n }\n } else {\n ImportResourceTreeService.mergeResourceTree($scope.resources, newResources, isUserImport);\n }\n ImportResourceTreeService.calculateElementIndent($scope.resources);\n ImportResourceTreeService.setupAfterTreeInitProperties($scope.resources);\n updateListedImportResources();\n setCanResetResourcesFlag();\n };\n\n // =========================\n // Subscriptions\n // =========================\n const subscriptions = [];\n\n subscriptions.push(ImportContextService.onResourcesUpdated(onResourcesUpdatedHandler));\n subscriptions.push(ImportContextService.onShowLoaderUpdated((showLoader) => $scope.showLoader = showLoader));\n subscriptions.push(ImportContextService.onActiveTabIdUpdated(() => $scope.resources = new ImportResourceTreeElement()));\n\n const removeAllSubscribers = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n },\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":["importResourceStatusInfoDirective","$rootScope","$document","restrict","templateUrl","scope","resource","link","$scope","subscribers","popoverTemplate","popoverIsOpen","context","importResource","replaceGraphs","baseUrl","decodeURIComponent","baseURI","forceSerial","importedOn","parserSettings","open","closeAllDialogs","$broadcast","close","handleEscapeKeyPress","event","key","$apply","push","$on","on","off","forEach","subscriber","angular","module","directive","$inject","importResourceMessageDirective","$uibModal","ImportResourceStatus","toTitleCase","str","stringUtils","showMessage","resourceTreeElement","controller","size","windowClass","backdrop","resolve","message","validateUri","UriUtils","require","element","attr","ctrl","$parsers","unshift","value","$setValidity","$isEmpty","valid","isValidIri","toString","ImportProgressIndicator","$watch","file","status","$","has","length","append","TYPE_FILTER_OPTIONS","STATUS_OPTIONS","importResourceTreeDirective","$timeout","ImportContextService","columnKeys","showTypeFilter","sortBy","asc","onImport","onImportAll","onReset","onRemove","onStopImport","onEditResource","attrs","resources","ImportResourceTreeElement","displayResources","filterByType","ALL","filterByFileName","selectedByStatus","undefined","areAllDisplayedImportResourcesSelected","areAllDisplayedImportResourcesPartialSelected","canRemoveResource","isDefined","canResetSelectedResources","SORTING_TYPES","SortingType","sortAsc","sortedBy","showLoader","getShowLoader","hasSelection","selectionChanged","setSelection","selected","updateSelectByStateDropdownModel","setCanResetResourcesFlag","updateHasSelection","selectResourceWithStatus","resourceStatus","IMPORTED","selectAllWithStatus","DONE","NOT_IMPORTED","IMPORTING","NONE","ERROR","PENDING","INTERRUPTING","updateListedImportResources","filterByTypeChanged","newType","filterByFileNameChanged","debounce","onResetStatus","resourcesNames","getAllSelected","map","path","resetStatus","onRemoveResources","selectedResources","removeResource","importAll","withoutChangingSettings","getAllSelectedForImport","stopImport","sort","editResource","getSelectedImportedResources","getRoot","updateSelectionState","sortResources","toList","filter","filterByName","allSelectedFilesNames","getAllSelectedFilesNames","updateSelectedFilesNames","hasUnselectedDisplayedImportResource","some","hasSelectedDisplayedImportResource","NAME","compareByName","SIZE","compareBySize","MODIFIED","compareByModified","compareByImportedOn","CONTEXT","compareByContext","acs","r1","r2","name","localeCompare","r1Size","ByteUtils","convertToBytes","r2Size","r1ModifiedOn","modifiedOn","Number","MAX_VALUE","r2ModifiedOn","r1ImportedOn","r2ImportedOn","FILE","isFile","DIRECTORY","isDirectory","hasTextInDirectoriesName","hasTextInFilesName","hasTextInResourcesName","debounceTimeout","func","delay","cancel","subscriptions","onResourcesUpdated","onResourcesUpdatedHandler","newResources","isUserImport","TABS","USER","getActiveTabId","isEmpty","ImportResourceTreeService","toImportResourceTree","mergeResourceTree","calculateElementIndent","setupAfterTreeInitProperties","onShowLoaderUpdated","onActiveTabIdUpdated","removeAllSubscribers","subscription","ImportResourceMessageDialogController","logger","LoggerProvider","$uibModalInstance","$translate","toastr","dismiss","copyToClipboard","navigator","clipboard","writeText","then","success","instant","err","error"],"ignoreList":[],"sourceRoot":""}