Skip to content
This repository was archived by the owner on May 19, 2020. It is now read-only.

Commit 5693104

Browse files
authored
Merge pull request #39 from accordproject/dl-connect-editor
feat(ContractEditor): refactor clausePlugin to use methods passed form props - 33
2 parents 0a9c587 + dd6c496 commit 5693104

File tree

11 files changed

+162
-222
lines changed

11 files changed

+162
-222
lines changed

package-lock.json

+31-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@
9090
"\\.(css|scss|sass|styl)$": "<rootDir>/__mocks__/styleMock.js"
9191
}
9292
}
93-
}
93+
}
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,116 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`<ContractEditor /> on initialization renders page correctly 1`] = `
4-
<div>
5-
<MarkdownEditor
6-
lockText={true}
7-
markdown="# Supply Agreement
4+
<MarkdownEditor
5+
lockText={false}
6+
markdown="# Supply Agreement
87
This is a supply agreement between Party A and Party B.
98
109
# Payment
1110
12-
<clause src=\\"https://templates.accordproject.org/archives/[email protected]\\">
11+
<clause src=\\"https://templates.accordproject.org/archives/[email protected]\\" clauseid=\\"skjh2342dsa\\">
1312
Upon the signing of this Agreement, \\"Dan\\" shall pay the total purchase price to \\"Steve\\" in the amount of 0.01 USD.
1413
</clause>
1514
1615
## Late Delivery And Penalty
1716
18-
<clause src=\\"https://templates.accordproject.org/archives/[email protected]\\">
17+
<clause src=\\"https://templates.accordproject.org/archives/[email protected]\\" clauseid=\\"kgek32h4k3j2hkew\\">
1918
Late Delivery and Penalty. In case of delayed delivery except for Force Majeure cases, \\"Dan\\" (the Seller) shall pay to \\"Steve\\" (the Buyer) for every 2 days of delay penalty amounting to 10.5% of the total value of the Equipment whose delivery has been delayed. Any fractional part of a days is to be considered a full days. The total amount of penalty shall not however, exceed 55% of the total value of the Equipment involved in late delivery. If the delay is more than 15 days, the Buyer is entitled to terminate this Contract.
2019
</clause>
2120
2221
End.
2322
"
24-
onChange={[Function]}
25-
plugins={
26-
Array [
27-
Object {
28-
"fromHTML": [Function],
29-
"fromMarkdown": [Function],
30-
"markdownTags": Array [
31-
"list",
32-
"item",
33-
],
34-
"onKeyDown": [Function],
35-
"plugin": "list",
36-
"renderBlock": [Function],
37-
"schema": Object {
38-
"blocks": Object {
39-
"list": Object {
40-
"nodes": Array [
41-
Object {
42-
"match": Object {
43-
"type": "list_item",
44-
},
45-
},
46-
],
47-
},
48-
"list_item": Object {
49-
"marks": Array [
50-
Object {
51-
"type": "bold",
52-
},
53-
Object {
54-
"type": "italic",
23+
onChange={[Function]}
24+
plugins={
25+
Array [
26+
Object {
27+
"fromHTML": [Function],
28+
"fromMarkdown": [Function],
29+
"markdownTags": Array [
30+
"list",
31+
"item",
32+
],
33+
"onKeyDown": [Function],
34+
"plugin": "list",
35+
"renderBlock": [Function],
36+
"schema": Object {
37+
"blocks": Object {
38+
"list": Object {
39+
"nodes": Array [
40+
Object {
41+
"match": Object {
42+
"type": "list_item",
5543
},
56-
],
57-
"nodes": Array [
58-
Object {
59-
"match": Array [
60-
Object {
61-
"object": "text",
62-
},
63-
Object {
64-
"type": "link",
65-
},
66-
],
67-
},
68-
],
69-
"parent": Object {
70-
"type": "list",
7144
},
45+
],
46+
},
47+
"list_item": Object {
48+
"marks": Array [
49+
Object {
50+
"type": "bold",
51+
},
52+
Object {
53+
"type": "italic",
54+
},
55+
],
56+
"nodes": Array [
57+
Object {
58+
"match": Array [
59+
Object {
60+
"object": "text",
61+
},
62+
Object {
63+
"type": "link",
64+
},
65+
],
66+
},
67+
],
68+
"parent": Object {
69+
"type": "list",
7270
},
7371
},
7472
},
75-
"tags": Array [
76-
"ul",
77-
"ol",
78-
"li",
79-
],
80-
"toMarkdown": [Function],
8173
},
82-
Object {
83-
"fromHTML": [Function],
84-
"fromMarkdown": [Function],
85-
"markdownTags": Array [
86-
"clause",
87-
],
88-
"onChange": [Function],
89-
"onKeyDown": [Function],
90-
"plugin": "Clause",
91-
"renderNode": [Function],
92-
"renderToolbar": [Function],
93-
"schema": Object {
94-
"blocks": Object {
95-
"Clause": Object {
96-
"nodes": Array [
97-
Object {
98-
"match": Array [
99-
Object {
100-
"type": "paragraph",
101-
},
102-
],
103-
},
104-
],
105-
},
74+
"tags": Array [
75+
"ul",
76+
"ol",
77+
"li",
78+
],
79+
"toMarkdown": [Function],
80+
},
81+
Object {
82+
"fromHTML": [Function],
83+
"fromMarkdown": [Function],
84+
"markdownTags": Array [
85+
"clause",
86+
],
87+
"onChange": [Function],
88+
"onKeyDown": [Function],
89+
"plugin": "Clause",
90+
"renderBlock": [Function],
91+
"renderToolbar": [Function],
92+
"schema": Object {
93+
"blocks": Object {
94+
"Clause": Object {
95+
"nodes": Array [
96+
Object {
97+
"match": Array [
98+
Object {
99+
"type": "paragraph",
100+
},
101+
],
102+
},
103+
],
106104
},
107105
},
108-
"tags": Array [
109-
"clause",
110-
],
111-
"toMarkdown": [Function],
112106
},
113-
]
114-
}
115-
showEditButton={true}
116-
/>
117-
</div>
107+
"tags": Array [
108+
"clause",
109+
],
110+
"toMarkdown": [Function],
111+
},
112+
]
113+
}
114+
showEditButton={true}
115+
/>
118116
`;

0 commit comments

Comments
 (0)