tntd 1.4.23 → 1.4.26
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/babel.config.js +22 -21
- package/components/QueryForm/Field/SelectInput.js +1 -0
- package/dist/stats.json +5057 -5057
- package/dist/tntd.js +1 -1
- package/es/ArrayInput/icon.js +11 -3
- package/es/ArrayInput/index.js +67 -57
- package/es/AuthContext.js +13 -3
- package/es/Columns/index.js +24 -12
- package/es/DevelopmentLogin/LoginModal.js +29 -22
- package/es/DevelopmentLogin/index.js +29 -13
- package/es/Ellipsis/Svg/CopySVG.js +11 -2
- package/es/Ellipsis/Svg/TickSVG.js +11 -2
- package/es/Ellipsis/index.js +33 -25
- package/es/Handle/README.md +20 -0
- package/es/Handle/index.js +46 -29
- package/es/Icon/fonts/iconfont.js +2 -0
- package/es/Icon/iconList.js +8 -1
- package/es/Icon/index.js +25 -5
- package/es/Img/Contain.js +21 -8
- package/es/Img/Cover.js +29 -11
- package/es/Img/index.js +22 -8
- package/es/Layout/ActionsContext.js +12 -2
- package/es/Layout/AppList.js +58 -42
- package/es/Layout/Application.js +44 -24
- package/es/Layout/Avatar.js +45 -23
- package/es/Layout/CompatibleLanguage.js +51 -29
- package/es/Layout/EnterpriseLayout/Avatar.js +54 -32
- package/es/Layout/EnterpriseLayout/Language.js +39 -15
- package/es/Layout/EnterpriseLayout/Theme.js +31 -15
- package/es/Layout/EnterpriseLayout/index.js +24 -9
- package/es/Layout/GlobalNavigation/NavigationPopup.js +53 -29
- package/es/Layout/GlobalNavigation/index.js +51 -23
- package/es/Layout/Header.js +40 -19
- package/es/Layout/HeaderActions.js +43 -19
- package/es/Layout/HeaderNavs.js +35 -12
- package/es/Layout/HeaderTabs.js +50 -25
- package/es/Layout/Iconfont.js +16 -4
- package/es/Layout/Language.js +38 -14
- package/es/Layout/Layout.js +58 -32
- package/es/Layout/Logo.js +26 -12
- package/es/Layout/OrgAppList.js +52 -36
- package/es/Layout/SideMenu.js +57 -32
- package/es/Layout/Theme.js +39 -21
- package/es/Layout/createActions.js +19 -6
- package/es/Layout/images/index.js +95 -58
- package/es/Layout/index.js +70 -28
- package/es/Layout/paaslayout/CompactSideMenu.js +35 -17
- package/es/Layout/paaslayout/Header.js +31 -17
- package/es/Layout/paaslayout/Logo.js +19 -9
- package/es/Layout/paaslayout/SideMenu.js +29 -12
- package/es/Layout/paaslayout/index.js +58 -32
- package/es/Layout/storage.js +71 -21
- package/es/LoadingButton/index.js +17 -8
- package/es/Modal/index.js +29 -16
- package/es/Page/Box.js +18 -8
- package/es/Page/index.js +47 -29
- package/es/Page/utils.js +12 -1
- package/es/QueryForm/Field/Checkbox.js +13 -5
- package/es/QueryForm/Field/Select.js +28 -12
- package/es/QueryForm/Field/SelectInput.js +35 -19
- package/es/QueryForm/Field/fieldsMap.js +36 -23
- package/es/QueryForm/Field/index.js +25 -12
- package/es/QueryForm/createActions.js +20 -7
- package/es/QueryForm/index.js +66 -50
- package/es/QueryForm/useForm.js +16 -4
- package/es/QueryListScene/List.js +43 -30
- package/es/QueryListScene/QueryForm.js +21 -9
- package/es/QueryListScene/QueryListScene.js +29 -16
- package/es/QueryListScene/Title.js +17 -5
- package/es/QueryListScene/Toolbar.js +16 -4
- package/es/QueryListScene/createActions.js +26 -13
- package/es/QueryListScene/index.js +40 -19
- package/es/QueryListScene/useActions.js +16 -4
- package/es/Select/DropDownWrap.js +18 -6
- package/es/Select/index.js +28 -15
- package/es/Table/ResizableTable/index.js +32 -18
- package/es/Table/index.js +30 -11
- package/es/Title/index.js +18 -5
- package/es/index.js +193 -20
- package/es/locale.js +27 -8
- package/es/utils/checkAuth.js +15 -4
- package/es/utils/findMenuInfoByPath.js +16 -5
- package/es/utils/index.js +70 -10
- package/lib/ArrayInput/index.js +12 -28
- package/lib/Columns/index.js +4 -10
- package/lib/DevelopmentLogin/LoginModal.js +9 -23
- package/lib/Ellipsis/index.js +4 -10
- package/lib/Handle/README.md +20 -0
- package/lib/Handle/index.js +9 -19
- package/lib/Layout/AppList.js +12 -30
- package/lib/Layout/Application.js +3 -5
- package/lib/Layout/Avatar.js +6 -12
- package/lib/Layout/CompatibleLanguage.js +3 -5
- package/lib/Layout/EnterpriseLayout/Avatar.js +8 -18
- package/lib/Layout/EnterpriseLayout/Theme.js +3 -5
- package/lib/Layout/HeaderActions.js +5 -7
- package/lib/Layout/Layout.js +7 -9
- package/lib/Layout/OrgAppList.js +7 -19
- package/lib/Layout/SideMenu.js +7 -9
- package/lib/Layout/Theme.js +3 -5
- package/lib/Layout/paaslayout/index.js +8 -10
- package/lib/LoadingButton/index.js +2 -6
- package/lib/Modal/index.js +3 -5
- package/lib/Page/Box.js +3 -5
- package/lib/QueryForm/Field/Checkbox.js +2 -6
- package/lib/QueryForm/Field/Select.js +4 -8
- package/lib/QueryForm/Field/SelectInput.js +7 -14
- package/lib/QueryForm/Field/fieldsMap.js +8 -18
- package/lib/QueryForm/Field/index.js +3 -7
- package/lib/QueryForm/index.js +13 -27
- package/lib/QueryListScene/List.js +5 -7
- package/lib/Select/index.js +8 -14
- package/lib/Table/ResizableTable/index.js +3 -5
- package/lib/Table/index.js +5 -7
- package/package.json +1 -1
- package/es/Layout/checkAuth.js +0 -29
- package/es/Layout/utils.js +0 -136
- package/lib/Layout/EnterpriseLayout/Header.js +0 -113
- package/lib/Layout/EnterpriseLayout/HeaderActions.js +0 -104
- package/lib/Layout/checkAuth.js +0 -39
- package/lib/Layout/utils.js +0 -166
package/es/Ellipsis/index.js
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
var _copyToClipboard = _interopRequireDefault(require("copy-to-clipboard"));
|
|
13
|
+
|
|
14
|
+
var _CopySVG = _interopRequireDefault(require("./Svg/CopySVG"));
|
|
15
|
+
|
|
16
|
+
var _TickSVG = _interopRequireDefault(require("./Svg/TickSVG"));
|
|
17
|
+
|
|
18
|
+
require("./index.less");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
5
21
|
|
|
6
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
7
23
|
|
|
@@ -19,16 +35,6 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
|
|
|
19
35
|
|
|
20
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
37
|
|
|
22
|
-
/*
|
|
23
|
-
* @Author: 梁洪刚
|
|
24
|
-
* @CreatDate: 2021-03-31 13:57:32
|
|
25
|
-
* @Describe: 省略号组件
|
|
26
|
-
*/
|
|
27
|
-
import { useState, useEffect, useRef } from 'react';
|
|
28
|
-
import copy from 'copy-to-clipboard';
|
|
29
|
-
import CopySVG from './Svg/CopySVG';
|
|
30
|
-
import TickSVG from './Svg/TickSVG';
|
|
31
|
-
import './index.less';
|
|
32
38
|
var tolerance = 0; // In px. Depends on the font you are using
|
|
33
39
|
|
|
34
40
|
var isEllipsisActive = function isEllipsisActive(e) {
|
|
@@ -47,7 +53,7 @@ var isEllipsisActive = function isEllipsisActive(e) {
|
|
|
47
53
|
return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight;
|
|
48
54
|
};
|
|
49
55
|
|
|
50
|
-
|
|
56
|
+
var _default = function _default(props) {
|
|
51
57
|
var _props$_popover = props._popover,
|
|
52
58
|
_popover = _props$_popover === void 0 ? props.Popover : _props$_popover,
|
|
53
59
|
title = props.title,
|
|
@@ -65,25 +71,25 @@ export default (function (props) {
|
|
|
65
71
|
suffix = props.suffix; // allow visible or not state
|
|
66
72
|
|
|
67
73
|
|
|
68
|
-
var _useState = useState(true),
|
|
74
|
+
var _useState = (0, _react.useState)(true),
|
|
69
75
|
_useState2 = _slicedToArray(_useState, 2),
|
|
70
76
|
flag = _useState2[0],
|
|
71
77
|
setFlag = _useState2[1]; // visible[Tooltip/Popover] state
|
|
72
78
|
|
|
73
79
|
|
|
74
|
-
var _useState3 = useState(false),
|
|
80
|
+
var _useState3 = (0, _react.useState)(false),
|
|
75
81
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
76
82
|
tipVisible = _useState4[0],
|
|
77
83
|
setTipVisible = _useState4[1]; // copy animation state
|
|
78
84
|
|
|
79
85
|
|
|
80
|
-
var _useState5 = useState(false),
|
|
86
|
+
var _useState5 = (0, _react.useState)(false),
|
|
81
87
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
82
88
|
hasCopy = _useState6[0],
|
|
83
89
|
setHasCopy = _useState6[1];
|
|
84
90
|
|
|
85
|
-
var elementRef = useRef();
|
|
86
|
-
useEffect(function () {
|
|
91
|
+
var elementRef = (0, _react.useRef)();
|
|
92
|
+
(0, _react.useEffect)(function () {
|
|
87
93
|
elementRef.current && isEllipsisActive(elementRef.current) ? setFlag(true) : (setFlag(false), setTipVisible(false));
|
|
88
94
|
}); // original Node
|
|
89
95
|
|
|
@@ -102,7 +108,7 @@ export default (function (props) {
|
|
|
102
108
|
|
|
103
109
|
|
|
104
110
|
var handleCopy = function handleCopy(innerText) {
|
|
105
|
-
|
|
111
|
+
(0, _copyToClipboard["default"])(innerText);
|
|
106
112
|
setHasCopy(!hasCopy);
|
|
107
113
|
setTimeout(function () {
|
|
108
114
|
setHasCopy(false);
|
|
@@ -110,7 +116,7 @@ export default (function (props) {
|
|
|
110
116
|
};
|
|
111
117
|
|
|
112
118
|
var renderNode = function renderNode() {
|
|
113
|
-
var popoverNode = React.createElement(
|
|
119
|
+
var popoverNode = React.createElement(_antd.Popover, _extends({}, props, {
|
|
114
120
|
content: content || children,
|
|
115
121
|
visible: tipVisible,
|
|
116
122
|
onVisibleChange: function onVisibleChange(visible) {
|
|
@@ -123,7 +129,7 @@ export default (function (props) {
|
|
|
123
129
|
},
|
|
124
130
|
ref: elementRef
|
|
125
131
|
}, children || content));
|
|
126
|
-
var tooltipNode = React.createElement(
|
|
132
|
+
var tooltipNode = React.createElement(_antd.Tooltip, _extends({}, props, {
|
|
127
133
|
title: title || children,
|
|
128
134
|
visible: tipVisible,
|
|
129
135
|
onVisibleChange: function onVisibleChange(visible) {
|
|
@@ -151,5 +157,7 @@ export default (function (props) {
|
|
|
151
157
|
onClick: function onClick() {
|
|
152
158
|
return handleCopy(elementRef.current.innerText);
|
|
153
159
|
}
|
|
154
|
-
}, !hasCopy ? React.createElement(
|
|
155
|
-
}
|
|
160
|
+
}, !hasCopy ? React.createElement(_CopySVG["default"], null) : React.createElement(_TickSVG["default"], null))));
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
exports["default"] = _default;
|
package/es/Handle/README.md
CHANGED
|
@@ -54,6 +54,26 @@ const Demo = props => {
|
|
|
54
54
|
<a>查看</a>
|
|
55
55
|
<a>编辑</a>
|
|
56
56
|
<a>测试</a>
|
|
57
|
+
{
|
|
58
|
+
false &&
|
|
59
|
+
<a>导入</a>
|
|
60
|
+
}
|
|
61
|
+
<a>导出</a>
|
|
62
|
+
<Popconfirm
|
|
63
|
+
title="Are you sure delete this task?"
|
|
64
|
+
onConfirm={void 0}
|
|
65
|
+
onCancel={void 0}
|
|
66
|
+
okText="Yes"
|
|
67
|
+
cancelText="No"
|
|
68
|
+
onClick={e => e.stopPropagation()}
|
|
69
|
+
getPopupContainer={trigger => trigger.parentNode}
|
|
70
|
+
trigger="hover"
|
|
71
|
+
overlayStyle={{
|
|
72
|
+
width: 300
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
<a>Delete</a>
|
|
76
|
+
</Popconfirm>
|
|
57
77
|
</Handle>
|
|
58
78
|
)
|
|
59
79
|
}
|
package/es/Handle/index.js
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
|
|
14
|
+
var _locale = require("../locale");
|
|
15
|
+
|
|
16
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
17
|
+
|
|
18
|
+
require("./index.less");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
7
25
|
|
|
8
26
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
27
|
|
|
@@ -17,12 +35,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
17
35
|
|
|
18
36
|
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; }
|
|
19
37
|
|
|
20
|
-
import React, { Fragment } from 'react';
|
|
21
|
-
import { getText, getLanguage } from '../locale';
|
|
22
|
-
import Icon from '../Icon';
|
|
23
|
-
import './index.less';
|
|
24
38
|
var clsPrefix = 'tnt-more-menus';
|
|
25
|
-
|
|
39
|
+
|
|
40
|
+
var _default = function _default(props) {
|
|
26
41
|
var _lastChildPart2;
|
|
27
42
|
|
|
28
43
|
var _ref = props || {},
|
|
@@ -41,7 +56,7 @@ export default (function (props) {
|
|
|
41
56
|
lang = _ref2.lang;
|
|
42
57
|
|
|
43
58
|
if (!lang) {
|
|
44
|
-
lang = getLanguage();
|
|
59
|
+
lang = (0, _locale.getLanguage)();
|
|
45
60
|
}
|
|
46
61
|
|
|
47
62
|
var newChildren = [];
|
|
@@ -62,7 +77,7 @@ export default (function (props) {
|
|
|
62
77
|
props = v.props;
|
|
63
78
|
|
|
64
79
|
if ((type == null ? void 0 : type.name) === 'Popconfirm' || props.hasOwnProperty('onConfirm') && typeof (props == null ? void 0 : props.onConfirm) === 'function') {
|
|
65
|
-
newChildren[i] =
|
|
80
|
+
newChildren[i] = _react["default"].cloneElement(v, _objectSpread({
|
|
66
81
|
overlayStyle: {
|
|
67
82
|
width: 180
|
|
68
83
|
}
|
|
@@ -96,54 +111,56 @@ export default (function (props) {
|
|
|
96
111
|
preChildPart = preChildPart.map(function (dom, i) {
|
|
97
112
|
var _lastChildPart;
|
|
98
113
|
|
|
99
|
-
return
|
|
114
|
+
return _react["default"].createElement(_react.Fragment, {
|
|
100
115
|
key: i
|
|
101
116
|
}, dom, !(i === preChildLen - 1 && !((_lastChildPart = lastChildPart) == null ? void 0 : _lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider
|
|
102
|
-
) &&
|
|
117
|
+
) && _react["default"].createElement(_antd.Divider, {
|
|
103
118
|
type: "vertical"
|
|
104
119
|
}));
|
|
105
120
|
});
|
|
106
121
|
}
|
|
107
122
|
|
|
108
123
|
var menu = function menu(childArr) {
|
|
109
|
-
return
|
|
124
|
+
return _react["default"].createElement(_antd.Menu, {
|
|
110
125
|
className: "org-pop-opera-btn"
|
|
111
126
|
}, childArr == null ? void 0 : childArr.map(function (child, i) {
|
|
112
|
-
return
|
|
127
|
+
return _react["default"].createElement(_antd.Menu.Item, {
|
|
113
128
|
key: i
|
|
114
129
|
}, child);
|
|
115
130
|
}));
|
|
116
131
|
};
|
|
117
132
|
|
|
118
133
|
if (lang === 'en') {
|
|
119
|
-
return
|
|
134
|
+
return _react["default"].createElement(_antd.Dropdown, {
|
|
120
135
|
overlay: menu(newChildren || []),
|
|
121
136
|
arrow: true
|
|
122
|
-
}, type === 'icon' ?
|
|
137
|
+
}, type === 'icon' ? _react["default"].createElement(_Icon["default"], {
|
|
123
138
|
type: "more"
|
|
124
|
-
}) :
|
|
139
|
+
}) : _react["default"].createElement("a", {
|
|
125
140
|
className: "ant-dropdown-more"
|
|
126
|
-
}, getText('handleMore', lang),
|
|
141
|
+
}, (0, _locale.getText)('handleMore', lang), _react["default"].createElement("i", {
|
|
127
142
|
className: "".concat(clsPrefix, "-dropdown-icon")
|
|
128
|
-
},
|
|
143
|
+
}, _react["default"].createElement(_Icon["default"], {
|
|
129
144
|
type: "down"
|
|
130
145
|
}))));
|
|
131
146
|
}
|
|
132
147
|
|
|
133
|
-
return
|
|
148
|
+
return _react["default"].createElement("div", _extends({
|
|
134
149
|
onClick: function onClick(e) {
|
|
135
150
|
e.stopPropagation();
|
|
136
151
|
}
|
|
137
|
-
}, rest), preChildPart, !!((_lastChildPart2 = lastChildPart) == null ? void 0 : _lastChildPart2.length) &&
|
|
152
|
+
}, rest), preChildPart, !!((_lastChildPart2 = lastChildPart) == null ? void 0 : _lastChildPart2.length) && _react["default"].createElement(_antd.Dropdown, {
|
|
138
153
|
overlay: menu(lastChildPart || []),
|
|
139
154
|
arrow: true
|
|
140
|
-
}, type === 'icon' ?
|
|
155
|
+
}, type === 'icon' ? _react["default"].createElement(_Icon["default"], {
|
|
141
156
|
type: "more"
|
|
142
|
-
}) :
|
|
157
|
+
}) : _react["default"].createElement("a", {
|
|
143
158
|
className: "ant-dropdown-more"
|
|
144
|
-
}, getText('handleMore', lang),
|
|
159
|
+
}, (0, _locale.getText)('handleMore', lang), _react["default"].createElement("i", {
|
|
145
160
|
className: "".concat(clsPrefix, "-dropdown-icon")
|
|
146
|
-
},
|
|
161
|
+
}, _react["default"].createElement(_Icon["default"], {
|
|
147
162
|
type: "down"
|
|
148
163
|
})))));
|
|
149
|
-
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
exports["default"] = _default;
|
package/es/Icon/iconList.js
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _default = ['system', 'entry', 'permission', 'graph', 'guanjia', 'case', 'celve1', 'shoucang', 'deal-type', 'pm', 'shoukuan', 'zhibiao', 'puzzle', 'user-group', 'yuce', 'jianmo', 'zhuanzhang', 'yunwei', 'baozhang', 'jizhang', 'tongji', 'pingfen', 'limit', 'spider', 'loan', 'access', 'role', 'org', 'celve', 'book', 'tag', 'shixufenxipeizhi', 'all-cases', 'xianeguanli', 'api', 'network', 'analysis', 'calendar', 'backup', 'all', 'attachment', 'chart-line', 'branches', 'chart-area', 'clock', 'check', 'charging-setting', 'chart-pie-alt', 'dashboard', 'datebase', 'check-reply', 'datacenter', 'connection', 'download', 'date-set', 'event', 'event-wait', 'fieldanalysis', 'exchange', 'knowledge', 'key', 'log', 'list', 'menu', 'index', 'project', 'monitorin', 'pointmap', 'ranking', 'model', 'plan', 'task', 'wait', 'upload', 'question-list', 'read', 'setting', 'reply', 'jinjianguanli', 'change-theme', 'application', 'flag-en', 'flag-cn', 'down', 'up', 'workflow', 'sync', 'folder', 'database', 'circle', 'edit', 'edit-color', 'box', 'layer', 'box-color', 'home-color', 'record', 'monitor', 'time-color', 'user', 'function-color', 'record-color', 'warning-color', 'layer-color', 'template', 'template-color', 'monitor-color', 'search', 'user-color', 'function', 'warning', 'search-color', 'home', 'time', 'application', 'plus', 'minus'];
|
|
8
|
+
exports["default"] = _default;
|
package/es/Icon/index.js
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "iconList", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _iconList["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports["default"] = void 0;
|
|
13
|
+
|
|
14
|
+
require("./fonts/iconfont");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
var _iconList = _interopRequireDefault(require("./iconList"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
1
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
23
|
|
|
3
24
|
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; }
|
|
4
25
|
|
|
5
26
|
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; }
|
|
6
27
|
|
|
7
|
-
|
|
8
|
-
import './index.less';
|
|
9
|
-
export { default as iconList } from './iconList';
|
|
10
|
-
export default (function (_ref) {
|
|
28
|
+
var _default = function _default(_ref) {
|
|
11
29
|
var type = _ref.type,
|
|
12
30
|
_ref$prefix = _ref.prefix,
|
|
13
31
|
prefix = _ref$prefix === void 0 ? 'tnt-' : _ref$prefix,
|
|
@@ -23,4 +41,6 @@ export default (function (_ref) {
|
|
|
23
41
|
}, React.createElement("use", {
|
|
24
42
|
xlinkHref: "#".concat(prefix).concat(type)
|
|
25
43
|
})));
|
|
26
|
-
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports["default"] = _default;
|
package/es/Img/Contain.js
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
1
14
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
15
|
|
|
3
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -10,9 +23,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
10
23
|
|
|
11
24
|
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; }
|
|
12
25
|
|
|
13
|
-
|
|
14
|
-
import classnames from 'classnames';
|
|
15
|
-
export default (function (props) {
|
|
26
|
+
var _default = function _default(props) {
|
|
16
27
|
var alt = props.alt,
|
|
17
28
|
title = props.title,
|
|
18
29
|
src = props.src,
|
|
@@ -53,17 +64,19 @@ export default (function (props) {
|
|
|
53
64
|
maxWidth: width,
|
|
54
65
|
maxHeight: height
|
|
55
66
|
};
|
|
56
|
-
var cls =
|
|
57
|
-
return
|
|
67
|
+
var cls = (0, _classnames["default"])('tntd-img', shape, className);
|
|
68
|
+
return _react["default"].createElement("div", _extends({
|
|
58
69
|
className: cls,
|
|
59
70
|
style: styles
|
|
60
|
-
}, others),
|
|
71
|
+
}, others), _react["default"].createElement("div", {
|
|
61
72
|
style: centerStyles
|
|
62
|
-
},
|
|
73
|
+
}, _react["default"].createElement("img", {
|
|
63
74
|
style: imgStyles,
|
|
64
75
|
onError: onError,
|
|
65
76
|
src: src,
|
|
66
77
|
alt: alt,
|
|
67
78
|
title: title
|
|
68
79
|
})));
|
|
69
|
-
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
exports["default"] = _default;
|
package/es/Img/Cover.js
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
17
|
+
|
|
18
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
|
|
1
20
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
21
|
|
|
3
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -18,10 +37,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
18
37
|
|
|
19
38
|
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; }
|
|
20
39
|
|
|
21
|
-
|
|
22
|
-
import { useEffect, useState, useRef } from 'react';
|
|
23
|
-
import classnames from 'classnames';
|
|
24
|
-
export default (function (props) {
|
|
40
|
+
var _default = function _default(props) {
|
|
25
41
|
var alt = props.alt,
|
|
26
42
|
title = props.title,
|
|
27
43
|
src = props.src,
|
|
@@ -36,9 +52,9 @@ export default (function (props) {
|
|
|
36
52
|
type = props.type,
|
|
37
53
|
others = _objectWithoutProperties(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
|
|
38
54
|
|
|
39
|
-
var imgRef = useRef();
|
|
55
|
+
var imgRef = (0, _react.useRef)();
|
|
40
56
|
|
|
41
|
-
var _useState = useState({
|
|
57
|
+
var _useState = (0, _react.useState)({
|
|
42
58
|
display: 'block',
|
|
43
59
|
maxWidth: 'none',
|
|
44
60
|
width: 'auto',
|
|
@@ -91,7 +107,7 @@ export default (function (props) {
|
|
|
91
107
|
}));
|
|
92
108
|
};
|
|
93
109
|
|
|
94
|
-
useEffect(function () {
|
|
110
|
+
(0, _react.useEffect)(function () {
|
|
95
111
|
if (width || height) {
|
|
96
112
|
imgOnload();
|
|
97
113
|
}
|
|
@@ -110,11 +126,11 @@ export default (function (props) {
|
|
|
110
126
|
styles.borderRadius = '50%';
|
|
111
127
|
}
|
|
112
128
|
|
|
113
|
-
var cls =
|
|
114
|
-
return
|
|
129
|
+
var cls = (0, _classnames["default"])('tntd-img', shape, className);
|
|
130
|
+
return _react["default"].createElement("div", _extends({
|
|
115
131
|
className: cls,
|
|
116
132
|
style: styles
|
|
117
|
-
}, others),
|
|
133
|
+
}, others), _react["default"].createElement("img", {
|
|
118
134
|
style: imgStyles,
|
|
119
135
|
onError: onError,
|
|
120
136
|
ref: imgRef,
|
|
@@ -123,4 +139,6 @@ export default (function (props) {
|
|
|
123
139
|
title: title,
|
|
124
140
|
onLoad: imgOnload
|
|
125
141
|
}));
|
|
126
|
-
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
exports["default"] = _default;
|
package/es/Img/index.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _Cover = _interopRequireDefault(require("./Cover"));
|
|
11
|
+
|
|
12
|
+
var _Contain = _interopRequireDefault(require("./Contain"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
1
16
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
17
|
|
|
3
18
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -18,10 +33,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
18
33
|
|
|
19
34
|
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; }
|
|
20
35
|
|
|
21
|
-
|
|
22
|
-
import Cover from './Cover';
|
|
23
|
-
import Contain from './Contain';
|
|
24
|
-
export default (function (props) {
|
|
36
|
+
var _default = function _default(props) {
|
|
25
37
|
var _ref = props || {},
|
|
26
38
|
_ref$type = _ref.type,
|
|
27
39
|
type = _ref$type === void 0 ? 'cover' : _ref$type,
|
|
@@ -42,7 +54,7 @@ export default (function (props) {
|
|
|
42
54
|
onError = _ref.onError,
|
|
43
55
|
rest = _objectWithoutProperties(_ref, ["type", "src", "shape", "title", "alt", "className", "style", "width", "height", "errorImgSrc", "onError"]);
|
|
44
56
|
|
|
45
|
-
var _useState = useState(src),
|
|
57
|
+
var _useState = (0, _react.useState)(src),
|
|
46
58
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47
59
|
src2 = _useState2[0],
|
|
48
60
|
setSrc2 = _useState2[1];
|
|
@@ -68,9 +80,11 @@ export default (function (props) {
|
|
|
68
80
|
errorImgSrc: errorImgSrc
|
|
69
81
|
}, rest);
|
|
70
82
|
|
|
71
|
-
return React.createElement(Fragment, null, type === 'contain' && React.createElement(
|
|
83
|
+
return React.createElement(_react.Fragment, null, type === 'contain' && React.createElement(_Contain["default"], _extends({}, params, {
|
|
72
84
|
onError: handleImgLoadError
|
|
73
|
-
})), type === 'cover' && React.createElement(
|
|
85
|
+
})), type === 'cover' && React.createElement(_Cover["default"], _extends({}, params, {
|
|
74
86
|
onError: handleImgLoadError
|
|
75
87
|
})));
|
|
76
|
-
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
exports["default"] = _default;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
// import createActions from './createActions';
|
|
11
|
+
var _default = (0, _react.createContext)({});
|
|
12
|
+
|
|
13
|
+
exports["default"] = _default;
|