@pnkx-lib/ui 1.9.207 → 1.9.209
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/ui/index.js +247 -61
- package/package.json +1 -1
- package/types/components/fields/CascaderField.d.ts +14 -0
- package/types/components/fields/Checkbox.d.ts +12 -0
- package/types/components/fields/DatePicker.d.ts +21 -0
- package/types/{DateRangePicker.d.ts → components/fields/DateRangePicker.d.ts} +13 -19
- package/types/components/fields/Input.d.ts +33 -0
- package/types/components/fields/PnkxField.d.ts +11 -0
- package/types/components/fields/Radio.d.ts +19 -0
- package/types/components/fields/Select.d.ts +13 -0
- package/types/{SliderRanger.d.ts → components/fields/SliderRanger.d.ts} +12 -18
- package/types/components/fields/SliderSingle.d.ts +12 -0
- package/types/components/fields/Switch.d.ts +12 -0
- package/types/components/fields/Textarea.d.ts +12 -0
- package/types/components/fields/TimePicker.d.ts +12 -0
- package/types/components/fields/TimeRangePicker.d.ts +12 -0
- package/types/{TinyMCE.d.ts → components/fields/TinyMCE.d.ts} +16 -22
- package/types/components/fields/Upload.d.ts +15 -0
- package/types/components/fields/index.d.ts +15 -0
- package/types/components/hooks/index.d.ts +2 -0
- package/types/components/hooks/useBreadcrumb.d.ts +6 -0
- package/types/components/hooks/useDebounce.d.ts +1 -0
- package/types/{useMessage.d.ts → components/hooks/useMessage.d.ts} +5 -9
- package/types/{useToast.d.ts → components/hooks/useToast.d.ts} +12 -16
- package/types/components/icons/ActivateIcon.d.ts +6 -0
- package/types/components/icons/AllowClearIcon.d.ts +2 -0
- package/types/components/icons/ApprovalIcon.d.ts +6 -0
- package/types/components/icons/CancelApprovalIcon.d.ts +6 -0
- package/types/components/icons/CancelSendApprovalIcon.d.ts +6 -0
- package/types/components/icons/DeleteIcon.d.ts +6 -0
- package/types/components/icons/Dollar.d.ts +3 -0
- package/types/components/icons/DragIcon.d.ts +6 -0
- package/types/components/icons/EditIcon.d.ts +6 -0
- package/types/components/icons/ErrorConfirmIcon.d.ts +3 -0
- package/types/components/icons/InActivateIcon.d.ts +6 -0
- package/types/components/icons/InfoConfirmIcon.d.ts +3 -0
- package/types/components/icons/MoreIcon.d.ts +6 -0
- package/types/components/icons/PlusIcon.d.ts +6 -0
- package/types/components/icons/RefuseApprovalIcon.d.ts +6 -0
- package/types/components/icons/RestoreIcon.d.ts +6 -0
- package/types/components/icons/SearchAdvanceIcon.d.ts +6 -0
- package/types/components/icons/SearchIcon.d.ts +2 -0
- package/types/components/icons/SendApprovalIcon.d.ts +6 -0
- package/types/components/icons/SettingIcon.d.ts +1 -0
- package/types/components/icons/SuccessIcon.d.ts +3 -0
- package/types/components/icons/TrashCanIcon.d.ts +2 -0
- package/types/components/icons/WaitingApprovalIcon.d.ts +6 -0
- package/types/components/icons/WarningConfirmIcon.d.ts +3 -0
- package/types/components/icons/index.d.ts +18 -0
- package/types/components/index.d.ts +3 -0
- package/types/components/ui/Alert.d.ts +3 -0
- package/types/components/ui/Anchor.d.ts +9 -0
- package/types/components/ui/Appfix.d.ts +6 -0
- package/types/components/ui/AutoComplete.d.ts +3 -0
- package/types/{Badge.d.ts → components/ui/Badge.d.ts} +8 -14
- package/types/{BottomPagination.d.ts → components/ui/BottomPagination.d.ts} +8 -12
- package/types/components/ui/Breadcrumb.d.ts +16 -0
- package/types/components/ui/BreadcrumbHeading.d.ts +8 -0
- package/types/components/ui/BulkActions/BulkAction.d.ts +10 -0
- package/types/components/ui/BulkActions/DropListActions.d.ts +9 -0
- package/types/components/ui/BulkActions/index.d.ts +22 -0
- package/types/components/ui/Button.d.ts +4 -0
- package/types/components/ui/Card.d.ts +3 -0
- package/types/components/ui/Cascader.d.ts +14 -0
- package/types/{CategoryStatus.d.ts → components/ui/CategoryStatus.d.ts} +20 -27
- package/types/components/ui/Col.d.ts +11 -0
- package/types/components/ui/Collapse.d.ts +3 -0
- package/types/components/ui/ColorPicker.d.ts +3 -0
- package/types/components/ui/ConfigProvider.d.ts +4 -0
- package/types/components/ui/ConfirmModal.d.ts +12 -0
- package/types/components/ui/Container.d.ts +8 -0
- package/types/components/ui/Divider.d.ts +6 -0
- package/types/components/ui/Drawer.d.ts +7 -0
- package/types/components/ui/Dropdown.d.ts +12 -0
- package/types/components/ui/Empty.d.ts +3 -0
- package/types/{ErrorBoundary.d.ts → components/ui/ErrorBoundary.d.ts} +18 -26
- package/types/components/ui/ErrorMessage.d.ts +7 -0
- package/types/components/ui/Flex.d.ts +9 -0
- package/types/components/ui/Footer.d.ts +2 -0
- package/types/components/ui/Heading.d.ts +10 -0
- package/types/components/ui/Image.d.ts +2 -0
- package/types/components/ui/Label.d.ts +5 -0
- package/types/components/ui/Layout.d.ts +14 -0
- package/types/components/ui/Menu.d.ts +22 -0
- package/types/components/ui/Modal.d.ts +6 -0
- package/types/components/ui/PageNotFound.d.ts +4 -0
- package/types/components/ui/Pagination.d.ts +12 -0
- package/types/components/ui/Popconfirm.d.ts +6 -0
- package/types/components/ui/Popover.d.ts +9 -0
- package/types/components/ui/QRCode.d.ts +3 -0
- package/types/components/ui/Rate.d.ts +2 -0
- package/types/components/ui/Result.d.ts +6 -0
- package/types/components/ui/Row.d.ts +7 -0
- package/types/{SearchFilterForm.d.ts → components/ui/SearchFilterForm.d.ts} +18 -29
- package/types/components/ui/Segmented.d.ts +3 -0
- package/types/components/ui/Sidebar.d.ts +22 -0
- package/types/components/ui/Skeleton.d.ts +6 -0
- package/types/components/ui/Space.d.ts +8 -0
- package/types/components/ui/Spin.d.ts +6 -0
- package/types/components/ui/Splitter.d.ts +8 -0
- package/types/components/ui/Statistic.d.ts +3 -0
- package/types/components/ui/Steps.d.ts +12 -0
- package/types/components/ui/Table/ActionRowTable/index.d.ts +10 -0
- package/types/components/ui/Table/HeadingTable/components/GroupHeadingButton.d.ts +13 -0
- package/types/components/ui/Table/HeadingTable/index.d.ts +16 -0
- package/types/components/ui/Table/SettingTable/IconSettingTable.d.ts +6 -0
- package/types/components/ui/Table/SettingTable/SettingColumnItem.d.ts +7 -0
- package/types/components/ui/Table/SettingTable/SortableItem.d.ts +6 -0
- package/types/components/ui/Table/SettingTable/index.d.ts +11 -0
- package/types/components/ui/Table/index.d.ts +46 -0
- package/types/components/ui/Tabs.d.ts +14 -0
- package/types/{Tag.d.ts → components/ui/Tag.d.ts} +5 -9
- package/types/components/ui/Timeline.d.ts +3 -0
- package/types/components/ui/Tooltip.d.ts +4 -0
- package/types/components/ui/Tour.d.ts +3 -0
- package/types/components/ui/Tree.d.ts +3 -0
- package/types/components/ui/Typography.d.ts +8 -0
- package/types/components/ui/UploadImage.d.ts +6 -0
- package/types/{Watermark.d.ts → components/ui/Watermark.d.ts} +2 -6
- package/types/components/ui/index.d.ts +60 -0
- package/types/constants/common.d.ts +1 -0
- package/types/constants/table.d.ts +31 -0
- package/types/helpers/common.d.ts +1 -0
- package/types/index.d.ts +2 -42
- package/types/Alert.d.ts +0 -7
- package/types/Anchor.d.ts +0 -13
- package/types/Appfix.d.ts +0 -11
- package/types/AutoComplete.d.ts +0 -7
- package/types/Breadcrumb.d.ts +0 -27
- package/types/BreadcrumbHeading.d.ts +0 -26
- package/types/Button.d.ts +0 -8
- package/types/Card.d.ts +0 -7
- package/types/Cascader.d.ts +0 -22
- package/types/CascaderField.d.ts +0 -20
- package/types/Checkbox.d.ts +0 -18
- package/types/Col.d.ts +0 -19
- package/types/Collapse.d.ts +0 -7
- package/types/ColorPicker.d.ts +0 -7
- package/types/ConfigProvider.d.ts +0 -8
- package/types/ConfirmModal.d.ts +0 -23
- package/types/Container.d.ts +0 -13
- package/types/DatePicker.d.ts +0 -29
- package/types/Divider.d.ts +0 -11
- package/types/Drawer.d.ts +0 -12
- package/types/Dropdown.d.ts +0 -21
- package/types/Empty.d.ts +0 -7
- package/types/ErrorMessage.d.ts +0 -12
- package/types/Flex.d.ts +0 -15
- package/types/Footer.d.ts +0 -6
- package/types/Heading.d.ts +0 -27
- package/types/Image.d.ts +0 -6
- package/types/Input.d.ts +0 -42
- package/types/Label.d.ts +0 -10
- package/types/Layout.d.ts +0 -20
- package/types/Menu.d.ts +0 -40
- package/types/Modal.d.ts +0 -11
- package/types/PageNotFound.d.ts +0 -9
- package/types/Pagination.d.ts +0 -22
- package/types/PnkxField.d.ts +0 -17
- package/types/Popconfirm.d.ts +0 -11
- package/types/Popover.d.ts +0 -15
- package/types/QRCode.d.ts +0 -7
- package/types/Radio.d.ts +0 -26
- package/types/Rate.d.ts +0 -5
- package/types/Result.d.ts +0 -11
- package/types/Row.d.ts +0 -12
- package/types/Segmented.d.ts +0 -7
- package/types/Select.d.ts +0 -20
- package/types/Sidebar.d.ts +0 -29
- package/types/Skeleton.d.ts +0 -11
- package/types/SliderSingle.d.ts +0 -18
- package/types/Space.d.ts +0 -13
- package/types/Spin.d.ts +0 -11
- package/types/Splitter.d.ts +0 -13
- package/types/Statistic.d.ts +0 -7
- package/types/Steps.d.ts +0 -20
- package/types/Switch.d.ts +0 -18
- package/types/Tabs.d.ts +0 -18
- package/types/Textarea.d.ts +0 -17
- package/types/TimePicker.d.ts +0 -16
- package/types/TimeRangePicker.d.ts +0 -16
- package/types/Timeline.d.ts +0 -7
- package/types/Tooltip.d.ts +0 -8
- package/types/Tour.d.ts +0 -7
- package/types/Tree.d.ts +0 -7
- package/types/Typography.d.ts +0 -12
- package/types/Upload.d.ts +0 -23
- package/types/UploadImage.d.ts +0 -9
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ErrorMessageProps {
|
|
3
|
+
errorMessage?: string;
|
|
4
|
+
isTouched?: boolean;
|
|
5
|
+
isSubmitted?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ErrorMessage: React.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FlexProps as FlexPropsAntd } from 'antd';
|
|
2
|
+
type BaseProps = {
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
flexClassName?: string;
|
|
5
|
+
};
|
|
6
|
+
export type FlexProps = FlexPropsAntd;
|
|
7
|
+
export type FlexPropsUnion = BaseProps & FlexProps;
|
|
8
|
+
export declare const Flex: (props: FlexPropsUnion) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MenuType } from './Sidebar';
|
|
3
|
+
export interface HeadingProps {
|
|
4
|
+
rightContent?: ReactNode;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
noBreadcum?: boolean;
|
|
7
|
+
classNameWrapHeading?: string;
|
|
8
|
+
menu: Array<MenuType>;
|
|
9
|
+
}
|
|
10
|
+
export declare const Heading: (props: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BasicProps as AntdBasicProps } from 'antd/es/layout/layout';
|
|
3
|
+
type BaseProps = {
|
|
4
|
+
layoutClassName?: string;
|
|
5
|
+
};
|
|
6
|
+
export type LayoutProps = BaseProps & AntdBasicProps;
|
|
7
|
+
export declare const Layout: React.FC<LayoutProps> & {
|
|
8
|
+
Header: React.ForwardRefExoticComponent<AntdBasicProps & React.RefAttributes<HTMLElement>>;
|
|
9
|
+
Footer: React.ForwardRefExoticComponent<AntdBasicProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
Content: React.ForwardRefExoticComponent<AntdBasicProps & React.RefAttributes<HTMLElement>>;
|
|
11
|
+
Sider: React.ForwardRefExoticComponent<import('antd/es/layout/Sider').SiderProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
_InternalSiderContext: React.Context<import('antd/es/layout/Sider').SiderContextProps>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MenuProps as AntdMenuProps, MenuItemProps as AntdMenuItemProps, SubMenuProps as AntdSubMenuProps } from 'antd/es/menu';
|
|
3
|
+
type ExtraProps = {
|
|
4
|
+
containerClassName?: string;
|
|
5
|
+
menuClassName?: string;
|
|
6
|
+
};
|
|
7
|
+
export type MenuProps = AntdMenuProps;
|
|
8
|
+
export type MenuItemProps = AntdMenuItemProps;
|
|
9
|
+
export type SubMenuProps = AntdSubMenuProps;
|
|
10
|
+
export type MenuComponentProps = ExtraProps & MenuProps;
|
|
11
|
+
declare const MenuItem: FC<MenuItemProps>;
|
|
12
|
+
declare const SubMenu: FC<SubMenuProps>;
|
|
13
|
+
declare const Divider: FC<import('antd/es/menu').MenuDividerProps>;
|
|
14
|
+
declare const ItemGroup: import('react').ForwardRefExoticComponent<Omit<import('rc-menu/lib/MenuItemGroup').MenuItemGroupProps, "ref"> & import('react').RefAttributes<HTMLLIElement>>;
|
|
15
|
+
type CompoundedMenu = FC<MenuComponentProps> & {
|
|
16
|
+
Item: typeof MenuItem;
|
|
17
|
+
SubMenu: typeof SubMenu;
|
|
18
|
+
Divider: typeof Divider;
|
|
19
|
+
ItemGroup: typeof ItemGroup;
|
|
20
|
+
};
|
|
21
|
+
export declare const Menu: CompoundedMenu;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ModalProps as ModalPropsAntd } from 'antd';
|
|
3
|
+
export interface ModalProps extends ModalPropsAntd {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const Modal: ({ children, ...rest }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Pagination as PaginationAntd, PaginationProps as PaginationPropsAntd } from 'antd';
|
|
2
|
+
export type { PaginationLocale } from 'rc-pagination';
|
|
3
|
+
type BaseProps = {
|
|
4
|
+
containerClassName?: string;
|
|
5
|
+
paginationClassName?: string;
|
|
6
|
+
};
|
|
7
|
+
export type PaginationProps = PaginationPropsAntd;
|
|
8
|
+
export type PaginationPropsUnion = BaseProps & PaginationProps;
|
|
9
|
+
export type PaginationConfig = Omit<PaginationProps, "rootClassName"> & {
|
|
10
|
+
position?: "top" | "bottom" | "both";
|
|
11
|
+
};
|
|
12
|
+
export declare const Pagination: typeof PaginationAntd;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PopconfirmProps as AntdPopconfirmProps } from 'antd';
|
|
3
|
+
export interface PopconfirmProps extends AntdPopconfirmProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PopoverProps as PopoverPropsAntd } from 'antd';
|
|
2
|
+
type BaseProps = {
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
popoverClassName?: string;
|
|
5
|
+
};
|
|
6
|
+
export type PopoverProps = PopoverPropsAntd;
|
|
7
|
+
export type PopoverPropsUnion = BaseProps & PopoverProps;
|
|
8
|
+
export declare const Popover: (props: PopoverPropsUnion) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ResultProps as AntdResultProps } from 'antd';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface ResultProps extends AntdResultProps {
|
|
4
|
+
children?: ReactNode | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Result: ({ children, ...rest }: ResultProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}) => default_2.ReactNode;
|
|
20
|
-
onReset?: () => void;
|
|
21
|
-
classNamesContainer?: string;
|
|
22
|
-
classNameWrapperForm?: string;
|
|
23
|
-
hideDefaultSubmit?: boolean;
|
|
24
|
-
hideResetButton?: boolean;
|
|
25
|
-
initialValues?: DefaultValues<T>;
|
|
26
|
-
onSubmit: (data: T) => void;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { }
|
|
1
|
+
import { default as React, FormEventHandler } from 'react';
|
|
2
|
+
import { Control, DefaultValues, FieldValues, UseFormReset, UseFormReturn, UseFormSetValue } from 'react-hook-form';
|
|
3
|
+
export interface SearchFiltersFormProps<T extends FieldValues> {
|
|
4
|
+
renderFilterFields?: (options: {
|
|
5
|
+
control: Control<T, any, T>;
|
|
6
|
+
setValue?: UseFormSetValue<T>;
|
|
7
|
+
handleSubmit?: FormEventHandler<any>;
|
|
8
|
+
reset?: UseFormReset<T>;
|
|
9
|
+
}) => React.ReactNode;
|
|
10
|
+
onReset?: () => void;
|
|
11
|
+
classNamesContainer?: string;
|
|
12
|
+
classNameWrapperForm?: string;
|
|
13
|
+
hideDefaultSubmit?: boolean;
|
|
14
|
+
hideResetButton?: boolean;
|
|
15
|
+
initialValues?: DefaultValues<T>;
|
|
16
|
+
onSubmit: (data: T) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode, default as React } from 'react';
|
|
2
|
+
export type MenuType = {
|
|
3
|
+
name: string;
|
|
4
|
+
path: string;
|
|
5
|
+
isShow?: boolean;
|
|
6
|
+
isPrivateRoute?: boolean;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
isShowLabel?: boolean;
|
|
9
|
+
component?: React.LazyExoticComponent<React.MemoExoticComponent<any>> | React.ExoticComponent<any> | ReactNode | React.FC;
|
|
10
|
+
componentProps?: Record<string, any>;
|
|
11
|
+
children?: MenuType[];
|
|
12
|
+
};
|
|
13
|
+
export interface SidebarProps {
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
menu: Array<MenuType>;
|
|
16
|
+
userInfo?: {
|
|
17
|
+
avatar: string;
|
|
18
|
+
name: string;
|
|
19
|
+
email: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare const Sidebar: ({ children, menu, userInfo }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SkeletonProps as AntdSkeletonProps } from 'antd';
|
|
2
|
+
export interface SkeletonProps extends AntdSkeletonProps {
|
|
3
|
+
type?: "table" | "form";
|
|
4
|
+
skeletonButtonCount?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Space as SpaceAntd, SpaceProps as SpacePropsAntd } from 'antd';
|
|
2
|
+
type BaseProps = {
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
spaceClassName?: string;
|
|
5
|
+
};
|
|
6
|
+
export type SpacePropsUnion = BaseProps & SpacePropsAntd;
|
|
7
|
+
export declare const Space: typeof SpaceAntd;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SpinProps as AntdSpinProps } from 'antd';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface PnkxSpinProps extends AntdSpinProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Splitter as SplitterAntd, SplitterProps as SplitterPropsAntd } from 'antd';
|
|
2
|
+
type BaseProps = {
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
spaceClassName?: string;
|
|
5
|
+
};
|
|
6
|
+
export type SplitterPropsUnion = BaseProps & SplitterPropsAntd;
|
|
7
|
+
export declare const Splitter: typeof SplitterAntd;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Steps as AntdSteps, StepsProps as AntdStepsProps, StepProps as AntdStepProps } from 'antd';
|
|
2
|
+
type BaseProps = {
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
stepsClassName?: string;
|
|
5
|
+
};
|
|
6
|
+
export type StepProps = AntdStepProps;
|
|
7
|
+
export interface StepsProps extends AntdStepsProps {
|
|
8
|
+
items?: StepProps[];
|
|
9
|
+
}
|
|
10
|
+
export type StepsPropsUnion = BaseProps & StepsProps;
|
|
11
|
+
export declare const Steps: typeof AntdSteps;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TypeActionRowTable } from '../../../../constants/table';
|
|
3
|
+
export interface ActionRowTableProps {
|
|
4
|
+
type: TypeActionRowTable;
|
|
5
|
+
handleClick?: () => void;
|
|
6
|
+
contentTooltip?: React.ReactNode;
|
|
7
|
+
content?: React.ReactNode;
|
|
8
|
+
diabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InitialFiltersSearch } from '@pnkx-lib/core';
|
|
2
|
+
import { TFilters } from '../../..';
|
|
3
|
+
export interface GroupHeadingButtonItem {
|
|
4
|
+
label: string;
|
|
5
|
+
quantity: number;
|
|
6
|
+
status: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface GroupHeadingButtonProps {
|
|
9
|
+
groupHeadingButtonItems?: GroupHeadingButtonItem[];
|
|
10
|
+
setFilters: (nextFilter: InitialFiltersSearch<TFilters>) => void;
|
|
11
|
+
filters: InitialFiltersSearch<TFilters>;
|
|
12
|
+
}
|
|
13
|
+
export declare const GroupHeadingButton: (props: GroupHeadingButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GroupHeadingButtonItem } from './components/GroupHeadingButton';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { InitialFiltersSearch } from '@pnkx-lib/core';
|
|
4
|
+
import { MenuType, TFilters } from '../..';
|
|
5
|
+
export interface IHeadingCatgoryProps {
|
|
6
|
+
setOpenStting: (value: boolean) => void;
|
|
7
|
+
showSetting?: boolean;
|
|
8
|
+
renderHeadingSearch?: () => ReactNode;
|
|
9
|
+
rightHeadingContent?: ReactNode;
|
|
10
|
+
menu: Array<MenuType>;
|
|
11
|
+
groupHeadingButtonItems?: GroupHeadingButtonItem[];
|
|
12
|
+
setFilters: (nextFilter: InitialFiltersSearch<TFilters>) => void;
|
|
13
|
+
filters: InitialFiltersSearch<TFilters>;
|
|
14
|
+
noBreadcum?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const HeadingTable: (props: IHeadingCatgoryProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TableColumnsType } from '..';
|
|
3
|
+
export interface SettingTableProps<T> {
|
|
4
|
+
open: boolean;
|
|
5
|
+
setOpen: (open: boolean) => void;
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
showSetting?: boolean;
|
|
8
|
+
defaultSettingColumnItems: TableColumnsType<T>;
|
|
9
|
+
setDefaultSettingColumnItems?: (newColumns: TableColumnsType<T>) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const SettingTable: <T>(props: SettingTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { TableColumnsType as TableColumnsTypeAntd } from 'antd';
|
|
3
|
+
import { TableProps } from 'antd/lib/table';
|
|
4
|
+
import { SorterResult } from 'antd/es/table/interface';
|
|
5
|
+
import { BulkActionHandlers, InitialFiltersSearch } from '@pnkx-lib/core';
|
|
6
|
+
import { MenuType } from '../Sidebar';
|
|
7
|
+
import { GroupHeadingButtonItem } from './HeadingTable/components/GroupHeadingButton';
|
|
8
|
+
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
9
|
+
interface RowCommon {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
}
|
|
12
|
+
type ColumnTypes<T> = Exclude<TableProps<T>["columns"], undefined>;
|
|
13
|
+
export type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {})[];
|
|
14
|
+
export type TableColumnsType<T> = TableColumnsTypeAntd<T> & TableColumnsTypeEditable<T>;
|
|
15
|
+
export type TFilters = {
|
|
16
|
+
status?: unknown;
|
|
17
|
+
};
|
|
18
|
+
export interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
|
19
|
+
dataSource?: T[];
|
|
20
|
+
columns: TableColumnsType<T>;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
totalItems?: number;
|
|
23
|
+
filters: InitialFiltersSearch<TFilters>;
|
|
24
|
+
onChangePage: (page: number) => void;
|
|
25
|
+
onChangePageSize: (size: number) => void;
|
|
26
|
+
onSort?: (sortField: SorterResult<T> | SorterResult<T>[]) => void;
|
|
27
|
+
rowsSelected?: React.Key[];
|
|
28
|
+
onSelect: (newSelectedRowKeys: React.Key[]) => void;
|
|
29
|
+
onRowClick?: (record: T) => void;
|
|
30
|
+
rowKey?: string | ((record: T) => string);
|
|
31
|
+
titleSettingTableModal?: string;
|
|
32
|
+
showSetting?: boolean;
|
|
33
|
+
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
|
34
|
+
renderHeadingSearch?: () => ReactNode;
|
|
35
|
+
rightHeadingContent?: ReactNode;
|
|
36
|
+
menu: Array<MenuType>;
|
|
37
|
+
groupHeadingButtonItems?: GroupHeadingButtonItem[];
|
|
38
|
+
showIndexColumn?: boolean;
|
|
39
|
+
setFilters: (nextFilter: InitialFiltersSearch<TFilters>) => void;
|
|
40
|
+
noBreadcum?: boolean;
|
|
41
|
+
bulkActionHandlers?: BulkActionHandlers;
|
|
42
|
+
size?: SizeType;
|
|
43
|
+
defaultEllipsis?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, groupHeadingButtonItems, showIndexColumn, setFilters, noBreadcum, bulkActionHandlers, size, defaultEllipsis, ...rest }: TableCommonProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TabsProps as TabsPropsAntd } from 'antd';
|
|
3
|
+
type TabItem = {
|
|
4
|
+
key: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type TabsProps = TabsPropsAntd & {
|
|
10
|
+
items: TabItem[];
|
|
11
|
+
lazyRender?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const Tabs: React.FC<TabsProps>;
|
|
14
|
+
export {};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { TagProps } from 'antd';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare
|
|
6
|
-
children: React.ReactNode | string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { }
|
|
1
|
+
import { TagProps } from 'antd';
|
|
2
|
+
export interface TaglineProps extends TagProps {
|
|
3
|
+
children: React.ReactNode | string;
|
|
4
|
+
}
|
|
5
|
+
export declare const Tag: React.FC<TaglineProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TitleProps } from 'antd/es/typography/Title';
|
|
2
|
+
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
|
3
|
+
import { TextProps } from 'antd/es/typography/Text';
|
|
4
|
+
export declare const Typography: {
|
|
5
|
+
Title: (props: TitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Paragraph: (props: ParagraphProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Text: (props: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
|
|
5
|
-
|
|
6
|
-
export { }
|
|
1
|
+
import { WatermarkProps } from 'antd';
|
|
2
|
+
export declare const Watermark: ({ ...rest }: WatermarkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export * from './Button';
|
|
2
|
+
export * from './Cascader';
|
|
3
|
+
export * from './ErrorMessage';
|
|
4
|
+
export * from './Typography';
|
|
5
|
+
export * from './Table';
|
|
6
|
+
export * from './Modal';
|
|
7
|
+
export * from './Tooltip';
|
|
8
|
+
export * from './Tabs';
|
|
9
|
+
export * from './Label';
|
|
10
|
+
export * from './Skeleton';
|
|
11
|
+
export * from './Popover';
|
|
12
|
+
export * from './SearchFilterForm';
|
|
13
|
+
export * from './Container';
|
|
14
|
+
export * from './Badge';
|
|
15
|
+
export * from './Col';
|
|
16
|
+
export * from './Row';
|
|
17
|
+
export * from './Dropdown';
|
|
18
|
+
export * from './Breadcrumb';
|
|
19
|
+
export * from './Flex';
|
|
20
|
+
export * from './Layout';
|
|
21
|
+
export * from './Space';
|
|
22
|
+
export * from './Splitter';
|
|
23
|
+
export * from './Menu';
|
|
24
|
+
export * from './Pagination';
|
|
25
|
+
export * from './Steps';
|
|
26
|
+
export * from './Sidebar';
|
|
27
|
+
export * from './Heading';
|
|
28
|
+
export * from './Tag';
|
|
29
|
+
export * from './Divider';
|
|
30
|
+
export * from './Alert';
|
|
31
|
+
export * from './Spin';
|
|
32
|
+
export * from './Drawer';
|
|
33
|
+
export * from './Popconfirm';
|
|
34
|
+
export * from './QRCode';
|
|
35
|
+
export * from './Result';
|
|
36
|
+
export * from './Rate';
|
|
37
|
+
export * from './Segmented';
|
|
38
|
+
export * from './Statistic';
|
|
39
|
+
export * from './Timeline';
|
|
40
|
+
export * from './Tour';
|
|
41
|
+
export * from './Tree';
|
|
42
|
+
export * from './Watermark';
|
|
43
|
+
export * from './Anchor';
|
|
44
|
+
export * from './Appfix';
|
|
45
|
+
export * from './AutoComplete';
|
|
46
|
+
export * from './Collapse';
|
|
47
|
+
export * from './ColorPicker';
|
|
48
|
+
export * from './Empty';
|
|
49
|
+
export * from './Image';
|
|
50
|
+
export * from './ConfirmModal';
|
|
51
|
+
export * from './ErrorBoundary';
|
|
52
|
+
export * from './CategoryStatus';
|
|
53
|
+
export * from '../ui/Table/ActionRowTable';
|
|
54
|
+
export * from '../../constants/index';
|
|
55
|
+
export * from './BulkActions';
|
|
56
|
+
export * from './BreadcrumbHeading';
|
|
57
|
+
export * from './Card';
|
|
58
|
+
export * from './ConfigProvider';
|
|
59
|
+
export * from './PageNotFound';
|
|
60
|
+
export * from './UploadImage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TINY_API = "miai0qn3c79adm555yoxd9kz6j6a323ek760nf7qd81nv1p5";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const START_PAGE = 1;
|
|
2
|
+
export declare const START_PAGE_SIZE = 10;
|
|
3
|
+
export declare const PAGE_NUMBER = "page";
|
|
4
|
+
export declare const PAGE_SIZE = "size";
|
|
5
|
+
export declare const SORT = "sort";
|
|
6
|
+
export declare enum TypeActionRowTable {
|
|
7
|
+
DELETE = "DELETE",
|
|
8
|
+
EDIT = "EDIT",
|
|
9
|
+
UNDO = "UNDO",
|
|
10
|
+
CANCELUNDO = "CANCELUNDO",
|
|
11
|
+
CHECKIN = "CHECKIN",
|
|
12
|
+
PRINT = "PRINT",
|
|
13
|
+
PAYMENT = "PAYMENT",
|
|
14
|
+
PLAY = "PLAY",
|
|
15
|
+
PAUSE = "PAUSE",
|
|
16
|
+
DOWNLOAD = "DOWNLOAD",
|
|
17
|
+
VIEW = "VIEW"
|
|
18
|
+
}
|
|
19
|
+
export declare enum TypeBulkActions {
|
|
20
|
+
BULKACTION = "bulkaction",
|
|
21
|
+
DROPLIST = "droplist"
|
|
22
|
+
}
|
|
23
|
+
export declare enum TypeStatusTable {
|
|
24
|
+
ALL = "ALL",// Tất cả
|
|
25
|
+
DRAFT = 0,// Tạo mới
|
|
26
|
+
WAITING_APPROVAL = 1,// Chờ duyệt
|
|
27
|
+
ACTIVE = 2,// Hoạt động
|
|
28
|
+
INACTIVE = 3,// Ngưng hoạt động
|
|
29
|
+
REJECTED = 4,// Từ chối duyệt
|
|
30
|
+
DELETED = 5
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hasFalsyFieldsObject<T extends object>(obj: T): boolean;
|