@@ -6,21 +6,21 @@ import { GuiModel, Group, GuiElement, SubDataType,
66
77/**
88 * Process a json schema node. This can either be the root or an object inside it when called recursively from within each property.
9- * @param settingsKeyPath The corresponding object path in the settings object for the schema element. Used by clients of gui model.
9+ * @param dataKeyPath The corresponding object path in the schema instance (data) object for the schema element. Used by clients of gui model.
1010 * @param schemaPath The path of the element inside the schema itself. Used for error reporting.
1111 * @param accumulatedErrors A mutable(!) array where any errors during processing are appended.
1212 */
13- function processProperties ( obj : JsonSchema , settingsKeyPath : string , schemaPath : string , accumulatedErrors : TranslationError [ ] ) : GuiElement [ ] {
13+ function processProperties ( obj : JsonSchema , dataKeyPath : string , schemaPath : string , accumulatedErrors : TranslationError [ ] ) : GuiElement [ ] {
1414 let result : GuiElement [ ] = [ ] ;
1515
1616 let properties = obj . properties || { } ;
1717 let requiredKeys = new Set ( obj . required || [ ] ) ;
1818
1919 for ( let key in properties ) {
2020 if ( properties . hasOwnProperty ( key ) ) {
21- validate ( key , 'key' , 'string' , ( v ) => isString ( v ) , settingsKeyPath , accumulatedErrors ) ;
21+ validate ( key , 'key' , 'string' , ( v ) => isString ( v ) , dataKeyPath , accumulatedErrors ) ;
2222
23- let settingsPropertyKeyPath = ( settingsKeyPath === '' ) ? key : settingsKeyPath + '.' + key ;
23+ let settingsPropertyKeyPath = ( dataKeyPath === '' ) ? key : dataKeyPath + '.' + key ;
2424 let schemaPropertyPath = ( schemaPath === '' ) ? 'properties.' + key : schemaPath + '.' + 'properties.' + key ;
2525
2626 let requiredItem = requiredKeys . has ( key ) ;
@@ -145,7 +145,7 @@ function createNumberField(key: string, objectPath: string, label: string, toolt
145145 controlType : values && values . length > 0 ? 'dropdown' : 'input' ,
146146 label : label ,
147147 tooltip : tooltip ,
148- settingsObjectPath : objectPath ,
148+ dataObjectPath : objectPath ,
149149 defaultValue : defaultValue ,
150150 required : required ,
151151 type : 'number' ,
@@ -165,7 +165,7 @@ function createIntegerField(key: string, objectPath: string, label: string, tool
165165 controlType : values && values . length > 0 ? 'dropdown' : 'input' ,
166166 label : label ,
167167 tooltip : tooltip ,
168- settingsObjectPath : objectPath ,
168+ dataObjectPath : objectPath ,
169169 defaultValue : defaultValue ,
170170 values : values ? Object . freeze ( values ) : values ,
171171 required : required ,
@@ -185,7 +185,7 @@ function createBooleanField(key: string, objectPath: string, label: string, tool
185185 controlType : 'yesno' ,
186186 label : label ,
187187 tooltip : tooltip ,
188- settingsObjectPath : objectPath ,
188+ dataObjectPath : objectPath ,
189189 defaultValue : defaultValue ,
190190 values : values ? Object . freeze ( values ) : values ,
191191 required : required ,
@@ -205,7 +205,7 @@ function createStringField(key: string, objectPath: string, label: string, toolt
205205 controlType : values && values . length > 0 ? 'dropdown' : 'input' ,
206206 label : label ,
207207 tooltip : tooltip ,
208- settingsObjectPath : objectPath ,
208+ dataObjectPath : objectPath ,
209209 defaultValue : defaultValue ,
210210 values : values ? Object . freeze ( values ) : values ,
211211 required : required ,
@@ -222,7 +222,7 @@ function createGroupProperty(key: string, objectPath: string, label: string, too
222222 kind : 'group' ,
223223 name : key ,
224224 controlType : 'group' ,
225- settingsObjectPath : objectPath ,
225+ dataObjectPath : objectPath ,
226226 label : label ,
227227 tooltip : tooltip ,
228228 isRoot : false ,
@@ -301,7 +301,7 @@ export class GuiModelMapper {
301301 kind : 'group' ,
302302 name : '' ,
303303 controlType : 'group' ,
304- settingsObjectPath : '' ,
304+ dataObjectPath : '' ,
305305 label : '' ,
306306 tooltip : '' ,
307307 isRoot : true ,
0 commit comments