-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(dep) Update Cicero/Markdown Transform dependencies, adjusts sto…
…ries Signed-off-by: Jerome Simeon <[email protected]>
- Loading branch information
1 parent
f23f988
commit 8e30157
Showing
6 changed files
with
109 additions
and
109 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -72,17 +72,17 @@ const Wrapper = styled.div` | |
export default { title: 'Contract Editor' }; | ||
|
||
const templates = { | ||
'Optional Clause': 'https://parserv2--templates-accordproject.netlify.app/archives/[email protected]', | ||
'Fixed Interest': 'https://parserv2--templates-accordproject.netlify.app/archives/[email protected]', | ||
'Late Delivery And Penalty': 'https://templates.accordproject.org/archives/latedeliveryandpenalty@0.15.0.cta', | ||
'Fragile Goods': 'https://templates.accordproject.org/archives/fragile-goods@0.13.1.cta', | ||
'Optional Clause': 'https://templates.accordproject.org/archives/[email protected]', | ||
'Fixed Interest': 'https://templates.accordproject.org/archives/[email protected]', | ||
'Late Delivery And Penalty': 'https://templates.accordproject.org/archives/latedeliveryandpenalty@0.16.0.cta', | ||
'Fragile Goods': 'https://templates.accordproject.org/archives/fragile-goods@0.14.0.cta', | ||
}; | ||
|
||
export const contractEditor = () => { | ||
const markdownText = text( 'Markdown', `# Heading One | ||
This is text. This is *italic* text. This is **bold** text. This is a [link](https://clause.io). This is \`inline code\`. | ||
`); | ||
const templateUrl = select('Template Archive URL', templates, 'https://parserv2--templates-accordproject.netlify.app/archives/fixed-interests@0.5.0.cta'); | ||
const templateUrl = select('Template Archive URL', templates, 'https://templates.accordproject.org/archives/latedeliveryandpenalty@0.16.0.cta'); | ||
const lockText = boolean('lockText', true); | ||
const readOnly = boolean('readOnly', false); | ||
const [slateValue, setSlateValue] = useState( () => { | ||
|
@@ -158,24 +158,26 @@ This is text. This is *italic* text. This is **bold** text. This is a [link](htt | |
|
||
const found = val.children[1].children.filter(element => element.type === 'formula' && element.data.name === 'formula'); | ||
|
||
action('Clause -> Parse: ')({ | ||
'Clause': ciceroClause, | ||
'AST': ast, | ||
'Draft': something | ||
}); | ||
|
||
/* XXX What do we do with this? - JS | ||
const path = ReactEditor.findPath(newReduxState.editor, found[0]); | ||
const newConditional = { | ||
object: 'inline', | ||
type: 'formula', | ||
data: { name: "formula", elementType: "Double" }, | ||
children: [{ object: "text", text: `${Math.round(Math.random() * 10)}` }] | ||
}; | ||
action('Clause -> Parse: ')({ | ||
'Clause': ciceroClause, | ||
'AST': ast, | ||
'Draft': something | ||
}); | ||
Editor.withoutNormalizing(newReduxState.editor, () => { | ||
Transforms.removeNodes(newReduxState.editor, { at: path }); | ||
Transforms.insertNodes(newReduxState.editor, newConditional, { at: path }); | ||
}); | ||
|
||
*/ | ||
}, [editor]); | ||
|
||
const onClauseUpdatedHandler = useCallback((val) => { | ||
|
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.