@arim-aisdc/public-components 2.2.9 → 2.3.1-8.1
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/iconfont/table/iconfont.css +29 -9
- package/dist/assets/iconfont/table/iconfont.ttf +0 -0
- package/dist/components/BaseInfo/BaseInfo.d.ts +1 -1
- package/dist/components/CenterModal/CenterModal.d.ts +2 -2
- package/dist/components/CenterModal/CenterModal.js +91 -90
- package/dist/components/CenterModal/index.less +29 -9
- package/dist/components/CenterModal/type.d.ts +8 -0
- package/dist/components/ConditionExpression/index.less +2 -1
- package/dist/components/ConfigProvider/context.d.ts +7 -0
- package/dist/components/ConfigProvider/context.js +5 -1
- package/dist/components/CustomForm/CustomForm.js +12 -5
- package/dist/components/CustomForm/RemoteSelectCom/index.js +1 -1
- package/dist/components/CustomForm/index.less +1 -1
- package/dist/components/CustomForm/type.d.ts +6 -3
- package/dist/components/Empty/index.js +12 -3
- package/dist/components/GlobalTip/ModalTip/ModalTip.js +2 -1
- package/dist/components/QueryFilter/QueryFilter.js +11 -8
- package/dist/components/QueryFilter/RemoteSelectCom/index.js +1 -1
- package/dist/components/QueryFilter/type.d.ts +3 -1
- package/dist/components/TableMax/TableBody/Row.js +68 -17
- package/dist/components/TableMax/TableBody/components/Total.d.ts +7 -0
- package/dist/components/TableMax/TableBody/components/Total.js +63 -0
- package/dist/components/TableMax/TableBody/index.d.ts +4 -1
- package/dist/components/TableMax/TableBody/index.js +20 -7
- package/dist/components/TableMax/TableBody/index.less +22 -4
- package/dist/components/TableMax/TableHeader/Cell.d.ts +3 -1
- package/dist/components/TableMax/TableHeader/Cell.js +35 -47
- package/dist/components/TableMax/TableHeader/index.d.ts +2 -1
- package/dist/components/TableMax/TableHeader/index.js +11 -20
- package/dist/components/TableMax/TableHeader/index.less +39 -0
- package/dist/components/TableMax/TableHeader/utils.js +1 -1
- package/dist/components/TableMax/TableMax.d.ts +1 -2
- package/dist/components/TableMax/TableMax.js +51 -39
- package/dist/components/TableMax/components/{ColumnFilter/FilterDateRange → ColumnFilterV2/DateRange}/index.d.ts +2 -1
- package/dist/components/TableMax/components/ColumnFilterV2/DateRange/index.js +156 -0
- package/dist/components/TableMax/components/{ColumnFilter/FilterDateRange → ColumnFilterV2/DateRange}/index.less +5 -5
- package/dist/components/TableMax/components/ColumnFilterV2/Filter.d.ts +9 -0
- package/dist/components/TableMax/components/{ColumnFilter/index.js → ColumnFilterV2/Filter.js} +180 -228
- package/dist/components/TableMax/components/{ColumnFilter → ColumnFilterV2}/MultipleSelect/index.d.ts +4 -2
- package/dist/components/TableMax/components/ColumnFilterV2/MultipleSelect/index.js +128 -0
- package/dist/components/TableMax/components/ColumnFilterV2/MultipleSelect/index.less +32 -0
- package/dist/components/TableMax/components/ColumnFilterV2/NumberRange/index.d.ts +10 -0
- package/dist/components/TableMax/components/ColumnFilterV2/NumberRange/index.js +102 -0
- package/dist/components/TableMax/components/ColumnFilterV2/NumberRange/index.less +27 -0
- package/dist/components/TableMax/components/ColumnFilterV2/SingleSelect/index.d.ts +12 -0
- package/dist/components/TableMax/components/ColumnFilterV2/SingleSelect/index.js +111 -0
- package/dist/components/TableMax/components/ColumnFilterV2/SingleSelect/index.less +43 -0
- package/dist/components/TableMax/components/{ColumnFilter → ColumnFilterV2}/customFilterFns.js +1 -1
- package/dist/components/TableMax/components/{ColumnFilter → ColumnFilterV2}/index.d.ts +15 -1
- package/dist/components/TableMax/components/ColumnFilterV2/index.js +158 -0
- package/dist/components/TableMax/components/ColumnFilterV2/index.less +30 -0
- package/dist/components/TableMax/components/ColumnSetting/index.d.ts +1 -0
- package/dist/components/TableMax/components/ColumnSetting/index.js +37 -33
- package/dist/components/TableMax/components/ColumnSort/customSortFns.js +43 -8
- package/dist/components/TableMax/components/ColumnSort/index.d.ts +2 -1
- package/dist/components/TableMax/components/ColumnSort/index.js +15 -4
- package/dist/components/TableMax/components/ColumnSort/index.less +15 -6
- package/dist/components/TableMax/components/PaginationV2/index.js +13 -3
- package/dist/components/TableMax/hooks/useColumnResize.d.ts +9 -0
- package/dist/components/TableMax/hooks/useColumnResize.js +162 -0
- package/dist/components/TableMax/hooks/useColumnWidth copy.d.ts +18 -0
- package/dist/components/TableMax/hooks/useColumnWidth copy.js +369 -0
- package/dist/components/TableMax/hooks/useColumnWidth.d.ts +8 -4
- package/dist/components/TableMax/hooks/useColumnWidth.js +222 -269
- package/dist/components/TableMax/index.d.ts +2 -2
- package/dist/components/TableMax/index.js +1 -1
- package/dist/components/TableMax/tableMax.less +2 -2
- package/dist/components/TableMax/type.d.ts +45 -5
- package/dist/components/TableMax/type.js +21 -1
- package/dist/components/TableMax/utils.d.ts +13 -2
- package/dist/components/TableMax/utils.js +81 -8
- package/dist/hooks/useTranslation.d.ts +16 -0
- package/dist/hooks/useTranslation.js +193 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +6 -1
- package/dist/locales/en_US.d.ts +3 -0
- package/dist/locales/en_US.js +51 -0
- package/dist/locales/index.d.ts +9 -0
- package/dist/locales/index.js +1 -0
- package/dist/locales/vi_VN.d.ts +3 -0
- package/dist/locales/vi_VN.js +51 -0
- package/dist/locales/zh_CN.d.ts +3 -0
- package/dist/locales/zh_CN.js +51 -0
- package/dist/themes/variables.less +6 -5
- package/dist/themes/variablesConfig.js +16 -12
- package/dist/utils/request.d.ts +4 -3
- package/dist/utils/request.js +4 -4
- package/package.json +4 -1
- package/dist/components/TableMax/components/ColumnFilter/FilterDateRange/index.js +0 -101
- package/dist/components/TableMax/components/ColumnFilter/MultipleSelect/index.js +0 -52
- package/dist/components/TableMax/components/ColumnFilter/MultipleSelect/index.less +0 -20
- package/dist/components/TableMax/components/ColumnFilter/SingleSelect/index.d.ts +0 -10
- package/dist/components/TableMax/components/ColumnFilter/SingleSelect/index.js +0 -27
- package/dist/components/TableMax/components/ColumnFilter/SingleSelect/index.less +0 -8
- /package/dist/components/TableMax/components/{ColumnFilter → ColumnFilterV2}/customFilterFns.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "iconfont-table"; /* Project id 4453758 */
|
|
3
|
-
src: url('
|
|
3
|
+
src: url('iconfont.ttf?t=1740568199599') format('truetype');
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.iconfont-table {
|
|
@@ -11,12 +11,36 @@
|
|
|
11
11
|
-moz-osx-font-smoothing: grayscale;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.icon-table-
|
|
15
|
-
content: "\
|
|
14
|
+
.icon-table-sort:before {
|
|
15
|
+
content: "\e890";
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.icon-table-
|
|
19
|
-
content: "\
|
|
18
|
+
.icon-table-filter:before {
|
|
19
|
+
content: "\e88e";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.icon-table-shengji:before {
|
|
23
|
+
content: "\e64a";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.icon-table-calendar:before {
|
|
27
|
+
content: "\e888";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.icon-table-edit:before {
|
|
31
|
+
content: "\e887";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.icon-table-pin:before {
|
|
35
|
+
content: "\e889";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.icon-table-drag:before {
|
|
39
|
+
content: "\e88d";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.icon-table-down:before {
|
|
43
|
+
content: "\e88f";
|
|
20
44
|
}
|
|
21
45
|
|
|
22
46
|
.icon-table-tight:before {
|
|
@@ -27,10 +51,6 @@
|
|
|
27
51
|
content: "\e87f";
|
|
28
52
|
}
|
|
29
53
|
|
|
30
|
-
.icon-table-shenglvehao:before {
|
|
31
|
-
content: "\e62d";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
54
|
.icon-table-delete:before {
|
|
35
55
|
content: "\e87c";
|
|
36
56
|
}
|
|
Binary file
|
|
@@ -17,7 +17,7 @@ export declare const foramtBaseInfoField: (data: any, dataField: BaseInfoFieldTy
|
|
|
17
17
|
value: any;
|
|
18
18
|
field: string;
|
|
19
19
|
label?: string;
|
|
20
|
-
text: string | Element |
|
|
20
|
+
text: string | JSX.Element | Element;
|
|
21
21
|
units?: string;
|
|
22
22
|
width?: string;
|
|
23
23
|
labelWidth?: string;
|
|
@@ -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 CenterModal: React.FC<CenterModalPropsType>;
|
|
5
|
+
export default CenterModal;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
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
|
-
var _excluded = ["open", "title", "okText", "hasfooter", "footer", "width", "size", "renderContent", "handleConfirm", "handleCancel", "confirmLoading", "maskClosable", "bodyStyle", "afterClose"];
|
|
2
|
+
var _excluded = ["open", "title", "okText", "hasfooter", "footer", "width", "size", "renderContent", "handleConfirm", "handleCancel", "confirmLoading", "maskClosable", "bodyStyle", "afterClose", "enableResizing", "enableDragging", "minResizeWidth", "minResizeHeight"];
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
7
|
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); }
|
|
8
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
-
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."); }
|
|
10
|
-
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); }
|
|
11
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
10
|
import { Modal } from 'antd';
|
|
17
|
-
import React, {
|
|
18
|
-
import
|
|
11
|
+
import React, { useEffect, useMemo, useRef } from 'react';
|
|
12
|
+
import { Rnd } from 'react-rnd';
|
|
19
13
|
import "./index.less";
|
|
20
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
var resizeHandleClasses = {
|
|
16
|
+
bottom: "resizeHandleBottom",
|
|
17
|
+
bottomLeft: "resizeHandleBottomLeft",
|
|
18
|
+
bottomRight: "resizeHandleBottomRight",
|
|
19
|
+
left: "resizeHandleLeft",
|
|
20
|
+
right: "resizeHandleRight",
|
|
21
|
+
top: "resizeHandleTop",
|
|
22
|
+
topLeft: "resizeHandleTopLeft",
|
|
23
|
+
topRight: "resizeHandleTopRight"
|
|
24
|
+
};
|
|
23
25
|
var CenterModal = function CenterModal(_ref) {
|
|
24
26
|
var _ref$open = _ref.open,
|
|
25
27
|
open = _ref$open === void 0 ? false : _ref$open,
|
|
@@ -43,114 +45,113 @@ var CenterModal = function CenterModal(_ref) {
|
|
|
43
45
|
_ref$bodyStyle = _ref.bodyStyle,
|
|
44
46
|
bodyStyle = _ref$bodyStyle === void 0 ? {
|
|
45
47
|
position: 'relative'
|
|
46
|
-
// padding: '24px 32px',
|
|
47
48
|
} : _ref$bodyStyle,
|
|
48
49
|
afterClose = _ref.afterClose,
|
|
50
|
+
_ref$enableResizing = _ref.enableResizing,
|
|
51
|
+
enableResizing = _ref$enableResizing === void 0 ? true : _ref$enableResizing,
|
|
52
|
+
_ref$enableDragging = _ref.enableDragging,
|
|
53
|
+
enableDragging = _ref$enableDragging === void 0 ? true : _ref$enableDragging,
|
|
54
|
+
_ref$minResizeWidth = _ref.minResizeWidth,
|
|
55
|
+
minResizeWidth = _ref$minResizeWidth === void 0 ? 200 : _ref$minResizeWidth,
|
|
56
|
+
_ref$minResizeHeight = _ref.minResizeHeight,
|
|
57
|
+
minResizeHeight = _ref$minResizeHeight === void 0 ? 200 : _ref$minResizeHeight,
|
|
49
58
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
clientWidth = _window$document$docu.clientWidth,
|
|
74
|
-
clientHeight = _window$document$docu.clientHeight;
|
|
75
|
-
var modalHeader = document.getElementById(id);
|
|
76
|
-
var targetRect = draggleRef === null || draggleRef === void 0 || (_draggleRef$current = draggleRef.current) === null || _draggleRef$current === void 0 ? void 0 : _draggleRef$current.getBoundingClientRect();
|
|
77
|
-
console.log(modalHeader, event.target);
|
|
78
|
-
if (modalHeader && !modalHeader.contains(event.target)) {
|
|
79
|
-
setBounds({
|
|
80
|
-
left: 0,
|
|
81
|
-
right: 0,
|
|
82
|
-
top: 0,
|
|
83
|
-
bottom: 0
|
|
84
|
-
});
|
|
85
|
-
return;
|
|
59
|
+
var modalRef = useRef(null);
|
|
60
|
+
var modalBodyRef = useRef(null);
|
|
61
|
+
var startSizeRef = useRef();
|
|
62
|
+
var titleElementRef = useRef();
|
|
63
|
+
var dragHandleClassName = useMemo(function () {
|
|
64
|
+
var _titleElementRef$curr;
|
|
65
|
+
return "drag-handle-".concat((_titleElementRef$curr = titleElementRef.current) === null || _titleElementRef$curr === void 0 ? void 0 : _titleElementRef$curr.length);
|
|
66
|
+
}, [titleElementRef.current]);
|
|
67
|
+
useEffect(function () {
|
|
68
|
+
var titleElements = document.querySelectorAll('.modal-header');
|
|
69
|
+
if (titleElements) {
|
|
70
|
+
titleElementRef.current = titleElements;
|
|
71
|
+
}
|
|
72
|
+
}, []);
|
|
73
|
+
useEffect(function () {
|
|
74
|
+
var modal = modalBodyRef.current;
|
|
75
|
+
if (modal) {
|
|
76
|
+
var rect = modal.getBoundingClientRect();
|
|
77
|
+
console.log('rect', rect.width, rect.height);
|
|
78
|
+
startSizeRef.current = {
|
|
79
|
+
width: rect.width,
|
|
80
|
+
height: rect.height
|
|
81
|
+
};
|
|
86
82
|
}
|
|
87
|
-
|
|
88
|
-
left: -(targetRect === null || targetRect === void 0 ? void 0 : targetRect.left) + (uiData === null || uiData === void 0 ? void 0 : uiData.x),
|
|
89
|
-
right: clientWidth - ((targetRect === null || targetRect === void 0 ? void 0 : targetRect.right) - (uiData === null || uiData === void 0 ? void 0 : uiData.x)),
|
|
90
|
-
top: -(targetRect === null || targetRect === void 0 ? void 0 : targetRect.top) + (uiData === null || uiData === void 0 ? void 0 : uiData.y),
|
|
91
|
-
bottom: clientHeight - ((targetRect === null || targetRect === void 0 ? void 0 : targetRect.bottom) - (uiData === null || uiData === void 0 ? void 0 : uiData.y))
|
|
92
|
-
});
|
|
93
|
-
};
|
|
83
|
+
}, [modalBodyRef.current]);
|
|
94
84
|
return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
|
|
95
85
|
className: "centerModal".concat(size),
|
|
86
|
+
wrapClassName: 'wrapClassName',
|
|
96
87
|
title: /*#__PURE__*/_jsx("div", {
|
|
97
|
-
|
|
98
|
-
className: "modal-header",
|
|
88
|
+
className: "modal-header ".concat(dragHandleClassName),
|
|
99
89
|
style: {
|
|
100
90
|
width: '100%',
|
|
101
91
|
cursor: 'move'
|
|
102
92
|
},
|
|
103
|
-
onMouseOver: function onMouseOver() {
|
|
104
|
-
if (disabled) {
|
|
105
|
-
setDisabled(false);
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
onMouseOut: function onMouseOut() {
|
|
109
|
-
setDisabled(false);
|
|
110
|
-
}
|
|
111
|
-
// fix eslintjsx-a11y/mouse-events-have-key-events
|
|
112
|
-
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md
|
|
113
|
-
,
|
|
114
|
-
onFocus: function onFocus() {},
|
|
115
|
-
onBlur: function onBlur() {}
|
|
116
|
-
// end
|
|
117
|
-
,
|
|
118
93
|
children: title
|
|
119
94
|
}),
|
|
120
95
|
open: open,
|
|
121
|
-
width: width,
|
|
122
|
-
maskClosable: maskClosable,
|
|
123
96
|
onOk: handleConfirm,
|
|
124
97
|
onCancel: handleCancel,
|
|
125
98
|
okText: okText,
|
|
126
99
|
footer: hasfooter ? footer : null,
|
|
127
|
-
centered:
|
|
100
|
+
centered: false,
|
|
128
101
|
closeIcon: /*#__PURE__*/_jsx("i", {
|
|
129
|
-
className: "iconfont-other icon-other-close"
|
|
102
|
+
className: "iconfont-other icon-other-close",
|
|
103
|
+
children: " "
|
|
130
104
|
}),
|
|
131
105
|
destroyOnClose: true,
|
|
132
106
|
confirmLoading: confirmLoading,
|
|
107
|
+
maskClosable: maskClosable,
|
|
108
|
+
afterClose: afterClose,
|
|
133
109
|
styles: {
|
|
134
|
-
body: bodyStyle
|
|
110
|
+
body: _objectSpread(_objectSpread({}, bodyStyle), {}, {
|
|
111
|
+
overflow: 'auto'
|
|
112
|
+
})
|
|
135
113
|
},
|
|
136
|
-
|
|
114
|
+
width: width,
|
|
137
115
|
modalRender: function modalRender(modal) {
|
|
138
|
-
return /*#__PURE__*/_jsx(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
116
|
+
return /*#__PURE__*/_jsx(Rnd, {
|
|
117
|
+
ref: modalRef,
|
|
118
|
+
enableResizing: enableResizing,
|
|
119
|
+
disableDragging: !enableDragging,
|
|
120
|
+
resizeHandleWrapperClass: "resizeHandles",
|
|
121
|
+
resizeHandleClasses: resizeHandleClasses,
|
|
122
|
+
dragHandleClassName: dragHandleClassName,
|
|
123
|
+
default: {
|
|
124
|
+
x: 0,
|
|
125
|
+
y: 0,
|
|
126
|
+
width: 'fit-content',
|
|
127
|
+
height: 'fit-content'
|
|
128
|
+
},
|
|
129
|
+
onResizeStop: function onResizeStop(e, direction, ref, delta, position) {
|
|
130
|
+
var _ref$querySelector;
|
|
131
|
+
var modalContent = (_ref$querySelector = ref.querySelector('.ant-modal-content')) === null || _ref$querySelector === void 0 ? void 0 : _ref$querySelector.getBoundingClientRect();
|
|
132
|
+
var resizeContent = ref === null || ref === void 0 ? void 0 : ref.getBoundingClientRect();
|
|
133
|
+
var height = modalContent.height;
|
|
134
|
+
if (modalContent.height !== resizeContent.height) {
|
|
135
|
+
ref.style.height = height + "px";
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
style: {
|
|
139
|
+
display: 'flex',
|
|
140
|
+
flexDirection: 'column',
|
|
141
|
+
overflow: 'hidden' // 添加overflow隐藏
|
|
144
142
|
},
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
minWidth: minResizeWidth,
|
|
144
|
+
minHeight: minResizeHeight,
|
|
145
|
+
children: modal
|
|
148
146
|
});
|
|
149
147
|
}
|
|
150
148
|
}, rest), {}, {
|
|
151
|
-
children:
|
|
152
|
-
|
|
149
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
150
|
+
ref: modalBodyRef,
|
|
151
|
+
children: renderContent || /*#__PURE__*/_jsx("div", {
|
|
152
|
+
className: "gantt-leftbar-defalutItem"
|
|
153
|
+
})
|
|
153
154
|
})
|
|
154
155
|
}));
|
|
155
156
|
};
|
|
156
|
-
export default
|
|
157
|
+
export default CenterModal;
|
|
@@ -1,13 +1,33 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
.centerModal {
|
|
2
|
+
.resizeHandles div {
|
|
3
|
+
pointer-events: auto;
|
|
4
|
+
z-index: 1002;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ant-modal-content {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
|
|
11
|
+
.ant-modal-body {
|
|
12
|
+
flex: 1;
|
|
13
|
+
overflow: auto;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
6
16
|
|
|
7
|
-
.
|
|
8
|
-
|
|
17
|
+
.react-draggable {
|
|
18
|
+
position: relative !important;
|
|
19
|
+
}
|
|
9
20
|
|
|
10
|
-
.
|
|
11
|
-
|
|
21
|
+
.resizeHandleBottomLeft, .resizeHandleBottomRight, .resizeHandleTopLeft, .resizeHandleTopRight {
|
|
22
|
+
width: 40px !important;
|
|
23
|
+
height: 40px !important;
|
|
12
24
|
}
|
|
25
|
+
|
|
26
|
+
// .resizeHandleLeft, .resizeHandleRight {
|
|
27
|
+
// width: 20px !important;
|
|
28
|
+
// }
|
|
29
|
+
|
|
30
|
+
// .resizeHandleTop, .resizeHandleBottom {
|
|
31
|
+
// height: 20px !important;
|
|
32
|
+
// }
|
|
13
33
|
}
|
|
@@ -21,4 +21,12 @@ export interface CenterModalPropsType extends ModalProps {
|
|
|
21
21
|
confirmLoading?: boolean;
|
|
22
22
|
bodyStyle?: object;
|
|
23
23
|
afterClose?: () => void;
|
|
24
|
+
enableResizing?: boolean;
|
|
25
|
+
enableDragging?: boolean;
|
|
26
|
+
minResizeWidth?: string | number;
|
|
27
|
+
minResizeHeight?: string | number;
|
|
24
28
|
}
|
|
29
|
+
export type ModalSizeType = {
|
|
30
|
+
width: number | string;
|
|
31
|
+
height: number | string;
|
|
32
|
+
};
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
.condition-all-content {
|
|
19
19
|
overflow: auto;
|
|
20
|
+
border: 1px dashed @global-card-effect-background-color;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
/* 添加相对定位 */
|
|
@@ -24,7 +25,6 @@
|
|
|
24
25
|
display: flex;
|
|
25
26
|
align-items: center;
|
|
26
27
|
position: relative;
|
|
27
|
-
border: 1px dashed @global-card-effect-background-color;
|
|
28
28
|
border-radius: 6px;
|
|
29
29
|
padding: 6px 8px 6px 6px;
|
|
30
30
|
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
.condition-add {
|
|
77
77
|
i {
|
|
78
78
|
font-size: 20px;
|
|
79
|
+
cursor: pointer;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ThemeType } from "../../../dist/components/ThemeProvider";
|
|
3
3
|
import type { VariablesJsonType } from './type';
|
|
4
|
+
import { Locale } from '../../locales';
|
|
4
5
|
export interface ConfigConsumerProps {
|
|
5
6
|
userId?: string;
|
|
6
7
|
tableKeyPrefixCls?: string;
|
|
@@ -20,11 +21,17 @@ export interface ConfigConsumerProps {
|
|
|
20
21
|
request?: (...params: any[]) => Promise<Blob>;
|
|
21
22
|
/** 主题包名称 */
|
|
22
23
|
themePackageName?: 'DefaultThemePackage' | 'DyImsBlueThemePackage';
|
|
24
|
+
/**语言 */
|
|
25
|
+
locale?: Locale;
|
|
26
|
+
/**tablemax dateFormat */
|
|
27
|
+
dateFormat?: string;
|
|
23
28
|
}
|
|
24
29
|
export declare const DEFAULT_CONTEXT: {
|
|
25
30
|
theme: string;
|
|
26
31
|
userId: string;
|
|
27
32
|
tableKeyPrefixCls: string;
|
|
33
|
+
locale: Locale;
|
|
34
|
+
dateFormat: string;
|
|
28
35
|
};
|
|
29
36
|
declare const ConfigContext: import("react").Context<ConfigConsumerProps>;
|
|
30
37
|
export default ConfigContext;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
|
+
import public_zhCN from "../../locales/zh_CN";
|
|
2
3
|
|
|
3
4
|
// context data 类型
|
|
4
5
|
|
|
5
6
|
export var DEFAULT_CONTEXT = {
|
|
6
7
|
theme: 'light',
|
|
7
8
|
userId: '',
|
|
8
|
-
tableKeyPrefixCls: 'TableMax'
|
|
9
|
+
tableKeyPrefixCls: 'TableMax',
|
|
10
|
+
locale: public_zhCN,
|
|
11
|
+
dateFormat: 'YYYY-MM-DD HH:mm'
|
|
12
|
+
// locale: public_enUS
|
|
9
13
|
};
|
|
10
14
|
var ConfigContext = /*#__PURE__*/createContext(DEFAULT_CONTEXT);
|
|
11
15
|
export default ConfigContext;
|
|
@@ -252,7 +252,9 @@ var CustomForm = function CustomForm(_ref, ref) {
|
|
|
252
252
|
handleInputClear === null || handleInputClear === void 0 || handleInputClear();
|
|
253
253
|
}
|
|
254
254
|
run(e, item);
|
|
255
|
-
}
|
|
255
|
+
},
|
|
256
|
+
maxLength: item.maxLength,
|
|
257
|
+
showCount: item.maxLength ? true : false
|
|
256
258
|
});
|
|
257
259
|
break;
|
|
258
260
|
case CustomFormItemType.TextArea:
|
|
@@ -415,9 +417,9 @@ var CustomForm = function CustomForm(_ref, ref) {
|
|
|
415
417
|
onChange: function onChange(e) {
|
|
416
418
|
commonChange(e, item);
|
|
417
419
|
},
|
|
418
|
-
disabled: item === null || item === void 0 ? void 0 : item.disabled
|
|
419
|
-
|
|
420
|
-
,
|
|
420
|
+
disabled: item === null || item === void 0 ? void 0 : item.disabled,
|
|
421
|
+
disabledDate: item === null || item === void 0 ? void 0 : item.disabledDate,
|
|
422
|
+
disabledTime: item === null || item === void 0 ? void 0 : item.disabledTime,
|
|
421
423
|
suffixIcon: /*#__PURE__*/_jsx("i", {
|
|
422
424
|
className: "iconfont-other icon-other-calendar"
|
|
423
425
|
}),
|
|
@@ -447,6 +449,7 @@ var CustomForm = function CustomForm(_ref, ref) {
|
|
|
447
449
|
placeholder: [item.inputTips, item.inputTips],
|
|
448
450
|
picker: item === null || item === void 0 ? void 0 : item.picker,
|
|
449
451
|
disabledDate: item === null || item === void 0 ? void 0 : item.disabledDate,
|
|
452
|
+
disabledTime: item === null || item === void 0 ? void 0 : item.disabledTime,
|
|
450
453
|
allowClear: item.allowClear === false ? false : true,
|
|
451
454
|
presets: item === null || item === void 0 ? void 0 : item.presets
|
|
452
455
|
});
|
|
@@ -686,7 +689,11 @@ var CustomForm = function CustomForm(_ref, ref) {
|
|
|
686
689
|
xl: 12,
|
|
687
690
|
xxl: 24
|
|
688
691
|
},
|
|
689
|
-
className: "customFormRow"
|
|
692
|
+
className: "customFormRow",
|
|
693
|
+
style: {
|
|
694
|
+
marginLeft: 0,
|
|
695
|
+
marginRight: 0
|
|
696
|
+
}
|
|
690
697
|
// justify="space-between"
|
|
691
698
|
,
|
|
692
699
|
children: [data.map(function (item, index) {
|
|
@@ -51,7 +51,7 @@ var RemoteSelect = function RemoteSelect(_ref) {
|
|
|
51
51
|
return /*#__PURE__*/_jsx(Select, {
|
|
52
52
|
className: "customForm-remoteSelect",
|
|
53
53
|
mode: item.mode ? item.mode : undefined,
|
|
54
|
-
showSearch: item.showSearch,
|
|
54
|
+
showSearch: !!item.showSearch,
|
|
55
55
|
placeholder: item.inputTips,
|
|
56
56
|
allowClear: item.allowClear,
|
|
57
57
|
value: value,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { TimePickerProps, TimeRangePickerProps } from 'antd';
|
|
2
|
-
import { FormProps } from 'antd';
|
|
1
|
+
import type { TimePickerProps, TimeRangePickerProps, GetProps } from 'antd';
|
|
2
|
+
import { FormProps, DatePicker } from 'antd';
|
|
3
3
|
import { FormLabelAlign } from 'antd/es/form/interface';
|
|
4
4
|
import { MouseEventHandler, ReactNode } from 'react';
|
|
5
|
+
type RangePickerProps = GetProps<typeof DatePicker.RangePicker>;
|
|
5
6
|
export interface fieldType {
|
|
6
7
|
field: string;
|
|
7
8
|
label?: string;
|
|
@@ -79,11 +80,13 @@ export type CustomSearchFieldType = {
|
|
|
79
80
|
allowClear?: boolean;
|
|
80
81
|
isShowInterval?: boolean;
|
|
81
82
|
disabled?: boolean;
|
|
83
|
+
disabledDate?: RangePickerProps['disabledDate'];
|
|
84
|
+
disabledTime?: RangePickerProps['disabledTime'];
|
|
82
85
|
min?: number;
|
|
83
86
|
max?: number;
|
|
84
87
|
step?: number;
|
|
85
88
|
precision?: number;
|
|
86
|
-
showSearch?: boolean;
|
|
89
|
+
showSearch?: boolean | Object;
|
|
87
90
|
handleSearch?: () => void;
|
|
88
91
|
suffix?: string;
|
|
89
92
|
isFilter?: boolean;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1
7
|
import React from 'react';
|
|
2
8
|
import { useConfig } from "../ConfigProvider";
|
|
3
9
|
// @ts-ignore
|
|
@@ -5,6 +11,7 @@ import defaultEmptyDarkImage from "../../assets/images/data-empty-dark.svg";
|
|
|
5
11
|
// @ts-ignore
|
|
6
12
|
import defaultEmptyLightImage from "../../assets/images/data-empty-light.svg";
|
|
7
13
|
import "./index.less";
|
|
14
|
+
import { useTranslation } from "../../hooks/useTranslation";
|
|
8
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
17
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -23,13 +30,15 @@ var emptyDataRender = function emptyDataRender(dynamicTheme, darkImage, lightIma
|
|
|
23
30
|
var Empty = function Empty(_ref) {
|
|
24
31
|
var emptyDarkImage = _ref.emptyDarkImage,
|
|
25
32
|
emptyLightImage = _ref.emptyLightImage,
|
|
26
|
-
|
|
27
|
-
text = _ref$text === void 0 ? "暂无数据" : _ref$text;
|
|
33
|
+
text = _ref.text;
|
|
28
34
|
var _useConfig = useConfig(),
|
|
29
35
|
theme = _useConfig.theme,
|
|
30
36
|
renderEmpty = _useConfig.renderEmpty;
|
|
37
|
+
var _useTranslation = useTranslation(),
|
|
38
|
+
_useTranslation2 = _slicedToArray(_useTranslation, 1),
|
|
39
|
+
t = _useTranslation2[0];
|
|
31
40
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
32
|
-
children: emptyDarkImage && emptyLightImage ? emptyDataRender(theme, emptyDarkImage, emptyLightImage, text) : renderEmpty ? renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty(theme) : emptyDataRender(theme, defaultEmptyDarkImage, defaultEmptyLightImage, text)
|
|
41
|
+
children: emptyDarkImage && emptyLightImage ? emptyDataRender(theme, emptyDarkImage, emptyLightImage, t('global.text.emptyText')) : renderEmpty ? renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty(theme) : emptyDataRender(theme, defaultEmptyDarkImage, defaultEmptyLightImage, t('global.text.emptyText'))
|
|
33
42
|
});
|
|
34
43
|
};
|
|
35
44
|
export default Empty;
|
|
@@ -106,8 +106,9 @@ var confirmModal = function confirmModal(_ref4) {
|
|
|
106
106
|
deleteActionName = _ref4.deleteActionName;
|
|
107
107
|
Modal.confirm({
|
|
108
108
|
title: title ? title : '确认删除这条信息吗?',
|
|
109
|
+
// '确认删除这条信息吗?',
|
|
109
110
|
content: content || content === '' ? content : '删除后可能无法恢复,请谨慎操作!',
|
|
110
|
-
okText: okText ? okText : '
|
|
111
|
+
okText: okText ? okText : '确定',
|
|
111
112
|
cancelText: cancelText ? cancelText : '取消',
|
|
112
113
|
styles: {
|
|
113
114
|
body: themeStyle('bodyStyle'),
|
|
@@ -28,6 +28,7 @@ import RemoteCascader from "./RemoteCascader";
|
|
|
28
28
|
import RemoteSelect from "./RemoteSelectCom";
|
|
29
29
|
import "./index.less";
|
|
30
30
|
import { FormItemType, TimeFormatType } from "./type";
|
|
31
|
+
import { useTranslation } from "../../hooks/useTranslation";
|
|
31
32
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
32
33
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
34
|
export var typeList = {
|
|
@@ -39,10 +40,8 @@ export var typeList = {
|
|
|
39
40
|
var QueryFilter = function QueryFilter(_ref, ref) {
|
|
40
41
|
var data = _ref.data,
|
|
41
42
|
initialValues = _ref.initialValues,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
_ref$cancelText = _ref.cancelText,
|
|
45
|
-
cancelText = _ref$cancelText === void 0 ? '重置' : _ref$cancelText,
|
|
43
|
+
isOkText = _ref.isOkText,
|
|
44
|
+
cancelText = _ref.cancelText,
|
|
46
45
|
handleSubmit = _ref.handleSubmit,
|
|
47
46
|
handleCancel = _ref.handleCancel,
|
|
48
47
|
_ref$showButton = _ref.showButton,
|
|
@@ -53,6 +52,9 @@ var QueryFilter = function QueryFilter(_ref, ref) {
|
|
|
53
52
|
_ref$renderButton = _ref.renderButton,
|
|
54
53
|
renderButton = _ref$renderButton === void 0 ? null : _ref$renderButton,
|
|
55
54
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
55
|
+
var _useTranslation = useTranslation(),
|
|
56
|
+
_useTranslation2 = _slicedToArray(_useTranslation, 1),
|
|
57
|
+
t = _useTranslation2[0];
|
|
56
58
|
var _Form$useForm = Form.useForm(),
|
|
57
59
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
58
60
|
form = _Form$useForm2[0];
|
|
@@ -336,7 +338,7 @@ var QueryFilter = function QueryFilter(_ref, ref) {
|
|
|
336
338
|
break;
|
|
337
339
|
case FormItemType.DateTime:
|
|
338
340
|
element = /*#__PURE__*/_jsx(DatePicker, {
|
|
339
|
-
showTime:
|
|
341
|
+
showTime: item.showTimeFormat,
|
|
340
342
|
style: {
|
|
341
343
|
width: item !== null && item !== void 0 && item.wapperWidth ? item === null || item === void 0 ? void 0 : item.wapperWidth : '100%'
|
|
342
344
|
},
|
|
@@ -349,7 +351,8 @@ var QueryFilter = function QueryFilter(_ref, ref) {
|
|
|
349
351
|
}),
|
|
350
352
|
placeholder: item.inputTips,
|
|
351
353
|
allowClear: item === null || item === void 0 ? void 0 : item.allowClear,
|
|
352
|
-
presets: item === null || item === void 0 ? void 0 : item.presets
|
|
354
|
+
presets: item === null || item === void 0 ? void 0 : item.presets,
|
|
355
|
+
picker: item === null || item === void 0 ? void 0 : item.picker
|
|
353
356
|
});
|
|
354
357
|
break;
|
|
355
358
|
case FormItemType.DateRang:
|
|
@@ -657,7 +660,7 @@ var QueryFilter = function QueryFilter(_ref, ref) {
|
|
|
657
660
|
form.resetFields();
|
|
658
661
|
}, 200);
|
|
659
662
|
},
|
|
660
|
-
children: cancelText
|
|
663
|
+
children: cancelText || t('global.button.reset')
|
|
661
664
|
}), /*#__PURE__*/_jsx(Button, {
|
|
662
665
|
type: "primary",
|
|
663
666
|
className: "xmTtn",
|
|
@@ -665,7 +668,7 @@ var QueryFilter = function QueryFilter(_ref, ref) {
|
|
|
665
668
|
onClick: function onClick() {
|
|
666
669
|
return form.submit();
|
|
667
670
|
},
|
|
668
|
-
children: isOkText
|
|
671
|
+
children: isOkText || t('global.button.confirm')
|
|
669
672
|
})]
|
|
670
673
|
})
|
|
671
674
|
}), renderButton ? /*#__PURE__*/_jsx(Form.Item, {
|