This repository has been archived by the owner on May 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from accordproject/dl-add-to-contract
feat(ContractEditor): update to use new SlateAsInputEditor from cicero-ui
- Loading branch information
Showing
13 changed files
with
241 additions
and
393 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export default { | ||
object: 'value', | ||
document: { | ||
object: 'document', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'block', | ||
type: 'clause', | ||
data: { | ||
tag: 'clause', | ||
attributes: { | ||
src: 'https://templates.accordproject.org/archives/[email protected]' | ||
}, | ||
attributeString: 'src = "https://templates.accordproject.org/archives/[email protected]"', | ||
content: '\n 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.\n ', | ||
closed: false | ||
}, | ||
nodes: [ | ||
{ | ||
object: 'block', | ||
type: 'paragraph', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'text', | ||
text: '\n 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.\n ', | ||
marks: [] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
] | ||
} | ||
}; |
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,123 @@ | ||
export default { | ||
object: 'value', | ||
document: { | ||
object: 'document', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'block', | ||
type: 'heading_one', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'text', | ||
text: 'Supply Agreement', | ||
marks: [] | ||
} | ||
] | ||
}, | ||
{ | ||
object: 'block', | ||
type: 'paragraph', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'text', | ||
text: 'This is a supply agreement between Party A and Party B.', | ||
marks: [] | ||
} | ||
] | ||
}, | ||
{ | ||
object: 'block', | ||
type: 'heading_one', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'text', | ||
text: 'Payment', | ||
marks: [] | ||
} | ||
] | ||
}, | ||
{ | ||
object: 'block', | ||
type: 'clause', | ||
data: { | ||
tag: 'clause', | ||
attributes: { | ||
src: 'https://templates.accordproject.org/archives/[email protected]' | ||
}, | ||
attributeString: 'src = "https://templates.accordproject.org/archives/[email protected]"', | ||
content: '\n Upon the signing of this Agreement, "Dan" shall pay the total purchase price to "Steve" in the amount of 0.01 USD.\n ', | ||
closed: false | ||
}, | ||
nodes: [ | ||
{ | ||
object: 'block', | ||
type: 'paragraph', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'text', | ||
text: '\n Upon the signing of this Agreement, "Dan" shall pay the total purchase price to "Steve" in the amount of 0.01 USD.\n ', | ||
marks: [] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
object: 'block', | ||
type: 'heading_two', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'text', | ||
text: 'Late Delivery And Penalty', | ||
marks: [] | ||
} | ||
] | ||
}, | ||
{ | ||
object: 'block', | ||
type: 'clause', | ||
data: { | ||
tag: 'clause', | ||
attributes: { | ||
src: 'https://templates.accordproject.org/archives/[email protected]' | ||
}, | ||
attributeString: 'src = "https://templates.accordproject.org/archives/[email protected]"', | ||
content: '\n 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.\n ', | ||
closed: false | ||
}, | ||
nodes: [ | ||
{ | ||
object: 'block', | ||
type: 'paragraph', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'text', | ||
text: '\n 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.\n ', | ||
marks: [] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
object: 'block', | ||
type: 'paragraph', | ||
data: {}, | ||
nodes: [ | ||
{ | ||
object: 'text', | ||
text: 'End.', | ||
marks: [] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}; |
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 |
---|---|---|
|
@@ -8,28 +8,8 @@ import { Template, Clause } from '@accordproject/cicero-core'; | |
import 'semantic-ui-css/semantic.min.css'; | ||
import ClauseEditor from '../../src/ClauseEditor'; | ||
import ContractEditor from '../../src/ContractEditor'; | ||
|
||
const clauseEditorInitialMarkdown = `<clause src="https://templates.accordproject.org/archives/[email protected]"> | ||
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. | ||
</clause>`; | ||
|
||
const contractEditorInitialMarkdown = `# Supply Agreement | ||
This is a supply agreement between Party A and Party B. | ||
# Payment | ||
<clause src="https://templates.accordproject.org/archives/[email protected]"> | ||
Upon the signing of this Agreement, <variable name="buyer">"Dan"</variable> shall pay the total purchase price to <variable name="seller">"Steve"</variable> in the amount of 0.01 USD. | ||
</clause> | ||
## Late Delivery And Penalty | ||
<clause src="https://templates.accordproject.org/archives/[email protected]"> | ||
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. | ||
</clause> | ||
End. | ||
`; | ||
import defaultContractValue from './defaultContractValue'; | ||
import defaultClauseValue from './defaultClauseValue'; | ||
|
||
/** | ||
* A demo component that uses ContractEditor and | ||
|
@@ -66,13 +46,13 @@ function Demo() { | |
const demo = activeItem === 'clauseEditor' | ||
? <ClauseEditor | ||
lockText={false} | ||
markdown={clauseEditorInitialMarkdown} | ||
value={defaultClauseValue} | ||
onChange={onChange} | ||
onParse={onParse} | ||
/> | ||
: <ContractEditor | ||
lockText={false} | ||
markdown={contractEditorInitialMarkdown} | ||
value={defaultContractValue} | ||
onChange={onChange} | ||
/>; | ||
|
||
|
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
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.