-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: open EML attachments in a new tab #310
Merged
Merged
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
4ec33d5
chore: first draft
gnekoz 3767f6d
chore: restored original API call and enabled download of files
gnekoz 2cfba0a
chore: new window wrapper
gnekoz f267433
chore: progress save
gnekoz e7efbc3
chore: progress save
gnekoz ea4cb55
Merge remote-tracking branch 'origin' into PROTOTYPE-new-window
gnekoz 1dadc6f
fix: enable the invocation of onBlock callback
gnekoz dd96529
chore: updated package-lock
gnekoz 2e08ceb
chore: remove unused import
gnekoz 85b0d6e
fix: fix the syncronization of the windows list state
gnekoz e8ca7e6
fix: fix the syncronization of the windows list state
gnekoz aa7b235
feat: the alert message about a blocked window is shown on the curren…
gnekoz e1f2332
refactor: code splitting
gnekoz 2fd7c7c
refactor: code splitting
gnekoz ad0d672
feat: popup blocked opening message
gnekoz daf3c8e
refactor: add dynamic styles synchronization between parent's and new…
gnekoz 8f693f9
refactor: disable Files attachment's upload from new windows
gnekoz f887e8d
Merge remote-tracking branch 'origin' into PROTOTYPE-new-window
gnekoz b62eaf9
chore: progress save
gnekoz e84314e
chore: added an observer for child window's dom additions
gnekoz 1075217
chore: added mail preview disclaimer
gnekoz cc71c0d
Merge remote-tracking branch 'origin' into PROTOTYPE-new-window
gnekoz 6e3e697
chore: progress save
gnekoz 4668886
chore: component's alignment and padding fixed
gnekoz ae8d253
Merge remote-tracking branch 'origin' into PROTOTYPE-new-window
gnekoz b40c628
chore: fixed wrong translation texts, added comments and removed usel…
gnekoz 8082d4f
chore: dependencies updated
gnekoz 59a68d9
chore: merge from devel
gnekoz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Zextras <https://www.zextras.com> | ||
* | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
import React from 'react'; | ||
|
||
/** | ||
* Descriptor of the new window/tab characteristics. | ||
* @see Window.open | ||
*/ | ||
export type ExtraWindowFeatures = { | ||
popup?: boolean; | ||
width?: number; | ||
height?: number; | ||
left?: number; | ||
top?: number; | ||
noopener?: boolean; | ||
noreferrer?: boolean; | ||
}; | ||
|
||
export type EventHandler = () => void; | ||
|
||
export type OpenEventHandler = (window: Window) => void; | ||
|
||
export type ExtraWindowCreationParams = { | ||
/** | ||
* Children to render in the new window. | ||
*/ | ||
children?: React.ReactNode; | ||
|
||
/** | ||
* If set to true, the extra window component will be returned | ||
* instead of being rendered in a generic container | ||
*/ | ||
returnComponent: boolean; | ||
|
||
/** | ||
* The URL to open, if specified any children will be overridden. | ||
*/ | ||
url?: string; | ||
|
||
/** | ||
* The name of the window. | ||
*/ | ||
name?: string; | ||
|
||
/** | ||
* The title of the new window document. | ||
*/ | ||
title?: string; | ||
|
||
/** | ||
* The set of window features. | ||
*/ | ||
features?: ExtraWindowFeatures; | ||
|
||
/** | ||
* A function to be triggered before the new window unload. | ||
*/ | ||
onBlock?: EventHandler | null; | ||
|
||
/** | ||
* A function to be triggered when the new window could not be opened. | ||
*/ | ||
onUnload?: EventHandler | null; | ||
|
||
/** | ||
* A function to be triggered when the new window opened. | ||
*/ | ||
onOpen?: OpenEventHandler | null; | ||
|
||
/** | ||
* Indicate how to center the new window. | ||
*/ | ||
center?: 'parent' | 'screen'; | ||
|
||
/** | ||
* If specified, copy styles from parent window's document. | ||
*/ | ||
copyStyles?: boolean; | ||
|
||
/** | ||
* If specified, close the window when the component is unmounted | ||
*/ | ||
closeOnUnmount: boolean; | ||
}; | ||
|
||
export type ExtraWindowProps = ExtraWindowCreationParams & { id: string }; | ||
|
||
export type ExtraWindowContextType = { | ||
windowId: string | undefined; | ||
}; | ||
|
||
export type ExtraWindowsContextType = { | ||
createWindow?: (props: ExtraWindowCreationParams) => ExtraWindowsCreationResult; | ||
closeWindow?: (windowId: string) => void; | ||
listWindows?: () => Array<ExtraWindowsCreationResult>; | ||
getWindow?: (criteria: { | ||
windowId?: string; | ||
windowName?: string; | ||
}) => ExtraWindowsCreationResult | undefined; | ||
getFocusedWindow?: () => ExtraWindowsCreationResult | undefined; | ||
}; | ||
|
||
export type ExtraWindowsCreationResult = { | ||
id: string; | ||
windowProps?: ExtraWindowProps; | ||
window?: Window; | ||
component?: React.ReactElement; | ||
}; |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this sneaky comment made it to the pr :)