Skip to content

Commit

Permalink
chore(dep) Upgrade to latest Concerto with Metamodel 0.3
Browse files Browse the repository at this point in the history
Signed-off-by: jeromesimeon <[email protected]>
  • Loading branch information
jeromesimeon committed Sep 28, 2021
1 parent 00492e8 commit d7a931b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 24 deletions.
48 changes: 37 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.98.0",
"private": true,
"dependencies": {
"@accordproject/concerto-core": "1.0.5-20210728143648",
"@accordproject/concerto-core": "1.2.2-20210927172800",
"@accordproject/cicero-core": "0.22.0",
"@accordproject/markdown-slate": "0.13.0",
"@accordproject/markdown-transform": "0.13.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-concerto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.98.0",
"private": false,
"dependencies": {
"@accordproject/concerto-core": "1.0.5-20210728143648",
"@accordproject/concerto-core": "1.2.2-20210927172800",
"@babel/runtime": "^7.10.3",
"lodash.get": "^4.4.2",
"lodash.isequal": "^4.5.0",
Expand Down
22 changes: 11 additions & 11 deletions packages/ui-concerto/src/modelBuilderVisitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import {
} from './utilities';

const declarationTypes = [
{ value: 'concerto.metamodel.StringFieldDeclaration', text: 'Text' },
{ value: 'concerto.metamodel.IntegerFieldDeclaration', text: 'Whole Number' },
{ value: 'concerto.metamodel.BooleanFieldDeclaration', text: 'Boolean' },
{ value: 'concerto.metamodel.DateTimeFieldDeclaration', text: 'Date' },
{ value: 'concerto.metamodel.DoubleFieldDeclaration', text: 'Decimal' },
{ value: 'concerto.metamodel.ObjectFieldDeclaration', text: 'Object' },
{ value: 'concerto.metamodel.RelationshipDeclaration', text: 'Relationship' },
{ value: 'concerto.metamodel.StringProperty', text: 'Text' },
{ value: 'concerto.metamodel.IntegerProperty', text: 'Whole Number' },
{ value: 'concerto.metamodel.BooleanProperty', text: 'Boolean' },
{ value: 'concerto.metamodel.DateTimeProperty', text: 'Date' },
{ value: 'concerto.metamodel.DoubleProperty', text: 'Decimal' },
{ value: 'concerto.metamodel.ObjectProperty', text: 'Object' },
{ value: 'concerto.metamodel.RelationshipProperty', text: 'Relationship' },
];

/**
Expand Down Expand Up @@ -72,15 +72,15 @@ class ModelBuilderVisitor extends ReactFormVisitor {
const props = declaration.getProperties();
const className = props.find(({ name }) => name === 'name');
const superType = props.find(({ name }) => name === 'superType');
const fields = props.find(({ name }) => name === 'fields');
const properties = props.find(({ name }) => name === 'properties');

return <div>
<div className='mbClassNameDeclaration'>
<div>{className.accept(this, parameters)}</div>
<div>{superType.accept(this, parameters)}</div>
</div>
<div className='mbFieldDeclarations'>
{fields.accept(this, parameters)}
{properties.accept(this, parameters)}
</div>
</div>;
}
Expand All @@ -97,8 +97,8 @@ class ModelBuilderVisitor extends ReactFormVisitor {
const value = get(parameters.json, key);

const hasTypeProperty = name => [
'concerto.metamodel.ObjectFieldDeclaration',
'concerto.metamodel.RelationshipDeclaration'
'concerto.metamodel.ObjectProperty',
'concerto.metamodel.RelationshipProperty'
].includes(name);

// Create a new concept
Expand Down

0 comments on commit d7a931b

Please sign in to comment.