import { h, Component, createRef } from 'preact'; import { route } from 'preact-router'; import WBNavbarCommon from 'wb-navbar-common'; import WBProjectListing from 'wb-project-listing'; import WBInlineSearch from 'wb-inline-search'; import WBArvadosCrumbs from 'wb-arvados-crumbs'; import WBTabs from 'wb-tabs'; import WBProcessListing from 'wb-process-listing'; import WBCollectionListing from 'wb-collection-listing'; import WBWorkflowListing from 'wb-workflow-listing'; import WBRenameDialog from 'wb-rename-dialog'; import WBDeleteDialog from 'wb-delete-dialog'; import WBNewProjectDialog from 'wb-new-project-dialog'; class WBBrowse extends Component { constructor(...args) { super(...args); this.renameDialogRef = createRef(); this.deleteDialogRef = createRef(); this.newProjectDialogRef = createRef(); this.projectListingRef = createRef(); } getUrl(params) { const mode = ('mode' in params ? params.mode : this.props.mode); if (mode === 'shared-with-me') return '/shared-with-me/' + ('activePage' in params ? params.activePage : (this.props.activePage || '')); let res = '/browse/' + ('ownerUuid' in params ? params.ownerUuid : (this.props.ownerUuid || '')) + '/' + ('activePage' in params ? params.activePage : (this.props.activePage || '')) + '/' + ('objTypeTab' in params ? params.objTypeTab : (this.props.objTypeTab || '')) + '/' + ('collectionPage' in params ? params.collectionPage : (this.props.collectionPage || '')) + '/' + ('processPage' in params ? params.processPage : (this.props.processPage || '')) + '/' + ('workflowPage' in params ? params.workflowPage : (this.props.workflowPage || '')); return res; } route(params) { route(this.getUrl(params)); } renameDialog(item, callback) { // throw Error('Not implemented'); this.renameDialogRef.current.show(item, callback); } renderRenameLink(item, callback) { return ( { e.preventDefault(); this.renameDialog(item, callback); } }> ); } renderDeleteButton(item, callback) { return ( ); } render({ mode, ownerUuid, activePage, app, objTypeTab, collectionPage, processPage, workflowPage }) { return (