diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 305f4094aa..64aad28780 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -44,6 +44,7 @@ On top of that, creating more complex subscriptions involving the representation The scheduling policy of our various `IRepresentationEventProcessor` will thus be updated in order to ensure that the subscription will be performed in another thread. - https://github.com/eclipse-sirius/sirius-components/issues/1615[#1615] [diagram] `DiagramDescription.getTools()` has been removed. It was not actually used, as tools have long been found in `DiagramDescription.getToolSections()` instead. +- https://github.com/eclipse-sirius/sirius-components/issues/1588[#1588] [project] Moved the action "New Model" and "Upload model" in a new tree toolbar === Dependency update @@ -91,6 +92,9 @@ Using the view DSL, one can use the expression `aql:collapsingState.toString() = - https://github.com/eclipse-sirius/sirius-components/issues/1583[#1583] [diagram] Add support for diagram nodes labels' auto-wrap + image:doc/images/Diagram_node_labels_auto_wrap.png[width=517,height=424] +- https://github.com/eclipse-sirius/sirius-components/issues/1588[#1588] [tree] Add support for enabling/disabling the synchronization between the explorer and the current selection. +When it is enabled, if the current selection is not visible in the explorer, it will be revealed by expanding the relevant tree items. +On the other hand, when it is disabled, the selection will be visible in the explorer but no tree items will be automatically expanded. === Improvements diff --git a/integration-tests/cypress/integration/project/edit/explorer-toolbar_spec.js b/integration-tests/cypress/integration/project/edit/explorer-toolbar_spec.js new file mode 100644 index 0000000000..6d67135c9d --- /dev/null +++ b/integration-tests/cypress/integration/project/edit/explorer-toolbar_spec.js @@ -0,0 +1,119 @@ +/******************************************************************************* + * Copyright (c) 2023 Obeo. + * This program and the accompanying materials + * are made available under the erms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +describe('/projects/:projectId/edit - Tree toolbar', () => { + beforeEach(() => { + cy.deleteAllProjects(); + cy.createProject('Cypress Project').then((res) => { + const projectId = res.body.data.createProject.project.id; + const robot_flow_id = 'c26b6086-b444-3ee6-b8cd-9a4fde5956a7'; + cy.createDocument(projectId, robot_flow_id, 'flow').then(() => { + cy.visit(`/projects/${projectId}/edit`); + }); + }); + + cy.getByTestId('flow').dblclick(); + cy.getByTestId('Robot').dblclick(); + cy.getByTestId('Robot-more').click(); + cy.getByTestId('treeitem-contextmenu').findByTestId('new-representation').click(); + + cy.getByTestId('name').clear(); + cy.getByTestId('name').type('Topography'); + cy.getByTestId('representationDescription').click(); + cy.getByTestId('Topography with auto layout').click(); + cy.getByTestId('create-representation').click(); + cy.getByTestId('Topography').click(); + }); + + it('Deactivate the synchronisation mode does not reveal the semantic element selected on a diagram but activating it will', () => { + // 1. Deactivate the synchronisation mode + cy.getByTestId('tree-synchronise').click(); + + // 2. On the diagram, click on the 'CaptureSubSystem' + cy.getByTestId('CaptureSubSystem').should('exist'); + cy.getByTestId('Label - CaptureSubSystem').click(); + + // 3. CHECK that the 'CaptureSubSystem' node is visible and selected in the explorer + cy.getByTestId('selected').contains('CaptureSubSystem'); + + // 4. On the diagram, click on the 'DSP' + cy.getByTestId('DSP').should('not.exist'); + cy.getByTestId('Label - DSP').click(); + + // 5. CHECK that the 'DSP' node is not visible and not selected in the explorer + cy.getByTestId('DSP').should('not.exist'); + cy.getByTestId('selected').should('not.exist'); + + // 6. Activate the synchronisation mode + cy.getByTestId('tree-synchronise').click(); + + // 5. CHECK that the 'GPU' node is visible and selected + cy.getByTestId('DSP').should('exist'); + cy.getByTestId('selected').findByTestId('DSP').should('exist'); + }); + + it('can open the new model modal', () => { + cy.getByTestId('new-model').click(); + + cy.get('.MuiDialog-container').should('be.visible'); + cy.getByTestId('navbar-contextmenu').should('not.exist'); + + cy.getByTestId('name').type('{esc}'); + cy.get('.MuiDialog-container').should('not.exist'); + }); + + it('requires a name to create a new model', () => { + cy.getByTestId('new-model').click(); + cy.getByTestId('create-document').should('be.disabled'); + }); + + it('can create a new document by clicking on the create button', () => { + cy.getByTestId('new-model').click(); + + cy.getByTestId('name-input').should('be.enabled'); + cy.getByTestId('name').type('nobel'); + + cy.getByTestId('create-document').should('be.enabled'); + cy.getByTestId('create-document').click(); + + cy.get('.MuiDialog-container').should('not.exist'); + cy.getByTestId('explorer').contains('nobel'); + }); + + it('can open the upload document modal', () => { + cy.getByTestId('upload-document').click(); + + cy.get('.MuiDialog-container').should('be.visible'); + + cy.get('.MuiDialog-container').type('{esc}'); + cy.get('.MuiDialog-container').should('not.exist'); + }); +}); + +//The upload function doesn't exist anymore. +it.skip('can upload an existing document', () => { + cy.getByTestId('upload-document').click(); + + cy.fixture('Robot.xmi').then((fileContent) => { + cy.getByTestId('file').upload({ + fileContent, + fileName: 'robot', + mimeType: 'text/xml', + encoding: 'utf8', + }); + + cy.getByTestId('upload-document').click(); + + cy.get('.MuiDialog-container').should('not.exist'); + cy.getByTestId('explorer').contains('robot'); + }); +}); diff --git a/integration-tests/cypress/integration/project/edit/project-context-menu_spec.js b/integration-tests/cypress/integration/project/edit/project-context-menu_spec.js index a59705fba1..9fa6759c7e 100644 --- a/integration-tests/cypress/integration/project/edit/project-context-menu_spec.js +++ b/integration-tests/cypress/integration/project/edit/project-context-menu_spec.js @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021, 2022 Obeo. + * Copyright (c) 2021, 2023 Obeo. * This program and the accompanying materials * are made available under the erms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at @@ -33,48 +33,6 @@ describe('/projects/:projectId/edit - Project Context Menu', () => { cy.getByTestId('navbar-contextmenu').should('not.exist'); }); - it('can open the new model modal', () => { - cy.getByTestId('more').click(); - cy.getByTestId('new-model').click(); - - cy.get('.MuiDialog-container').should('be.visible'); - cy.getByTestId('navbar-contextmenu').should('not.exist'); - - cy.getByTestId('name').type('{esc}'); - cy.get('.MuiDialog-container').should('not.exist'); - }); - - it('requires a name to create a new model', () => { - cy.getByTestId('more').click(); - cy.getByTestId('new-model').click(); - cy.getByTestId('create-document').should('be.disabled'); - }); - - it('can create a new document by clicking on the create button', () => { - cy.getByTestId('more').click(); - cy.getByTestId('new-model').click(); - - cy.getByTestId('name-input').should('be.enabled'); - cy.getByTestId('name').type('nobel'); - - cy.getByTestId('create-document').should('be.enabled'); - cy.getByTestId('create-document').click(); - - cy.get('.MuiDialog-container').should('not.exist'); - cy.getByTestId('explorer').contains('nobel'); - }); - - it('can open the upload document modal', () => { - cy.getByTestId('more').click(); - cy.getByTestId('upload-document').click(); - - cy.get('.MuiDialog-container').should('be.visible'); - cy.getByTestId('navbar-contextmenu').should('not.be.visible'); - - cy.get('.MuiDialog-container').type('{esc}'); - cy.get('.MuiDialog-container').should('not.exist'); - }); - it('contains a download link', () => { cy.getByTestId('more').click(); cy.getByTestId('download-link').should('have.attr', 'href'); @@ -96,23 +54,3 @@ describe('/projects/:projectId/edit - Project Context Menu', () => { cy.url().should('match', new RegExp(Cypress.config().baseUrl + '/projects')); }); }); - -//The upload function doesn't exist anymore. -it.skip('can upload an existing document', () => { - cy.getByTestId('more').click(); - cy.getByTestId('upload-document').click(); - - cy.fixture('Robot.xmi').then((fileContent) => { - cy.getByTestId('file').upload({ - fileContent, - fileName: 'robot', - mimeType: 'text/xml', - encoding: 'utf8', - }); - - cy.getByTestId('upload-document').click(); - - cy.get('.MuiDialog-container').should('not.exist'); - cy.getByTestId('explorer').contains('robot'); - }); -}); diff --git a/packages/core/frontend/sirius-components/src/index.ts b/packages/core/frontend/sirius-components/src/index.ts index f5fa74a49c..15e2a3b308 100644 --- a/packages/core/frontend/sirius-components/src/index.ts +++ b/packages/core/frontend/sirius-components/src/index.ts @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2022 Obeo. + * Copyright (c) 2019, 2023 Obeo. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at @@ -18,11 +18,9 @@ export * from './core/form/Form'; export * from './errors/ErrorBoundary'; export * from './icons'; export * from './modals/delete-project/DeleteProjectModal'; -export * from './modals/new-document/NewDocumentModal'; export * from './modals/new-object/NewObjectModal'; export * from './modals/new-representation/NewRepresentationModal'; export * from './modals/new-root-object/NewRootObjectModal'; export * from './modals/rename-project/RenameProjectModal'; -export * from './modals/upload-document/UploadDocumentModal'; export * from './onboarding/OnboardArea'; export * from './views/FormContainer'; diff --git a/packages/sirius-web/frontend/sirius-web/src/views/edit-project/EditProjectNavbar/EditProjectNavbar.tsx b/packages/sirius-web/frontend/sirius-web/src/views/edit-project/EditProjectNavbar/EditProjectNavbar.tsx index ee5f778aa0..6b6d8a00d9 100644 --- a/packages/sirius-web/frontend/sirius-web/src/views/edit-project/EditProjectNavbar/EditProjectNavbar.tsx +++ b/packages/sirius-web/frontend/sirius-web/src/views/edit-project/EditProjectNavbar/EditProjectNavbar.tsx @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2022 Obeo. + * Copyright (c) 2019, 2023 Obeo. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at @@ -10,12 +10,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -import { - DeleteProjectModal, - NewDocumentModal, - RenameProjectModal, - UploadDocumentModal, -} from '@eclipse-sirius/sirius-components'; +import { DeleteProjectModal, RenameProjectModal } from '@eclipse-sirius/sirius-components'; import { ServerContext } from '@eclipse-sirius/sirius-components-core'; import IconButton from '@material-ui/core/IconButton'; import ListItemIcon from '@material-ui/core/ListItemIcon'; @@ -24,12 +19,10 @@ import Menu from '@material-ui/core/Menu'; import MenuItem from '@material-ui/core/MenuItem'; import { emphasize, makeStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; -import AddIcon from '@material-ui/icons/Add'; import DeleteIcon from '@material-ui/icons/Delete'; import EditIcon from '@material-ui/icons/Edit'; import GetAppIcon from '@material-ui/icons/GetApp'; import MoreVertIcon from '@material-ui/icons/MoreVert'; -import PublishIcon from '@material-ui/icons/Publish'; import SettingsIcon from '@material-ui/icons/Settings'; import React, { useContext, useReducer } from 'react'; import { Link as RouterLink, Redirect } from 'react-router-dom'; @@ -97,13 +90,7 @@ export const EditProjectNavbar = ({ project }: EditProjectNavbarProps) => { let modal = null; if (project) { - if (modalDisplayed === 'CreateDocument') { - modal = ; - } else if (modalDisplayed === 'UploadDocument') { - modal = ( - - ); - } else if (modalDisplayed === 'RenameProject') { + if (modalDisplayed === 'RenameProject') { modal = ( { anchorEl={projectMenuAnchor} data-testid="navbar-contextmenu" onClose={() => dispatch({ type: HANDLE_CLOSE_CONTEXT_MENU__ACTION })}> - dispatch({ modalDisplayed: 'CreateDocument', type: HANDLE_SHOW_MODAL__ACTION })} - data-testid="new-model"> - - - - - - dispatch({ modalDisplayed: 'UploadDocument', type: HANDLE_SHOW_MODAL__ACTION })}> - - - - - dispatch({ modalDisplayed: 'RenameProject', type: HANDLE_SHOW_MODAL__ACTION })}> diff --git a/packages/trees/frontend/sirius-components-trees/src/common/sendFile.ts b/packages/trees/frontend/sirius-components-trees/src/common/sendFile.ts new file mode 100644 index 0000000000..0d4a541d15 --- /dev/null +++ b/packages/trees/frontend/sirius-components-trees/src/common/sendFile.ts @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2019, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ + +export const sendFile = async (httpOrigin: string, query: string, variables: any, file: File) => { + const operations = { + query, + variables, + }; + + const formData = new FormData(); + formData.append('operations', JSON.stringify(operations)); + formData.append('map', JSON.stringify({ '0': 'variables.file' })); + formData.append('0', file); + + const csrfToken = getCookie('XSRF-TOKEN'); + + const response = await fetch(`${httpOrigin}/api/graphql/upload`, { + method: 'POST', + body: formData, + credentials: 'include', + mode: 'cors', + headers: { + 'X-XSRF-TOKEN': csrfToken, + }, + }); + + return await response.json(); +}; + +const getCookie = (name: string): string => { + let cookieValue: string = null; + if (document.cookie && document.cookie !== '') { + const cookies = document.cookie.split(';'); + for (let i = 0; i < cookies.length; i++) { + const cookie = cookies[i].trim(); + // Does this cookie string begin with the name we want? + if (cookie.substring(0, name.length + 1) === name + '=') { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; +}; diff --git a/packages/trees/frontend/sirius-components-trees/src/core/file-upload/FileUpload.tsx b/packages/trees/frontend/sirius-components-trees/src/core/file-upload/FileUpload.tsx new file mode 100644 index 0000000000..cf607cfbc8 --- /dev/null +++ b/packages/trees/frontend/sirius-components-trees/src/core/file-upload/FileUpload.tsx @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright (c) 2019, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +import { makeStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; +import React, { useEffect, useState } from 'react'; +import { FileUploadProps } from './FileUpload.types'; + +const DEFAULT_MESSAGE = 'Click here to select a file'; + +const useFileUploadViewStyles = makeStyles(() => ({ + fileUpload: { + display: 'grid', + gridTemplateColumns: '1fr', + gridTemplateRows: '1fr', + cursor: 'pointer', + height: 150, + alignItems: 'center', + justifyItems: 'center', + border: '1px dashed var(--daintree)', + }, + inputfile: { + width: 0.1, + height: 0.1, + opacity: '0', + overflow: 'hidden', + position: 'absolute', + zIndex: -1, + }, + message: { + fontSize: 'var(--font-size-4)', + color: 'var(--daintree)', + fontWeight: 'bold', + }, +})); + +export const FileUpload = ({ onFileSelected, dataTestid: dataTestid }: FileUploadProps) => { + const styles = useFileUploadViewStyles(); + const fileInput: React.LegacyRef = React.createRef(); + const initialState = { + file: null, + message: DEFAULT_MESSAGE, + }; + + const [state, setState] = useState(initialState); + const { file, message } = state; + + // Update the message + useEffect(() => { + let message = DEFAULT_MESSAGE; + if (file) { + message = file.name; + } + setState((prevState) => { + return { ...prevState, message }; + }); + }, [file]); + + // Update the file selection. + const onFileInputChange = () => { + const { files } = fileInput.current; + let file: File = null; + if (files.length === 1) { + file = files[0]; + } + + onFileSelected(file); + setState((prevState) => { + return { ...prevState, file }; + }); + }; + + return ( + + ); +}; diff --git a/packages/trees/frontend/sirius-components-trees/src/core/file-upload/FileUpload.types.ts b/packages/trees/frontend/sirius-components-trees/src/core/file-upload/FileUpload.types.ts new file mode 100644 index 0000000000..6d7ff8c4ab --- /dev/null +++ b/packages/trees/frontend/sirius-components-trees/src/core/file-upload/FileUpload.types.ts @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright (c) 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ + +export interface FileUploadProps { + onFileSelected: (file: File) => void; + dataTestid: string; +} diff --git a/packages/core/frontend/sirius-components/src/modals/new-document/NewDocumentModal.tsx b/packages/trees/frontend/sirius-components-trees/src/modals/new-document/NewDocumentModal.tsx similarity index 99% rename from packages/core/frontend/sirius-components/src/modals/new-document/NewDocumentModal.tsx rename to packages/trees/frontend/sirius-components-trees/src/modals/new-document/NewDocumentModal.tsx index 1f7ec9d96d..fc03b763b4 100644 --- a/packages/core/frontend/sirius-components/src/modals/new-document/NewDocumentModal.tsx +++ b/packages/trees/frontend/sirius-components-trees/src/modals/new-document/NewDocumentModal.tsx @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2022 Obeo. + * Copyright (c) 2019, 2023 Obeo. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ import { makeStyles } from '@material-ui/core/styles'; import TextField from '@material-ui/core/TextField'; import CloseIcon from '@material-ui/icons/Close'; import { useMachine } from '@xstate/react'; -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { v4 as uuid } from 'uuid'; import { GQLCreateDocumentMutationData, diff --git a/packages/core/frontend/sirius-components/src/modals/new-document/NewDocumentModal.types.ts b/packages/trees/frontend/sirius-components-trees/src/modals/new-document/NewDocumentModal.types.ts similarity index 93% rename from packages/core/frontend/sirius-components/src/modals/new-document/NewDocumentModal.types.ts rename to packages/trees/frontend/sirius-components-trees/src/modals/new-document/NewDocumentModal.types.ts index d1d8bbf007..0bd52a4d5a 100644 --- a/packages/core/frontend/sirius-components/src/modals/new-document/NewDocumentModal.types.ts +++ b/packages/trees/frontend/sirius-components-trees/src/modals/new-document/NewDocumentModal.types.ts @@ -10,11 +10,8 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -import { Selection } from '../../workbench/Workbench.types'; export interface NewDocumentModalProps { editingContextId: string; - item: any; - setSelection: (selection: Selection) => void; onClose: () => void; } diff --git a/packages/core/frontend/sirius-components/src/modals/new-document/NewDocumentModalMachine.ts b/packages/trees/frontend/sirius-components-trees/src/modals/new-document/NewDocumentModalMachine.ts similarity index 99% rename from packages/core/frontend/sirius-components/src/modals/new-document/NewDocumentModalMachine.ts rename to packages/trees/frontend/sirius-components-trees/src/modals/new-document/NewDocumentModalMachine.ts index f90a07a8c8..12b1dee3e3 100644 --- a/packages/core/frontend/sirius-components/src/modals/new-document/NewDocumentModalMachine.ts +++ b/packages/trees/frontend/sirius-components-trees/src/modals/new-document/NewDocumentModalMachine.ts @@ -10,12 +10,13 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ + +import { assign, Machine } from 'xstate'; import { GQLCreateDocumentMutationData, GQLGetStereotypeDescriptionsQueryData, StereotypeDescription, -} from 'modals/new-document/NewDocumentModal.types'; -import { assign, Machine } from 'xstate'; +} from './NewDocumentModal.types'; export interface NewDocumentModalStateSchema { states: { diff --git a/packages/core/frontend/sirius-components/src/modals/upload-document/UploadDocumentModal.tsx b/packages/trees/frontend/sirius-components-trees/src/modals/upload-document/UploadDocumentModal.tsx similarity index 86% rename from packages/core/frontend/sirius-components/src/modals/upload-document/UploadDocumentModal.tsx rename to packages/trees/frontend/sirius-components-trees/src/modals/upload-document/UploadDocumentModal.tsx index 6a921abcfa..875def0598 100644 --- a/packages/core/frontend/sirius-components/src/modals/upload-document/UploadDocumentModal.tsx +++ b/packages/trees/frontend/sirius-components-trees/src/modals/upload-document/UploadDocumentModal.tsx @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2022 Obeo. + * Copyright (c) 2019, 2023 Obeo. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at @@ -20,13 +20,14 @@ import DialogTitle from '@material-ui/core/DialogTitle'; import FormGroup from '@material-ui/core/FormGroup'; import IconButton from '@material-ui/core/IconButton'; import Snackbar from '@material-ui/core/Snackbar'; +import { makeStyles } from '@material-ui/core/styles'; import CloseIcon from '@material-ui/icons/Close'; import { useMachine } from '@xstate/react'; -import { sendFile } from 'common/sendFile'; -import { FileUpload } from 'core/file-upload/FileUpload'; -import { Form } from 'core/form/Form'; -import React, { useContext, useEffect } from 'react'; + +import { useContext, useEffect } from 'react'; import { v4 as uuid } from 'uuid'; +import { sendFile } from '../../common/sendFile'; +import { FileUpload } from '../../core/file-upload/FileUpload'; import { GQLErrorPayload, GQLUploadDocumentPayload, UploadDocumentModalProps } from './UploadDocumentModal.types'; import { HandleResponseEvent, @@ -62,9 +63,21 @@ export const UploadDocumentModal = ({ editingContextId, onDocumentUploaded, onCl const { file, message } = context; const { httpOrigin } = useContext(ServerContext); - + const useFormStyles = makeStyles((theme) => ({ + form: { + display: 'flex', + flexDirection: 'column', + paddingTop: theme.spacing(1), + paddingLeft: theme.spacing(2), + paddingRight: theme.spacing(2), + '& > *': { + marginBottom: theme.spacing(2), + }, + }, + })); + const styles = useFormStyles(); // Execute the upload of a document and redirect to the newly created document - const uploadDocument = async (event: React.MouseEvent) => { + const uploadDocument = async () => { const requestDocumentUploadingEvent: RequestDocumentUploadingEvent = { type: 'REQUEST_DOCUMENT_UPLOADING' }; dispatch(requestDocumentUploadingEvent); @@ -120,11 +133,11 @@ export const UploadDocumentModal = ({ editingContextId, onDocumentUploaded, onCl Upload new model -
+ - + -
+