@pnkx-lib/ui 1.9.36 → 1.9.38

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
@@ -17,8 +17,8 @@ import { ColProps as ColProps_2 } from 'antd';
17
17
  import { ColSize } from 'antd/es/grid';
18
18
  import { Component } from 'react';
19
19
  import { Control } from 'react-hook-form';
20
- import { default as default_2 } from 'antd/es/anchor/AnchorLink';
21
- import { default as default_3 } from 'react';
20
+ import { default as default_2 } from 'react';
21
+ import { default as default_3 } from 'antd/es/anchor/AnchorLink';
22
22
  import { DefaultOptionType } from 'antd/es/cascader';
23
23
  import { DefaultValues } from 'react-hook-form';
24
24
  import { DividerProps as DividerProps_2 } from 'antd';
@@ -34,7 +34,8 @@ 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 { InitialFiltersSearch } from '../../../../../../../../../../../src/components/hooks';
38
+ import { JSX } from 'react/jsx-runtime';
38
39
  import { MenuDividerProps } from 'antd/es/menu';
39
40
  import { MenuItemGroupProps } from 'rc-menu/lib/MenuItemGroup';
40
41
  import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
@@ -76,32 +77,43 @@ import { TitleProps } from 'antd/es/typography/Title';
76
77
  import { TooltipProps as TooltipProps_2 } from 'antd';
77
78
  import { TourProps as TourProps_2 } from 'antd';
78
79
  import { TreeProps as TreeProps_2 } from 'antd';
80
+ import { TypeActionRowTable as TypeActionRowTable_2 } from '../../../../../../../../../../../../src/constants/table';
79
81
  import { UseFormReset } from 'react-hook-form';
80
82
  import { UseFormReturn } from 'react-hook-form';
81
83
  import { UseFormSetValue } from 'react-hook-form';
82
84
  import { WatermarkProps } from 'antd';
83
85
 
86
+ export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX.Element;
87
+
88
+ export declare interface ActionRowTableProps {
89
+ type: TypeActionRowTable_2;
90
+ handleClick?: () => void;
91
+ contentTooltip?: default_2.ReactNode;
92
+ content?: default_2.ReactNode;
93
+ diabled?: boolean;
94
+ }
95
+
84
96
  export declare const Alert: React.FC<AlertProps>;
85
97
 
86
98
  export declare type AlertProps = AlertProps_2;
87
99
 
88
100
  export declare const Anchor: typeof Anchor_2 & {
89
- Link: typeof default_2;
101
+ Link: typeof default_3;
90
102
  };
91
103
 
92
104
  export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
93
105
 
94
- export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX_2.Element;
106
+ export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
95
107
 
96
108
  export declare interface AppfixProps extends AffixProps {
97
- children: default_3.ReactNode;
109
+ children: default_2.ReactNode;
98
110
  }
99
111
 
100
112
  export declare const AutoComplete: React.FC<AutoCompleteProps>;
101
113
 
102
114
  export declare type AutoCompleteProps = AutoCompleteProps_2;
103
115
 
104
- export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX_2.Element;
116
+ export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX.Element;
105
117
 
106
118
  export declare interface BadgeProps extends BadgeProps_2 {
107
119
  type?: "error" | "info" | "success" | "warning";
@@ -171,7 +183,7 @@ declare type BaseProps_9 = {
171
183
  spaceClassName?: string;
172
184
  };
173
185
 
174
- export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX_2.Element;
186
+ export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX.Element;
175
187
 
176
188
  export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
177
189
  children?: Omit<BreadcrumbItemType, "children">[];
@@ -183,7 +195,7 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
183
195
 
184
196
  export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
185
197
 
186
- export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX_2.Element;
198
+ export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX.Element;
187
199
 
188
200
  export declare interface BulkActionProps {
189
201
  quantity: number;
@@ -199,15 +211,21 @@ export declare interface BulkActionProps {
199
211
  status?: number;
200
212
  }
201
213
 
202
- export declare const Button: default_3.FC<ButtonProps>;
214
+ export declare const Button: default_2.FC<ButtonProps>;
203
215
 
204
216
  export declare type ButtonProps = ButtonProps_2;
205
217
 
206
- export declare const CascaderField: (props: CascaderFieldProps) => JSX_2.Element;
218
+ export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
207
219
 
208
220
  export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
209
221
 
210
- export declare const Col: (props: ColPropsUnion) => JSX_2.Element;
222
+ export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX.Element;
223
+
224
+ export declare interface CategoryStatusProps {
225
+ status: number;
226
+ }
227
+
228
+ export declare const Col: (props: ColPropsUnion) => JSX.Element;
211
229
 
212
230
  export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
213
231
  }
@@ -225,7 +243,7 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
225
243
  ItemGroup: typeof ItemGroup;
226
244
  };
227
245
 
228
- export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX_2.Element;
246
+ export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX.Element;
229
247
 
230
248
  export declare interface ConfirmModalProps extends ModalProps {
231
249
  title: string;
@@ -239,15 +257,15 @@ export declare interface ConfirmModalProps extends ModalProps {
239
257
 
240
258
  export declare type ConfirmModalType = "success" | "error" | "warning" | "info";
241
259
 
242
- export declare const Container: default_3.FC<ContainerProps>;
260
+ export declare const Container: default_2.FC<ContainerProps>;
243
261
 
244
262
  export declare interface ContainerProps {
245
- children: default_3.ReactNode;
263
+ children: default_2.ReactNode;
246
264
  size?: TailwindMaxWidth;
247
265
  className?: string;
248
266
  }
249
267
 
250
- export declare const Divider: ({ children, ...rest }: DividerProps) => JSX_2.Element;
268
+ export declare const Divider: ({ children, ...rest }: DividerProps) => JSX.Element;
251
269
 
252
270
  declare const Divider_2: FC<MenuDividerProps>;
253
271
 
@@ -255,14 +273,14 @@ export declare interface DividerProps extends DividerProps_2 {
255
273
  children?: ReactNode | string;
256
274
  }
257
275
 
258
- export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX_2.Element;
276
+ export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX.Element;
259
277
 
260
278
  export declare interface DrawerProps extends DrawerProps_2 {
261
279
  children?: ReactNode;
262
280
  onSubmit?: (values: any) => void;
263
281
  }
264
282
 
265
- export declare const Dropdown: (props: DropdownPropsUnion) => JSX_2.Element;
283
+ export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
266
284
 
267
285
  export declare type DropdownButtonProps = DropdownButtonProps_2;
268
286
 
@@ -283,7 +301,7 @@ declare class ErrorBoundaryClass extends Component<ErrorBoundaryProps, ErrorBoun
283
301
  static getDerivedStateFromError(error: Error): ErrorBoundaryState;
284
302
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
285
303
  handleReload: () => void;
286
- render(): default_3.ReactNode;
304
+ render(): default_2.ReactNode;
287
305
  }
288
306
 
289
307
  export declare interface ErrorBoundaryProps {
@@ -296,7 +314,7 @@ export declare interface ErrorBoundaryState {
296
314
  errorInfo: ErrorInfo | null;
297
315
  }
298
316
 
299
- export declare const ErrorMessage: default_3.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX_2.Element | null>;
317
+ export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
300
318
 
301
319
  export declare interface ErrorMessageProps {
302
320
  errorMessage?: string;
@@ -309,13 +327,19 @@ declare type ExtraProps = {
309
327
  menuClassName?: string;
310
328
  };
311
329
 
312
- export declare const Flex: (props: FlexPropsUnion) => JSX_2.Element;
330
+ export declare const Flex: (props: FlexPropsUnion) => JSX.Element;
313
331
 
314
332
  export declare type FlexProps = FlexProps_2;
315
333
 
316
334
  export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
317
335
 
318
- export declare const Heading: (props: HeadingProps) => JSX_2.Element;
336
+ declare interface GroupHeadingButtonItem {
337
+ label: string;
338
+ value: number;
339
+ keyActive: number;
340
+ }
341
+
342
+ export declare const Heading: (props: HeadingProps) => JSX.Element;
319
343
 
320
344
  export declare interface HeadingProps {
321
345
  rightContent?: ReactNode;
@@ -334,19 +358,26 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
334
358
 
335
359
  export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
336
360
 
337
- export declare const Label: ({ label, required }: LabelProps) => JSX_2.Element;
361
+ declare type IValueSearch = {
362
+ keyword: string | undefined;
363
+ attributeType: string | null | undefined;
364
+ PageIndex: number;
365
+ PageSize: number;
366
+ };
367
+
368
+ export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
338
369
 
339
370
  export declare interface LabelProps {
340
371
  label: string;
341
372
  required?: boolean;
342
373
  }
343
374
 
344
- export declare const Layout: default_3.FC<LayoutProps> & {
345
- Header: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
346
- Footer: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
347
- Content: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
348
- Sider: default_3.ForwardRefExoticComponent<SiderProps & default_3.RefAttributes<HTMLDivElement>>;
349
- _InternalSiderContext: default_3.Context<SiderContextProps>;
375
+ export declare const Layout: default_2.FC<LayoutProps> & {
376
+ Header: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
377
+ Footer: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
378
+ Content: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
379
+ Sider: default_2.ForwardRefExoticComponent<SiderProps & default_2.RefAttributes<HTMLDivElement>>;
380
+ _InternalSiderContext: default_2.Context<SiderContextProps>;
350
381
  };
351
382
 
352
383
  export declare type LayoutProps = BaseProps_8 & BasicProps;
@@ -361,17 +392,20 @@ export declare type MenuItemProps = MenuItemProps_2;
361
392
 
362
393
  export declare type MenuProps = MenuProps_2;
363
394
 
364
- export declare const Modal: ({ children, onOk, onSubmit, ...rest }: ModalProps) => JSX_2.Element;
395
+ export declare const Modal: ({ children, ...rest }: ModalProps) => JSX.Element;
365
396
 
366
397
  export declare interface ModalProps extends ModalProps_2 {
367
398
  children?: ReactNode;
368
- onSubmit?: () => void;
369
399
  }
370
400
 
371
401
  declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, true> & {
372
402
  multiple: true;
373
403
  };
374
404
 
405
+ export declare const PAGE_INDEX = "PageIndex";
406
+
407
+ export declare const PAGE_SIZE = "PageSize";
408
+
375
409
  export declare const Pagination: typeof Pagination_2;
376
410
 
377
411
  export declare type PaginationConfig = Omit<PaginationProps, "rootClassName"> & {
@@ -394,13 +428,13 @@ export declare interface PnkxSpinProps extends SpinProps {
394
428
  children?: ReactNode;
395
429
  }
396
430
 
397
- export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX_2.Element;
431
+ export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX.Element;
398
432
 
399
433
  export declare interface PopconfirmProps extends PopconfirmProps_2 {
400
434
  children?: ReactNode;
401
435
  }
402
436
 
403
- export declare const Popover: (props: PopoverPropsUnion) => JSX_2.Element;
437
+ export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
404
438
 
405
439
  export declare type PopoverProps = PopoverProps_2;
406
440
 
@@ -412,13 +446,13 @@ export declare type QRCodeProps = QRCodeProps_2;
412
446
 
413
447
  export declare const Rate: React.FC<RateProps>;
414
448
 
415
- export declare const Result: ({ children, ...rest }: ResultProps) => JSX_2.Element;
449
+ export declare const Result: ({ children, ...rest }: ResultProps) => JSX.Element;
416
450
 
417
451
  export declare interface ResultProps extends ResultProps_2 {
418
452
  children?: ReactNode | string;
419
453
  }
420
454
 
421
- export declare const Row: (props: RowPropsUnion) => JSX_2.Element;
455
+ export declare const Row: (props: RowPropsUnion) => JSX.Element;
422
456
 
423
457
  declare interface RowCommon {
424
458
  [x: string]: any;
@@ -426,7 +460,7 @@ declare interface RowCommon {
426
460
 
427
461
  export declare type RowPropsUnion = BaseProps_4 & RowProps;
428
462
 
429
- export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX_2.Element;
463
+ export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
430
464
 
431
465
  export declare interface SearchFiltersFormProps<T extends FieldValues> {
432
466
  renderFilterFields?: (options: {
@@ -434,7 +468,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
434
468
  setValue?: UseFormSetValue<T>;
435
469
  handleSubmit?: FormEventHandler<any>;
436
470
  reset?: UseFormReset<T>;
437
- }) => default_3.ReactNode;
471
+ }) => default_2.ReactNode;
438
472
  onReset?: () => void;
439
473
  classNamesContainer?: string;
440
474
  classNameWrapperForm?: string;
@@ -448,7 +482,7 @@ export declare const Segmented: React.FC<SegmentedProps>;
448
482
 
449
483
  export declare type SegmentedProps = SegmentedProps_2;
450
484
 
451
- export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX_2.Element;
485
+ export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX.Element;
452
486
 
453
487
  export declare interface SidebarProps {
454
488
  children?: React.ReactNode;
@@ -469,23 +503,31 @@ declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
469
503
  multiple?: false;
470
504
  };
471
505
 
472
- export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX_2.Element;
506
+ export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX.Element;
473
507
 
474
508
  export declare interface SkeletonProps extends SkeletonProps_2 {
475
509
  type?: "table" | "form";
476
510
  skeletonButtonCount?: number;
477
511
  }
478
512
 
513
+ export declare const SORT_BY = "SortBy";
514
+
515
+ export declare const SORT_DESC = "SortDesc";
516
+
479
517
  export declare const Space: typeof Space_2;
480
518
 
481
519
  export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
482
520
 
483
- export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX_2.Element;
521
+ export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX.Element;
484
522
 
485
523
  export declare const Splitter: typeof Splitter_2;
486
524
 
487
525
  export declare type SplitterPropsUnion = BaseProps_10 & SplitterProps;
488
526
 
527
+ export declare const START_PAGE = 1;
528
+
529
+ export declare const START_PAGE_SIZE = 10;
530
+
489
531
  export declare const Statistic: React.FC<StatisticProps>;
490
532
 
491
533
  export declare type StatisticProps = StatisticProps_2;
@@ -506,12 +548,12 @@ export declare type SubMenuProps = SubMenuProps_2;
506
548
 
507
549
  declare type TabItem = {
508
550
  key: string;
509
- label: default_3.ReactNode;
510
- children: default_3.ReactNode;
551
+ label: default_2.ReactNode;
552
+ children: default_2.ReactNode;
511
553
  disabled?: boolean;
512
554
  };
513
555
 
514
- 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, ...rest }: TableCommonProps<T>) => JSX_2.Element;
556
+ 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, resetToInitialFilters, handleSearch, groupHeadingButtonItems, tagSearchItems, setTagSearchItems, setKeyActive, keyActive, ...rest }: TableCommonProps<T>) => JSX.Element;
515
557
 
516
558
  export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
517
559
 
@@ -528,8 +570,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
528
570
  onChangePage: (page: number) => void;
529
571
  onChangePageSize: (size: number) => void;
530
572
  onSort?: (sortField: string | number | symbol) => void;
531
- rowsSelected?: default_3.Key[];
532
- onSelect: (newSelectedRowKeys: default_3.Key[]) => void;
573
+ rowsSelected?: default_2.Key[];
574
+ onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
533
575
  onRowClick?: (record: T) => void;
534
576
  rowKey?: string | ((record: T) => string);
535
577
  className?: string;
@@ -538,9 +580,16 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
538
580
  titleSettingTableModal?: string;
539
581
  showSetting?: boolean;
540
582
  setColumns?: (newColumns: TableColumnsType<T>) => void;
583
+ resetToInitialFilters: () => void;
584
+ handleSearch: (nextFilters: InitialFiltersSearch<IValueSearch>) => void;
585
+ groupHeadingButtonItems: GroupHeadingButtonItem[];
586
+ tagSearchItems?: string[];
587
+ setTagSearchItems?: (value: string[]) => void;
588
+ setKeyActive: (value: string | number) => void;
589
+ keyActive: string | number;
541
590
  }
542
591
 
543
- export declare const Tabs: default_3.FC<TabsProps>;
592
+ export declare const Tabs: default_2.FC<TabsProps>;
544
593
 
545
594
  export declare type TabsProps = TabsProps_2 & {
546
595
  items: TabItem[];
@@ -559,7 +608,9 @@ export declare const Timeline: React.FC<TimelineProps>;
559
608
 
560
609
  export declare type TimelineProps = TimelineProps_2;
561
610
 
562
- export declare const Tooltip: default_3.FC<TooltipProps>;
611
+ export declare const TINY_API = "miai0qn3c79adm555yoxd9kz6j6a323ek760nf7qd81nv1p5";
612
+
613
+ export declare const Tooltip: default_2.FC<TooltipProps>;
563
614
 
564
615
  export declare type TooltipProps = TooltipProps_2;
565
616
 
@@ -571,14 +622,28 @@ export declare const Tree: React.FC<TreeProps>;
571
622
 
572
623
  export declare type TreeProps = TreeProps_2;
573
624
 
625
+ export declare enum TypeActionRowTable {
626
+ DELETE = "DELETE",
627
+ EDIT = "EDIT",
628
+ UNDO = "UNDO",
629
+ CANCELUNDO = "CANCELUNDO",
630
+ CHECKIN = "CHECKIN",
631
+ PRINT = "PRINT",
632
+ PAYMENT = "PAYMENT",
633
+ PLAY = "PLAY",
634
+ PAUSE = "PAUSE",
635
+ DOWNLOAD = "DOWNLOAD",
636
+ VIEW = "VIEW"
637
+ }
638
+
574
639
  export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
575
640
 
576
641
  export declare const Typography: {
577
- Title: (props: TitleProps) => JSX_2.Element;
578
- Paragraph: (props: ParagraphProps) => JSX_2.Element;
579
- Text: (props: TextProps) => JSX_2.Element;
642
+ Title: (props: TitleProps) => JSX.Element;
643
+ Paragraph: (props: ParagraphProps) => JSX.Element;
644
+ Text: (props: TextProps) => JSX.Element;
580
645
  };
581
646
 
582
- export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX_2.Element;
647
+ export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
583
648
 
584
649
  export { }