@pointcloud/pcloud-components 0.1.17 → 0.1.19
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 +6 -2
- package/dist/esm/AdvancedFilter/interface.d.ts +4 -0
- package/dist/esm/AuthComponent/index.d.ts +2 -2
- package/dist/esm/AuthComponent/interface.d.ts +2 -1
- package/dist/esm/ConfigProvider/interface.d.ts +1 -1
- package/dist/esm/DForm/DItem/itemType.d.ts +5 -3
- package/dist/esm/DForm/DItem/itemsRender.d.ts +1 -1
- package/dist/esm/DForm/DItem/itemsRender.js +1 -1
- package/dist/esm/DForm/index.d.ts +2 -2
- package/dist/esm/DForm/index.js +35 -22
- package/dist/esm/DForm/index.less +14 -2
- package/dist/esm/DModal/index.d.ts +1 -0
- package/dist/esm/DModal/index.js +1 -0
- package/dist/esm/ErrorBoundary/index.d.ts +2 -2
- package/dist/esm/LabelValue/index.d.ts +2 -2
- package/dist/esm/LabelValue/interface.d.ts +3 -2
- package/dist/esm/Loading/index.d.ts +3 -3
- package/dist/esm/Loading/interface.d.ts +2 -1
- package/dist/esm/Loading/loading.js +0 -1
- package/dist/esm/ModalForm/index.d.ts +11 -0
- package/dist/esm/ModalForm/index.js +45 -0
- package/dist/esm/NoData/index.d.ts +2 -2
- package/dist/esm/NoData/interface.d.ts +2 -1
- package/dist/esm/WordCloud/index.d.ts +7 -0
- package/dist/esm/WordCloud/index.js +21 -0
- package/dist/esm/index.d.ts +10 -2
- 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 +100 -99
package/README.md
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# pcloud-components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
>) ?style=flat&logo=antdesign>)  ?style=flat&logo=webcomponentsdotorg>) ?style=flat>)
|
|
4
|
+
|
|
5
|
+
pcloud-components 是一套基于 Antd v4.24.x+ React v17.x 开发的业务组件库。
|
|
6
|
+
该项目已经发布到 Npm 仓库,可以直接使用, 点击[pcloud-components 地址](https://www.npmjs.com/package/@pointcloud/pcloud-components)访问。
|
|
4
7
|
|
|
5
8
|
## 项目初始化
|
|
6
9
|
|
|
7
10
|
```
|
|
8
11
|
// 拉取项目代码
|
|
12
|
+
示例:
|
|
9
13
|
git clone ssh://git@192.168.101.96:8092/pointcloud_frontend/basiclibrary/pcloud-components.git
|
|
10
14
|
|
|
11
15
|
// 安装依赖
|
|
@@ -13,7 +17,7 @@ cd pcloud-components
|
|
|
13
17
|
npm install
|
|
14
18
|
|
|
15
19
|
// 启动项目
|
|
16
|
-
npm start
|
|
20
|
+
npm start or npm run dev
|
|
17
21
|
```
|
|
18
22
|
|
|
19
23
|
## 项目结构
|
|
@@ -95,3 +95,7 @@ export interface FilterProps extends FormProps {
|
|
|
95
95
|
*/
|
|
96
96
|
icon?: React.ReactNode;
|
|
97
97
|
}
|
|
98
|
+
export declare type AdvancedFilterProps = FilterProps;
|
|
99
|
+
export declare type FormFilterProps = FProps;
|
|
100
|
+
export declare type FotmItemProps = FormItem;
|
|
101
|
+
export declare type InputSearchProps = InputProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
declare const AuthComponent: ({ value, noAuthContent, children, authList, fieldName }:
|
|
2
|
+
import { IAuthComponentProps } from './interface';
|
|
3
|
+
declare const AuthComponent: ({ value, noAuthContent, children, authList, fieldName }: IAuthComponentProps) => JSX.Element;
|
|
4
4
|
export default AuthComponent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface IAuthComponentProps {
|
|
3
3
|
/**
|
|
4
4
|
* @description 权限值
|
|
5
5
|
*/
|
|
@@ -21,3 +21,4 @@ export interface AuthComponentProps {
|
|
|
21
21
|
*/
|
|
22
22
|
children?: React.ReactNode;
|
|
23
23
|
}
|
|
24
|
+
export declare type AuthComponentProps = IAuthComponentProps;
|
|
@@ -8,4 +8,4 @@ export interface ConfigProviderProps {
|
|
|
8
8
|
getPrefixCls?: (componentName: string, customPrefix?: string) => string;
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare type OtherProps = Omit<ConfigProviderProps, '
|
|
11
|
+
export declare type OtherProps = Omit<ConfigProviderProps, 'children'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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 } from 'antd';
|
|
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
3
|
import { PasswordProps, TextAreaProps } from 'antd/lib/input';
|
|
4
4
|
import { RangePickerProps } from 'antd/lib/date-picker';
|
|
5
5
|
import { CheckboxGroupProps } from 'antd/lib/checkbox';
|
|
@@ -12,9 +12,11 @@ export declare type DItemBaseProps = {
|
|
|
12
12
|
/** label标签文本,同antd Form.Item的label,只能是string */
|
|
13
13
|
label?: string;
|
|
14
14
|
/** name标签文本,同antd Form.Item的name */
|
|
15
|
-
name?: string;
|
|
15
|
+
name?: string | number | (string | number)[];
|
|
16
16
|
/** Form.Item 的其他属性 */
|
|
17
|
-
formItemProps?: FormItemProps
|
|
17
|
+
formItemProps?: FormItemProps & {
|
|
18
|
+
grid?: Omit<ColProps, 'prefixCls'>;
|
|
19
|
+
};
|
|
18
20
|
};
|
|
19
21
|
/** 自定义渲染的DItem */
|
|
20
22
|
declare type CustomItemProps = DItemBaseProps & HTMLAttributes<HTMLElement> & {
|
|
@@ -33,7 +33,7 @@ declare const renderMap: {
|
|
|
33
33
|
rate: (props: RateProps, formItemProps: FormItemProps) => JSX.Element;
|
|
34
34
|
slider: (props: SliderSingleProps, formItemProps: FormItemProps) => JSX.Element;
|
|
35
35
|
switch: (props: SwitchProps, formItemProps: FormItemProps) => JSX.Element;
|
|
36
|
-
transfer: (props: TransferProps<any>, formItemProps: FormItemProps, render: TransferProps<any>['render']) => JSX.Element;
|
|
36
|
+
transfer: (props: TransferProps<any>, formItemProps: FormItemProps, label: DItemBaseProps['label'], render: TransferProps<any>['render']) => JSX.Element;
|
|
37
37
|
upload: (props: UploadProps, formItemProps: FormItemProps, label: DItemBaseProps['label'], render: () => void, children: UploadProps['children']) => JSX.Element;
|
|
38
38
|
dUpload: (props: DUploadProps, formItemProps: FormItemProps, render: (props: any) => ReactNode, children: DUploadProps['children']) => JSX.Element;
|
|
39
39
|
button: (props: ButtonProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => JSX.Element;
|
|
@@ -165,7 +165,7 @@ var renderMap = {
|
|
|
165
165
|
children: /*#__PURE__*/_jsx(Switch, _objectSpread({}, props))
|
|
166
166
|
}));
|
|
167
167
|
},
|
|
168
|
-
transfer: function transfer(props, formItemProps, render) {
|
|
168
|
+
transfer: function transfer(props, formItemProps, label, render) {
|
|
169
169
|
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemProps), {}, {
|
|
170
170
|
children: /*#__PURE__*/_jsx(Transfer, _objectSpread({
|
|
171
171
|
render: render
|
|
@@ -9,8 +9,8 @@ declare type InternalFormProps = {
|
|
|
9
9
|
defaultItemProps?: DItemProps;
|
|
10
10
|
/** children 方式添加表单项,如果同时设置了 items,则 children 在 items 下面 */
|
|
11
11
|
children?: ReactNode;
|
|
12
|
-
/** 布局方式 新增了行内垂直布局方式inlineVertical */
|
|
13
|
-
layout?: 'inline' | 'horizontal' | 'vertical' | 'inlineVertical';
|
|
12
|
+
/** 布局方式 新增了行内垂直布局方式inlineVertical 和 grid栅格布局 */
|
|
13
|
+
layout?: 'inline' | 'horizontal' | 'vertical' | 'inlineVertical' | 'grid';
|
|
14
14
|
};
|
|
15
15
|
declare type DFormProps = Omit<FormProps, 'children' | 'layout'> & InternalFormProps;
|
|
16
16
|
declare type DFormRefProps = {
|
package/dist/esm/DForm/index.js
CHANGED
|
@@ -2,16 +2,16 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
var _excluded = ["className", "defaultItemProps", "items", "children", "layout", "autoComplete"];
|
|
5
|
-
/*
|
|
6
|
-
* @Author : wangfeihu
|
|
7
|
-
* @Date : 2023-06-02 09:29:11
|
|
8
|
-
* @LastEditors : wangfeihu
|
|
9
|
-
* @LastEditTime : 2023-08-16 17:44:33
|
|
10
|
-
* @Description : 基于antd的Form组件
|
|
5
|
+
/*
|
|
6
|
+
* @Author : wangfeihu
|
|
7
|
+
* @Date : 2023-06-02 09:29:11
|
|
8
|
+
* @LastEditors : wangfeihu
|
|
9
|
+
* @LastEditTime : 2023-08-16 17:44:33
|
|
10
|
+
* @Description : 基于antd的Form组件
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import React, { forwardRef, useContext, useState, useEffect, useImperativeHandle } from 'react';
|
|
14
|
-
import { Form } from 'antd';
|
|
14
|
+
import { Form, Row, Col } from 'antd';
|
|
15
15
|
import { ConfigContext } from "../ConfigProvider";
|
|
16
16
|
import helper from "./helper";
|
|
17
17
|
import DItem from "./DItem";
|
|
@@ -19,13 +19,26 @@ import "./index.less";
|
|
|
19
19
|
|
|
20
20
|
// eslint-disable-next-line no-unused-vars
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
-
function getChildren(items, children, _defaultItemProps) {
|
|
22
|
+
function getChildren(items, children, _defaultItemProps, layout) {
|
|
23
23
|
var list = [];
|
|
24
24
|
if (items instanceof Array && items.length > 0) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
if (layout === 'grid') {
|
|
26
|
+
list.push( /*#__PURE__*/_jsx(Row, {
|
|
27
|
+
children: items.map(function (item, index) {
|
|
28
|
+
var _item$formItemProps;
|
|
29
|
+
var _item = helper.merge(_defaultItemProps, item);
|
|
30
|
+
var _gridProps = (_item === null || _item === void 0 ? void 0 : (_item$formItemProps = _item.formItemProps) === null || _item$formItemProps === void 0 ? void 0 : _item$formItemProps.grid) || {};
|
|
31
|
+
return /*#__PURE__*/_jsx(Col, _objectSpread(_objectSpread({}, _gridProps), {}, {
|
|
32
|
+
children: /*#__PURE__*/_jsx(DItem, _objectSpread({}, _item))
|
|
33
|
+
}), (item === null || item === void 0 ? void 0 : item.name) || index);
|
|
34
|
+
})
|
|
35
|
+
}));
|
|
36
|
+
} else {
|
|
37
|
+
list = items.map(function (item, index) {
|
|
38
|
+
var _item = helper.merge(_defaultItemProps, item);
|
|
39
|
+
return /*#__PURE__*/_jsx(DItem, _objectSpread({}, _item), (item === null || item === void 0 ? void 0 : item.name) || index);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
29
42
|
}
|
|
30
43
|
if (children) {
|
|
31
44
|
var childrenList = children instanceof Array ? children : [children];
|
|
@@ -44,34 +57,35 @@ function InternalForm(props, ref) {
|
|
|
44
57
|
defaultItemProps = props.defaultItemProps,
|
|
45
58
|
items = props.items,
|
|
46
59
|
children = props.children,
|
|
47
|
-
layout = props.layout,
|
|
60
|
+
_props$layout = props.layout,
|
|
61
|
+
layout = _props$layout === void 0 ? 'vertical' : _props$layout,
|
|
48
62
|
_props$autoComplete = props.autoComplete,
|
|
49
63
|
autoComplete = _props$autoComplete === void 0 ? 'off' : _props$autoComplete,
|
|
50
64
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
51
65
|
var _useContext = useContext(ConfigContext),
|
|
52
66
|
getPrefixCls = _useContext.getPrefixCls;
|
|
53
|
-
var _className = "".concat(getPrefixCls('form'), " ").concat(className, " ").concat(
|
|
54
|
-
var _layout =
|
|
55
|
-
var _useState = useState(getChildren(items, children, defaultItemProps)),
|
|
67
|
+
var _className = "".concat(getPrefixCls('form'), " ").concat(className, " ").concat(['inlineVertical', 'grid'].includes(layout) ? 'inlineVertical' : '');
|
|
68
|
+
var _layout = ['inlineVertical', 'grid'].includes(layout) ? 'inline' : layout;
|
|
69
|
+
var _useState = useState(getChildren(items, children, defaultItemProps, layout)),
|
|
56
70
|
_useState2 = _slicedToArray(_useState, 2),
|
|
57
71
|
itemChildren = _useState2[0],
|
|
58
72
|
setItemChildren = _useState2[1];
|
|
59
73
|
useEffect(function () {
|
|
60
|
-
setItemChildren(getChildren(items, children, defaultItemProps));
|
|
61
|
-
}, [items, children, defaultItemProps]);
|
|
74
|
+
setItemChildren(getChildren(items, children, defaultItemProps, layout));
|
|
75
|
+
}, [items, children, defaultItemProps, layout]);
|
|
62
76
|
useImperativeHandle(ref, function () {
|
|
63
77
|
return {
|
|
64
78
|
setItems: function setItems(value) {
|
|
65
79
|
if (value instanceof Array) {
|
|
66
|
-
setItemChildren(getChildren(value, null, defaultItemProps));
|
|
80
|
+
setItemChildren(getChildren(value, null, defaultItemProps, layout));
|
|
67
81
|
} else if (typeof value === 'function') {
|
|
68
82
|
var result = value(items || []);
|
|
69
83
|
if ('then' in result) {
|
|
70
84
|
result.then(function (list) {
|
|
71
|
-
setItemChildren(getChildren(list, null, defaultItemProps));
|
|
85
|
+
setItemChildren(getChildren(list, null, defaultItemProps, layout));
|
|
72
86
|
});
|
|
73
87
|
} else {
|
|
74
|
-
setItemChildren(getChildren(result, null, defaultItemProps));
|
|
88
|
+
setItemChildren(getChildren(result, null, defaultItemProps, layout));
|
|
75
89
|
}
|
|
76
90
|
}
|
|
77
91
|
}
|
|
@@ -94,6 +108,5 @@ DForm.ErrorList = Form.ErrorList;
|
|
|
94
108
|
DForm.useForm = Form.useForm;
|
|
95
109
|
DForm.useFormInstance = Form.useFormInstance;
|
|
96
110
|
DForm.useWatch = Form.useWatch;
|
|
97
|
-
DForm.useForm = Form.useForm;
|
|
98
111
|
export {};
|
|
99
112
|
export default DForm;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
@import '../commonStyle/index.less';
|
|
2
2
|
|
|
3
3
|
.@{prefix}-form {
|
|
4
|
-
.form-wrapper >
|
|
4
|
+
.form-wrapper > .ant-form-item {
|
|
5
5
|
min-height: 32px;
|
|
6
6
|
margin-right: 0;
|
|
7
7
|
margin-bottom: 24px;
|
|
8
|
-
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.form-wrapper > .ant-form-item:last-child {
|
|
11
|
+
margin-bottom: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ant-input-number,
|
|
15
|
+
.ant-picker {
|
|
16
|
+
width: 100%;
|
|
9
17
|
}
|
|
10
18
|
}
|
|
11
19
|
|
|
@@ -19,6 +27,10 @@
|
|
|
19
27
|
flex-wrap: wrap;
|
|
20
28
|
align-items: flex-end;
|
|
21
29
|
height: min-content;
|
|
30
|
+
|
|
31
|
+
> .ant-form-item {
|
|
32
|
+
padding-right: 16px;
|
|
33
|
+
}
|
|
22
34
|
}
|
|
23
35
|
|
|
24
36
|
.@{prefix}-form.ant-form-inline.inlineVertical {
|
|
@@ -9,6 +9,7 @@ declare namespace DModal {
|
|
|
9
9
|
export var error: import("antd/lib/modal/confirm").ModalFunc;
|
|
10
10
|
export var warning: import("antd/lib/modal/confirm").ModalFunc;
|
|
11
11
|
export var confirm: import("antd/lib/modal/confirm").ModalFunc;
|
|
12
|
+
export var destroyAll: () => void;
|
|
12
13
|
var _a: ({ content, onOk, onCancel, zIndex }: DeleteModalProps) => {
|
|
13
14
|
destroy: () => void;
|
|
14
15
|
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
package/dist/esm/DModal/index.js
CHANGED
|
@@ -56,6 +56,7 @@ DModal.success = Modal.success;
|
|
|
56
56
|
DModal.error = Modal.error;
|
|
57
57
|
DModal.warning = Modal.warning;
|
|
58
58
|
DModal.confirm = Modal.confirm;
|
|
59
|
+
DModal.destroyAll = Modal.destroyAll;
|
|
59
60
|
DModal.delete = function (_ref) {
|
|
60
61
|
var content = _ref.content,
|
|
61
62
|
onOk = _ref.onOk,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ILabelValueProps } from './interface';
|
|
3
3
|
import './styles/index.less';
|
|
4
|
-
declare function LabelValue({ label, value, emptyValue, className, noWrap, noColon }:
|
|
4
|
+
declare function LabelValue({ label, value, emptyValue, className, noWrap, noColon }: ILabelValueProps): JSX.Element;
|
|
5
5
|
declare namespace LabelValue {
|
|
6
6
|
var defaultProps: {
|
|
7
7
|
className: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ILabelValueProps {
|
|
2
2
|
/**
|
|
3
3
|
* @description 文字标签
|
|
4
4
|
*/
|
|
@@ -6,7 +6,7 @@ export interface LabelValueProps {
|
|
|
6
6
|
/**
|
|
7
7
|
* @description 文字标签值
|
|
8
8
|
*/
|
|
9
|
-
value?: string | undefined
|
|
9
|
+
value?: string | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* @description 文字标签值为空时的值
|
|
12
12
|
* @default -
|
|
@@ -27,3 +27,4 @@ export interface LabelValueProps {
|
|
|
27
27
|
*/
|
|
28
28
|
noColon?: boolean;
|
|
29
29
|
}
|
|
30
|
+
export declare type LabelValueProps = ILabelValueProps;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Loading from './loading';
|
|
2
|
-
import {
|
|
2
|
+
import { ILoadingProps, LoadingInstanceProps } from './interface';
|
|
3
3
|
declare const _default: {
|
|
4
|
-
open(params?: LoadingInstanceProps):
|
|
4
|
+
open(params?: LoadingInstanceProps): ILoadingProps;
|
|
5
5
|
close(): void;
|
|
6
|
-
getInstance():
|
|
6
|
+
getInstance(): ILoadingProps;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export { Loading };
|
|
@@ -7,8 +7,9 @@ export interface LoadingInstanceProps extends SpinProps {
|
|
|
7
7
|
*/
|
|
8
8
|
container?: ReactInstance | undefined;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface ILoadingProps {
|
|
11
11
|
open: (param: LoadingInstanceProps) => React.ReactDOM;
|
|
12
12
|
close: () => void;
|
|
13
13
|
getInstance: () => React.ReactDOM;
|
|
14
14
|
}
|
|
15
|
+
export declare type LoadingProps = ILoadingProps;
|
|
@@ -10,7 +10,6 @@ import { ConfigContext } from "../ConfigProvider";
|
|
|
10
10
|
import "./styles/index.less";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
var parentElement;
|
|
14
13
|
function Loading(props) {
|
|
15
14
|
var _props$tip = props.tip,
|
|
16
15
|
tip = _props$tip === void 0 ? '数据请求中...' : _props$tip;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DFormProps, DModalProps } from "./..";
|
|
3
|
+
export declare type ModalFormProps = {
|
|
4
|
+
modalProps: DModalProps & {
|
|
5
|
+
width?: number;
|
|
6
|
+
};
|
|
7
|
+
formProps: DFormProps;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: (props: ModalFormProps) => JSX.Element;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import { DForm, DModal } from "./..";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
export default (function (props) {
|
|
7
|
+
var _props$modalProps = props.modalProps,
|
|
8
|
+
modalProps = _props$modalProps === void 0 ? {} : _props$modalProps,
|
|
9
|
+
formProps = props.formProps,
|
|
10
|
+
children = props.children;
|
|
11
|
+
var _ref = modalProps || {},
|
|
12
|
+
open = _ref.open,
|
|
13
|
+
onOk = _ref.onOk;
|
|
14
|
+
var _DForm$useForm = DForm.useForm(),
|
|
15
|
+
_DForm$useForm2 = _slicedToArray(_DForm$useForm, 1),
|
|
16
|
+
form = _DForm$useForm2[0];
|
|
17
|
+
var modalFooter = !!(formProps !== null && formProps !== void 0 && formProps.disabled) ? {
|
|
18
|
+
footer: null
|
|
19
|
+
} : {};
|
|
20
|
+
var handleOk = function handleOk() {
|
|
21
|
+
form.validateFields().then(function (values) {
|
|
22
|
+
onOk === null || onOk === void 0 ? void 0 : onOk(values);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/_jsxs(DModal, _objectSpread(_objectSpread(_objectSpread({
|
|
26
|
+
open: open,
|
|
27
|
+
style: {
|
|
28
|
+
height: 'auto'
|
|
29
|
+
},
|
|
30
|
+
centered: true,
|
|
31
|
+
destroyOnClose: true,
|
|
32
|
+
okText: "\u786E\u5B9A",
|
|
33
|
+
cancelText: "\u53D6\u6D88",
|
|
34
|
+
bodyStyle: {
|
|
35
|
+
maxHeight: '600px',
|
|
36
|
+
overflowY: 'auto'
|
|
37
|
+
}
|
|
38
|
+
}, modalFooter), _objectSpread(_objectSpread({}, modalProps), {}, {
|
|
39
|
+
onOk: handleOk
|
|
40
|
+
})), {}, {
|
|
41
|
+
children: [children, /*#__PURE__*/_jsx(DForm, _objectSpread(_objectSpread({}, formProps), {}, {
|
|
42
|
+
form: form
|
|
43
|
+
}))]
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { INoDataProps } from './interface';
|
|
3
3
|
import './styles/index.less';
|
|
4
|
-
declare const NoData: (props:
|
|
4
|
+
declare const NoData: (props: INoDataProps) => JSX.Element;
|
|
5
5
|
export default NoData;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import { useContext } from 'react';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import ReactWordcloud from 'react-wordcloud';
|
|
6
|
+
import { ConfigContext } from "../ConfigProvider";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
var WordCloud = function WordCloud(props) {
|
|
9
|
+
var _props$className = props.className,
|
|
10
|
+
className = _props$className === void 0 ? '' : _props$className;
|
|
11
|
+
var _useContext = useContext(ConfigContext),
|
|
12
|
+
prefixCls = _useContext.prefixCls,
|
|
13
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
14
|
+
var classname = getPrefixCls('word-cloud');
|
|
15
|
+
var wrapperClass = classNames(_defineProperty({}, "".concat(prefixCls, "-word-cloud"), !!prefixCls), classname, className);
|
|
16
|
+
return /*#__PURE__*/_jsx("div", {
|
|
17
|
+
className: wrapperClass,
|
|
18
|
+
children: /*#__PURE__*/_jsx(ReactWordcloud, _objectSpread({}, props))
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
export default WordCloud;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export { default as LabelValue } from './LabelValue';
|
|
2
|
+
export type { LabelValueProps } from './LabelValue/interface';
|
|
2
3
|
export { default as AdvancedFilter } from './AdvancedFilter';
|
|
4
|
+
export type { AdvancedFilterProps, FormFilterProps, FotmItemProps, InputSearchProps } from './AdvancedFilter/interface';
|
|
3
5
|
export { default as AuthComponent } from './AuthComponent';
|
|
4
|
-
export type {
|
|
6
|
+
export type { AuthComponentProps } from './AuthComponent/interface';
|
|
5
7
|
export { default as ErrorBoundary } from './ErrorBoundary';
|
|
6
8
|
export { default as ConfigProvider } from './ConfigProvider';
|
|
7
9
|
export { default as Loading } from './Loading';
|
|
10
|
+
export type { LoadingProps } from './Loading/interface';
|
|
8
11
|
export { default as NoData } from './NoData';
|
|
12
|
+
export type { NoDataProps } from './NoData/interface';
|
|
9
13
|
export type { DInputProps } from './DInput';
|
|
10
14
|
export { default as DInput } from './DInput';
|
|
11
15
|
export type { DSelectProps } from './DSelect';
|
|
@@ -20,9 +24,13 @@ export type { DColumnType, DTableProps, DTableSourceProps, TableParamsProps } fr
|
|
|
20
24
|
export { default as DTable } from './DTable';
|
|
21
25
|
export type { DFormProps, DFormRefProps, DItemProps } from './DForm';
|
|
22
26
|
export { default as DForm } from './DForm';
|
|
23
|
-
export type { DModalProps } from './DModal/interface';
|
|
24
27
|
export { default as DModal } from './DModal';
|
|
28
|
+
export type { DModalProps } from './DModal/interface';
|
|
29
|
+
export { default as ModalForm } from './ModalForm';
|
|
30
|
+
export type { ModalFormProps } from './ModalForm';
|
|
25
31
|
export { default as ColorPicker } from './ColorPicker';
|
|
26
32
|
export type { ColorPickerType, TwitterPickerType, HuePickerType, AlphaPickerType, BlockPickerType, ChromePickerType, CompactPickerType, CirclePickerType, SliderPickerType, } from './ColorPicker/interface';
|
|
27
33
|
export { default as ScrollNumber } from './ScrollNumber';
|
|
28
34
|
export type { ScrollNumberProps } from './ScrollNumber';
|
|
35
|
+
export type { WordCloudProps } from './WordCloud';
|
|
36
|
+
export { default as WordCloud } from './WordCloud';
|
package/dist/esm/index.js
CHANGED
|
@@ -13,5 +13,7 @@ export { default as DUpload } from "./DUpload";
|
|
|
13
13
|
export { default as DTable } from "./DTable";
|
|
14
14
|
export { default as DForm } from "./DForm";
|
|
15
15
|
export { default as DModal } from "./DModal";
|
|
16
|
+
export { default as ModalForm } from "./ModalForm";
|
|
16
17
|
export { default as ColorPicker } from "./ColorPicker";
|
|
17
|
-
export { default as ScrollNumber } from "./ScrollNumber";
|
|
18
|
+
export { default as ScrollNumber } from "./ScrollNumber";
|
|
19
|
+
export { default as WordCloud } from "./WordCloud";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pui-label-value{display:inline-flex}.pui-label-value span:first-child{max-width:120px;padding-right:4px;white-space:nowrap}.pui-label-value span:last-child{flex:1 1}.pui-label-value span:last-child.no-wrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pui-search-filter{align-items:center;background-color:#fff;margin-top:10px;width:100%}.pui-search-filter span.ant-collapse-header-text{cursor:auto!important;display:inline-block;width:100%}.pui-search-filter .ant-collapse-content-box{padding:0}.pui-search-filter .search-header{display:flex;width:100%}.pui-search-filter .search-header .left{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:no-wrap}.pui-search-filter .search-header .left :global .ant-radio-wrapper:first-child{border-left:1px solid #d9d9d9;border-radius:5px 0 0 5px}.pui-search-filter .search-header .left :global .ant-radio-wrapper:last-child{border-radius:0 5px 5px 0}.pui-search-filter .search-header .left :global .ant-radio-wrapper{border:1px solid #d9d9d9;border-left-color:#fff;margin-right:0;padding:4px 6px}.pui-search-filter .search-header .left :global .ant-radio-wrapper .ant-radio{display:none}.pui-search-filter .search-header .left :global .ant-radio-wrapper:hover{color:#1890ff}.pui-search-filter .search-header .left :global .ant-radio-wrapper-checked{background:#fff;border:1px solid #1890ff;border-left:1px solid #1890ff!important;color:#1890ff;z-index:1}.pui-search-filter .search-header .right{display:flex;justify-content:center}.pui-search-filter .search-header .right .input{border-radius:4px;width:200px}.pui-search-filter .search-header .right .button{background-color:#ff7e00;border-radius:4px;color:#fff;margin-left:10px}.pui-search-filter .search-header .right .button:active,.pui-search-filter .search-header .right .button:focus,.pui-search-filter .search-header .right .button:hover{border-color:transparent}.pui-search-filter .search-header .right .button .icon{margin-left:8px;transition:transform .4s}.pui-search-filter .search-header .right .button .icon.down{transform:rotate(180deg)}.pui-search-filter .search-header .right .button .icon.up{transform:rotate(0deg)}.pui-search-filter .title{align-items:center;border-bottom:1px solid #f0f0f0;display:flex;font-weight:700;margin:0 10px;padding-bottom:10px}.pui-search-filter .title span.icon{background-color:#ff7e00;border-radius:2px;height:16px;margin-right:6px;width:4px}.pui-search-filter .search-content .filter-row{display:flex;flex-wrap:wrap;padding:10px;width:100%}.pui-search-filter .search-content .filter-col{height:30px;line-height:30px;margin-bottom:10px}.pui-search-filter .search-content .filter-col .ant-picker{width:100%}.pui-search-filter .search-content .search-btn{justify-content:center}.pui-search-filter .search-content .search-btn>button{margin:0 5px}.pui-error-boundary{align-items:center;background-color:#dd7f7f;border-radius:10px;display:flex;flex-direction:column;justify-content:center;margin:20px;padding:15px;width:auto}.pui-error-boundary .error-text{margin-top:20px}.pui-error-boundary .error-refresh{background-color:#4593ef;border-radius:5px;color:#fff;cursor:pointer;font-weight:700;height:40px;line-height:40px;text-align:center;width:140px}.pui-error-boundary .errorDetiles .detilesLink{color:blue}.pui-error-boundary .errorDetiles .errordetails{background-color:#ccc6be;border:1px solid #777;border-radius:5px;color:#777;font-size:80%;padding:10px}.pui-loading .mask{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:100000}.pui-loading .loading{background:#fff;border-radius:10px;box-shadow:3px 3px 3px rgba(0,0,0,.2);padding:20px;z-index:100001}.pui-loading .loading,.pui-nodata{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.pui-nodata .not-data-image{display:block;height:100px}.pui-nodata .no-data-text{color:#000;display:inline-block;font-size:14px;font-weight:400;margin-top:5px;opacity:.65;text-align:center;width:100%}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar{height:8px;width:8px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.5);border-radius:8px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-track{border-radius:2px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-corner{background-color:#f1f1f1}.pui-tree-select-dropdown .ant-select-tree-node-content-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pui-tree-select-dropdown .ant-select-tree-node-content-wrapper .ant-select-tree-title{overflow:hidden}.pui-upload .preview .ant-upload-list-item-actions a[target=_blank][rel="noopener noreferrer"]{opacity:1!important;pointer-events:auto!important}.pui-upload .ant-upload-list.ant-upload-list-picture-card .ant-upload-span .ant-upload-list-item-thumbnail{height:46px}.pui-upload .ant-upload-list.ant-upload-list-picture-card .ant-upload-span .ant-upload-list-item-name{display:inline;display:initial;position:absolute}.pui-table .ant-spin-container,.pui-table .ant-spin-nested-loading,.pui-table .ant-table,.pui-table .ant-table-container{height:100%;width:100%}.pui-table .ant-table-body{max-height:calc(100% - 56px);max-width:100%;min-height:calc(100% - 56px);min-width:100%;overflow-y:auto!important;position:absolute}.pui-table .ant-table-body .ant-table-tbody>tr>td.ant-table-cell.d-table-cell-wrap{white-space:normal}.pui-table .ant-table-body::-webkit-scrollbar{height:8px;width:4px}.pui-table .ant-table-body::-webkit-scrollbar-thumb{background-color:#0084ff}.pui-table .ant-table-body::-webkit-scrollbar-track{background-color:#f1f1f1;border-radius:2px}.pui-table .ant-table-body::-webkit-scrollbar-corner{background-color:#f1f1f1}.pui-table .ant-spin-nested-loading>div>.ant-spin{max-height:none}.pui-table .ant-pagination-total-text span{color:#40a9ff;font-weight:700}.pui-table.height-on-page .ant-table{height:calc(100% - 56px)}.pui-form .form-wrapper
|
|
1
|
+
.pui-label-value{display:inline-flex}.pui-label-value span:first-child{max-width:120px;padding-right:4px;white-space:nowrap}.pui-label-value span:last-child{flex:1 1}.pui-label-value span:last-child.no-wrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pui-search-filter{align-items:center;background-color:#fff;margin-top:10px;width:100%}.pui-search-filter span.ant-collapse-header-text{cursor:auto!important;display:inline-block;width:100%}.pui-search-filter .ant-collapse-content-box{padding:0}.pui-search-filter .search-header{display:flex;width:100%}.pui-search-filter .search-header .left{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:no-wrap}.pui-search-filter .search-header .left :global .ant-radio-wrapper:first-child{border-left:1px solid #d9d9d9;border-radius:5px 0 0 5px}.pui-search-filter .search-header .left :global .ant-radio-wrapper:last-child{border-radius:0 5px 5px 0}.pui-search-filter .search-header .left :global .ant-radio-wrapper{border:1px solid #d9d9d9;border-left-color:#fff;margin-right:0;padding:4px 6px}.pui-search-filter .search-header .left :global .ant-radio-wrapper .ant-radio{display:none}.pui-search-filter .search-header .left :global .ant-radio-wrapper:hover{color:#1890ff}.pui-search-filter .search-header .left :global .ant-radio-wrapper-checked{background:#fff;border:1px solid #1890ff;border-left:1px solid #1890ff!important;color:#1890ff;z-index:1}.pui-search-filter .search-header .right{display:flex;justify-content:center}.pui-search-filter .search-header .right .input{border-radius:4px;width:200px}.pui-search-filter .search-header .right .button{background-color:#ff7e00;border-radius:4px;color:#fff;margin-left:10px}.pui-search-filter .search-header .right .button:active,.pui-search-filter .search-header .right .button:focus,.pui-search-filter .search-header .right .button:hover{border-color:transparent}.pui-search-filter .search-header .right .button .icon{margin-left:8px;transition:transform .4s}.pui-search-filter .search-header .right .button .icon.down{transform:rotate(180deg)}.pui-search-filter .search-header .right .button .icon.up{transform:rotate(0deg)}.pui-search-filter .title{align-items:center;border-bottom:1px solid #f0f0f0;display:flex;font-weight:700;margin:0 10px;padding-bottom:10px}.pui-search-filter .title span.icon{background-color:#ff7e00;border-radius:2px;height:16px;margin-right:6px;width:4px}.pui-search-filter .search-content .filter-row{display:flex;flex-wrap:wrap;padding:10px;width:100%}.pui-search-filter .search-content .filter-col{height:30px;line-height:30px;margin-bottom:10px}.pui-search-filter .search-content .filter-col .ant-picker{width:100%}.pui-search-filter .search-content .search-btn{justify-content:center}.pui-search-filter .search-content .search-btn>button{margin:0 5px}.pui-error-boundary{align-items:center;background-color:#dd7f7f;border-radius:10px;display:flex;flex-direction:column;justify-content:center;margin:20px;padding:15px;width:auto}.pui-error-boundary .error-text{margin-top:20px}.pui-error-boundary .error-refresh{background-color:#4593ef;border-radius:5px;color:#fff;cursor:pointer;font-weight:700;height:40px;line-height:40px;text-align:center;width:140px}.pui-error-boundary .errorDetiles .detilesLink{color:blue}.pui-error-boundary .errorDetiles .errordetails{background-color:#ccc6be;border:1px solid #777;border-radius:5px;color:#777;font-size:80%;padding:10px}.pui-loading .mask{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:100000}.pui-loading .loading{background:#fff;border-radius:10px;box-shadow:3px 3px 3px rgba(0,0,0,.2);padding:20px;z-index:100001}.pui-loading .loading,.pui-nodata{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.pui-nodata .not-data-image{display:block;height:100px}.pui-nodata .no-data-text{color:#000;display:inline-block;font-size:14px;font-weight:400;margin-top:5px;opacity:.65;text-align:center;width:100%}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar{height:8px;width:8px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.5);border-radius:8px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-track{border-radius:2px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-corner{background-color:#f1f1f1}.pui-tree-select-dropdown .ant-select-tree-node-content-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pui-tree-select-dropdown .ant-select-tree-node-content-wrapper .ant-select-tree-title{overflow:hidden}.pui-upload .preview .ant-upload-list-item-actions a[target=_blank][rel="noopener noreferrer"]{opacity:1!important;pointer-events:auto!important}.pui-upload .ant-upload-list.ant-upload-list-picture-card .ant-upload-span .ant-upload-list-item-thumbnail{height:46px}.pui-upload .ant-upload-list.ant-upload-list-picture-card .ant-upload-span .ant-upload-list-item-name{display:inline;display:initial;position:absolute}.pui-table .ant-spin-container,.pui-table .ant-spin-nested-loading,.pui-table .ant-table,.pui-table .ant-table-container{height:100%;width:100%}.pui-table .ant-table-body{max-height:calc(100% - 56px);max-width:100%;min-height:calc(100% - 56px);min-width:100%;overflow-y:auto!important;position:absolute}.pui-table .ant-table-body .ant-table-tbody>tr>td.ant-table-cell.d-table-cell-wrap{white-space:normal}.pui-table .ant-table-body::-webkit-scrollbar{height:8px;width:4px}.pui-table .ant-table-body::-webkit-scrollbar-thumb{background-color:#0084ff}.pui-table .ant-table-body::-webkit-scrollbar-track{background-color:#f1f1f1;border-radius:2px}.pui-table .ant-table-body::-webkit-scrollbar-corner{background-color:#f1f1f1}.pui-table .ant-spin-nested-loading>div>.ant-spin{max-height:none}.pui-table .ant-pagination-total-text span{color:#40a9ff;font-weight:700}.pui-table.height-on-page .ant-table{height:calc(100% - 56px)}.pui-form .form-wrapper>.ant-form-item{margin-bottom:24px;margin-right:0;min-height:32px}.pui-form .form-wrapper>.ant-form-item:last-child{margin-bottom:0}.pui-form .ant-input-number,.pui-form .ant-picker{width:100%}.pui-form.ant-form-horizontal .ant-form-item-label{min-width:80px}.pui-form.ant-form-inline .form-wrapper,.pui-form.ant-form-inline.inlineVertical .form-wrapper{align-items:flex-end;display:flex;flex-wrap:wrap;height:min-content}.pui-form.ant-form-inline .form-wrapper>.ant-form-item,.pui-form.ant-form-inline.inlineVertical .form-wrapper>.ant-form-item{padding-right:16px}.pui-form.ant-form-inline.inlineVertical .ant-form-item-row{flex-direction:column}.pui-form.ant-form-inline.inlineVertical .ant-form-item-row .ant-form-item-label{text-align:left}.pui-modal-container .ant-modal-wrap .ant-modal{height:100%;max-width:none}.pui-modal-container .ant-modal-wrap .ant-modal .ant-modal-content{height:100%;width:100%}.pui-absolute-modal-container .ant-modal-wrap{position:fixed}.pui-relative-modal-container .ant-modal-wrap{position:absolute}.pui-color-picker .sketch-picker{box-shadow:none!important;padding:0!important}.trigger{border:5px solid #fff;border-radius:2px;box-shadow:0 0 2px #000;cursor:pointer;display:inline-block;height:26px;width:60px}
|