-
Notifications
You must be signed in to change notification settings - Fork 6
Nanopub #281
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
Open
mdroidian
wants to merge
58
commits into
main
Choose a base branch
from
nanopub
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Nanopub #281
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
0fd43a6
init
mdroidian 455603f
additions
mdroidian 9ddb742
nanopub node config
mdroidian b92bf02
add nanopub to getDiscourseNodes, use template in dialog
mdroidian 35d4e9e
move orcid to main config
mdroidian ccd84c1
initial ContributorManager
mdroidian b68e9ba
rename nodeconfig
mdroidian 2326a56
get publish working
mdroidian 343697a
WIP rdf mapping/generation
mdroidian dc5faf9
working publish
mdroidian 78765bf
resolve body
mdroidian 9077b53
contributors to preview, ui additions/changes
mdroidian b11531f
alias predicates, add timestamp
mdroidian 00cc732
lift state up from PreviewNanopub, some misc changes
mdroidian 73ae333
dev url
mdroidian b72a9ee
add error message if no ORCID
mdroidian 8e5a592
rework CreditRole to label,uri,verb and alias credit roles
mdroidian 77c1637
segmente template into TripleTypes, handle nodeType
mdroidian e7a0e58
subvert discourseNodeTypeCache
mdroidian 8eb7d98
update preview/template with TripleTypes
mdroidian e33e27d
add and handle requireContributor switch
mdroidian 6e99fab
minor fixes/additions
mdroidian 9a08662
check if nanopub is enabled
mdroidian dd90f5d
getDiscourseNode no-cache option
mdroidian abacd02
minor fix
mdroidian 20ecf6c
more checks, unset error on tab seelct
mdroidian cb7f52a
cleanup
mdroidian df49bb9
orcid test fix
mdroidian bc6dc40
add visual notification that we are publishing an example nanopub
mdroidian f99b3e4
add error email to publishNanopub
mdroidian 62dc694
gracefully handle null users
mdroidian d1a9141
tailwind config
mdroidian 8347550
remove title additions on unload
mdroidian 36b9ab3
addCommand to get all nanopubs that have defined contributors
mdroidian 2ae2dec
refactor export settings, allow for overrides, remove frontmatter, us…
mdroidian f349b25
add placeholder tooltips
mdroidian 5b0cd46
popup styles
mdroidian 6d3459c
hide template,rdf,dev tabs if not dev
mdroidian 12ea036
custom body definition
mdroidian 7e3a76b
initial bulk publish UI
mdroidian 61b18c8
type fix
mdroidian ae7c6af
html export
mdroidian 702284b
fixes and refactors, add kpxl:DiscourseGraphNanopub
mdroidian fde96f5
inline description preview
mdroidian 1177a9c
.
mdroidian 608dd3a
.
mdroidian 9540bfc
add initial SourceManager
mdroidian 916db5c
.
mdroidian 024707e
config fixes/safeguards
mdroidian 4d74e74
Source Manager additions
mdroidian 33b11a4
misc
mdroidian 07110d8
add list of contributors/orcids, add orcids to nanopub
mdroidian 7acd332
.
mdroidian 88ac129
store current user ORCID with contributors
mdroidian fa4c828
add is published (to nanopub) condition
mdroidian 3e57e35
add has contributor condition (requires refactoring how we are storin…
mdroidian 132cd0f
.
mdroidian a25dcfe
Update GitHub Actions workflow to trigger on workflow_dispatch in add…
mdroidian 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 hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,85 @@ | ||
| import React from "react"; | ||
| import { | ||
| Dialog, | ||
| Button, | ||
| Classes, | ||
| IconName, | ||
| MaybeElement, | ||
| } from "@blueprintjs/core"; | ||
| import renderOverlay from "roamjs-components/util/renderOverlay"; | ||
|
|
||
| type SelectItem = { | ||
| id: string; | ||
| text: string; | ||
| icon?: IconName | MaybeElement; | ||
| onClick: () => void; | ||
| }; | ||
|
|
||
| type SelectDialogProps = { | ||
| isOpen: boolean; | ||
| onClose: () => void; | ||
| title: string; | ||
| items: SelectItem[]; | ||
| errorMessage?: string; | ||
| width?: string; | ||
| }; | ||
|
|
||
| const SelectDialog = ({ | ||
| isOpen, | ||
| onClose, | ||
| title, | ||
| items, | ||
| errorMessage, | ||
| width = "20rem", | ||
| }: SelectDialogProps) => { | ||
| return ( | ||
| <Dialog | ||
| isOpen={isOpen} | ||
| onClose={onClose} | ||
| canOutsideClickClose | ||
| canEscapeKeyClose | ||
| className="roamjs-canvas-dialog" | ||
| style={{ width }} | ||
| > | ||
| <div className={`${Classes.DIALOG_BODY} py-4 px-0 m-0`}> | ||
| <div className="flex flex-col"> | ||
| <div className="text-lg font-bold p-2 mb-2 mx-5 mt-0">{title}</div> | ||
| <button | ||
| // Visually hidden button to catch initial focus | ||
| // this allows the Dialog to be called via command palette WITH the keyboard | ||
| // then use keyboard arrow keys to navigate | ||
| className="sr-only" | ||
| tabIndex={0} | ||
| aria-hidden="true" | ||
| /> | ||
| {items.length > 0 ? ( | ||
| items.map((item, i) => ( | ||
| <div key={item.id} className="flex items-center"> | ||
| <Button | ||
| minimal | ||
| text={item.text} | ||
| className="p-2 px-7 focus:outline-none focus:bg-gray-300 justify-start flex-grow" | ||
| icon={item.icon} | ||
| style={{ | ||
| caretColor: "transparent", | ||
| }} | ||
| onClick={() => { | ||
| item.onClick(); | ||
| onClose(); | ||
| }} | ||
| /> | ||
| </div> | ||
| )) | ||
| ) : ( | ||
| <div className="p-4 text-center"> | ||
| {errorMessage || "No items available"} | ||
| </div> | ||
| )} | ||
| </div> | ||
| </div> | ||
| </Dialog> | ||
| ); | ||
| }; | ||
|
|
||
| export const renderSelectDialog = (props: SelectDialogProps) => | ||
| renderOverlay({ Overlay: SelectDialog, props }); |
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.
💡 Verification agent
🧩 Analysis chain
Verify the nanopub package version and security.
The new dependency
@nanopub/signsupports the nanopub functionality. Please ensure this version is current and secure.🌐 Web query:
💡 Result:
The latest version of the
@nanopub/signnpm package is 0.1.3, released on March 31, 2024. (libraries.io)As of now, there are no known security vulnerabilities associated with this package. To ensure your project remains secure, it's advisable to regularly update your dependencies and monitor for any new vulnerabilities.
You can use the
npm auditcommand to scan your project for known vulnerabilities and thenpm audit fixcommand to automatically update packages to their latest secure versions. (geeksforgeeks.org)Additionally, consider using automated tools like Snyk or WhiteSource Bolt to continuously monitor your project's dependencies for security issues. (geeksforgeeks.org)
By following these practices, you can help maintain the security and integrity of your project.
Citations:
Update @nanopub/sign to a valid published version
It looks like you’ve added
but the latest published release is 0.1.3 (Mar 31, 2024). Please update to:
There are currently no known security vulnerabilities for this package. To keep dependencies safe, consider running
npm audit(andnpm audit fix) or integrating tools like Snyk or WhiteSource Bolt for continuous monitoring.🤖 Prompt for AI Agents