Skip to content

Commit 34bb7a7

Browse files
committed
Model Builder Fix xsd:Name and xsd:anyUri property type
1 parent ef80c2f commit 34bb7a7

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

packages/tdb-react-components/src/constants/details-labels.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export const PROPERTY_TYPE_BY_CLASS = {'string':'xsd:string',
2323
'base64Binary':'xsd:base64Binary',
2424
'html':'xdd:html',
2525
'url':'xdd:url',
26-
'email':'xdd:email'};
26+
'email':'xdd:email',
27+
'name':'xsd:Name',
28+
'any URI':'xsd:anyURI'};
2729

2830

2931
//decimal, integer , decimalRange,long, bite,short,
@@ -32,7 +34,9 @@ export const PROPERTY_STRING_BY_RANGE={'string':'xsd:string',
3234
'base64Binary':'xsd:base64Binary',
3335
'html':'xdd:html',
3436
'url':'xdd:url',
35-
'email':'xdd:email'};
37+
'email':'xdd:email',
38+
'name':'xsd:Name',
39+
'any URI':'xsd:anyURI'};
3640

3741
export const PROPERTY_NUMBER_BY_RANGE={ 'integer':'xsd:integer',
3842
'decimal':'xsd:decimal',
@@ -110,7 +114,9 @@ export const STRING_TYPE_DATAPROVIDER={label: 'String Type',
110114
{label:'URL', value:'xdd:url' ,'description':'A valid url.'},
111115
{label:'HTML', value:'xdd:html', description:'A safe HTML string'},
112116
//{label:'RDFA', value:'rdfa'},
113-
{label:'Email', value:'xdd:email',description:'A valid email address.'}
117+
{label:'Email', value:'xdd:email',description:'A valid email address.'},
118+
{ label:'Name', value:'xsd:Name', descriptyion:'A valid name'},
119+
{ label:'Any URI', value:'xsd:anyURI', descriptyion:'A valid URI'}
114120
//{label:'ID', value:'id'}
115121
]}
116122

packages/tdb-react-components/src/treeGraphComponent/hook/modelCallServerHook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const modelCallServerHook = (woqlClient,branch,ref,dbId, pendoMsgAfterCre
8585
}
8686
}
8787
}
88-
88+
//newSchema is a json
8989
const saveGraphChanges= async (newSchema,commitMessage)=>{
9090
if(newSchema!==undefined){
9191
let ts = Date.now()

packages/tdb-react-components/src/treeGraphComponent/utils/elementsName.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ export const getRootIndexObj=(dbName)=>{
9797
export const PROPERTY_TYPE_BY_CLASS = { 'sys:JSON':PROPERTY_TYPE_NAME.JSON_PROPERTY,
9898
'xsd:boolean':PROPERTY_TYPE_NAME.BOOLEAN_PROPERTY,
9999
'xsd:string':PROPERTY_TYPE_NAME.STRING_PROPERTY,
100+
'xsd:Name':PROPERTY_TYPE_NAME.STRING_PROPERTY,
101+
'xsd:anyURI':PROPERTY_TYPE_NAME.STRING_PROPERTY,
100102
'xdd:json':PROPERTY_TYPE_NAME.STRING_PROPERTY,
101103
'xsd:base64Binary':PROPERTY_TYPE_NAME.STRING_PROPERTY,
102104
'xdd:html':PROPERTY_TYPE_NAME.STRING_PROPERTY,

0 commit comments

Comments
 (0)