@arim-aisdc/public-components 1.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/images/data.empty-dark.svg +45 -0
- package/dist/components/BaseInfo/BaseInfo.js +2 -3
- package/dist/components/CenterModal/CenterModal.js +5 -4
- package/dist/components/ColorSelector/ColorSelector.js +2 -3
- package/dist/components/CustomForm/CustomForm.js +48 -76
- package/dist/components/Drawer/Drawer.js +50 -69
- package/dist/components/Drawer/type.d.ts +1 -0
- package/dist/components/Filter/FilterInputNumber/index.js +2 -3
- package/dist/components/Filter/FilterRadio/index.js +4 -7
- package/dist/components/Filter/FilterSelect/index.js +3 -4
- package/dist/components/Filter/FilterSlider/index.js +2 -3
- package/dist/components/Filter/FilterSwitch/index.js +2 -3
- package/dist/components/GlobalTip/MessageTip/MessageTip.js +2 -3
- package/dist/components/GlobalTip/ModalTip/ModalTip.d.ts +1 -0
- package/dist/components/GlobalTip/ModalTip/ModalTip.js +13 -10
- package/dist/components/Permission/NoPermission.js +3 -6
- package/dist/components/QueryFilter/QueryFilter.js +92 -91
- package/dist/components/SchemaForm/SchemaForm.js +2 -3
- package/dist/components/SchemaForm/utils.js +3 -3
- package/dist/components/TableMax/TableBody/Row.js +2 -3
- package/dist/components/TableMax/TableBody/index.js +2 -3
- package/dist/components/TableMax/TableHeader/Cell.js +2 -3
- package/dist/components/TableMax/TableMax.js +10 -17
- package/dist/components/TableMax/components/ColumnEdit/components/numberRange/index.js +3 -4
- package/dist/components/TableMax/components/ColumnEdit/index.js +8 -19
- package/dist/components/TableMax/components/ColumnFilter/FilterDateRange/index.js +10 -11
- package/dist/components/TableMax/components/ColumnFilter/MultipleSelect/index.js +2 -3
- package/dist/components/TableMax/components/ColumnFilter/SingleSelect/index.js +2 -3
- package/dist/components/TableMax/components/ColumnFilter/index.js +9 -16
- package/dist/components/TableMax/components/ColumnSetting/index.js +5 -10
- package/dist/components/TableMax/components/ColumnSort/customSortFns.d.ts +8 -8
- package/dist/components/TableMax/components/ColumnSort/customSortFns.js +3 -3
- package/dist/components/TableMax/components/PaginationV2/index.js +3 -6
- package/dist/components/TableMax/utils.js +3 -3
- package/dist/components/ThemeProvider/ThemeProvider.js +6 -6
- package/dist/utils/request.js +4 -7
- package/package.json +6 -6
|
@@ -1,81 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function
|
|
4
|
-
function
|
|
5
|
-
function
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
-
import React, { useEffect, useState } from 'react';
|
|
11
|
-
import ResizeObserver from 'resize-observer-polyfill';
|
|
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
|
+
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
|
+
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
|
+
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(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
|
+
import { Drawer } from 'antd';
|
|
8
|
+
import React from 'react';
|
|
12
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
11
|
var DrawerCom = function DrawerCom(_ref) {
|
|
15
12
|
var open = _ref.open,
|
|
16
13
|
title = _ref.title,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_ref$
|
|
20
|
-
|
|
21
|
-
placement = _ref.placement,
|
|
14
|
+
width = _ref.width,
|
|
15
|
+
height = _ref.height,
|
|
16
|
+
_ref$placement = _ref.placement,
|
|
17
|
+
placement = _ref$placement === void 0 ? "right" : _ref$placement,
|
|
22
18
|
renderContent = _ref.renderContent,
|
|
23
19
|
bodyPadding = _ref.bodyPadding,
|
|
20
|
+
bodyStyle = _ref.bodyStyle,
|
|
24
21
|
handleCancel = _ref.handleCancel;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return function () {
|
|
63
|
-
myObserver.disconnect();
|
|
64
|
-
};
|
|
65
|
-
}, [width, height, placement]);
|
|
66
|
-
return /*#__PURE__*/_jsx(_Drawer, {
|
|
67
|
-
contentWrapperStyle: {
|
|
68
|
-
width: contentWidth,
|
|
69
|
-
left: 'auto',
|
|
70
|
-
top: 'auto',
|
|
71
|
-
height: contentHeight,
|
|
72
|
-
padding: 0
|
|
22
|
+
// const [contentWidth, setContentWidth] = useState<string | number>(378);
|
|
23
|
+
// const [contentHeight, setContentHeight] = useState<string | number>(378);
|
|
24
|
+
|
|
25
|
+
// useEffect(() => {
|
|
26
|
+
// let myObserver = new ResizeObserver(entries => {
|
|
27
|
+
// for (let entrie of entries) {
|
|
28
|
+
// // @ts-ignore
|
|
29
|
+
// let { offsetWidth } = entrie.target;
|
|
30
|
+
// if (placement === 'top' || placement === 'bottom') {
|
|
31
|
+
// setContentHeight(height);
|
|
32
|
+
// setContentWidth(offsetWidth);
|
|
33
|
+
// } else {
|
|
34
|
+
// setContentHeight('100%');
|
|
35
|
+
// setContentWidth(width);
|
|
36
|
+
// }
|
|
37
|
+
// }
|
|
38
|
+
// });
|
|
39
|
+
// //监听
|
|
40
|
+
// const dom = document.getElementById('ganttWrapper');
|
|
41
|
+
// if (dom) {
|
|
42
|
+
// myObserver.observe(dom);
|
|
43
|
+
// }
|
|
44
|
+
// // 移除监听w
|
|
45
|
+
// return () => {
|
|
46
|
+
// myObserver.disconnect();
|
|
47
|
+
// };
|
|
48
|
+
// }, [width, height, placement]);
|
|
49
|
+
console.log(placement, width, 'placement');
|
|
50
|
+
return /*#__PURE__*/_jsx(Drawer, {
|
|
51
|
+
styles: {
|
|
52
|
+
wrapper: {
|
|
53
|
+
width: width ? "".concat(width, "px") : placement === 'top' || placement === 'bottom' ? '100%' : '25%',
|
|
54
|
+
height: height ? "".concat(height, "px") : placement === 'top' || placement === 'bottom' ? '25%' : '100%'
|
|
55
|
+
},
|
|
56
|
+
body: _objectSpread(_objectSpread({}, bodyStyle), {}, {
|
|
57
|
+
padding: bodyPadding
|
|
58
|
+
})
|
|
73
59
|
},
|
|
74
|
-
bodyStyle: {
|
|
75
|
-
padding: bodyPadding
|
|
76
|
-
}
|
|
77
|
-
// className={styles.drawer}
|
|
78
|
-
,
|
|
79
60
|
closable: false,
|
|
80
61
|
destroyOnClose: true,
|
|
81
62
|
title: title,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import "antd
|
|
2
|
-
import _InputNumber from "antd/es/input-number";
|
|
1
|
+
import { InputNumber } from "antd";
|
|
3
2
|
import React from "react";
|
|
4
3
|
import "./index.less";
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -38,7 +37,7 @@ var FilterInputNumber = function FilterInputNumber(_ref) {
|
|
|
38
37
|
children: title
|
|
39
38
|
}), /*#__PURE__*/_jsx("div", {
|
|
40
39
|
className: "filterItemContent",
|
|
41
|
-
children: /*#__PURE__*/_jsx(
|
|
40
|
+
children: /*#__PURE__*/_jsx(InputNumber, {
|
|
42
41
|
step: step,
|
|
43
42
|
min: min,
|
|
44
43
|
max: max,
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import "antd
|
|
2
|
-
import _Radio from "antd/es/radio";
|
|
3
|
-
import "antd/es/select/style";
|
|
4
|
-
import _Select from "antd/es/select";
|
|
1
|
+
import { Radio, Select } from "antd";
|
|
5
2
|
import React from "react";
|
|
6
3
|
import "./index.less";
|
|
7
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
var Option =
|
|
6
|
+
var Option = Select.Option;
|
|
10
7
|
var FilterRadio = function FilterRadio(_ref) {
|
|
11
8
|
var title = _ref.title,
|
|
12
9
|
name = _ref.name,
|
|
@@ -40,11 +37,11 @@ var FilterRadio = function FilterRadio(_ref) {
|
|
|
40
37
|
children: title
|
|
41
38
|
}), /*#__PURE__*/_jsx("div", {
|
|
42
39
|
className: "filterItemContent",
|
|
43
|
-
children: /*#__PURE__*/_jsx(
|
|
40
|
+
children: /*#__PURE__*/_jsx(Radio.Group, {
|
|
44
41
|
onChange: handleChange,
|
|
45
42
|
defaultValue: defaultValue,
|
|
46
43
|
children: dataList.map(function (item, index) {
|
|
47
|
-
return /*#__PURE__*/_jsx(
|
|
44
|
+
return /*#__PURE__*/_jsx(Radio.Button, {
|
|
48
45
|
value: item.value,
|
|
49
46
|
children: item.label
|
|
50
47
|
}, index);
|
|
@@ -1,16 +1,15 @@
|
|
|
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
|
-
import "antd/es/select/style";
|
|
3
|
-
import _Select from "antd/es/select";
|
|
4
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; }
|
|
5
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; }
|
|
6
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; }
|
|
7
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
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
|
+
import { Select } from "antd";
|
|
9
8
|
import React from "react";
|
|
10
9
|
import "./index.less";
|
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
var Option =
|
|
12
|
+
var Option = Select.Option;
|
|
14
13
|
var FilterSelect = function FilterSelect(_ref) {
|
|
15
14
|
var title = _ref.title,
|
|
16
15
|
name = _ref.name,
|
|
@@ -42,7 +41,7 @@ var FilterSelect = function FilterSelect(_ref) {
|
|
|
42
41
|
children: title
|
|
43
42
|
}), /*#__PURE__*/_jsx("div", {
|
|
44
43
|
className: "filterItemContent",
|
|
45
|
-
children: /*#__PURE__*/_jsx(
|
|
44
|
+
children: /*#__PURE__*/_jsx(Select, {
|
|
46
45
|
defaultValue: defaultValue,
|
|
47
46
|
onChange: handleChange,
|
|
48
47
|
children: dataList.map(function (item) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Slider from "antd/es/slider";
|
|
1
|
+
import { Slider } from 'antd';
|
|
3
2
|
import "./index.less";
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
4
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -40,7 +39,7 @@ var FilterSilder = function FilterSilder(_ref) {
|
|
|
40
39
|
children: title
|
|
41
40
|
}), /*#__PURE__*/_jsx("div", {
|
|
42
41
|
className: "filterItemContent",
|
|
43
|
-
children: /*#__PURE__*/_jsx(
|
|
42
|
+
children: /*#__PURE__*/_jsx(Slider, {
|
|
44
43
|
max: maxValue,
|
|
45
44
|
min: minValue,
|
|
46
45
|
value: defaultValue,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import "antd/es/switch/style";
|
|
2
|
-
import _Switch from "antd/es/switch";
|
|
3
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); }
|
|
4
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; }
|
|
5
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; }
|
|
6
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; }
|
|
7
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
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
|
+
import { Switch } from "antd";
|
|
9
8
|
import React from "react";
|
|
10
9
|
import "./index.less";
|
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -41,7 +40,7 @@ var FilterSwitch = function FilterSwitch(_ref) {
|
|
|
41
40
|
children: title
|
|
42
41
|
}), /*#__PURE__*/_jsx("div", {
|
|
43
42
|
className: "filterItemContent",
|
|
44
|
-
children: /*#__PURE__*/_jsx(
|
|
43
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
|
45
44
|
defaultChecked: defaultValue,
|
|
46
45
|
onChange: onChange
|
|
47
46
|
})
|
|
@@ -1,11 +1,10 @@
|
|
|
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
|
-
import "antd/es/message/style";
|
|
3
|
-
import _message from "antd/es/message";
|
|
4
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; }
|
|
5
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; }
|
|
6
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; }
|
|
7
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
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
|
+
import { message } from 'antd';
|
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
9
|
var defaultTipIconMap = {
|
|
11
10
|
success: 'iconfont-theme-dark-four icon-theme-dark-four-successful',
|
|
@@ -23,7 +22,7 @@ var messageConfig = function messageConfig(_ref) {
|
|
|
23
22
|
_ref$tipIconMap = _ref.tipIconMap,
|
|
24
23
|
tipIconMap = _ref$tipIconMap === void 0 ? defaultTipIconMap : _ref$tipIconMap;
|
|
25
24
|
var defaultDuration = tipCode === 'loading' ? 0 : 2;
|
|
26
|
-
|
|
25
|
+
message.success({
|
|
27
26
|
key: key,
|
|
28
27
|
icon: /*#__PURE__*/_jsx("span", {
|
|
29
28
|
className: "".concat(tipCode, "Icon"),
|
|
@@ -8,5 +8,6 @@ declare const ModalTip: {
|
|
|
8
8
|
info: (info: ModalTipType) => void;
|
|
9
9
|
attention: (info: ModalTipType) => void;
|
|
10
10
|
delete: (info: ModalDeleteType, theme?: 'light' | 'dark') => void;
|
|
11
|
+
confirm: (info: ModalDeleteType, theme?: 'light' | 'dark') => void;
|
|
11
12
|
};
|
|
12
13
|
export default ModalTip;
|
|
@@ -1,6 +1,4 @@
|
|
|
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
|
-
import "antd/es/modal/style";
|
|
3
|
-
import _Modal from "antd/es/modal";
|
|
4
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
5
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
6
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -9,6 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
9
7
|
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; }
|
|
10
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
9
|
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); }
|
|
10
|
+
import { Modal } from 'antd';
|
|
12
11
|
import MessageTip from "../MessageTip";
|
|
13
12
|
import "./index.less";
|
|
14
13
|
import { themeStyle } from "./utils";
|
|
@@ -55,7 +54,7 @@ var createModal = function createModal(_ref2) {
|
|
|
55
54
|
title = _ref2.title,
|
|
56
55
|
content = _ref2.content,
|
|
57
56
|
duration = _ref2.duration;
|
|
58
|
-
modal =
|
|
57
|
+
modal = Modal.info(_objectSpread({}, config({
|
|
59
58
|
tipCode: tipCode,
|
|
60
59
|
title: title,
|
|
61
60
|
content: content,
|
|
@@ -79,7 +78,7 @@ var updateModal = function updateModal(_ref3) {
|
|
|
79
78
|
afterClose: afterClose
|
|
80
79
|
}));
|
|
81
80
|
} else {
|
|
82
|
-
|
|
81
|
+
Modal.success(_objectSpread({}, config({
|
|
83
82
|
tipCode: tipCode,
|
|
84
83
|
title: title,
|
|
85
84
|
content: content,
|
|
@@ -89,7 +88,7 @@ var updateModal = function updateModal(_ref3) {
|
|
|
89
88
|
setTimeout(function () {
|
|
90
89
|
var _modal;
|
|
91
90
|
(_modal = modal) === null || _modal === void 0 || _modal.destroy();
|
|
92
|
-
|
|
91
|
+
Modal.destroyAll();
|
|
93
92
|
afterClose === null || afterClose === void 0 || afterClose();
|
|
94
93
|
}, duration);
|
|
95
94
|
};
|
|
@@ -102,15 +101,16 @@ var confirmModal = function confirmModal(_ref4, theme) {
|
|
|
102
101
|
cancelText = _ref4.cancelText,
|
|
103
102
|
centered = _ref4.centered,
|
|
104
103
|
deleteActionName = _ref4.deleteActionName;
|
|
105
|
-
|
|
104
|
+
Modal.confirm({
|
|
106
105
|
title: title ? title : '确认删除这条信息吗?',
|
|
107
106
|
content: content ? content : '删除后可能无法恢复,请谨慎操作!',
|
|
108
107
|
okText: okText ? okText : '确认',
|
|
109
108
|
cancelText: cancelText ? cancelText : '取消',
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
styles: {
|
|
110
|
+
body: themeStyle('bodyStyle', theme),
|
|
111
|
+
// 背景颜色
|
|
112
|
+
mask: themeStyle('maskStyle', theme) // 网罩颜色
|
|
113
|
+
},
|
|
114
114
|
okButtonProps: {
|
|
115
115
|
style: themeStyle('okButtonProps', theme)
|
|
116
116
|
},
|
|
@@ -186,6 +186,9 @@ var ModalTip = {
|
|
|
186
186
|
},
|
|
187
187
|
delete: function _delete(info, theme) {
|
|
188
188
|
return confirmModal(info, theme);
|
|
189
|
+
},
|
|
190
|
+
confirm: function confirm(info, theme) {
|
|
191
|
+
return confirmModal(info, theme);
|
|
189
192
|
}
|
|
190
193
|
};
|
|
191
194
|
export default ModalTip;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Result from "antd/es/result";
|
|
3
|
-
import "antd/es/button/style";
|
|
4
|
-
import _Button from "antd/es/button";
|
|
1
|
+
import { Button, Result } from 'antd';
|
|
5
2
|
import React from 'react';
|
|
6
3
|
import { useNavigate } from 'react-router-dom';
|
|
7
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
5
|
var NoPermissionPage = function NoPermissionPage() {
|
|
9
6
|
var navigate = useNavigate();
|
|
10
|
-
return /*#__PURE__*/_jsx(
|
|
7
|
+
return /*#__PURE__*/_jsx(Result, {
|
|
11
8
|
status: "403",
|
|
12
9
|
title: "403",
|
|
13
10
|
subTitle: "\u62B1\u6B49\uFF0C\u60A8\u6CA1\u6709\u8BE5\u9875\u9762\u7684\u8BBF\u95EE\u6743\u9650",
|
|
14
|
-
extra: /*#__PURE__*/_jsx(
|
|
11
|
+
extra: /*#__PURE__*/_jsx(Button, {
|
|
15
12
|
type: "primary",
|
|
16
13
|
onClick: function onClick() {
|
|
17
14
|
return navigate(-1);
|