@kokimoki/app 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fields.d.ts +8 -0
- package/dist/fields.js +13 -0
- package/package.json +1 -1
package/dist/fields.d.ts
CHANGED
|
@@ -54,6 +54,14 @@ export declare class IntegerField extends Field<number> {
|
|
|
54
54
|
default: number;
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
+
export declare class FloatField extends Field<number> {
|
|
58
|
+
value: number;
|
|
59
|
+
constructor(value: number, options?: FieldOptions);
|
|
60
|
+
get schema(): {
|
|
61
|
+
type: string;
|
|
62
|
+
default: number;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
57
65
|
export declare class FormGroup<T extends Record<string, Field<any>>, O extends Record<string, Field<any>>> extends Field<{
|
|
58
66
|
[key in keyof T]: T[key]["value"];
|
|
59
67
|
} & Partial<{
|
package/dist/fields.js
CHANGED
|
@@ -83,6 +83,19 @@ export class IntegerField extends Field {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
export class FloatField extends Field {
|
|
87
|
+
value;
|
|
88
|
+
constructor(value, options = defaultFieldOptions) {
|
|
89
|
+
super(options);
|
|
90
|
+
this.value = value;
|
|
91
|
+
}
|
|
92
|
+
get schema() {
|
|
93
|
+
return {
|
|
94
|
+
type: "number",
|
|
95
|
+
default: this.value,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
86
99
|
export class FormGroup extends Field {
|
|
87
100
|
requiredFields;
|
|
88
101
|
optionalFields;
|