@para-ui/core 2.2.1-beta → 2.2.2
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/AutoBox/index.d.ts +34 -0
- package/AutoBox/index.js +15 -0
- package/AutoTips/index.d.ts +27 -0
- package/AutoTips/index.js +15 -0
- package/Breadcrumbs/index.d.ts +39 -0
- package/Breadcrumbs/index.js +15 -0
- package/Button/SplitButton.d.ts +61 -0
- package/Button/index.d.ts +56 -0
- package/Button/index.js +14 -0
- package/Button/lang/en_US.d.ts +4 -0
- package/Button/lang/index.d.ts +9 -0
- package/Button/lang/zh_CN.d.ts +4 -0
- package/ButtonGroup/index.d.ts +33 -0
- package/ButtonGroup/index.js +14 -0
- package/Carousel/index.d.ts +30 -0
- package/Carousel/index.js +15 -0
- package/Cascader/index.d.ts +52 -0
- package/Cascader/index.js +15 -0
- package/Cascader/lang/en_US.d.ts +4 -0
- package/Cascader/lang/index.d.ts +9 -0
- package/Cascader/lang/zh_CN.d.ts +4 -0
- package/Checkbox/index.d.ts +40 -0
- package/Checkbox/index.js +14 -0
- package/CheckboxGroup/index.d.ts +46 -0
- package/CheckboxGroup/index.js +14 -0
- package/Collapse/collapsePanel.d.ts +30 -0
- package/Collapse/index.d.ts +57 -0
- package/Collapse/index.js +15 -0
- package/Collapse/motion.d.ts +5 -0
- package/Collapse/util.d.ts +11 -0
- package/CollapseBox/index.d.ts +27 -0
- package/CollapseBox/index.js +15 -0
- package/CollapseBox/util.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -0
- package/ColorPicker/index.js +1 -0
- package/ComboSelect/WithTabsCombo/index.d.ts +11 -0
- package/ComboSelect/WithTabsCombo/interface.d.ts +141 -0
- package/ComboSelect/index.d.ts +11 -0
- package/ComboSelect/index.js +14 -0
- package/ComboSelect/interface.d.ts +141 -0
- package/ComboSelect/lang/en_US.d.ts +8 -0
- package/ComboSelect/lang/index.d.ts +17 -0
- package/ComboSelect/lang/zh_CN.d.ts +8 -0
- package/ComboSelect/utils.d.ts +13 -0
- package/Container/index.d.ts +77 -0
- package/Container/index.js +15 -0
- package/DatePicker/PickerButton.d.ts +3 -0
- package/DatePicker/PickerTag.d.ts +3 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
- package/DatePicker/generatePicker/index.d.ts +77 -0
- package/DatePicker/index.d.ts +18 -0
- package/DatePicker/index.js +14 -0
- package/DatePicker/lang/en_US.d.ts +3 -0
- package/DatePicker/lang/index.d.ts +7 -0
- package/DatePicker/lang/zh_CN.d.ts +3 -0
- package/DatePicker/util.d.ts +20 -0
- package/Desktop/index.d.ts +55 -0
- package/Desktop/index.js +14 -0
- package/Drawer/index.d.ts +11 -0
- package/Drawer/index.js +14 -0
- package/Drawer/interface.d.ts +83 -0
- package/Drawer/lang/en_US.d.ts +5 -0
- package/Drawer/lang/index.d.ts +11 -0
- package/Drawer/lang/zh_CN.d.ts +5 -0
- package/Empty/images/index.d.ts +2 -0
- package/Empty/index.d.ts +30 -0
- package/Empty/index.js +14 -0
- package/Empty/lang/en_US.d.ts +6 -0
- package/Empty/lang/index.d.ts +13 -0
- package/Empty/lang/zh_CN.d.ts +6 -0
- package/Form/index.d.ts +181 -0
- package/Form/index.js +14 -0
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -0
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
- package/FormItem/compoments/formFile/index.d.ts +38 -0
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
- package/FormItem/compoments/formSelect/index.d.ts +18 -0
- package/FormItem/errorTips.d.ts +12 -0
- package/FormItem/index.d.ts +152 -0
- package/FormItem/index.js +14 -0
- package/FormItem/itemType.d.ts +42 -0
- package/FormItem/validateFunction.d.ts +15 -0
- package/FunctionModal/dialog.d.ts +58 -0
- package/FunctionModal/index.d.ts +8 -0
- package/FunctionModal/index.js +14 -0
- package/FunctionModal/modalContext.d.ts +14 -0
- package/GlobalContext/componentsProps.d.ts +19 -0
- package/GlobalContext/confirmLocale.d.ts +7 -0
- package/GlobalContext/index.d.ts +28 -0
- package/GlobalContext/index.js +16 -0
- package/GlobalContext/intl.d.ts +34 -0
- package/GlobalContext/useFormatMessage.d.ts +3 -0
- package/Help/index.d.ts +20 -0
- package/Help/index.js +15 -0
- package/HelperText/index.d.ts +19 -0
- package/HelperText/index.js +15 -0
- package/Hooks/useGlobalProps.d.ts +1 -0
- package/InputLang/index.d.ts +49 -0
- package/InputLang/index.js +14 -0
- package/InputNumber/index.d.ts +74 -0
- package/InputNumber/index.js +14 -0
- package/Label/index.d.ts +35 -0
- package/Label/index.js +14 -0
- package/Loading/index.d.ts +17 -0
- package/Loading/index.js +15 -0
- package/Menu/footerExpansion.d.ts +9 -0
- package/Menu/index.d.ts +10 -0
- package/Menu/index.js +14 -0
- package/Menu/interface.d.ts +139 -0
- package/Menu/logo.d.ts +9 -0
- package/Menu/verticalMenuList.d.ts +14 -0
- package/Message/index.d.ts +59 -0
- package/Message/index.js +15 -0
- package/Modal/Confirm/index.d.ts +66 -0
- package/Modal/index.d.ts +61 -0
- package/Modal/index.js +14 -0
- package/Modal/lang/en_US.d.ts +5 -0
- package/Modal/lang/index.d.ts +11 -0
- package/Modal/lang/zh_CN.d.ts +5 -0
- package/MultiBox/index.d.ts +54 -0
- package/MultiBox/index.js +14 -0
- package/Notification/index.d.ts +52 -0
- package/Notification/index.js +15 -0
- package/OperateBtn/index.d.ts +59 -0
- package/OperateBtn/index.js +14 -0
- package/OperateBtn/lang/en_US.d.ts +4 -0
- package/OperateBtn/lang/index.d.ts +9 -0
- package/OperateBtn/lang/zh_CN.d.ts +4 -0
- package/PageHeader/horizontalMeun.d.ts +9 -0
- package/PageHeader/horizontalMeunRight.d.ts +9 -0
- package/PageHeader/index.d.ts +10 -0
- package/PageHeader/index.js +14 -0
- package/PageHeader/interface.d.ts +167 -0
- package/Pagination/index.d.ts +33 -0
- package/Pagination/index.js +14 -0
- package/Pagination/lang/en_US.d.ts +8 -0
- package/Pagination/lang/index.d.ts +17 -0
- package/Pagination/lang/zh_CN.d.ts +8 -0
- package/ParauiProvider/index.d.ts +12 -0
- package/ParauiProvider/index.js +15 -0
- package/PopConfirm/index.d.ts +56 -0
- package/PopConfirm/index.js +14 -0
- package/PopConfirm/lang/en_US.d.ts +5 -0
- package/PopConfirm/lang/index.d.ts +11 -0
- package/PopConfirm/lang/zh_CN.d.ts +5 -0
- package/Popover/index.d.ts +14 -0
- package/Popover/index.js +15 -0
- package/Popper/index.d.ts +13 -0
- package/Popper/index.js +16 -0
- package/Progress/Line.d.ts +47 -0
- package/Progress/Steps.d.ts +17 -0
- package/Progress/index.d.ts +81 -0
- package/Progress/index.js +20 -0
- package/Progress/utils.d.ts +6 -0
- package/Querying/images/index.d.ts +2 -0
- package/Querying/index.d.ts +26 -0
- package/Querying/index.js +14 -0
- package/Querying/lang/en_US.d.ts +4 -0
- package/Querying/lang/index.d.ts +9 -0
- package/Querying/lang/zh_CN.d.ts +4 -0
- package/README.md +481 -0
- package/Radio/index.d.ts +38 -0
- package/Radio/index.js +14 -0
- package/RadioGroup/index.d.ts +47 -0
- package/RadioGroup/index.js +14 -0
- package/Search/index.d.ts +56 -0
- package/Search/index.js +14 -0
- package/Select/index.d.ts +86 -0
- package/Select/index.js +14 -0
- package/Select/lang/en_US.d.ts +5 -0
- package/Select/lang/index.d.ts +11 -0
- package/Select/lang/zh_CN.d.ts +5 -0
- package/SelectInput/index.d.ts +11 -0
- package/SelectInput/index.js +14 -0
- package/SingleBox/index.d.ts +42 -0
- package/SingleBox/index.js +14 -0
- package/Slider/index.d.ts +14 -0
- package/Slider/index.js +15 -0
- package/Slider/interface.d.ts +102 -0
- package/Split/index.d.ts +7 -0
- package/Split/index.js +15 -0
- package/Stepper/icons.d.ts +5 -0
- package/Stepper/index.d.ts +39 -0
- package/Stepper/index.js +15 -0
- package/Switch/index.d.ts +78 -0
- package/Switch/index.js +14 -0
- package/Table/index.d.ts +10 -0
- package/Table/index.js +14 -0
- package/Table/interface.d.ts +202 -0
- package/Table/lang/en_US.d.ts +6 -0
- package/Table/lang/index.d.ts +13 -0
- package/Table/lang/zh_CN.d.ts +6 -0
- package/Table/tableBody.d.ts +9 -0
- package/Table/tableBodyElement/index.d.ts +15 -0
- package/Table/tableBodyInterface.d.ts +67 -0
- package/Table/tableContainer/index.d.ts +16 -0
- package/Table/tableElement/index.d.ts +17 -0
- package/Table/tableHead.d.ts +9 -0
- package/Table/tableHeadElement/index.d.ts +15 -0
- package/Table/tableHeadInterface.d.ts +30 -0
- package/Table/tablePagination.d.ts +9 -0
- package/Table/tablePaginationInterFace.d.ts +24 -0
- package/Table/tdElement/index.d.ts +15 -0
- package/Table/thElement/index.d.ts +15 -0
- package/Table/trElement/index.d.ts +15 -0
- package/Table/util.d.ts +16 -0
- package/Tabs/index.d.ts +48 -0
- package/Tabs/index.js +14 -0
- package/Tag/TagGroup.d.ts +66 -0
- package/Tag/index.d.ts +34 -0
- package/Tag/index.js +14 -0
- package/Test/index.d.ts +2 -0
- package/Test/index.js +16 -0
- package/TextField/index.d.ts +93 -0
- package/TextField/index.js +14 -0
- package/TimePicker/index.d.ts +22 -0
- package/TimePicker/index.js +14 -0
- package/TimePicker/locale/en_US.d.ts +3 -0
- package/TimePicker/locale/zh_CN.d.ts +3 -0
- package/TimePicker/style/index.d.ts +1 -0
- package/Timeline/index.d.ts +22 -0
- package/Timeline/index.js +15 -0
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -0
- package/ToggleButton/index.d.ts +49 -0
- package/ToggleButton/index.js +14 -0
- package/Tooltip/index.d.ts +14 -0
- package/Tooltip/index.js +15 -0
- package/Transfer/index.d.ts +17 -0
- package/Transfer/index.js +14 -0
- package/Transfer/lang/en_US.d.ts +6 -0
- package/Transfer/lang/index.d.ts +13 -0
- package/Transfer/lang/zh_CN.d.ts +6 -0
- package/Tree/OperateBar/index.d.ts +13 -0
- package/Tree/Tree.d.ts +4 -0
- package/Tree/index.d.ts +5 -0
- package/Tree/index.js +14 -0
- package/Tree/interface.d.ts +207 -0
- package/Tree/lang/en_US.d.ts +8 -0
- package/Tree/lang/index.d.ts +17 -0
- package/Tree/lang/zh_CN.d.ts +8 -0
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +26 -0
- package/Tree/utils/treeUtil.d.ts +15 -0
- package/Upload/Dragger/index.d.ts +10 -0
- package/Upload/ErroTip/index.d.ts +13 -0
- package/Upload/ImageUpload/index.d.ts +14 -0
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -0
- package/Upload/ImgCrop/constants.d.ts +7 -0
- package/Upload/ImgCrop/index.d.ts +6 -0
- package/Upload/ImgCrop/interface.d.ts +24 -0
- package/Upload/UploadList/index.d.ts +5 -0
- package/Upload/index.d.ts +15 -0
- package/Upload/index.js +14 -0
- package/Upload/interface.d.ts +134 -0
- package/Upload/lang/en_US.d.ts +12 -0
- package/Upload/lang/index.d.ts +25 -0
- package/Upload/lang/zh_CN.d.ts +12 -0
- package/cdn/AutoBox/index.js +29 -0
- package/cdn/AutoTips/index.js +40 -0
- package/cdn/Breadcrumbs/index.js +53 -0
- package/cdn/Button/index.js +79 -0
- package/cdn/ButtonGroup/index.js +79 -0
- package/cdn/Carousel/index.js +6 -0
- package/cdn/Cascader/index.js +42 -0
- package/cdn/Checkbox/index.js +53 -0
- package/cdn/CheckboxGroup/index.js +53 -0
- package/cdn/Collapse/index.js +27 -0
- package/cdn/CollapseBox/index.js +1 -0
- package/cdn/ColorPicker/index.js +1 -0
- package/cdn/ComboSelect/index.js +438 -0
- package/cdn/Container/index.js +1 -0
- package/cdn/DatePicker/index.js +185 -0
- package/cdn/Desktop/index.js +24 -0
- package/cdn/Drawer/index.js +84 -0
- package/cdn/Empty/index.js +1 -0
- package/cdn/Form/index.js +477 -0
- package/cdn/FormItem/index.js +477 -0
- package/cdn/FunctionModal/index.js +144 -0
- package/cdn/GlobalContext/index.js +1 -0
- package/cdn/Help/index.js +53 -0
- package/cdn/HelperText/index.js +1 -0
- package/cdn/InputLang/index.js +144 -0
- package/cdn/InputNumber/index.js +118 -0
- package/cdn/Label/index.js +53 -0
- package/cdn/Loading/index.js +14 -0
- package/cdn/Menu/index.js +40 -0
- package/cdn/Message/index.js +53 -0
- package/cdn/Modal/index.js +144 -0
- package/cdn/MultiBox/index.js +131 -0
- package/cdn/Notification/index.js +66 -0
- package/cdn/OperateBtn/index.js +92 -0
- package/cdn/PageHeader/index.js +92 -0
- package/cdn/Pagination/index.js +214 -0
- package/cdn/ParauiProvider/index.js +9 -0
- package/cdn/PopConfirm/index.js +131 -0
- package/cdn/Popover/index.js +16 -0
- package/cdn/Popper/index.js +26 -0
- package/cdn/Progress/index.js +58 -0
- package/cdn/Querying/index.js +1 -0
- package/cdn/Radio/index.js +53 -0
- package/cdn/RadioGroup/index.js +53 -0
- package/cdn/Search/index.js +144 -0
- package/cdn/Select/index.js +131 -0
- package/cdn/SelectInput/index.js +131 -0
- package/cdn/SingleBox/index.js +131 -0
- package/cdn/Slider/index.js +16 -0
- package/cdn/Split/index.js +1 -0
- package/cdn/Stepper/index.js +154 -0
- package/cdn/Switch/index.js +71 -0
- package/cdn/Table/index.js +292 -0
- package/cdn/Tabs/index.js +165 -0
- package/cdn/Tag/index.js +27 -0
- package/cdn/Test/index.js +1 -0
- package/cdn/TextField/index.js +105 -0
- package/cdn/TimePicker/index.js +185 -0
- package/cdn/Timeline/index.js +16 -0
- package/cdn/ToggleButton/index.js +79 -0
- package/cdn/Tooltip/index.js +40 -0
- package/cdn/Transfer/index.js +170 -0
- package/cdn/Tree/index.js +170 -0
- package/cdn/Upload/index.js +252 -0
- package/index.d.ts +128 -0
- package/index.js +19 -0
- package/package.json +21 -21
- package/style.css +72 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Hanz
|
|
3
|
+
* @date 2021/8/19 下午1:47
|
|
4
|
+
* @description 接口
|
|
5
|
+
*/
|
|
6
|
+
import React, { ReactNode } from 'react';
|
|
7
|
+
import { TableProps as ITableProps } from '../Table/interface';
|
|
8
|
+
import { TreeProps, TreeNodeProps } from '../Tree/interface';
|
|
9
|
+
import { TooltipProps } from "../Tooltip";
|
|
10
|
+
import { LabelTooltipProps } from "../Label";
|
|
11
|
+
import { EmptyProps } from '../Empty';
|
|
12
|
+
declare type TableProps = ITableProps & {
|
|
13
|
+
/** table 参数 */
|
|
14
|
+
params?: Object;
|
|
15
|
+
/** 替换显示字段 */
|
|
16
|
+
replaceFields?: {
|
|
17
|
+
key?: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type { TableProps, TreeProps };
|
|
22
|
+
export declare type SelectOpt = {
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
closable?: boolean;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
};
|
|
27
|
+
export declare type SelectedOptions = Array<SelectOpt>;
|
|
28
|
+
export type { TreeNodeProps };
|
|
29
|
+
export interface ComboSelectProps {
|
|
30
|
+
/**选择器模式*/
|
|
31
|
+
mode?: 'table' | 'tree' | 'list';
|
|
32
|
+
/**占位符*/
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
/**search 占位符*/
|
|
35
|
+
searchPlaceholder?: string;
|
|
36
|
+
/**最大显示数*/
|
|
37
|
+
maxCount?: number;
|
|
38
|
+
/**禁用选择器*/
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/** 支持清除 */
|
|
41
|
+
allowClear?: boolean;
|
|
42
|
+
/**cls*/
|
|
43
|
+
className?: string;
|
|
44
|
+
/**样式*/
|
|
45
|
+
style?: React.CSSProperties;
|
|
46
|
+
/**弹出层className*/
|
|
47
|
+
popoverClassName?: string;
|
|
48
|
+
/**容器最大高度*/
|
|
49
|
+
maxHeight?: number;
|
|
50
|
+
/**大小*/
|
|
51
|
+
size?: 'large' | 'medium' | 'small';
|
|
52
|
+
/**选择器footer actions*/
|
|
53
|
+
popoverActions?: React.ReactNode;
|
|
54
|
+
/**是否显示footer actions*/
|
|
55
|
+
showPopoverActions?: boolean;
|
|
56
|
+
/**是否默认打开*/
|
|
57
|
+
defaultOpen?: boolean;
|
|
58
|
+
/**默认值 checkable为true SelectOpt[],为false SelectOpt */
|
|
59
|
+
defaultValue?: SelectOpt[] | SelectOpt;
|
|
60
|
+
/**替换显示字段 {key: 'key', title: 'title', children: 'children'} */
|
|
61
|
+
replaceFields?: {
|
|
62
|
+
key?: string;
|
|
63
|
+
title?: string;
|
|
64
|
+
children?: string;
|
|
65
|
+
};
|
|
66
|
+
/**出参字段 {outputKey: 'key', outputTitle: 'label'} */
|
|
67
|
+
outputFields?: {
|
|
68
|
+
outputKey?: string;
|
|
69
|
+
outputTitle?: string;
|
|
70
|
+
};
|
|
71
|
+
/**当前选中值 checkable为true SelectOpt[],为false SelectOpt*/
|
|
72
|
+
value?: SelectOpt[] | SelectOpt;
|
|
73
|
+
/**刷新标识*/
|
|
74
|
+
refresh?: number;
|
|
75
|
+
/**位置*/
|
|
76
|
+
placement?: TooltipProps['placement'];
|
|
77
|
+
/**搜索回调*/
|
|
78
|
+
onSearch?: (searchKey: string) => void;
|
|
79
|
+
/**footer actions 取消回调*/
|
|
80
|
+
onCancel?: () => void;
|
|
81
|
+
/**footer actions 确定回调*/
|
|
82
|
+
onOk?: (options: SelectedOptions) => void;
|
|
83
|
+
/** 关闭选择器回调 */
|
|
84
|
+
onClose?: () => void;
|
|
85
|
+
/**value发生变化时回调*/
|
|
86
|
+
onChange?: (options: SelectOpt[] | SelectOpt, prevOptions?: SelectOpt[] | SelectOpt, originData?: TreeNodeProps[] | TreeNodeProps) => void;
|
|
87
|
+
/**table组件属性*/
|
|
88
|
+
TableProps?: TableProps;
|
|
89
|
+
/**tree组件属性*/
|
|
90
|
+
TreeProps?: TreeProps;
|
|
91
|
+
/**请求url*/
|
|
92
|
+
url?: string;
|
|
93
|
+
/**请求上下文*/
|
|
94
|
+
ctx?: string;
|
|
95
|
+
/**请求参数*/
|
|
96
|
+
params?: Object;
|
|
97
|
+
/**请求方法*/
|
|
98
|
+
method?: 'Get' | 'Post';
|
|
99
|
+
/**单选或多选*/
|
|
100
|
+
checkable?: boolean;
|
|
101
|
+
/**是否显示搜索*/
|
|
102
|
+
showSearch?: boolean;
|
|
103
|
+
/**错误状态*/
|
|
104
|
+
error?: boolean;
|
|
105
|
+
/**辅助文本*/
|
|
106
|
+
helperText?: React.ReactNode;
|
|
107
|
+
/**参数处理回调*/
|
|
108
|
+
paramsCallback?: (params: {
|
|
109
|
+
[name: string]: any;
|
|
110
|
+
}) => any;
|
|
111
|
+
/**路径字段*/
|
|
112
|
+
fullPathKey?: string;
|
|
113
|
+
/** 自定义路径节点 */
|
|
114
|
+
fullPathRender?: (node: TreeNodeProps) => React.ReactNode;
|
|
115
|
+
/** 禁用弹框模式 */
|
|
116
|
+
disablePopup?: boolean;
|
|
117
|
+
/** 自定义渲染tag */
|
|
118
|
+
tagRender?: (option: SelectOpt) => React.ReactNode;
|
|
119
|
+
/** tag 删除回调*/
|
|
120
|
+
onTagRemove?: (currentOpt?: SelectOpt) => void;
|
|
121
|
+
/** 暴露给外部的行为,可扩展*/
|
|
122
|
+
action?: React.Ref<{
|
|
123
|
+
closePopup(): void;
|
|
124
|
+
}>;
|
|
125
|
+
/** 标题 */
|
|
126
|
+
label?: ReactNode;
|
|
127
|
+
/** 帮助提示信息 */
|
|
128
|
+
labelTooltip?: LabelTooltipProps;
|
|
129
|
+
/** 是否必填 */
|
|
130
|
+
required?: boolean;
|
|
131
|
+
/** 空状态属性 */
|
|
132
|
+
emptyProps?: EmptyProps;
|
|
133
|
+
/** 单选时可切换选中值 checkable 为 false 时有效 */
|
|
134
|
+
toggleSelectedOnSingle?: boolean;
|
|
135
|
+
/** 自定义渲染列表option */
|
|
136
|
+
optionRender?: (nodeData: TreeNodeProps) => React.ReactNode;
|
|
137
|
+
/** 获得option label */
|
|
138
|
+
getOptionLabel?: (nodeData: TreeNodeProps) => string;
|
|
139
|
+
/** 下拉匹配选择框宽度 */
|
|
140
|
+
dropdownMatchSelectWidth?: boolean | number;
|
|
141
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
zh: {
|
|
3
|
+
searchPlaceholder: string;
|
|
4
|
+
cancel: string;
|
|
5
|
+
ok: string;
|
|
6
|
+
fullPath: string;
|
|
7
|
+
pleaseSelect: string;
|
|
8
|
+
};
|
|
9
|
+
en: {
|
|
10
|
+
searchPlaceholder: string;
|
|
11
|
+
cancel: string;
|
|
12
|
+
ok: string;
|
|
13
|
+
fullPath: string;
|
|
14
|
+
pleaseSelect: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const anchorOriginMap: {
|
|
2
|
+
[index: string]: any;
|
|
3
|
+
};
|
|
4
|
+
export declare const getReplaceField: (mode: string, repl: any, tableP: any, treeP: any) => any;
|
|
5
|
+
export declare const toArray: (list: any) => any[];
|
|
6
|
+
export declare const isRemoteLoad: (mode: string, props: any) => boolean;
|
|
7
|
+
export declare const getOverlaySize: (mode: string, isRemoteLoad?: boolean, maxHeight?: number) => {
|
|
8
|
+
height: string;
|
|
9
|
+
maxHeight?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
maxHeight: string;
|
|
12
|
+
height?: undefined;
|
|
13
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.scss";
|
|
3
|
+
interface Props {
|
|
4
|
+
/**
|
|
5
|
+
* 容器自定义className
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 布局类型
|
|
10
|
+
ltrb tlrb
|
|
11
|
+
┌───────┬──────────────────────────────┐ ┌───────────────────────────────────┐
|
|
12
|
+
│ │ top │ │ top │
|
|
13
|
+
│ ├──────────────────────────────┤ ├──────┬────────────────────────────┤
|
|
14
|
+
│ │ │ │ │ │
|
|
15
|
+
│ │ │ │ │ │
|
|
16
|
+
│ │ │ │ │ │
|
|
17
|
+
│ │ │ │ │ │
|
|
18
|
+
│ left │ right │ │ left │ right │
|
|
19
|
+
│ │ │ │ │ │
|
|
20
|
+
│ │ │ │ │ │
|
|
21
|
+
│ │ │ │ │ │
|
|
22
|
+
│ │ │ │ │ │
|
|
23
|
+
│ ├──────────────────────────────┤ ├──────┴────────────────────────────┤
|
|
24
|
+
│ │ bottom │ │ bottom │
|
|
25
|
+
└───────┴──────────────────────────────┘ └───────────────────────────────────┘
|
|
26
|
+
ltr trb
|
|
27
|
+
┌──────────────────────────────────────┐ ┌───────────────────────────────────┐
|
|
28
|
+
│ top │ │ top │
|
|
29
|
+
├───────┬──────────────────────────────┤ ├───────────────────────────────────┤
|
|
30
|
+
│ │ │ │ │
|
|
31
|
+
│ │ │ │ │
|
|
32
|
+
│ │ │ │ │
|
|
33
|
+
│ │ │ │ │
|
|
34
|
+
│ left │ right │ │ right │
|
|
35
|
+
│ │ │ │ │
|
|
36
|
+
│ │ │ │ │
|
|
37
|
+
│ │ │ │ │
|
|
38
|
+
│ │ │ ├───────────────────────────────────┤
|
|
39
|
+
│ │ │ │ bottom │
|
|
40
|
+
└───────┴──────────────────────────────┘ └───────────────────────────────────┘
|
|
41
|
+
*/
|
|
42
|
+
type?: "tlrb" | "ltrb" | "trb" | "tlr";
|
|
43
|
+
/**
|
|
44
|
+
* 顶部容器
|
|
45
|
+
*/
|
|
46
|
+
top?: JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* 顶部容器样式
|
|
49
|
+
*/
|
|
50
|
+
topStyle?: React.CSSProperties;
|
|
51
|
+
/**
|
|
52
|
+
* 左侧容器
|
|
53
|
+
*/
|
|
54
|
+
left?: JSX.Element;
|
|
55
|
+
/**
|
|
56
|
+
* 左侧容器样式
|
|
57
|
+
*/
|
|
58
|
+
leftStyle?: React.CSSProperties;
|
|
59
|
+
/**
|
|
60
|
+
* 右侧容器
|
|
61
|
+
*/
|
|
62
|
+
right?: JSX.Element;
|
|
63
|
+
/**
|
|
64
|
+
* 右侧容器样式
|
|
65
|
+
*/
|
|
66
|
+
rightStyle?: React.CSSProperties;
|
|
67
|
+
/**
|
|
68
|
+
* 底部容器
|
|
69
|
+
*/
|
|
70
|
+
bottom?: JSX.Element;
|
|
71
|
+
/**
|
|
72
|
+
* 底部容器样式
|
|
73
|
+
*/
|
|
74
|
+
bottomStyle?: React.CSSProperties;
|
|
75
|
+
}
|
|
76
|
+
export declare const Container: (props?: Props) => JSX.Element;
|
|
77
|
+
export default Container;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ParaUI=e(require("react")):t.ParaUI=e(t.react)}(self,(function(t){return function(){var e={6461:function(t,e,r){(e=r(3645)(!1)).push([t.id,".para-container{width:100%;height:100%}.para-container>.para-body{overflow:auto}.para-container.tlr>.para-body{display:table}.para-container.tlr>.para-body>.para-body-right{display:table-cell;vertical-align:top}.para-container.tlr>.para-body>.para-container-left{display:table-cell;vertical-align:top}.para-container.tlrb>.para-body{display:table}.para-container.tlrb>.para-body>.para-container-left{display:table-cell;vertical-align:top}.para-container.tlrb>.para-body>.para-container-right{display:table-cell;vertical-align:top}.para-container.ltrb{display:table}.para-container.ltrb>.para-body{display:table-cell;vertical-align:top}.para-container.ltrb>.para-container-left{display:table-cell;vertical-align:top}.para-container-top{transition:width .3s,height .3s}.para-container-left{transition:width .3s,height .3s}.para-container-right{transition:width .3s,height .3s;overflow:auto}.para-container-bottom{transition:width .3s,height .3s}",""]),t.exports=e},3645:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=function(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"==typeof btoa){var a=(o=n,c=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(s," */")),i=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[r].concat(i).concat([a]).join("\n")}var o,c,s;return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var a={};if(n)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(a[o]=!0)}for(var c=0;c<t.length;c++){var s=[].concat(t[c]);n&&a[s[0]]||(r&&(s[2]?s[2]="".concat(r," and ").concat(s[2]):s[2]=r),e.push(s))}},e}},7418:function(t){"use strict";
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var o,c,s=a(t),l=1;l<arguments.length;l++){for(var d in o=Object(arguments[l]))r.call(o,d)&&(s[d]=o[d]);if(e){c=e(o);for(var p=0;p<c.length;p++)n.call(o,c[p])&&(s[c[p]]=o[c[p]])}}return s}},5251:function(t,e,r){"use strict";
|
|
7
|
+
/** @license React v17.0.2
|
|
8
|
+
* react-jsx-runtime.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
r(7418);var n=r(8156),a=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;a=i("react.element"),i("react.fragment")}var o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,r){var n,i={},l=null,d=null;for(n in void 0!==r&&(l=""+r),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(d=e.ref),e)c.call(e,n)&&!s.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===i[n]&&(i[n]=e[n]);return{$$typeof:a,type:t,key:l,ref:d,props:i,_owner:o.current}}e.jsx=l,e.jsxs=l},5893:function(t,e,r){"use strict";t.exports=r(5251)},462:function(t,e,r){var n=r(3379),a=r(6461);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[t.id,a,""]]);var i={insert:("body","body"),singleton:!1};n(a,i);t.exports=a.locals||{}},3379:function(t,e,r){"use strict";var n,a=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),o=[];function c(t){for(var e=-1,r=0;r<o.length;r++)if(o[r].identifier===t){e=r;break}return e}function s(t,e){for(var r={},n=[],a=0;a<t.length;a++){var i=t[a],s=e.base?i[0]+e.base:i[0],l=r[s]||0,d="".concat(s," ").concat(l);r[s]=l+1;var p=c(d),u={css:i[1],media:i[2],sourceMap:i[3]};-1!==p?(o[p].references++,o[p].updater(u)):o.push({identifier:d,updater:y(u,e),references:1}),n.push(d)}return n}function l(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var a=r.nc;a&&(n.nonce=a)}if(Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])})),"function"==typeof t.insert)t.insert(e);else{var o=i(t.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(e)}return e}var d,p=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function u(t,e,r,n){var a=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(t.styleSheet)t.styleSheet.cssText=p(e,a);else{var i=document.createTextNode(a),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(i,o[e]):t.appendChild(i)}}function h(t,e,r){var n=r.css,a=r.media,i=r.sourceMap;if(a?t.setAttribute("media",a):t.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var f=null,v=0;function y(t,e){var r,n,a;if(e.singleton){var i=v++;r=f||(f=l(e)),n=u.bind(null,r,i,!1),a=u.bind(null,r,i,!0)}else r=l(e),n=h.bind(null,r,e),a=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(r)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else a()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=a());var r=s(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var n=0;n<r.length;n++){var a=c(r[n]);o[a].references--}for(var i=s(t,e),l=0;l<r.length;l++){var d=c(r[l]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}r=i}}}},8156:function(e){"use strict";e.exports=t}},r={};function n(t){var a=r[t];if(void 0!==a)return a.exports;var i=r[t]={id:t,exports:{}};return e[t](i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var a={};return function(){"use strict";n.r(a),n.d(a,{Container:function(){return o}});var t=n(5893),e=n(8156),r=n.n(e),i=(n(462),function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var a in e=arguments[r])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},i.apply(this,arguments)}),o=function(e){void 0===e&&(e={});var n,a,o,c,s,l=e.className,d=void 0===l?"":l,p=e.top,u=e.topStyle,h=void 0===u?{}:u,f=e.left,v=e.leftStyle,y=void 0===v?{}:v,b=e.right,g=e.rightStyle,m=void 0===g?{}:g,j=e.bottom,x=e.bottomStyle,w=void 0===x?{}:x,N=e.type,O=void 0===N?"tlr":N;return r().useMemo((function(){switch(O){case"tlr":return n=i({height:p?"50px":"0",width:"100%"},h),a=i({height:"100%",width:"auto"},y),c=i({height:j?"20px":"0",width:"100%"},w),o=i({height:"calc(100% - ".concat(c.height,")"),width:"auto"},m),s={width:"100%",height:"calc(100% - ".concat(n.height,")")},(0,t.jsxs)("div",i({className:"para-container tlr "+d},{children:[(0,t.jsx)("div",i({className:"para-container-top",style:n},{children:p})),(0,t.jsxs)("div",i({className:"para-body",style:s},{children:[(0,t.jsx)("div",i({className:"para-container-left",style:a},{children:f})),(0,t.jsxs)("div",i({className:"para-body-right",style:{width:"auto",height:"100%"}},{children:[(0,t.jsx)("div",i({className:"para-container-right",style:o},{children:b})),(0,t.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}))]}))]}))]}));case"tlrb":return n=i({height:p?"50px":"0",width:"100%"},h),a=i({height:"100%",width:"auto"},y),o=i({height:"100%",width:"auto"},m),c=i({height:j?"20px":"0px",width:"100%"},w),s={width:"100%",height:"calc(100% - ".concat(n.height," - ").concat(c.height,")")},(0,t.jsxs)("div",i({className:"para-container tlrb "+d},{children:[(0,t.jsx)("div",i({className:"para-container-top",style:n},{children:p})),(0,t.jsxs)("div",i({className:"para-body",style:s},{children:[(0,t.jsx)("div",i({className:"para-container-left",style:a},{children:f})),(0,t.jsx)("div",i({className:"para-container-right",style:o},{children:b}))]})),(0,t.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}))]}));case"ltrb":return a=i({height:"100%",width:"auto"},y),n=i({height:p?"50px":"0",width:"100%"},h),c=i({height:j?"30px":"0px",width:"100%"},w),o=i({height:"calc(100% - ".concat(n.height,"px - ").concat(c.height,")"),width:"100%"},m),s={width:"auto",height:"100%"},(0,t.jsxs)("div",i({className:"para-container ltrb "+d},{children:[(0,t.jsx)("div",i({className:"para-container-left",style:a},{children:f})),(0,t.jsxs)("div",i({className:"para-body",style:s},{children:[(0,t.jsx)("div",i({className:"para-container-top",style:n},{children:p})),(0,t.jsx)("div",i({className:"para-container-right",style:o},{children:b})),(0,t.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}))]}))]}));case"trb":return n=i({height:p?"50px":"0",width:"100%"},h),c=i({height:j?"30px":"0px",width:"100%"},w),o=i({height:"calc(100% - ".concat(n.height,"px - ").concat(c.height,")"),width:"100%"},m),(0,t.jsxs)("div",i({className:"para-container trb "+d},{children:[(0,t.jsx)("div",i({className:"para-container-top",style:n},{children:p})),(0,t.jsx)("div",i({className:"para-container-right",style:o},{children:b})),(0,t.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}))]}))}return(0,t.jsx)("div",{children:"Error Position"})}),[O,d,p,h,f,y,b,m,j,w])};a.default=o}(),a}()}));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GenerateConfig } from 'rc-picker/lib/generate/index';
|
|
3
|
+
import { RangePickerProps } from '.';
|
|
4
|
+
export default function generateRangePicker<DateType>(generateConfig: GenerateConfig<DateType>): React.ComponentClass<RangePickerProps<DateType>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GenerateConfig } from 'rc-picker/lib/generate/index';
|
|
3
|
+
import { PickerProps, PickerDateProps, PickerTimeProps } from '.';
|
|
4
|
+
export default function generatePicker<DateType>(generateConfig: GenerateConfig<DateType>): {
|
|
5
|
+
DatePicker: React.ComponentClass<PickerProps<DateType>, any>;
|
|
6
|
+
WeekPicker: React.ComponentClass<Omit<PickerDateProps<DateType>, "picker">, any>;
|
|
7
|
+
MonthPicker: React.ComponentClass<Omit<PickerDateProps<DateType>, "picker">, any>;
|
|
8
|
+
YearPicker: React.ComponentClass<Omit<PickerDateProps<DateType>, "picker">, any>;
|
|
9
|
+
TimePicker: React.ComponentClass<Omit<PickerTimeProps<DateType>, "picker">, any>;
|
|
10
|
+
QuarterPicker: React.ComponentClass<Omit<PickerTimeProps<DateType>, "picker">, any>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { GenerateConfig } from 'rc-picker/lib/generate/index';
|
|
3
|
+
import { PickerBaseProps as RCPickerBaseProps, PickerDateProps as RCPickerDateProps, PickerTimeProps as RCPickerTimeProps } from 'rc-picker/lib/Picker';
|
|
4
|
+
import { RangePickerBaseProps as RCRangePickerBaseProps, RangePickerDateProps as RCRangePickerDateProps, RangePickerTimeProps as RCRangePickerTimeProps } from 'rc-picker/lib/RangePicker';
|
|
5
|
+
import { Locale as RcPickerLocale } from 'rc-picker/lib/interface';
|
|
6
|
+
import PickerButton from '../PickerButton';
|
|
7
|
+
import PickerTag from '../PickerTag';
|
|
8
|
+
import { Moment } from "moment";
|
|
9
|
+
import { LabelTooltipProps } from "../../Label";
|
|
10
|
+
declare type SizeType = 'small' | 'medium' | 'large' | undefined;
|
|
11
|
+
export interface TimePickerLocale {
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
rangePlaceholder?: [string, string];
|
|
14
|
+
}
|
|
15
|
+
export declare type NullableDateType<DateType> = DateType | null | undefined | string;
|
|
16
|
+
export declare type Value<DateType> = NullableDateType<DateType>;
|
|
17
|
+
export declare type RangeValue<DateType> = [NullableDateType<DateType>, NullableDateType<DateType>] | null;
|
|
18
|
+
export declare const Components: {
|
|
19
|
+
button: typeof PickerButton;
|
|
20
|
+
rangeItem: typeof PickerTag;
|
|
21
|
+
};
|
|
22
|
+
declare type InjectDefaultProps<Props, Type> = Omit<Props, 'locale' | 'generateConfig' | 'prevIcon' | 'nextIcon' | 'superPrevIcon' | 'superNextIcon' | 'hideHeader' | 'components' | 'value' | 'defaultValue'> & {
|
|
23
|
+
locale?: 'zh' | 'en';
|
|
24
|
+
size?: SizeType;
|
|
25
|
+
bordered?: boolean;
|
|
26
|
+
error?: boolean;
|
|
27
|
+
helperText?: React.ReactNode;
|
|
28
|
+
value?: Type extends 'range' ? RangeValue<Moment> : NullableDateType<Moment>;
|
|
29
|
+
defaultValue?: Type extends 'range' ? RangeValue<Moment> : NullableDateType<Moment>;
|
|
30
|
+
/** 标题 */
|
|
31
|
+
label?: ReactNode;
|
|
32
|
+
/** 帮助提示信息 */
|
|
33
|
+
labelTooltip?: LabelTooltipProps;
|
|
34
|
+
/** 是否必填 */
|
|
35
|
+
required?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare const pickerFormatMap: {
|
|
38
|
+
[index: string]: string;
|
|
39
|
+
};
|
|
40
|
+
export declare type PickerLocale = {
|
|
41
|
+
lang: RcPickerLocale & AdditionalPickerLocaleLangProps;
|
|
42
|
+
timePickerLocale: TimePickerLocale;
|
|
43
|
+
} & AdditionalPickerLocaleProps;
|
|
44
|
+
export declare type AdditionalPickerLocaleProps = {
|
|
45
|
+
dateFormat?: string;
|
|
46
|
+
dateTimeFormat?: string;
|
|
47
|
+
weekFormat?: string;
|
|
48
|
+
monthFormat?: string;
|
|
49
|
+
};
|
|
50
|
+
export declare type AdditionalPickerLocaleLangProps = {
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
yearPlaceholder?: string;
|
|
53
|
+
quarterPlaceholder?: string;
|
|
54
|
+
monthPlaceholder?: string;
|
|
55
|
+
weekPlaceholder?: string;
|
|
56
|
+
rangeYearPlaceholder?: [string, string];
|
|
57
|
+
rangeMonthPlaceholder?: [string, string];
|
|
58
|
+
rangeWeekPlaceholder?: [string, string];
|
|
59
|
+
rangePlaceholder?: [string, string];
|
|
60
|
+
};
|
|
61
|
+
export declare type PickerBaseProps<DateType> = InjectDefaultProps<RCPickerBaseProps<DateType>, ''>;
|
|
62
|
+
export declare type PickerDateProps<DateType> = InjectDefaultProps<RCPickerDateProps<DateType>, ''>;
|
|
63
|
+
export declare type PickerTimeProps<DateType> = InjectDefaultProps<RCPickerTimeProps<DateType>, ''>;
|
|
64
|
+
export declare type PickerProps<DateType> = PickerBaseProps<DateType> | PickerDateProps<DateType> | PickerTimeProps<DateType>;
|
|
65
|
+
export declare type RangePickerBaseProps<DateType> = InjectDefaultProps<RCRangePickerBaseProps<DateType>, 'range'>;
|
|
66
|
+
export declare type RangePickerDateProps<DateType> = InjectDefaultProps<RCRangePickerDateProps<DateType>, 'range'>;
|
|
67
|
+
export declare type RangePickerTimeProps<DateType> = InjectDefaultProps<RCRangePickerTimeProps<DateType>, 'range'>;
|
|
68
|
+
export declare type RangePickerProps<DateType> = RangePickerBaseProps<DateType> | RangePickerDateProps<DateType> | RangePickerTimeProps<DateType>;
|
|
69
|
+
declare function generatePicker<DateType>(generateConfig: GenerateConfig<DateType>): React.ComponentClass<PickerProps<DateType>, any> & {
|
|
70
|
+
WeekPicker: React.ComponentClass<Omit<PickerDateProps<DateType>, "picker">, any>;
|
|
71
|
+
MonthPicker: React.ComponentClass<Omit<PickerDateProps<DateType>, "picker">, any>;
|
|
72
|
+
YearPicker: React.ComponentClass<Omit<PickerDateProps<DateType>, "picker">, any>;
|
|
73
|
+
RangePicker: React.ComponentClass<RangePickerProps<DateType>>;
|
|
74
|
+
TimePicker: React.ComponentClass<Omit<PickerTimeProps<DateType>, "picker">, any>;
|
|
75
|
+
QuarterPicker: React.ComponentClass<Omit<PickerTimeProps<DateType>, "picker">, any>;
|
|
76
|
+
};
|
|
77
|
+
export default generatePicker;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Moment } from 'moment';
|
|
3
|
+
export type { Value, RangeValue, NullableDateType } from './generatePicker';
|
|
4
|
+
import { PickerProps, PickerDateProps, RangePickerProps as BaseRangePickerProps } from './generatePicker';
|
|
5
|
+
export declare type DatePickerProps = PickerProps<Moment>;
|
|
6
|
+
export declare type MonthPickerProps = Omit<PickerDateProps<Moment>, 'picker'>;
|
|
7
|
+
export declare type WeekPickerProps = Omit<PickerDateProps<Moment>, 'picker'>;
|
|
8
|
+
export declare type RangePickerProps = BaseRangePickerProps<Moment>;
|
|
9
|
+
import './style/index.scss';
|
|
10
|
+
declare const DatePicker: import("react").ComponentClass<PickerProps<Moment>, any> & {
|
|
11
|
+
WeekPicker: import("react").ComponentClass<Omit<PickerDateProps<Moment>, "picker">, any>;
|
|
12
|
+
MonthPicker: import("react").ComponentClass<Omit<PickerDateProps<Moment>, "picker">, any>;
|
|
13
|
+
YearPicker: import("react").ComponentClass<Omit<PickerDateProps<Moment>, "picker">, any>;
|
|
14
|
+
RangePicker: import("react").ComponentClass<BaseRangePickerProps<Moment>, any>;
|
|
15
|
+
TimePicker: import("react").ComponentClass<Omit<import("./generatePicker").PickerTimeProps<Moment>, "picker">, any>;
|
|
16
|
+
QuarterPicker: import("react").ComponentClass<Omit<import("./generatePicker").PickerTimeProps<Moment>, "picker">, any>;
|
|
17
|
+
};
|
|
18
|
+
export default DatePicker;
|