graphdb-workbench
Version:
The web application for GraphDB APIs
1 lines • 40 kB
JavaScript
"use strict";var index=require("./index-jdsA9lN2.js"),workbenchApi=require("@ontotext/workbench-api"),translation_service=require("./translation.service-DjdwDpXN.js"),htmlUtil=require("./html-util-e108SpX7.js"),resourceSearchConstants=require("./resource-search-constants-nHPm7A9W.js"),tooltipUtil=require("./tooltip-util-CmDLnWqH.js");require("./onto-tooltip-placement-CTomd-7A.js");const ontoFooterCss=":host{display:block}.footer-component{padding-left:var(--main-content-rl-padding);height:1.875rem}",OntoFooter=class{constructor(e){index.registerInstance(this,e),this.subscriptions=new workbenchApi.SubscriptionList,this.currentYear=(new Date).getFullYear(),this.securityContextService=workbenchApi.ServiceProvider.get(workbenchApi.SecurityContextService),this.licenseContextService=workbenchApi.ServiceProvider.get(workbenchApi.LicenseContextService),this.cookieService=workbenchApi.ServiceProvider.get(workbenchApi.CookieService)}handleConsentGiven(){this.cookieService.acceptCookiePolicy().then(()=>this.shouldShowCookieConsent=!1)}render(){var e,t,o,i;return index.h(index.Host,{key:"c5bbe0151e3eb14932bacecaad88b7e529e3a1f1"},index.h("div",{key:"5d4e0501b872ccbaa2e48f99361a948e83191b65",class:"footer-component"},index.h("a",{key:"80ed7acc465b754ed295d2931d3c38549e2fa4f8",href:"http://graphdb.ontotext.com",target:"_blank",rel:"noopener noreferrer"},"GraphDB")," ",null===(e=this.productInfo)||void 0===e?void 0:e.productVersion," • ",index.h("a",{key:"df2a6a80c117d91be1a45f4021987b24d0eaaa06",href:"http://rdf4j.org",target:"_blank",rel:"noopener noreferrer"},"RDF4J "),null===(t=this.productInfo)||void 0===t?void 0:t.sesame," • Connectors ",null===(o=this.productInfo)||void 0===o?void 0:o.connectors," • Workbench ",null===(i=this.productInfo)||void 0===i?void 0:i.workbench," • © 2002–",this.currentYear," ",index.h("a",{key:"2477c4b7e24a304904b1a9e113e562a3e2a68193",href:"http://ontotext.com",target:"_blank",rel:"noopener noreferrer"},"Ontotext AD"),". ",index.h("translate-label",{key:"e5f700a69d2f129d883af745a415027532b52531",labelKey:"footer.label.all_rights_reserved"})),this.shouldShowCookieConsent&&index.h("onto-cookie-consent",{key:"42138884db38d3813072b574d8c4b84f2acb2c9d"}))}connectedCallback(){this.subscribeToProductInfoChange(),this.subscribeToUserChange(),this.subscribeToLicenseChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}subscribeToProductInfoChange(){this.subscriptions.add(workbenchApi.ServiceProvider.get(workbenchApi.ProductInfoContextService).onProductInfoChanged(e=>{this.productInfo=e}))}isTrackingAllowed(){return workbenchApi.ServiceProvider.get(workbenchApi.LicenseService).isTrackableLicense()&&!workbenchApi.WindowService.getWindow().wbDevMode}subscribeToUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.setCookieConsentVisibility()}))}setCookieConsentVisibility(){var e;const t=this.securityContextService.getAuthenticatedUser();this.shouldShowCookieConsent=this.isTrackingAllowed()&&!new workbenchApi.CookieConsent(null===(e=null==t?void 0:t.appSettings)||void 0===e?void 0:e.COOKIE_CONSENT).policyAccepted}subscribeToLicenseChange(){this.subscriptions.add(this.licenseContextService.onLicenseChanged(()=>{this.setCookieConsentVisibility()}))}};OntoFooter.style=ontoFooterCss;const SelectorItemButton=({repository:e})=>index.h("div",{class:"repository-selector-dropdown-item"},index.h("i",{class:"item-icon icon-repo-"+e.type}),index.h("div",{class:"item-label"},index.h("div",{class:"repository-id"},e.id),index.h("div",{class:"repository-location"},e.location?e.location:"Local"))),ontoHeaderCss=":host{display:block}.header-component>*{height:100%}.header-component{display:flex;justify-content:flex-end;align-items:stretch;gap:0.25em;margin-right:2em;font-size:1.1em;padding-bottom:0.5rem}",OntoHeader=class{constructor(e){index.registerInstance(this,e),this.monitoringService=workbenchApi.ServiceProvider.get(workbenchApi.MonitoringService),this.repositoryContextService=workbenchApi.ServiceProvider.get(workbenchApi.RepositoryContextService),this.repositoryLocationContextService=workbenchApi.ServiceProvider.get(workbenchApi.RepositoryLocationContextService),this.repositoryService=workbenchApi.ServiceProvider.get(workbenchApi.RepositoryService),this.securityContextService=workbenchApi.ServiceProvider.get(workbenchApi.SecurityContextService),this.toastrService=workbenchApi.ServiceProvider.get(workbenchApi.OntoToastrService),this.namespacesService=workbenchApi.ServiceProvider.get(workbenchApi.NamespacesService),this.namespaceContextService=workbenchApi.ServiceProvider.get(workbenchApi.NamespacesContextService),this.languageService=workbenchApi.ServiceProvider.get(workbenchApi.LanguageService),this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL=2e3,this.fibonacciGenerator=new workbenchApi.FibonacciGenerator,this.authService=workbenchApi.ServiceProvider.get(workbenchApi.AuthenticationService),this.eventService=workbenchApi.ServiceProvider.get(workbenchApi.EventService),this.shouldShowSearch=!0,this.isHomePage=workbenchApi.isHomePage(),this.isActiveLocationLoading=!1,this.repositoryItems=[],this.subscriptions=new workbenchApi.SubscriptionList,this.skipUpdateActiveOperationsTimes=0,this.canWriteRepo=e=>this.canWriteRepoInLocation(e),this.repositorySizeInfoFetcher=e=>this.repositoryService.getRepositorySizeInfo(e),this.showViewResourceMessage=e=>{e.stopPropagation(),this.toastrService.info(translation_service.TranslationService.translate("rdf_search.toasts.use_view_resource")),this.shouldShowSearch=!1,htmlUtil.HtmlUtil.focusElement("#search-resource-input-home input"),this.eventService.emit({NAME:resourceSearchConstants.ResourceSearchConstants.RDF_SEARCH_ICON_CLICKED})}}disconnectedCallback(){this.subscriptions.unsubscribeAll(),this.stopOperationPolling()}connectedCallback(){this.currentRepository=this.repositoryContextService.getSelectedRepository(),this.setupTotalRepositoryFormater(),this.subscribeToEvents(),this.currentRoute=workbenchApi.getCurrentRoute()}render(){var e,t,o,i,n,r;return index.h(index.Host,{key:"22effd2a1b4fb572894b21dd68ff26909203f867"},index.h("div",{key:"c7722487406f0fa21b97e14479071f6dcb9221e0",class:"header-component"},index.h("onto-search-icon",{key:"8296b4143a4f12bb907dddc9aa05c4b55bfe8d03",class:"rdf-search-button",onClick:this.showViewResourceMessage,"data-test":"onto-show-view-resource-message",style:{display:this.shouldShowSearch&&this.isHomePage?"block":"none"}}),index.h("onto-rdf-search",{key:"ac629dc46aec09f238ce47491a96f3d89031d4fe","data-test":"onto-open-rdf-search-button",style:{display:this.shouldShowSearch&&!this.isHomePage?"block":"none"}}),(null===(e=this.activeOperations)||void 0===e?void 0:e.allRunningOperations.getItems().length)?index.h("onto-operations-notification",{activeOperations:this.activeOperations}):"",this.license&&!(null===(t=this.license)||void 0===t?void 0:t.valid)?index.h("onto-license-alert",{license:this.license}):"",index.h("onto-repository-selector",{key:"883b6da079a7c9b947c2a4ebcb91b56d742df4b6",currentRepository:this.currentRepository,items:this.repositoryItems,repositorySizeInfoFetcher:this.repositorySizeInfoFetcher,totalTripletsFormatter:this.totalTripletsFormatter,canWriteRepo:this.canWriteRepo}),(null===(o=this.securityConfig)||void 0===o?void 0:o.enabled)&&(null===(i=this.securityConfig)||void 0===i?void 0:i.userLoggedIn)?index.h("onto-user-menu",{user:this.user,securityConfig:this.securityConfig}):"",(null===(n=this.securityConfig)||void 0===n?void 0:n.enabled)&&!(null===(r=this.securityConfig)||void 0===r?void 0:r.userLoggedIn)&&"login"!==this.currentRoute?index.h("onto-user-login",null):"",index.h("onto-language-selector",{key:"21b12b014eb860c81a390f7778bc3e8d8281d228","dropdown-alignment":"right"})))}subscribeToEvents(){this.subscribeToRepositoryListChanged(),this.subscribeToLicenseChange(),this.subscribeToRepositoryChange(),this.subscribeToSecurityContextChange(),this.subscribeToActiveRepositoryLocationChange(),this.subscribeToActiveRepoLoadingChange(),this.subscribeToNavigationEnd(),this.subscribeToLanguageChanged(),this.subscribeToAuthenticatedUserChange()}subscribeToRepositoryListChanged(){return this.repositoryContextService.onRepositoryListChanged(e=>{(null==e?void 0:e.getItems().length)?this.initOnRepositoryListChanged(e):this.resetOnMissingRepositories()})}subscribeToLicenseChange(){this.subscriptions.add(workbenchApi.ServiceProvider.get(workbenchApi.LicenseContextService).onLicenseChanged(e=>{this.license=e}))}subscribeToRepositoryChange(){this.subscriptions.add(this.repositoryContextService.onSelectedRepositoryChanged(e=>{this.currentRepository=e,this.currentRepository?this.startOperationPolling():this.stopOperationPolling(),this.shouldShowSearch=this.shouldShowRdfSearch(),this.loadNamespaces(),this.updateRepositoryItems()}))}subscribeToSecurityContextChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(e=>{this.user=e})),this.subscriptions.add(this.securityContextService.onSecurityConfigChanged(e=>{this.securityConfig=e}))}subscribeToAuthenticatedUserChange(){this.subscriptions.add(this.securityContextService.onAuthenticatedUserChanged(()=>{this.updateRepositoryItems()}))}subscribeToActiveRepositoryLocationChange(){this.subscriptions.add(this.repositoryLocationContextService.onActiveLocationChanged(()=>{this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToActiveRepoLoadingChange(){this.subscriptions.add(this.repositoryLocationContextService.onIsLoadingChanged(e=>{this.isActiveLocationLoading=e,this.shouldShowSearch=this.shouldShowRdfSearch()}))}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(workbenchApi.EventName.NAVIGATION_END,()=>{this.shouldShowSearch=this.shouldShowRdfSearch(),this.isHomePage=workbenchApi.isHomePage(),this.currentRoute=workbenchApi.getCurrentRoute()}))}subscribeToLanguageChanged(){this.subscriptions.add(workbenchApi.ServiceProvider.get(workbenchApi.LanguageContextService).onSelectedLanguageChanged(e=>this.setupTotalRepositoryFormater(e)))}resetOnMissingRepositories(){this.repositoryItems=[],this.repositoryList=new workbenchApi.RepositoryList,this.currentRepository=void 0}initOnRepositoryListChanged(e){this.repositoryList=e,this.updateRepositoryItems()}updateRepositoryItems(){this.repositoryItems=this.getRepositoriesDropdownItems()}getRepositoriesDropdownItems(){var e;if(!(null===(e=this.repositoryList)||void 0===e?void 0:e.getItems().length))return[];let t;return this.repositoryList.sortByLocationAndId(),t=this.currentRepository?this.repositoryList.filterByRepository([this.currentRepository]):this.repositoryList.getItems(),t.filter(e=>this.authService.canReadRepo(e)||this.authService.canReadGqlRepo(e)).map(e=>(new resourceSearchConstants.DropdownItem).setName(index.h(SelectorItemButton,{repository:e})).setValue(e).setDropdownTooltipTrigger("mouseenter focus").setGuideSelector(`repository-id-${e.id}`))}canWriteRepoInLocation(e){return!0}loadNamespaces(){this.currentRepository&&this.authService.canReadRepo(this.currentRepository)&&this.namespacesService.getNamespaces(this.currentRepository.id).then(e=>this.namespaceContextService.updateNamespaces(e))}startOperationPolling(){clearInterval(this.pollingInterval),this.pollingInterval=workbenchApi.WindowService.getWindow().setInterval(()=>{this.skipUpdateActiveOperationsTimes>0?this.skipUpdateActiveOperationsTimes--:this.monitoringService.getOperations(this.currentRepository.id).then(e=>{workbenchApi.ObjectUtil.deepEqual(this.activeOperations,e)||(this.activeOperations=e),this.fibonacciGenerator.reset(),this.skipUpdateActiveOperationsTimes=0}).catch(()=>{this.activeOperations=void 0,this.skipUpdateActiveOperationsTimes=this.fibonacciGenerator.next()})},this.UPDATE_ACTIVE_OPERATION_TIME_INTERVAL)}stopOperationPolling(){clearInterval(this.pollingInterval),this.activeOperations=void 0}shouldShowRdfSearch(){return!!this.currentRepository&&(!this.isActiveLocationLoading||"/repository"===workbenchApi.getPathName())&&this.authService.canReadRepo(this.currentRepository)}setupTotalRepositoryFormater(e){e||(e=this.languageService.getDefaultLanguage()),this.totalTripletsFormatter=new Intl.NumberFormat(e,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})}};OntoHeader.style=ontoHeaderCss;class NavbarToggledEvent{constructor(e){this.type="navbarToggled",this.payload=e}}class NavbarModel{constructor(e=[]){this._items=e}hasParent(e){return this._items.some(t=>e===t.label)}getModel(){const e=t=>{const o=t.children.map(e);return new NavbarItemModel(Object.assign(Object.assign({},t),{children:o}))};return this._items.map(e)}addItem(e){this._items.push(e)}getSelectedRootItem(){return this._items.find(e=>e.selected)}isParentOpened(e){var t;return!!(null===(t=this.getParentItem(e))||void 0===t?void 0:t.open)}getTopLevelItem(e){return this._items.find(t=>t.label===e)}getParentItem(e){return this._items.find(t=>t.label===e.parent)}deselectAll(){this.walk(e=>{e.selected=!1})}closeAll(){this.walk(e=>{e.open=!1})}deselectItem(e){e.selected=!1}selectItem(e){e.label?e.selected=!0:this.selectItem(e.parentModel)}hasSelectedSubmenu(e){return!!e.children&&e.children.some(e=>this.hasSelection(e))}hasSelection(e){return!!e.selected||!!e.children&&e.children.some(e=>this.hasSelection(e))}closeOpened(){const e=this._items.find(e=>e.open);e&&(this.hasSelectedSubmenu(e)&&this.selectItem(e),e.open=!1)}open(e){this.walk(e=>{e.open=!1}),this.openItemAndParent(e)}openItemAndParent(e){e.parentModel&&this.openItemAndParent(e.parentModel),e.open=!0}closeOtherParents(e){const t=e.parent;this.walk(e=>{e.label!==t&&(e.open=!1)})}highlightSelected(){const e=this.getSelectedItem();(null==e?void 0:e.hasParent)&&this.selectItem(this.getParentItem(e))}unhighlightSelected(){const e=this.getSelectedRootItem();e&&e.children.length&&e.open&&this.deselectItem(e)}getSelectedItem(){let e=null;const t=o=>{if(o.selected)return e=o,!0;if(o.children)for(const e of o.children)if(t(e))return!0;return!1};return this._items.some(t),e}expandSelected(){const e=this.getSelectedItem();e&&(e.hasParent?this.open(this.getParentItem(e)):this.open(e))}initSelected(e){this.walk(t=>{var o;let i=e;(null===(o=t.href)||void 0===o?void 0:o.includes("*"))&&(i=this.getWildcardPath(e,t.href)),t.href===i&&(t.hasParent&&this.open(t),this.selectItem(t))})}getWildcardPath(e,t){const o=e.split("/"),i=t.split("/");if(o.length!==i.length)return e;const n=[];for(let t=0;t<i.length;t++)if("*"===i[t])n.push("*");else{if(i[t]!==o[t])return e;n.push(i[t])}return n.join("/")}sorted(){return this._items.filter(e=>e.children).forEach(e=>{e.children.sort(NavbarModel.compare)}),this._items.sort(NavbarModel.compare),this}static compare(e,t){return e.order-t.order}walk(e){this.walkRecursively(this.items,e)}walkRecursively(e,t){e.forEach(e=>{var o;t(e),(null===(o=e.children)||void 0===o?void 0:o.length)&&this.walkRecursively(e.children,t)})}get items(){return this._items}}class NavbarItemModel{constructor(e){var t;this._selected=!1,this._open=!1,this._order=e.order,this._label=e.label,this._labelKey=e.labelKey,this._href=e.href,this._children=[...null!==(t=e.children)&&void 0!==t?t:[]],this._hasParent=e.hasParent,this._parent=e.parent,this._selected=e.selected,this._open=e.open,this._documentationHref=e.documentationHref,this._hrefFun=e.hrefFun,this._editions=e.editions,this._icon=e.icon,this._role=e.role,this._guideSelector=e.guideSelector,this._testSelector=e.testSelector,this._parentModel=e.parentModel}addChild(e){this.children.push(e),e.setParent(this)}addChildren(...e){e.forEach(e=>{this.addChild(e)})}hasSubmenus(){return"#"===this._href}get parent(){return this._parent}set parent(e){this._parent=e}get order(){return this._order}set order(e){this._order=e}get label(){return this._label}set label(e){this._label=e}get labelKey(){return this._labelKey}set labelKey(e){this._labelKey=e}get documentationHref(){return this._documentationHref}set documentationHref(e){this._documentationHref=e}get href(){return this._href}set href(e){this._href=e}get children(){return this._children}set children(e){this._children=e}get hasParent(){return this._hasParent}set hasParent(e){this._hasParent=e}get selected(){return this._selected}set selected(e){this._selected=e}get open(){return this._open}set open(e){this._open=e}get hrefFun(){return this._hrefFun}set hrefFun(e){this._hrefFun=e}get editions(){return this._editions}set editions(e){this._editions=e}get icon(){return this._icon}set icon(e){this._icon=e}get role(){return this._role}set role(e){this._role=e}get guideSelector(){return this._guideSelector}set guideSelector(e){this._guideSelector=e}get testSelector(){return this._testSelector}set testSelector(e){this._testSelector=e}get parentModel(){return this._parentModel}set parentModel(e){this._parentModel=e}setParent(e){this.parentModel=e,this.hasParent=!!e}}class NavbarService{static map(e){const t=new NavbarModel;return NavbarService.setTopLevelMenuItems(e,t),NavbarService.setSubmenuItems(e,t),t.sorted()}static setTopLevelMenuItems(e,t){e.forEach(e=>{e.items.filter(e=>!e.parent&&e.shouldShow).forEach(e=>{t.hasParent(e.label)?console.warn("Doubled parent definition: ",e):t.addItem(this.toMenuItemModel(e,void 0,e.children))})})}static setSubmenuItems(e,t){e.forEach(e=>{e.items.filter(e=>e.parent&&e.shouldShow).forEach(e=>{const o=t.getTopLevelItem(e.parent);null==o||o.addChildren(this.toMenuItemModel(e,o,e.children))})})}static toMenuItemModel(e,t,o=[]){const i=new NavbarItemModel({label:e.label,labelKey:e.labelKey,href:e.href,documentationHref:e.documentationHref,hrefFun:e.hrefFun,order:e.order,role:e.role,editions:e.editions,icon:e.icon,guideSelector:e.guideSelector,hasParent:!!t,parentModel:t,parent:e.parent,selected:!1,testSelector:e.testSelector}),n=o.map(e=>this.toMenuItemModel(e,i,e.children));return i.addChildren(...n),i}}const ontoNavbarCss=':host{display:block}.navbar-component{width:15rem;position:fixed;font-weight:400;z-index:1010;margin:0;padding:0;-moz-transition:width 0.2s ease-in;-o-transition:width 0.2s ease-in;-webkit-transition:width 0.2s ease-in;transition:width 0.2s ease-in;height:100%;overflow-y:auto;overflow-x:hidden}@media screen and (max-height: 475px){.navbar-component.collapsed{position:absolute}}.navbar-component li{list-style:none;cursor:pointer}.navbar-component li a{color:var(--secondary-color);text-decoration:none}.navbar-component li a.sub-menu-link:not([href=""]):not([tabindex]):hover{text-decoration:none !important}.navbar-component .sub-menu-item a.sub-menu-link:not([href]) translate-label.menu-item{padding-right:3.5px}.navbar-component a:not([href]):not([tabindex]),.navbar-component a:not([href]):not([tabindex]):focus,.navbar-component a:not([href]):not([tabindex]):hover{color:var(--secondary-color)}.navbar-component a.sub-menu-link:not([href]):hover .menu-item,.navbar-component a.sub-menu-link[href=""]:hover .menu-item{text-decoration-line:underline !important}.navbar-component li .menu-element-root:hover,.navbar-component .sub-menu li:hover{background-color:rgba(0, 0, 0, 0.1);text-decoration-line:none !important}.navbar-component li .menu-element-root:hover .menu-item-icon,.navbar-component .menu-element.open .menu-item-icon{transform:scale(1.1)}.navbar-component .menu-element.open .sub-menu .menu-item-icon{transform:scale(0.5)}.navbar-component .menu-element{border-bottom:1px solid #fff;background-color:#f7f7f7;position:relative}.navbar-component .menu-element-root{padding:0.8em 2.5em 0.8em 0.8em;display:block;line-height:2.5rem;position:relative;z-index:100;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;color:var(--secondary-color);cursor:pointer;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.navbar-component .menu-item-icon{font-size:2.5rem;width:2.5rem;vertical-align:middle;text-align:center;color:var(--primary-color);transform:scale(0.9);display:inline-block;-moz-transition:all 0.18s ease-out;-o-transition:all 0.18s ease-out;-webkit-transition:all 0.18s ease-out;transition:all 0.18s ease-out;pointer-events:none}.navbar-component .menu-element-root .menu-item{pointer-events:none}.navbar-component .menu-element-root.active,.navbar-component .menu-element-root.active:hover{background-color:var(--primary-color);color:#fff}.navbar-component .active .menu-item-icon{color:var(--icon-on-primary-color);transform:scale(1.1)}.navbar-component :not(.brand) .menu-element-root{font-size:1.1rem}.navbar-component .brand{background-color:var(--logo-background-color)}.navbar-component .brand a{display:block;position:relative;z-index:5}.navbar-component .product-version{line-height:normal;color:rgba(255, 255, 255, 0.8);text-transform:uppercase;font-size:0.625rem;display:block;position:absolute;right:0;bottom:0;padding:0.2em 0.5em;border-color:rgba(255, 255, 255, 0.2);border-style:solid;border-top-width:1px;border-left-width:1px;border-bottom-width:0;border-right-width:0}.navbar-component .menu-element.open,.navbar-component.collapsed .menu-element:hover{background-color:#dcdcdc}.navbar-component .sub-menu{position:relative;padding:0;z-index:110}.navbar-component .sub-menu li{display:none}.navbar-component .sub-menu li a{padding:0.5em 0.8em;display:block}.navbar-component .sub-menu li.active a{background-color:var(--primary-color);font-weight:500;color:#fff}.navbar-component .menu-element.open ul li{display:block}.navbar-component .menu-element ul:before,.rdf-list ul.datasource:before{font-family:"icomoon", sans-serif !important;content:"\\e921";display:block;font-size:1.5em;position:absolute;top:-3.3rem;right:1rem;-moz-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;-webkit-transition:all 0.2s ease-in;transition:all 0.2s ease-in;pointer-events:none}.navbar-component .menu-element.open ul:before,.rdf-list ul.open.datasource:before{transform:rotate(180deg)}.toggle-menu{display:block;position:absolute;top:0;right:0;color:#fff;font-size:0.8em;line-height:1.5;padding:0 0.3em;background-color:rgba(255, 255, 255, 0.1);z-index:10;cursor:pointer}.toggle-menu:hover{background-color:var(--primary-color)}.toggle-menu [class^=icon-]{-moz-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;-webkit-transition:all 0.2s ease-in;transition:all 0.2s ease-in;display:inline-block}.toggle-menu:hover [class^=icon-]{transform:scale(1.1)}.small-logo{width:50px;height:50px}.big-logo{width:180px;height:50px}.navbar-component.collapsed{width:4.375rem;overflow:visible;height:auto}.navbar-component.collapsed .menu-element.open .sub-menu{position:absolute;top:0;left:4.375rem;background-color:#EBEBEB;width:15rem}.navbar-component.collapsed .menu-element .menu-item,.navbar-component.collapsed .menu-element .sub-menu li{display:none}.navbar-component.collapsed .menu-element.open .menu-item,.navbar-component.collapsed .menu-element.open .sub-menu li{display:block}.navbar-component.collapsed .menu-element.open .menu-element-root .menu-item{display:none}.navbar-component.collapsed .menu-element-root{overflow:visible}.navbar-component .menu-element.open ul li.submenu-title,.navbar-component .submenu-title{display:none}.navbar-component.collapsed .menu-element.open ul li.submenu-title{display:block;font-size:1.2em;font-weight:500;border-bottom:1px solid rgba(0, 0, 0, 0.1);text-overflow:ellipsis;overflow:hidden;padding:0.5em 0.8rem 0.2em 0;color:var(--secondary-color);margin-left:0.8rem;margin-bottom:0.5em}.navbar-component .sub-menu li.submenu-title:hover{background-color:transparent}.navbar-component.collapsed .menu-element.open .sub-menu.align-bottom{bottom:0;top:auto}.navbar-component.collapsed .menu-element ul:before{display:none}.navbar-component.collapsed .brand a{padding:0.4rem}.navbar-component.collapsed .product-version{display:none}.navbar-component.collapsed .small-logo,.navbar-component .big-logo{display:block}.navbar-component .small-logo,.navbar-component.collapsed .big-logo{display:none}',labelKeys={EXPAND:"menu.buttons.expand",COLLAPSE:"menu.buttons.collapse",LOGO_LINK:"menu.logo.link.title"},OntoNavbar=class{constructor(e){index.registerInstance(this,e),this.navbarToggled=index.createEvent(this,"navbarToggled"),this.productInfoContextService=workbenchApi.ServiceProvider.get(workbenchApi.ProductInfoContextService),this.subscriptions=new workbenchApi.SubscriptionList,this.labels={[labelKeys.EXPAND]:translation_service.TranslationService.translate(labelKeys.EXPAND),[labelKeys.COLLAPSE]:translation_service.TranslationService.translate(labelKeys.COLLAPSE),[labelKeys.LOGO_LINK]:translation_service.TranslationService.translate(labelKeys.LOGO_LINK)},this.isCollapsedByUser=!1,this.isCollapsed=!1}navbarCollapsedChange(e){this.isCollapsed=!e,this.isCollapsed&&!this.isCollapsedByUser?this.expandNavbar():this.collapseNavbar(),this.navbarToggled.emit(new NavbarToggledEvent(this.isCollapsed))}menuItemsChanged(e){this.init(e)}init(e){const t=NavbarService.map(e||[]);t.initSelected(workbenchApi.getCurrentRoute()),this.menuModel=t}select(e,t){var o;if(e.preventDefault(),t.documentationHref){const e=workbenchApi.UriUtil.resolveDocumentationUrl(null===(o=this.productInfo)||void 0===o?void 0:o.productVersion,t.documentationHref);return void workbenchApi.openInNewTab(e)}t.hasSubmenus()||workbenchApi.navigate(t.href),t.children.length?t.open?(this.menuModel.closeAll(),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.selectItem(t)):(this.menuModel.closeOpened(),this.menuModel.open(t),this.menuModel.hasSelectedSubmenu(t)&&this.menuModel.deselectItem(t)):this.menuModel.closeOtherParents(t),this.isCollapsed&&this.menuModel.isParentOpened(t)&&this.menuModel.closeOpened(),this.refreshNavbar()}subscribeToNavigationEnd(){this.subscriptions.add(workbenchApi.ServiceProvider.get(workbenchApi.EventService).subscribe(workbenchApi.EventName.NAVIGATION_END,()=>{this.selectItemByUrl()}))}selectItemByUrl(){this.menuModel&&(this.menuModel.deselectAll(),this.menuModel.closeAll(),workbenchApi.isHomePage()||this.menuModel.initSelected(workbenchApi.getCurrentRoute()),this.refreshNavbar())}toggleNavbar(){this.isCollapsed?(this.isCollapsedByUser=!1,this.menuModel.expandSelected(),this.menuModel.unhighlightSelected(),this.expandNavbar()):(this.isCollapsedByUser=!0,this.menuModel.highlightSelected(),this.menuModel.closeOpened(),this.collapseNavbar()),this.refreshNavbar(),this.navbarToggled.emit(new NavbarToggledEvent(this.isCollapsed))}collapseNavbar(){this.hostElement.querySelector(".navbar-component").classList.add("collapsed"),this.isCollapsed=!0}expandNavbar(){this.isCollapsedByUser||(this.hostElement.querySelector(".navbar-component").classList.remove("collapsed"),this.isCollapsed=!1)}refreshNavbar(){var e;(null===(e=this.menuModel)||void 0===e?void 0:e.items)&&(this.menuModel=new NavbarModel(this.menuModel.items))}onLanguageChanged(){this.refreshNavbar()}onTranslate(e){this.subscriptions.add(translation_service.TranslationService.onTranslate(e,[],t=>{this.labels[e]=t,this.onLanguageChanged()}))}componentWillLoad(){this.init(this.menuItems)}connectedCallback(){this.subscribeToNavigationEnd(),this.subscribeToProductInfoChanges(),this.onTranslate(labelKeys.EXPAND),this.onTranslate(labelKeys.COLLAPSE),this.onTranslate(labelKeys.LOGO_LINK)}disconnectedCallback(){this.subscriptions.unsubscribeAll()}handleSelectMenuItem(e){return t=>{this.select(t,e)}}toggleNavbarHandler(){return()=>this.toggleNavbar()}render(){if(this.menuModel)return index.h(index.Host,null,index.h("ul",{class:"navbar-component"},index.h("li",{class:"brand"},index.h("span",{class:"toggle-menu",title:this.isCollapsed?this.labels[labelKeys.EXPAND]:this.labels[labelKeys.COLLAPSE],onClick:this.toggleNavbarHandler()},index.h("em",{class:this.isCollapsed?"icon-caret-right":"icon-caret-left"})),index.h("a",{class:"menu-element-root home-page",onClick:workbenchApi.navigateTo("./")},index.h("svg",{class:"big-logo"},index.h("desc",null,this.labels[labelKeys.LOGO_LINK]),index.h("use",{href:"assets/graphdb-logo.svg#Layer_1"})),index.h("svg",{class:"small-logo"},index.h("desc",null,this.labels[labelKeys.LOGO_LINK]),index.h("use",{href:"assets/graphdb-logo-sq.svg#Layer_1"})))),this.menuModel.items.map(e=>index.h("li",{key:e.labelKey,class:{"menu-element":!0,open:e.open},"data-test":e.testSelector,"guide-selector":e.guideSelector},e.children.length>0&&index.h(index.Fragment,null,index.h("div",{class:{"menu-element-root":!0,active:e.selected},onClick:this.handleSelectMenuItem(e)},index.h("span",{class:`menu-item-icon ${e.icon}`})," ",index.h("translate-label",{class:"menu-item",labelKey:e.labelKey})),index.h("ul",{class:"sub-menu"},index.h("li",{key:e.labelKey,class:"submenu-title"},index.h("translate-label",{labelKey:e.labelKey})),e.children.map(e=>index.h("li",{key:e.labelKey,class:{"sub-menu-item":!0,active:e.selected},"data-test":e.testSelector,"guide-selector":e.guideSelector},index.h("a",{class:"sub-menu-link",href:e.href,onClick:this.handleSelectMenuItem(e)},index.h("translate-label",{class:"menu-item",labelKey:e.labelKey}),e.icon&&index.h("span",{title:"some title",class:`text-muted ${e.icon}`})))))),0===e.children.length&&index.h("a",{class:{"menu-element-root":!0,active:e.selected},href:e.href,onClick:this.handleSelectMenuItem(e)},index.h("span",{class:`menu-item-icon ${e.icon}`})," ",index.h("translate-label",{class:"menu-item",labelKey:e.labelKey}))))))}subscribeToProductInfoChanges(){this.subscriptions.add(this.productInfoContextService.onProductInfoChanged(e=>this.productInfo=e))}get hostElement(){return index.getElement(this)}static get watchers(){return{navbarCollapsed:["navbarCollapsedChange"],menuItems:["menuItemsChanged"]}}};OntoNavbar.style=ontoNavbarCss;const 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}',OntoPermissionBanner=class{constructor(e){index.registerInstance(this,e)}render(){return index.h(index.Host,{key:"3a3da80e4f862eef4882a6ab132e9837c440ccb2",class:"permission-banner"},index.h("p",{key:"2a8514b883d14b78f973eab6dd53a642b2baf123",class:"permission-banner-content onto-alert onto-alert-danger"},index.h("div",{key:"29535036796fd9bd97e374f678c45c9b3a3106f4",class:"icon-warning"}),index.h("div",{key:"9a1281996df3d1e9441569126c95572d4f77e0e1",class:"label-container"},index.h("translate-label",{key:"369f75c894b496542c1415b81452afe7da719be7",labelKey:"permission_banner.no_access_error"}),index.h("translate-label",{key:"746d0c0db8f1593efd862e162ca0f028dbcbdd2a",labelKey:"permission_banner.change_menu_or_user_warning"}))))}};OntoPermissionBanner.style=ontoPermissionBannerCss;const ontoToastrCss=".onto-toastr-container{position:fixed;z-index:9999999;pointer-events:auto;flex-direction:column}.onto-toastr-container.bottom-right{bottom:12px;right:12px}.onto-toastr-container.bottom-left{bottom:12px;left:12px}.onto-toastr-container .onto-toast{display:flex;align-items:center;border-radius:0;box-shadow:0 0 12px rgba(0, 0, 0, 0.3);position:relative;width:450px;padding:25px 0;color:white;margin-bottom:5px;overflow-wrap:break-word}.onto-toastr-container .onto-toast:hover{box-shadow:0 0 12px #000;opacity:1;cursor:pointer}.onto-toastr-container .onto-toast.warning{background-color:var(--color-warning-dark, #A92B0A)}.onto-toastr-container .onto-toast.success{background-color:var(--color-success-dark, #01544D)}.onto-toastr-container .onto-toast.error{background-color:var(--color-danger-dark, #B71C1C)}.onto-toastr-container .onto-toast.info{background-color:var(--color-info-dark, #004177)}.onto-toastr-container .onto-toast i{font-size:1.8rem;padding:0 20px;color:inherit}.onto-toastr-container .onto-toast i:hover{transform:none}.onto-toastr-container .onto-toast .toast-message{font-size:1.2rem;opacity:1;max-width:370px}",toastTypeToIconMap={[workbenchApi.ToastType.INFO]:"fa-circle-info",[workbenchApi.ToastType.SUCCESS]:"fa-circle-check",[workbenchApi.ToastType.WARNING]:"fa-message-lines",[workbenchApi.ToastType.ERROR]:"fa-triangle-exclamation"},OntoToastr=class{constructor(e){index.registerInstance(this,e),this.toasts=new workbenchApi.ToastMessageList([]),this.toastToTimeout=new Map,this.config=workbenchApi.ToastrConfig.getDefaultConfig(),this.onToastMouseEnter=e=>()=>{this.clearToastTimeout(e)},this.onToastMouseLeave=e=>()=>{this.setTimeoutForToast(e)}}handleToastCreate(e){this.addToast(e.detail)}render(){var e;return index.h("section",{key:"a65e3c5c600cf24dce3c7b591be08641a98fefa4",style:{display:this.toasts.isEmpty()?"none":"flex"},class:`onto-toastr-container ${this.config.position}`},null===(e=this.toasts)||void 0===e?void 0:e.getItems().map(e=>index.h("div",{class:`onto-toast ${e.type}`,key:e.id,onMouseEnter:this.onToastMouseEnter(e),onMouseLeave:this.onToastMouseLeave(e)},index.h("i",{class:`fa-regular ${toastTypeToIconMap[e.type]}`}),index.h("span",{onClick:this.handleToastClick(e),class:"toast-message",innerHTML:translation_service.sanitizeHTML(e.message)}))))}addToast(e){this.toasts.addToStart(e),this.setTimeoutForToast(e),this.updateToastrReference()}setTimeoutForToast(e){var t;const o=workbenchApi.WindowService.getWindow().setTimeout(()=>{this.toasts.remove(e),this.clearToastTimeout(e)},(null===(t=e.config)||void 0===t?void 0:t.timeout)||this.config.timeout);this.toastToTimeout.set(e,o)}updateToastrReference(){this.toasts=new workbenchApi.ToastMessageList(this.toasts.getItems())}clearToastTimeout(e){const t=this.toastToTimeout.get(e);clearTimeout(t),this.toastToTimeout.delete(e),this.updateToastrReference()}handleToastClick(e){return t=>{var o,i;(null===(o=e.config)||void 0===o?void 0:o.onClick)&&e.config.onClick(t),(null===(i=e.config)||void 0===i?void 0:i.removeOnClick)&&(this.toasts.remove(e),this.clearToastTimeout(e))}}};OntoToastr.style=ontoToastrCss;const ontoTooltipCss='.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light-border]{background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,8,16,.15);color:#333;box-shadow:0 4px 14px -2px rgba(0,8,16,.08)}.tippy-box[data-theme~=light-border]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light-border]>.tippy-arrow:after,.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{content:"";position:absolute;z-index:-1}.tippy-box[data-theme~=light-border]>.tippy-arrow:after{border-color:transparent;border-style:solid}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after{border-top-color:rgba(0,8,16,.2);border-width:7px 7px 0;top:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg{top:16px}.tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after{top:17px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff;bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after{border-bottom-color:rgba(0,8,16,.2);border-width:0 7px 7px;bottom:17px;left:1px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after{bottom:17px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after{border-left-color:rgba(0,8,16,.2);border-width:7px 0 7px 7px;left:17px;top:1px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg{left:11px}.tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after{left:12px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff;right:16px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after{border-width:7px 7px 7px 0;right:17px;top:1px;border-right-color:rgba(0,8,16,.2)}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg{right:11px}.tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after{right:12px}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);background-size:16px 6px;width:16px;height:6px}:root{--onto-tooltip-background-color:var(--secondary-color, #003663)}:host{display:block}.tippy-box[data-theme=onto-tooltip]{background-color:var(--onto-tooltip-background-color);color:#FFFFFF;border-radius:0}.tippy-box[data-theme=onto-tooltip] .tippy-arrow{color:var(--onto-tooltip-background-color)}',OntoTooltip=class{constructor(e){index.registerInstance(this,e),this.clearTooltipsForRemovedElements=e=>{for(const t of e)for(const e of Array.from(t.removedNodes))if(this.removeTooltipFromNode(e))return},this.removeTooltipFromNode=e=>{if(e instanceof HTMLElement){if(tooltipUtil.TooltipUtil.getTooltipInstance(e))return tooltipUtil.TooltipUtil.destroyTooltip(e),!0;e.childNodes.forEach(this.removeTooltipFromNode)}return!1}}onMouseover(e){const t=tooltipUtil.TooltipUtil.getTooltipTarget(e.target);if(!t)return;const o=tooltipUtil.TooltipUtil.getOrCreateTooltipInstance(t);o.show(),t.hideTooltip=()=>{o.hide()}}onMouseout(e){const t=tooltipUtil.TooltipUtil.getTooltipTarget(e.target);if(!t)return;const o=e.relatedTarget;if(!o||!t.contains(o)){const e=tooltipUtil.TooltipUtil.getTooltipInstance(t);e&&"manual"===e.props.trigger&&tooltipUtil.TooltipUtil.destroyTooltip(t)}}connectedCallback(){this.handleRemovedNodes()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}render(){return index.h(index.Host,{key:"4f7858dee4268ac1ea1496e16b7c6a3f31e3fb0c"})}handleRemovedNodes(){this.observer=new MutationObserver(this.clearTooltipsForRemovedElements),this.observer.observe(document.body,{childList:!0,subtree:!0})}};OntoTooltip.style=ontoTooltipCss,exports.onto_footer=OntoFooter,exports.onto_header=OntoHeader,exports.onto_navbar=OntoNavbar,exports.onto_permission_banner=OntoPermissionBanner,exports.onto_toastr=OntoToastr,exports.onto_tooltip=OntoTooltip;