@pnkx-lib/ui 1.9.104 → 1.9.106
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-CwSrIOy0.js → AntdIcon-z4k2QiG_.js} +30 -44
- package/es/chunks/{Switch-CCKfNjFl.js → Switch-DCc6-8ks.js} +1 -1
- package/es/chunks/{index-BVFDiGRU.js → index-B65Odp7H.js} +99 -246
- 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 +51 -72
- package/types/ui.d.ts +39 -60
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
|
38
|
+
import { JSX } 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,16 +77,14 @@ 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 '
|
82
|
-
import { TypeStatusTable as TypeStatusTable_2 } from '../../../../../../../../../../../src/constants';
|
83
|
-
import { TypeStatusTable as TypeStatusTable_3 } from '../../../../../../../../../../../../../src/components/ui';
|
80
|
+
import { TypeActionRowTable as TypeActionRowTable_2 } from '../../../../../../../../../../../../../src/constants/table';
|
81
|
+
import { TypeBulkActions as TypeBulkActions_2 } from '../../../../../../../../../../../../src/constants';
|
84
82
|
import { UseFormReset } from 'react-hook-form';
|
85
83
|
import { UseFormReturn } from 'react-hook-form';
|
86
84
|
import { UseFormSetValue } from 'react-hook-form';
|
87
85
|
import { WatermarkProps } from 'antd';
|
88
86
|
|
89
|
-
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) =>
|
87
|
+
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX.Element;
|
90
88
|
|
91
89
|
export declare interface ActionRowTableProps {
|
92
90
|
type: TypeActionRowTable_2;
|
@@ -106,7 +104,7 @@ export declare const Anchor: typeof Anchor_2 & {
|
|
106
104
|
|
107
105
|
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
108
106
|
|
109
|
-
export declare const Appfix: ({ children, ...rest }: AppfixProps) =>
|
107
|
+
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
|
110
108
|
|
111
109
|
export declare interface AppfixProps extends AffixProps {
|
112
110
|
children: default_2.ReactNode;
|
@@ -116,7 +114,7 @@ export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
|
116
114
|
|
117
115
|
export declare type AutoCompleteProps = AutoCompleteProps_2;
|
118
116
|
|
119
|
-
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) =>
|
117
|
+
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX.Element;
|
120
118
|
|
121
119
|
export declare interface BadgeProps extends BadgeProps_2 {
|
122
120
|
type?: "error" | "info" | "success" | "warning";
|
@@ -186,7 +184,7 @@ declare type BaseProps_9 = {
|
|
186
184
|
spaceClassName?: string;
|
187
185
|
};
|
188
186
|
|
189
|
-
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) =>
|
187
|
+
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX.Element;
|
190
188
|
|
191
189
|
export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
|
192
190
|
children?: Omit<BreadcrumbItemType, "children">[];
|
@@ -198,22 +196,13 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
198
196
|
|
199
197
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
200
198
|
|
201
|
-
export declare
|
202
|
-
name: string;
|
203
|
-
href: string;
|
204
|
-
submenu: {
|
205
|
-
name: string;
|
206
|
-
href: string;
|
207
|
-
};
|
208
|
-
};
|
209
|
-
|
210
|
-
export declare const BulkActions: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: IBulkActionsProps) => JSX_2.Element;
|
199
|
+
export declare const BulkActions: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: IBulkActionsProps) => JSX.Element;
|
211
200
|
|
212
201
|
export declare const Button: default_2.FC<ButtonProps>;
|
213
202
|
|
214
203
|
export declare type ButtonProps = ButtonProps_2;
|
215
204
|
|
216
|
-
export declare const CascaderField: (props: CascaderFieldProps) =>
|
205
|
+
export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
|
217
206
|
|
218
207
|
export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
|
219
208
|
|
@@ -226,13 +215,13 @@ declare enum CATEGORY_LIST_ENUM {
|
|
226
215
|
DELETE = 5, // đã xóa
|
227
216
|
}
|
228
217
|
|
229
|
-
export declare const CategoryStatus: ({ status }: CategoryStatusProps) =>
|
218
|
+
export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX.Element;
|
230
219
|
|
231
220
|
export declare interface CategoryStatusProps {
|
232
221
|
status: number;
|
233
222
|
}
|
234
223
|
|
235
|
-
export declare const Col: (props: ColPropsUnion) =>
|
224
|
+
export declare const Col: (props: ColPropsUnion) => JSX.Element;
|
236
225
|
|
237
226
|
export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
|
238
227
|
}
|
@@ -250,7 +239,7 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
|
|
250
239
|
ItemGroup: typeof ItemGroup;
|
251
240
|
};
|
252
241
|
|
253
|
-
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) =>
|
242
|
+
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX.Element;
|
254
243
|
|
255
244
|
export declare interface ConfirmModalProps extends ModalProps {
|
256
245
|
title: string;
|
@@ -272,7 +261,7 @@ export declare interface ContainerProps {
|
|
272
261
|
className?: string;
|
273
262
|
}
|
274
263
|
|
275
|
-
export declare const Divider: ({ children, ...rest }: DividerProps) =>
|
264
|
+
export declare const Divider: ({ children, ...rest }: DividerProps) => JSX.Element;
|
276
265
|
|
277
266
|
declare const Divider_2: FC<MenuDividerProps>;
|
278
267
|
|
@@ -280,14 +269,14 @@ export declare interface DividerProps extends DividerProps_2 {
|
|
280
269
|
children?: ReactNode | string;
|
281
270
|
}
|
282
271
|
|
283
|
-
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) =>
|
272
|
+
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX.Element;
|
284
273
|
|
285
274
|
export declare interface DrawerProps extends DrawerProps_2 {
|
286
275
|
children?: ReactNode;
|
287
276
|
onSubmit?: (values: any) => void;
|
288
277
|
}
|
289
278
|
|
290
|
-
export declare const Dropdown: (props: DropdownPropsUnion) =>
|
279
|
+
export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
|
291
280
|
|
292
281
|
export declare type DropdownButtonProps = DropdownButtonProps_2;
|
293
282
|
|
@@ -321,7 +310,7 @@ export declare interface ErrorBoundaryState {
|
|
321
310
|
errorInfo: ErrorInfo | null;
|
322
311
|
}
|
323
312
|
|
324
|
-
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) =>
|
313
|
+
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
325
314
|
|
326
315
|
export declare interface ErrorMessageProps {
|
327
316
|
errorMessage?: string;
|
@@ -334,7 +323,7 @@ declare type ExtraProps = {
|
|
334
323
|
menuClassName?: string;
|
335
324
|
};
|
336
325
|
|
337
|
-
export declare const Flex: (props: FlexPropsUnion) =>
|
326
|
+
export declare const Flex: (props: FlexPropsUnion) => JSX.Element;
|
338
327
|
|
339
328
|
export declare type FlexProps = FlexProps_2;
|
340
329
|
|
@@ -343,10 +332,10 @@ export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
|
|
343
332
|
declare interface GroupHeadingButtonItem {
|
344
333
|
label: string;
|
345
334
|
quantity: number;
|
346
|
-
isStatus:
|
335
|
+
isStatus: number;
|
347
336
|
}
|
348
337
|
|
349
|
-
export declare const Heading: (props: HeadingProps) =>
|
338
|
+
export declare const Heading: (props: HeadingProps) => JSX.Element;
|
350
339
|
|
351
340
|
export declare interface HeadingProps {
|
352
341
|
rightContent?: ReactNode;
|
@@ -367,8 +356,8 @@ declare interface IBulkActionsProps {
|
|
367
356
|
handleDelete?: () => void;
|
368
357
|
handleActivate?: () => void;
|
369
358
|
handleInActivate?: () => void;
|
370
|
-
status?:
|
371
|
-
type
|
359
|
+
status?: number;
|
360
|
+
type?: TypeBulkActions_2;
|
372
361
|
}
|
373
362
|
|
374
363
|
declare const Image_2: React.FC<ImageProps>;
|
@@ -380,7 +369,7 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
|
|
380
369
|
|
381
370
|
export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
382
371
|
|
383
|
-
export declare const Label: ({ label, required }: LabelProps) =>
|
372
|
+
export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
|
384
373
|
|
385
374
|
export declare interface LabelProps {
|
386
375
|
label: string;
|
@@ -433,7 +422,7 @@ export declare type MenuType = {
|
|
433
422
|
}[];
|
434
423
|
};
|
435
424
|
|
436
|
-
export declare const Modal: ({ children, ...rest }: ModalProps) =>
|
425
|
+
export declare const Modal: ({ children, ...rest }: ModalProps) => JSX.Element;
|
437
426
|
|
438
427
|
export declare interface ModalProps extends ModalProps_2 {
|
439
428
|
children?: ReactNode;
|
@@ -443,9 +432,9 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
|
|
443
432
|
multiple: true;
|
444
433
|
};
|
445
434
|
|
446
|
-
export declare const PAGE_NUMBER = "
|
435
|
+
export declare const PAGE_NUMBER = "page_number";
|
447
436
|
|
448
|
-
export declare const PAGE_SIZE = "
|
437
|
+
export declare const PAGE_SIZE = "page_size";
|
449
438
|
|
450
439
|
export declare const Pagination: typeof Pagination_2;
|
451
440
|
|
@@ -469,13 +458,13 @@ export declare interface PnkxSpinProps extends SpinProps {
|
|
469
458
|
children?: ReactNode;
|
470
459
|
}
|
471
460
|
|
472
|
-
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) =>
|
461
|
+
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX.Element;
|
473
462
|
|
474
463
|
export declare interface PopconfirmProps extends PopconfirmProps_2 {
|
475
464
|
children?: ReactNode;
|
476
465
|
}
|
477
466
|
|
478
|
-
export declare const Popover: (props: PopoverPropsUnion) =>
|
467
|
+
export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
|
479
468
|
|
480
469
|
export declare type PopoverProps = PopoverProps_2;
|
481
470
|
|
@@ -487,13 +476,13 @@ export declare type QRCodeProps = QRCodeProps_2;
|
|
487
476
|
|
488
477
|
export declare const Rate: React.FC<RateProps>;
|
489
478
|
|
490
|
-
export declare const Result: ({ children, ...rest }: ResultProps) =>
|
479
|
+
export declare const Result: ({ children, ...rest }: ResultProps) => JSX.Element;
|
491
480
|
|
492
481
|
export declare interface ResultProps extends ResultProps_2 {
|
493
482
|
children?: ReactNode | string;
|
494
483
|
}
|
495
484
|
|
496
|
-
export declare const Row: (props: RowPropsUnion) =>
|
485
|
+
export declare const Row: (props: RowPropsUnion) => JSX.Element;
|
497
486
|
|
498
487
|
declare interface RowCommon {
|
499
488
|
[x: string]: any;
|
@@ -501,7 +490,7 @@ declare interface RowCommon {
|
|
501
490
|
|
502
491
|
export declare type RowPropsUnion = BaseProps_4 & RowProps;
|
503
492
|
|
504
|
-
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) =>
|
493
|
+
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
|
505
494
|
|
506
495
|
export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
507
496
|
renderFilterFields?: (options: {
|
@@ -523,7 +512,7 @@ export declare const Segmented: React.FC<SegmentedProps>;
|
|
523
512
|
|
524
513
|
export declare type SegmentedProps = SegmentedProps_2;
|
525
514
|
|
526
|
-
export declare const Sidebar: ({ children, menu, userInfo }: SidebarProps) =>
|
515
|
+
export declare const Sidebar: ({ children, menu, userInfo }: SidebarProps) => JSX.Element;
|
527
516
|
|
528
517
|
export declare interface SidebarProps {
|
529
518
|
children?: default_2.ReactNode;
|
@@ -539,7 +528,7 @@ declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
|
|
539
528
|
multiple?: false;
|
540
529
|
};
|
541
530
|
|
542
|
-
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) =>
|
531
|
+
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX.Element;
|
543
532
|
|
544
533
|
export declare interface SkeletonProps extends SkeletonProps_2 {
|
545
534
|
type?: "table" | "form";
|
@@ -554,7 +543,7 @@ export declare const Space: typeof Space_2;
|
|
554
543
|
|
555
544
|
export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
|
556
545
|
|
557
|
-
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) =>
|
546
|
+
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX.Element;
|
558
547
|
|
559
548
|
export declare const Splitter: typeof Splitter_2;
|
560
549
|
|
@@ -589,7 +578,7 @@ declare type TabItem = {
|
|
589
578
|
disabled?: boolean;
|
590
579
|
};
|
591
580
|
|
592
|
-
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>) =>
|
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>) => JSX.Element;
|
593
582
|
|
594
583
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
595
584
|
|
@@ -635,7 +624,7 @@ export declare interface TaglineProps extends TagProps {
|
|
635
624
|
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";
|
636
625
|
|
637
626
|
export declare type TFilters = {
|
638
|
-
isStatus?:
|
627
|
+
isStatus?: number;
|
639
628
|
};
|
640
629
|
|
641
630
|
export declare const Timeline: React.FC<TimelineProps>;
|
@@ -690,22 +679,12 @@ export declare enum TypeBulkActions {
|
|
690
679
|
|
691
680
|
export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
|
692
681
|
|
693
|
-
export declare enum TypeStatusTable {
|
694
|
-
ALL = "ALL",// Tất cả
|
695
|
-
DRAFT = 0,// Tạo mới
|
696
|
-
WAITING_APPROVAL = 1,// Chờ duyệt
|
697
|
-
ACTIVE = 2,// Hoạt động
|
698
|
-
INACTIVE = 3,// Ngưng hoạt động
|
699
|
-
REJECTED = 4,// Từ chối duyệt
|
700
|
-
DELETED = 5
|
701
|
-
}
|
702
|
-
|
703
682
|
export declare const Typography: {
|
704
|
-
Title: (props: TitleProps) =>
|
705
|
-
Paragraph: (props: ParagraphProps) =>
|
706
|
-
Text: (props: TextProps) =>
|
683
|
+
Title: (props: TitleProps) => JSX.Element;
|
684
|
+
Paragraph: (props: ParagraphProps) => JSX.Element;
|
685
|
+
Text: (props: TextProps) => JSX.Element;
|
707
686
|
};
|
708
687
|
|
709
|
-
export declare const Watermark: ({ ...rest }: WatermarkProps) =>
|
688
|
+
export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
|
710
689
|
|
711
690
|
export { }
|