envoc-form 6.0.1-0 → 6.0.1-1

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/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { ChangeEventHandler } from 'react';
2
2
  import { ComponentProps } from 'react';
3
3
  import { CSSProperties } from 'react';
4
4
  import { DatePickerProps } from 'react-date-picker';
5
+ import { DateTimePickerProps } from 'react-datetime-picker';
5
6
  import { ElementType } from 'react';
6
7
  import { FieldMetaProps } from 'formik';
7
8
  import { FormikHelpers } from 'formik';
@@ -141,6 +142,20 @@ export declare interface DatePickerGroupProps<T> extends InjectedFieldProps<T |
141
142
  export declare interface DatePickerHelper<T> extends Omit<DatePickerGroupProps<T>, 'convert'> {
142
143
  }
143
144
 
145
+ /**
146
+ * Field for inputting date and time. Uses `<Group/>` and `<DateTimePicker/>`.
147
+ *
148
+ * Uses [react-datetime-picker](https://www.npmjs.com/package/react-datetime-picker)
149
+ */
150
+ export declare function DateTimePickerGroup<T>({ input, meta, label, helpText, className, required, disabled, convert, ...rest }: DateTimePickerGroupProps<T>): JSX_2.Element;
151
+
152
+ export declare interface DateTimePickerGroupProps<T> extends InjectedFieldProps<T | undefined | null>, Omit<DateTimePickerProps, keyof InjectedFieldProps<T> | 'name' | 'value' | 'className'>, Omit<GroupProps, keyof InjectedFieldProps<T> | 'children'> {
153
+ convert: (date: Date) => T;
154
+ }
155
+
156
+ declare interface DateTimePickerHelper<T> extends Omit<DateTimePickerGroupProps<T>, 'convert'> {
157
+ }
158
+
144
159
  export declare const Field: typeof Field_2;
145
160
 
146
161
  /**
@@ -294,7 +309,7 @@ export declare interface InjectedFieldProps<TValue> {
294
309
  /** Generic controlled `<input/>` wrapped by a `<Group/>` */
295
310
  export declare const InputGroup: typeof InputGroup_2;
296
311
 
297
- declare function InputGroup_2<TValue>({ input, meta, label, helpText, className, required, disabled, onChange, value, icon, ...rest }: InputGroupProps<TValue>, ref: LegacyRef<HTMLInputElement>): JSX_2.Element;
312
+ declare function InputGroup_2<TValue>({ input, meta, label, helpText, className, required, disabled, onChange, value, icon, type, ...rest }: InputGroupProps<TValue>, ref: LegacyRef<HTMLInputElement>): JSX_2.Element;
298
313
 
299
314
  export declare interface InputGroupProps<TValue> extends InjectedFieldProps<TValue>, Omit<React_2.HTMLProps<HTMLInputElement>, keyof InjectedFieldProps<any> | 'children' | 'className' | 'label' | 'value'>, Omit<GroupProps, keyof InjectedFieldProps<any> | 'children'> {
300
315
  onChange: ChangeEventHandler<HTMLInputElement>;
@@ -514,6 +529,16 @@ export declare function StringDatePickerGroup(props: StringDatePickerGroupProps)
514
529
  export declare interface StringDatePickerGroupProps extends DatePickerHelper<string | undefined | null> {
515
530
  }
516
531
 
532
+ /**
533
+ * Date Time picker input that consumes JS Date object and outputs as a date time offset string in ISO format `YYYY-MM-DDTHH:mm:ss.sss±hh:mm`.
534
+ *
535
+ * Default display to the user is in `MM/DD/YYYY HH:mm:ss AM/PM` format.
536
+ */
537
+ export declare function StringDateTimePickerGroup(props: StringDateTimePickerGroupProps): JSX_2.Element;
538
+
539
+ export declare interface StringDateTimePickerGroupProps extends DateTimePickerHelper<string | undefined | null> {
540
+ }
541
+
517
542
  /** Standard string input group. */
518
543
  export declare const StringInputGroup: React_2.ComponentType<StringInputGroupProps>;
519
544