@react-typed-forms/schemas 11.5.3 → 11.5.4
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/lib/components/ControlInput.d.ts +5 -1
- package/lib/index.js +33 -3
- package/lib/index.js.map +1 -1
- package/lib/schemaBuilder.d.ts +5 -1
- package/lib/types.d.ts +1 -0
- package/package.json +1 -1
package/lib/schemaBuilder.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CompoundField, FieldOption, FieldType, SchemaField, SchemaMap } from "./types";
|
|
2
2
|
type AllowedSchema<T> = T extends string ? SchemaField & {
|
|
3
|
-
type: FieldType.String | FieldType.Date | FieldType.DateTime;
|
|
3
|
+
type: FieldType.String | FieldType.Date | FieldType.DateTime | FieldType.Time;
|
|
4
4
|
} : T extends number ? SchemaField & {
|
|
5
5
|
type: FieldType.Int | FieldType.Double;
|
|
6
6
|
} : T extends boolean ? SchemaField & {
|
|
@@ -54,6 +54,10 @@ export declare function dateField<S extends Partial<SchemaField>>(displayName: s
|
|
|
54
54
|
type: FieldType.Date;
|
|
55
55
|
displayName: string;
|
|
56
56
|
} & S;
|
|
57
|
+
export declare function timeField<S extends Partial<SchemaField>>(displayName: string, options?: S): (name: string) => SchemaField & {
|
|
58
|
+
type: FieldType.Time;
|
|
59
|
+
displayName: string;
|
|
60
|
+
} & S;
|
|
57
61
|
export declare function dateTimeField<S extends Partial<SchemaField>>(displayName: string, options?: S): (name: string) => SchemaField & {
|
|
58
62
|
type: FieldType.DateTime;
|
|
59
63
|
displayName: string;
|
package/lib/types.d.ts
CHANGED