tntd 1.4.26 → 1.4.28
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 +20 -20
- package/dist/stats.json +90 -90
- package/es/ArrayInput/icon.js +3 -11
- package/es/ArrayInput/index.js +57 -67
- package/es/AuthContext.js +3 -13
- package/es/Columns/index.js +12 -24
- package/es/DevelopmentLogin/LoginModal.js +22 -29
- package/es/DevelopmentLogin/index.js +13 -29
- package/es/Ellipsis/Svg/CopySVG.js +2 -11
- package/es/Ellipsis/Svg/TickSVG.js +2 -11
- package/es/Ellipsis/index.js +25 -33
- package/es/Handle/index.js +29 -46
- package/es/Icon/fonts/iconfont.js +0 -2
- package/es/Icon/iconList.js +1 -8
- package/es/Icon/index.js +5 -25
- package/es/Img/Contain.js +8 -21
- package/es/Img/Cover.js +11 -29
- package/es/Img/index.js +8 -22
- package/es/Layout/ActionsContext.js +2 -12
- package/es/Layout/AppList.js +42 -58
- package/es/Layout/Application.js +24 -44
- package/es/Layout/Avatar.js +23 -45
- package/es/Layout/CompatibleLanguage.js +29 -51
- package/es/Layout/EnterpriseLayout/Avatar.js +32 -54
- package/es/Layout/EnterpriseLayout/Language.js +15 -39
- package/es/Layout/EnterpriseLayout/Theme.js +15 -31
- package/es/Layout/EnterpriseLayout/index.js +9 -24
- package/es/Layout/GlobalNavigation/NavigationPopup.js +29 -53
- package/es/Layout/GlobalNavigation/index.js +23 -51
- package/es/Layout/Header.js +19 -40
- package/es/Layout/HeaderActions.js +19 -43
- package/es/Layout/HeaderNavs.js +12 -35
- package/es/Layout/HeaderTabs.js +25 -50
- package/es/Layout/Iconfont.js +4 -16
- package/es/Layout/Language.js +14 -38
- package/es/Layout/Layout.js +32 -58
- package/es/Layout/Logo.js +12 -26
- package/es/Layout/OrgAppList.js +36 -52
- package/es/Layout/SideMenu.js +32 -57
- package/es/Layout/Theme.js +21 -39
- package/es/Layout/createActions.js +6 -19
- package/es/Layout/images/index.js +58 -95
- package/es/Layout/index.js +28 -70
- package/es/Layout/paaslayout/CompactSideMenu.js +17 -35
- package/es/Layout/paaslayout/Header.js +17 -31
- package/es/Layout/paaslayout/Logo.js +9 -19
- package/es/Layout/paaslayout/SideMenu.js +12 -29
- package/es/Layout/paaslayout/index.js +32 -58
- package/es/Layout/storage.js +21 -71
- package/es/LoadingButton/index.js +8 -17
- package/es/Modal/index.js +16 -29
- package/es/Page/Box.js +8 -18
- package/es/Page/index.js +29 -47
- package/es/Page/utils.js +1 -12
- package/es/QueryForm/Field/Checkbox.js +5 -13
- package/es/QueryForm/Field/Select.js +12 -28
- package/es/QueryForm/Field/SelectInput.js +18 -33
- package/es/QueryForm/Field/fieldsMap.js +23 -36
- package/es/QueryForm/Field/index.js +12 -25
- package/es/QueryForm/createActions.js +7 -20
- package/es/QueryForm/index.js +50 -66
- package/es/QueryForm/useForm.js +4 -16
- package/es/QueryListScene/List.js +30 -43
- package/es/QueryListScene/QueryForm.js +9 -21
- package/es/QueryListScene/QueryListScene.js +16 -29
- package/es/QueryListScene/Title.js +5 -17
- package/es/QueryListScene/Toolbar.js +4 -16
- package/es/QueryListScene/createActions.js +13 -26
- package/es/QueryListScene/index.js +19 -40
- package/es/QueryListScene/useActions.js +4 -16
- package/es/Select/DropDownWrap.js +6 -18
- package/es/Select/index.js +15 -28
- package/es/Table/ResizableTable/index.js +18 -32
- package/es/Table/index.js +11 -30
- package/es/Title/index.js +5 -18
- package/es/index.js +20 -193
- package/es/locale.js +8 -27
- package/es/utils/checkAuth.js +4 -15
- package/es/utils/findMenuInfoByPath.js +5 -16
- package/es/utils/index.js +10 -70
- package/lib/ArrayInput/index.js +28 -12
- package/lib/Columns/index.js +10 -4
- package/lib/DevelopmentLogin/LoginModal.js +23 -9
- package/lib/Ellipsis/index.js +10 -4
- package/lib/Handle/index.js +19 -9
- package/lib/Layout/AppList.js +30 -12
- package/lib/Layout/Application.js +5 -3
- package/lib/Layout/Avatar.js +12 -6
- package/lib/Layout/CompatibleLanguage.js +5 -3
- package/lib/Layout/EnterpriseLayout/Avatar.js +18 -8
- package/lib/Layout/EnterpriseLayout/Theme.js +5 -3
- package/lib/Layout/HeaderActions.js +7 -5
- package/lib/Layout/Layout.js +9 -7
- package/lib/Layout/OrgAppList.js +19 -7
- package/lib/Layout/SideMenu.js +9 -7
- package/lib/Layout/Theme.js +5 -3
- package/lib/Layout/paaslayout/index.js +10 -8
- package/lib/LoadingButton/index.js +6 -2
- package/lib/Modal/index.js +5 -3
- package/lib/Page/Box.js +5 -3
- package/lib/QueryForm/Field/Checkbox.js +6 -2
- package/lib/QueryForm/Field/Select.js +8 -4
- package/lib/QueryForm/Field/SelectInput.js +13 -5
- package/lib/QueryForm/Field/fieldsMap.js +18 -8
- package/lib/QueryForm/Field/index.js +7 -3
- package/lib/QueryForm/index.js +27 -13
- package/lib/QueryListScene/List.js +7 -5
- package/lib/Select/index.js +14 -8
- package/lib/Table/ResizableTable/index.js +5 -3
- package/lib/Table/index.js +7 -5
- package/package.json +1 -1
package/es/Ellipsis/index.js
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 }; }
|
|
1
|
+
import "antd/lib/tooltip/style";
|
|
2
|
+
import _Tooltip from "antd/lib/tooltip";
|
|
3
|
+
import "antd/lib/popover/style";
|
|
4
|
+
import _Popover from "antd/lib/popover";
|
|
21
5
|
|
|
22
6
|
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; }
|
|
23
7
|
|
|
@@ -35,6 +19,16 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
|
|
|
35
19
|
|
|
36
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
21
|
|
|
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';
|
|
38
32
|
var tolerance = 0; // In px. Depends on the font you are using
|
|
39
33
|
|
|
40
34
|
var isEllipsisActive = function isEllipsisActive(e) {
|
|
@@ -53,7 +47,7 @@ var isEllipsisActive = function isEllipsisActive(e) {
|
|
|
53
47
|
return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight;
|
|
54
48
|
};
|
|
55
49
|
|
|
56
|
-
|
|
50
|
+
export default (function (props) {
|
|
57
51
|
var _props$_popover = props._popover,
|
|
58
52
|
_popover = _props$_popover === void 0 ? props.Popover : _props$_popover,
|
|
59
53
|
title = props.title,
|
|
@@ -71,25 +65,25 @@ var _default = function _default(props) {
|
|
|
71
65
|
suffix = props.suffix; // allow visible or not state
|
|
72
66
|
|
|
73
67
|
|
|
74
|
-
var _useState =
|
|
68
|
+
var _useState = useState(true),
|
|
75
69
|
_useState2 = _slicedToArray(_useState, 2),
|
|
76
70
|
flag = _useState2[0],
|
|
77
71
|
setFlag = _useState2[1]; // visible[Tooltip/Popover] state
|
|
78
72
|
|
|
79
73
|
|
|
80
|
-
var _useState3 =
|
|
74
|
+
var _useState3 = useState(false),
|
|
81
75
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
82
76
|
tipVisible = _useState4[0],
|
|
83
77
|
setTipVisible = _useState4[1]; // copy animation state
|
|
84
78
|
|
|
85
79
|
|
|
86
|
-
var _useState5 =
|
|
80
|
+
var _useState5 = useState(false),
|
|
87
81
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
88
82
|
hasCopy = _useState6[0],
|
|
89
83
|
setHasCopy = _useState6[1];
|
|
90
84
|
|
|
91
|
-
var elementRef =
|
|
92
|
-
|
|
85
|
+
var elementRef = useRef();
|
|
86
|
+
useEffect(function () {
|
|
93
87
|
elementRef.current && isEllipsisActive(elementRef.current) ? setFlag(true) : (setFlag(false), setTipVisible(false));
|
|
94
88
|
}); // original Node
|
|
95
89
|
|
|
@@ -108,7 +102,7 @@ var _default = function _default(props) {
|
|
|
108
102
|
|
|
109
103
|
|
|
110
104
|
var handleCopy = function handleCopy(innerText) {
|
|
111
|
-
(
|
|
105
|
+
copy(innerText);
|
|
112
106
|
setHasCopy(!hasCopy);
|
|
113
107
|
setTimeout(function () {
|
|
114
108
|
setHasCopy(false);
|
|
@@ -116,7 +110,7 @@ var _default = function _default(props) {
|
|
|
116
110
|
};
|
|
117
111
|
|
|
118
112
|
var renderNode = function renderNode() {
|
|
119
|
-
var popoverNode = React.createElement(
|
|
113
|
+
var popoverNode = React.createElement(_Popover, _extends({}, props, {
|
|
120
114
|
content: content || children,
|
|
121
115
|
visible: tipVisible,
|
|
122
116
|
onVisibleChange: function onVisibleChange(visible) {
|
|
@@ -129,7 +123,7 @@ var _default = function _default(props) {
|
|
|
129
123
|
},
|
|
130
124
|
ref: elementRef
|
|
131
125
|
}, children || content));
|
|
132
|
-
var tooltipNode = React.createElement(
|
|
126
|
+
var tooltipNode = React.createElement(_Tooltip, _extends({}, props, {
|
|
133
127
|
title: title || children,
|
|
134
128
|
visible: tipVisible,
|
|
135
129
|
onVisibleChange: function onVisibleChange(visible) {
|
|
@@ -157,7 +151,5 @@ var _default = function _default(props) {
|
|
|
157
151
|
onClick: function onClick() {
|
|
158
152
|
return handleCopy(elementRef.current.innerText);
|
|
159
153
|
}
|
|
160
|
-
}, !hasCopy ? React.createElement(
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
exports["default"] = _default;
|
|
154
|
+
}, !hasCopy ? React.createElement(CopySVG, null) : React.createElement(TickSVG, null))));
|
|
155
|
+
});
|
package/es/Handle/index.js
CHANGED
|
@@ -1,27 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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; }
|
|
1
|
+
import "antd/lib/dropdown/style";
|
|
2
|
+
import _Dropdown from "antd/lib/dropdown";
|
|
3
|
+
import "antd/lib/menu/style";
|
|
4
|
+
import _Menu from "antd/lib/menu";
|
|
5
|
+
import "antd/lib/divider/style";
|
|
6
|
+
import _Divider from "antd/lib/divider";
|
|
25
7
|
|
|
26
8
|
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); }
|
|
27
9
|
|
|
@@ -35,9 +17,12 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
35
17
|
|
|
36
18
|
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; }
|
|
37
19
|
|
|
20
|
+
import React, { Fragment } from 'react';
|
|
21
|
+
import { getText, getLanguage } from '../locale';
|
|
22
|
+
import Icon from '../Icon';
|
|
23
|
+
import './index.less';
|
|
38
24
|
var clsPrefix = 'tnt-more-menus';
|
|
39
|
-
|
|
40
|
-
var _default = function _default(props) {
|
|
25
|
+
export default (function (props) {
|
|
41
26
|
var _lastChildPart2;
|
|
42
27
|
|
|
43
28
|
var _ref = props || {},
|
|
@@ -56,7 +41,7 @@ var _default = function _default(props) {
|
|
|
56
41
|
lang = _ref2.lang;
|
|
57
42
|
|
|
58
43
|
if (!lang) {
|
|
59
|
-
lang =
|
|
44
|
+
lang = getLanguage();
|
|
60
45
|
}
|
|
61
46
|
|
|
62
47
|
var newChildren = [];
|
|
@@ -77,7 +62,7 @@ var _default = function _default(props) {
|
|
|
77
62
|
props = v.props;
|
|
78
63
|
|
|
79
64
|
if ((type == null ? void 0 : type.name) === 'Popconfirm' || props.hasOwnProperty('onConfirm') && typeof (props == null ? void 0 : props.onConfirm) === 'function') {
|
|
80
|
-
newChildren[i] =
|
|
65
|
+
newChildren[i] = React.cloneElement(v, _objectSpread({
|
|
81
66
|
overlayStyle: {
|
|
82
67
|
width: 180
|
|
83
68
|
}
|
|
@@ -111,56 +96,54 @@ var _default = function _default(props) {
|
|
|
111
96
|
preChildPart = preChildPart.map(function (dom, i) {
|
|
112
97
|
var _lastChildPart;
|
|
113
98
|
|
|
114
|
-
return
|
|
99
|
+
return React.createElement(Fragment, {
|
|
115
100
|
key: i
|
|
116
101
|
}, dom, !(i === preChildLen - 1 && !((_lastChildPart = lastChildPart) == null ? void 0 : _lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider
|
|
117
|
-
) &&
|
|
102
|
+
) && React.createElement(_Divider, {
|
|
118
103
|
type: "vertical"
|
|
119
104
|
}));
|
|
120
105
|
});
|
|
121
106
|
}
|
|
122
107
|
|
|
123
108
|
var menu = function menu(childArr) {
|
|
124
|
-
return
|
|
109
|
+
return React.createElement(_Menu, {
|
|
125
110
|
className: "org-pop-opera-btn"
|
|
126
111
|
}, childArr == null ? void 0 : childArr.map(function (child, i) {
|
|
127
|
-
return
|
|
112
|
+
return React.createElement(_Menu.Item, {
|
|
128
113
|
key: i
|
|
129
114
|
}, child);
|
|
130
115
|
}));
|
|
131
116
|
};
|
|
132
117
|
|
|
133
118
|
if (lang === 'en') {
|
|
134
|
-
return
|
|
119
|
+
return React.createElement(_Dropdown, {
|
|
135
120
|
overlay: menu(newChildren || []),
|
|
136
121
|
arrow: true
|
|
137
|
-
}, type === 'icon' ?
|
|
122
|
+
}, type === 'icon' ? React.createElement(Icon, {
|
|
138
123
|
type: "more"
|
|
139
|
-
}) :
|
|
124
|
+
}) : React.createElement("a", {
|
|
140
125
|
className: "ant-dropdown-more"
|
|
141
|
-
},
|
|
126
|
+
}, getText('handleMore', lang), React.createElement("i", {
|
|
142
127
|
className: "".concat(clsPrefix, "-dropdown-icon")
|
|
143
|
-
},
|
|
128
|
+
}, React.createElement(Icon, {
|
|
144
129
|
type: "down"
|
|
145
130
|
}))));
|
|
146
131
|
}
|
|
147
132
|
|
|
148
|
-
return
|
|
133
|
+
return React.createElement("div", _extends({
|
|
149
134
|
onClick: function onClick(e) {
|
|
150
135
|
e.stopPropagation();
|
|
151
136
|
}
|
|
152
|
-
}, rest), preChildPart, !!((_lastChildPart2 = lastChildPart) == null ? void 0 : _lastChildPart2.length) &&
|
|
137
|
+
}, rest), preChildPart, !!((_lastChildPart2 = lastChildPart) == null ? void 0 : _lastChildPart2.length) && React.createElement(_Dropdown, {
|
|
153
138
|
overlay: menu(lastChildPart || []),
|
|
154
139
|
arrow: true
|
|
155
|
-
}, type === 'icon' ?
|
|
140
|
+
}, type === 'icon' ? React.createElement(Icon, {
|
|
156
141
|
type: "more"
|
|
157
|
-
}) :
|
|
142
|
+
}) : React.createElement("a", {
|
|
158
143
|
className: "ant-dropdown-more"
|
|
159
|
-
},
|
|
144
|
+
}, getText('handleMore', lang), React.createElement("i", {
|
|
160
145
|
className: "".concat(clsPrefix, "-dropdown-icon")
|
|
161
|
-
},
|
|
146
|
+
}, React.createElement(Icon, {
|
|
162
147
|
type: "down"
|
|
163
148
|
})))));
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
exports["default"] = _default;
|
|
149
|
+
});
|
package/es/Icon/iconList.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
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;
|
|
1
|
+
export 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'];
|
package/es/Icon/index.js
CHANGED
|
@@ -1,31 +1,13 @@
|
|
|
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
|
-
|
|
22
1
|
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); }
|
|
23
2
|
|
|
24
3
|
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; }
|
|
25
4
|
|
|
26
5
|
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; }
|
|
27
6
|
|
|
28
|
-
|
|
7
|
+
import './fonts/iconfont';
|
|
8
|
+
import './index.less';
|
|
9
|
+
export { default as iconList } from './iconList';
|
|
10
|
+
export default (function (_ref) {
|
|
29
11
|
var type = _ref.type,
|
|
30
12
|
_ref$prefix = _ref.prefix,
|
|
31
13
|
prefix = _ref$prefix === void 0 ? 'tnt-' : _ref$prefix,
|
|
@@ -41,6 +23,4 @@ var _default = function _default(_ref) {
|
|
|
41
23
|
}, React.createElement("use", {
|
|
42
24
|
xlinkHref: "#".concat(prefix).concat(type)
|
|
43
25
|
})));
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
exports["default"] = _default;
|
|
26
|
+
});
|
package/es/Img/Contain.js
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
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
|
-
|
|
14
1
|
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); }
|
|
15
2
|
|
|
16
3
|
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; }
|
|
@@ -23,7 +10,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
23
10
|
|
|
24
11
|
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; }
|
|
25
12
|
|
|
26
|
-
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import classnames from 'classnames';
|
|
15
|
+
export default (function (props) {
|
|
27
16
|
var alt = props.alt,
|
|
28
17
|
title = props.title,
|
|
29
18
|
src = props.src,
|
|
@@ -64,19 +53,17 @@ var _default = function _default(props) {
|
|
|
64
53
|
maxWidth: width,
|
|
65
54
|
maxHeight: height
|
|
66
55
|
};
|
|
67
|
-
var cls = (
|
|
68
|
-
return
|
|
56
|
+
var cls = classnames('tntd-img', shape, className);
|
|
57
|
+
return React.createElement("div", _extends({
|
|
69
58
|
className: cls,
|
|
70
59
|
style: styles
|
|
71
|
-
}, others),
|
|
60
|
+
}, others), React.createElement("div", {
|
|
72
61
|
style: centerStyles
|
|
73
|
-
},
|
|
62
|
+
}, React.createElement("img", {
|
|
74
63
|
style: imgStyles,
|
|
75
64
|
onError: onError,
|
|
76
65
|
src: src,
|
|
77
66
|
alt: alt,
|
|
78
67
|
title: title
|
|
79
68
|
})));
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
exports["default"] = _default;
|
|
69
|
+
});
|
package/es/Img/Cover.js
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
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
|
-
|
|
20
1
|
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); }
|
|
21
2
|
|
|
22
3
|
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; }
|
|
@@ -37,7 +18,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
37
18
|
|
|
38
19
|
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; }
|
|
39
20
|
|
|
40
|
-
|
|
21
|
+
import React from 'react';
|
|
22
|
+
import { useEffect, useState, useRef } from 'react';
|
|
23
|
+
import classnames from 'classnames';
|
|
24
|
+
export default (function (props) {
|
|
41
25
|
var alt = props.alt,
|
|
42
26
|
title = props.title,
|
|
43
27
|
src = props.src,
|
|
@@ -52,9 +36,9 @@ var _default = function _default(props) {
|
|
|
52
36
|
type = props.type,
|
|
53
37
|
others = _objectWithoutProperties(props, ["alt", "title", "src", "width", "height", "style", "className", "onError", "shape", "errorImgSrc", "type"]);
|
|
54
38
|
|
|
55
|
-
var imgRef =
|
|
39
|
+
var imgRef = useRef();
|
|
56
40
|
|
|
57
|
-
var _useState =
|
|
41
|
+
var _useState = useState({
|
|
58
42
|
display: 'block',
|
|
59
43
|
maxWidth: 'none',
|
|
60
44
|
width: 'auto',
|
|
@@ -107,7 +91,7 @@ var _default = function _default(props) {
|
|
|
107
91
|
}));
|
|
108
92
|
};
|
|
109
93
|
|
|
110
|
-
|
|
94
|
+
useEffect(function () {
|
|
111
95
|
if (width || height) {
|
|
112
96
|
imgOnload();
|
|
113
97
|
}
|
|
@@ -126,11 +110,11 @@ var _default = function _default(props) {
|
|
|
126
110
|
styles.borderRadius = '50%';
|
|
127
111
|
}
|
|
128
112
|
|
|
129
|
-
var cls = (
|
|
130
|
-
return
|
|
113
|
+
var cls = classnames('tntd-img', shape, className);
|
|
114
|
+
return React.createElement("div", _extends({
|
|
131
115
|
className: cls,
|
|
132
116
|
style: styles
|
|
133
|
-
}, others),
|
|
117
|
+
}, others), React.createElement("img", {
|
|
134
118
|
style: imgStyles,
|
|
135
119
|
onError: onError,
|
|
136
120
|
ref: imgRef,
|
|
@@ -139,6 +123,4 @@ var _default = function _default(props) {
|
|
|
139
123
|
title: title,
|
|
140
124
|
onLoad: imgOnload
|
|
141
125
|
}));
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
exports["default"] = _default;
|
|
126
|
+
});
|
package/es/Img/index.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
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
|
-
|
|
16
1
|
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); }
|
|
17
2
|
|
|
18
3
|
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; }
|
|
@@ -33,7 +18,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
33
18
|
|
|
34
19
|
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; }
|
|
35
20
|
|
|
36
|
-
|
|
21
|
+
import { Fragment, useState } from 'react';
|
|
22
|
+
import Cover from './Cover';
|
|
23
|
+
import Contain from './Contain';
|
|
24
|
+
export default (function (props) {
|
|
37
25
|
var _ref = props || {},
|
|
38
26
|
_ref$type = _ref.type,
|
|
39
27
|
type = _ref$type === void 0 ? 'cover' : _ref$type,
|
|
@@ -54,7 +42,7 @@ var _default = function _default(props) {
|
|
|
54
42
|
onError = _ref.onError,
|
|
55
43
|
rest = _objectWithoutProperties(_ref, ["type", "src", "shape", "title", "alt", "className", "style", "width", "height", "errorImgSrc", "onError"]);
|
|
56
44
|
|
|
57
|
-
var _useState =
|
|
45
|
+
var _useState = useState(src),
|
|
58
46
|
_useState2 = _slicedToArray(_useState, 2),
|
|
59
47
|
src2 = _useState2[0],
|
|
60
48
|
setSrc2 = _useState2[1];
|
|
@@ -80,11 +68,9 @@ var _default = function _default(props) {
|
|
|
80
68
|
errorImgSrc: errorImgSrc
|
|
81
69
|
}, rest);
|
|
82
70
|
|
|
83
|
-
return React.createElement(
|
|
71
|
+
return React.createElement(Fragment, null, type === 'contain' && React.createElement(Contain, _extends({}, params, {
|
|
84
72
|
onError: handleImgLoadError
|
|
85
|
-
})), type === 'cover' && React.createElement(
|
|
73
|
+
})), type === 'cover' && React.createElement(Cover, _extends({}, params, {
|
|
86
74
|
onError: handleImgLoadError
|
|
87
75
|
})));
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
exports["default"] = _default;
|
|
76
|
+
});
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { createContext } from 'react'; // import createActions from './createActions';
|
|
2
2
|
|
|
3
|
-
|
|
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;
|
|
3
|
+
export default createContext({});
|