@pnkx-lib/ui 1.9.106 → 1.9.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/es/chunks/{AntdIcon-z4k2QiG_.js → AntdIcon-CwSrIOy0.js} +44 -30
- package/es/chunks/{Switch-DCc6-8ks.js → Switch-CCKfNjFl.js} +1 -1
- package/es/chunks/{index-B65Odp7H.js → index-BdvBQ4xR.js} +72 -41
- package/es/fields/index.js +2 -2
- package/es/index.js +3 -3
- package/es/ui/index.js +2 -2
- package/package.json +2 -2
- package/types/fields.d.ts +13 -13
- package/types/index.d.ts +64 -51
- package/types/ui.d.ts +52 -39
package/types/ui.d.ts
CHANGED
@@ -35,7 +35,7 @@ import { FormEventHandler } from 'react';
|
|
35
35
|
import { ForwardRefExoticComponent } from 'react';
|
36
36
|
import { ImageProps } from 'antd';
|
37
37
|
import { InitialFiltersSearch } from '@pnkx-lib/core';
|
38
|
-
import { JSX } from 'react/jsx-runtime';
|
38
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
39
39
|
import { MenuDividerProps } from 'antd/es/menu';
|
40
40
|
import { MenuItemGroupProps } from 'rc-menu/lib/MenuItemGroup';
|
41
41
|
import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
|
@@ -77,14 +77,16 @@ import { TitleProps } from 'antd/es/typography/Title';
|
|
77
77
|
import { TooltipProps as TooltipProps_2 } from 'antd';
|
78
78
|
import { TourProps as TourProps_2 } from 'antd';
|
79
79
|
import { TreeProps as TreeProps_2 } from 'antd';
|
80
|
-
import { TypeActionRowTable as TypeActionRowTable_2 } from '
|
81
|
-
import { TypeBulkActions as TypeBulkActions_2 } from '
|
80
|
+
import { TypeActionRowTable as TypeActionRowTable_2 } from '../../../../../../../../../../../../src/constants/table';
|
81
|
+
import { TypeBulkActions as TypeBulkActions_2 } from '../../../../../../../../../../../src/constants';
|
82
|
+
import { TypeStatusTable as TypeStatusTable_2 } from '../../../../../../../../../../../src/constants';
|
83
|
+
import { TypeStatusTable as TypeStatusTable_3 } from '../../../../../../../../../../../../../src/components/ui';
|
82
84
|
import { UseFormReset } from 'react-hook-form';
|
83
85
|
import { UseFormReturn } from 'react-hook-form';
|
84
86
|
import { UseFormSetValue } from 'react-hook-form';
|
85
87
|
import { WatermarkProps } from 'antd';
|
86
88
|
|
87
|
-
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) =>
|
89
|
+
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX_2.Element;
|
88
90
|
|
89
91
|
export declare interface ActionRowTableProps {
|
90
92
|
type: TypeActionRowTable_2;
|
@@ -104,7 +106,7 @@ export declare const Anchor: typeof Anchor_2 & {
|
|
104
106
|
|
105
107
|
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
106
108
|
|
107
|
-
export declare const Appfix: ({ children, ...rest }: AppfixProps) =>
|
109
|
+
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX_2.Element;
|
108
110
|
|
109
111
|
export declare interface AppfixProps extends AffixProps {
|
110
112
|
children: default_2.ReactNode;
|
@@ -114,7 +116,7 @@ export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
|
114
116
|
|
115
117
|
export declare type AutoCompleteProps = AutoCompleteProps_2;
|
116
118
|
|
117
|
-
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) =>
|
119
|
+
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX_2.Element;
|
118
120
|
|
119
121
|
export declare interface BadgeProps extends BadgeProps_2 {
|
120
122
|
type?: "error" | "info" | "success" | "warning";
|
@@ -184,7 +186,7 @@ declare type BaseProps_9 = {
|
|
184
186
|
spaceClassName?: string;
|
185
187
|
};
|
186
188
|
|
187
|
-
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) =>
|
189
|
+
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX_2.Element;
|
188
190
|
|
189
191
|
export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
|
190
192
|
children?: Omit<BreadcrumbItemType, "children">[];
|
@@ -196,13 +198,13 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
196
198
|
|
197
199
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
198
200
|
|
199
|
-
export declare const BulkActions: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: IBulkActionsProps) =>
|
201
|
+
export declare const BulkActions: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: IBulkActionsProps) => JSX_2.Element;
|
200
202
|
|
201
203
|
export declare const Button: default_2.FC<ButtonProps>;
|
202
204
|
|
203
205
|
export declare type ButtonProps = ButtonProps_2;
|
204
206
|
|
205
|
-
export declare const CascaderField: (props: CascaderFieldProps) =>
|
207
|
+
export declare const CascaderField: (props: CascaderFieldProps) => JSX_2.Element;
|
206
208
|
|
207
209
|
export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
|
208
210
|
|
@@ -215,13 +217,13 @@ declare enum CATEGORY_LIST_ENUM {
|
|
215
217
|
DELETE = 5, // đã xóa
|
216
218
|
}
|
217
219
|
|
218
|
-
export declare const CategoryStatus: ({ status }: CategoryStatusProps) =>
|
220
|
+
export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX_2.Element;
|
219
221
|
|
220
222
|
export declare interface CategoryStatusProps {
|
221
223
|
status: number;
|
222
224
|
}
|
223
225
|
|
224
|
-
export declare const Col: (props: ColPropsUnion) =>
|
226
|
+
export declare const Col: (props: ColPropsUnion) => JSX_2.Element;
|
225
227
|
|
226
228
|
export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
|
227
229
|
}
|
@@ -239,7 +241,7 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
|
|
239
241
|
ItemGroup: typeof ItemGroup;
|
240
242
|
};
|
241
243
|
|
242
|
-
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) =>
|
244
|
+
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX_2.Element;
|
243
245
|
|
244
246
|
export declare interface ConfirmModalProps extends ModalProps {
|
245
247
|
title: string;
|
@@ -261,7 +263,7 @@ export declare interface ContainerProps {
|
|
261
263
|
className?: string;
|
262
264
|
}
|
263
265
|
|
264
|
-
export declare const Divider: ({ children, ...rest }: DividerProps) =>
|
266
|
+
export declare const Divider: ({ children, ...rest }: DividerProps) => JSX_2.Element;
|
265
267
|
|
266
268
|
declare const Divider_2: FC<MenuDividerProps>;
|
267
269
|
|
@@ -269,14 +271,14 @@ export declare interface DividerProps extends DividerProps_2 {
|
|
269
271
|
children?: ReactNode | string;
|
270
272
|
}
|
271
273
|
|
272
|
-
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) =>
|
274
|
+
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX_2.Element;
|
273
275
|
|
274
276
|
export declare interface DrawerProps extends DrawerProps_2 {
|
275
277
|
children?: ReactNode;
|
276
278
|
onSubmit?: (values: any) => void;
|
277
279
|
}
|
278
280
|
|
279
|
-
export declare const Dropdown: (props: DropdownPropsUnion) =>
|
281
|
+
export declare const Dropdown: (props: DropdownPropsUnion) => JSX_2.Element;
|
280
282
|
|
281
283
|
export declare type DropdownButtonProps = DropdownButtonProps_2;
|
282
284
|
|
@@ -310,7 +312,7 @@ export declare interface ErrorBoundaryState {
|
|
310
312
|
errorInfo: ErrorInfo | null;
|
311
313
|
}
|
312
314
|
|
313
|
-
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) =>
|
315
|
+
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX_2.Element | null>;
|
314
316
|
|
315
317
|
export declare interface ErrorMessageProps {
|
316
318
|
errorMessage?: string;
|
@@ -323,7 +325,7 @@ declare type ExtraProps = {
|
|
323
325
|
menuClassName?: string;
|
324
326
|
};
|
325
327
|
|
326
|
-
export declare const Flex: (props: FlexPropsUnion) =>
|
328
|
+
export declare const Flex: (props: FlexPropsUnion) => JSX_2.Element;
|
327
329
|
|
328
330
|
export declare type FlexProps = FlexProps_2;
|
329
331
|
|
@@ -332,10 +334,10 @@ export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
|
|
332
334
|
declare interface GroupHeadingButtonItem {
|
333
335
|
label: string;
|
334
336
|
quantity: number;
|
335
|
-
isStatus:
|
337
|
+
isStatus: TypeStatusTable_3;
|
336
338
|
}
|
337
339
|
|
338
|
-
export declare const Heading: (props: HeadingProps) =>
|
340
|
+
export declare const Heading: (props: HeadingProps) => JSX_2.Element;
|
339
341
|
|
340
342
|
export declare interface HeadingProps {
|
341
343
|
rightContent?: ReactNode;
|
@@ -356,8 +358,8 @@ declare interface IBulkActionsProps {
|
|
356
358
|
handleDelete?: () => void;
|
357
359
|
handleActivate?: () => void;
|
358
360
|
handleInActivate?: () => void;
|
359
|
-
status?:
|
360
|
-
type
|
361
|
+
status?: TypeStatusTable_2;
|
362
|
+
type: TypeBulkActions_2;
|
361
363
|
}
|
362
364
|
|
363
365
|
declare const Image_2: React.FC<ImageProps>;
|
@@ -369,7 +371,7 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
|
|
369
371
|
|
370
372
|
export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
371
373
|
|
372
|
-
export declare const Label: ({ label, required }: LabelProps) =>
|
374
|
+
export declare const Label: ({ label, required }: LabelProps) => JSX_2.Element;
|
373
375
|
|
374
376
|
export declare interface LabelProps {
|
375
377
|
label: string;
|
@@ -422,7 +424,7 @@ export declare type MenuType = {
|
|
422
424
|
}[];
|
423
425
|
};
|
424
426
|
|
425
|
-
export declare const Modal: ({ children, ...rest }: ModalProps) =>
|
427
|
+
export declare const Modal: ({ children, ...rest }: ModalProps) => JSX_2.Element;
|
426
428
|
|
427
429
|
export declare interface ModalProps extends ModalProps_2 {
|
428
430
|
children?: ReactNode;
|
@@ -432,9 +434,9 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
|
|
432
434
|
multiple: true;
|
433
435
|
};
|
434
436
|
|
435
|
-
export declare const PAGE_NUMBER = "
|
437
|
+
export declare const PAGE_NUMBER = "page";
|
436
438
|
|
437
|
-
export declare const PAGE_SIZE = "
|
439
|
+
export declare const PAGE_SIZE = "size";
|
438
440
|
|
439
441
|
export declare const Pagination: typeof Pagination_2;
|
440
442
|
|
@@ -458,13 +460,13 @@ export declare interface PnkxSpinProps extends SpinProps {
|
|
458
460
|
children?: ReactNode;
|
459
461
|
}
|
460
462
|
|
461
|
-
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) =>
|
463
|
+
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX_2.Element;
|
462
464
|
|
463
465
|
export declare interface PopconfirmProps extends PopconfirmProps_2 {
|
464
466
|
children?: ReactNode;
|
465
467
|
}
|
466
468
|
|
467
|
-
export declare const Popover: (props: PopoverPropsUnion) =>
|
469
|
+
export declare const Popover: (props: PopoverPropsUnion) => JSX_2.Element;
|
468
470
|
|
469
471
|
export declare type PopoverProps = PopoverProps_2;
|
470
472
|
|
@@ -476,13 +478,13 @@ export declare type QRCodeProps = QRCodeProps_2;
|
|
476
478
|
|
477
479
|
export declare const Rate: React.FC<RateProps>;
|
478
480
|
|
479
|
-
export declare const Result: ({ children, ...rest }: ResultProps) =>
|
481
|
+
export declare const Result: ({ children, ...rest }: ResultProps) => JSX_2.Element;
|
480
482
|
|
481
483
|
export declare interface ResultProps extends ResultProps_2 {
|
482
484
|
children?: ReactNode | string;
|
483
485
|
}
|
484
486
|
|
485
|
-
export declare const Row: (props: RowPropsUnion) =>
|
487
|
+
export declare const Row: (props: RowPropsUnion) => JSX_2.Element;
|
486
488
|
|
487
489
|
declare interface RowCommon {
|
488
490
|
[x: string]: any;
|
@@ -490,7 +492,7 @@ declare interface RowCommon {
|
|
490
492
|
|
491
493
|
export declare type RowPropsUnion = BaseProps_4 & RowProps;
|
492
494
|
|
493
|
-
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) =>
|
495
|
+
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX_2.Element;
|
494
496
|
|
495
497
|
export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
496
498
|
renderFilterFields?: (options: {
|
@@ -512,7 +514,7 @@ export declare const Segmented: React.FC<SegmentedProps>;
|
|
512
514
|
|
513
515
|
export declare type SegmentedProps = SegmentedProps_2;
|
514
516
|
|
515
|
-
export declare const Sidebar: ({ children, menu, userInfo }: SidebarProps) =>
|
517
|
+
export declare const Sidebar: ({ children, menu, userInfo }: SidebarProps) => JSX_2.Element;
|
516
518
|
|
517
519
|
export declare interface SidebarProps {
|
518
520
|
children?: default_2.ReactNode;
|
@@ -528,7 +530,7 @@ declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
|
|
528
530
|
multiple?: false;
|
529
531
|
};
|
530
532
|
|
531
|
-
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) =>
|
533
|
+
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX_2.Element;
|
532
534
|
|
533
535
|
export declare interface SkeletonProps extends SkeletonProps_2 {
|
534
536
|
type?: "table" | "form";
|
@@ -543,7 +545,7 @@ export declare const Space: typeof Space_2;
|
|
543
545
|
|
544
546
|
export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
|
545
547
|
|
546
|
-
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) =>
|
548
|
+
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX_2.Element;
|
547
549
|
|
548
550
|
export declare const Splitter: typeof Splitter_2;
|
549
551
|
|
@@ -578,7 +580,7 @@ declare type TabItem = {
|
|
578
580
|
disabled?: boolean;
|
579
581
|
};
|
580
582
|
|
581
|
-
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, ...rest }: TableCommonProps<T>) =>
|
583
|
+
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, ...rest }: TableCommonProps<T>) => JSX_2.Element;
|
582
584
|
|
583
585
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
584
586
|
|
@@ -606,6 +608,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
606
608
|
groupHeadingButtonItems?: GroupHeadingButtonItem[];
|
607
609
|
showIndexColumn?: boolean;
|
608
610
|
setFilters: (nextFilter: InitialFiltersSearch<TFilters>) => void;
|
611
|
+
noBreadcum?: boolean;
|
609
612
|
}
|
610
613
|
|
611
614
|
export declare const Tabs: default_2.FC<TabsProps>;
|
@@ -624,7 +627,7 @@ export declare interface TaglineProps extends TagProps {
|
|
624
627
|
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";
|
625
628
|
|
626
629
|
export declare type TFilters = {
|
627
|
-
isStatus?:
|
630
|
+
isStatus?: TypeStatusTable_2;
|
628
631
|
};
|
629
632
|
|
630
633
|
export declare const Timeline: React.FC<TimelineProps>;
|
@@ -679,12 +682,22 @@ export declare enum TypeBulkActions {
|
|
679
682
|
|
680
683
|
export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
|
681
684
|
|
685
|
+
export declare enum TypeStatusTable {
|
686
|
+
ALL = "ALL",// Tất cả
|
687
|
+
DRAFT = 0,// Tạo mới
|
688
|
+
WAITING_APPROVAL = 1,// Chờ duyệt
|
689
|
+
ACTIVE = 2,// Hoạt động
|
690
|
+
INACTIVE = 3,// Ngưng hoạt động
|
691
|
+
REJECTED = 4,// Từ chối duyệt
|
692
|
+
DELETED = 5
|
693
|
+
}
|
694
|
+
|
682
695
|
export declare const Typography: {
|
683
|
-
Title: (props: TitleProps) =>
|
684
|
-
Paragraph: (props: ParagraphProps) =>
|
685
|
-
Text: (props: TextProps) =>
|
696
|
+
Title: (props: TitleProps) => JSX_2.Element;
|
697
|
+
Paragraph: (props: ParagraphProps) => JSX_2.Element;
|
698
|
+
Text: (props: TextProps) => JSX_2.Element;
|
686
699
|
};
|
687
700
|
|
688
|
-
export declare const Watermark: ({ ...rest }: WatermarkProps) =>
|
701
|
+
export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX_2.Element;
|
689
702
|
|
690
703
|
export { }
|