@pnkx-lib/ui 1.9.34 → 1.9.36
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/assets/{ui-Jiyqh2vu.css → ui-CY4SzUee.css} +35 -0
- package/es/chunks/{index-C4e9vJdZ.js → CategoryStatus-DdH8iIZs.js} +552 -205
- package/es/chunks/Radio-BI84-zGV.js +53 -0
- package/es/chunks/{Switch-Ck9WdQgt.js → Switch-DIm0IBxH.js} +69 -14
- package/es/chunks/{table-B28OPA57.js → cloneDeep-BLYi2V0G.js} +5 -32
- package/es/chunks/{_MapCache-hm6_DB7i.js → common-b3FKGF0Y.js} +7 -1
- package/es/chunks/{useToggle-C5Y4aFUQ.js → useMessage-D_-VT5B4.js} +3 -15
- 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 +3 -7
- package/types/fields.d.ts +11 -11
- package/types/hooks.d.ts +6 -19
- package/types/index.d.ts +74 -132
- package/types/ui.d.ts +50 -95
- package/es/chunks/Radio-5j1KNRlx.js +0 -103
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 '
|
21
|
-
import { default as default_3 } from '
|
20
|
+
import { default as default_2 } from 'antd/es/anchor/AnchorLink';
|
21
|
+
import { default as default_3 } from 'react';
|
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,7 @@ 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';
|
@@ -76,43 +76,32 @@ import { TitleProps } from 'antd/es/typography/Title';
|
|
76
76
|
import { TooltipProps as TooltipProps_2 } from 'antd';
|
77
77
|
import { TourProps as TourProps_2 } from 'antd';
|
78
78
|
import { TreeProps as TreeProps_2 } from 'antd';
|
79
|
-
import { TypeActionRowTable as TypeActionRowTable_2 } from '../../../../../../../../../../../../src/constants/table';
|
80
79
|
import { UseFormReset } from 'react-hook-form';
|
81
80
|
import { UseFormReturn } from 'react-hook-form';
|
82
81
|
import { UseFormSetValue } from 'react-hook-form';
|
83
82
|
import { WatermarkProps } from 'antd';
|
84
83
|
|
85
|
-
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX.Element;
|
86
|
-
|
87
|
-
export declare interface ActionRowTableProps {
|
88
|
-
type: TypeActionRowTable_2;
|
89
|
-
handleClick?: () => void;
|
90
|
-
contentTooltip?: default_2.ReactNode;
|
91
|
-
content?: default_2.ReactNode;
|
92
|
-
diabled?: boolean;
|
93
|
-
}
|
94
|
-
|
95
84
|
export declare const Alert: React.FC<AlertProps>;
|
96
85
|
|
97
86
|
export declare type AlertProps = AlertProps_2;
|
98
87
|
|
99
88
|
export declare const Anchor: typeof Anchor_2 & {
|
100
|
-
Link: typeof
|
89
|
+
Link: typeof default_2;
|
101
90
|
};
|
102
91
|
|
103
92
|
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
104
93
|
|
105
|
-
export declare const Appfix: ({ children, ...rest }: AppfixProps) =>
|
94
|
+
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX_2.Element;
|
106
95
|
|
107
96
|
export declare interface AppfixProps extends AffixProps {
|
108
|
-
children:
|
97
|
+
children: default_3.ReactNode;
|
109
98
|
}
|
110
99
|
|
111
100
|
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
112
101
|
|
113
102
|
export declare type AutoCompleteProps = AutoCompleteProps_2;
|
114
103
|
|
115
|
-
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) =>
|
104
|
+
export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX_2.Element;
|
116
105
|
|
117
106
|
export declare interface BadgeProps extends BadgeProps_2 {
|
118
107
|
type?: "error" | "info" | "success" | "warning";
|
@@ -182,7 +171,7 @@ declare type BaseProps_9 = {
|
|
182
171
|
spaceClassName?: string;
|
183
172
|
};
|
184
173
|
|
185
|
-
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) =>
|
174
|
+
export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX_2.Element;
|
186
175
|
|
187
176
|
export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
|
188
177
|
children?: Omit<BreadcrumbItemType, "children">[];
|
@@ -194,7 +183,7 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
194
183
|
|
195
184
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
196
185
|
|
197
|
-
export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) =>
|
186
|
+
export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX_2.Element;
|
198
187
|
|
199
188
|
export declare interface BulkActionProps {
|
200
189
|
quantity: number;
|
@@ -210,21 +199,15 @@ export declare interface BulkActionProps {
|
|
210
199
|
status?: number;
|
211
200
|
}
|
212
201
|
|
213
|
-
export declare const Button:
|
202
|
+
export declare const Button: default_3.FC<ButtonProps>;
|
214
203
|
|
215
204
|
export declare type ButtonProps = ButtonProps_2;
|
216
205
|
|
217
|
-
export declare const CascaderField: (props: CascaderFieldProps) =>
|
206
|
+
export declare const CascaderField: (props: CascaderFieldProps) => JSX_2.Element;
|
218
207
|
|
219
208
|
export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
|
220
209
|
|
221
|
-
export declare const
|
222
|
-
|
223
|
-
export declare interface CategoryStatusProps {
|
224
|
-
status: number;
|
225
|
-
}
|
226
|
-
|
227
|
-
export declare const Col: (props: ColPropsUnion) => JSX.Element;
|
210
|
+
export declare const Col: (props: ColPropsUnion) => JSX_2.Element;
|
228
211
|
|
229
212
|
export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
|
230
213
|
}
|
@@ -242,7 +225,7 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
|
|
242
225
|
ItemGroup: typeof ItemGroup;
|
243
226
|
};
|
244
227
|
|
245
|
-
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) =>
|
228
|
+
export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX_2.Element;
|
246
229
|
|
247
230
|
export declare interface ConfirmModalProps extends ModalProps {
|
248
231
|
title: string;
|
@@ -256,15 +239,15 @@ export declare interface ConfirmModalProps extends ModalProps {
|
|
256
239
|
|
257
240
|
export declare type ConfirmModalType = "success" | "error" | "warning" | "info";
|
258
241
|
|
259
|
-
export declare const Container:
|
242
|
+
export declare const Container: default_3.FC<ContainerProps>;
|
260
243
|
|
261
244
|
export declare interface ContainerProps {
|
262
|
-
children:
|
245
|
+
children: default_3.ReactNode;
|
263
246
|
size?: TailwindMaxWidth;
|
264
247
|
className?: string;
|
265
248
|
}
|
266
249
|
|
267
|
-
export declare const Divider: ({ children, ...rest }: DividerProps) =>
|
250
|
+
export declare const Divider: ({ children, ...rest }: DividerProps) => JSX_2.Element;
|
268
251
|
|
269
252
|
declare const Divider_2: FC<MenuDividerProps>;
|
270
253
|
|
@@ -272,14 +255,14 @@ export declare interface DividerProps extends DividerProps_2 {
|
|
272
255
|
children?: ReactNode | string;
|
273
256
|
}
|
274
257
|
|
275
|
-
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) =>
|
258
|
+
export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX_2.Element;
|
276
259
|
|
277
260
|
export declare interface DrawerProps extends DrawerProps_2 {
|
278
261
|
children?: ReactNode;
|
279
262
|
onSubmit?: (values: any) => void;
|
280
263
|
}
|
281
264
|
|
282
|
-
export declare const Dropdown: (props: DropdownPropsUnion) =>
|
265
|
+
export declare const Dropdown: (props: DropdownPropsUnion) => JSX_2.Element;
|
283
266
|
|
284
267
|
export declare type DropdownButtonProps = DropdownButtonProps_2;
|
285
268
|
|
@@ -300,7 +283,7 @@ declare class ErrorBoundaryClass extends Component<ErrorBoundaryProps, ErrorBoun
|
|
300
283
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
301
284
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
302
285
|
handleReload: () => void;
|
303
|
-
render():
|
286
|
+
render(): default_3.ReactNode;
|
304
287
|
}
|
305
288
|
|
306
289
|
export declare interface ErrorBoundaryProps {
|
@@ -313,7 +296,7 @@ export declare interface ErrorBoundaryState {
|
|
313
296
|
errorInfo: ErrorInfo | null;
|
314
297
|
}
|
315
298
|
|
316
|
-
export declare const ErrorMessage:
|
299
|
+
export declare const ErrorMessage: default_3.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX_2.Element | null>;
|
317
300
|
|
318
301
|
export declare interface ErrorMessageProps {
|
319
302
|
errorMessage?: string;
|
@@ -326,13 +309,13 @@ declare type ExtraProps = {
|
|
326
309
|
menuClassName?: string;
|
327
310
|
};
|
328
311
|
|
329
|
-
export declare const Flex: (props: FlexPropsUnion) =>
|
312
|
+
export declare const Flex: (props: FlexPropsUnion) => JSX_2.Element;
|
330
313
|
|
331
314
|
export declare type FlexProps = FlexProps_2;
|
332
315
|
|
333
316
|
export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
|
334
317
|
|
335
|
-
export declare const Heading: (props: HeadingProps) =>
|
318
|
+
export declare const Heading: (props: HeadingProps) => JSX_2.Element;
|
336
319
|
|
337
320
|
export declare interface HeadingProps {
|
338
321
|
rightContent?: ReactNode;
|
@@ -351,19 +334,19 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
|
|
351
334
|
|
352
335
|
export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
|
353
336
|
|
354
|
-
export declare const Label: ({ label, required }: LabelProps) =>
|
337
|
+
export declare const Label: ({ label, required }: LabelProps) => JSX_2.Element;
|
355
338
|
|
356
339
|
export declare interface LabelProps {
|
357
340
|
label: string;
|
358
341
|
required?: boolean;
|
359
342
|
}
|
360
343
|
|
361
|
-
export declare const Layout:
|
362
|
-
Header:
|
363
|
-
Footer:
|
364
|
-
Content:
|
365
|
-
Sider:
|
366
|
-
_InternalSiderContext:
|
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>;
|
367
350
|
};
|
368
351
|
|
369
352
|
export declare type LayoutProps = BaseProps_8 & BasicProps;
|
@@ -378,7 +361,7 @@ export declare type MenuItemProps = MenuItemProps_2;
|
|
378
361
|
|
379
362
|
export declare type MenuProps = MenuProps_2;
|
380
363
|
|
381
|
-
export declare const Modal: ({ children, onOk, onSubmit, ...rest }: ModalProps) =>
|
364
|
+
export declare const Modal: ({ children, onOk, onSubmit, ...rest }: ModalProps) => JSX_2.Element;
|
382
365
|
|
383
366
|
export declare interface ModalProps extends ModalProps_2 {
|
384
367
|
children?: ReactNode;
|
@@ -389,10 +372,6 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
|
|
389
372
|
multiple: true;
|
390
373
|
};
|
391
374
|
|
392
|
-
export declare const PAGE_INDEX = "PageIndex";
|
393
|
-
|
394
|
-
export declare const PAGE_SIZE = "PageSize";
|
395
|
-
|
396
375
|
export declare const Pagination: typeof Pagination_2;
|
397
376
|
|
398
377
|
export declare type PaginationConfig = Omit<PaginationProps, "rootClassName"> & {
|
@@ -415,13 +394,13 @@ export declare interface PnkxSpinProps extends SpinProps {
|
|
415
394
|
children?: ReactNode;
|
416
395
|
}
|
417
396
|
|
418
|
-
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) =>
|
397
|
+
export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX_2.Element;
|
419
398
|
|
420
399
|
export declare interface PopconfirmProps extends PopconfirmProps_2 {
|
421
400
|
children?: ReactNode;
|
422
401
|
}
|
423
402
|
|
424
|
-
export declare const Popover: (props: PopoverPropsUnion) =>
|
403
|
+
export declare const Popover: (props: PopoverPropsUnion) => JSX_2.Element;
|
425
404
|
|
426
405
|
export declare type PopoverProps = PopoverProps_2;
|
427
406
|
|
@@ -433,13 +412,13 @@ export declare type QRCodeProps = QRCodeProps_2;
|
|
433
412
|
|
434
413
|
export declare const Rate: React.FC<RateProps>;
|
435
414
|
|
436
|
-
export declare const Result: ({ children, ...rest }: ResultProps) =>
|
415
|
+
export declare const Result: ({ children, ...rest }: ResultProps) => JSX_2.Element;
|
437
416
|
|
438
417
|
export declare interface ResultProps extends ResultProps_2 {
|
439
418
|
children?: ReactNode | string;
|
440
419
|
}
|
441
420
|
|
442
|
-
export declare const Row: (props: RowPropsUnion) =>
|
421
|
+
export declare const Row: (props: RowPropsUnion) => JSX_2.Element;
|
443
422
|
|
444
423
|
declare interface RowCommon {
|
445
424
|
[x: string]: any;
|
@@ -447,7 +426,7 @@ declare interface RowCommon {
|
|
447
426
|
|
448
427
|
export declare type RowPropsUnion = BaseProps_4 & RowProps;
|
449
428
|
|
450
|
-
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) =>
|
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;
|
451
430
|
|
452
431
|
export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
453
432
|
renderFilterFields?: (options: {
|
@@ -455,7 +434,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
455
434
|
setValue?: UseFormSetValue<T>;
|
456
435
|
handleSubmit?: FormEventHandler<any>;
|
457
436
|
reset?: UseFormReset<T>;
|
458
|
-
}) =>
|
437
|
+
}) => default_3.ReactNode;
|
459
438
|
onReset?: () => void;
|
460
439
|
classNamesContainer?: string;
|
461
440
|
classNameWrapperForm?: string;
|
@@ -469,7 +448,7 @@ export declare const Segmented: React.FC<SegmentedProps>;
|
|
469
448
|
|
470
449
|
export declare type SegmentedProps = SegmentedProps_2;
|
471
450
|
|
472
|
-
export declare const Sidebar: ({ children, menu }: SidebarProps) =>
|
451
|
+
export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX_2.Element;
|
473
452
|
|
474
453
|
export declare interface SidebarProps {
|
475
454
|
children?: React.ReactNode;
|
@@ -490,31 +469,23 @@ declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
|
|
490
469
|
multiple?: false;
|
491
470
|
};
|
492
471
|
|
493
|
-
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) =>
|
472
|
+
export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX_2.Element;
|
494
473
|
|
495
474
|
export declare interface SkeletonProps extends SkeletonProps_2 {
|
496
475
|
type?: "table" | "form";
|
497
476
|
skeletonButtonCount?: number;
|
498
477
|
}
|
499
478
|
|
500
|
-
export declare const SORT_BY = "SortBy";
|
501
|
-
|
502
|
-
export declare const SORT_DESC = "SortDesc";
|
503
|
-
|
504
479
|
export declare const Space: typeof Space_2;
|
505
480
|
|
506
481
|
export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
|
507
482
|
|
508
|
-
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) =>
|
483
|
+
export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX_2.Element;
|
509
484
|
|
510
485
|
export declare const Splitter: typeof Splitter_2;
|
511
486
|
|
512
487
|
export declare type SplitterPropsUnion = BaseProps_10 & SplitterProps;
|
513
488
|
|
514
|
-
export declare const START_PAGE = 1;
|
515
|
-
|
516
|
-
export declare const START_PAGE_SIZE = 10;
|
517
|
-
|
518
489
|
export declare const Statistic: React.FC<StatisticProps>;
|
519
490
|
|
520
491
|
export declare type StatisticProps = StatisticProps_2;
|
@@ -535,12 +506,12 @@ export declare type SubMenuProps = SubMenuProps_2;
|
|
535
506
|
|
536
507
|
declare type TabItem = {
|
537
508
|
key: string;
|
538
|
-
label:
|
539
|
-
children:
|
509
|
+
label: default_3.ReactNode;
|
510
|
+
children: default_3.ReactNode;
|
540
511
|
disabled?: boolean;
|
541
512
|
};
|
542
513
|
|
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, ...rest }: TableCommonProps<T>) =>
|
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;
|
544
515
|
|
545
516
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
546
517
|
|
@@ -557,8 +528,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
557
528
|
onChangePage: (page: number) => void;
|
558
529
|
onChangePageSize: (size: number) => void;
|
559
530
|
onSort?: (sortField: string | number | symbol) => void;
|
560
|
-
rowsSelected?:
|
561
|
-
onSelect: (newSelectedRowKeys:
|
531
|
+
rowsSelected?: default_3.Key[];
|
532
|
+
onSelect: (newSelectedRowKeys: default_3.Key[]) => void;
|
562
533
|
onRowClick?: (record: T) => void;
|
563
534
|
rowKey?: string | ((record: T) => string);
|
564
535
|
className?: string;
|
@@ -569,7 +540,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
569
540
|
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
570
541
|
}
|
571
542
|
|
572
|
-
export declare const Tabs:
|
543
|
+
export declare const Tabs: default_3.FC<TabsProps>;
|
573
544
|
|
574
545
|
export declare type TabsProps = TabsProps_2 & {
|
575
546
|
items: TabItem[];
|
@@ -588,9 +559,7 @@ export declare const Timeline: React.FC<TimelineProps>;
|
|
588
559
|
|
589
560
|
export declare type TimelineProps = TimelineProps_2;
|
590
561
|
|
591
|
-
export declare const
|
592
|
-
|
593
|
-
export declare const Tooltip: default_2.FC<TooltipProps>;
|
562
|
+
export declare const Tooltip: default_3.FC<TooltipProps>;
|
594
563
|
|
595
564
|
export declare type TooltipProps = TooltipProps_2;
|
596
565
|
|
@@ -602,28 +571,14 @@ export declare const Tree: React.FC<TreeProps>;
|
|
602
571
|
|
603
572
|
export declare type TreeProps = TreeProps_2;
|
604
573
|
|
605
|
-
export declare enum TypeActionRowTable {
|
606
|
-
DELETE = "DELETE",
|
607
|
-
EDIT = "EDIT",
|
608
|
-
UNDO = "UNDO",
|
609
|
-
CANCELUNDO = "CANCELUNDO",
|
610
|
-
CHECKIN = "CHECKIN",
|
611
|
-
PRINT = "PRINT",
|
612
|
-
PAYMENT = "PAYMENT",
|
613
|
-
PLAY = "PLAY",
|
614
|
-
PAUSE = "PAUSE",
|
615
|
-
DOWNLOAD = "DOWNLOAD",
|
616
|
-
VIEW = "VIEW"
|
617
|
-
}
|
618
|
-
|
619
574
|
export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
|
620
575
|
|
621
576
|
export declare const Typography: {
|
622
|
-
Title: (props: TitleProps) =>
|
623
|
-
Paragraph: (props: ParagraphProps) =>
|
624
|
-
Text: (props: TextProps) =>
|
577
|
+
Title: (props: TitleProps) => JSX_2.Element;
|
578
|
+
Paragraph: (props: ParagraphProps) => JSX_2.Element;
|
579
|
+
Text: (props: TextProps) => JSX_2.Element;
|
625
580
|
};
|
626
581
|
|
627
|
-
export declare const Watermark: ({ ...rest }: WatermarkProps) =>
|
582
|
+
export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX_2.Element;
|
628
583
|
|
629
584
|
export { }
|
@@ -1,103 +0,0 @@
|
|
1
|
-
import { g as get, j as jsxRuntimeExports, L as Label, E as ErrorMessage, T as Typography } from './Switch-Ck9WdQgt.js';
|
2
|
-
import { Select as Select$1, Radio } from 'antd';
|
3
|
-
|
4
|
-
const Select = (props) => {
|
5
|
-
//! State
|
6
|
-
const {
|
7
|
-
field,
|
8
|
-
formState,
|
9
|
-
label,
|
10
|
-
required,
|
11
|
-
afterOnChange,
|
12
|
-
customStyleContainer,
|
13
|
-
...restProps
|
14
|
-
} = props;
|
15
|
-
const { name, value, onChange, onBlur } = field || {};
|
16
|
-
const { touchedFields, errors, isSubmitted } = formState || {};
|
17
|
-
const isTouched = get(touchedFields, name);
|
18
|
-
const errorMessage = get(errors, name)?.message;
|
19
|
-
//! Function
|
20
|
-
const handleChange = (val) => {
|
21
|
-
onChange?.(val);
|
22
|
-
afterOnChange?.(val);
|
23
|
-
};
|
24
|
-
const renderErrorMessage = () => {
|
25
|
-
if (!errorMessage) return null;
|
26
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
27
|
-
ErrorMessage,
|
28
|
-
{
|
29
|
-
errorMessage,
|
30
|
-
isTouched,
|
31
|
-
isSubmitted
|
32
|
-
}
|
33
|
-
);
|
34
|
-
};
|
35
|
-
//! Render
|
36
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
|
37
|
-
label && /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { label, required }),
|
38
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
39
|
-
Select$1,
|
40
|
-
{
|
41
|
-
onChange: handleChange,
|
42
|
-
onBlur,
|
43
|
-
value,
|
44
|
-
style: { width: "100%" },
|
45
|
-
optionLabelProp: "label",
|
46
|
-
status: (isTouched || isSubmitted) && Boolean(errorMessage) ? "error" : void 0,
|
47
|
-
...restProps
|
48
|
-
}
|
49
|
-
),
|
50
|
-
renderErrorMessage()
|
51
|
-
] });
|
52
|
-
};
|
53
|
-
|
54
|
-
const RadioGroup = (props) => {
|
55
|
-
//! State
|
56
|
-
const {
|
57
|
-
field,
|
58
|
-
formState,
|
59
|
-
customStyleRadio,
|
60
|
-
customStyleWrap = "",
|
61
|
-
afterOnChange,
|
62
|
-
options,
|
63
|
-
...restProps
|
64
|
-
} = props;
|
65
|
-
const { name, value, onChange } = field || {};
|
66
|
-
const { touchedFields, errors, isSubmitted } = formState || {};
|
67
|
-
const isTouched = get(touchedFields, name);
|
68
|
-
const errorMessage = get(errors, name)?.message;
|
69
|
-
//! Function
|
70
|
-
const handleChange = (e) => {
|
71
|
-
onChange?.(e);
|
72
|
-
afterOnChange?.(e?.target?.value);
|
73
|
-
};
|
74
|
-
const renderErrorMessage = () => {
|
75
|
-
if (!errorMessage) return null;
|
76
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
77
|
-
ErrorMessage,
|
78
|
-
{
|
79
|
-
errorMessage,
|
80
|
-
isTouched,
|
81
|
-
isSubmitted
|
82
|
-
}
|
83
|
-
);
|
84
|
-
};
|
85
|
-
//! Render
|
86
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleWrap, children: [
|
87
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio.Group, { onChange: handleChange, value, ...restProps, children: options.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
88
|
-
Radio,
|
89
|
-
{
|
90
|
-
value: item.value,
|
91
|
-
className: customStyleRadio,
|
92
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Text, { children: [
|
93
|
-
" ",
|
94
|
-
item.label
|
95
|
-
] })
|
96
|
-
},
|
97
|
-
`${name}-${item.value}`
|
98
|
-
)) }),
|
99
|
-
renderErrorMessage()
|
100
|
-
] });
|
101
|
-
};
|
102
|
-
|
103
|
-
export { RadioGroup as R, Select as S };
|