@react-typed-forms/schemas 11.5.2 → 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.
@@ -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 & {
@@ -50,6 +50,18 @@ export declare function intField<S extends Partial<SchemaField>>(displayName: st
50
50
  type: FieldType.Int;
51
51
  displayName: string;
52
52
  } & S;
53
+ export declare function dateField<S extends Partial<SchemaField>>(displayName: string, options?: S): (name: string) => SchemaField & {
54
+ type: FieldType.Date;
55
+ displayName: string;
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;
61
+ export declare function dateTimeField<S extends Partial<SchemaField>>(displayName: string, options?: S): (name: string) => SchemaField & {
62
+ type: FieldType.DateTime;
63
+ displayName: string;
64
+ } & S;
53
65
  export declare function boolField<S extends Partial<SchemaField>>(displayName: string, options?: S): (name: string) => SchemaField & {
54
66
  type: FieldType.Bool;
55
67
  displayName: string;
package/lib/types.d.ts CHANGED
@@ -22,6 +22,7 @@ export declare enum FieldType {
22
22
  Int = "Int",
23
23
  Date = "Date",
24
24
  DateTime = "DateTime",
25
+ Time = "Time",
25
26
  Double = "Double",
26
27
  EntityRef = "EntityRef",
27
28
  Compound = "Compound",
@@ -198,6 +199,7 @@ export interface HtmlEditorRenderOptions extends RenderOptions {
198
199
  export interface DateTimeRenderOptions extends RenderOptions {
199
200
  type: DataRenderType.DateTime;
200
201
  format?: string | null;
202
+ forceMidnight?: boolean;
201
203
  }
202
204
  export interface IconListRenderOptions extends RenderOptions {
203
205
  type: DataRenderType.IconList;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-typed-forms/schemas",
3
- "version": "11.5.2",
3
+ "version": "11.5.4",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",