graphdb-workbench 3.5.0-TR1 → 3.5.0-TR2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/43239.1cd1b4be623593e3de58.bundle.js +2 -0
- package/dist/43239.1cd1b4be623593e3de58.bundle.js.map +1 -0
- package/dist/{64709.ea8d12b8b26cccb8e2c1.bundle.js → 64709.5fd0fd295cb498133948.bundle.js} +2 -2
- package/dist/{64709.ea8d12b8b26cccb8e2c1.bundle.js.map → 64709.5fd0fd295cb498133948.bundle.js.map} +1 -1
- package/dist/{65677.92f8a9b3f6ed9d0801d5.bundle.js → 65677.3cce7ec34d6d427e3169.bundle.js} +2 -2
- package/dist/{65677.92f8a9b3f6ed9d0801d5.bundle.js.map → 65677.3cce7ec34d6d427e3169.bundle.js.map} +1 -1
- package/dist/{80933.8034a71f09b561c50e0f.bundle.js → 80933.ba677aed4c6c3c965260.bundle.js} +2 -2
- package/dist/{80933.8034a71f09b561c50e0f.bundle.js.map → 80933.ba677aed4c6c3c965260.bundle.js.map} +1 -1
- package/dist/{82917.eeb1061e900a9e0ddce5.bundle.js → 82917.543a37c2e56457df2034.bundle.js} +2 -2
- package/dist/{82917.eeb1061e900a9e0ddce5.bundle.js.map → 82917.543a37c2e56457df2034.bundle.js.map} +1 -1
- package/dist/{86099.e5c92e7ca57de11620a5.bundle.js → 86099.b88d06dbf47f8898c0d2.bundle.js} +2 -2
- package/dist/{86099.e5c92e7ca57de11620a5.bundle.js.map → 86099.b88d06dbf47f8898c0d2.bundle.js.map} +1 -1
- package/dist/index.html +9 -9
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +2 -2
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
- package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +1 -1
- package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
- package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
- package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +2 -2
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
- package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/{legacyWorkbench.2c8a0ff38a37d0f54965.js → legacyWorkbench.9e5936a811bd97d08947.js} +3 -3
- package/dist/{legacyWorkbench.2c8a0ff38a37d0f54965.js.map → legacyWorkbench.9e5936a811bd97d08947.js.map} +1 -1
- package/dist/{main.49c7f2e1f2f86f23565f.js → main.4788a8998a7c89515d9a.js} +3 -3
- package/dist/{main.49c7f2e1f2f86f23565f.js.map → main.4788a8998a7c89515d9a.js.map} +1 -1
- package/dist/pages/aclmanagement.html +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/home.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/jdbc.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/sparql-templates.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +11 -11
- package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
- package/dist/shared-components/collection/components/onto-layout/onto-layout.js +1 -1
- package/dist/shared-components/esm/onto-layout.entry.js +1 -1
- package/dist/shared-components/shared-components/p-a0b19580.entry.js +1 -0
- package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
- package/dist/shared-components/types/components/onto-layout/onto-layout.d.ts +1 -0
- package/package.json +1 -1
- package/dist/43239.1512ea852bf9be610d44.bundle.js +0 -2
- package/dist/43239.1512ea852bf9be610d44.bundle.js.map +0 -1
- package/dist/shared-components/shared-components/p-9eaa9582.entry.js +0 -1
- /package/dist/{legacyWorkbench.2c8a0ff38a37d0f54965.js.LICENSE.txt → legacyWorkbench.9e5936a811bd97d08947.js.LICENSE.txt} +0 -0
- /package/dist/{main.49c7f2e1f2f86f23565f.js.LICENSE.txt → main.4788a8998a7c89515d9a.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as o,H as e,g as t,b as n}from"./p-BntG-4Sv.js";export{s as setNonce}from"./p-BntG-4Sv.js";var a=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const t=o.call(this,!1),n=this.childNodes;if(e)for(let e=0;e<n.length;e++)2!==n[e].nodeType&&t.appendChild(n[e].cloneNode(!0));return t}};(()=>{a(e.prototype);const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),o(n)})().then(async e=>(await t(),n([["p-
|
|
1
|
+
import{p as o,H as e,g as t,b as n}from"./p-BntG-4Sv.js";export{s as setNonce}from"./p-BntG-4Sv.js";var a=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const t=o.call(this,!1),n=this.childNodes;if(e)for(let e=0;e<n.length;e++)2!==n[e].nodeType&&t.appendChild(n[e].cloneNode(!0));return t}};(()=>{a(e.prototype);const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),o(n)})().then(async e=>(await t(),n([["p-a0b19580",[[4,"onto-layout",{authenticatedUser:[32],authToken:[32],securityConfig:[32],isLowResolution:[32],showHeader:[32],showNavbar:[32],isEmbedded:[32],loading:[32],hideSolrDeprecationBanner:[32]},[[0,"navbarToggled","onNavbarToggled"],[9,"resize","onResize"]]]]],["p-f7031b75",[[0,"onto-confirm-cancel-dialog",{isOpen:[32],hasDontShowAgain:[32]},[[16,"confirm-cancel-event","onConfirmCancelEvent"]]]]],["p-fb9651cd",[[0,"onto-graph-explore-split-button",{label:[1],fetchGraphConfigs:[16,"fetch-graph-configs"],items:[32],isDropdownOpen:[32]}]]],["p-7aea3f88",[[0,"onto-permission-banner"]]],["p-79ea666b",[[0,"onto-test-context",{initConfigurationContext:[64],updateLicense:[64],updateProductInfo:[64],loadRepositories:[64],setAuthenticatedUser:[64],setSecurityConfig:[64],login:[64],changeLanguage:[64],emitNavigateEndEvent:[64],updateSelectedRepository:[64],updateIsLoadingActiveRepositoryLocation:[64],openConfirmCancel:[64],addToastr:[64],addNotification:[64],setAutocomplete:[64],updateNamespaces:[64]}]]],["p-ab06eb4f",[[0,"onto-toastr",{toasts:[32]},[[16,"create-toast-event","handleToastCreate"]]]]],["p-5a0c473d",[[0,"onto-tooltip",null,[[5,"mouseover","onMouseover"],[5,"mouseout","onMouseout"]]]]],["p-eda1cb77",[[0,"onto-toggle-switch",{checked:[1028],labelKey:[1,"label-key"],tooltipTranslationKey:[1,"tooltip-translation-key"],context:[1],tooltipLabel:[32]}],[4,"onto-dialog",{config:[16]}]]],["p-92f037c6",[[0,"onto-cookie-consent",{showModal:[32]},[[0,"closeDialog","onDialogClose"]]],[0,"onto-cookie-policy-dialog",null,[[0,"toggleChanged","toggleChangeHandler"]]]]],["p-20b1637d",[[0,"onto-dropdown",{dropdownButtonName:[1,"dropdown-button-name"],dropdownButtonNameLabelKey:[1,"dropdown-button-name-label-key"],dropdownButtonGuideSelector:[1,"dropdown-button-guide-selector"],dropdownButtonTooltip:[1,"dropdown-button-tooltip"],dropdownButtonTooltipLabelKey:[1,"dropdown-button-tooltip-label-key"],iconClass:[1,"icon-class"],iconImage:[1,"icon-image"],items:[16],tooltipTheme:[1,"tooltip-theme"],tooltipPlacement:[1,"tooltip-placement"],dropdownAlignment:[1,"dropdown-alignment"],autoClose:[4,"auto-close"],open:[32],buttonTooltipContent:[32]},[[8,"keydown","keydownListener"],[8,"click","mouseClickListener"]]]]],["p-cec2c15d",[[0,"translate-label",{labelKey:[1,"label-key"],translationParameters:[16,"translation-parameters"],translatedLabel:[32]}]]],["p-6ce0c1c9",[[0,"onto-rdf-search",{isOpen:[32],buttonConfig:[32]},[[8,"click","handleClick"]]],[0,"onto-language-selector",{dropdownAlignment:[1,"dropdown-alignment"],currentLanguage:[32]}],[0,"onto-license-alert",{license:[16]}],[0,"onto-operations-notification",{activeOperations:[16,"active-operations"],isOpen:[32]},[[8,"click","handleOutsideClick"]]],[0,"onto-repository-selector",{currentRepository:[16,"current-repository"],items:[16],repositorySizeInfoFetcher:[16,"repository-size-info-fetcher"],totalTripletsFormatter:[16,"total-triplets-formatter"],expansionRatioFormatter:[16,"expansion-ratio-formatter"],canWriteRepo:[16,"can-write-repo"],defaultToggleButtonName:[32],noRepositoriesButtonMessage:[32]},null,{items:["onItemsChanged"]}],[0,"onto-user-login"],[0,"onto-user-menu",{user:[16],securityConfig:[16,"security-config"],isOpen:[32]}],[0,"onto-search-icon",{tooltipLabel:[32]}],[0,"onto-search-resource-input",{context:[1],skipValidation:[4,"skip-validation"],preserveSearch:[4,"preserve-search"],isHidden:[4,"is-hidden"],buttonConfig:[16,"button-config"],inputValue:[32],searchResult:[32],isAutocompleteEnabled:[32]},null,{isHidden:["onVisibilityChange"]}]]],["p-51905dbf",[[0,"onto-header",{activeOperations:[32],license:[32],isFreeAccessEnabled:[32],shouldShowSearch:[32],isHomePage:[32],repositoryList:[32],currentRoute:[32],currentRepository:[32],securityConfig:[32],user:[32],showUserMenu:[32],showLoginButton:[32],applicationLogoPath:[32]}],[0,"onto-footer",{productInfo:[32],shouldShowCookieConsent:[32]},[[0,"consentGiven","handleConsentGiven"]]],[0,"onto-navbar",{navbarCollapsed:[4,"navbar-collapsed"],menuItems:[16,"menu-items"],menuModel:[32],isCollapsed:[32]},null,{navbarCollapsed:["navbarCollapsedChange"],menuItems:["menuItemsChanged"]}],[4,"onto-deprecation-banner"],[1,"onto-loader",{size:[2],loading:[4],messageText:[1,"message-text"],targetSelector:[1,"target-selector"]}]]]],e)));
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=43239;export const __webpack_esm_ids__=[43239];export const __webpack_esm_modules__={29229(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})},43239(e,t,i){i.r(t),i.d(t,{onto_layout:()=>o});var a=i(18072),s=i(29229),n=i(57154),r=i(54096);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.userPreferencesService=(0,n.service)(n.UserPreferencesService),this.userPreferencesContextService=(0,n.service)(n.UserPreferencesContextService),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.hideSolrDeprecationBanner=!1,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.updateShowSolrDeprecationBanner(),this.windowResizeHandler()}connectedCallback(){this.subscribeToSecurityChanges(),this.updateVisibility(),this.subscribeToNavigationEnd(),this.subscribeToRuntimeConfigurationChanges(),this.subscribeToUserPreferencesChange(),this.loading=!1,this.subscribeToBeforeMountRouting()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){return(0,a.h)(a.a,{key:"d725788812086c22a859239cf0213b145eed9431",class:{"wb-layout":!0,"is-embedded":this.isEmbedded,"hide-navbar":!this.showNavbar,loading:this.loading}},(0,a.h)("div",{key:"8ef3f2ad759570fc0904d59ef64caae32c0592cd",class:"default-slot-wrapper"},(0,a.h)("slot",{key:"9652d1ef036b1229a67b67a3a1bf8f64f368b858",name:"default"})),!this.isEmbedded&&(0,a.h)("div",{key:"e886db08d8eb43a892fbab8b885f2854559e4fa2",class:"wb-header"},!this.hideSolrDeprecationBanner&&(0,a.h)("onto-deprecation-banner",{key:"498ee2955695a951ccc91f21c7e5805dc043d419",class:"onto-deprecation-banner",onCloseBanner:this.onSolrDeprecationBannerClosedHandler()},(0,a.h)("span",{key:"04ee5843395b01a85c4a6a09fcb6643a7e953b3b",slot:"header"},(0,a.h)("translate-label",{key:"1c0374df8f1d8b34e7761530063dc7ef1c4e3550",labelKey:"deprecation-banner.solr.header"})),(0,a.h)("span",{key:"6d8e0027b767520899cb6b316bc187b41be2451e",slot:"content"},(0,a.h)("translate-label",{key:"e9d64b010673e47ba9320a51e8110b95c80aff82",labelKey:"deprecation-banner.solr.content"}))),(0,a.h)("header",{key:"0e4c29b54a08e646f68b50b3341eb551ee3225b0"},this.showHeader&&(0,a.h)("onto-header",{key:"4489d7f5a9a1a2a32b816738ec28d36d015af3fd"}))),!this.isEmbedded&&this.showNavbar&&(0,a.h)("nav",{key:"d07b9e718fd8f7e85002dd8e253379052c670716",class:"wb-navbar"},(0,a.h)("onto-navbar",{key:"120a1308a10362772b34af1dea04a1afa05e6ac3",ref:this.assignNavbarRef(),"navbar-collapsed":this.isLowResolution})),(0,a.h)("slot",{key:"d8da79c245e4ea0ecaaf5616cd806288a3284f5c",name:"main"},(0,a.h)("onto-loader",{key:"0fa2163748ab8243f39844e999476f20bd6e5005",loading:this.loading,targetSelector:"main",size:96,messageText:r.T.translate("common.loading")})),!this.isEmbedded&&(0,a.h)("footer",{key:"c1eb78455e1653b98cbea350951b35daa4bf10a0",class:"wb-footer"},(0,a.h)("onto-footer",{key:"b02173ed79cbc28e1d784c6c59b34054e0db1da7"})))}onNavbarToggled(e){this.isNavbarCollapsed=e.detail.payload,this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}onResize(){this.windowResizeObserver()}onSolrDeprecationBannerClosedHandler(){return()=>{this.userPreferencesService.dismissSolrDeprecationBanner(),this.updateShowSolrDeprecationBanner()}}windowResizeHandler(){var e,t,i,a;this.isLowResolution=n.WindowService.getWindow().innerWidth<=768;const s=document.querySelector(".navbar-component");if(s){const n=document.querySelector(".cookie-consent-banner"),r=document.querySelector(".header-component"),o=null!==(t=null===(e=null==r?void 0:r.getBoundingClientRect())||void 0===e?void 0:e.height)&&void 0!==t?t:0,h=null!==(a=null===(i=null==n?void 0:n.getBoundingClientRect())||void 0===i?void 0:i.height)&&void 0!==a?a:0;s.style.height=`calc(100% - ${o}px - ${h}px)`}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.getPluginRegistry().get(n.MainMenuExtensionPoint.NAME),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),setTimeout(()=>{this.loading=!1})}))}subscribeToBeforeMountRouting(){this.subscriptions.add(this.applicationLifecycleContextService.onNavigationBeforeMountRouting(e=>{e&&(this.loading=!0)}))}subscribeToUserPreferencesChange(){this.subscriptions.add(this.userPreferencesContextService.onUserPreferencesChanged(()=>{this.updateShowSolrDeprecationBanner()}))}updateShowSolrDeprecationBanner(){this.hideSolrDeprecationBanner=this.userPreferencesService.isSolrDeprecationBannerDismissed()}get hostElement(){return(0,a.d)(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{grid-area:main}.wb-layout.loading main{position:relative;visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{grid-area:header;position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout footer{grid-area:footer}'},54096(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){if(!t)return;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=43239.1512ea852bf9be610d44.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"43239.1512ea852bf9be610d44.bundle.js","mappings":"kIAAA,SAASA,EAASC,EAAMC,EAAO,KAC3B,IAAIC,EACJ,MAAO,IAAIC,KACPC,aAAaF,GACbA,EAAQG,WAAW,IAAML,EAAKM,MAAMC,KAAMJ,GAAOF,GAEzD,C,iHCDA,MASMO,EAAa,MAIfC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBJ,KAAMG,GAIvBH,KAAKK,uBAAwBC,EAAAA,EAAAA,SAAQC,EAAAA,uBACrCP,KAAKQ,sBAAuBF,EAAAA,EAAAA,SAAQG,EAAAA,sBACpCT,KAAKU,0BAA2BJ,EAAAA,EAAAA,SAAQK,EAAAA,0BACxCX,KAAKY,oBAAqBN,EAAAA,EAAAA,SAAQO,EAAAA,8BAClCb,KAAKc,oCAAqCR,EAAAA,EAAAA,SAAQS,EAAAA,oCAClDf,KAAKgB,cAAeV,EAAAA,EAAAA,SAAQW,EAAAA,cAC5BjB,K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AIL,EAAcK,EAAO3I,GAKzB,MAH2B,iBAAhBsI,IACPA,EAAcpL,KAAK0L,sBAAsBD,EAAQ3I,IAE9CsI,CACX,CAUAM,qBAAAA,CAAsBD,EAAQ3I,GAC1B,IAAKA,EACD,OAEJ,IAAI6I,EAAO7I,EAAI8I,MAAM,KACrB,OAAO5L,KAAK6L,eAAeJ,EAAQE,EACvC,CASAE,cAAAA,CAAeC,EAAYH,GAEvB,IAAKA,IAASG,EACV,OAEJ,MAAMC,EAAoBD,EAAWH,EAAKT,OAAO,EAAG,GAAG,IACvD,OAAoB,IAAhBS,EAAKjD,OACEqD,EAEsB,iBAAtBA,EAEHJ,EAAKjD,OAAS,EACP1I,KAAK6L,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,EAAUnJ,SAASqJ,KAAKF,EAAUtC,OAASyB,CACzF,CACAgB,yBAAAA,GACIC,OAAOC,KAAKtM,KAAKoK,6BAA6BzB,QAAS4D,KACjCvM,KAAKoK,4BAA4BmC,IAAc,IACvD5D,QAASiC,GAAaA,EAASE,SAAS9K,KAAK8E,UAAUyH,EAAW3B,EAASC,eAE7F,CACAN,uBAAAA,GACIvK,KAAKwM,2BAA6BxM,KAAKiK,uBAAuBwC,wBAAyBhB,IAC/EA,IACAzL,KAAKsL,cAAgBG,EACrBzL,KAAKoM,8BAGjB,CACAM,OAAAA,GACQ1M,KAAKwM,4BACLxM,KAAKwM,4BAEb,EAEJ,MAAM3H,EAAqB,IAAImF,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/function-utils-D1ZpXQQS.js","webpack://root-config/./packages/shared-components/dist/esm/onto-layout.entry.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-CyWR_ReZ.js"],"sourcesContent":["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 { r as registerInstance, h, a as Host, d as getElement } from './index-BntG-4Sv.js';\nimport { d as debounce } from './function-utils-D1ZpXQQS.js';\nimport { service, AuthenticationService, AuthorizationService, NavigationContextService, AuthenticationStorageService, RuntimeConfigurationContextService, EventService, ApplicationLifecycleContextService, UserPreferencesService, UserPreferencesContextService, StorageKey, SubscriptionList, LocalStorageSubscriptionHandlerService, WindowService, navigate, SecurityContextService, EventName, MainMenuExtensionPoint } from '@ontotext/workbench-api';\nimport { T as TranslationService } from './translation.service-CyWR_ReZ.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{grid-area:main}.wb-layout.loading main{position:relative;visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{grid-area:header;position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.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.userPreferencesService = service(UserPreferencesService);\n this.userPreferencesContextService = service(UserPreferencesContextService);\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 this.hideSolrDeprecationBanner = false;\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.updateShowSolrDeprecationBanner();\n this.windowResizeHandler();\n }\n connectedCallback() {\n this.subscribeToSecurityChanges();\n this.updateVisibility();\n this.subscribeToNavigationEnd();\n this.subscribeToRuntimeConfigurationChanges();\n this.subscribeToUserPreferencesChange();\n this.loading = false;\n this.subscribeToBeforeMountRouting();\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: 'd725788812086c22a859239cf0213b145eed9431', class: {\n 'wb-layout': true,\n 'is-embedded': this.isEmbedded,\n 'hide-navbar': !this.showNavbar,\n 'loading': this.loading\n } }, h(\"div\", { key: '8ef3f2ad759570fc0904d59ef64caae32c0592cd', class: \"default-slot-wrapper\" }, h(\"slot\", { key: '9652d1ef036b1229a67b67a3a1bf8f64f368b858', name: \"default\" })), !this.isEmbedded && h(\"div\", { key: 'e886db08d8eb43a892fbab8b885f2854559e4fa2', class: \"wb-header\" }, !this.hideSolrDeprecationBanner &&\n h(\"onto-deprecation-banner\", { key: '498ee2955695a951ccc91f21c7e5805dc043d419', class: 'onto-deprecation-banner', onCloseBanner: this.onSolrDeprecationBannerClosedHandler() }, h(\"span\", { key: '04ee5843395b01a85c4a6a09fcb6643a7e953b3b', slot: 'header' }, h(\"translate-label\", { key: '1c0374df8f1d8b34e7761530063dc7ef1c4e3550', labelKey: 'deprecation-banner.solr.header' })), h(\"span\", { key: '6d8e0027b767520899cb6b316bc187b41be2451e', slot: 'content' }, h(\"translate-label\", { key: 'e9d64b010673e47ba9320a51e8110b95c80aff82', labelKey: 'deprecation-banner.solr.content' }))), h(\"header\", { key: '0e4c29b54a08e646f68b50b3341eb551ee3225b0' }, this.showHeader && h(\"onto-header\", { key: '4489d7f5a9a1a2a32b816738ec28d36d015af3fd' }))), !this.isEmbedded && this.showNavbar &&\n h(\"nav\", { key: 'd07b9e718fd8f7e85002dd8e253379052c670716', class: \"wb-navbar\" }, h(\"onto-navbar\", { key: '120a1308a10362772b34af1dea04a1afa05e6ac3', ref: this.assignNavbarRef(), \"navbar-collapsed\": this.isLowResolution })), h(\"slot\", { key: 'd8da79c245e4ea0ecaaf5616cd806288a3284f5c', name: \"main\" }, h(\"onto-loader\", { key: '0fa2163748ab8243f39844e999476f20bd6e5005', loading: this.loading, targetSelector: 'main', size: 96, messageText: TranslationService.translate('common.loading') })), !this.isEmbedded &&\n h(\"footer\", { key: 'c1eb78455e1653b98cbea350951b35daa4bf10a0', class: \"wb-footer\" }, h(\"onto-footer\", { key: 'b02173ed79cbc28e1d784c6c59b34054e0db1da7' }))));\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 onSolrDeprecationBannerClosedHandler() {\n return () => {\n this.userPreferencesService.dismissSolrDeprecationBanner();\n this.updateShowSolrDeprecationBanner();\n };\n }\n // ========================\n // Handlers\n // ========================\n windowResizeHandler() {\n var _a, _b, _c, _d;\n this.isLowResolution = WindowService.getWindow().innerWidth <= WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR;\n const navbar = document.querySelector('.navbar-component');\n if (navbar) {\n const cookieBanner = document.querySelector('.cookie-consent-banner');\n const header = document.querySelector('.header-component');\n const headerHeight = (_b = (_a = header === null || header === void 0 ? void 0 : header.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.height) !== null && _b !== void 0 ? _b : 0;\n const bannerHeight = (_d = (_c = cookieBanner === null || cookieBanner === void 0 ? void 0 : cookieBanner.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 0;\n navbar.style.height = `calc(100% - ${headerHeight}px - ${bannerHeight}px)`;\n }\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.getPluginRegistry().get(MainMenuExtensionPoint.NAME);\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 // NAVIGATION_END appears to happen in the same tick as BeforeMountRouting, so the loader never gets shown\n setTimeout(() => {\n this.loading = false;\n });\n }));\n }\n subscribeToBeforeMountRouting() {\n this.subscriptions.add(this.applicationLifecycleContextService.onNavigationBeforeMountRouting((payload) => {\n if (payload) {\n this.loading = true;\n }\n }));\n }\n subscribeToUserPreferencesChange() {\n this.subscriptions.add(this.userPreferencesContextService.onUserPreferencesChanged(() => {\n this.updateShowSolrDeprecationBanner();\n }));\n }\n updateShowSolrDeprecationBanner() {\n this.hideSolrDeprecationBanner = this.userPreferencesService.isSolrDeprecationBannerDismissed();\n }\n get hostElement() { return getElement(this); }\n};\nOntoLayout.style = ontoLayoutCss;\n\nexport { OntoLayout as onto_layout };\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 if (!key) {\n return;\n }\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":["debounce","func","wait","timer","args","clearTimeout","setTimeout","apply","this","OntoLayout","constructor","hostRef","registerInstance","authenticationService","service","AuthenticationService","authorizationService","AuthorizationService","navigationContextService","NavigationContextService","authStorageService","AuthenticationStorageService","runtimeConfigurationContextService","RuntimeConfigurationContextService","eventService","EventService","applicationLifecycleContextService","ApplicationLifecycleContextService","userPreferencesService","UserPreferencesService","userPreferencesContextService","UserPreferencesContextService","fullJwtKey","StorageKey","GLOBAL_NAMESPACE","NAMESPACE","jwtKey","fullAuthenticatedKey","authenticatedKey","authEvents","isLowResolution","showHeader","isAuthenticatedFully","showNavbar","isEmbedded","loading","hideSolrDeprecationBanner","subscriptions","SubscriptionList","isNavbarCollapsed","handleStorageChange","event","LocalStorageSubscriptionHandlerService","handleAuthChange","key","windowResizeObserver","windowResizeHandler","WindowService","getWindow","addEventListener","componentDidLoad","updateShowSolrDeprecationBanner","connectedCallback","subscribeToSecurityChanges","updateVisibility","subscribeToNavigationEnd","subscribeToRuntimeConfigurationChanges","subscribeToUserPreferencesChange","subscribeToBeforeMountRouting","disconnectedCallback","unsubscribeAll","render","h","Host","class","name","onCloseBanner","onSolrDeprecationBannerClosedHandler","slot","labelKey","ref","assignNavbarRef","targetSelector","size","messageText","TranslationService","translate","onNavbarToggled","detail","payload","hostElement","classList","add","remove","onResize","dismissSolrDeprecationBanner","_a","_b","_c","_d","innerWidth","navbar","document","querySelector","cookieBanner","header","headerHeight","getBoundingClientRect","height","bannerHeight","style","changedKey","includes","isAuthenticated","navigate","getPreviousRoute","location","reload","securityContextService","SecurityContextService","onAuthenticatedUserChanged","authenticatedUser","onSecurityConfigChanged","securityConfig","subscribe","EventName","LOGIN","setNavbarItemVisibility","LOGOUT","onRuntimeConfigurationChanged","config","isSecurityEnabled","hasFreeAccess","shouldShowMenu","role","hasRole","navbarRef","menuItems","getPluginRegistry","get","MainMenuExtensionPoint","NAME","processItem","item","shouldShow","children","length","forEach","plugin","items","NAVIGATION_END","navigationEndPayload","updatePreviousRoute","oldUrl","onNavigationBeforeMountRouting","onUserPreferencesChanged","isSolrDeprecationBannerDismissed","getElement","sanitizeHTML","html","element","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"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,a as i,d as a}from"./p-BntG-4Sv.js";import{d as s}from"./p-D1ZpXQQS.js";import{service as o,AuthenticationService as n,AuthorizationService as h,NavigationContextService as d,AuthenticationStorageService as r,RuntimeConfigurationContextService as l,EventService as b,ApplicationLifecycleContextService as c,UserPreferencesService as u,UserPreferencesContextService as f,StorageKey as m,SubscriptionList as p,LocalStorageSubscriptionHandlerService as v,WindowService as y,navigate as g,SecurityContextService as w,EventName as k,MainMenuExtensionPoint as x}from"@ontotext/workbench-api";import{T as C}from"./p-CyWR_ReZ.js";const T=class{constructor(e){t(this,e),this.authenticationService=o(n),this.authorizationService=o(h),this.navigationContextService=o(d),this.authStorageService=o(r),this.runtimeConfigurationContextService=o(l),this.eventService=o(b),this.applicationLifecycleContextService=o(c),this.userPreferencesService=o(u),this.userPreferencesContextService=o(f),this.fullJwtKey=`${m.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.jwtKey}`,this.fullAuthenticatedKey=`${m.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.hideSolrDeprecationBanner=!1,this.subscriptions=new p,this.isNavbarCollapsed=!1,this.handleStorageChange=e=>{o(v).handleStorageChange(e),this.handleAuthChange(e.key)},this.windowResizeObserver=s(()=>this.windowResizeHandler(),50),y.getWindow().addEventListener("storage",this.handleStorageChange)}componentDidLoad(){this.updateShowSolrDeprecationBanner(),this.windowResizeHandler()}connectedCallback(){this.subscribeToSecurityChanges(),this.updateVisibility(),this.subscribeToNavigationEnd(),this.subscribeToRuntimeConfigurationChanges(),this.subscribeToUserPreferencesChange(),this.loading=!1,this.subscribeToBeforeMountRouting()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){return e(i,{key:"d725788812086c22a859239cf0213b145eed9431",class:{"wb-layout":!0,"is-embedded":this.isEmbedded,"hide-navbar":!this.showNavbar,loading:this.loading}},e("div",{key:"8ef3f2ad759570fc0904d59ef64caae32c0592cd",class:"default-slot-wrapper"},e("slot",{key:"9652d1ef036b1229a67b67a3a1bf8f64f368b858",name:"default"})),!this.isEmbedded&&e("div",{key:"e886db08d8eb43a892fbab8b885f2854559e4fa2",class:"wb-header"},!this.hideSolrDeprecationBanner&&e("onto-deprecation-banner",{key:"498ee2955695a951ccc91f21c7e5805dc043d419",class:"onto-deprecation-banner",onCloseBanner:this.onSolrDeprecationBannerClosedHandler()},e("span",{key:"04ee5843395b01a85c4a6a09fcb6643a7e953b3b",slot:"header"},e("translate-label",{key:"1c0374df8f1d8b34e7761530063dc7ef1c4e3550",labelKey:"deprecation-banner.solr.header"})),e("span",{key:"6d8e0027b767520899cb6b316bc187b41be2451e",slot:"content"},e("translate-label",{key:"e9d64b010673e47ba9320a51e8110b95c80aff82",labelKey:"deprecation-banner.solr.content"}))),e("header",{key:"0e4c29b54a08e646f68b50b3341eb551ee3225b0"},this.showHeader&&e("onto-header",{key:"4489d7f5a9a1a2a32b816738ec28d36d015af3fd"}))),!this.isEmbedded&&this.showNavbar&&e("nav",{key:"d07b9e718fd8f7e85002dd8e253379052c670716",class:"wb-navbar"},e("onto-navbar",{key:"120a1308a10362772b34af1dea04a1afa05e6ac3",ref:this.assignNavbarRef(),"navbar-collapsed":this.isLowResolution})),e("slot",{key:"d8da79c245e4ea0ecaaf5616cd806288a3284f5c",name:"main"},e("onto-loader",{key:"0fa2163748ab8243f39844e999476f20bd6e5005",loading:this.loading,targetSelector:"main",size:96,messageText:C.translate("common.loading")})),!this.isEmbedded&&e("footer",{key:"c1eb78455e1653b98cbea350951b35daa4bf10a0",class:"wb-footer"},e("onto-footer",{key:"b02173ed79cbc28e1d784c6c59b34054e0db1da7"})))}onNavbarToggled(e){this.isNavbarCollapsed=e.detail.payload,this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}onResize(){this.windowResizeObserver()}onSolrDeprecationBannerClosedHandler(){return()=>{this.userPreferencesService.dismissSolrDeprecationBanner(),this.updateShowSolrDeprecationBanner()}}windowResizeHandler(){var e,i,t,a;this.isLowResolution=y.getWindow().innerWidth<=768;const s=document.querySelector(".navbar-component");if(s){const n=document.querySelector(".cookie-consent-banner"),o=document.querySelector(".header-component"),r=null!==(i=null===(e=null==o?void 0:o.getBoundingClientRect())||void 0===e?void 0:e.height)&&void 0!==i?i:0,d=null!==(a=null===(t=null==n?void 0:n.getBoundingClientRect())||void 0===t?void 0:t.height)&&void 0!==a?a:0;s.style.height=`calc(100% - ${r}px - ${d}px)`}this.isLowResolution||this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}handleAuthChange(e){var i;if(e&&this.authEvents.includes(e)){const e=this.authStorageService.isAuthenticated();g(e?null!==(i=this.navigationContextService.getPreviousRoute())&&void 0!==i?i:"./":"login"),y.getWindow().location.reload()}}subscribeToSecurityChanges(){const e=o(w);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(k.LOGIN,()=>{this.setNavbarItemVisibility(),this.updateVisibility()})),this.subscriptions.add(this.eventService.subscribe(k.LOGOUT,()=>{this.setNavbarItemVisibility(),this.updateVisibility(),g("login")}))}subscribeToRuntimeConfigurationChanges(){this.subscriptions.add(this.runtimeConfigurationContextService.onRuntimeConfigurationChanged(e=>{var i;this.isEmbedded=null!==(i=null==e?void 0:e.isEmbedded)&&void 0!==i&&i}))}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=y.getPluginRegistry().get(x.NAME),this.setNavbarItemVisibility())}}setNavbarItemVisibility(){var e,i,t;if(!(null===(e=this.navbarRef)||void 0===e?void 0:e.menuItems))return;const a=e=>{var i;e.shouldShow=this.shouldShowMenu(e.role),(null===(i=e.children)||void 0===i?void 0:i.length)&&e.children.forEach(a)};null===(t=null===(i=this.navbarRef)||void 0===i?void 0:i.menuItems)||void 0===t||t.forEach(e=>{e.items.forEach(a)}),this.navbarRef.menuItems=[...this.navbarRef.menuItems]}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(k.NAVIGATION_END,e=>{this.navigationContextService.updatePreviousRoute(e.oldUrl),setTimeout(()=>{this.loading=!1})}))}subscribeToBeforeMountRouting(){this.subscriptions.add(this.applicationLifecycleContextService.onNavigationBeforeMountRouting(e=>{e&&(this.loading=!0)}))}subscribeToUserPreferencesChange(){this.subscriptions.add(this.userPreferencesContextService.onUserPreferencesChanged(()=>{this.updateShowSolrDeprecationBanner()}))}updateShowSolrDeprecationBanner(){this.hideSolrDeprecationBanner=this.userPreferencesService.isSolrDeprecationBannerDismissed()}get hostElement(){return a(this)}};T.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{grid-area:main}.wb-layout.loading main{position:relative;visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{grid-area:header;position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout footer{grid-area:footer}';export{T as onto_layout};
|
|
File without changes
|
/package/dist/{main.49c7f2e1f2f86f23565f.js.LICENSE.txt → main.4788a8998a7c89515d9a.js.LICENSE.txt}
RENAMED
|
File without changes
|