@pointcloud/pcloud-components 0.1.32 → 0.1.34
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/README.md +39 -31
- package/dist/esm/AdvancedFilter/FormFilter.d.ts +4 -4
- package/dist/esm/AdvancedFilter/index.d.ts +5 -5
- package/dist/esm/AdvancedFilter/interface.d.ts +101 -101
- package/dist/esm/AnimatedScrollList/index.d.ts +7 -7
- package/dist/esm/AnimatedScrollList/interface.d.ts +71 -71
- package/dist/esm/AspectRatio/index.d.ts +9 -9
- package/dist/esm/AuthComponent/index.d.ts +3 -3
- package/dist/esm/AuthComponent/interface.d.ts +24 -24
- package/dist/esm/CRUD/config.d.ts +2 -0
- package/dist/esm/CRUD/config.js +21 -0
- package/dist/esm/CRUD/index.d.ts +98 -0
- package/dist/esm/CRUD/index.js +669 -0
- package/dist/esm/CRUD/index.less +140 -0
- package/dist/esm/CRUD/toolbar.d.ts +16 -0
- package/dist/esm/CRUD/toolbar.js +249 -0
- package/dist/esm/ColorPicker/index.d.ts +17 -18
- package/dist/esm/ColorPicker/interface.d.ts +164 -164
- package/dist/esm/ConfigProvider/index.d.ts +6 -6
- package/dist/esm/ConfigProvider/index.js +7 -13
- package/dist/esm/ConfigProvider/interface.d.ts +9 -9
- package/dist/esm/ContextMenu/index.d.ts +28 -28
- package/dist/esm/DCascader/index.d.ts +24 -24
- package/dist/esm/DForm/DItem/index.d.ts +5 -5
- package/dist/esm/DForm/DItem/itemType.d.ts +123 -119
- package/dist/esm/DForm/DItem/itemsRender.d.ts +47 -45
- package/dist/esm/DForm/DItem/itemsRender.js +6 -0
- package/dist/esm/DForm/helper.d.ts +8 -8
- package/dist/esm/DForm/index.d.ts +29 -29
- package/dist/esm/DInput/index.d.ts +19 -19
- package/dist/esm/DModal/index.d.ts +19 -18
- package/dist/esm/DModal/index.js +11 -9
- package/dist/esm/DModal/interface.d.ts +8 -14
- package/dist/esm/DRangePicker/index.d.ts +7 -0
- package/dist/esm/DRangePicker/index.js +24 -0
- package/dist/esm/DRangePicker/index.less +30 -0
- package/dist/esm/DRangePicker/interface.d.ts +5 -0
- package/dist/esm/DRangePicker/interface.js +1 -0
- package/dist/esm/DSelect/index.d.ts +24 -24
- package/dist/esm/DTable/index.d.ts +62 -46
- package/dist/esm/DTable/index.js +43 -13
- package/dist/esm/DTreeSelect/index.d.ts +16 -16
- package/dist/esm/DUpload/helper.d.ts +107 -107
- package/dist/esm/DUpload/index.d.ts +55 -55
- package/dist/esm/ErrorBoundary/index.d.ts +5 -6
- package/dist/esm/IPAddress/index.d.ts +20 -20
- package/dist/esm/IconFont/index.d.ts +17 -17
- package/dist/esm/InfiniteScrollList/index.d.ts +63 -63
- package/dist/esm/LabelValue/index.d.ts +16 -16
- package/dist/esm/LabelValue/interface.d.ts +39 -39
- package/dist/esm/Loading/hooks/useLoading.d.ts +6 -6
- package/dist/esm/Loading/index.d.ts +10 -10
- package/dist/esm/Loading/interface.d.ts +23 -23
- package/dist/esm/Loading/loading.d.ts +9 -8
- package/dist/esm/Loading/loading.js +48 -23
- package/dist/esm/Loading/styles/index.less +37 -25
- package/dist/esm/LoginForm/defaultConfig.d.ts +4 -4
- package/dist/esm/LoginForm/index.d.ts +21 -21
- package/dist/esm/ModalForm/index.d.ts +13 -11
- package/dist/esm/ModalForm/index.js +76 -7
- package/dist/esm/NoData/index.d.ts +4 -5
- package/dist/esm/NoData/interface.d.ts +13 -13
- package/dist/esm/OrgTree/index.d.ts +5 -5
- package/dist/esm/OrgTree/interface.d.ts +41 -41
- package/dist/esm/PictureCard/index.d.ts +16 -16
- package/dist/esm/RCropper/handler.d.ts +16 -16
- package/dist/esm/RCropper/index.d.ts +4 -4
- package/dist/esm/RCropper/interface.d.ts +70 -70
- package/dist/esm/RCropper/svgIcons.d.ts +28 -28
- package/dist/esm/RCropper/toolbar.d.ts +5 -5
- package/dist/esm/RndDrag/index.d.ts +5 -6
- package/dist/esm/ScrollNumber/index.d.ts +7 -8
- package/dist/esm/SignaturePad/index.d.ts +32 -32
- package/dist/esm/TypewriterText/index.d.ts +5 -5
- package/dist/esm/TypewriterText/interface.d.ts +42 -42
- package/dist/esm/WordCloud/index.d.ts +10 -11
- package/dist/esm/index.d.ts +66 -62
- package/dist/esm/index.js +3 -1
- package/dist/umd/pcloud-components.min.css +1 -1
- package/dist/umd/pcloud-components.min.js +1 -1
- package/package.json +15 -5
|
@@ -1,119 +1,123 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { InputProps, InputNumberProps, AutoCompleteProps, CascaderProps, SelectProps, TreeSelectProps, DatePickerProps, TimePickerProps, MentionProps, CheckboxProps, RadioProps, RateProps, SliderSingleProps, SwitchProps, TransferProps, UploadProps, ButtonProps, DividerProps, FormItemProps, RadioGroupProps, ColProps } from 'antd';
|
|
3
|
-
import { PasswordProps, TextAreaProps } from 'antd/lib/input';
|
|
4
|
-
import { RangePickerProps } from 'antd/lib/date-picker';
|
|
5
|
-
import { CheckboxGroupProps } from 'antd/lib/checkbox';
|
|
6
|
-
import { DInputProps } from '../../DInput';
|
|
7
|
-
import { DSelectProps } from '../../DSelect';
|
|
8
|
-
import { DCascaderProps } from '../../DCascader';
|
|
9
|
-
import { DTreeSelectProps } from '../../DTreeSelect';
|
|
10
|
-
import { DUploadProps } from '../../DUpload';
|
|
11
|
-
import { IPAddressProps } from '../../IPAddress';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
label
|
|
15
|
-
|
|
16
|
-
name
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
export {
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { InputProps, InputNumberProps, AutoCompleteProps, CascaderProps, SelectProps, TreeSelectProps, DatePickerProps, TimePickerProps, MentionProps, CheckboxProps, RadioProps, RateProps, SliderSingleProps, SwitchProps, TransferProps, UploadProps, ButtonProps, DividerProps, FormItemProps, RadioGroupProps, ColProps } from 'antd';
|
|
3
|
+
import { PasswordProps, TextAreaProps } from 'antd/lib/input';
|
|
4
|
+
import { RangePickerProps } from 'antd/lib/date-picker';
|
|
5
|
+
import { CheckboxGroupProps } from 'antd/lib/checkbox';
|
|
6
|
+
import { DInputProps } from '../../DInput';
|
|
7
|
+
import { DSelectProps } from '../../DSelect';
|
|
8
|
+
import { DCascaderProps } from '../../DCascader';
|
|
9
|
+
import { DTreeSelectProps } from '../../DTreeSelect';
|
|
10
|
+
import { DUploadProps } from '../../DUpload';
|
|
11
|
+
import { IPAddressProps } from '../../IPAddress';
|
|
12
|
+
import { DRangePickerProps } from '../../DRangePicker/interface';
|
|
13
|
+
export type DItemBaseProps = {
|
|
14
|
+
/** label标签文本,同antd Form.Item的label,只能是string */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** name标签文本,同antd Form.Item的name */
|
|
17
|
+
name?: string | number | (string | number)[];
|
|
18
|
+
/** Form.Item 的其他属性 */
|
|
19
|
+
formItemProps?: FormItemProps & {
|
|
20
|
+
grid?: Omit<ColProps, 'prefixCls'>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
/** 自定义渲染的DItem */
|
|
24
|
+
type CustomItemProps = DItemBaseProps & HTMLAttributes<HTMLElement> & {
|
|
25
|
+
/** 渲染类型 */
|
|
26
|
+
renderType?: 'custom' | 'other';
|
|
27
|
+
/** 自定义渲染函数 */
|
|
28
|
+
render?: (props: any, formItemProps: FormItemProps, allProps?: DItemProps) => ReactNode;
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
};
|
|
32
|
+
export type DInputItemProps = {
|
|
33
|
+
renderType?: 'dInput';
|
|
34
|
+
} & DItemBaseProps & DInputProps;
|
|
35
|
+
export type DIpAddressProps = {
|
|
36
|
+
renderType?: 'ipAddress';
|
|
37
|
+
} & DItemBaseProps & IPAddressProps;
|
|
38
|
+
export type InputItemProps = {
|
|
39
|
+
renderType?: 'input';
|
|
40
|
+
} & DItemBaseProps & InputProps;
|
|
41
|
+
export type TextAreaItemProps = {
|
|
42
|
+
renderType?: 'textArea';
|
|
43
|
+
} & DItemBaseProps & TextAreaProps;
|
|
44
|
+
export type PasswordItemProps = {
|
|
45
|
+
renderType?: 'password';
|
|
46
|
+
} & DItemBaseProps & PasswordProps;
|
|
47
|
+
export type InputNumberItemProps = {
|
|
48
|
+
renderType?: 'inputNumber';
|
|
49
|
+
} & DItemBaseProps & InputNumberProps;
|
|
50
|
+
export type AutoCompleteItemProps = {
|
|
51
|
+
renderType?: 'autoComplete';
|
|
52
|
+
} & DItemBaseProps & AutoCompleteProps;
|
|
53
|
+
export type DSelectItemProps = {
|
|
54
|
+
renderType?: 'dSelect';
|
|
55
|
+
} & DItemBaseProps & DSelectProps;
|
|
56
|
+
export type SelectItemProps = {
|
|
57
|
+
renderType?: 'select';
|
|
58
|
+
} & DItemBaseProps & SelectProps;
|
|
59
|
+
export type DCascaderItemProps = {
|
|
60
|
+
renderType?: 'dCascader';
|
|
61
|
+
} & DItemBaseProps & DCascaderProps;
|
|
62
|
+
export type CascaderItemProps = {
|
|
63
|
+
renderType?: 'cascader';
|
|
64
|
+
} & DItemBaseProps & CascaderProps;
|
|
65
|
+
export type DTreeSelectItemProps = {
|
|
66
|
+
renderType?: 'dTreeSelect';
|
|
67
|
+
} & DItemBaseProps & DTreeSelectProps;
|
|
68
|
+
export type TreeSelectItemProps = {
|
|
69
|
+
renderType?: 'treeSelect';
|
|
70
|
+
} & DItemBaseProps & TreeSelectProps;
|
|
71
|
+
export type DatePickerItemProps = {
|
|
72
|
+
renderType?: 'datePicker';
|
|
73
|
+
} & DItemBaseProps & DatePickerProps;
|
|
74
|
+
export type DRangePickerItemProps = {
|
|
75
|
+
renderType?: 'dRangePicker';
|
|
76
|
+
} & DItemBaseProps & DRangePickerProps;
|
|
77
|
+
export type TimePickerItemProps = {
|
|
78
|
+
renderType?: 'timePicker';
|
|
79
|
+
} & DItemBaseProps & TimePickerProps;
|
|
80
|
+
export type RangePickerItemProps = {
|
|
81
|
+
renderType?: 'rangePicker';
|
|
82
|
+
} & DItemBaseProps & RangePickerProps;
|
|
83
|
+
export type MentionItemProps = {
|
|
84
|
+
renderType?: 'mentions';
|
|
85
|
+
} & DItemBaseProps & MentionProps;
|
|
86
|
+
export type CheckboxItemProps = {
|
|
87
|
+
renderType?: 'checkbox';
|
|
88
|
+
} & DItemBaseProps & CheckboxProps;
|
|
89
|
+
export type DCheckboxGroupProps = {
|
|
90
|
+
renderType?: 'checkboxGroup';
|
|
91
|
+
} & DItemBaseProps & CheckboxGroupProps;
|
|
92
|
+
export type RadioItemProps = {
|
|
93
|
+
renderType?: 'radio';
|
|
94
|
+
} & DItemBaseProps & RadioProps;
|
|
95
|
+
export type DRadioGorupProps = {
|
|
96
|
+
renderType?: 'radioGroup';
|
|
97
|
+
} & DItemBaseProps & RadioGroupProps;
|
|
98
|
+
export type RateItemProps = {
|
|
99
|
+
renderType?: 'rate';
|
|
100
|
+
} & DItemBaseProps & RateProps;
|
|
101
|
+
export type SliderItemProps = {
|
|
102
|
+
renderType?: 'slider';
|
|
103
|
+
} & DItemBaseProps & SliderSingleProps;
|
|
104
|
+
export type SwitchItemProps = {
|
|
105
|
+
renderType?: 'switch';
|
|
106
|
+
} & DItemBaseProps & SwitchProps;
|
|
107
|
+
export type TransferItemProps = {
|
|
108
|
+
renderType?: 'transfer';
|
|
109
|
+
} & DItemBaseProps & TransferProps<any>;
|
|
110
|
+
export type UploadItemProps = {
|
|
111
|
+
renderType?: 'upload';
|
|
112
|
+
} & DItemBaseProps & UploadProps;
|
|
113
|
+
export type DUploadItemProps = {
|
|
114
|
+
renderType?: 'dUpload';
|
|
115
|
+
} & DItemBaseProps & DUploadProps;
|
|
116
|
+
export type ButtonItemProps = {
|
|
117
|
+
renderType?: 'button';
|
|
118
|
+
} & DItemBaseProps & ButtonProps;
|
|
119
|
+
export type DividerItemProps = {
|
|
120
|
+
renderType?: 'divider';
|
|
121
|
+
} & DItemBaseProps & DividerProps;
|
|
122
|
+
export type DItemProps = CustomItemProps | DInputItemProps | DIpAddressProps | InputItemProps | TextAreaItemProps | PasswordItemProps | InputNumberItemProps | AutoCompleteItemProps | DSelectItemProps | SelectItemProps | DCascaderItemProps | CascaderItemProps | DTreeSelectItemProps | TreeSelectItemProps | DatePickerItemProps | TimePickerItemProps | RangePickerItemProps | DRangePickerItemProps | MentionItemProps | CheckboxItemProps | CheckboxGroupProps | DCheckboxGroupProps | RadioItemProps | RadioGroupProps | DRadioGorupProps | RateItemProps | SliderItemProps | SwitchItemProps | TransferItemProps | UploadItemProps | DUploadItemProps | ButtonItemProps | DividerItemProps;
|
|
123
|
+
export {};
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { AutoCompleteProps, ButtonProps, CascaderProps, CheckboxProps, DatePickerProps, DividerProps, FormItemProps, InputNumberProps, InputProps, MentionProps, RadioProps, RadioGroupProps, RateProps, SelectProps, SliderSingleProps, SwitchProps, TimePickerProps, TransferProps, TreeSelectProps, UploadProps } from 'antd';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { RangePickerProps } from 'antd/lib/date-picker';
|
|
4
|
-
import { PasswordProps, TextAreaProps } from 'antd/lib/input';
|
|
5
|
-
import { CheckboxGroupProps } from 'antd/lib/checkbox/Group';
|
|
6
|
-
import { DCascaderProps } from '../../DCascader';
|
|
7
|
-
import { DInputProps } from '../../DInput';
|
|
8
|
-
import { DSelectProps } from '../../DSelect';
|
|
9
|
-
import { DTreeSelectProps } from '../../DTreeSelect';
|
|
10
|
-
import { DUploadProps } from '../../DUpload';
|
|
11
|
-
import { IPAddressProps } from '../../IPAddress';
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
import { AutoCompleteProps, ButtonProps, CascaderProps, CheckboxProps, DatePickerProps, DividerProps, FormItemProps, InputNumberProps, InputProps, MentionProps, RadioProps, RadioGroupProps, RateProps, SelectProps, SliderSingleProps, SwitchProps, TimePickerProps, TransferProps, TreeSelectProps, UploadProps } from 'antd';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { RangePickerProps } from 'antd/lib/date-picker';
|
|
4
|
+
import { PasswordProps, TextAreaProps } from 'antd/lib/input';
|
|
5
|
+
import { CheckboxGroupProps } from 'antd/lib/checkbox/Group';
|
|
6
|
+
import { DCascaderProps } from '../../DCascader';
|
|
7
|
+
import { DInputProps } from '../../DInput';
|
|
8
|
+
import { DSelectProps } from '../../DSelect';
|
|
9
|
+
import { DTreeSelectProps } from '../../DTreeSelect';
|
|
10
|
+
import { DUploadProps } from '../../DUpload';
|
|
11
|
+
import { IPAddressProps } from '../../IPAddress';
|
|
12
|
+
import { type DRangePickerProps } from '../../DRangePicker';
|
|
13
|
+
import { DItemBaseProps } from './itemType';
|
|
14
|
+
declare const renderMap: {
|
|
15
|
+
dInput: (props: DInputProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
input: (props: InputProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
textArea: (props: TextAreaProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
password: (props: PasswordProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
inputNumber: (props: InputNumberProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
ipAddress: (props: IPAddressProps, formItemProps: FormItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
autoComplete: (props: AutoCompleteProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
dSelect: (props: DSelectProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
select: (props: SelectProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
dCascader: (props: DCascaderProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
cascader: (props: CascaderProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
dTreeSelect: (props: DTreeSelectProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
treeSelect: (props: TreeSelectProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
datePicker: (props: DatePickerProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
timePicker: (props: TimePickerProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
rangePicker: (props: RangePickerProps, formItemProps: FormItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
dRangePicker: (props: DRangePickerProps, formItemProps: FormItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
mentions: (props: MentionProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
checkbox: (props: CheckboxProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
checkboxGroup: (props: CheckboxGroupProps, formItemProps: FormItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
radio: (props: RadioProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
radioGroup: (props: RadioGroupProps, formItemProps: FormItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
rate: (props: RateProps, formItemProps: FormItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
slider: (props: SliderSingleProps, formItemProps: FormItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
switch: (props: SwitchProps, formItemProps: FormItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
transfer: (props: TransferProps<any>, formItemProps: FormItemProps, label: DItemBaseProps['label'], render: TransferProps<any>['render']) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
upload: (props: UploadProps, formItemProps: FormItemProps, label: DItemBaseProps['label'], render: () => void, children: UploadProps['children']) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
dUpload: (props: DUploadProps, formItemProps: FormItemProps, render: (props: any) => ReactNode, children: DUploadProps['children']) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
button: (props: ButtonProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
divider: (props: DividerProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
other: (formItemProps: FormItemProps, children: ReactNode) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
};
|
|
47
|
+
export default renderMap;
|
|
@@ -14,6 +14,7 @@ import DSelect from "../../DSelect";
|
|
|
14
14
|
import DTreeSelect from "../../DTreeSelect";
|
|
15
15
|
import DUpload from "../../DUpload";
|
|
16
16
|
import IPAddress from "../../IPAddress";
|
|
17
|
+
import DRangePicker from "../../DRangePicker";
|
|
17
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
19
|
var renderMap = {
|
|
19
20
|
dInput: function dInput(props, formItemProps, label) {
|
|
@@ -125,6 +126,11 @@ var renderMap = {
|
|
|
125
126
|
children: /*#__PURE__*/_jsx(DatePicker.RangePicker, _objectSpread({}, props))
|
|
126
127
|
}));
|
|
127
128
|
},
|
|
129
|
+
dRangePicker: function dRangePicker(props, formItemProps) {
|
|
130
|
+
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemProps), {}, {
|
|
131
|
+
children: /*#__PURE__*/_jsx(DRangePicker, _objectSpread({}, props))
|
|
132
|
+
}));
|
|
133
|
+
},
|
|
128
134
|
mentions: function mentions(props, formItemProps, label) {
|
|
129
135
|
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemProps), {}, {
|
|
130
136
|
children: /*#__PURE__*/_jsx(Mentions, _objectSpread({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare function cloneDeep<T>(value: T): T;
|
|
2
|
-
export declare function mergeWith<T, S>(object: T, source: S, customizer?: (_objValue: any, _srcValue: any, _key: string | number) => any): T & S;
|
|
3
|
-
/** 合并对象 */
|
|
4
|
-
declare function merge(object: any, sources: any, customizer?: (objValue: any, srcValue: any) => any): any;
|
|
5
|
-
declare const _default: {
|
|
6
|
-
merge: typeof merge;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
1
|
+
export declare function cloneDeep<T>(value: T): T;
|
|
2
|
+
export declare function mergeWith<T, S>(object: T, source: S, customizer?: (_objValue: any, _srcValue: any, _key: string | number) => any): T & S;
|
|
3
|
+
/** 合并对象 */
|
|
4
|
+
declare function merge(object: any, sources: any, customizer?: (objValue: any, srcValue: any) => any): any;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
merge: typeof merge;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { Form, FormProps } from 'antd';
|
|
3
|
-
import DItem from './DItem';
|
|
4
|
-
import type { DItemProps } from './DItem';
|
|
5
|
-
import './index.less';
|
|
6
|
-
|
|
7
|
-
/** 表单项数组,可以通过数组的形式添加表单项 */
|
|
8
|
-
items?: DItemProps[];
|
|
9
|
-
/** 统一设置items的默认属性 */
|
|
10
|
-
defaultItemProps?: DItemProps;
|
|
11
|
-
/** children 方式添加表单项,如果同时设置了 items,则 children 在 items 下面 */
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
/** 布局方式 新增了行内垂直布局方式inlineVertical 和 grid栅格布局 */
|
|
14
|
-
layout?: 'inline' | 'horizontal' | 'vertical' | 'inlineVertical' | 'grid';
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
setItems: (items: DItemProps[] | ((values: DItemProps[]) => DItemProps[] | Promise<DItemProps[]>)) => void;
|
|
19
|
-
} | undefined;
|
|
20
|
-
declare const DForm: React.ForwardRefExoticComponent<Omit<FormProps<any>, "children" | "layout"> & InternalFormProps & React.RefAttributes<DFormRefProps>> & {
|
|
21
|
-
Item: typeof DItem;
|
|
22
|
-
useForm: typeof Form.useForm;
|
|
23
|
-
useFormInstance: typeof Form.useFormInstance;
|
|
24
|
-
useWatch: typeof Form.useWatch;
|
|
25
|
-
List: typeof Form.List;
|
|
26
|
-
ErrorList: typeof Form.ErrorList;
|
|
27
|
-
};
|
|
28
|
-
export { type DFormProps, type DFormRefProps, type DItemProps };
|
|
29
|
-
export default DForm;
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Form, FormProps } from 'antd';
|
|
3
|
+
import DItem from './DItem';
|
|
4
|
+
import type { DItemProps } from './DItem';
|
|
5
|
+
import './index.less';
|
|
6
|
+
type InternalFormProps = {
|
|
7
|
+
/** 表单项数组,可以通过数组的形式添加表单项 */
|
|
8
|
+
items?: DItemProps[];
|
|
9
|
+
/** 统一设置items的默认属性 */
|
|
10
|
+
defaultItemProps?: DItemProps;
|
|
11
|
+
/** children 方式添加表单项,如果同时设置了 items,则 children 在 items 下面 */
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/** 布局方式 新增了行内垂直布局方式inlineVertical 和 grid栅格布局 */
|
|
14
|
+
layout?: 'inline' | 'horizontal' | 'vertical' | 'inlineVertical' | 'grid';
|
|
15
|
+
};
|
|
16
|
+
type DFormProps = Omit<FormProps, 'children' | 'layout'> & InternalFormProps;
|
|
17
|
+
type DFormRefProps = {
|
|
18
|
+
setItems: (items: DItemProps[] | ((values: DItemProps[]) => DItemProps[] | Promise<DItemProps[]>)) => void;
|
|
19
|
+
} | undefined;
|
|
20
|
+
declare const DForm: React.ForwardRefExoticComponent<Omit<FormProps<any>, "children" | "layout"> & InternalFormProps & React.RefAttributes<DFormRefProps>> & {
|
|
21
|
+
Item: typeof DItem;
|
|
22
|
+
useForm: typeof Form.useForm;
|
|
23
|
+
useFormInstance: typeof Form.useFormInstance;
|
|
24
|
+
useWatch: typeof Form.useWatch;
|
|
25
|
+
List: typeof Form.List;
|
|
26
|
+
ErrorList: typeof Form.ErrorList;
|
|
27
|
+
};
|
|
28
|
+
export { type DFormProps, type DFormRefProps, type DItemProps };
|
|
29
|
+
export default DForm;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React, { ChangeEvent } from 'react';
|
|
2
|
-
import { InputProps, InputRef } from 'antd';
|
|
3
|
-
export
|
|
4
|
-
/** 输入框内容变化时的回调 */
|
|
5
|
-
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
-
/** 是否启用合成输入 */
|
|
7
|
-
enableCompose?: boolean;
|
|
8
|
-
/** 是否开启防抖: true表示800毫秒,false或0表示不开启 */
|
|
9
|
-
debounce?: boolean | number;
|
|
10
|
-
};
|
|
11
|
-
declare const DInput: React.ForwardRefExoticComponent<Omit<InputProps, "onChange"> & {
|
|
12
|
-
/** 输入框内容变化时的回调 */
|
|
13
|
-
onChange?: ((value: string, event: ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
14
|
-
/** 是否启用合成输入 */
|
|
15
|
-
enableCompose?: boolean | undefined;
|
|
16
|
-
/** 是否开启防抖: true表示800毫秒,false或0表示不开启 */
|
|
17
|
-
debounce?: number | boolean | undefined;
|
|
18
|
-
} & React.RefAttributes<InputRef>>;
|
|
19
|
-
export default DInput;
|
|
1
|
+
import React, { ChangeEvent } from 'react';
|
|
2
|
+
import { InputProps, InputRef } from 'antd';
|
|
3
|
+
export type DInputProps = Omit<InputProps, 'onChange'> & {
|
|
4
|
+
/** 输入框内容变化时的回调 */
|
|
5
|
+
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
/** 是否启用合成输入 */
|
|
7
|
+
enableCompose?: boolean;
|
|
8
|
+
/** 是否开启防抖: true表示800毫秒,false或0表示不开启 */
|
|
9
|
+
debounce?: boolean | number;
|
|
10
|
+
};
|
|
11
|
+
declare const DInput: React.ForwardRefExoticComponent<Omit<InputProps, "onChange"> & {
|
|
12
|
+
/** 输入框内容变化时的回调 */
|
|
13
|
+
onChange?: ((value: string, event: ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
14
|
+
/** 是否启用合成输入 */
|
|
15
|
+
enableCompose?: boolean | undefined;
|
|
16
|
+
/** 是否开启防抖: true表示800毫秒,false或0表示不开启 */
|
|
17
|
+
debounce?: number | boolean | undefined;
|
|
18
|
+
} & React.RefAttributes<InputRef>>;
|
|
19
|
+
export default DInput;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
3
|
-
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
export var
|
|
7
|
-
export var
|
|
8
|
-
export var
|
|
9
|
-
export var
|
|
10
|
-
export var
|
|
11
|
-
export var
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
import { ModalFuncProps } from 'antd';
|
|
2
|
+
import { DModalProps } from './interface';
|
|
3
|
+
import './styles/index.less';
|
|
4
|
+
declare function DModal(props: DModalProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare namespace DModal {
|
|
6
|
+
export var useModal: typeof import("antd/lib/modal/useModal").default;
|
|
7
|
+
export var info: import("antd/lib/modal/confirm").ModalFunc;
|
|
8
|
+
export var success: import("antd/lib/modal/confirm").ModalFunc;
|
|
9
|
+
export var error: import("antd/lib/modal/confirm").ModalFunc;
|
|
10
|
+
export var warning: import("antd/lib/modal/confirm").ModalFunc;
|
|
11
|
+
export var confirm: import("antd/lib/modal/confirm").ModalFunc;
|
|
12
|
+
export var destroyAll: () => void;
|
|
13
|
+
var _a: (props: ModalFuncProps) => {
|
|
14
|
+
destroy: () => void;
|
|
15
|
+
update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
|
|
16
|
+
};
|
|
17
|
+
export { _a as delete };
|
|
18
|
+
}
|
|
19
|
+
export default DModal;
|
package/dist/esm/DModal/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "mode"]
|
|
3
|
+
var _excluded = ["children", "mode"],
|
|
4
|
+
_excluded2 = ["content", "onOk", "onCancel", "zIndex"];
|
|
4
5
|
import { ConfigContext } from "../ConfigProvider";
|
|
5
6
|
import { Modal } from 'antd';
|
|
6
7
|
import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
@@ -57,22 +58,23 @@ DModal.error = Modal.error;
|
|
|
57
58
|
DModal.warning = Modal.warning;
|
|
58
59
|
DModal.confirm = Modal.confirm;
|
|
59
60
|
DModal.destroyAll = Modal.destroyAll;
|
|
60
|
-
DModal.delete = function (
|
|
61
|
-
var content =
|
|
62
|
-
onOk =
|
|
63
|
-
onCancel =
|
|
64
|
-
zIndex =
|
|
65
|
-
|
|
61
|
+
DModal.delete = function (props) {
|
|
62
|
+
var content = props.content,
|
|
63
|
+
onOk = props.onOk,
|
|
64
|
+
onCancel = props.onCancel,
|
|
65
|
+
zIndex = props.zIndex,
|
|
66
|
+
otherProps = _objectWithoutProperties(props, _excluded2);
|
|
67
|
+
return DModal.confirm(_objectSpread({
|
|
66
68
|
title: '删除提示',
|
|
67
69
|
content: content,
|
|
68
70
|
centered: true,
|
|
69
71
|
closable: true,
|
|
70
72
|
okText: '确定',
|
|
71
73
|
cancelText: '取消',
|
|
72
|
-
className: 'pui-modal-container',
|
|
74
|
+
className: 'pui-modal-container pui-delete-modal',
|
|
73
75
|
onOk: onOk,
|
|
74
76
|
onCancel: onCancel,
|
|
75
77
|
zIndex: zIndex
|
|
76
|
-
});
|
|
78
|
+
}, otherProps));
|
|
77
79
|
};
|
|
78
80
|
export default DModal;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ModalProps } from 'antd';
|
|
3
|
-
|
|
4
|
-
export interface DModalProps extends IModalProps {
|
|
5
|
-
children?: ReactNode | undefined;
|
|
6
|
-
mode?: 'absolute' | 'relative' | 'panel';
|
|
7
|
-
}
|
|
8
|
-
export
|
|
9
|
-
content?: React.ReactNode;
|
|
10
|
-
onOk?: <T>(..._args: T[]) => T;
|
|
11
|
-
onCancel?: <T>(..._args: T[]) => T;
|
|
12
|
-
zIndex?: number;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { ModalProps } from 'antd';
|
|
3
|
+
type IModalProps = Omit<ModalProps, 'className'>;
|
|
4
|
+
export interface DModalProps extends IModalProps {
|
|
5
|
+
children?: ReactNode | undefined;
|
|
6
|
+
mode?: 'absolute' | 'relative' | 'panel';
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RangePickerProps } from 'antd/es/date-picker';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export type DRangePickerProps = {
|
|
4
|
+
rangesPosition?: 'left' | 'bottom' | 'right';
|
|
5
|
+
popupClassName?: string;
|
|
6
|
+
} & Omit<RangePickerProps, 'popupClassName'>;
|
|
7
|
+
export default function DRangePicker(props: DRangePickerProps): import("react/jsx-runtime").JSX.Element;
|