tntd 1.4.1 → 1.4.4
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 +1 -1
- package/components/Ellipsis/index.js +4 -4
- package/components/QueryForm/index.js +2 -1
- package/components/Select/index.js +3 -4
- package/dist/stats.json +4901 -4901
- package/dist/tntd.js +1 -1
- package/es/ArrayInput/index.js +19 -11
- package/es/Columns/index.js +7 -3
- package/es/DevelopmentLogin/LoginModal.js +17 -8
- package/es/Ellipsis/index.js +10 -6
- package/es/Handle/index.js +11 -5
- package/es/Layout/AppList.js +19 -9
- package/es/Layout/Application.js +4 -2
- package/es/Layout/Avatar.js +7 -3
- package/es/Layout/CompatibleLanguage.js +4 -2
- package/es/Layout/EnterpriseLayout/Avatar.js +11 -5
- package/es/Layout/EnterpriseLayout/Theme.js +4 -2
- package/es/Layout/HeaderActions.js +4 -2
- package/es/Layout/Layout.js +6 -4
- package/es/Layout/OrgAppList.js +13 -7
- package/es/Layout/SideMenu.js +6 -4
- package/es/Layout/Theme.js +4 -2
- package/es/Layout/paaslayout/index.js +7 -5
- package/es/LoadingButton/index.js +4 -2
- package/es/Modal/index.js +4 -2
- package/es/Page/Box.js +4 -2
- package/es/QueryForm/Field/Checkbox.js +4 -2
- package/es/QueryForm/Field/Select.js +5 -3
- package/es/QueryForm/Field/SelectInput.js +8 -4
- package/es/QueryForm/Field/fieldsMap.js +13 -8
- package/es/QueryForm/Field/index.js +4 -2
- package/es/QueryForm/index.js +20 -11
- package/es/QueryListScene/List.js +4 -2
- package/es/Select/index.js +11 -9
- package/es/Table/ResizableTable/index.js +4 -2
- package/es/Table/index.js +4 -2
- package/lib/Ellipsis/index.js +3 -3
- package/lib/Layout/EnterpriseLayout/Header.js +113 -0
- package/lib/Layout/EnterpriseLayout/HeaderActions.js +104 -0
- package/lib/QueryForm/index.js +2 -1
- package/lib/Select/index.js +2 -4
- package/package.json +1 -1
package/es/Layout/SideMenu.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/menu/style";
|
|
2
|
+
import _Menu from "antd/lib/menu";
|
|
3
|
+
|
|
1
4
|
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
5
|
|
|
3
6
|
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; }
|
|
@@ -42,7 +45,6 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
42
45
|
|
|
43
46
|
import { useState, useEffect, useContext } from 'react';
|
|
44
47
|
import styled, { withTheme } from 'styled-components';
|
|
45
|
-
import { Menu } from 'antd';
|
|
46
48
|
import { get } from 'lodash';
|
|
47
49
|
import ActionsContext from './ActionsContext';
|
|
48
50
|
import { getSelectedMenuInfo, isGroupMenu, isNewTabMenu, openInNewTab, traverseTree } from './utils';
|
|
@@ -50,9 +52,9 @@ import { setSideMenuStore } from './storage';
|
|
|
50
52
|
import Iconfont from './Iconfont';
|
|
51
53
|
var color = 'rgba(255,255,255,.85)';
|
|
52
54
|
var compatibleColor = '#a1d7ff';
|
|
53
|
-
var SubMenu =
|
|
54
|
-
MenuItem =
|
|
55
|
-
var TNTMenu = styled(
|
|
55
|
+
var SubMenu = _Menu.SubMenu,
|
|
56
|
+
MenuItem = _Menu.Item;
|
|
57
|
+
var TNTMenu = styled(_Menu)(_templateObject(), function (props) {
|
|
56
58
|
return "".concat(props.theme.headerHeight, "px");
|
|
57
59
|
}, function (props) {
|
|
58
60
|
return props.theme.dividerColor;
|
package/es/Layout/Theme.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/popover/style";
|
|
2
|
+
import _Popover from "antd/lib/popover";
|
|
3
|
+
|
|
1
4
|
var _this = this;
|
|
2
5
|
|
|
3
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
@@ -42,7 +45,6 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
42
45
|
|
|
43
46
|
import { useState } from 'react';
|
|
44
47
|
import styled from 'styled-components';
|
|
45
|
-
import { Popover } from 'antd';
|
|
46
48
|
import Iconfont from './Iconfont';
|
|
47
49
|
import images from './images';
|
|
48
50
|
import { setThemeStore, getThemeStore } from './storage';
|
|
@@ -94,7 +96,7 @@ var ThemeContent = function ThemeContent(props) {
|
|
|
94
96
|
};
|
|
95
97
|
|
|
96
98
|
export default (function (props) {
|
|
97
|
-
return React.createElement(Theme, null, React.createElement(
|
|
99
|
+
return React.createElement(Theme, null, React.createElement(_Popover, {
|
|
98
100
|
placement: "bottomRight",
|
|
99
101
|
title: null,
|
|
100
102
|
content: React.createElement(ThemeContent, props),
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/layout/style";
|
|
2
|
+
import _Layout from "antd/lib/layout";
|
|
3
|
+
|
|
1
4
|
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; }
|
|
2
5
|
|
|
3
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -27,7 +30,6 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
27
30
|
import { useState, useEffect } from 'react';
|
|
28
31
|
import styled, { withTheme } from 'styled-components';
|
|
29
32
|
import cn from 'classnames';
|
|
30
|
-
import { Layout } from 'antd';
|
|
31
33
|
import { get, reduce, isUndefined } from 'lodash';
|
|
32
34
|
import { getSelectedMenuInfo } from '../utils';
|
|
33
35
|
import HeaderNavs from '../HeaderNavs';
|
|
@@ -35,9 +37,9 @@ import Header from './Header';
|
|
|
35
37
|
import SideMenu from './SideMenu';
|
|
36
38
|
import CompactSideMenu from './CompactSideMenu';
|
|
37
39
|
import { getLanguageStore, getThemeStore } from '../storage';
|
|
38
|
-
var Content =
|
|
39
|
-
Sider =
|
|
40
|
-
var TNTPaasLayout = styled(
|
|
40
|
+
var Content = _Layout.Content,
|
|
41
|
+
Sider = _Layout.Sider;
|
|
42
|
+
var TNTPaasLayout = styled(_Layout)(_templateObject(), function (props) {
|
|
41
43
|
return props.theme.lightBgColor;
|
|
42
44
|
});
|
|
43
45
|
|
|
@@ -213,7 +215,7 @@ export default withTheme(function (props) {
|
|
|
213
215
|
_onApplicationChange(appKey);
|
|
214
216
|
},
|
|
215
217
|
onLogout: onLogout
|
|
216
|
-
}, headerNavMenus), React.createElement(
|
|
218
|
+
}, headerNavMenus), React.createElement(_Layout, null, !isUndefined(sideMenu) ? sideMenu : React.createElement(Sider, {
|
|
217
219
|
breakpoint: "md",
|
|
218
220
|
className: "tnt-layout-sider",
|
|
219
221
|
width: 220,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/button/style";
|
|
2
|
+
import _Button from "antd/lib/button";
|
|
3
|
+
|
|
1
4
|
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
5
|
|
|
3
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
@@ -9,7 +12,6 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
|
|
|
9
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
13
|
|
|
11
14
|
import { useState, useEffect } from 'react';
|
|
12
|
-
import { Button } from 'antd';
|
|
13
15
|
export default (function (props) {
|
|
14
16
|
var _useState = useState(props.loading),
|
|
15
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -36,7 +38,7 @@ export default (function (props) {
|
|
|
36
38
|
useEffect(function () {
|
|
37
39
|
setLoading(props.loading);
|
|
38
40
|
}, [props.loading]);
|
|
39
|
-
return React.createElement(
|
|
41
|
+
return React.createElement(_Button, _extends({}, props, {
|
|
40
42
|
loading: loading,
|
|
41
43
|
onClick: onClick
|
|
42
44
|
}), loading ? props.loadingText || props.children : props.children);
|
package/es/Modal/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/modal/style";
|
|
2
|
+
import _Modal from "antd/lib/modal";
|
|
3
|
+
|
|
1
4
|
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
5
|
|
|
3
6
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -16,7 +19,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
19
|
|
|
17
20
|
import { useState, useEffect, Fragment } from 'react';
|
|
18
21
|
import cn from 'classnames';
|
|
19
|
-
import { Modal } from 'antd';
|
|
20
22
|
import Icon from '../Icon';
|
|
21
23
|
import './index.less';
|
|
22
24
|
|
|
@@ -68,7 +70,7 @@ export default (function (props) {
|
|
|
68
70
|
useEffect(function () {
|
|
69
71
|
setFullscreen(rest.fullscreen);
|
|
70
72
|
}, [rest.fullscreen, visible]);
|
|
71
|
-
return React.createElement(
|
|
73
|
+
return React.createElement(_Modal, _extends({
|
|
72
74
|
visible: visible,
|
|
73
75
|
title: React.createElement(Title, {
|
|
74
76
|
logo: logo,
|
package/es/Page/Box.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/card/style";
|
|
2
|
+
import _Card from "antd/lib/card";
|
|
3
|
+
|
|
1
4
|
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
5
|
|
|
3
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; }
|
|
@@ -11,7 +14,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
14
|
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
15
|
|
|
13
16
|
import React from 'react';
|
|
14
|
-
import { Card } from 'antd';
|
|
15
17
|
import { addUnitForValue } from './utils';
|
|
16
18
|
|
|
17
19
|
var Box = function Box(_ref) {
|
|
@@ -57,7 +59,7 @@ var Box = function Box(_ref) {
|
|
|
57
59
|
|
|
58
60
|
cardTitleHeight = addUnitForValue(cardTitleHeight);
|
|
59
61
|
var cardBodyHeight = "calc(".concat(height, " - ").concat(headerHeight, " - ").concat(contentTotalMargin, " - ").concat(cardTitleHeight, ")");
|
|
60
|
-
return React.createElement(
|
|
62
|
+
return React.createElement(_Card, _extends({
|
|
61
63
|
className: "".concat(clsPrefix, "-box-card"),
|
|
62
64
|
bordered: bordered,
|
|
63
65
|
bodyStyle: _objectSpread({}, bodyStyle, {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import "antd/lib/checkbox/style";
|
|
2
|
+
import _Checkbox from "antd/lib/checkbox";
|
|
3
|
+
|
|
1
4
|
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
5
|
|
|
3
6
|
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
7
|
|
|
5
8
|
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
9
|
|
|
7
|
-
import { Checkbox } from 'antd';
|
|
8
10
|
export default (function (_ref) {
|
|
9
11
|
var value = _ref.value,
|
|
10
12
|
_onChange = _ref.onChange,
|
|
11
13
|
props = _objectWithoutProperties(_ref, ["value", "onChange"]);
|
|
12
14
|
|
|
13
|
-
return React.createElement(
|
|
15
|
+
return React.createElement(_Checkbox, _extends({}, props, {
|
|
14
16
|
checked: value,
|
|
15
17
|
onChange: function onChange(evt) {
|
|
16
18
|
_onChange == null ? void 0 : _onChange(evt.target.checked);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/select/style";
|
|
2
|
+
import _Select from "antd/lib/select";
|
|
3
|
+
|
|
1
4
|
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
5
|
|
|
3
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; }
|
|
@@ -19,8 +22,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
19
22
|
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
23
|
|
|
21
24
|
import React, { useState, useEffect } from 'react';
|
|
22
|
-
|
|
23
|
-
var Option = Select.Option;
|
|
25
|
+
var Option = _Select.Option;
|
|
24
26
|
export default (function (props) {
|
|
25
27
|
var options = props.options,
|
|
26
28
|
params = props.params,
|
|
@@ -59,7 +61,7 @@ export default (function (props) {
|
|
|
59
61
|
useEffect(function () {
|
|
60
62
|
setItems(options || []);
|
|
61
63
|
}, [options]);
|
|
62
|
-
return React.createElement(
|
|
64
|
+
return React.createElement(_Select, _extends({
|
|
63
65
|
allowClear: true,
|
|
64
66
|
showSearch: true,
|
|
65
67
|
optionFilterProp: "children",
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import "antd/lib/input/style";
|
|
2
|
+
import _Input from "antd/lib/input";
|
|
3
|
+
import "antd/lib/select/style";
|
|
4
|
+
import _Select from "antd/lib/select";
|
|
5
|
+
|
|
1
6
|
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
7
|
|
|
3
8
|
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; }
|
|
@@ -19,9 +24,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
19
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; }
|
|
20
25
|
|
|
21
26
|
import React, { useState, useEffect } from 'react';
|
|
22
|
-
import { Select, Input } from 'antd';
|
|
23
27
|
import { get } from 'lodash';
|
|
24
|
-
var Option =
|
|
28
|
+
var Option = _Select.Option;
|
|
25
29
|
export default (function (props) {
|
|
26
30
|
var _props$options = props.options,
|
|
27
31
|
options = _props$options === void 0 ? [] : _props$options,
|
|
@@ -57,7 +61,7 @@ export default (function (props) {
|
|
|
57
61
|
props.onChange(_defineProperty({}, key, evt.target.value));
|
|
58
62
|
};
|
|
59
63
|
|
|
60
|
-
var addonBefore = React.createElement(
|
|
64
|
+
var addonBefore = React.createElement(_Select, {
|
|
61
65
|
value: key,
|
|
62
66
|
onChange: onKeyChange,
|
|
63
67
|
style: _objectSpread({
|
|
@@ -80,7 +84,7 @@ export default (function (props) {
|
|
|
80
84
|
setItems(options);
|
|
81
85
|
setKey(getInitialKey());
|
|
82
86
|
}, [options, inputProps.value]);
|
|
83
|
-
return React.createElement(
|
|
87
|
+
return React.createElement(_Input, _extends({}, inputProps, {
|
|
84
88
|
value: getInputValue(),
|
|
85
89
|
addonBefore: addonBefore,
|
|
86
90
|
onChange: onChange
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "antd/lib/date-picker/style";
|
|
2
|
+
import _DatePicker from "antd/lib/date-picker";
|
|
3
|
+
import "antd/lib/input-number/style";
|
|
4
|
+
import _InputNumber from "antd/lib/input-number";
|
|
5
|
+
import "antd/lib/input/style";
|
|
6
|
+
import _Input from "antd/lib/input";
|
|
2
7
|
import SelectField from './Select';
|
|
3
8
|
import SelectInput from './SelectInput';
|
|
4
9
|
import CheckboxField from './Checkbox';
|
|
@@ -14,14 +19,14 @@ export var getFieldWidth = function getFieldWidth(type) {
|
|
|
14
19
|
}[type] || defaultFieldWidth;
|
|
15
20
|
};
|
|
16
21
|
export default {
|
|
17
|
-
string:
|
|
18
|
-
input:
|
|
19
|
-
search:
|
|
20
|
-
inputNumber:
|
|
21
|
-
number:
|
|
22
|
+
string: _Input,
|
|
23
|
+
input: _Input,
|
|
24
|
+
search: _Input.Search,
|
|
25
|
+
inputNumber: _InputNumber,
|
|
26
|
+
number: _InputNumber,
|
|
22
27
|
select: SelectField,
|
|
23
28
|
checkbox: CheckboxField,
|
|
24
|
-
date:
|
|
25
|
-
dateRange:
|
|
29
|
+
date: _DatePicker,
|
|
30
|
+
dateRange: _DatePicker.RangePicker,
|
|
26
31
|
selectInput: SelectInput
|
|
27
32
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/form/style";
|
|
2
|
+
import _Form from "antd/lib/form";
|
|
3
|
+
|
|
1
4
|
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); }
|
|
2
5
|
|
|
3
6
|
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); }
|
|
@@ -25,10 +28,9 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
25
28
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26
29
|
|
|
27
30
|
import { PureComponent } from 'react';
|
|
28
|
-
import { Form } from 'antd';
|
|
29
31
|
import { get } from 'lodash';
|
|
30
32
|
import fieldsMap, { getFieldWidth } from './fieldsMap';
|
|
31
|
-
var FormItem =
|
|
33
|
+
var FormItem = _Form.Item;
|
|
32
34
|
|
|
33
35
|
var isInput = function isInput(type) {
|
|
34
36
|
return ['input', 'string', 'search'].includes(type);
|
package/es/QueryForm/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import "antd/lib/form/style";
|
|
2
|
+
import _Form from "antd/lib/form";
|
|
3
|
+
import "antd/lib/drawer/style";
|
|
4
|
+
import _Drawer from "antd/lib/drawer";
|
|
5
|
+
import "antd/lib/badge/style";
|
|
6
|
+
import _Badge from "antd/lib/badge";
|
|
7
|
+
import "antd/lib/button/style";
|
|
8
|
+
import _Button from "antd/lib/button";
|
|
9
|
+
|
|
1
10
|
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); }
|
|
2
11
|
|
|
3
12
|
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,7 +36,6 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
27
36
|
import React, { createRef } from 'react';
|
|
28
37
|
import classnames from 'classnames';
|
|
29
38
|
import { debounce } from 'lodash';
|
|
30
|
-
import { Form, Button, Drawer, Badge } from 'antd';
|
|
31
39
|
import useForm from './useForm';
|
|
32
40
|
import createActions from './createActions';
|
|
33
41
|
import Icon from '../Icon';
|
|
@@ -193,18 +201,18 @@ function (_React$PureComponent) {
|
|
|
193
201
|
drawerFieldsValueCount = _this$state.drawerFieldsValueCount;
|
|
194
202
|
|
|
195
203
|
var renderFormActions = renderActions || function () {
|
|
196
|
-
return React.createElement(React.Fragment, null, showFieldCount && React.createElement(
|
|
204
|
+
return React.createElement(React.Fragment, null, showFieldCount && React.createElement(_Badge, {
|
|
197
205
|
count: drawerFieldsValueCount
|
|
198
|
-
}, React.createElement(
|
|
206
|
+
}, React.createElement(_Button, {
|
|
199
207
|
onClick: _this2.onShowDrawer
|
|
200
208
|
}, React.createElement(Icon, {
|
|
201
209
|
type: "filter"
|
|
202
|
-
}), _this2.getText('moreFiltering'))), showSearch && React.createElement(
|
|
210
|
+
}), _this2.getText('moreFiltering'))), showSearch && React.createElement(_Button, {
|
|
203
211
|
type: "primary",
|
|
204
212
|
onClick: _this2.onSearch
|
|
205
|
-
}, _this2.getText('search')), showReset && React.createElement(
|
|
213
|
+
}, _this2.getText('search')), showReset && React.createElement(_Button, {
|
|
206
214
|
onClick: _this2.onReset
|
|
207
|
-
}, _this2.getText('reset')), showMore && !showFieldCount && React.createElement(
|
|
215
|
+
}, _this2.getText('reset')), showMore && !showFieldCount && React.createElement(_Button, {
|
|
208
216
|
className: "expand-link",
|
|
209
217
|
type: "link",
|
|
210
218
|
onClick: _this2.onToggleExpand
|
|
@@ -218,7 +226,7 @@ function (_React$PureComponent) {
|
|
|
218
226
|
return React.createElement("div", {
|
|
219
227
|
ref: this.formBoxRef,
|
|
220
228
|
className: classnames(clsPrefix, _defineProperty({}, className, className))
|
|
221
|
-
}, React.createElement(
|
|
229
|
+
}, React.createElement(_Form, {
|
|
222
230
|
layout: "inline",
|
|
223
231
|
className: classnames({
|
|
224
232
|
expanded: !showMore || expanded,
|
|
@@ -236,7 +244,7 @@ function (_React$PureComponent) {
|
|
|
236
244
|
});
|
|
237
245
|
})), React.createElement("div", {
|
|
238
246
|
className: "".concat(clsPrefix, "-actions")
|
|
239
|
-
}, renderFormActions()), showFieldCount && React.createElement(
|
|
247
|
+
}, renderFormActions()), showFieldCount && React.createElement(_Drawer, _extends({
|
|
240
248
|
title: this.getText('moreFiltering'),
|
|
241
249
|
visible: drawerVisible,
|
|
242
250
|
onClose: function onClose() {
|
|
@@ -259,10 +267,10 @@ function (_React$PureComponent) {
|
|
|
259
267
|
onChange: _this2.onFieldChange,
|
|
260
268
|
onSearch: _this2.onSearch
|
|
261
269
|
});
|
|
262
|
-
}), React.createElement(
|
|
270
|
+
}), React.createElement(_Button, {
|
|
263
271
|
type: "primary",
|
|
264
272
|
onClick: this.onSearch
|
|
265
|
-
}, this.getText('search')), React.createElement(
|
|
273
|
+
}, this.getText('search')), React.createElement(_Button, {
|
|
266
274
|
onClick: this.onReset
|
|
267
275
|
}, this.getText('reset')))), extraActions && React.createElement("div", {
|
|
268
276
|
className: "".concat(clsPrefix, "-extra")
|
|
@@ -337,8 +345,9 @@ function (_React$PureComponent) {
|
|
|
337
345
|
renderActions = _this$props4.renderActions;
|
|
338
346
|
this.updateFieldHeight();
|
|
339
347
|
this.form.on('search', this.search); // 未设置第一行显示数量且禁止了展开操作 或 自定义了操作区域,则不需要处理展开计算逻辑
|
|
348
|
+
// || renderActions
|
|
340
349
|
|
|
341
|
-
if (!showFieldCount && !showExpand
|
|
350
|
+
if (!showFieldCount && !showExpand) {
|
|
342
351
|
return;
|
|
343
352
|
}
|
|
344
353
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/spin/style";
|
|
2
|
+
import _Spin from "antd/lib/spin";
|
|
3
|
+
|
|
1
4
|
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); }
|
|
2
5
|
|
|
3
6
|
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); }
|
|
@@ -36,7 +39,6 @@ import React, { createRef } from 'react';
|
|
|
36
39
|
import { findDOMNode } from 'react-dom';
|
|
37
40
|
import cn from 'classnames';
|
|
38
41
|
import { get, pickBy, isEmpty, debounce, throttle } from 'lodash';
|
|
39
|
-
import { Spin } from 'antd';
|
|
40
42
|
import Table from '../Table';
|
|
41
43
|
import { getText, getLanguage } from '../locale';
|
|
42
44
|
|
|
@@ -290,7 +292,7 @@ function (_React$PureComponent) {
|
|
|
290
292
|
paginationSticky: paginationSticky,
|
|
291
293
|
hasScrollToBottom: hasScrollToBottom
|
|
292
294
|
})
|
|
293
|
-
}, React.createElement(
|
|
295
|
+
}, React.createElement(_Spin, {
|
|
294
296
|
spinning: loading
|
|
295
297
|
}, React.createElement(Table, _extends({
|
|
296
298
|
ref: this.tableRef
|
package/es/Select/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import "antd/lib/empty/style";
|
|
2
|
+
import _Empty from "antd/lib/empty";
|
|
3
|
+
import "antd/lib/select/style";
|
|
4
|
+
import _Select from "antd/lib/select";
|
|
5
|
+
|
|
1
6
|
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
7
|
|
|
3
8
|
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; }
|
|
@@ -29,7 +34,6 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
29
34
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
30
35
|
|
|
31
36
|
import React, { PureComponent } from 'react';
|
|
32
|
-
import { Select, Empty } from 'antd';
|
|
33
37
|
import DropDownWrap from './DropDownWrap'; // 页面实际渲染的下拉菜单数量,实际为 2 * ITEM_ELEMENT_NUMBER
|
|
34
38
|
|
|
35
39
|
var ITEM_ELEMENT_NUMBER = 30; // Select size 配置
|
|
@@ -44,7 +48,7 @@ var ARROW_CODE = {
|
|
|
44
48
|
38: 'up'
|
|
45
49
|
};
|
|
46
50
|
var DROPDOWN_HEIGHT = 224;
|
|
47
|
-
var Option =
|
|
51
|
+
var Option = _Select.Option;
|
|
48
52
|
|
|
49
53
|
var SuperSelect =
|
|
50
54
|
/*#__PURE__*/
|
|
@@ -481,11 +485,9 @@ function (_PureComponent) {
|
|
|
481
485
|
_this2.addEvent();
|
|
482
486
|
}, 500);
|
|
483
487
|
var arr = this.props.children;
|
|
484
|
-
var children = this.turnChildren(arr);
|
|
488
|
+
var children = this.turnChildren(arr); // if (children && children.length > 0) {
|
|
485
489
|
|
|
486
|
-
|
|
487
|
-
this.formulaWidth();
|
|
488
|
-
}
|
|
490
|
+
this.formulaWidth(); // }
|
|
489
491
|
}
|
|
490
492
|
}, {
|
|
491
493
|
key: "componentDidUpdate",
|
|
@@ -572,7 +574,7 @@ function (_PureComponent) {
|
|
|
572
574
|
}
|
|
573
575
|
|
|
574
576
|
optionLabelProp = optionLabelProp || 'children';
|
|
575
|
-
return React.createElement(
|
|
577
|
+
return React.createElement(_Select, _extends({}, _props, {
|
|
576
578
|
id: this.id,
|
|
577
579
|
onSearch: this.onSearch,
|
|
578
580
|
onChange: this.onChange,
|
|
@@ -590,8 +592,8 @@ function (_PureComponent) {
|
|
|
590
592
|
style: {
|
|
591
593
|
padding: '5px 12px'
|
|
592
594
|
}
|
|
593
|
-
}, React.createElement(
|
|
594
|
-
image:
|
|
595
|
+
}, React.createElement(_Empty, {
|
|
596
|
+
image: _Empty.PRESENTED_IMAGE_SIMPLE
|
|
595
597
|
}));
|
|
596
598
|
}
|
|
597
599
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/table/style";
|
|
2
|
+
import _Table from "antd/lib/table";
|
|
3
|
+
|
|
1
4
|
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
5
|
|
|
3
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
@@ -21,7 +24,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
21
24
|
import { useState, useEffect, forwardRef, useRef } from 'react';
|
|
22
25
|
import cn from 'classnames';
|
|
23
26
|
import { throttle } from 'lodash';
|
|
24
|
-
import { Table } from 'antd';
|
|
25
27
|
import { Resizable } from 'react-resizable';
|
|
26
28
|
import './index.less';
|
|
27
29
|
|
|
@@ -95,7 +97,7 @@ export default forwardRef(function (props, ref) {
|
|
|
95
97
|
useEffect(function () {
|
|
96
98
|
dataRef.current.columns = columns;
|
|
97
99
|
}, [columns]);
|
|
98
|
-
return React.createElement(
|
|
100
|
+
return React.createElement(_Table, _extends({}, props, {
|
|
99
101
|
className: cn('tnt-resizable-table', _defineProperty({}, props.className, props.className)),
|
|
100
102
|
components: {
|
|
101
103
|
header: {
|
package/es/Table/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "antd/lib/table/style";
|
|
2
|
+
import _Table from "antd/lib/table";
|
|
3
|
+
|
|
1
4
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
5
|
|
|
3
6
|
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); }
|
|
@@ -8,7 +11,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
8
11
|
|
|
9
12
|
import React, { forwardRef } from 'react';
|
|
10
13
|
import cn from 'classnames';
|
|
11
|
-
import { Table } from 'antd';
|
|
12
14
|
import ResizableTable from './ResizableTable'; // const ResizableTable = React.lazy(() => import('./ResizableTable'));
|
|
13
15
|
|
|
14
16
|
export default forwardRef(function (_ref, ref) {
|
|
@@ -25,7 +27,7 @@ export default forwardRef(function (_ref, ref) {
|
|
|
25
27
|
);
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
return React.createElement(
|
|
30
|
+
return React.createElement(_Table, _extends({
|
|
29
31
|
className: cn('tnt-table', _defineProperty({}, props.className, props.className))
|
|
30
32
|
}, props, {
|
|
31
33
|
ref: ref
|
package/lib/Ellipsis/index.js
CHANGED
|
@@ -140,14 +140,14 @@ var _default = function _default(props) {
|
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
143
|
-
|
|
143
|
+
className: "tnt-ellipsis",
|
|
144
144
|
style: _objectSpread({}, style, {
|
|
145
145
|
maxWidth: widthLimit
|
|
146
146
|
})
|
|
147
147
|
}, prefix && prefix, React.createElement("div", {
|
|
148
|
-
|
|
148
|
+
className: getClassName()
|
|
149
149
|
}, inner ? renderNode() : emptyText), suffix && suffix, inner && _copyable && React.createElement("div", {
|
|
150
|
-
|
|
150
|
+
className: "svg-button",
|
|
151
151
|
onClick: function onClick() {
|
|
152
152
|
return handleCopy(elementRef.current.innerText);
|
|
153
153
|
}
|