11export default class SchemaManager {
2- keySeparator = '###' ;
3- propertiesMap = new Map ( ) ;
4- hasUnsavedChanges = false ;
5- /** @type {(hasChanges: boolean) => void } */
6- onPropertyChanges = ( ) => { } ;
7- /** @type {import('./jschema-types').JSONSchemaObjectProperty } */
8- schema ;
9-
102 /**
113 * @param {import('./jschema-types').JSONSchema|undefined } schema
124 * @param {object|undefined } schemaData
135 */
146 constructor ( schema , schemaData ) {
157 this . schema = this . loadSchema ( schema ) ;
168 this . data = this . loadSchemaData ( schemaData ) ;
9+ this . keySeparator = '###' ;
10+ this . propertiesMap = new Map ( ) ;
11+ this . hasUnsavedChanges = false ;
12+ /** @type {(hasChanges: boolean) => void } */
13+ this . onPropertyChanges = ( ) => { } ;
1714 }
1815
1916 /**
@@ -167,16 +164,6 @@ export default class SchemaManager {
167164}
168165
169166export class SchemaProperty {
170- manager ;
171- /** @type {import('./jschema-types').JSONSchemaObjectProperty } */
172- globalSchema ;
173- keySeparator = '###' ;
174- nestedProperties = [ ] ;
175- hasCustomKeyValues = false ;
176- /** @type {string[]|undefined } */
177- requiredProperties = undefined ;
178- required = false ;
179-
180167 /**
181168 * @param {import('./jschema-types').JSONSchemaProperty & { key: string } } propertySchema
182169 * @param {SchemaManager } manager
@@ -186,6 +173,12 @@ export class SchemaProperty {
186173 this . manager = manager ;
187174 this . globalSchema = this . manager . schema ;
188175 this . referenceSchema = propertySchema ;
176+ this . keySeparator = '###' ;
177+ this . nestedProperties = [ ] ;
178+ this . hasCustomKeyValues = false ;
179+ /** @type {string[]|undefined } */
180+ this . requiredProperties = undefined ;
181+ this . required = false ;
189182
190183 // Default properties
191184 this . type = propertySchema . type ;
0 commit comments