-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3941 from epam/3914-add-support-for-opening-struc…
…tures-in-cdx-format-embedded-into-ms-powerpoint Backmerge: #3914 – Add support for opening structures in CDX format embedded into MS PowerPoint
- Loading branch information
Showing
18 changed files
with
444 additions
and
19 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
ketcher-autotests/tests/File-Management/Open-And-Save-Files/PPTX-Files/pptx-files.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { test } from '@playwright/test'; | ||
import { | ||
waitForPageInit, | ||
selectTopPanelButton, | ||
TopPanelButton, | ||
openFile, | ||
takeEditorScreenshot, | ||
} from '@utils'; | ||
|
||
test.describe('PPTX files', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await waitForPageInit(page); | ||
}); | ||
|
||
test('open pptx file', async ({ page }) => { | ||
await selectTopPanelButton(TopPanelButton.Open, page); | ||
await openFile('PPTX/pptx-with-chem-draw.pptx', page); | ||
await takeEditorScreenshot(page); | ||
await page.getByText('Structure 2').click(); | ||
await takeEditorScreenshot(page); | ||
}); | ||
|
||
test('open empty pptx file', async ({ page }) => { | ||
await selectTopPanelButton(TopPanelButton.Open, page); | ||
await openFile('PPTX/pptx-empty.pptx', page); | ||
await takeEditorScreenshot(page); | ||
}); | ||
}); |
Binary file added
BIN
+32.1 KB
...tx-files.spec.ts-snapshots/PPTX-files-open-empty-pptx-file-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+55.7 KB
...les/pptx-files.spec.ts-snapshots/PPTX-files-open-pptx-file-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+57.2 KB
...les/pptx-files.spec.ts-snapshots/PPTX-files-open-pptx-file-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/ketcher-react/src/script/ui/state/server/selectors/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/**************************************************************************** | ||
* Copyright 2021 EPAM Systems | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
***************************************************************************/ | ||
|
||
export const serverSelector = (state) => { | ||
return state.options.app.server ? state.server : null; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
...l/components/document/Open/components/CDXStructuresViewer/CDXStructuresViewer.module.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/**************************************************************************** | ||
* Copyright 2021 EPAM Systems | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
***************************************************************************/ | ||
@import '../../../../../../../../../style/variables'; | ||
|
||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
margin: 1em 2em; | ||
gap: 1em; | ||
width: 60vw; | ||
height: 50vh; | ||
max-width: 60em; | ||
max-height: 30em; | ||
} | ||
|
||
.structuresWrapper { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 2em; | ||
height: 90%; | ||
justify-content: space-between; | ||
} | ||
|
||
.menuListWrapper { | ||
background: @gray-background-color; | ||
padding: 16px 8px; | ||
border-radius: 8px; | ||
flex: 1; | ||
overflow-y: auto; | ||
|
||
> ul { | ||
background: @color-background-primary; | ||
|
||
> li { | ||
padding: 0.5em; | ||
|
||
&:hover { | ||
background: @color-spec-button-primary-hover !important; | ||
color: white; | ||
} | ||
} | ||
|
||
:global(.Mui-selected) { | ||
background: @color-button-primary-clicked !important; | ||
color: white; | ||
} | ||
} | ||
|
||
> .header { | ||
color: @color-text-secondary; | ||
font-size: 1rem; | ||
margin-bottom: 1em; | ||
} | ||
} | ||
|
||
.fileName { | ||
font-weight: 600; | ||
} | ||
|
||
.menuItem { | ||
margin: 0.5em 1em; | ||
} | ||
|
||
.centerWrapper { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.imageWrapper { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-weight: 600; | ||
flex: 2; | ||
} | ||
|
||
.image { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border: solid @border-color; | ||
border-radius: 8px; | ||
padding: 0.5em; | ||
width: 100%; | ||
height: 100%; | ||
box-sizing: border-box; | ||
|
||
> img { | ||
max-width: 100%; | ||
max-height: 100%; | ||
} | ||
} |
Oops, something went wrong.