@pnkx-lib/ui 1.9.81 → 1.9.83

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 } from 'react/jsx-runtime';
37
+ import { JSX as JSX_2 } 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 MenuProps_3 } from 'antd/es/menu';
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.Element;
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) => JSX.Element;
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) => JSX.Element;
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) => JSX.Element;
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">[];
@@ -195,7 +196,7 @@ 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.Element;
199
+ export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX_2.Element;
199
200
 
200
201
  export declare interface BulkActionProps {
201
202
  quantity?: number;
@@ -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.Element;
219
+ export declare const CascaderField: (props: CascaderFieldProps) => JSX_2.Element;
219
220
 
220
221
  export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
221
222
 
222
- export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX.Element;
223
+ export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX_2.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.Element;
229
+ export declare const Col: (props: ColPropsUnion) => JSX_2.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.Element;
247
+ export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX_2.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.Element;
269
+ export declare const Divider: ({ children, ...rest }: DividerProps) => JSX_2.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.Element;
277
+ export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX_2.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.Element;
284
+ export declare const Dropdown: (props: DropdownPropsUnion) => JSX_2.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.Element | null>;
318
+ export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX_2.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.Element;
331
+ export declare const Flex: (props: FlexPropsUnion) => JSX_2.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.Element;
337
+ export declare const Heading: (props: HeadingProps) => JSX_2.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.Element;
356
+ export declare const Label: ({ label, required }: LabelProps) => JSX_2.Element;
356
357
 
357
358
  export declare interface LabelProps {
358
359
  label: string;
@@ -371,49 +372,15 @@ export declare type LayoutProps = BaseProps_8 & BasicProps;
371
372
 
372
373
  export declare const Menu: CompoundedMenu;
373
374
 
374
- export declare type MenuComponentProps = ExtraProps & MenuProps_2;
375
+ export declare type MenuComponentProps = ExtraProps & MenuProps;
375
376
 
376
377
  declare const MenuItem: FC<MenuItemProps>;
377
378
 
378
379
  export declare type MenuItemProps = MenuItemProps_2;
379
380
 
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
- };
381
+ export declare type MenuProps = MenuProps_2;
396
382
 
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;
383
+ export declare const Modal: ({ children, ...rest }: ModalProps) => JSX_2.Element;
417
384
 
418
385
  export declare interface ModalProps extends ModalProps_2 {
419
386
  children?: ReactNode;
@@ -423,9 +390,9 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
423
390
  multiple: true;
424
391
  };
425
392
 
426
- export declare const PAGE_NUMBER = "page_number";
393
+ export declare const PAGE_INDEX = "PageIndex";
427
394
 
428
- export declare const PAGE_SIZE = "page_size";
395
+ export declare const PAGE_SIZE = "PageSize";
429
396
 
430
397
  export declare const Pagination: typeof Pagination_2;
431
398
 
@@ -449,13 +416,13 @@ export declare interface PnkxSpinProps extends SpinProps {
449
416
  children?: ReactNode;
450
417
  }
451
418
 
452
- export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX.Element;
419
+ export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX_2.Element;
453
420
 
454
421
  export declare interface PopconfirmProps extends PopconfirmProps_2 {
455
422
  children?: ReactNode;
456
423
  }
457
424
 
458
- export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
425
+ export declare const Popover: (props: PopoverPropsUnion) => JSX_2.Element;
459
426
 
460
427
  export declare type PopoverProps = PopoverProps_2;
461
428
 
@@ -467,13 +434,13 @@ export declare type QRCodeProps = QRCodeProps_2;
467
434
 
468
435
  export declare const Rate: React.FC<RateProps>;
469
436
 
470
- export declare const Result: ({ children, ...rest }: ResultProps) => JSX.Element;
437
+ export declare const Result: ({ children, ...rest }: ResultProps) => JSX_2.Element;
471
438
 
472
439
  export declare interface ResultProps extends ResultProps_2 {
473
440
  children?: ReactNode | string;
474
441
  }
475
442
 
476
- export declare const Row: (props: RowPropsUnion) => JSX.Element;
443
+ export declare const Row: (props: RowPropsUnion) => JSX_2.Element;
477
444
 
478
445
  declare interface RowCommon {
479
446
  [x: string]: any;
@@ -481,7 +448,7 @@ declare interface RowCommon {
481
448
 
482
449
  export declare type RowPropsUnion = BaseProps_4 & RowProps;
483
450
 
484
- export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
451
+ export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX_2.Element;
485
452
 
486
453
  export declare interface SearchFiltersFormProps<T extends FieldValues> {
487
454
  renderFilterFields?: (options: {
@@ -503,18 +470,28 @@ export declare const Segmented: React.FC<SegmentedProps>;
503
470
 
504
471
  export declare type SegmentedProps = SegmentedProps_2;
505
472
 
506
- export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX.Element;
473
+ export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX_2.Element;
507
474
 
508
475
  export declare interface SidebarProps {
509
476
  children?: React.ReactNode;
510
- menu: Array<MenuProps_4>;
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
+ }>;
511
488
  }
512
489
 
513
490
  declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
514
491
  multiple?: false;
515
492
  };
516
493
 
517
- export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX.Element;
494
+ export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX_2.Element;
518
495
 
519
496
  export declare interface SkeletonProps extends SkeletonProps_2 {
520
497
  type?: "table" | "form";
@@ -529,7 +506,7 @@ export declare const Space: typeof Space_2;
529
506
 
530
507
  export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
531
508
 
532
- export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX.Element;
509
+ export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX_2.Element;
533
510
 
534
511
  export declare const Splitter: typeof Splitter_2;
535
512
 
@@ -564,17 +541,19 @@ declare type TabItem = {
564
541
  disabled?: boolean;
565
542
  };
566
543
 
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, showIndexColumn, ...rest }: TableCommonProps<T>) => JSX.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_2.Element;
568
545
 
569
546
  export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
570
547
 
571
- export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {})[];
548
+ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
549
+ editable?: boolean;
550
+ })[];
572
551
 
573
552
  export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
574
- dataSource?: T[];
553
+ dataSource: T[];
575
554
  columns: TableColumnsType<T>;
576
555
  loading?: boolean;
577
- totalItems?: number;
556
+ totalItems: number;
578
557
  filters: PaginationFilters & {
579
558
  status?: number;
580
559
  };
@@ -585,13 +564,17 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
585
564
  onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
586
565
  onRowClick?: (record: T) => void;
587
566
  rowKey?: string | ((record: T) => string);
567
+ className?: string;
568
+ editable?: boolean;
569
+ onSave?: (data: T) => void;
588
570
  titleSettingTableModal?: string;
589
571
  showSetting?: boolean;
590
572
  setColumns?: (newColumns: TableColumnsType<T>) => void;
591
573
  renderHeadingSearch: () => ReactNode;
592
574
  rightHeadingContent: ReactNode;
593
- menu: Array<MenuProps>;
594
- showIndexColumn?: boolean;
575
+ status?: number;
576
+ schema?: yup.AnyObjectSchema;
577
+ breadCrumb?: ItemType[];
595
578
  }
596
579
 
597
580
  export declare const Tabs: default_2.FC<TabsProps>;
@@ -644,11 +627,11 @@ export declare enum TypeActionRowTable {
644
627
  export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
645
628
 
646
629
  export declare const Typography: {
647
- Title: (props: TitleProps) => JSX.Element;
648
- Paragraph: (props: ParagraphProps) => JSX.Element;
649
- Text: (props: TextProps) => JSX.Element;
630
+ Title: (props: TitleProps) => JSX_2.Element;
631
+ Paragraph: (props: ParagraphProps) => JSX_2.Element;
632
+ Text: (props: TextProps) => JSX_2.Element;
650
633
  };
651
634
 
652
- export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
635
+ export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX_2.Element;
653
636
 
654
637
  export { }