@@ -33,6 +33,18 @@ export interface DefaultProperty {
3333}
3434
3535export class DefaultProperties {
36+
37+ public static unsupported : DefaultProperty = {
38+ icon : 'warning_amber' ,
39+ label : 'Unsupported property type' ,
40+ description : 'This property type is not supported in the ontology editor' ,
41+ subPropOf : undefined ,
42+ objectType : undefined ,
43+ guiEle : undefined ,
44+ group : 'Warning'
45+ } ;
46+
47+
3648 public static data : PropertyCategory [ ] = [
3749 {
3850 group : 'Text' ,
@@ -43,7 +55,7 @@ export class DefaultProperties {
4355 description : 'Short text such as title or name' ,
4456 subPropOf : Constants . HasValue ,
4557 objectType : Constants . TextValue ,
46- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'SimpleText' , // better element would be: 'Input',
58+ guiEle : Constants . GuiSimpleText , // better element would be: 'Input',
4759 group : 'Text' // redundant information, but otherwise we don't get the main group name after selecting type
4860 } ,
4961 {
@@ -52,7 +64,7 @@ export class DefaultProperties {
5264 description : 'Long text such as description; could have line breaks' ,
5365 subPropOf : Constants . HasValue ,
5466 objectType : Constants . TextValue ,
55- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Textarea' ,
67+ guiEle : Constants . GuiTextarea ,
5668 group : 'Text'
5769 } ,
5870 {
@@ -61,7 +73,7 @@ export class DefaultProperties {
6173 description : 'A rich text editor with formatting options' ,
6274 subPropOf : Constants . HasValue ,
6375 objectType : Constants . TextValue ,
64- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Richtext' ,
76+ guiEle : Constants . GuiRichText ,
6577 group : 'Text'
6678 }
6779 ]
@@ -75,7 +87,7 @@ export class DefaultProperties {
7587 description : 'Dropdown menu with values from predefined list' ,
7688 subPropOf : Constants . HasValue ,
7789 objectType : Constants . ListValue ,
78- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'List' , // better element would be: 'Pulldown' or 'Select'
90+ guiEle : Constants . GuiPulldown , // better element would be: 'Pulldown' or 'Select'
7991 group : 'List'
8092 }
8193 ]
@@ -89,7 +101,7 @@ export class DefaultProperties {
89101 description : 'Yes or no, 1 or 0, true or false' ,
90102 subPropOf : Constants . HasValue ,
91103 objectType : Constants . BooleanValue ,
92- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Checkbox' , // should be 'Toggle' but it's not supported in DSP-Tangoh,
104+ guiEle : Constants . GuiCheckbox , // should be 'Toggle' but it's not supported in DSP-Tangoh,
93105 group : 'Boolean'
94106 }
95107 ]
@@ -103,25 +115,16 @@ export class DefaultProperties {
103115 description : 'A date field with day, month and year' ,
104116 subPropOf : Constants . HasValue ,
105117 objectType : Constants . DateValue ,
106- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Date' ,
118+ guiEle : Constants . GuiDatePicker ,
107119 group : 'Date / Time'
108120 } ,
109- // {
110- // icon: 'date_range',
111- // label: 'Period',
112- // description: 'A period of time between two dates',
113- // subPropOf: Constants.HasValue,
114- // objectType: Constants.DateValue,
115- // guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Date',
116- // group: 'Date / Time'
117- // },
118121 {
119122 icon : 'access_time' ,
120123 label : 'Timestamp' ,
121124 description : 'A single timestamp on a timeline' ,
122125 subPropOf : Constants . HasValue ,
123126 objectType : Constants . TimeValue ,
124- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'TimeStamp' ,
127+ guiEle : Constants . GuiTimeStamp ,
125128 group : 'Date / Time'
126129 } ,
127130 {
@@ -130,7 +133,7 @@ export class DefaultProperties {
130133 description : 'A time sequence with start and end point on a timeline' ,
131134 subPropOf : Constants . HasValue ,
132135 objectType : Constants . IntervalValue ,
133- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Interval' ,
136+ guiEle : Constants . GuiInterval ,
134137 group : 'Date / Time'
135138 }
136139 ]
@@ -144,7 +147,7 @@ export class DefaultProperties {
144147 description : 'Integer value' ,
145148 subPropOf : Constants . HasValue ,
146149 objectType : Constants . IntValue ,
147- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Spinbox' , // 'Number',
150+ guiEle : Constants . GuiSpinbox , // 'Number',
148151 group : 'Number'
149152 } ,
150153 {
@@ -153,16 +156,16 @@ export class DefaultProperties {
153156 description : 'Decimal value' ,
154157 subPropOf : Constants . HasValue ,
155158 objectType : Constants . DecimalValue ,
156- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Spinbox' , // 'Number',
159+ guiEle : Constants . GuiSpinbox , // 'Number',
157160 group : 'Number'
158161 } ,
159162 {
160163 icon : 'filter_3' ,
161164 label : 'Page number' ,
162165 description : 'The page number is needed for page classes in case of part of properties' ,
163- subPropOf : Constants . KnoraApiV2 + Constants . HashDelimiter + 'seqnum' ,
166+ subPropOf : Constants . SeqNum ,
164167 objectType : Constants . IntValue ,
165- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Spinbox' , // 'Number',
168+ guiEle : Constants . GuiSpinbox , // 'Number',
166169 group : 'Number'
167170 }
168171 ]
@@ -176,26 +179,26 @@ export class DefaultProperties {
176179 description : 'Refers to a resource class' ,
177180 subPropOf : Constants . HasLinkTo ,
178181 objectType : Constants . LinkValue ,
179- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Searchbox' , // 'Autocomplete',
182+ guiEle : Constants . GuiSearchbox , // 'Autocomplete',
180183 group : 'Link / Relation'
181184 } ,
182185 {
183186 icon : 'extension' ,
184187 label : 'Part of class' ,
185188 description : 'Is part of a resource class' ,
186- subPropOf : Constants . KnoraApiV2 + Constants . HashDelimiter + 'isPartOf' ,
189+ subPropOf : Constants . IsPartOf ,
187190 objectType : Constants . LinkValue ,
188- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Searchbox' , // 'Autocomplete',
189- group : 'Relation'
191+ guiEle : Constants . GuiSearchbox , // 'Autocomplete',
192+ group : 'Link / Relation'
190193 } ,
191194 {
192195 icon : 'language' ,
193196 label : 'External URL' ,
194197 description : 'Link to an external website' ,
195198 subPropOf : Constants . HasValue ,
196199 objectType : Constants . UriValue ,
197- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'SimpleText' ,
198- group : 'Link'
200+ guiEle : Constants . GuiSimpleText ,
201+ group : 'Link / Relation '
199202 }
200203 ]
201204 } ,
@@ -208,7 +211,7 @@ export class DefaultProperties {
208211 description : 'Geographical location' ,
209212 subPropOf : Constants . HasValue ,
210213 objectType : Constants . GeonameValue ,
211- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Geonames' ,
214+ guiEle : Constants . GuiGeonames ,
212215 group : 'Location'
213216 }
214217 ]
@@ -222,7 +225,7 @@ export class DefaultProperties {
222225 description : 'A simple color value' ,
223226 subPropOf : Constants . HasValue ,
224227 objectType : Constants . ColorValue ,
225- guiEle : Constants . SalsahGui + Constants . HashDelimiter + 'Colorpicker' ,
228+ guiEle : Constants . GuiColorPicker ,
226229 group : 'Shape'
227230 }
228231 ]
0 commit comments