@pnkx-lib/ui 1.5.6 → 1.5.7
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/es/chunks/{useMessage-CI2AYP0q.js → useMessage-D_-VT5B4.js} +4 -4
- package/es/chunks/useMessage-D_-VT5B4.js.map +1 -0
- package/es/hooks/index.js +1 -1
- package/es/index.js +1 -1
- package/package.json +2 -2
- package/types/hooks.d.ts +37 -0
- package/types/index.d.ts +185 -7
- package/types/ui.d.ts +150 -7
- package/es/chunks/useMessage-CI2AYP0q.js.map +0 -1
@@ -1,11 +1,11 @@
|
|
1
|
-
import
|
1
|
+
import { useState, useCallback } from 'react';
|
2
2
|
import { c as cloneDeep } from './cloneDeep-BLYi2V0G.js';
|
3
3
|
import { P as PAGE_INDEX, S as START_PAGE, a as SORT_DESC, b as SORT_BY } from './common-b3FKGF0Y.js';
|
4
4
|
import { message } from 'antd';
|
5
5
|
|
6
6
|
const useFiltersHandler = (initialFilters) => {
|
7
|
-
const [filters, setFilters] =
|
8
|
-
const [rowsSelected, setRowsSelected] =
|
7
|
+
const [filters, setFilters] = useState(initialFilters || {});
|
8
|
+
const [rowsSelected, setRowsSelected] = useState([]);
|
9
9
|
const goToPage = useCallback((PageIndex) => {
|
10
10
|
setFilters((prev) => {
|
11
11
|
const nextFilters = cloneDeep(prev);
|
@@ -92,4 +92,4 @@ const useMessage = (defaultProps) => {
|
|
92
92
|
};
|
93
93
|
|
94
94
|
export { useMessage as a, useFiltersHandler as u };
|
95
|
-
//# sourceMappingURL=useMessage-
|
95
|
+
//# sourceMappingURL=useMessage-D_-VT5B4.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useMessage-D_-VT5B4.js","sources":["../../src/components/hooks/useFiltersHandler.ts","../../src/components/hooks/useMessage.ts"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport {\n PAGE_INDEX,\n SORT_BY,\n SORT_DESC,\n START_PAGE,\n} from \"@src/constants/common\";\n\nexport interface PaginationFilters {\n PageSize: number;\n PageIndex: number;\n}\n\nexport type InitialFiltersSearch<T> = T & PaginationFilters;\n\nexport const useFiltersHandler = <T>(\n initialFilters: InitialFiltersSearch<T>\n) => {\n const [filters, setFilters] = useState(initialFilters || {});\n\n const [rowsSelected, setRowsSelected] = useState<React.Key[]>([]);\n\n const goToPage = useCallback((PageIndex: number) => {\n setFilters((prev) => {\n const nextFilters = cloneDeep(prev);\n if (nextFilters) {\n nextFilters[PAGE_INDEX] = PageIndex;\n }\n\n return nextFilters;\n });\n }, []);\n\n const handleChangePage = useCallback((nextPage: number) => {\n setFilters((prev) => {\n const nextFilters = cloneDeep(prev);\n if (nextFilters) {\n nextFilters[PAGE_INDEX] = nextPage;\n }\n return nextFilters;\n });\n setRowsSelected([]);\n }, []);\n\n const changeRowlimit = useCallback((value: number) => {\n setFilters((prev) => {\n const nextValue = Number(value);\n const nextFilters = cloneDeep(prev);\n\n if (nextFilters) {\n nextFilters[PAGE_INDEX] = nextValue;\n nextFilters[PAGE_INDEX] = START_PAGE;\n }\n\n return nextFilters;\n });\n }, []);\n\n const resetToInitialFilters = useCallback(() => {\n setFilters(cloneDeep(initialFilters));\n }, [initialFilters]);\n\n const handleCheckBox = useCallback((newSelectedRowKeys: React.Key[]) => {\n setRowsSelected(newSelectedRowKeys);\n }, []);\n\n const handleRequestSort = (sortField: string | number | symbol) => {\n setFilters((prev) => {\n const nextFilters = cloneDeep(prev);\n if (nextFilters) {\n if (SORT_DESC in nextFilters) {\n const isAsc = nextFilters.SortDesc === false;\n nextFilters[SORT_DESC] = isAsc;\n }\n\n if (SORT_BY in nextFilters) {\n nextFilters[SORT_BY] = sortField;\n }\n }\n return nextFilters;\n });\n };\n\n const handleSearch = useCallback((nextFilters: InitialFiltersSearch<T>) => {\n const nextFiltersTemp = cloneDeep(nextFilters);\n if (PAGE_INDEX in nextFiltersTemp) {\n nextFiltersTemp[PAGE_INDEX] = START_PAGE;\n }\n\n setFilters(nextFiltersTemp);\n }, []);\n\n return {\n filters,\n rowsSelected,\n setRowsSelected,\n setFilters,\n goToPage,\n changeRowlimit,\n resetToInitialFilters,\n handleCheckBox,\n handleChangePage,\n handleRequestSort,\n handleSearch,\n };\n};\n","import { message } from \"antd\";\nimport { ArgsProps } from \"antd/lib/message\";\n\nexport type OptionalArgsMessage = Partial<ArgsProps> & {\n type?: ArgsProps[\"type\"];\n};\n\nexport const useMessage = (defaultProps?: OptionalArgsMessage) => {\n return (overrideProps?: OptionalArgsMessage) => {\n const mergedProps: ArgsProps = {\n type: defaultProps?.type,\n content: defaultProps?.content,\n ...defaultProps,\n ...overrideProps,\n };\n message.open(mergedProps);\n };\n};\n"],"names":[],"mappings":"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"}
|
package/es/hooks/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
export { u as useToast } from '../chunks/cloneDeep-BLYi2V0G.js';
|
2
|
-
export { u as useFiltersHandler, a as useMessage } from '../chunks/useMessage-
|
2
|
+
export { u as useFiltersHandler, a as useMessage } from '../chunks/useMessage-D_-VT5B4.js';
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/es/index.js
CHANGED
@@ -2,5 +2,5 @@ export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g
|
|
2
2
|
export { D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TinyMCE, T as Typography } from './chunks/Switch-eMq9KkOy.js';
|
3
3
|
export { C as CheckboxField, R as RadioGroup, S as Select } from './chunks/Checkbox-CJ_M7IzZ.js';
|
4
4
|
export { u as useToast } from './chunks/cloneDeep-BLYi2V0G.js';
|
5
|
-
export { u as useFiltersHandler, a as useMessage } from './chunks/useMessage-
|
5
|
+
export { u as useFiltersHandler, a as useMessage } from './chunks/useMessage-D_-VT5B4.js';
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pnkx-lib/ui",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.5.
|
4
|
+
"version": "1.5.7",
|
5
5
|
"type": "module",
|
6
6
|
"main": "./es/index.js",
|
7
7
|
"module": "./es/index.js",
|
8
|
-
"types": "./types/index.d.ts",
|
9
8
|
"exports": {
|
10
9
|
".": {
|
11
10
|
"import": "./es/index.js",
|
@@ -24,6 +23,7 @@
|
|
24
23
|
"types": "./types/hooks/index.d.ts"
|
25
24
|
}
|
26
25
|
},
|
26
|
+
"types": "./types/index.d.ts",
|
27
27
|
"files": [
|
28
28
|
"es",
|
29
29
|
"types",
|
package/types/hooks.d.ts
CHANGED
@@ -1 +1,38 @@
|
|
1
|
+
import { ArgsProps } from 'antd/es/notification';
|
2
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
|
3
|
+
import { default as default_2 } from 'react';
|
4
|
+
|
5
|
+
export declare type InitialFiltersSearch<T> = T & PaginationFilters;
|
6
|
+
|
7
|
+
export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
|
8
|
+
type?: ArgsProps_2["type"];
|
9
|
+
};
|
10
|
+
|
11
|
+
export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
12
|
+
message?: React.ReactNode;
|
13
|
+
};
|
14
|
+
|
15
|
+
export declare interface PaginationFilters {
|
16
|
+
PageSize: number;
|
17
|
+
PageIndex: number;
|
18
|
+
}
|
19
|
+
|
20
|
+
export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
|
21
|
+
filters: InitialFiltersSearch<T>;
|
22
|
+
rowsSelected: default_2.Key[];
|
23
|
+
setRowsSelected: default_2.Dispatch<default_2.SetStateAction<default_2.Key[]>>;
|
24
|
+
setFilters: default_2.Dispatch<default_2.SetStateAction<InitialFiltersSearch<T>>>;
|
25
|
+
goToPage: (PageIndex: number) => void;
|
26
|
+
changeRowlimit: (value: number) => void;
|
27
|
+
resetToInitialFilters: () => void;
|
28
|
+
handleCheckBox: (newSelectedRowKeys: default_2.Key[]) => void;
|
29
|
+
handleChangePage: (nextPage: number) => void;
|
30
|
+
handleRequestSort: (sortField: string | number | symbol) => void;
|
31
|
+
handleSearch: (nextFilters: InitialFiltersSearch<T>) => void;
|
32
|
+
};
|
33
|
+
|
34
|
+
export declare const useMessage: (defaultProps?: OptionalArgsMessage) => (overrideProps?: OptionalArgsMessage) => void;
|
35
|
+
|
36
|
+
export declare const useToast: (defaultProps?: OptionalArgsToast) => (overrideProps?: OptionalArgsToast) => void;
|
37
|
+
|
1
38
|
export { }
|
package/types/index.d.ts
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
import { AffixProps } from 'antd';
|
2
|
+
import { AlertProps as AlertProps_2 } from 'antd';
|
3
|
+
import { Anchor as Anchor_2 } from 'antd';
|
4
|
+
import { AnchorProps as AnchorProps_2 } from 'antd';
|
5
|
+
import { ArgsProps } from 'antd/es/notification';
|
6
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
|
7
|
+
import { AutoCompleteProps as AutoCompleteProps_2 } from 'antd';
|
1
8
|
import { BadgeProps as BadgeProps_2 } from 'antd';
|
2
9
|
import { BasicProps } from 'antd/es/layout/layout';
|
3
10
|
import { BreadcrumbItemType as BreadcrumbItemType_2 } from 'antd/es/breadcrumb/Breadcrumb';
|
@@ -7,6 +14,8 @@ import { Breakpoint } from 'antd';
|
|
7
14
|
import { ButtonProps as ButtonProps_2 } from 'antd';
|
8
15
|
import { CascaderProps } from 'antd/es/cascader';
|
9
16
|
import { CheckboxProps } from 'antd';
|
17
|
+
import { CollapseProps } from 'antd';
|
18
|
+
import { ColorPickerProps } from 'antd';
|
10
19
|
import { ColProps as ColProps_2 } from 'antd';
|
11
20
|
import { ColSize as ColSize_2 } from 'antd/es/grid';
|
12
21
|
import { Control } from 'react-hook-form';
|
@@ -14,18 +23,22 @@ import { ControllerFieldState } from 'react-hook-form';
|
|
14
23
|
import { ControllerRenderProps } from 'react-hook-form';
|
15
24
|
import { Dayjs } from 'dayjs';
|
16
25
|
import { default as default_2 } from 'react';
|
26
|
+
import { default as default_3 } from 'antd/es/anchor/AnchorLink';
|
17
27
|
import { DefaultOptionType } from 'antd/es/cascader';
|
18
28
|
import { DefaultValues } from 'react-hook-form';
|
19
29
|
import { DividerProps as DividerProps_2 } from 'antd';
|
30
|
+
import { DrawerProps as DrawerProps_2 } from 'antd';
|
20
31
|
import { DropdownButtonProps as DropdownButtonProps_2 } from 'antd/es/dropdown';
|
21
32
|
import { DropdownButtonType as DropdownButtonType_2 } from 'antd/es/dropdown';
|
22
33
|
import { DropdownProps as DropdownProps_2 } from 'antd';
|
34
|
+
import { EmptyProps as EmptyProps_2 } from 'antd';
|
23
35
|
import { FC } from 'react';
|
24
36
|
import { FieldValues } from 'react-hook-form';
|
25
37
|
import { FlexProps as FlexProps_2 } from 'antd';
|
26
38
|
import { FormEventHandler } from 'react';
|
27
39
|
import { ForwardRefExoticComponent } from 'react';
|
28
40
|
import { IAllProps } from '@tinymce/tinymce-react';
|
41
|
+
import { ImageProps } from 'antd';
|
29
42
|
import { InputProps as InputProps_2 } from 'antd';
|
30
43
|
import { JSX } from 'react/jsx-runtime';
|
31
44
|
import { JSX as JSX_2 } from 'react';
|
@@ -33,27 +46,34 @@ import { MenuDividerProps } from 'antd/es/menu';
|
|
33
46
|
import { MenuItemGroupProps } from 'rc-menu/lib/MenuItemGroup';
|
34
47
|
import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
|
35
48
|
import { MenuProps as MenuProps_2 } from 'antd/es/menu';
|
36
|
-
import { ModalProps } from 'antd';
|
49
|
+
import { ModalProps as ModalProps_2 } from 'antd';
|
37
50
|
import { Pagination as Pagination_2 } from 'antd';
|
38
51
|
import { PaginationLocale } from 'rc-pagination';
|
39
52
|
import { PaginationProps as PaginationProps_2 } from 'antd';
|
40
53
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
54
|
+
import { PopconfirmProps as PopconfirmProps_2 } from 'antd';
|
41
55
|
import { PopoverProps as PopoverProps_2 } from 'antd';
|
56
|
+
import { QRCodeProps as QRCodeProps_2 } from 'antd';
|
42
57
|
import { RadioGroupProps } from 'antd';
|
43
58
|
import { RangePickerProps } from 'antd/es/date-picker';
|
59
|
+
import { RateProps } from 'antd';
|
44
60
|
import * as React_2 from 'react';
|
45
61
|
import { ReactDatePickerProps } from 'react-datepicker';
|
46
62
|
import { ReactNode } from 'react';
|
47
63
|
import { RefAttributes } from 'react';
|
64
|
+
import { ResultProps as ResultProps_2 } from 'antd';
|
48
65
|
import { RowProps as RowProps_2 } from 'antd';
|
66
|
+
import { SegmentedProps as SegmentedProps_2 } from 'antd';
|
49
67
|
import { SelectProps } from 'antd';
|
50
68
|
import { SiderContextProps } from 'antd/es/layout/Sider';
|
51
69
|
import { SiderProps } from 'antd/es/layout/Sider';
|
52
70
|
import { SkeletonProps as SkeletonProps_2 } from 'antd';
|
53
71
|
import { Space as Space_2 } from 'antd';
|
54
72
|
import { SpaceProps as SpaceProps_2 } from 'antd';
|
73
|
+
import { SpinProps } from 'antd';
|
55
74
|
import { Splitter as Splitter_2 } from 'antd';
|
56
75
|
import { SplitterProps as SplitterProps_2 } from 'antd';
|
76
|
+
import { StatisticProps as StatisticProps_2 } from 'antd';
|
57
77
|
import { StepProps as StepProps_2 } from 'antd';
|
58
78
|
import { Steps as Steps_2 } from 'antd';
|
59
79
|
import { StepsProps as StepsProps_2 } from 'antd';
|
@@ -65,14 +85,41 @@ import { TabsProps as TabsProps_2 } from 'antd';
|
|
65
85
|
import { TagProps } from 'antd';
|
66
86
|
import { TextAreaProps as TextAreaProps_2 } from 'antd/es/input';
|
67
87
|
import { TextProps } from 'antd/es/typography/Text';
|
88
|
+
import { TimelineProps as TimelineProps_2 } from 'antd';
|
68
89
|
import { TitleProps } from 'antd/es/typography/Title';
|
69
90
|
import { TooltipProps as TooltipProps_2 } from 'antd';
|
91
|
+
import { TourProps as TourProps_2 } from 'antd';
|
92
|
+
import { TreeProps as TreeProps_2 } from 'antd';
|
70
93
|
import { UploadFile } from 'antd';
|
71
94
|
import { UploadProps } from 'antd';
|
72
95
|
import { UseFormReset } from 'react-hook-form';
|
73
96
|
import { UseFormReturn } from 'react-hook-form';
|
74
97
|
import { UseFormSetValue } from 'react-hook-form';
|
75
98
|
import { UseFormStateReturn } from 'react-hook-form';
|
99
|
+
import { WatermarkProps } from 'antd';
|
100
|
+
|
101
|
+
export declare const Alert: React.FC<AlertProps>;
|
102
|
+
|
103
|
+
export declare type AlertProps = AlertProps_2;
|
104
|
+
|
105
|
+
export declare const Anchor: typeof Anchor_2 & {
|
106
|
+
Link: typeof default_3;
|
107
|
+
};
|
108
|
+
|
109
|
+
export declare interface AnchorProps extends AnchorProps_2 {
|
110
|
+
}
|
111
|
+
|
112
|
+
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
113
|
+
|
114
|
+
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
|
115
|
+
|
116
|
+
export declare interface AppfixProps extends AffixProps {
|
117
|
+
children: default_2.ReactNode;
|
118
|
+
}
|
119
|
+
|
120
|
+
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
121
|
+
|
122
|
+
export declare type AutoCompleteProps = AutoCompleteProps_2;
|
76
123
|
|
77
124
|
export declare const Badge: ({ type, children, ...rest }: BadgeProps) => JSX.Element;
|
78
125
|
|
@@ -101,6 +148,11 @@ declare type BaseProps_12 = {
|
|
101
148
|
stepsClassName?: string;
|
102
149
|
};
|
103
150
|
|
151
|
+
declare type BaseProps_13 = {
|
152
|
+
containerClassName?: string;
|
153
|
+
spaceClassName?: string;
|
154
|
+
};
|
155
|
+
|
104
156
|
declare type BaseProps_2 = {
|
105
157
|
containerClassName?: string;
|
106
158
|
popoverClassName?: string;
|
@@ -150,6 +202,21 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
150
202
|
|
151
203
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
152
204
|
|
205
|
+
export declare const BulkAction: ({ quantity, handleRefresh, handleSend, handleSlash, handleProhibit, handleCheck, handleClose, handleDelete, handleUnLock, handleLock, }: BulkActionProps) => JSX.Element;
|
206
|
+
|
207
|
+
export declare interface BulkActionProps {
|
208
|
+
quantity: number;
|
209
|
+
handleRefresh?: () => void;
|
210
|
+
handleSend?: () => void;
|
211
|
+
handleSlash?: () => void;
|
212
|
+
handleProhibit?: () => void;
|
213
|
+
handleCheck?: () => void;
|
214
|
+
handleClose?: () => void;
|
215
|
+
handleDelete?: () => void;
|
216
|
+
handleUnLock?: () => void;
|
217
|
+
handleLock?: () => void;
|
218
|
+
}
|
219
|
+
|
153
220
|
export declare const Button: default_2.FC<ButtonProps>;
|
154
221
|
|
155
222
|
export declare type ButtonProps = ButtonProps_2;
|
@@ -193,6 +260,18 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
|
|
193
260
|
ItemGroup: typeof ItemGroup;
|
194
261
|
};
|
195
262
|
|
263
|
+
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX.Element;
|
264
|
+
|
265
|
+
export declare interface ConfirmModalProps extends ModalProps {
|
266
|
+
title: string;
|
267
|
+
content: string;
|
268
|
+
titleCancelBtn?: string;
|
269
|
+
titleSubmitBtn?: string;
|
270
|
+
typeIcon: "success" | "error" | "warning" | "info";
|
271
|
+
handleCancel?: () => void;
|
272
|
+
handleSubmit?: () => void;
|
273
|
+
}
|
274
|
+
|
196
275
|
export declare const Container: default_2.FC<ContainerProps>;
|
197
276
|
|
198
277
|
export declare interface ContainerProps {
|
@@ -201,11 +280,6 @@ export declare interface ContainerProps {
|
|
201
280
|
className?: string;
|
202
281
|
}
|
203
282
|
|
204
|
-
export declare interface CustomeModalProps extends ModalProps {
|
205
|
-
children?: ReactNode;
|
206
|
-
onSubmit?: () => void;
|
207
|
-
}
|
208
|
-
|
209
283
|
declare type CustomInputTypeAttribute = default_2.HTMLInputTypeAttribute | "money";
|
210
284
|
|
211
285
|
export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange"> {
|
@@ -235,6 +309,13 @@ export declare interface DividerProps extends DividerProps_2 {
|
|
235
309
|
children?: ReactNode | string;
|
236
310
|
}
|
237
311
|
|
312
|
+
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX.Element;
|
313
|
+
|
314
|
+
export declare interface DrawerProps extends DrawerProps_2 {
|
315
|
+
children?: ReactNode;
|
316
|
+
onSubmit?: (values: any) => void;
|
317
|
+
}
|
318
|
+
|
238
319
|
export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
|
239
320
|
|
240
321
|
export declare type DropdownButtonProps = DropdownButtonProps_2;
|
@@ -245,6 +326,10 @@ export declare type DropdownProps = DropdownProps_2;
|
|
245
326
|
|
246
327
|
export declare type DropdownPropsUnion = BaseProps_5 & DropdownProps;
|
247
328
|
|
329
|
+
export declare const Empty: React.FC<EmptyProps>;
|
330
|
+
|
331
|
+
export declare type EmptyProps = EmptyProps_2;
|
332
|
+
|
248
333
|
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
249
334
|
|
250
335
|
export declare interface ErrorMessageProps {
|
@@ -274,6 +359,11 @@ export declare interface HeadingProps {
|
|
274
359
|
breadcrumbItems?: ItemType[];
|
275
360
|
}
|
276
361
|
|
362
|
+
declare const Image_2: React.FC<ImageProps>;
|
363
|
+
export { Image_2 as Image }
|
364
|
+
|
365
|
+
export declare type InitialFiltersSearch<T> = T & PaginationFilters;
|
366
|
+
|
277
367
|
export declare const Input: (props: InputProps) => JSX.Element;
|
278
368
|
|
279
369
|
export declare interface InputProps extends InputProps_2 {
|
@@ -326,18 +416,36 @@ export declare interface MenuItemProps extends MenuItemProps_2 {
|
|
326
416
|
export declare interface MenuProps extends MenuProps_2 {
|
327
417
|
}
|
328
418
|
|
329
|
-
export declare const Modal: ({ children, onOk, onSubmit, ...rest }:
|
419
|
+
export declare const Modal: ({ children, onOk, onSubmit, ...rest }: ModalProps) => JSX.Element;
|
420
|
+
|
421
|
+
export declare interface ModalProps extends ModalProps_2 {
|
422
|
+
children?: ReactNode;
|
423
|
+
onSubmit?: () => void;
|
424
|
+
}
|
330
425
|
|
331
426
|
declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, true> & {
|
332
427
|
multiple: true;
|
333
428
|
};
|
334
429
|
|
430
|
+
export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
|
431
|
+
type?: ArgsProps_2["type"];
|
432
|
+
};
|
433
|
+
|
434
|
+
export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
435
|
+
message?: React.ReactNode;
|
436
|
+
};
|
437
|
+
|
335
438
|
export declare const Pagination: typeof Pagination_2;
|
336
439
|
|
337
440
|
export declare type PaginationConfig = Omit<PaginationProps, "rootClassName"> & {
|
338
441
|
position?: "top" | "bottom" | "both";
|
339
442
|
};
|
340
443
|
|
444
|
+
export declare interface PaginationFilters {
|
445
|
+
PageSize: number;
|
446
|
+
PageIndex: number;
|
447
|
+
}
|
448
|
+
|
341
449
|
export { PaginationLocale }
|
342
450
|
|
343
451
|
export declare interface PaginationProps extends PaginationProps_2 {
|
@@ -345,6 +453,12 @@ export declare interface PaginationProps extends PaginationProps_2 {
|
|
345
453
|
|
346
454
|
export declare type PaginationPropsUnion = BaseProps_11 & PaginationProps;
|
347
455
|
|
456
|
+
export declare const PnkxCollapse: React.FC<PnkxCollapseProps>;
|
457
|
+
|
458
|
+
export declare type PnkxCollapseProps = CollapseProps;
|
459
|
+
|
460
|
+
export declare const PnkxColorPicker: React.FC<ColorPickerProps>;
|
461
|
+
|
348
462
|
export declare class PnkxField<TComponent extends React_2.ComponentType<any>> extends React_2.PureComponent<PnkxFieldProps<TComponent>> {
|
349
463
|
render(): JSX.Element;
|
350
464
|
}
|
@@ -355,6 +469,16 @@ export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>
|
|
355
469
|
component: TComponent;
|
356
470
|
} & Omit<ComponentPropsType<TComponent>, "control" | "name" | "formState" | "field" | "fieldState">;
|
357
471
|
|
472
|
+
export declare interface PnkxSpinProps extends SpinProps {
|
473
|
+
children?: ReactNode;
|
474
|
+
}
|
475
|
+
|
476
|
+
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX.Element;
|
477
|
+
|
478
|
+
export declare interface PopconfirmProps extends PopconfirmProps_2 {
|
479
|
+
children?: ReactNode;
|
480
|
+
}
|
481
|
+
|
358
482
|
export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
|
359
483
|
|
360
484
|
export declare type PopoverProps = PopoverProps_2;
|
@@ -373,6 +497,10 @@ export declare interface PropsNumberFormat extends Omit<InputProps, "onChange" |
|
|
373
497
|
helperText?: () => JSX_2.Element | null;
|
374
498
|
}
|
375
499
|
|
500
|
+
export declare const QRCode: React.FC<QRCodeProps>;
|
501
|
+
|
502
|
+
export declare type QRCodeProps = QRCodeProps_2;
|
503
|
+
|
376
504
|
export declare const RadioGroup: (props: RadioProps) => JSX.Element;
|
377
505
|
|
378
506
|
export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
|
@@ -398,6 +526,14 @@ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "v
|
|
398
526
|
customStyleDatePicker?: string;
|
399
527
|
}
|
400
528
|
|
529
|
+
export declare const Rate: React.FC<RateProps>;
|
530
|
+
|
531
|
+
export declare const Result: ({ children, ...rest }: ResultProps) => JSX.Element;
|
532
|
+
|
533
|
+
export declare interface ResultProps extends ResultProps_2 {
|
534
|
+
children?: ReactNode | string;
|
535
|
+
}
|
536
|
+
|
401
537
|
export declare const Row: (props: RowPropsUnion) => JSX.Element;
|
402
538
|
|
403
539
|
declare interface RowCommon {
|
@@ -427,6 +563,10 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
427
563
|
onSubmit: (data: T) => void;
|
428
564
|
}
|
429
565
|
|
566
|
+
export declare const Segmented: React.FC<SegmentedProps>;
|
567
|
+
|
568
|
+
export declare type SegmentedProps = SegmentedProps_2;
|
569
|
+
|
430
570
|
export declare const Select: (props: SelectFieldProps) => JSX.Element;
|
431
571
|
|
432
572
|
export declare interface SelectFieldProps extends SelectProps {
|
@@ -474,6 +614,8 @@ export declare interface SpaceProps extends SpaceProps_2 {
|
|
474
614
|
|
475
615
|
export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
|
476
616
|
|
617
|
+
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX.Element;
|
618
|
+
|
477
619
|
export declare const Splitter: typeof Splitter_2;
|
478
620
|
|
479
621
|
export declare interface SplitterProps extends SplitterProps_2 {
|
@@ -481,6 +623,10 @@ export declare interface SplitterProps extends SplitterProps_2 {
|
|
481
623
|
|
482
624
|
export declare type SplitterPropsUnion = BaseProps_10 & SplitterProps;
|
483
625
|
|
626
|
+
export declare const Statistic: React.FC<StatisticProps>;
|
627
|
+
|
628
|
+
export declare type StatisticProps = StatisticProps_2;
|
629
|
+
|
484
630
|
export declare interface StepProps extends StepProps_2 {
|
485
631
|
}
|
486
632
|
|
@@ -564,6 +710,10 @@ export declare interface TextAreaProps extends TextAreaProps_2 {
|
|
564
710
|
required?: boolean;
|
565
711
|
}
|
566
712
|
|
713
|
+
export declare const Timeline: React.FC<TimelineProps>;
|
714
|
+
|
715
|
+
export declare type TimelineProps = TimelineProps_2;
|
716
|
+
|
567
717
|
declare type TInputNumberType = "number" | "money";
|
568
718
|
|
569
719
|
export declare const TinyMCE: {
|
@@ -591,8 +741,16 @@ declare type TOptionGRadio = {
|
|
591
741
|
value: string | number;
|
592
742
|
};
|
593
743
|
|
744
|
+
export declare const Tour: React.FC<TourProps>;
|
745
|
+
|
746
|
+
export declare type TourProps = TourProps_2;
|
747
|
+
|
594
748
|
declare type TPositionRadio = "before" | "after";
|
595
749
|
|
750
|
+
export declare const Tree: React.FC<TreeProps>;
|
751
|
+
|
752
|
+
export declare type TreeProps = TreeProps_2;
|
753
|
+
|
596
754
|
declare type TSize = "small" | "medium" | "large";
|
597
755
|
|
598
756
|
export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
|
@@ -616,4 +774,24 @@ export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "o
|
|
616
774
|
afterOnChange?: (fileList: UploadFile[]) => void;
|
617
775
|
}
|
618
776
|
|
777
|
+
export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
|
778
|
+
filters: InitialFiltersSearch<T>;
|
779
|
+
rowsSelected: default_2.Key[];
|
780
|
+
setRowsSelected: default_2.Dispatch<default_2.SetStateAction<default_2.Key[]>>;
|
781
|
+
setFilters: default_2.Dispatch<default_2.SetStateAction<InitialFiltersSearch<T>>>;
|
782
|
+
goToPage: (PageIndex: number) => void;
|
783
|
+
changeRowlimit: (value: number) => void;
|
784
|
+
resetToInitialFilters: () => void;
|
785
|
+
handleCheckBox: (newSelectedRowKeys: default_2.Key[]) => void;
|
786
|
+
handleChangePage: (nextPage: number) => void;
|
787
|
+
handleRequestSort: (sortField: string | number | symbol) => void;
|
788
|
+
handleSearch: (nextFilters: InitialFiltersSearch<T>) => void;
|
789
|
+
};
|
790
|
+
|
791
|
+
export declare const useMessage: (defaultProps?: OptionalArgsMessage) => (overrideProps?: OptionalArgsMessage) => void;
|
792
|
+
|
793
|
+
export declare const useToast: (defaultProps?: OptionalArgsToast) => (overrideProps?: OptionalArgsToast) => void;
|
794
|
+
|
795
|
+
export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
|
796
|
+
|
619
797
|
export { }
|
package/types/ui.d.ts
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
import { AffixProps } from 'antd';
|
2
|
+
import { AlertProps as AlertProps_2 } from 'antd';
|
3
|
+
import { Anchor as Anchor_2 } from 'antd';
|
4
|
+
import { AnchorProps as AnchorProps_2 } from 'antd';
|
5
|
+
import { AutoCompleteProps as AutoCompleteProps_2 } from 'antd';
|
1
6
|
import { BadgeProps as BadgeProps_2 } from 'antd';
|
2
7
|
import { BasicProps } from 'antd/es/layout/layout';
|
3
8
|
import { BreadcrumbItemType as BreadcrumbItemType_2 } from 'antd/es/breadcrumb/Breadcrumb';
|
@@ -6,42 +11,55 @@ import { BreadcrumbSeparatorType as BreadcrumbSeparatorType_2 } from 'antd/es/br
|
|
6
11
|
import { Breakpoint } from 'antd';
|
7
12
|
import { ButtonProps as ButtonProps_2 } from 'antd';
|
8
13
|
import { CascaderProps } from 'antd/es/cascader';
|
14
|
+
import { CollapseProps } from 'antd';
|
15
|
+
import { ColorPickerProps } from 'antd';
|
9
16
|
import { ColProps as ColProps_2 } from 'antd';
|
10
17
|
import { ColSize as ColSize_2 } from 'antd/es/grid';
|
11
18
|
import { Control } from 'react-hook-form';
|
12
19
|
import { default as default_2 } from 'react';
|
20
|
+
import { default as default_3 } from 'antd/es/anchor/AnchorLink';
|
13
21
|
import { DefaultOptionType } from 'antd/es/cascader';
|
14
22
|
import { DefaultValues } from 'react-hook-form';
|
15
23
|
import { DividerProps as DividerProps_2 } from 'antd';
|
24
|
+
import { DrawerProps as DrawerProps_2 } from 'antd';
|
16
25
|
import { DropdownButtonProps as DropdownButtonProps_2 } from 'antd/es/dropdown';
|
17
26
|
import { DropdownButtonType as DropdownButtonType_2 } from 'antd/es/dropdown';
|
18
27
|
import { DropdownProps as DropdownProps_2 } from 'antd';
|
28
|
+
import { EmptyProps as EmptyProps_2 } from 'antd';
|
19
29
|
import { FC } from 'react';
|
20
30
|
import { FieldValues } from 'react-hook-form';
|
21
31
|
import { FlexProps as FlexProps_2 } from 'antd';
|
22
32
|
import { FormEventHandler } from 'react';
|
23
33
|
import { ForwardRefExoticComponent } from 'react';
|
34
|
+
import { ImageProps } from 'antd';
|
24
35
|
import { JSX } from 'react/jsx-runtime';
|
25
36
|
import { MenuDividerProps } from 'antd/es/menu';
|
26
37
|
import { MenuItemGroupProps } from 'rc-menu/lib/MenuItemGroup';
|
27
38
|
import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
|
28
39
|
import { MenuProps as MenuProps_2 } from 'antd/es/menu';
|
29
|
-
import { ModalProps } from 'antd';
|
40
|
+
import { ModalProps as ModalProps_2 } from 'antd';
|
30
41
|
import { Pagination as Pagination_2 } from 'antd';
|
31
42
|
import { PaginationLocale } from 'rc-pagination';
|
32
43
|
import { PaginationProps as PaginationProps_2 } from 'antd';
|
33
44
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
45
|
+
import { PopconfirmProps as PopconfirmProps_2 } from 'antd';
|
34
46
|
import { PopoverProps as PopoverProps_2 } from 'antd';
|
47
|
+
import { QRCodeProps as QRCodeProps_2 } from 'antd';
|
48
|
+
import { RateProps } from 'antd';
|
35
49
|
import { ReactNode } from 'react';
|
36
50
|
import { RefAttributes } from 'react';
|
51
|
+
import { ResultProps as ResultProps_2 } from 'antd';
|
37
52
|
import { RowProps as RowProps_2 } from 'antd';
|
53
|
+
import { SegmentedProps as SegmentedProps_2 } from 'antd';
|
38
54
|
import { SiderContextProps } from 'antd/es/layout/Sider';
|
39
55
|
import { SiderProps } from 'antd/es/layout/Sider';
|
40
56
|
import { SkeletonProps as SkeletonProps_2 } from 'antd';
|
41
57
|
import { Space as Space_2 } from 'antd';
|
42
58
|
import { SpaceProps as SpaceProps_2 } from 'antd';
|
59
|
+
import { SpinProps } from 'antd';
|
43
60
|
import { Splitter as Splitter_2 } from 'antd';
|
44
61
|
import { SplitterProps as SplitterProps_2 } from 'antd';
|
62
|
+
import { StatisticProps as StatisticProps_2 } from 'antd';
|
45
63
|
import { StepProps as StepProps_2 } from 'antd';
|
46
64
|
import { Steps as Steps_2 } from 'antd';
|
47
65
|
import { StepsProps as StepsProps_2 } from 'antd';
|
@@ -51,11 +69,38 @@ import { TableProps } from 'antd/lib/table';
|
|
51
69
|
import { TabsProps as TabsProps_2 } from 'antd';
|
52
70
|
import { TagProps } from 'antd';
|
53
71
|
import { TextProps } from 'antd/es/typography/Text';
|
72
|
+
import { TimelineProps as TimelineProps_2 } from 'antd';
|
54
73
|
import { TitleProps } from 'antd/es/typography/Title';
|
55
74
|
import { TooltipProps as TooltipProps_2 } from 'antd';
|
75
|
+
import { TourProps as TourProps_2 } from 'antd';
|
76
|
+
import { TreeProps as TreeProps_2 } from 'antd';
|
56
77
|
import { UseFormReset } from 'react-hook-form';
|
57
78
|
import { UseFormReturn } from 'react-hook-form';
|
58
79
|
import { UseFormSetValue } from 'react-hook-form';
|
80
|
+
import { WatermarkProps } from 'antd';
|
81
|
+
|
82
|
+
export declare const Alert: React.FC<AlertProps>;
|
83
|
+
|
84
|
+
export declare type AlertProps = AlertProps_2;
|
85
|
+
|
86
|
+
export declare const Anchor: typeof Anchor_2 & {
|
87
|
+
Link: typeof default_3;
|
88
|
+
};
|
89
|
+
|
90
|
+
export declare interface AnchorProps extends AnchorProps_2 {
|
91
|
+
}
|
92
|
+
|
93
|
+
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
94
|
+
|
95
|
+
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
|
96
|
+
|
97
|
+
export declare interface AppfixProps extends AffixProps {
|
98
|
+
children: default_2.ReactNode;
|
99
|
+
}
|
100
|
+
|
101
|
+
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
102
|
+
|
103
|
+
export declare type AutoCompleteProps = AutoCompleteProps_2;
|
59
104
|
|
60
105
|
export declare const Badge: ({ type, children, ...rest }: BadgeProps) => JSX.Element;
|
61
106
|
|
@@ -84,6 +129,11 @@ declare type BaseProps_12 = {
|
|
84
129
|
stepsClassName?: string;
|
85
130
|
};
|
86
131
|
|
132
|
+
declare type BaseProps_13 = {
|
133
|
+
containerClassName?: string;
|
134
|
+
spaceClassName?: string;
|
135
|
+
};
|
136
|
+
|
87
137
|
declare type BaseProps_2 = {
|
88
138
|
containerClassName?: string;
|
89
139
|
popoverClassName?: string;
|
@@ -133,6 +183,21 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
133
183
|
|
134
184
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
135
185
|
|
186
|
+
export declare const BulkAction: ({ quantity, handleRefresh, handleSend, handleSlash, handleProhibit, handleCheck, handleClose, handleDelete, handleUnLock, handleLock, }: BulkActionProps) => JSX.Element;
|
187
|
+
|
188
|
+
export declare interface BulkActionProps {
|
189
|
+
quantity: number;
|
190
|
+
handleRefresh?: () => void;
|
191
|
+
handleSend?: () => void;
|
192
|
+
handleSlash?: () => void;
|
193
|
+
handleProhibit?: () => void;
|
194
|
+
handleCheck?: () => void;
|
195
|
+
handleClose?: () => void;
|
196
|
+
handleDelete?: () => void;
|
197
|
+
handleUnLock?: () => void;
|
198
|
+
handleLock?: () => void;
|
199
|
+
}
|
200
|
+
|
136
201
|
export declare const Button: default_2.FC<ButtonProps>;
|
137
202
|
|
138
203
|
export declare type ButtonProps = ButtonProps_2;
|
@@ -162,6 +227,18 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
|
|
162
227
|
ItemGroup: typeof ItemGroup;
|
163
228
|
};
|
164
229
|
|
230
|
+
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX.Element;
|
231
|
+
|
232
|
+
export declare interface ConfirmModalProps extends ModalProps {
|
233
|
+
title: string;
|
234
|
+
content: string;
|
235
|
+
titleCancelBtn?: string;
|
236
|
+
titleSubmitBtn?: string;
|
237
|
+
typeIcon: "success" | "error" | "warning" | "info";
|
238
|
+
handleCancel?: () => void;
|
239
|
+
handleSubmit?: () => void;
|
240
|
+
}
|
241
|
+
|
165
242
|
export declare const Container: default_2.FC<ContainerProps>;
|
166
243
|
|
167
244
|
export declare interface ContainerProps {
|
@@ -170,11 +247,6 @@ export declare interface ContainerProps {
|
|
170
247
|
className?: string;
|
171
248
|
}
|
172
249
|
|
173
|
-
export declare interface CustomeModalProps extends ModalProps {
|
174
|
-
children?: ReactNode;
|
175
|
-
onSubmit?: () => void;
|
176
|
-
}
|
177
|
-
|
178
250
|
export declare const Divider: ({ children, ...rest }: DividerProps) => JSX.Element;
|
179
251
|
|
180
252
|
declare const Divider_2: FC<MenuDividerProps>;
|
@@ -183,6 +255,13 @@ export declare interface DividerProps extends DividerProps_2 {
|
|
183
255
|
children?: ReactNode | string;
|
184
256
|
}
|
185
257
|
|
258
|
+
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX.Element;
|
259
|
+
|
260
|
+
export declare interface DrawerProps extends DrawerProps_2 {
|
261
|
+
children?: ReactNode;
|
262
|
+
onSubmit?: (values: any) => void;
|
263
|
+
}
|
264
|
+
|
186
265
|
export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
|
187
266
|
|
188
267
|
export declare type DropdownButtonProps = DropdownButtonProps_2;
|
@@ -193,6 +272,10 @@ export declare type DropdownProps = DropdownProps_2;
|
|
193
272
|
|
194
273
|
export declare type DropdownPropsUnion = BaseProps_5 & DropdownProps;
|
195
274
|
|
275
|
+
export declare const Empty: React.FC<EmptyProps>;
|
276
|
+
|
277
|
+
export declare type EmptyProps = EmptyProps_2;
|
278
|
+
|
196
279
|
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
197
280
|
|
198
281
|
export declare interface ErrorMessageProps {
|
@@ -222,6 +305,9 @@ export declare interface HeadingProps {
|
|
222
305
|
breadcrumbItems?: ItemType[];
|
223
306
|
}
|
224
307
|
|
308
|
+
declare const Image_2: React.FC<ImageProps>;
|
309
|
+
export { Image_2 as Image }
|
310
|
+
|
225
311
|
export declare type InternalRouteType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
226
312
|
|
227
313
|
declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref"> & RefAttributes<HTMLLIElement>>;
|
@@ -257,7 +343,12 @@ export declare interface MenuItemProps extends MenuItemProps_2 {
|
|
257
343
|
export declare interface MenuProps extends MenuProps_2 {
|
258
344
|
}
|
259
345
|
|
260
|
-
export declare const Modal: ({ children, onOk, onSubmit, ...rest }:
|
346
|
+
export declare const Modal: ({ children, onOk, onSubmit, ...rest }: ModalProps) => JSX.Element;
|
347
|
+
|
348
|
+
export declare interface ModalProps extends ModalProps_2 {
|
349
|
+
children?: ReactNode;
|
350
|
+
onSubmit?: () => void;
|
351
|
+
}
|
261
352
|
|
262
353
|
declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, true> & {
|
263
354
|
multiple: true;
|
@@ -276,12 +367,40 @@ export declare interface PaginationProps extends PaginationProps_2 {
|
|
276
367
|
|
277
368
|
export declare type PaginationPropsUnion = BaseProps_11 & PaginationProps;
|
278
369
|
|
370
|
+
export declare const PnkxCollapse: React.FC<PnkxCollapseProps>;
|
371
|
+
|
372
|
+
export declare type PnkxCollapseProps = CollapseProps;
|
373
|
+
|
374
|
+
export declare const PnkxColorPicker: React.FC<ColorPickerProps>;
|
375
|
+
|
376
|
+
export declare interface PnkxSpinProps extends SpinProps {
|
377
|
+
children?: ReactNode;
|
378
|
+
}
|
379
|
+
|
380
|
+
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX.Element;
|
381
|
+
|
382
|
+
export declare interface PopconfirmProps extends PopconfirmProps_2 {
|
383
|
+
children?: ReactNode;
|
384
|
+
}
|
385
|
+
|
279
386
|
export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
|
280
387
|
|
281
388
|
export declare type PopoverProps = PopoverProps_2;
|
282
389
|
|
283
390
|
export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
|
284
391
|
|
392
|
+
export declare const QRCode: React.FC<QRCodeProps>;
|
393
|
+
|
394
|
+
export declare type QRCodeProps = QRCodeProps_2;
|
395
|
+
|
396
|
+
export declare const Rate: React.FC<RateProps>;
|
397
|
+
|
398
|
+
export declare const Result: ({ children, ...rest }: ResultProps) => JSX.Element;
|
399
|
+
|
400
|
+
export declare interface ResultProps extends ResultProps_2 {
|
401
|
+
children?: ReactNode | string;
|
402
|
+
}
|
403
|
+
|
285
404
|
export declare const Row: (props: RowPropsUnion) => JSX.Element;
|
286
405
|
|
287
406
|
declare interface RowCommon {
|
@@ -311,6 +430,10 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
311
430
|
onSubmit: (data: T) => void;
|
312
431
|
}
|
313
432
|
|
433
|
+
export declare const Segmented: React.FC<SegmentedProps>;
|
434
|
+
|
435
|
+
export declare type SegmentedProps = SegmentedProps_2;
|
436
|
+
|
314
437
|
export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX.Element;
|
315
438
|
|
316
439
|
export declare interface SidebarProps {
|
@@ -346,6 +469,8 @@ export declare interface SpaceProps extends SpaceProps_2 {
|
|
346
469
|
|
347
470
|
export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
|
348
471
|
|
472
|
+
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX.Element;
|
473
|
+
|
349
474
|
export declare const Splitter: typeof Splitter_2;
|
350
475
|
|
351
476
|
export declare interface SplitterProps extends SplitterProps_2 {
|
@@ -353,6 +478,10 @@ export declare interface SplitterProps extends SplitterProps_2 {
|
|
353
478
|
|
354
479
|
export declare type SplitterPropsUnion = BaseProps_10 & SplitterProps;
|
355
480
|
|
481
|
+
export declare const Statistic: React.FC<StatisticProps>;
|
482
|
+
|
483
|
+
export declare type StatisticProps = StatisticProps_2;
|
484
|
+
|
356
485
|
export declare interface StepProps extends StepProps_2 {
|
357
486
|
}
|
358
487
|
|
@@ -417,10 +546,22 @@ export declare interface TaglineProps extends TagProps {
|
|
417
546
|
|
418
547
|
export declare type TailwindMaxWidth = "max-w-xs" | "max-w-sm" | "max-w-md" | "max-w-lg" | "max-w-xl" | "max-w-2xl" | "max-w-3xl" | "max-w-4xl" | "max-w-5xl" | "max-w-6xl" | "max-w-7xl" | "max-w-full" | "max-w-screen-sm" | "max-w-screen-md" | "max-w-screen-lg" | "max-w-screen-xl" | "max-w-screen-2xl";
|
419
548
|
|
549
|
+
export declare const Timeline: React.FC<TimelineProps>;
|
550
|
+
|
551
|
+
export declare type TimelineProps = TimelineProps_2;
|
552
|
+
|
420
553
|
export declare const Tooltip: default_2.FC<TooltipProps>;
|
421
554
|
|
422
555
|
export declare type TooltipProps = TooltipProps_2;
|
423
556
|
|
557
|
+
export declare const Tour: React.FC<TourProps>;
|
558
|
+
|
559
|
+
export declare type TourProps = TourProps_2;
|
560
|
+
|
561
|
+
export declare const Tree: React.FC<TreeProps>;
|
562
|
+
|
563
|
+
export declare type TreeProps = TreeProps_2;
|
564
|
+
|
424
565
|
export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
|
425
566
|
|
426
567
|
export declare const Typography: {
|
@@ -429,4 +570,6 @@ export declare const Typography: {
|
|
429
570
|
Text: (props: TextProps) => JSX.Element;
|
430
571
|
};
|
431
572
|
|
573
|
+
export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
|
574
|
+
|
432
575
|
export { }
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useMessage-CI2AYP0q.js","sources":["../../src/components/hooks/useFiltersHandler.ts","../../src/components/hooks/useMessage.ts"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport {\n PAGE_INDEX,\n SORT_BY,\n SORT_DESC,\n START_PAGE,\n} from \"@src/constants/common\";\nimport { PaginationFilters } from \"@src/interface/common\";\n\nexport type InitialFiltersSearch<T> = T & PaginationFilters;\n\nexport const useFiltersHandler = <T>(\n initialFilters: InitialFiltersSearch<T>\n) => {\n const [filters, setFilters] = React.useState(initialFilters);\n\n const [rowsSelected, setRowsSelected] = React.useState<React.Key[]>([]);\n\n const goToPage = useCallback((PageIndex: number) => {\n setFilters((prev) => {\n const nextFilters = cloneDeep(prev);\n if (nextFilters) {\n nextFilters[PAGE_INDEX] = PageIndex;\n }\n\n return nextFilters;\n });\n }, []);\n\n const handleChangePage = useCallback((nextPage: number) => {\n setFilters((prev) => {\n const nextFilters = cloneDeep(prev);\n if (nextFilters) {\n nextFilters[PAGE_INDEX] = nextPage;\n }\n return nextFilters;\n });\n setRowsSelected([]);\n }, []);\n\n const changeRowlimit = useCallback((value: number) => {\n setFilters((prev) => {\n const nextValue = Number(value);\n const nextFilters = cloneDeep(prev);\n\n if (nextFilters) {\n nextFilters[PAGE_INDEX] = nextValue;\n nextFilters[PAGE_INDEX] = START_PAGE;\n }\n\n return nextFilters;\n });\n }, []);\n\n const resetToInitialFilters = useCallback(() => {\n setFilters(cloneDeep(initialFilters));\n }, [initialFilters]);\n\n const handleCheckBox = useCallback((newSelectedRowKeys: React.Key[]) => {\n setRowsSelected(newSelectedRowKeys);\n }, []);\n\n const handleRequestSort = (sortField: string | number | symbol) => {\n setFilters((prev) => {\n const nextFilters = cloneDeep(prev);\n if (nextFilters) {\n if (SORT_DESC in nextFilters) {\n const isAsc = nextFilters.SortDesc === false;\n nextFilters[SORT_DESC] = isAsc;\n }\n\n if (SORT_BY in nextFilters) {\n nextFilters[SORT_BY] = sortField;\n }\n }\n return nextFilters;\n });\n };\n\n const handleSearch = useCallback((nextFilters: InitialFiltersSearch<T>) => {\n const nextFiltersTemp = cloneDeep(nextFilters);\n if (PAGE_INDEX in nextFiltersTemp) {\n nextFiltersTemp[PAGE_INDEX] = START_PAGE;\n }\n\n setFilters(nextFiltersTemp);\n }, []);\n\n return {\n filters,\n rowsSelected,\n setRowsSelected,\n setFilters,\n goToPage,\n changeRowlimit,\n resetToInitialFilters,\n handleCheckBox,\n handleChangePage,\n handleRequestSort,\n handleSearch,\n };\n};\n","import { message } from \"antd\";\nimport { ArgsProps } from \"antd/lib/message\";\n\nexport type OptionalArgsMessage = Partial<ArgsProps> & {\n type?: ArgsProps[\"type\"];\n};\n\nexport const useMessage = (defaultProps?: OptionalArgsMessage) => {\n return (overrideProps?: OptionalArgsMessage) => {\n const mergedProps: ArgsProps = {\n type: defaultProps?.type,\n content: defaultProps?.content,\n ...defaultProps,\n ...overrideProps,\n };\n message.open(mergedProps);\n };\n};\n"],"names":["React"],"mappings":"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"}
|