@pnkx-lib/ui 1.9.85 → 1.9.87

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
- 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/interface/common';
44
+ import { PaginationFilters } from '../../../../../../../../../../../src/interface/common';
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,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 '../../../../../../../../../../../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
85
 
86
- export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX_2.Element;
86
+ export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX.Element;
87
87
 
88
88
  export declare interface ActionRowTableProps {
89
89
  type: TypeActionRowTable_2;
@@ -103,7 +103,7 @@ export declare const Anchor: typeof Anchor_2 & {
103
103
 
104
104
  export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
105
105
 
106
- export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX_2.Element;
106
+ export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
107
107
 
108
108
  export declare interface AppfixProps extends AffixProps {
109
109
  children: default_2.ReactNode;
@@ -113,7 +113,7 @@ export declare const AutoComplete: React.FC<AutoCompleteProps>;
113
113
 
114
114
  export declare type AutoCompleteProps = AutoCompleteProps_2;
115
115
 
116
- export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX_2.Element;
116
+ export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX.Element;
117
117
 
118
118
  export declare interface BadgeProps extends BadgeProps_2 {
119
119
  type?: "error" | "info" | "success" | "warning";
@@ -183,7 +183,7 @@ declare type BaseProps_9 = {
183
183
  spaceClassName?: string;
184
184
  };
185
185
 
186
- export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX_2.Element;
186
+ export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX.Element;
187
187
 
188
188
  export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
189
189
  children?: Omit<BreadcrumbItemType, "children">[];
@@ -195,7 +195,16 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
195
195
 
196
196
  export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
197
197
 
198
- export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX_2.Element;
198
+ export declare type BreadcrumbType = {
199
+ name: string;
200
+ href: string;
201
+ submenu: {
202
+ name: string;
203
+ href: string;
204
+ };
205
+ };
206
+
207
+ export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX.Element;
199
208
 
200
209
  export declare interface BulkActionProps {
201
210
  quantity?: number;
@@ -215,17 +224,17 @@ export declare const Button: default_2.FC<ButtonProps>;
215
224
 
216
225
  export declare type ButtonProps = ButtonProps_2;
217
226
 
218
- export declare const CascaderField: (props: CascaderFieldProps) => JSX_2.Element;
227
+ export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
219
228
 
220
229
  export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
221
230
 
222
- export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX_2.Element;
231
+ export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX.Element;
223
232
 
224
233
  export declare interface CategoryStatusProps {
225
234
  status: number;
226
235
  }
227
236
 
228
- export declare const Col: (props: ColPropsUnion) => JSX_2.Element;
237
+ export declare const Col: (props: ColPropsUnion) => JSX.Element;
229
238
 
230
239
  export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
231
240
  }
@@ -243,7 +252,7 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
243
252
  ItemGroup: typeof ItemGroup;
244
253
  };
245
254
 
246
- export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX_2.Element;
255
+ export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX.Element;
247
256
 
248
257
  export declare interface ConfirmModalProps extends ModalProps {
249
258
  title: string;
@@ -265,7 +274,7 @@ export declare interface ContainerProps {
265
274
  className?: string;
266
275
  }
267
276
 
268
- export declare const Divider: ({ children, ...rest }: DividerProps) => JSX_2.Element;
277
+ export declare const Divider: ({ children, ...rest }: DividerProps) => JSX.Element;
269
278
 
270
279
  declare const Divider_2: FC<MenuDividerProps>;
271
280
 
@@ -273,14 +282,14 @@ export declare interface DividerProps extends DividerProps_2 {
273
282
  children?: ReactNode | string;
274
283
  }
275
284
 
276
- export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX_2.Element;
285
+ export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX.Element;
277
286
 
278
287
  export declare interface DrawerProps extends DrawerProps_2 {
279
288
  children?: ReactNode;
280
289
  onSubmit?: (values: any) => void;
281
290
  }
282
291
 
283
- export declare const Dropdown: (props: DropdownPropsUnion) => JSX_2.Element;
292
+ export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
284
293
 
285
294
  export declare type DropdownButtonProps = DropdownButtonProps_2;
286
295
 
@@ -314,7 +323,7 @@ export declare interface ErrorBoundaryState {
314
323
  errorInfo: ErrorInfo | null;
315
324
  }
316
325
 
317
- export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX_2.Element | null>;
326
+ export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
318
327
 
319
328
  export declare interface ErrorMessageProps {
320
329
  errorMessage?: string;
@@ -327,7 +336,7 @@ declare type ExtraProps = {
327
336
  menuClassName?: string;
328
337
  };
329
338
 
330
- export declare const Flex: (props: FlexPropsUnion) => JSX_2.Element;
339
+ export declare const Flex: (props: FlexPropsUnion) => JSX.Element;
331
340
 
332
341
  export declare type FlexProps = FlexProps_2;
333
342
 
@@ -339,14 +348,14 @@ declare interface GroupHeadingButtonItem {
339
348
  keyActive: number;
340
349
  }
341
350
 
342
- export declare const Heading: (props: HeadingProps) => JSX_2.Element;
351
+ export declare const Heading: (props: HeadingProps) => JSX.Element;
343
352
 
344
353
  export declare interface HeadingProps {
345
354
  rightContent?: ReactNode;
346
355
  children?: ReactNode;
347
356
  noBreadcum?: boolean;
348
357
  classNameWrapHeading?: string;
349
- breadcrumbItems?: ItemType[];
358
+ menu: Array<MenuType>;
350
359
  }
351
360
 
352
361
  declare const Image_2: React.FC<ImageProps>;
@@ -358,7 +367,7 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
358
367
 
359
368
  export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
360
369
 
361
- export declare const Label: ({ label, required }: LabelProps) => JSX_2.Element;
370
+ export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
362
371
 
363
372
  export declare interface LabelProps {
364
373
  label: string;
@@ -377,49 +386,40 @@ export declare type LayoutProps = BaseProps_8 & BasicProps;
377
386
 
378
387
  export declare const Menu: CompoundedMenu;
379
388
 
380
- export declare type MenuComponentProps = ExtraProps & MenuProps_2;
389
+ export declare type MenuComponentProps = ExtraProps & MenuProps;
381
390
 
382
391
  declare const MenuItem: FC<MenuItemProps>;
383
392
 
384
393
  export declare type MenuItemProps = MenuItemProps_2;
385
394
 
386
- export declare type MenuProps = {
387
- name: string;
388
- href: string;
389
- icon: default_2.ReactNode;
390
- current: boolean;
391
- subMenu?: Array<{
392
- name: string;
393
- href: string;
394
- icon: default_2.ReactNode;
395
- children?: Array<{
396
- name: string;
397
- href: string;
398
- icon?: default_2.ReactNode;
399
- }>;
400
- }>;
401
- };
402
-
403
- declare type MenuProps_2 = MenuProps_3;
395
+ export declare type MenuProps = MenuProps_2;
404
396
 
405
- declare type MenuProps_4 = {
397
+ export declare type MenuType = {
406
398
  name: string;
407
- href: string;
408
- icon: React.ReactNode;
409
- current: boolean;
410
- subMenu?: Array<{
399
+ path: string;
400
+ isShow: boolean;
401
+ isPrivateRoute?: boolean;
402
+ modules: {
411
403
  name: string;
412
- href: string;
413
- icon: React.ReactNode;
414
- children?: Array<{
404
+ path: string;
405
+ icon?: ReactNode;
406
+ component: typeof default_2.Component | default_2.FC;
407
+ subMenu?: Array<{
415
408
  name: string;
416
- href: string;
417
- icon?: React.ReactNode;
409
+ path: string;
410
+ icon: ReactNode;
411
+ component: typeof default_2.Component | default_2.FC;
412
+ children?: Array<{
413
+ name: string;
414
+ path: string;
415
+ icon: ReactNode;
416
+ component: typeof default_2.Component | default_2.FC;
417
+ }>;
418
418
  }>;
419
- }>;
419
+ }[];
420
420
  };
421
421
 
422
- export declare const Modal: ({ children, ...rest }: ModalProps) => JSX_2.Element;
422
+ export declare const Modal: ({ children, ...rest }: ModalProps) => JSX.Element;
423
423
 
424
424
  export declare interface ModalProps extends ModalProps_2 {
425
425
  children?: ReactNode;
@@ -455,13 +455,13 @@ export declare interface PnkxSpinProps extends SpinProps {
455
455
  children?: ReactNode;
456
456
  }
457
457
 
458
- export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX_2.Element;
458
+ export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX.Element;
459
459
 
460
460
  export declare interface PopconfirmProps extends PopconfirmProps_2 {
461
461
  children?: ReactNode;
462
462
  }
463
463
 
464
- export declare const Popover: (props: PopoverPropsUnion) => JSX_2.Element;
464
+ export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
465
465
 
466
466
  export declare type PopoverProps = PopoverProps_2;
467
467
 
@@ -473,13 +473,13 @@ export declare type QRCodeProps = QRCodeProps_2;
473
473
 
474
474
  export declare const Rate: React.FC<RateProps>;
475
475
 
476
- export declare const Result: ({ children, ...rest }: ResultProps) => JSX_2.Element;
476
+ export declare const Result: ({ children, ...rest }: ResultProps) => JSX.Element;
477
477
 
478
478
  export declare interface ResultProps extends ResultProps_2 {
479
479
  children?: ReactNode | string;
480
480
  }
481
481
 
482
- export declare const Row: (props: RowPropsUnion) => JSX_2.Element;
482
+ export declare const Row: (props: RowPropsUnion) => JSX.Element;
483
483
 
484
484
  declare interface RowCommon {
485
485
  [x: string]: any;
@@ -487,7 +487,7 @@ declare interface RowCommon {
487
487
 
488
488
  export declare type RowPropsUnion = BaseProps_4 & RowProps;
489
489
 
490
- export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX_2.Element;
490
+ export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
491
491
 
492
492
  export declare interface SearchFiltersFormProps<T extends FieldValues> {
493
493
  renderFilterFields?: (options: {
@@ -509,18 +509,18 @@ export declare const Segmented: React.FC<SegmentedProps>;
509
509
 
510
510
  export declare type SegmentedProps = SegmentedProps_2;
511
511
 
512
- export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX_2.Element;
512
+ export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX.Element;
513
513
 
514
514
  export declare interface SidebarProps {
515
- children?: React.ReactNode;
516
- menu: Array<MenuProps_4>;
515
+ children?: default_2.ReactNode;
516
+ menu: Array<MenuType>;
517
517
  }
518
518
 
519
519
  declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
520
520
  multiple?: false;
521
521
  };
522
522
 
523
- export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX_2.Element;
523
+ export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX.Element;
524
524
 
525
525
  export declare interface SkeletonProps extends SkeletonProps_2 {
526
526
  type?: "table" | "form";
@@ -535,7 +535,7 @@ export declare const Space: typeof Space_2;
535
535
 
536
536
  export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
537
537
 
538
- export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX_2.Element;
538
+ export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX.Element;
539
539
 
540
540
  export declare const Splitter: typeof Splitter_2;
541
541
 
@@ -570,7 +570,7 @@ declare type TabItem = {
570
570
  disabled?: boolean;
571
571
  };
572
572
 
573
- 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, handleClickGroupHeadingButtonItem, showIndexColumn, ...rest }: TableCommonProps<T>) => JSX_2.Element;
573
+ 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, handleClickGroupHeadingButtonItem, showIndexColumn, ...rest }: TableCommonProps<T>) => JSX.Element;
574
574
 
575
575
  export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
576
576
 
@@ -596,7 +596,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
596
596
  setColumns?: (newColumns: TableColumnsType<T>) => void;
597
597
  renderHeadingSearch: () => ReactNode;
598
598
  rightHeadingContent: ReactNode;
599
- menu: Array<MenuProps>;
599
+ menu: Array<MenuType>;
600
+ renderGroupHeadingButton: ReactNode;
600
601
  groupHeadingButtonItems: GroupHeadingButtonItem[];
601
602
  handleClickGroupHeadingButtonItem?: (value?: GroupHeadingButtonItem, e?: default_2.MouseEvent<HTMLElement, MouseEvent>) => void;
602
603
  showIndexColumn?: boolean;
@@ -652,11 +653,11 @@ export declare enum TypeActionRowTable {
652
653
  export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
653
654
 
654
655
  export declare const Typography: {
655
- Title: (props: TitleProps) => JSX_2.Element;
656
- Paragraph: (props: ParagraphProps) => JSX_2.Element;
657
- Text: (props: TextProps) => JSX_2.Element;
656
+ Title: (props: TitleProps) => JSX.Element;
657
+ Paragraph: (props: ParagraphProps) => JSX.Element;
658
+ Text: (props: TextProps) => JSX.Element;
658
659
  };
659
660
 
660
- export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX_2.Element;
661
+ export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
661
662
 
662
663
  export { }