@pnkx-lib/ui 1.9.96 → 1.9.97
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/{AntdIcon-sydRpDMU.js → AntdIcon-CwSrIOy0.js} +1 -1
- package/es/chunks/{Switch-Ch-t7bqG.js → Switch-CCKfNjFl.js} +1 -1
- package/es/chunks/{index-BMH0bSgU.js → index-CzcsLV_v.js} +159 -94
- package/es/fields/index.js +2 -2
- package/es/index.js +3 -3
- package/es/ui/index.js +2 -2
- package/package.json +1 -1
- package/types/fields.d.ts +13 -13
- package/types/index.d.ts +86 -57
- package/types/ui.d.ts +74 -45
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';
|
@@ -78,12 +78,13 @@ 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
80
|
import { TypeActionRowTable as TypeActionRowTable_2 } from '../../../../../../../../../../../../src/constants/table';
|
81
|
+
import { TypeBulkActions as TypeBulkActions_2 } from '../../../../../../../../../../../src/constants';
|
81
82
|
import { UseFormReset } from 'react-hook-form';
|
82
83
|
import { UseFormReturn } from 'react-hook-form';
|
83
84
|
import { UseFormSetValue } from 'react-hook-form';
|
84
85
|
import { WatermarkProps } from 'antd';
|
85
86
|
|
86
|
-
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) =>
|
87
|
+
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX_2.Element;
|
87
88
|
|
88
89
|
export declare interface ActionRowTableProps {
|
89
90
|
type: TypeActionRowTable_2;
|
@@ -103,7 +104,7 @@ export declare const Anchor: typeof Anchor_2 & {
|
|
103
104
|
|
104
105
|
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
105
106
|
|
106
|
-
export declare const Appfix: ({ children, ...rest }: AppfixProps) =>
|
107
|
+
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX_2.Element;
|
107
108
|
|
108
109
|
export declare interface AppfixProps extends AffixProps {
|
109
110
|
children: default_2.ReactNode;
|
@@ -113,7 +114,7 @@ export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
|
113
114
|
|
114
115
|
export declare type AutoCompleteProps = AutoCompleteProps_2;
|
115
116
|
|
116
|
-
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) =>
|
117
|
+
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX_2.Element;
|
117
118
|
|
118
119
|
export declare interface BadgeProps extends BadgeProps_2 {
|
119
120
|
type?: "error" | "info" | "success" | "warning";
|
@@ -183,7 +184,7 @@ declare type BaseProps_9 = {
|
|
183
184
|
spaceClassName?: string;
|
184
185
|
};
|
185
186
|
|
186
|
-
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) =>
|
187
|
+
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX_2.Element;
|
187
188
|
|
188
189
|
export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
|
189
190
|
children?: Omit<BreadcrumbItemType, "children">[];
|
@@ -204,37 +205,32 @@ export declare type BreadcrumbType = {
|
|
204
205
|
};
|
205
206
|
};
|
206
207
|
|
207
|
-
export declare const
|
208
|
-
|
209
|
-
export declare interface BulkActionProps {
|
210
|
-
quantity?: number;
|
211
|
-
handleRestore?: () => void;
|
212
|
-
handleSendApproval?: () => void;
|
213
|
-
handleCancelSendApproval?: () => void;
|
214
|
-
handleRefuseApproval?: () => void;
|
215
|
-
handleApproval?: () => void;
|
216
|
-
handleCancelApproval?: () => void;
|
217
|
-
handleDelete?: () => void;
|
218
|
-
handleActivate?: () => void;
|
219
|
-
handleInActivate?: () => void;
|
220
|
-
status?: number;
|
221
|
-
}
|
208
|
+
export declare const BulkActions: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, type, }: IBulkActionsProps) => JSX_2.Element;
|
222
209
|
|
223
210
|
export declare const Button: default_2.FC<ButtonProps>;
|
224
211
|
|
225
212
|
export declare type ButtonProps = ButtonProps_2;
|
226
213
|
|
227
|
-
export declare const CascaderField: (props: CascaderFieldProps) =>
|
214
|
+
export declare const CascaderField: (props: CascaderFieldProps) => JSX_2.Element;
|
228
215
|
|
229
216
|
export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
|
230
217
|
|
231
|
-
|
218
|
+
declare enum CATEGORY_LIST_ENUM {
|
219
|
+
DRAFT = 0, // tạo mới
|
220
|
+
WATING_APPROVAL = 1, // đang chờ duyệt
|
221
|
+
ACTIVE = 2, // hoạt động
|
222
|
+
INACTIVE = 3, // dừng hoạt động
|
223
|
+
REJECT = 4, // từ chối duyệt
|
224
|
+
DELETE = 5, // đã xóa
|
225
|
+
}
|
226
|
+
|
227
|
+
export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX_2.Element;
|
232
228
|
|
233
229
|
export declare interface CategoryStatusProps {
|
234
230
|
status: number;
|
235
231
|
}
|
236
232
|
|
237
|
-
export declare const Col: (props: ColPropsUnion) =>
|
233
|
+
export declare const Col: (props: ColPropsUnion) => JSX_2.Element;
|
238
234
|
|
239
235
|
export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
|
240
236
|
}
|
@@ -252,7 +248,7 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
|
|
252
248
|
ItemGroup: typeof ItemGroup;
|
253
249
|
};
|
254
250
|
|
255
|
-
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) =>
|
251
|
+
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX_2.Element;
|
256
252
|
|
257
253
|
export declare interface ConfirmModalProps extends ModalProps {
|
258
254
|
title: string;
|
@@ -274,7 +270,7 @@ export declare interface ContainerProps {
|
|
274
270
|
className?: string;
|
275
271
|
}
|
276
272
|
|
277
|
-
export declare const Divider: ({ children, ...rest }: DividerProps) =>
|
273
|
+
export declare const Divider: ({ children, ...rest }: DividerProps) => JSX_2.Element;
|
278
274
|
|
279
275
|
declare const Divider_2: FC<MenuDividerProps>;
|
280
276
|
|
@@ -282,14 +278,14 @@ export declare interface DividerProps extends DividerProps_2 {
|
|
282
278
|
children?: ReactNode | string;
|
283
279
|
}
|
284
280
|
|
285
|
-
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) =>
|
281
|
+
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX_2.Element;
|
286
282
|
|
287
283
|
export declare interface DrawerProps extends DrawerProps_2 {
|
288
284
|
children?: ReactNode;
|
289
285
|
onSubmit?: (values: any) => void;
|
290
286
|
}
|
291
287
|
|
292
|
-
export declare const Dropdown: (props: DropdownPropsUnion) =>
|
288
|
+
export declare const Dropdown: (props: DropdownPropsUnion) => JSX_2.Element;
|
293
289
|
|
294
290
|
export declare type DropdownButtonProps = DropdownButtonProps_2;
|
295
291
|
|
@@ -323,7 +319,7 @@ export declare interface ErrorBoundaryState {
|
|
323
319
|
errorInfo: ErrorInfo | null;
|
324
320
|
}
|
325
321
|
|
326
|
-
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) =>
|
322
|
+
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX_2.Element | null>;
|
327
323
|
|
328
324
|
export declare interface ErrorMessageProps {
|
329
325
|
errorMessage?: string;
|
@@ -336,7 +332,7 @@ declare type ExtraProps = {
|
|
336
332
|
menuClassName?: string;
|
337
333
|
};
|
338
334
|
|
339
|
-
export declare const Flex: (props: FlexPropsUnion) =>
|
335
|
+
export declare const Flex: (props: FlexPropsUnion) => JSX_2.Element;
|
340
336
|
|
341
337
|
export declare type FlexProps = FlexProps_2;
|
342
338
|
|
@@ -348,7 +344,7 @@ declare interface GroupHeadingButtonItem {
|
|
348
344
|
is_status: number;
|
349
345
|
}
|
350
346
|
|
351
|
-
export declare const Heading: (props: HeadingProps) =>
|
347
|
+
export declare const Heading: (props: HeadingProps) => JSX_2.Element;
|
352
348
|
|
353
349
|
export declare interface HeadingProps {
|
354
350
|
rightContent?: ReactNode;
|
@@ -358,6 +354,21 @@ export declare interface HeadingProps {
|
|
358
354
|
menu: Array<MenuType>;
|
359
355
|
}
|
360
356
|
|
357
|
+
declare interface IBulkActionsProps {
|
358
|
+
quantity?: number;
|
359
|
+
handleRestore?: () => void;
|
360
|
+
handleSendApproval?: () => void;
|
361
|
+
handleCancelSendApproval?: () => void;
|
362
|
+
handleRefuseApproval?: () => void;
|
363
|
+
handleApproval?: () => void;
|
364
|
+
handleCancelApproval?: () => void;
|
365
|
+
handleDelete?: () => void;
|
366
|
+
handleActivate?: () => void;
|
367
|
+
handleInActivate?: () => void;
|
368
|
+
status?: number;
|
369
|
+
type: TypeBulkActions_2;
|
370
|
+
}
|
371
|
+
|
361
372
|
declare const Image_2: React.FC<ImageProps>;
|
362
373
|
export { Image_2 as Image }
|
363
374
|
|
@@ -367,7 +378,7 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
|
|
367
378
|
|
368
379
|
export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
369
380
|
|
370
|
-
export declare const Label: ({ label, required }: LabelProps) =>
|
381
|
+
export declare const Label: ({ label, required }: LabelProps) => JSX_2.Element;
|
371
382
|
|
372
383
|
export declare interface LabelProps {
|
373
384
|
label: string;
|
@@ -420,7 +431,7 @@ export declare type MenuType = {
|
|
420
431
|
}[];
|
421
432
|
};
|
422
433
|
|
423
|
-
export declare const Modal: ({ children, ...rest }: ModalProps) =>
|
434
|
+
export declare const Modal: ({ children, ...rest }: ModalProps) => JSX_2.Element;
|
424
435
|
|
425
436
|
export declare interface ModalProps extends ModalProps_2 {
|
426
437
|
children?: ReactNode;
|
@@ -456,13 +467,13 @@ export declare interface PnkxSpinProps extends SpinProps {
|
|
456
467
|
children?: ReactNode;
|
457
468
|
}
|
458
469
|
|
459
|
-
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) =>
|
470
|
+
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX_2.Element;
|
460
471
|
|
461
472
|
export declare interface PopconfirmProps extends PopconfirmProps_2 {
|
462
473
|
children?: ReactNode;
|
463
474
|
}
|
464
475
|
|
465
|
-
export declare const Popover: (props: PopoverPropsUnion) =>
|
476
|
+
export declare const Popover: (props: PopoverPropsUnion) => JSX_2.Element;
|
466
477
|
|
467
478
|
export declare type PopoverProps = PopoverProps_2;
|
468
479
|
|
@@ -474,13 +485,13 @@ export declare type QRCodeProps = QRCodeProps_2;
|
|
474
485
|
|
475
486
|
export declare const Rate: React.FC<RateProps>;
|
476
487
|
|
477
|
-
export declare const Result: ({ children, ...rest }: ResultProps) =>
|
488
|
+
export declare const Result: ({ children, ...rest }: ResultProps) => JSX_2.Element;
|
478
489
|
|
479
490
|
export declare interface ResultProps extends ResultProps_2 {
|
480
491
|
children?: ReactNode | string;
|
481
492
|
}
|
482
493
|
|
483
|
-
export declare const Row: (props: RowPropsUnion) =>
|
494
|
+
export declare const Row: (props: RowPropsUnion) => JSX_2.Element;
|
484
495
|
|
485
496
|
declare interface RowCommon {
|
486
497
|
[x: string]: any;
|
@@ -488,7 +499,7 @@ declare interface RowCommon {
|
|
488
499
|
|
489
500
|
export declare type RowPropsUnion = BaseProps_4 & RowProps;
|
490
501
|
|
491
|
-
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) =>
|
502
|
+
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX_2.Element;
|
492
503
|
|
493
504
|
export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
494
505
|
renderFilterFields?: (options: {
|
@@ -510,7 +521,7 @@ export declare const Segmented: React.FC<SegmentedProps>;
|
|
510
521
|
|
511
522
|
export declare type SegmentedProps = SegmentedProps_2;
|
512
523
|
|
513
|
-
export declare const Sidebar: ({ children, menu, userInfo }: SidebarProps) =>
|
524
|
+
export declare const Sidebar: ({ children, menu, userInfo }: SidebarProps) => JSX_2.Element;
|
514
525
|
|
515
526
|
export declare interface SidebarProps {
|
516
527
|
children?: default_2.ReactNode;
|
@@ -526,7 +537,7 @@ declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
|
|
526
537
|
multiple?: false;
|
527
538
|
};
|
528
539
|
|
529
|
-
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) =>
|
540
|
+
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX_2.Element;
|
530
541
|
|
531
542
|
export declare interface SkeletonProps extends SkeletonProps_2 {
|
532
543
|
type?: "table" | "form";
|
@@ -541,7 +552,7 @@ export declare const Space: typeof Space_2;
|
|
541
552
|
|
542
553
|
export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
|
543
554
|
|
544
|
-
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) =>
|
555
|
+
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX_2.Element;
|
545
556
|
|
546
557
|
export declare const Splitter: typeof Splitter_2;
|
547
558
|
|
@@ -576,7 +587,7 @@ declare type TabItem = {
|
|
576
587
|
disabled?: boolean;
|
577
588
|
};
|
578
589
|
|
579
|
-
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>) =>
|
590
|
+
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_2.Element;
|
580
591
|
|
581
592
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
582
593
|
|
@@ -631,6 +642,19 @@ export declare type TimelineProps = TimelineProps_2;
|
|
631
642
|
|
632
643
|
export declare const TINY_API = "miai0qn3c79adm555yoxd9kz6j6a323ek760nf7qd81nv1p5";
|
633
644
|
|
645
|
+
export declare type TListIcon = {
|
646
|
+
icon: React.ReactNode;
|
647
|
+
iconDisable: React.ReactNode;
|
648
|
+
iconDropList: React.ReactNode;
|
649
|
+
action?: () => void;
|
650
|
+
showConfirmModal: boolean;
|
651
|
+
title: string;
|
652
|
+
arrShow: CATEGORY_LIST_ENUM[];
|
653
|
+
content?: string;
|
654
|
+
typeIcon?: ConfirmModalProps["typeIcon"];
|
655
|
+
name?: string;
|
656
|
+
};
|
657
|
+
|
634
658
|
export declare const Tooltip: default_2.FC<TooltipProps>;
|
635
659
|
|
636
660
|
export declare type TooltipProps = TooltipProps_2;
|
@@ -657,14 +681,19 @@ export declare enum TypeActionRowTable {
|
|
657
681
|
VIEW = "VIEW"
|
658
682
|
}
|
659
683
|
|
684
|
+
export declare enum TypeBulkActions {
|
685
|
+
BULKACTION = "bulkaction",
|
686
|
+
DROPLIST = "droplist"
|
687
|
+
}
|
688
|
+
|
660
689
|
export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
|
661
690
|
|
662
691
|
export declare const Typography: {
|
663
|
-
Title: (props: TitleProps) =>
|
664
|
-
Paragraph: (props: ParagraphProps) =>
|
665
|
-
Text: (props: TextProps) =>
|
692
|
+
Title: (props: TitleProps) => JSX_2.Element;
|
693
|
+
Paragraph: (props: ParagraphProps) => JSX_2.Element;
|
694
|
+
Text: (props: TextProps) => JSX_2.Element;
|
666
695
|
};
|
667
696
|
|
668
|
-
export declare const Watermark: ({ ...rest }: WatermarkProps) =>
|
697
|
+
export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX_2.Element;
|
669
698
|
|
670
699
|
export { }
|