@@ -6,38 +6,28 @@ import { getPropertyData } from './jschema_initial_data';
66 * @abstract
77 */
88export class BaseFormElement {
9- manager ;
10- /**
11- * Unique identifier associated with the HTML element
12- */
13- id ;
14- key ;
15- type ;
16- title ;
17- description ;
18- required ;
19- /**
20- * Tells if the property can be removed from an object: true for custom properties
21- * of schema objects having additionalProperties set to true.
22- */
23- removable ;
24- /**
25- * @type {import("../types/jschema").JSONSchemaProperty }
26- */
27- property ;
28-
299 /**
3010 * @param {import("../types/form").BaseFormElementFields } fields
3111 */
3212 constructor ( fields ) {
3313 this . manager = fields . manager ;
14+ /**
15+ * Unique identifier associated with the HTML element
16+ */
3417 this . id = fields . id ;
3518 this . key = fields . key ;
3619 this . type = fields . type ;
3720 this . title = fields . title ;
3821 this . required = fields . required ;
3922 this . description = fields . description ;
23+ /**
24+ * Tells if the property can be removed from an object: true for custom properties
25+ * of schema objects having additionalProperties set to true.
26+ */
4027 this . removable = fields . removable ;
28+ /**
29+ * @type {import("../types/jschema").JSONSchemaProperty }
30+ */
4131 this . property = fields . property ;
4232 }
4333
@@ -52,8 +42,6 @@ export class BaseFormElement {
5242 * @abstract
5343 */
5444export class ValueFormElement extends BaseFormElement {
55- value ;
56-
5745 /**
5846 * @param {import("../types/form").ValueFormElementFields<T> } fields
5947 */
@@ -82,8 +70,6 @@ export class BooleanFormElement extends ValueFormElement {
8270}
8371
8472export class EnumFormElement extends ValueFormElement {
85- options ;
86-
8773 /**
8874 * @param {import("../types/form").EnumFormElementFields } fields
8975 */
@@ -94,29 +80,26 @@ export class EnumFormElement extends ValueFormElement {
9480}
9581
9682export class NumberFormElement extends ValueFormElement {
97- badInput = false ;
9883 /**
9984 * @param {import("../types/form").NumberFormElementFields } fields
10085 */
10186 constructor ( fields ) {
10287 super ( fields ) ;
10388 this . min = fields . min ;
10489 this . max = fields . max ;
90+ this . badInput = false ;
10591 }
10692}
10793
10894export class ObjectFormElement extends BaseFormElement {
109- children ;
110- /**
111- * @type {import("../types/jschema").JSONSchemaProperty | false }
112- */
113- additionalProperties = false ;
114-
11595 /**
11696 * @param {import("../types/form").ObjectFormElementFields } fields
11797 */
11898 constructor ( fields ) {
11999 super ( fields ) ;
100+ /**
101+ * @type {import("../types/jschema").JSONSchemaProperty | false }
102+ */
120103 this . additionalProperties = fields . additionalProperties ;
121104 this . children = fields . children ;
122105 this . collapsed = ! fields . required ;
@@ -201,11 +184,6 @@ export class ObjectFormElement extends BaseFormElement {
201184}
202185
203186export class ArrayFormElement extends BaseFormElement {
204- children ;
205- items ;
206- minItems ;
207- maxItems ;
208-
209187 /**
210188 * @param {import("../types/form").ArrayFormElementFields } fields
211189 */
@@ -283,10 +261,6 @@ export class ArrayFormElement extends BaseFormElement {
283261}
284262
285263export class TupleFormElement extends BaseFormElement {
286- children ;
287- items ;
288- size ;
289-
290264 /**
291265 * @param {import("../types/form").TupleFormElementFields } fields
292266 */
0 commit comments