@arim-aisdc/public-components 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/styles/custom-dark.css +1 -1
- package/dist/assets/styles/custom-light.css +1 -1
- package/dist/components/BaseInfo/BaseInfo.d.ts +34 -0
- package/dist/components/BaseInfo/BaseInfo.js +72 -0
- package/dist/components/BaseInfo/index.d.ts +4 -0
- package/dist/components/BaseInfo/index.js +3 -0
- package/dist/components/BaseInfo/index.less +96 -0
- package/dist/components/BaseInfo/type.d.ts +18 -0
- package/dist/components/BaseInfo/type.js +1 -0
- package/dist/components/CenterModal/CenterModal.d.ts +2 -2
- package/dist/components/CenterModal/CenterModal.js +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.js +2 -2
- package/dist/components/CustomForm/CustomForm.js +10 -9
- package/dist/components/DraggableBox/DraggableBox.d.ts +5 -0
- package/dist/components/DraggableBox/DraggableBox.js +42 -0
- package/dist/components/DraggableBox/index.d.ts +3 -0
- package/dist/components/DraggableBox/index.js +2 -0
- package/dist/components/DraggableBox/index.less +27 -0
- package/dist/components/DraggableBox/type.d.ts +21 -0
- package/dist/components/DraggableBox/type.js +1 -0
- package/dist/components/GlobalTip/MessageTip/MessageTip.d.ts +9 -0
- package/dist/components/GlobalTip/MessageTip/MessageTip.js +69 -0
- package/dist/components/GlobalTip/MessageTip/index.d.ts +3 -0
- package/dist/components/GlobalTip/MessageTip/index.js +2 -0
- package/dist/components/GlobalTip/MessageTip/type.d.ts +13 -0
- package/dist/components/GlobalTip/MessageTip/type.js +1 -0
- package/dist/components/GlobalTip/ModalTip/ModalTip.d.ts +12 -0
- package/dist/components/GlobalTip/ModalTip/ModalTip.js +184 -0
- package/dist/components/GlobalTip/ModalTip/index.d.ts +4 -0
- package/dist/components/GlobalTip/ModalTip/index.js +3 -0
- package/dist/components/GlobalTip/ModalTip/index.less +42 -0
- package/dist/components/GlobalTip/ModalTip/type.d.ts +21 -0
- package/dist/components/GlobalTip/ModalTip/type.js +1 -0
- package/dist/components/GlobalTip/ModalTip/utils.d.ts +5 -0
- package/dist/components/GlobalTip/ModalTip/utils.js +32 -0
- package/dist/components/Permission/Context/Context.d.ts +4 -0
- package/dist/components/Permission/Context/Context.js +13 -0
- package/dist/components/Permission/Context/index.d.ts +3 -0
- package/dist/components/Permission/Context/index.js +2 -0
- package/dist/components/Permission/Context/type.d.ts +4 -0
- package/dist/components/Permission/Context/type.js +1 -0
- package/dist/components/Permission/NoPermission.d.ts +3 -0
- package/dist/components/Permission/NoPermission.js +22 -0
- package/dist/components/Permission/Provider/Provider.d.ts +4 -0
- package/dist/components/Permission/Provider/Provider.js +26 -0
- package/dist/components/Permission/Provider/index.d.ts +3 -0
- package/dist/components/Permission/Provider/index.js +2 -0
- package/dist/components/Permission/Provider/type.d.ts +6 -0
- package/dist/components/Permission/Provider/type.js +1 -0
- package/dist/components/Permission/Restricted/Restricted.d.ts +4 -0
- package/dist/components/Permission/Restricted/Restricted.js +26 -0
- package/dist/components/Permission/Restricted/index.d.ts +3 -0
- package/dist/components/Permission/Restricted/index.js +2 -0
- package/dist/components/Permission/Restricted/type.d.ts +6 -0
- package/dist/components/Permission/Restricted/type.js +1 -0
- package/dist/components/QueryFilter/QueryFilter.js +10 -8
- package/dist/components/SplitPane/SplitPane.js +4 -4
- package/dist/components/SplitPane/config.js +3 -4
- package/dist/components/TableMax/TableBody/Row.js +2 -2
- package/dist/components/TableMax/TableHeader/Cell.js +2 -2
- package/dist/components/TableMax/TableHeader/index.js +2 -2
- package/dist/components/TableMax/TableHeader/index.less +8 -8
- package/dist/components/TableMax/TableHeader/utils.js +0 -2
- package/dist/components/TableMax/TableMax.js +2 -2
- package/dist/components/TableMax/components/ColumnEdit/index.less +3 -21
- package/dist/components/TableMax/components/ColumnFilter/index.d.ts +7 -7
- package/dist/components/TableMax/components/ColumnFilter/index.js +3 -4
- package/dist/components/TableMax/components/ColumnSetting/index.less +2 -2
- package/dist/components/TableMax/components/ColumnSort/customSortFns.js +0 -1
- package/dist/components/TableMax/components/CustomDragerLayer/index.js +2 -2
- package/dist/components/TableMax/tableMax.less +1 -1
- package/dist/components/TableMax/utils.js +2 -2
- package/dist/hooks/useEventBus.js +2 -2
- package/dist/hooks/usePageCacheState.js +3 -4
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/themes/chartTheme.d.ts +147 -0
- package/dist/themes/chartTheme.js +150 -0
- package/dist/themes/custom-dark.css +8 -1
- package/dist/themes/custom-light.css +8 -1
- package/dist/themes/variables.less +0 -4
- package/dist/themes/variablesConfig.d.ts +1 -1
- package/dist/themes/variablesConfig.js +2 -7
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +9 -1
- package/package.json +2 -2
|
@@ -18260,7 +18260,7 @@ textarea.custom-dark-mentions {
|
|
|
18260
18260
|
content: '';
|
|
18261
18261
|
}
|
|
18262
18262
|
.custom-dark-modal-confirm-body .custom-dark-modal-confirm-title {
|
|
18263
|
-
display: block;
|
|
18263
|
+
/* display: block; */
|
|
18264
18264
|
overflow: hidden;
|
|
18265
18265
|
color: rgba(255, 255, 255, 0.85);
|
|
18266
18266
|
font-weight: 500;
|
|
@@ -18200,7 +18200,7 @@ textarea.custom-light-mentions {
|
|
|
18200
18200
|
content: '';
|
|
18201
18201
|
}
|
|
18202
18202
|
.custom-light-modal-confirm-body .custom-light-modal-confirm-title {
|
|
18203
|
-
display: block;
|
|
18203
|
+
/* display: block; */
|
|
18204
18204
|
overflow: hidden;
|
|
18205
18205
|
color: rgba(0, 0, 0, 0.85);
|
|
18206
18206
|
font-weight: 500;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { BaseInfoFieldType } from './type';
|
|
4
|
+
export type baseInfoProps = {
|
|
5
|
+
title?: string | ReactNode;
|
|
6
|
+
datas: BaseInfoFieldType[];
|
|
7
|
+
col: number;
|
|
8
|
+
renderLeft?: ReactNode;
|
|
9
|
+
customStyles?: {
|
|
10
|
+
[key in string]: any;
|
|
11
|
+
};
|
|
12
|
+
itemSpace?: number;
|
|
13
|
+
align?: string;
|
|
14
|
+
};
|
|
15
|
+
/**格式化数据 */
|
|
16
|
+
export declare const foramtBaseInfoField: (data: any, dataField: BaseInfoFieldType[]) => {
|
|
17
|
+
value: any;
|
|
18
|
+
field: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
text: string | Element | JSX.Element;
|
|
21
|
+
units?: string;
|
|
22
|
+
width?: string;
|
|
23
|
+
labelWidth?: string;
|
|
24
|
+
color?: string;
|
|
25
|
+
disabledColor?: string;
|
|
26
|
+
formatFun?: (field: string, data: any) => void;
|
|
27
|
+
detail?: object;
|
|
28
|
+
isShowInterval?: boolean;
|
|
29
|
+
isActiveTrigger?: boolean;
|
|
30
|
+
activeTriggerFun?: any;
|
|
31
|
+
isShowToolTip?: boolean;
|
|
32
|
+
}[];
|
|
33
|
+
declare const _default: React.NamedExoticComponent<baseInfoProps>;
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import "antd/es/tooltip/style";
|
|
2
|
+
import _Tooltip from "antd/es/tooltip";
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import "./index.less";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
/**格式化数据 */
|
|
15
|
+
export var foramtBaseInfoField = function foramtBaseInfoField(data, dataField) {
|
|
16
|
+
return data && dataField.map(function (t) {
|
|
17
|
+
var value = t.formatFun ? t.formatFun(data === null || data === void 0 ? void 0 : data[t.field], data) : data === null || data === void 0 ? void 0 : data[t.field];
|
|
18
|
+
return _objectSpread(_objectSpread({}, t), {}, {
|
|
19
|
+
value: value
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
var BaseInfo = function BaseInfo(_ref) {
|
|
24
|
+
var datas = _ref.datas,
|
|
25
|
+
title = _ref.title,
|
|
26
|
+
col = _ref.col,
|
|
27
|
+
renderLeft = _ref.renderLeft,
|
|
28
|
+
customStyles = _ref.customStyles,
|
|
29
|
+
_ref$align = _ref.align,
|
|
30
|
+
align = _ref$align === void 0 ? 'left' : _ref$align;
|
|
31
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
32
|
+
className: "baseInfoContainer ".concat(align),
|
|
33
|
+
style: customStyles,
|
|
34
|
+
children: [(title || renderLeft) && /*#__PURE__*/_jsxs("div", {
|
|
35
|
+
className: "baseInfoTitle ".concat(align),
|
|
36
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
37
|
+
children: title
|
|
38
|
+
}), renderLeft ? renderLeft : '']
|
|
39
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
40
|
+
className: "baseInfoContent",
|
|
41
|
+
children: datas === null || datas === void 0 ? void 0 : datas.map(function (el, i) {
|
|
42
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
43
|
+
className: "baseInfoRow ".concat(align),
|
|
44
|
+
style: {
|
|
45
|
+
width: el.width ? el.width : "".concat(100 / col, "%")
|
|
46
|
+
},
|
|
47
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
48
|
+
className: 'baseInfoLabel',
|
|
49
|
+
style: {
|
|
50
|
+
width: el.labelWidth ? el.labelWidth : ''
|
|
51
|
+
},
|
|
52
|
+
children: typeof el.text === 'string' ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
53
|
+
children: [el.text, ":"]
|
|
54
|
+
}) : /*#__PURE__*/_jsxs(React.Fragment, {
|
|
55
|
+
children: [el.text, "\uFF1A"]
|
|
56
|
+
})
|
|
57
|
+
}), !el.isShowToolTip && /*#__PURE__*/_jsxs("div", {
|
|
58
|
+
className: "baseInfoValue ".concat(align),
|
|
59
|
+
children: [el.value, el.value || el.value === 0 ? el === null || el === void 0 ? void 0 : el.units : '']
|
|
60
|
+
}), el.isShowToolTip && /*#__PURE__*/_jsx(_Tooltip, {
|
|
61
|
+
title: "".concat(el.value, " ").concat((el === null || el === void 0 ? void 0 : el.units) || ''),
|
|
62
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
63
|
+
className: "baseInfoValue ".concat(align, " overflow_hiding"),
|
|
64
|
+
children: [el.value, el.value || el.value === 0 ? el === null || el === void 0 ? void 0 : el.units : '']
|
|
65
|
+
})
|
|
66
|
+
})]
|
|
67
|
+
}, "".concat(i, "-base"));
|
|
68
|
+
})
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
export default /*#__PURE__*/React.memo(BaseInfo);
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
.baseInfoContainer {
|
|
2
|
+
width: 100%;
|
|
3
|
+
padding-bottom: 12px;
|
|
4
|
+
// border-bottom: 1px solid rgba(240, 239, 240, 1);
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
background: @globalColor7;
|
|
7
|
+
align-items: center;
|
|
8
|
+
|
|
9
|
+
&.top {
|
|
10
|
+
padding-bottom: 6px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.baseInfoTitle {
|
|
15
|
+
font-size: 16px;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
letter-spacing: 0px;
|
|
18
|
+
// line-height: 38px;
|
|
19
|
+
text-align: left;
|
|
20
|
+
vertical-align: top;
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
align-items: center;
|
|
24
|
+
color: @globalColor1;
|
|
25
|
+
line-height: 24px;
|
|
26
|
+
|
|
27
|
+
&.top {
|
|
28
|
+
margin-bottom: 12px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// margin-bottom: 12px;
|
|
32
|
+
|
|
33
|
+
>div {
|
|
34
|
+
font-size: 16px;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.baseInfoContent {
|
|
40
|
+
width: 100%;
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: flex-start;
|
|
43
|
+
align-items: center;
|
|
44
|
+
flex-wrap: wrap;
|
|
45
|
+
background: @globalColor7;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.baseInfoRow {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: row;
|
|
51
|
+
padding: 0 5px 0 0;
|
|
52
|
+
align-items: center;
|
|
53
|
+
|
|
54
|
+
&.top {
|
|
55
|
+
margin-bottom: 6px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.baseInfoLabel {
|
|
60
|
+
font-weight: 400;
|
|
61
|
+
letter-spacing: 0px;
|
|
62
|
+
line-height: 20px;
|
|
63
|
+
text-align: left;
|
|
64
|
+
vertical-align: top;
|
|
65
|
+
color: @globalColor2;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.baseInfoValue {
|
|
69
|
+
font-weight: 400;
|
|
70
|
+
letter-spacing: 0px;
|
|
71
|
+
line-height: 38px;
|
|
72
|
+
// height: 38px;
|
|
73
|
+
text-align: left;
|
|
74
|
+
vertical-align: top;
|
|
75
|
+
color: @globalColor1;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex: 1;
|
|
78
|
+
align-items: center;
|
|
79
|
+
|
|
80
|
+
&.top {
|
|
81
|
+
line-height: inherit;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.overflow_hiding {
|
|
86
|
+
max-width: 75%;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
text-overflow: ellipsis;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.baseInfoContainer+.baseInfoContainer {
|
|
94
|
+
margin-top: 30px;
|
|
95
|
+
background: @globalColor7;
|
|
96
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface BaseInfoFieldType {
|
|
3
|
+
field: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
text: string | Element | JSX.Element;
|
|
6
|
+
value: any;
|
|
7
|
+
units?: string;
|
|
8
|
+
width?: string;
|
|
9
|
+
labelWidth?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
disabledColor?: string;
|
|
12
|
+
formatFun?: (field: string, data: any) => void;
|
|
13
|
+
detail?: object;
|
|
14
|
+
isShowInterval?: boolean;
|
|
15
|
+
isActiveTrigger?: boolean;
|
|
16
|
+
activeTriggerFun?: any;
|
|
17
|
+
isShowToolTip?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
import { CenterModalPropsType } from './type';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const _default: React.NamedExoticComponent<CenterModalPropsType>;
|
|
5
|
+
export default _default;
|
|
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { PublicThemeVariablesConfig } from "../../themes/variablesConfig";
|
|
8
8
|
import { useContext, useEffect, useMemo } from 'react';
|
|
9
9
|
import ConfigContext, { DEFAULT_CONTEXT } from "./context";
|
|
@@ -31,8 +31,8 @@ import "antd/es/form/style";
|
|
|
31
31
|
import _Form from "antd/es/form";
|
|
32
32
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
33
33
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
34
|
-
function _toPropertyKey(
|
|
35
|
-
function _toPrimitive(
|
|
34
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
35
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
36
36
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
37
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
38
38
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -73,7 +73,6 @@ var BREAKPOINTS = {
|
|
|
73
73
|
// [1600, 4, "vertical"],
|
|
74
74
|
// [Infinity, 6, "vertical"],
|
|
75
75
|
],
|
|
76
|
-
|
|
77
76
|
default: [[513, 1, 'vertical'], [701, 2, 'vertical'], [1062, 3, 'horizontal'], [1352, 3, 'horizontal'],
|
|
78
77
|
// [Infinity, 4, "horizontal"],
|
|
79
78
|
[1600, 5, 'horizontal'], [Infinity, 6, 'horizontal']]
|
|
@@ -171,7 +170,7 @@ var CustomForm = function CustomForm(_ref) {
|
|
|
171
170
|
|
|
172
171
|
/**不显示按钮的时候,change改变 */
|
|
173
172
|
var commonChange = function commonChange(e, item, type) {
|
|
174
|
-
var _formValues$item$fiel, _formValues$item$
|
|
173
|
+
var _formValues$item$fiel, _formValues$item$fiel3, _formValues$item$fiel5, _formValues$item$fiel7;
|
|
175
174
|
// 级联筛选主动抛出
|
|
176
175
|
if (item !== null && item !== void 0 && item.isActiveTrigger) {
|
|
177
176
|
var _item$activeTriggerFu;
|
|
@@ -181,16 +180,16 @@ var CustomForm = function CustomForm(_ref) {
|
|
|
181
180
|
// console.log(5555, e, item, type);
|
|
182
181
|
switch (type) {
|
|
183
182
|
case typeList.min:
|
|
184
|
-
formValues[item.field] = (
|
|
183
|
+
formValues[item.field] = _defineProperty(_defineProperty({}, typeList.min, e !== null && e !== void 0 && e.target ? e.target.value : e), typeList.max, ((_formValues$item$fiel = formValues[item.field]) === null || _formValues$item$fiel === void 0 ? void 0 : _formValues$item$fiel[typeList.max]) || null);
|
|
185
184
|
break;
|
|
186
185
|
case typeList.max:
|
|
187
|
-
formValues[item.field] = (
|
|
186
|
+
formValues[item.field] = _defineProperty(_defineProperty({}, typeList.min, ((_formValues$item$fiel3 = formValues[item.field]) === null || _formValues$item$fiel3 === void 0 ? void 0 : _formValues$item$fiel3[typeList.min]) || null), typeList.max, e !== null && e !== void 0 && e.target ? e.target.value : e);
|
|
188
187
|
break;
|
|
189
188
|
case typeList.start:
|
|
190
|
-
formValues[item.field] = (
|
|
189
|
+
formValues[item.field] = _defineProperty(_defineProperty({}, typeList.start, e !== null && e !== void 0 && e.target ? e.target.value : e), typeList.end, ((_formValues$item$fiel5 = formValues[item.field]) === null || _formValues$item$fiel5 === void 0 ? void 0 : _formValues$item$fiel5[typeList.end]) || null);
|
|
191
190
|
break;
|
|
192
191
|
case typeList.end:
|
|
193
|
-
formValues[item.field] = (
|
|
192
|
+
formValues[item.field] = _defineProperty(_defineProperty({}, typeList.start, ((_formValues$item$fiel7 = formValues[item.field]) === null || _formValues$item$fiel7 === void 0 ? void 0 : _formValues$item$fiel7[typeList.start]) || null), typeList.end, e !== null && e !== void 0 && e.target ? e.target.value : e);
|
|
194
193
|
break;
|
|
195
194
|
default:
|
|
196
195
|
formValues[item.field] = e !== null && e !== void 0 && e.target ? e.target.value : e;
|
|
@@ -397,7 +396,9 @@ var CustomForm = function CustomForm(_ref) {
|
|
|
397
396
|
},
|
|
398
397
|
format: item.defaultFormat,
|
|
399
398
|
showTime: item.showTimeFormat,
|
|
400
|
-
defaultValue: item.defaultValue ? [moment(item.defaultValue[0], item.defaultFormat), moment(item.defaultValue[1], item.defaultFormat)] : undefined
|
|
399
|
+
defaultValue: item.defaultValue ? [moment(item.defaultValue[0], item.defaultFormat), moment(item.defaultValue[1], item.defaultFormat)] : undefined
|
|
400
|
+
// @ts-ignore
|
|
401
|
+
,
|
|
401
402
|
separator: /*#__PURE__*/_jsx(MinusOutlined, {}),
|
|
402
403
|
suffixIcon: /*#__PURE__*/_jsx("i", {
|
|
403
404
|
className: "iconfont-other icon-other-calendar"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CloseOutlined } from '@ant-design/icons';
|
|
3
|
+
import Draggable from 'react-draggable';
|
|
4
|
+
import "./index.less";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
var DraggableBox = function DraggableBox(_ref) {
|
|
8
|
+
var open = _ref.open,
|
|
9
|
+
renderContent = _ref.renderContent,
|
|
10
|
+
handleCancel = _ref.handleCancel,
|
|
11
|
+
bounds = _ref.bounds,
|
|
12
|
+
width = _ref.width,
|
|
13
|
+
height = _ref.height,
|
|
14
|
+
_ref$isShow = _ref.isShow,
|
|
15
|
+
isShow = _ref$isShow === void 0 ? true : _ref$isShow;
|
|
16
|
+
return /*#__PURE__*/_jsx("div", {
|
|
17
|
+
children: open ? /*#__PURE__*/_jsx(Draggable, {
|
|
18
|
+
bounds: bounds,
|
|
19
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
20
|
+
className: 'draggableBox',
|
|
21
|
+
style: {
|
|
22
|
+
width: "".concat(width, "px"),
|
|
23
|
+
height: "".concat(height, "px")
|
|
24
|
+
},
|
|
25
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
26
|
+
children: renderContent ? renderContent : /*#__PURE__*/_jsx("div", {
|
|
27
|
+
children: "\u5185\u5BB9\u533A"
|
|
28
|
+
})
|
|
29
|
+
}), isShow ? /*#__PURE__*/_jsx("div", {
|
|
30
|
+
className: 'closeOuter',
|
|
31
|
+
onClick: function onClick() {
|
|
32
|
+
return handleCancel === null || handleCancel === void 0 ? void 0 : handleCancel();
|
|
33
|
+
},
|
|
34
|
+
children: /*#__PURE__*/_jsx(CloseOutlined, {
|
|
35
|
+
className: 'closeIcon'
|
|
36
|
+
})
|
|
37
|
+
}) : null]
|
|
38
|
+
})
|
|
39
|
+
}) : null
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export default /*#__PURE__*/React.memo(DraggableBox);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.draggableBox {
|
|
2
|
+
position: absolute;
|
|
3
|
+
right: 24px;
|
|
4
|
+
bottom: 24px;
|
|
5
|
+
z-index: 1000;
|
|
6
|
+
background: @globalColor7;
|
|
7
|
+
opacity: 0.9;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.closeOuter {
|
|
13
|
+
position: absolute;
|
|
14
|
+
width: 16px;
|
|
15
|
+
border-radius: 8px;
|
|
16
|
+
height: 16px;
|
|
17
|
+
right: -8px;
|
|
18
|
+
top: -8px;
|
|
19
|
+
background-color: #979797;
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
.closeIcon {
|
|
24
|
+
color: #fff;
|
|
25
|
+
font-size: 10px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface DraggableBoxPropsType {
|
|
3
|
+
open: boolean;
|
|
4
|
+
isShow?: boolean;
|
|
5
|
+
renderContent?: JSX.Element;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
position?: {
|
|
9
|
+
left?: number;
|
|
10
|
+
right?: number;
|
|
11
|
+
top?: number;
|
|
12
|
+
bottom?: number;
|
|
13
|
+
};
|
|
14
|
+
handleCancel?: any;
|
|
15
|
+
bounds?: {
|
|
16
|
+
left?: number;
|
|
17
|
+
right?: number;
|
|
18
|
+
top?: number;
|
|
19
|
+
bottom?: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MessageTipPropType } from './type';
|
|
2
|
+
declare const MessageTip: {
|
|
3
|
+
success: (info: MessageTipPropType) => void;
|
|
4
|
+
error: (info: MessageTipPropType) => void;
|
|
5
|
+
attention: (info: MessageTipPropType) => void;
|
|
6
|
+
info: (info: MessageTipPropType) => void;
|
|
7
|
+
loading: (info: MessageTipPropType) => void;
|
|
8
|
+
};
|
|
9
|
+
export default MessageTip;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
import "antd/es/message/style";
|
|
3
|
+
import _message from "antd/es/message";
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
var tipIconMap = {
|
|
11
|
+
success: 'iconfont-tip icon-tip-success',
|
|
12
|
+
error: 'iconfont-tip icon-tip-error',
|
|
13
|
+
info: 'iconfont-tip icon-tip-info',
|
|
14
|
+
attention: 'iconfont-tip icon-tip-attention',
|
|
15
|
+
loading: 'iconfont-tip icon-tip-loading'
|
|
16
|
+
};
|
|
17
|
+
var messageConfig = function messageConfig(_ref) {
|
|
18
|
+
var key = _ref.key,
|
|
19
|
+
tipCode = _ref.tipCode,
|
|
20
|
+
content = _ref.content,
|
|
21
|
+
duration = _ref.duration,
|
|
22
|
+
_onClose = _ref.onClose;
|
|
23
|
+
var defaultDuration = tipCode === 'loading' ? 0 : 2;
|
|
24
|
+
_message.success({
|
|
25
|
+
key: key,
|
|
26
|
+
icon: /*#__PURE__*/_jsx("span", {
|
|
27
|
+
className: "".concat(tipCode, "Icon"),
|
|
28
|
+
children: /*#__PURE__*/_jsx("i", {
|
|
29
|
+
style: {
|
|
30
|
+
fontSize: 18
|
|
31
|
+
},
|
|
32
|
+
className: tipCode ? tipIconMap[tipCode] : ''
|
|
33
|
+
})
|
|
34
|
+
}),
|
|
35
|
+
content: content,
|
|
36
|
+
duration: duration !== null && duration !== void 0 ? duration : defaultDuration,
|
|
37
|
+
onClose: function onClose() {
|
|
38
|
+
_onClose === null || _onClose === void 0 || _onClose();
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
var MessageTip = {
|
|
43
|
+
success: function success(info) {
|
|
44
|
+
return messageConfig(_objectSpread(_objectSpread({}, info), {}, {
|
|
45
|
+
tipCode: 'success'
|
|
46
|
+
}));
|
|
47
|
+
},
|
|
48
|
+
error: function error(info) {
|
|
49
|
+
return messageConfig(_objectSpread(_objectSpread({}, info), {}, {
|
|
50
|
+
tipCode: 'error'
|
|
51
|
+
}));
|
|
52
|
+
},
|
|
53
|
+
attention: function attention(info) {
|
|
54
|
+
return messageConfig(_objectSpread(_objectSpread({}, info), {}, {
|
|
55
|
+
tipCode: 'attention'
|
|
56
|
+
}));
|
|
57
|
+
},
|
|
58
|
+
info: function info(_info) {
|
|
59
|
+
return messageConfig(_objectSpread(_objectSpread({}, _info), {}, {
|
|
60
|
+
tipCode: 'info'
|
|
61
|
+
}));
|
|
62
|
+
},
|
|
63
|
+
loading: function loading(info) {
|
|
64
|
+
return messageConfig(_objectSpread(_objectSpread({}, info), {}, {
|
|
65
|
+
tipCode: 'loading'
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
export default MessageTip;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface MessageTipPropType {
|
|
2
|
+
key?: string;
|
|
3
|
+
content?: any;
|
|
4
|
+
duration?: number;
|
|
5
|
+
onClose?: any;
|
|
6
|
+
}
|
|
7
|
+
export type tipType = 'success' | 'error' | 'attention' | 'info' | 'loading';
|
|
8
|
+
export interface MessageTipPropTypes extends MessageTipPropType {
|
|
9
|
+
tipCode: tipType;
|
|
10
|
+
}
|
|
11
|
+
export type tipIconMapType = {
|
|
12
|
+
[tipCode: string]: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { ModalDeleteType, ModalTipType } from './type';
|
|
3
|
+
declare const ModalTip: {
|
|
4
|
+
modal: any;
|
|
5
|
+
loading: (info: ModalTipType) => void;
|
|
6
|
+
success: (info: ModalTipType) => void;
|
|
7
|
+
error: (info: ModalTipType) => void;
|
|
8
|
+
info: (info: ModalTipType) => void;
|
|
9
|
+
attention: (info: ModalTipType) => void;
|
|
10
|
+
delete: (theme: any, info: ModalDeleteType) => void;
|
|
11
|
+
};
|
|
12
|
+
export default ModalTip;
|