@thx/controls 15.0.0 → 16.0.0-alpha.0
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/date/LocalDatePicker/MaskedDateInput.d.ts +2 -2
- package/dist/date/LocalTimePicker/MaskedTimeInput.d.ts +2 -2
- package/dist/form/TForm/useTForm.d.ts +6 -6
- package/dist/index.js +327 -349
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/inputs/Scriptel/ScriptelContext.d.ts +2 -2
- package/dist/inputs/Scriptel/withScriptel.d.ts +1 -0
- package/dist/inputs/TableInput/DropdownCell.d.ts +1 -0
- package/dist/inputs/TableInput/HoverCell.d.ts +1 -0
- package/dist/inputs/TableInput/MoneyCell.d.ts +1 -0
- package/dist/inputs/TableInput/MoneyEditCell.d.ts +1 -0
- package/dist/inputs/TableInput/MoneySumFooter.d.ts +1 -0
- package/dist/inputs/TableInput/StringEditCell.d.ts +1 -0
- package/dist/step/stepContext.d.ts +2 -2
- package/package.json +6 -6
- package/dist/date/DatePicker/datepicker.stories.d.ts +0 -7
- package/dist/date/LocalDatePicker/localdatepicker.stories.d.ts +0 -8
- package/dist/date/LocalDatePicker/maskeddateinput.stories.d.ts +0 -5
- package/dist/date/LocalMonthSelect/localmonthselect.stories.d.ts +0 -6
- package/dist/date/LocalTimePicker/localtimepicker.stories.d.ts +0 -7
- package/dist/date/LocalTimePicker/maskedtimeinput.stories.d.ts +0 -7
- package/dist/date/MonthDayPicker/monthdaypicker.stories.d.ts +0 -7
- package/dist/date/MonthYearPicker/monthyearpicker.stories.d.ts +0 -8
- package/dist/date/YearSelect/yearselect.stories.d.ts +0 -7
- package/dist/form/TForm/addeditforms.stories.d.ts +0 -30
- package/dist/form/TForm/tform.stories.d.ts +0 -7
- package/dist/inputs/CreditCardInput/creditcardinput.stories.d.ts +0 -5
- package/dist/inputs/MaskedInput/maskedinput.stories.d.ts +0 -6
- package/dist/inputs/PhoneInput/phoneinput.stories.d.ts +0 -5
- package/dist/inputs/RadioGroup/radiogroup.stories.d.ts +0 -6
- package/dist/inputs/ScriptelInput/scriptelnput.stories.d.ts +0 -5
- package/dist/inputs/SinInput/sininput.stories.d.ts +0 -5
- package/dist/inputs/TableInput/main.story.d.ts +0 -7
- package/dist/inputs/TableInput/tableinput.stories.d.ts +0 -6
- package/dist/inputs/TableInput/withHover.story.d.ts +0 -7
- package/dist/money/MoneyCurrencyInput/moneycurrencyinput.stories.d.ts +0 -5
- package/dist/money/MoneyInput/moneyinput.stories.d.ts +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { MaskedInputProps } from '../../inputs/MaskedInput';
|
|
3
3
|
export interface MaskedDateInputValue {
|
|
4
4
|
target: {
|
|
@@ -9,4 +9,4 @@ export interface MaskedDateInputProps {
|
|
|
9
9
|
name?: string;
|
|
10
10
|
onChange?: (value: MaskedDateInputValue) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const MaskedDateInput:
|
|
12
|
+
export declare const MaskedDateInput: import("react").ForwardRefExoticComponent<Pick<MaskedDateInputProps & Omit<MaskedInputProps, "onChange">, string | number> & import("react").RefAttributes<unknown>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { MaskedInputProps } from '../../inputs/MaskedInput';
|
|
3
3
|
export interface MaskedTimeInputValue {
|
|
4
4
|
target: {
|
|
@@ -8,4 +8,4 @@ export interface MaskedTimeInputValue {
|
|
|
8
8
|
export interface MaskedTimeInputProps {
|
|
9
9
|
onChange?: (value: MaskedTimeInputValue) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const MaskedTimeInput:
|
|
11
|
+
export declare const MaskedTimeInput: import("react").ForwardRefExoticComponent<Pick<MaskedTimeInputProps & Omit<MaskedInputProps, "onChange">, string | number> & import("react").RefAttributes<unknown>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormikValues, FormikErrors, FormikTouched } from 'formik';
|
|
2
|
-
import
|
|
2
|
+
import { FormEvent } from 'react';
|
|
3
3
|
import type { TFormConfig } from './types';
|
|
4
4
|
export declare function useTForm<Values extends FormikValues = FormikValues, InitialValues = any>(config: TFormConfig<Values, InitialValues>): {
|
|
5
5
|
hasErrors: boolean;
|
|
@@ -11,18 +11,18 @@ export declare function useTForm<Values extends FormikValues = FormikValues, Ini
|
|
|
11
11
|
formError: boolean;
|
|
12
12
|
renderWarnings: () => JSX.Element | null;
|
|
13
13
|
fieldError: (fieldName: keyof Values | string | number) => boolean;
|
|
14
|
-
handleSubmit: (e?:
|
|
14
|
+
handleSubmit: (e?: FormEvent<HTMLFormElement> | undefined) => void;
|
|
15
15
|
initialValues: Values;
|
|
16
16
|
initialErrors: FormikErrors<unknown>;
|
|
17
17
|
initialTouched: FormikTouched<unknown>;
|
|
18
18
|
initialStatus: any;
|
|
19
19
|
handleBlur: {
|
|
20
|
-
(e:
|
|
20
|
+
(e: import("react").FocusEvent<any, Element>): void;
|
|
21
21
|
<T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
|
|
22
22
|
};
|
|
23
23
|
handleChange: {
|
|
24
|
-
(e:
|
|
25
|
-
<T_1 = string |
|
|
24
|
+
(e: import("react").ChangeEvent<any>): void;
|
|
25
|
+
<T_1 = string | import("react").ChangeEvent<any>>(field: T_1): T_1 extends import("react").ChangeEvent<any> ? void : (e: string | import("react").ChangeEvent<any>) => void;
|
|
26
26
|
};
|
|
27
27
|
handleReset: (e: any) => void;
|
|
28
28
|
resetForm: (nextState?: Partial<import("formik").FormikState<Values>> | undefined) => void;
|
|
@@ -34,7 +34,7 @@ export declare function useTForm<Values extends FormikValues = FormikValues, Ini
|
|
|
34
34
|
setStatus: (status: any) => void;
|
|
35
35
|
setSubmitting: (isSubmitting: boolean) => void;
|
|
36
36
|
setTouched: (touched: FormikTouched<Values>, shouldValidate?: boolean | undefined) => Promise<void> | Promise<FormikErrors<Values>>;
|
|
37
|
-
setValues: (values:
|
|
37
|
+
setValues: (values: import("react").SetStateAction<Values>, shouldValidate?: boolean | undefined) => Promise<void> | Promise<FormikErrors<Values>>;
|
|
38
38
|
submitForm: () => Promise<any>;
|
|
39
39
|
validateForm: (values?: Values | undefined) => Promise<FormikErrors<Values>>;
|
|
40
40
|
validateField: (name: string) => Promise<void> | Promise<string | undefined>;
|