@pnkx-lib/ui 1.5.6 → 1.5.8
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/{ConfirmModal-fbJXEktP.js → ConfirmModal-BB38ZWjg.js} +4 -4
- package/es/chunks/ConfirmModal-BB38ZWjg.js.map +1 -0
- 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 +2 -2
- package/es/ui/index.js +1 -1
- package/package.json +2 -2
- package/types/hooks.d.ts +37 -0
- package/types/index.d.ts +207 -29
- package/types/ui.d.ts +168 -25
- package/es/chunks/ConfirmModal-fbJXEktP.js.map +0 -1
- 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
@@ -1,6 +1,6 @@
|
|
1
|
-
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/ConfirmModal-
|
1
|
+
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/ConfirmModal-BB38ZWjg.js';
|
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/es/ui/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/ConfirmModal-
|
1
|
+
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/ConfirmModal-BB38ZWjg.js';
|
2
2
|
export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-eMq9KkOy.js';
|
3
3
|
//# 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.8",
|
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/lib/message';
|
2
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/es/notification';
|
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> & {
|
8
|
+
type?: ArgsProps["type"];
|
9
|
+
};
|
10
|
+
|
11
|
+
export declare type OptionalArgsToast = Partial<ArgsProps_2> & {
|
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/lib/message';
|
6
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/es/notification';
|
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,25 +14,31 @@ 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';
|
13
22
|
import { ControllerFieldState } from 'react-hook-form';
|
14
23
|
import { ControllerRenderProps } from 'react-hook-form';
|
15
24
|
import { Dayjs } from 'dayjs';
|
16
|
-
import { default as default_2 } from '
|
25
|
+
import { default as default_2 } from 'antd/es/anchor/AnchorLink';
|
26
|
+
import { default as default_3 } from 'react';
|
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_2;
|
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_3.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,7 +202,22 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
150
202
|
|
151
203
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
152
204
|
|
153
|
-
export declare const
|
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
|
+
|
220
|
+
export declare const Button: default_3.FC<ButtonProps>;
|
154
221
|
|
155
222
|
export declare type ButtonProps = ButtonProps_2;
|
156
223
|
|
@@ -193,20 +260,27 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
|
|
193
260
|
ItemGroup: typeof ItemGroup;
|
194
261
|
};
|
195
262
|
|
196
|
-
export declare const
|
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
|
+
|
275
|
+
export declare const Container: default_3.FC<ContainerProps>;
|
197
276
|
|
198
277
|
export declare interface ContainerProps {
|
199
|
-
children:
|
278
|
+
children: default_3.ReactNode;
|
200
279
|
size?: TailwindMaxWidth;
|
201
280
|
className?: string;
|
202
281
|
}
|
203
282
|
|
204
|
-
|
205
|
-
children?: ReactNode;
|
206
|
-
onSubmit?: () => void;
|
207
|
-
}
|
208
|
-
|
209
|
-
declare type CustomInputTypeAttribute = default_2.HTMLInputTypeAttribute | "money";
|
283
|
+
declare type CustomInputTypeAttribute = default_3.HTMLInputTypeAttribute | "money";
|
210
284
|
|
211
285
|
export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange"> {
|
212
286
|
field?: ControllerRenderProps<any, any>;
|
@@ -220,7 +294,7 @@ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "
|
|
220
294
|
label?: string;
|
221
295
|
maxDate?: Date;
|
222
296
|
showTimeSelect?: boolean;
|
223
|
-
customOnChange?: (date: any, event:
|
297
|
+
customOnChange?: (date: any, event: default_3.SyntheticEvent<any>) => void;
|
224
298
|
customValue?: Date | null;
|
225
299
|
size?: TSize;
|
226
300
|
}
|
@@ -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,7 +326,11 @@ export declare type DropdownProps = DropdownProps_2;
|
|
245
326
|
|
246
327
|
export declare type DropdownPropsUnion = BaseProps_5 & DropdownProps;
|
247
328
|
|
248
|
-
export declare const
|
329
|
+
export declare const Empty: React.FC<EmptyProps>;
|
330
|
+
|
331
|
+
export declare type EmptyProps = EmptyProps_2;
|
332
|
+
|
333
|
+
export declare const ErrorMessage: default_3.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
249
334
|
|
250
335
|
export declare interface ErrorMessageProps {
|
251
336
|
errorMessage?: string;
|
@@ -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 {
|
@@ -283,8 +373,8 @@ export declare interface InputProps extends InputProps_2 {
|
|
283
373
|
customStyleInput?: string;
|
284
374
|
type?: CustomInputTypeAttribute;
|
285
375
|
afterOnChange?: (value: number | string | null) => void;
|
286
|
-
iconStartInput?:
|
287
|
-
iconEndInput?:
|
376
|
+
iconStartInput?: default_3.ReactNode;
|
377
|
+
iconEndInput?: default_3.ReactNode;
|
288
378
|
allowNegative?: boolean;
|
289
379
|
decimalScale?: number;
|
290
380
|
prefix?: string;
|
@@ -304,12 +394,12 @@ export declare interface LabelProps {
|
|
304
394
|
required?: boolean;
|
305
395
|
}
|
306
396
|
|
307
|
-
export declare const Layout:
|
308
|
-
Header:
|
309
|
-
Footer:
|
310
|
-
Content:
|
311
|
-
Sider:
|
312
|
-
_InternalSiderContext:
|
397
|
+
export declare const Layout: default_3.FC<LayoutProps> & {
|
398
|
+
Header: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
|
399
|
+
Footer: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
|
400
|
+
Content: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
|
401
|
+
Sider: default_3.ForwardRefExoticComponent<SiderProps & default_3.RefAttributes<HTMLDivElement>>;
|
402
|
+
_InternalSiderContext: default_3.Context<SiderContextProps>;
|
313
403
|
};
|
314
404
|
|
315
405
|
export declare type LayoutProps = BaseProps_8 & BasicProps;
|
@@ -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> & {
|
431
|
+
type?: ArgsProps["type"];
|
432
|
+
};
|
433
|
+
|
434
|
+
export declare type OptionalArgsToast = Partial<ArgsProps_2> & {
|
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 {
|
@@ -417,7 +553,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
417
553
|
setValue?: UseFormSetValue<T>;
|
418
554
|
handleSubmit?: FormEventHandler<any>;
|
419
555
|
reset?: UseFormReset<T>;
|
420
|
-
}) =>
|
556
|
+
}) => default_3.ReactNode;
|
421
557
|
onReset?: () => void;
|
422
558
|
classNamesContainer?: string;
|
423
559
|
classNameWrapperForm?: string;
|
@@ -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
|
|
@@ -509,8 +655,8 @@ export declare interface SwitchFieldProps extends Omit<SwitchProps, "onChange" |
|
|
509
655
|
|
510
656
|
declare type TabItem = {
|
511
657
|
key: string;
|
512
|
-
label:
|
513
|
-
children:
|
658
|
+
label: default_3.ReactNode;
|
659
|
+
children: default_3.ReactNode;
|
514
660
|
disabled?: boolean;
|
515
661
|
};
|
516
662
|
|
@@ -531,8 +677,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
531
677
|
onChangePage: (page: number) => void;
|
532
678
|
onChangePageSize: (size: number) => void;
|
533
679
|
onSort?: (sortField: string | number | symbol) => void;
|
534
|
-
rowsSelected?:
|
535
|
-
onSelect: (newSelectedRowKeys:
|
680
|
+
rowsSelected?: default_3.Key[];
|
681
|
+
onSelect: (newSelectedRowKeys: default_3.Key[]) => void;
|
536
682
|
onRowClick?: (record: T) => void;
|
537
683
|
rowKey?: string | ((record: T) => string);
|
538
684
|
className?: string;
|
@@ -540,7 +686,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
540
686
|
onSave?: (data: T) => void;
|
541
687
|
}
|
542
688
|
|
543
|
-
export declare const Tabs:
|
689
|
+
export declare const Tabs: default_3.FC<TabsProps>;
|
544
690
|
|
545
691
|
export declare type TabsProps = TabsProps_2 & {
|
546
692
|
items: TabItem[];
|
@@ -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: {
|
@@ -582,7 +732,7 @@ export declare interface TinyProps extends IAllProps {
|
|
582
732
|
text_patterns?: any;
|
583
733
|
}
|
584
734
|
|
585
|
-
export declare const Tooltip:
|
735
|
+
export declare const Tooltip: default_3.FC<TooltipProps>;
|
586
736
|
|
587
737
|
export declare type TooltipProps = TooltipProps_2;
|
588
738
|
|
@@ -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_3.Key[];
|
780
|
+
setRowsSelected: default_3.Dispatch<default_3.SetStateAction<default_3.Key[]>>;
|
781
|
+
setFilters: default_3.Dispatch<default_3.SetStateAction<InitialFiltersSearch<T>>>;
|
782
|
+
goToPage: (PageIndex: number) => void;
|
783
|
+
changeRowlimit: (value: number) => void;
|
784
|
+
resetToInitialFilters: () => void;
|
785
|
+
handleCheckBox: (newSelectedRowKeys: default_3.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 { }
|