@pnkx-lib/ui 1.0.2 → 1.0.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/dist/types/fields.d.ts +28 -13
- package/dist/types/index.d.ts +32 -14
- package/dist/types/ui.d.ts +4 -1
- package/package.json +1 -1
package/dist/types/fields.d.ts
CHANGED
@@ -5,8 +5,9 @@ import { ControllerRenderProps } from 'react-hook-form';
|
|
5
5
|
import { Dayjs } from 'dayjs';
|
6
6
|
import { default as default_2 } from 'react';
|
7
7
|
import { IAllProps } from '@tinymce/tinymce-react';
|
8
|
-
import { InputProps } from 'antd';
|
8
|
+
import { InputProps as InputProps_2 } from 'antd';
|
9
9
|
import { JSX } from 'react/jsx-runtime';
|
10
|
+
import { JSX as JSX_2 } from 'react';
|
10
11
|
import { RadioGroupProps } from 'antd';
|
11
12
|
import { RangePickerProps } from 'antd/es/date-picker';
|
12
13
|
import * as React_2 from 'react';
|
@@ -50,19 +51,9 @@ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "
|
|
50
51
|
size?: TSize;
|
51
52
|
}
|
52
53
|
|
53
|
-
export declare const Input: (props:
|
54
|
+
export declare const Input: (props: InputProps) => JSX.Element;
|
54
55
|
|
55
|
-
export declare
|
56
|
-
render(): JSX.Element;
|
57
|
-
}
|
58
|
-
|
59
|
-
export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>> = {
|
60
|
-
control: Control<any, any>;
|
61
|
-
name: string;
|
62
|
-
component: TComponent;
|
63
|
-
} & Omit<ComponentPropsType<TComponent>, "control" | "name" | "formState" | "field" | "fieldState">;
|
64
|
-
|
65
|
-
export declare interface Props extends InputProps {
|
56
|
+
export declare interface InputProps extends InputProps_2 {
|
66
57
|
field?: ControllerRenderProps<any, any>;
|
67
58
|
formState?: UseFormStateReturn<any>;
|
68
59
|
label?: string;
|
@@ -77,6 +68,28 @@ export declare interface Props extends InputProps {
|
|
77
68
|
suffix?: string;
|
78
69
|
}
|
79
70
|
|
71
|
+
export declare class PnkxField<TComponent extends React_2.ComponentType<any>> extends React_2.PureComponent<PnkxFieldProps<TComponent>> {
|
72
|
+
render(): JSX.Element;
|
73
|
+
}
|
74
|
+
|
75
|
+
export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>> = {
|
76
|
+
control: Control<any, any>;
|
77
|
+
name: string;
|
78
|
+
component: TComponent;
|
79
|
+
} & Omit<ComponentPropsType<TComponent>, "control" | "name" | "formState" | "field" | "fieldState">;
|
80
|
+
|
81
|
+
export declare interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
|
82
|
+
onChange?: (event: any) => void;
|
83
|
+
afterOnChange?: (value: string | number) => void;
|
84
|
+
value?: string;
|
85
|
+
name?: string;
|
86
|
+
ref: any;
|
87
|
+
type?: TInputNumberType;
|
88
|
+
prefix?: string;
|
89
|
+
suffix?: string;
|
90
|
+
helperText?: () => JSX_2.Element | null;
|
91
|
+
}
|
92
|
+
|
80
93
|
export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
|
81
94
|
field?: ControllerRenderProps<any, any>;
|
82
95
|
formState?: UseFormStateReturn<any>;
|
@@ -127,6 +140,8 @@ export declare interface TextAreaProps extends TextAreaProps_2 {
|
|
127
140
|
required?: boolean;
|
128
141
|
}
|
129
142
|
|
143
|
+
declare type TInputNumberType = "number" | "money";
|
144
|
+
|
130
145
|
export declare const TinyMCE: {
|
131
146
|
(props: TinyProps): JSX.Element;
|
132
147
|
displayName: string;
|
package/dist/types/index.d.ts
CHANGED
@@ -12,8 +12,9 @@ import { DefaultOptionType } from 'antd/es/cascader';
|
|
12
12
|
import { DefaultValues } from 'react-hook-form';
|
13
13
|
import { FieldValues } from 'react-hook-form';
|
14
14
|
import { IAllProps } from '@tinymce/tinymce-react';
|
15
|
-
import { InputProps } from 'antd';
|
15
|
+
import { InputProps as InputProps_2 } from 'antd';
|
16
16
|
import { JSX } from 'react/jsx-runtime';
|
17
|
+
import { JSX as JSX_2 } from 'react';
|
17
18
|
import { ModalProps } from 'antd';
|
18
19
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
19
20
|
import { PopoverProps as PopoverProps_2 } from 'antd';
|
@@ -22,7 +23,6 @@ import { RangePickerProps } from 'antd/es/date-picker';
|
|
22
23
|
import * as React_2 from 'react';
|
23
24
|
import { ReactDatePickerProps } from 'react-datepicker';
|
24
25
|
import { ReactNode } from 'react';
|
25
|
-
import { RowCommon } from '../../../../../../../../../../src/interface/common';
|
26
26
|
import { SelectProps } from 'antd';
|
27
27
|
import { SkeletonProps as SkeletonProps_2 } from 'antd';
|
28
28
|
import { SwitchProps } from 'antd';
|
@@ -115,7 +115,22 @@ export declare interface ErrorMessageProps {
|
|
115
115
|
isSubmitted?: boolean;
|
116
116
|
}
|
117
117
|
|
118
|
-
export declare const Input: (props:
|
118
|
+
export declare const Input: (props: InputProps) => JSX.Element;
|
119
|
+
|
120
|
+
export declare interface InputProps extends InputProps_2 {
|
121
|
+
field?: ControllerRenderProps<any, any>;
|
122
|
+
formState?: UseFormStateReturn<any>;
|
123
|
+
label?: string;
|
124
|
+
customStyleInput?: string;
|
125
|
+
type?: CustomInputTypeAttribute;
|
126
|
+
afterOnChange?: (value: number | string | null) => void;
|
127
|
+
iconStartInput?: default_2.ReactNode;
|
128
|
+
iconEndInput?: default_2.ReactNode;
|
129
|
+
allowNegative?: boolean;
|
130
|
+
decimalScale?: number;
|
131
|
+
prefix?: string;
|
132
|
+
suffix?: string;
|
133
|
+
}
|
119
134
|
|
120
135
|
export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
|
121
136
|
|
@@ -146,19 +161,16 @@ export declare type PopoverProps = PopoverProps_2;
|
|
146
161
|
|
147
162
|
export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
|
148
163
|
|
149
|
-
export declare interface
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
iconStartInput?: default_2.ReactNode;
|
157
|
-
iconEndInput?: default_2.ReactNode;
|
158
|
-
allowNegative?: boolean;
|
159
|
-
decimalScale?: number;
|
164
|
+
export declare interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
|
165
|
+
onChange?: (event: any) => void;
|
166
|
+
afterOnChange?: (value: string | number) => void;
|
167
|
+
value?: string;
|
168
|
+
name?: string;
|
169
|
+
ref: any;
|
170
|
+
type?: TInputNumberType;
|
160
171
|
prefix?: string;
|
161
172
|
suffix?: string;
|
173
|
+
helperText?: () => JSX_2.Element | null;
|
162
174
|
}
|
163
175
|
|
164
176
|
export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
|
@@ -182,6 +194,10 @@ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "v
|
|
182
194
|
customStyleDatePicker?: string;
|
183
195
|
}
|
184
196
|
|
197
|
+
declare interface RowCommon {
|
198
|
+
[x: string]: any;
|
199
|
+
}
|
200
|
+
|
185
201
|
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
|
186
202
|
|
187
203
|
export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
@@ -270,6 +286,8 @@ export declare interface TextAreaProps extends TextAreaProps_2 {
|
|
270
286
|
required?: boolean;
|
271
287
|
}
|
272
288
|
|
289
|
+
declare type TInputNumberType = "number" | "money";
|
290
|
+
|
273
291
|
export declare const TinyMCE: {
|
274
292
|
(props: TinyProps): JSX.Element;
|
275
293
|
displayName: string;
|
package/dist/types/ui.d.ts
CHANGED
@@ -12,7 +12,6 @@ import { ModalProps } from 'antd';
|
|
12
12
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
13
13
|
import { PopoverProps as PopoverProps_2 } from 'antd';
|
14
14
|
import { ReactNode } from 'react';
|
15
|
-
import { RowCommon } from '../../../../../../../../../../src/interface/common';
|
16
15
|
import { SkeletonProps as SkeletonProps_2 } from 'antd';
|
17
16
|
import { TableProps } from 'antd/lib/table';
|
18
17
|
import { TabsProps as TabsProps_2 } from 'antd';
|
@@ -87,6 +86,10 @@ export declare type PopoverProps = PopoverProps_2;
|
|
87
86
|
|
88
87
|
export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
|
89
88
|
|
89
|
+
declare interface RowCommon {
|
90
|
+
[x: string]: any;
|
91
|
+
}
|
92
|
+
|
90
93
|
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
|
91
94
|
|
92
95
|
export declare interface SearchFiltersFormProps<T extends FieldValues> {
|