@@ -72,17 +72,17 @@ const Wrapper = styled.div`
72
72
export default { title : 'Contract Editor' } ;
73
73
74
74
const templates = {
75
- 'Optional Clause' :
'https://parserv2-- templates- accordproject.netlify.app /archives/[email protected] ' ,
76
- 'Fixed Interest' :
'https://parserv2-- templates- accordproject.netlify.app /archives/[email protected] ' ,
77
- 'Late Delivery And Penalty' : 'https://templates.accordproject.org/archives/latedeliveryandpenalty@0.15 .0.cta' ,
78
- 'Fragile Goods' : 'https://templates.accordproject.org/archives/fragile-goods@0.13.1 .cta' ,
75
+ 'Optional Clause' :
'https://templates. accordproject.org /archives/[email protected] ' ,
76
+ 'Fixed Interest' :
'https://templates. accordproject.org /archives/[email protected] ' ,
77
+ 'Late Delivery And Penalty' : 'https://templates.accordproject.org/archives/latedeliveryandpenalty@0.16 .0.cta' ,
78
+ 'Fragile Goods' : 'https://templates.accordproject.org/archives/fragile-goods@0.14.0 .cta' ,
79
79
} ;
80
80
81
81
export const contractEditor = ( ) => {
82
82
const markdownText = text ( 'Markdown' , `# Heading One
83
83
This is text. This is *italic* text. This is **bold** text. This is a [link](https://clause.io). This is \`inline code\`.
84
84
` ) ;
85
- const templateUrl = select ( 'Template Archive URL' , templates , 'https://parserv2-- templates- accordproject.netlify.app /archives/fixed-interests @0.5 .0.cta' ) ;
85
+ const templateUrl = select ( 'Template Archive URL' , templates , 'https://templates. accordproject.org /archives/latedeliveryandpenalty @0.16 .0.cta' ) ;
86
86
const lockText = boolean ( 'lockText' , true ) ;
87
87
const readOnly = boolean ( 'readOnly' , false ) ;
88
88
const [ slateValue , setSlateValue ] = useState ( ( ) => {
@@ -158,24 +158,26 @@ This is text. This is *italic* text. This is **bold** text. This is a [link](htt
158
158
159
159
const found = val . children [ 1 ] . children . filter ( element => element . type === 'formula' && element . data . name === 'formula' ) ;
160
160
161
+ action ( 'Clause -> Parse: ' ) ( {
162
+ 'Clause' : ciceroClause ,
163
+ 'AST' : ast ,
164
+ 'Draft' : something
165
+ } ) ;
166
+
167
+ /* XXX What do we do with this? - JS
161
168
const path = ReactEditor.findPath(newReduxState.editor, found[0]);
162
169
const newConditional = {
163
170
object: 'inline',
164
171
type: 'formula',
165
172
data: { name: "formula", elementType: "Double" },
166
173
children: [{ object: "text", text: `${Math.round(Math.random() * 10)}` }]
167
174
};
168
- action ( 'Clause -> Parse: ' ) ( {
169
- 'Clause' : ciceroClause ,
170
- 'AST' : ast ,
171
- 'Draft' : something
172
- } ) ;
173
175
174
176
Editor.withoutNormalizing(newReduxState.editor, () => {
175
177
Transforms.removeNodes(newReduxState.editor, { at: path });
176
178
Transforms.insertNodes(newReduxState.editor, newConditional, { at: path });
177
179
});
178
-
180
+ */
179
181
} , [ editor ] ) ;
180
182
181
183
const onClauseUpdatedHandler = useCallback ( ( val ) => {
0 commit comments