@pnkx-lib/ui 1.9.52 → 1.9.54

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/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 as JSX_2 } from 'react/jsx-runtime';
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
41
  import { MenuProps as MenuProps_2 } 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 '../../../../../../../../../../src/components/hooks';
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,13 +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 '../../../../../../../../../../../src/constants/table';
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';
85
86
 
86
- export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX_2.Element;
87
+ export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX.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) => JSX_2.Element;
107
+ export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.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) => JSX_2.Element;
117
+ export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX.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) => JSX_2.Element;
187
+ export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX.Element;
187
188
 
188
189
  export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
189
190
  children?: Omit<BreadcrumbItemType, "children">[];
@@ -195,10 +196,10 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
195
196
 
196
197
  export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
197
198
 
198
- export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX_2.Element;
199
+ export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX.Element;
199
200
 
200
201
  export declare interface BulkActionProps {
201
- quantity: number;
202
+ quantity?: number;
202
203
  handleRestore?: () => void;
203
204
  handleSendApproval?: () => void;
204
205
  handleCancelSendApproval?: () => void;
@@ -215,17 +216,17 @@ export declare const Button: default_2.FC<ButtonProps>;
215
216
 
216
217
  export declare type ButtonProps = ButtonProps_2;
217
218
 
218
- export declare const CascaderField: (props: CascaderFieldProps) => JSX_2.Element;
219
+ export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
219
220
 
220
221
  export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
221
222
 
222
- export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX_2.Element;
223
+ export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX.Element;
223
224
 
224
225
  export declare interface CategoryStatusProps {
225
226
  status: number;
226
227
  }
227
228
 
228
- export declare const Col: (props: ColPropsUnion) => JSX_2.Element;
229
+ export declare const Col: (props: ColPropsUnion) => JSX.Element;
229
230
 
230
231
  export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
231
232
  }
@@ -243,7 +244,7 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
243
244
  ItemGroup: typeof ItemGroup;
244
245
  };
245
246
 
246
- export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX_2.Element;
247
+ export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX.Element;
247
248
 
248
249
  export declare interface ConfirmModalProps extends ModalProps {
249
250
  title: string;
@@ -265,7 +266,7 @@ export declare interface ContainerProps {
265
266
  className?: string;
266
267
  }
267
268
 
268
- export declare const Divider: ({ children, ...rest }: DividerProps) => JSX_2.Element;
269
+ export declare const Divider: ({ children, ...rest }: DividerProps) => JSX.Element;
269
270
 
270
271
  declare const Divider_2: FC<MenuDividerProps>;
271
272
 
@@ -273,14 +274,14 @@ export declare interface DividerProps extends DividerProps_2 {
273
274
  children?: ReactNode | string;
274
275
  }
275
276
 
276
- export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX_2.Element;
277
+ export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX.Element;
277
278
 
278
279
  export declare interface DrawerProps extends DrawerProps_2 {
279
280
  children?: ReactNode;
280
281
  onSubmit?: (values: any) => void;
281
282
  }
282
283
 
283
- export declare const Dropdown: (props: DropdownPropsUnion) => JSX_2.Element;
284
+ export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
284
285
 
285
286
  export declare type DropdownButtonProps = DropdownButtonProps_2;
286
287
 
@@ -314,7 +315,7 @@ export declare interface ErrorBoundaryState {
314
315
  errorInfo: ErrorInfo | null;
315
316
  }
316
317
 
317
- export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX_2.Element | null>;
318
+ export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
318
319
 
319
320
  export declare interface ErrorMessageProps {
320
321
  errorMessage?: string;
@@ -327,13 +328,13 @@ declare type ExtraProps = {
327
328
  menuClassName?: string;
328
329
  };
329
330
 
330
- export declare const Flex: (props: FlexPropsUnion) => JSX_2.Element;
331
+ export declare const Flex: (props: FlexPropsUnion) => JSX.Element;
331
332
 
332
333
  export declare type FlexProps = FlexProps_2;
333
334
 
334
335
  export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
335
336
 
336
- export declare const Heading: (props: HeadingProps) => JSX_2.Element;
337
+ export declare const Heading: (props: HeadingProps) => JSX.Element;
337
338
 
338
339
  export declare interface HeadingProps {
339
340
  rightContent?: ReactNode;
@@ -352,7 +353,7 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
352
353
 
353
354
  export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
354
355
 
355
- export declare const Label: ({ label, required }: LabelProps) => JSX_2.Element;
356
+ export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
356
357
 
357
358
  export declare interface LabelProps {
358
359
  label: string;
@@ -379,7 +380,7 @@ export declare type MenuItemProps = MenuItemProps_2;
379
380
 
380
381
  export declare type MenuProps = MenuProps_2;
381
382
 
382
- export declare const Modal: ({ children, ...rest }: ModalProps) => JSX_2.Element;
383
+ export declare const Modal: ({ children, ...rest }: ModalProps) => JSX.Element;
383
384
 
384
385
  export declare interface ModalProps extends ModalProps_2 {
385
386
  children?: ReactNode;
@@ -415,13 +416,13 @@ export declare interface PnkxSpinProps extends SpinProps {
415
416
  children?: ReactNode;
416
417
  }
417
418
 
418
- export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX_2.Element;
419
+ export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX.Element;
419
420
 
420
421
  export declare interface PopconfirmProps extends PopconfirmProps_2 {
421
422
  children?: ReactNode;
422
423
  }
423
424
 
424
- export declare const Popover: (props: PopoverPropsUnion) => JSX_2.Element;
425
+ export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
425
426
 
426
427
  export declare type PopoverProps = PopoverProps_2;
427
428
 
@@ -433,13 +434,13 @@ export declare type QRCodeProps = QRCodeProps_2;
433
434
 
434
435
  export declare const Rate: React.FC<RateProps>;
435
436
 
436
- export declare const Result: ({ children, ...rest }: ResultProps) => JSX_2.Element;
437
+ export declare const Result: ({ children, ...rest }: ResultProps) => JSX.Element;
437
438
 
438
439
  export declare interface ResultProps extends ResultProps_2 {
439
440
  children?: ReactNode | string;
440
441
  }
441
442
 
442
- export declare const Row: (props: RowPropsUnion) => JSX_2.Element;
443
+ export declare const Row: (props: RowPropsUnion) => JSX.Element;
443
444
 
444
445
  declare interface RowCommon {
445
446
  [x: string]: any;
@@ -447,7 +448,7 @@ declare interface RowCommon {
447
448
 
448
449
  export declare type RowPropsUnion = BaseProps_4 & RowProps;
449
450
 
450
- export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX_2.Element;
451
+ export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
451
452
 
452
453
  export declare interface SearchFiltersFormProps<T extends FieldValues> {
453
454
  renderFilterFields?: (options: {
@@ -469,7 +470,7 @@ export declare const Segmented: React.FC<SegmentedProps>;
469
470
 
470
471
  export declare type SegmentedProps = SegmentedProps_2;
471
472
 
472
- export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX_2.Element;
473
+ export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX.Element;
473
474
 
474
475
  export declare interface SidebarProps {
475
476
  children?: React.ReactNode;
@@ -490,7 +491,7 @@ declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
490
491
  multiple?: false;
491
492
  };
492
493
 
493
- export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX_2.Element;
494
+ export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX.Element;
494
495
 
495
496
  export declare interface SkeletonProps extends SkeletonProps_2 {
496
497
  type?: "table" | "form";
@@ -505,7 +506,7 @@ export declare const Space: typeof Space_2;
505
506
 
506
507
  export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
507
508
 
508
- export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX_2.Element;
509
+ export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX.Element;
509
510
 
510
511
  export declare const Splitter: typeof Splitter_2;
511
512
 
@@ -540,7 +541,7 @@ declare type TabItem = {
540
541
  disabled?: boolean;
541
542
  };
542
543
 
543
- export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, status, ...rest }: TableCommonProps<T>) => JSX_2.Element;
544
+ export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, status, schema, breadCrumb, ...rest }: TableCommonProps<T>) => JSX.Element;
544
545
 
545
546
  export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
546
547
 
@@ -553,7 +554,9 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
553
554
  columns: TableColumnsType<T>;
554
555
  loading?: boolean;
555
556
  totalItems: number;
556
- filters: PaginationFilters;
557
+ filters: PaginationFilters & {
558
+ status?: number;
559
+ };
557
560
  onChangePage: (page: number) => void;
558
561
  onChangePageSize: (size: number) => void;
559
562
  onSort?: (sortField: string | number | symbol) => void;
@@ -570,6 +573,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
570
573
  renderHeadingSearch: () => ReactNode;
571
574
  rightHeadingContent: ReactNode;
572
575
  status?: number;
576
+ schema?: yup.AnyObjectSchema;
577
+ breadCrumb?: ItemType[];
573
578
  }
574
579
 
575
580
  export declare const Tabs: default_2.FC<TabsProps>;
@@ -622,11 +627,11 @@ export declare enum TypeActionRowTable {
622
627
  export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
623
628
 
624
629
  export declare const Typography: {
625
- Title: (props: TitleProps) => JSX_2.Element;
626
- Paragraph: (props: ParagraphProps) => JSX_2.Element;
627
- Text: (props: TextProps) => JSX_2.Element;
630
+ Title: (props: TitleProps) => JSX.Element;
631
+ Paragraph: (props: ParagraphProps) => JSX.Element;
632
+ Text: (props: TextProps) => JSX.Element;
628
633
  };
629
634
 
630
- export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX_2.Element;
635
+ export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
631
636
 
632
637
  export { }