@pnkx-lib/ui 1.9.83 → 1.9.84
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 +2 -2
- package/es/chunks/{AntdIcon-bLE_HmL-.js → AntdIcon-CfjDMPv2.js} +1263 -17
- package/es/chunks/{Switch-Dbw7Aemy.js → Switch-BRvdbb0u.js} +1 -1
- package/es/chunks/{index-Bp_HTq2H.js → index-D_iOcbs8.js} +25 -4
- package/es/chunks/useMessage-CADDGtSx.js +15 -0
- package/es/chunks/useToast-DL7nQTK1.js +22 -0
- package/es/fields/index.js +2 -2
- package/es/hooks/index.js +2 -2
- package/es/index.js +5 -5
- package/es/ui/index.js +2 -3
- package/package.json +1 -1
- package/types/fields.d.ts +18 -15
- package/types/hooks.d.ts +5 -33
- package/types/index.d.ts +102 -108
- package/types/ui.d.ts +79 -61
- package/es/chunks/_MapCache-hm6_DB7i.js +0 -1255
- package/es/chunks/table-CrhlYiL4.js +0 -2448
- package/es/chunks/useMessage-B2e_06XS.js +0 -93
package/types/ui.d.ts
CHANGED
@@ -34,14 +34,14 @@ import { FlexProps as FlexProps_2 } from 'antd';
|
|
34
34
|
import { FormEventHandler } from 'react';
|
35
35
|
import { ForwardRefExoticComponent } from 'react';
|
36
36
|
import { ImageProps } from 'antd';
|
37
|
-
import { JSX
|
37
|
+
import { JSX } from 'react/jsx-runtime';
|
38
38
|
import { MenuDividerProps } from 'antd/es/menu';
|
39
39
|
import { MenuItemGroupProps } from 'rc-menu/lib/MenuItemGroup';
|
40
40
|
import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
|
41
|
-
import { MenuProps as
|
41
|
+
import { MenuProps as MenuProps_3 } from 'antd/es/menu';
|
42
42
|
import { ModalProps as ModalProps_2 } from 'antd';
|
43
43
|
import { Pagination as Pagination_2 } from 'antd';
|
44
|
-
import { PaginationFilters } from '
|
44
|
+
import { PaginationFilters } from '../../../../../../../../../../../src/components/hooks';
|
45
45
|
import { PaginationLocale } from 'rc-pagination';
|
46
46
|
import { PaginationProps as PaginationProps_2 } from 'antd';
|
47
47
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
@@ -77,14 +77,13 @@ 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 '
|
80
|
+
import { TypeActionRowTable as TypeActionRowTable_2 } from '../../../../../../../../../../../../src/constants/table';
|
81
81
|
import { UseFormReset } from 'react-hook-form';
|
82
82
|
import { UseFormReturn } from 'react-hook-form';
|
83
83
|
import { UseFormSetValue } from 'react-hook-form';
|
84
84
|
import { WatermarkProps } from 'antd';
|
85
|
-
import * as yup from 'yup';
|
86
85
|
|
87
|
-
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) =>
|
86
|
+
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX.Element;
|
88
87
|
|
89
88
|
export declare interface ActionRowTableProps {
|
90
89
|
type: TypeActionRowTable_2;
|
@@ -104,7 +103,7 @@ export declare const Anchor: typeof Anchor_2 & {
|
|
104
103
|
|
105
104
|
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
106
105
|
|
107
|
-
export declare const Appfix: ({ children, ...rest }: AppfixProps) =>
|
106
|
+
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
|
108
107
|
|
109
108
|
export declare interface AppfixProps extends AffixProps {
|
110
109
|
children: default_2.ReactNode;
|
@@ -114,7 +113,7 @@ export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
|
114
113
|
|
115
114
|
export declare type AutoCompleteProps = AutoCompleteProps_2;
|
116
115
|
|
117
|
-
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) =>
|
116
|
+
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX.Element;
|
118
117
|
|
119
118
|
export declare interface BadgeProps extends BadgeProps_2 {
|
120
119
|
type?: "error" | "info" | "success" | "warning";
|
@@ -184,7 +183,7 @@ declare type BaseProps_9 = {
|
|
184
183
|
spaceClassName?: string;
|
185
184
|
};
|
186
185
|
|
187
|
-
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) =>
|
186
|
+
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX.Element;
|
188
187
|
|
189
188
|
export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
|
190
189
|
children?: Omit<BreadcrumbItemType, "children">[];
|
@@ -196,7 +195,7 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
196
195
|
|
197
196
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
198
197
|
|
199
|
-
export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) =>
|
198
|
+
export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX.Element;
|
200
199
|
|
201
200
|
export declare interface BulkActionProps {
|
202
201
|
quantity?: number;
|
@@ -216,17 +215,17 @@ export declare const Button: default_2.FC<ButtonProps>;
|
|
216
215
|
|
217
216
|
export declare type ButtonProps = ButtonProps_2;
|
218
217
|
|
219
|
-
export declare const CascaderField: (props: CascaderFieldProps) =>
|
218
|
+
export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
|
220
219
|
|
221
220
|
export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
|
222
221
|
|
223
|
-
export declare const CategoryStatus: ({ status }: CategoryStatusProps) =>
|
222
|
+
export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX.Element;
|
224
223
|
|
225
224
|
export declare interface CategoryStatusProps {
|
226
225
|
status: number;
|
227
226
|
}
|
228
227
|
|
229
|
-
export declare const Col: (props: ColPropsUnion) =>
|
228
|
+
export declare const Col: (props: ColPropsUnion) => JSX.Element;
|
230
229
|
|
231
230
|
export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
|
232
231
|
}
|
@@ -244,7 +243,7 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
|
|
244
243
|
ItemGroup: typeof ItemGroup;
|
245
244
|
};
|
246
245
|
|
247
|
-
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) =>
|
246
|
+
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX.Element;
|
248
247
|
|
249
248
|
export declare interface ConfirmModalProps extends ModalProps {
|
250
249
|
title: string;
|
@@ -266,7 +265,7 @@ export declare interface ContainerProps {
|
|
266
265
|
className?: string;
|
267
266
|
}
|
268
267
|
|
269
|
-
export declare const Divider: ({ children, ...rest }: DividerProps) =>
|
268
|
+
export declare const Divider: ({ children, ...rest }: DividerProps) => JSX.Element;
|
270
269
|
|
271
270
|
declare const Divider_2: FC<MenuDividerProps>;
|
272
271
|
|
@@ -274,14 +273,14 @@ export declare interface DividerProps extends DividerProps_2 {
|
|
274
273
|
children?: ReactNode | string;
|
275
274
|
}
|
276
275
|
|
277
|
-
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) =>
|
276
|
+
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX.Element;
|
278
277
|
|
279
278
|
export declare interface DrawerProps extends DrawerProps_2 {
|
280
279
|
children?: ReactNode;
|
281
280
|
onSubmit?: (values: any) => void;
|
282
281
|
}
|
283
282
|
|
284
|
-
export declare const Dropdown: (props: DropdownPropsUnion) =>
|
283
|
+
export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
|
285
284
|
|
286
285
|
export declare type DropdownButtonProps = DropdownButtonProps_2;
|
287
286
|
|
@@ -315,7 +314,7 @@ export declare interface ErrorBoundaryState {
|
|
315
314
|
errorInfo: ErrorInfo | null;
|
316
315
|
}
|
317
316
|
|
318
|
-
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) =>
|
317
|
+
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
319
318
|
|
320
319
|
export declare interface ErrorMessageProps {
|
321
320
|
errorMessage?: string;
|
@@ -328,13 +327,13 @@ declare type ExtraProps = {
|
|
328
327
|
menuClassName?: string;
|
329
328
|
};
|
330
329
|
|
331
|
-
export declare const Flex: (props: FlexPropsUnion) =>
|
330
|
+
export declare const Flex: (props: FlexPropsUnion) => JSX.Element;
|
332
331
|
|
333
332
|
export declare type FlexProps = FlexProps_2;
|
334
333
|
|
335
334
|
export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
|
336
335
|
|
337
|
-
export declare const Heading: (props: HeadingProps) =>
|
336
|
+
export declare const Heading: (props: HeadingProps) => JSX.Element;
|
338
337
|
|
339
338
|
export declare interface HeadingProps {
|
340
339
|
rightContent?: ReactNode;
|
@@ -353,7 +352,7 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
|
|
353
352
|
|
354
353
|
export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
355
354
|
|
356
|
-
export declare const Label: ({ label, required }: LabelProps) =>
|
355
|
+
export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
|
357
356
|
|
358
357
|
export declare interface LabelProps {
|
359
358
|
label: string;
|
@@ -372,15 +371,49 @@ export declare type LayoutProps = BaseProps_8 & BasicProps;
|
|
372
371
|
|
373
372
|
export declare const Menu: CompoundedMenu;
|
374
373
|
|
375
|
-
export declare type MenuComponentProps = ExtraProps &
|
374
|
+
export declare type MenuComponentProps = ExtraProps & MenuProps_2;
|
376
375
|
|
377
376
|
declare const MenuItem: FC<MenuItemProps>;
|
378
377
|
|
379
378
|
export declare type MenuItemProps = MenuItemProps_2;
|
380
379
|
|
381
|
-
export declare type MenuProps =
|
380
|
+
export declare type MenuProps = {
|
381
|
+
name: string;
|
382
|
+
href: string;
|
383
|
+
icon: default_2.ReactNode;
|
384
|
+
current: boolean;
|
385
|
+
subMenu?: Array<{
|
386
|
+
name: string;
|
387
|
+
href: string;
|
388
|
+
icon: default_2.ReactNode;
|
389
|
+
children?: Array<{
|
390
|
+
name: string;
|
391
|
+
href: string;
|
392
|
+
icon?: default_2.ReactNode;
|
393
|
+
}>;
|
394
|
+
}>;
|
395
|
+
};
|
382
396
|
|
383
|
-
|
397
|
+
declare type MenuProps_2 = MenuProps_3;
|
398
|
+
|
399
|
+
declare type MenuProps_4 = {
|
400
|
+
name: string;
|
401
|
+
href: string;
|
402
|
+
icon: React.ReactNode;
|
403
|
+
current: boolean;
|
404
|
+
subMenu?: Array<{
|
405
|
+
name: string;
|
406
|
+
href: string;
|
407
|
+
icon: React.ReactNode;
|
408
|
+
children?: Array<{
|
409
|
+
name: string;
|
410
|
+
href: string;
|
411
|
+
icon?: React.ReactNode;
|
412
|
+
}>;
|
413
|
+
}>;
|
414
|
+
};
|
415
|
+
|
416
|
+
export declare const Modal: ({ children, ...rest }: ModalProps) => JSX.Element;
|
384
417
|
|
385
418
|
export declare interface ModalProps extends ModalProps_2 {
|
386
419
|
children?: ReactNode;
|
@@ -390,9 +423,9 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
|
|
390
423
|
multiple: true;
|
391
424
|
};
|
392
425
|
|
393
|
-
export declare const
|
426
|
+
export declare const PAGE_NUMBER = "page_number";
|
394
427
|
|
395
|
-
export declare const PAGE_SIZE = "
|
428
|
+
export declare const PAGE_SIZE = "page_size";
|
396
429
|
|
397
430
|
export declare const Pagination: typeof Pagination_2;
|
398
431
|
|
@@ -416,13 +449,13 @@ export declare interface PnkxSpinProps extends SpinProps {
|
|
416
449
|
children?: ReactNode;
|
417
450
|
}
|
418
451
|
|
419
|
-
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) =>
|
452
|
+
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX.Element;
|
420
453
|
|
421
454
|
export declare interface PopconfirmProps extends PopconfirmProps_2 {
|
422
455
|
children?: ReactNode;
|
423
456
|
}
|
424
457
|
|
425
|
-
export declare const Popover: (props: PopoverPropsUnion) =>
|
458
|
+
export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
|
426
459
|
|
427
460
|
export declare type PopoverProps = PopoverProps_2;
|
428
461
|
|
@@ -434,13 +467,13 @@ export declare type QRCodeProps = QRCodeProps_2;
|
|
434
467
|
|
435
468
|
export declare const Rate: React.FC<RateProps>;
|
436
469
|
|
437
|
-
export declare const Result: ({ children, ...rest }: ResultProps) =>
|
470
|
+
export declare const Result: ({ children, ...rest }: ResultProps) => JSX.Element;
|
438
471
|
|
439
472
|
export declare interface ResultProps extends ResultProps_2 {
|
440
473
|
children?: ReactNode | string;
|
441
474
|
}
|
442
475
|
|
443
|
-
export declare const Row: (props: RowPropsUnion) =>
|
476
|
+
export declare const Row: (props: RowPropsUnion) => JSX.Element;
|
444
477
|
|
445
478
|
declare interface RowCommon {
|
446
479
|
[x: string]: any;
|
@@ -448,7 +481,7 @@ declare interface RowCommon {
|
|
448
481
|
|
449
482
|
export declare type RowPropsUnion = BaseProps_4 & RowProps;
|
450
483
|
|
451
|
-
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) =>
|
484
|
+
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
|
452
485
|
|
453
486
|
export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
454
487
|
renderFilterFields?: (options: {
|
@@ -470,28 +503,18 @@ export declare const Segmented: React.FC<SegmentedProps>;
|
|
470
503
|
|
471
504
|
export declare type SegmentedProps = SegmentedProps_2;
|
472
505
|
|
473
|
-
export declare const Sidebar: ({ children, menu }: SidebarProps) =>
|
506
|
+
export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX.Element;
|
474
507
|
|
475
508
|
export declare interface SidebarProps {
|
476
509
|
children?: React.ReactNode;
|
477
|
-
menu: Array<
|
478
|
-
name: string;
|
479
|
-
href: string;
|
480
|
-
icon: React.ReactNode;
|
481
|
-
current: boolean;
|
482
|
-
children?: Array<{
|
483
|
-
name: string;
|
484
|
-
href: string;
|
485
|
-
icon?: React.ReactNode;
|
486
|
-
}>;
|
487
|
-
}>;
|
510
|
+
menu: Array<MenuProps_4>;
|
488
511
|
}
|
489
512
|
|
490
513
|
declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
|
491
514
|
multiple?: false;
|
492
515
|
};
|
493
516
|
|
494
|
-
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) =>
|
517
|
+
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX.Element;
|
495
518
|
|
496
519
|
export declare interface SkeletonProps extends SkeletonProps_2 {
|
497
520
|
type?: "table" | "form";
|
@@ -506,7 +529,7 @@ export declare const Space: typeof Space_2;
|
|
506
529
|
|
507
530
|
export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
|
508
531
|
|
509
|
-
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) =>
|
532
|
+
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX.Element;
|
510
533
|
|
511
534
|
export declare const Splitter: typeof Splitter_2;
|
512
535
|
|
@@ -541,19 +564,17 @@ declare type TabItem = {
|
|
541
564
|
disabled?: boolean;
|
542
565
|
};
|
543
566
|
|
544
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey,
|
567
|
+
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, renderGroupHeadingButton, showIndexColumn, ...rest }: TableCommonProps<T>) => JSX.Element;
|
545
568
|
|
546
569
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
547
570
|
|
548
|
-
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
549
|
-
editable?: boolean;
|
550
|
-
})[];
|
571
|
+
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {})[];
|
551
572
|
|
552
573
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
553
|
-
dataSource
|
574
|
+
dataSource?: T[];
|
554
575
|
columns: TableColumnsType<T>;
|
555
576
|
loading?: boolean;
|
556
|
-
totalItems
|
577
|
+
totalItems?: number;
|
557
578
|
filters: PaginationFilters & {
|
558
579
|
status?: number;
|
559
580
|
};
|
@@ -564,17 +585,14 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
564
585
|
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
565
586
|
onRowClick?: (record: T) => void;
|
566
587
|
rowKey?: string | ((record: T) => string);
|
567
|
-
className?: string;
|
568
|
-
editable?: boolean;
|
569
|
-
onSave?: (data: T) => void;
|
570
588
|
titleSettingTableModal?: string;
|
571
589
|
showSetting?: boolean;
|
572
590
|
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
573
591
|
renderHeadingSearch: () => ReactNode;
|
574
592
|
rightHeadingContent: ReactNode;
|
575
|
-
|
576
|
-
|
577
|
-
|
593
|
+
menu: Array<MenuProps>;
|
594
|
+
renderGroupHeadingButton: ReactNode;
|
595
|
+
showIndexColumn?: boolean;
|
578
596
|
}
|
579
597
|
|
580
598
|
export declare const Tabs: default_2.FC<TabsProps>;
|
@@ -627,11 +645,11 @@ export declare enum TypeActionRowTable {
|
|
627
645
|
export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
|
628
646
|
|
629
647
|
export declare const Typography: {
|
630
|
-
Title: (props: TitleProps) =>
|
631
|
-
Paragraph: (props: ParagraphProps) =>
|
632
|
-
Text: (props: TextProps) =>
|
648
|
+
Title: (props: TitleProps) => JSX.Element;
|
649
|
+
Paragraph: (props: ParagraphProps) => JSX.Element;
|
650
|
+
Text: (props: TextProps) => JSX.Element;
|
633
651
|
};
|
634
652
|
|
635
|
-
export declare const Watermark: ({ ...rest }: WatermarkProps) =>
|
653
|
+
export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
|
636
654
|
|
637
655
|
export { }
|