tntd 1.4.6 → 1.4.7
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/components/Layout/HeaderActions.js +90 -128
- package/components/LoadingButton/index.js +11 -15
- package/dist/stats.json +4958 -4958
- package/dist/tntd.js +1 -1
- package/es/Layout/HeaderActions.js +10 -10
- package/es/LoadingButton/index.js +20 -10
- package/lib/ArrayInput/icon.js +27 -31
- package/lib/ArrayInput/index.js +211 -298
- package/lib/AuthContext.js +2 -13
- package/lib/Columns/index.js +71 -100
- package/lib/DevelopmentLogin/LoginModal.js +79 -141
- package/lib/DevelopmentLogin/index.js +28 -55
- package/lib/Ellipsis/Svg/CopySVG.js +23 -71
- package/lib/Ellipsis/Svg/TickSVG.js +17 -49
- package/lib/Ellipsis/index.js +148 -154
- package/lib/Handle/index.js +72 -109
- package/lib/Icon/fonts/iconfont.js +1 -43
- package/lib/Icon/iconList.js +119 -8
- package/lib/Icon/index.js +13 -45
- package/lib/Img/Contain.js +49 -81
- package/lib/Img/Cover.js +88 -136
- package/lib/Img/index.js +36 -89
- package/lib/Layout/ActionsContext.js +2 -11
- package/lib/Layout/AppList.js +262 -256
- package/lib/Layout/Application.js +119 -135
- package/lib/Layout/Avatar.js +137 -137
- package/lib/Layout/CompatibleLanguage.js +214 -195
- package/lib/Layout/EnterpriseLayout/Avatar.js +156 -168
- package/lib/Layout/EnterpriseLayout/Language.js +75 -100
- package/lib/Layout/EnterpriseLayout/Theme.js +96 -94
- package/lib/Layout/EnterpriseLayout/index.js +32 -45
- package/lib/Layout/GlobalNavigation/NavigationPopup.js +335 -407
- package/lib/Layout/GlobalNavigation/index.js +110 -158
- package/lib/Layout/Header.js +165 -116
- package/lib/Layout/HeaderActions.js +132 -129
- package/lib/Layout/HeaderNavs.js +90 -113
- package/lib/Layout/HeaderTabs.js +312 -278
- package/lib/Layout/Iconfont.js +2 -15
- package/lib/Layout/Language.js +63 -102
- package/lib/Layout/Layout.js +272 -261
- package/lib/Layout/Logo.js +132 -87
- package/lib/Layout/OrgAppList.js +440 -319
- package/lib/Layout/SideMenu.js +429 -343
- package/lib/Layout/Theme.js +95 -124
- package/lib/Layout/checkAuth.js +21 -35
- package/lib/Layout/createActions.js +38 -51
- package/lib/Layout/images/index.js +33 -41
- package/lib/Layout/index.js +110 -161
- package/lib/Layout/paaslayout/CompactSideMenu.js +200 -178
- package/lib/Layout/paaslayout/Header.js +84 -90
- package/lib/Layout/paaslayout/Logo.js +27 -32
- package/lib/Layout/paaslayout/SideMenu.js +161 -174
- package/lib/Layout/paaslayout/index.js +240 -261
- package/lib/Layout/storage.js +20 -78
- package/lib/Layout/utils.js +93 -143
- package/lib/LoadingButton/index.js +25 -57
- package/lib/Modal/index.js +83 -108
- package/lib/Page/Box.js +56 -81
- package/lib/Page/index.js +151 -173
- package/lib/Page/utils.js +12 -30
- package/lib/QueryForm/Field/Checkbox.js +11 -33
- package/lib/QueryForm/Field/Select.js +63 -99
- package/lib/QueryForm/Field/SelectInput.js +69 -114
- package/lib/QueryForm/Field/fieldsMap.js +30 -52
- package/lib/QueryForm/Field/index.js +76 -158
- package/lib/QueryForm/createActions.js +50 -65
- package/lib/QueryForm/index.js +304 -383
- package/lib/QueryForm/useForm.js +6 -17
- package/lib/QueryListScene/List.js +290 -366
- package/lib/QueryListScene/QueryForm.js +93 -161
- package/lib/QueryListScene/QueryListScene.js +33 -87
- package/lib/QueryListScene/Title.js +10 -20
- package/lib/QueryListScene/Toolbar.js +8 -31
- package/lib/QueryListScene/createActions.js +64 -79
- package/lib/QueryListScene/index.js +23 -40
- package/lib/QueryListScene/useActions.js +6 -17
- package/lib/Select/DropDownWrap.js +60 -124
- package/lib/Select/index.js +425 -561
- package/lib/Table/ResizableTable/index.js +77 -121
- package/lib/Table/index.js +19 -51
- package/lib/Title/index.js +34 -52
- package/lib/index.js +19 -159
- package/lib/locale.js +48 -63
- package/package.json +1 -1
- package/lib/Layout/EnterpriseLayout/Header.js +0 -113
- package/lib/Layout/EnterpriseLayout/HeaderActions.js +0 -104
|
@@ -1,95 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Row } from 'antd';
|
|
4
|
+
import Iconfont from '../Iconfont';
|
|
5
|
+
import { setThemeStore, getThemeStore } from '../storage';
|
|
6
|
+
|
|
7
|
+
const Theme = styled.li`
|
|
8
|
+
margin-top: 20px;
|
|
9
|
+
.user-info-body-theme-row{
|
|
10
|
+
>div{
|
|
11
|
+
width: 90px;
|
|
12
|
+
height: 36px;
|
|
13
|
+
line-height: 36px;
|
|
14
|
+
font-family: PingFangSC-Regular;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
border-radius: 2px;
|
|
17
|
+
text-align: center;
|
|
18
|
+
cursor:pointer;
|
|
19
|
+
position: relative;
|
|
20
|
+
&.themeS3{
|
|
21
|
+
background-image: linear-gradient(180deg, #213F83 0%, #0F75D6 100%);
|
|
22
|
+
color: #FFFFFF;
|
|
23
|
+
}
|
|
24
|
+
&.themeS2{
|
|
25
|
+
background: #17233D;
|
|
26
|
+
color: #FFFFFF;
|
|
27
|
+
}
|
|
28
|
+
&.themeS1{
|
|
29
|
+
background: #FFFFFF;
|
|
30
|
+
box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.1);
|
|
31
|
+
color: #17233D;
|
|
32
|
+
}
|
|
33
|
+
.icon-checked-wrap{
|
|
34
|
+
width: 14px;
|
|
35
|
+
height: 14px;
|
|
36
|
+
border-radius: 100%;
|
|
37
|
+
background: #126BFB;
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: -5px;
|
|
40
|
+
right: -5px;
|
|
41
|
+
&:after{
|
|
42
|
+
content:'';
|
|
43
|
+
width: 4px;
|
|
44
|
+
height: 6px;
|
|
45
|
+
border-color: #FFFFFF;
|
|
46
|
+
border-width: 0 1px 1px 0;
|
|
47
|
+
border-style: solid;
|
|
48
|
+
transform: rotate(45deg);
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: 3px;
|
|
51
|
+
left: 5px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
const themes = [
|
|
59
|
+
{ value: 'themeS3', label: '科技蓝' },
|
|
60
|
+
{ value: 'themeS2', label: '暗夜黑' },
|
|
61
|
+
{ value: 'themeS1', label: '极致白' },
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
export default props => {
|
|
65
|
+
const { onChange } = props;
|
|
66
|
+
|
|
67
|
+
const getTheme = () => {
|
|
68
|
+
let theme = getThemeStore() || props.theme || 'themeS3';
|
|
69
|
+
return themes.some(({ value }) => value === theme) ? theme : 'themeS3';
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const [theme, setTheme] = useState(getTheme());
|
|
73
|
+
const changeTheme = theme => {
|
|
74
|
+
setTheme(theme);
|
|
75
|
+
setThemeStore(theme);
|
|
76
|
+
onChange(theme);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<Theme>
|
|
81
|
+
<Row type="flex" justify="space-between" className="user-info-body-theme-row">
|
|
82
|
+
{
|
|
83
|
+
themes.map(({ value, label }) => (
|
|
84
|
+
<div className={value} onClick={changeTheme.bind(this, value)}>
|
|
85
|
+
{label}
|
|
86
|
+
{
|
|
87
|
+
theme === value &&
|
|
88
|
+
<span className="icon-checked-wrap"></span>
|
|
89
|
+
}
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
))
|
|
93
|
+
}
|
|
94
|
+
</Row>
|
|
95
|
+
</Theme>
|
|
96
|
+
);
|
|
93
97
|
};
|
|
94
|
-
|
|
95
|
-
exports["default"] = _default;
|
|
@@ -1,46 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
import { withTheme } from 'styled-components';
|
|
2
|
+
import Layout from '../Layout';
|
|
3
|
+
import Avatar from './Avatar';
|
|
4
|
+
import {
|
|
5
|
+
getThemeStore
|
|
6
|
+
} from '../storage';
|
|
7
|
+
|
|
8
|
+
export default withTheme(
|
|
9
|
+
props => {
|
|
10
|
+
const {
|
|
11
|
+
userInfo = {},
|
|
12
|
+
extendMap = {}
|
|
13
|
+
} = props;
|
|
14
|
+
|
|
15
|
+
// 企业级的默认蓝色主题
|
|
16
|
+
let theme = getThemeStore() || extendMap?.defaultTheme || userInfo.theme || 'themeS3';
|
|
17
|
+
theme = theme === 'default' ? 'themeS3' : theme;
|
|
18
|
+
const newProps = {
|
|
19
|
+
...props,
|
|
20
|
+
userInfo:{
|
|
21
|
+
...userInfo,
|
|
22
|
+
theme
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return (
|
|
26
|
+
<Layout
|
|
27
|
+
{...newProps}
|
|
28
|
+
AvatarCustom={Avatar}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
);
|
|
2
33
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _styledComponents = require("styled-components");
|
|
9
|
-
|
|
10
|
-
var _Layout = _interopRequireDefault(require("../Layout"));
|
|
11
|
-
|
|
12
|
-
var _Avatar = _interopRequireDefault(require("./Avatar"));
|
|
13
|
-
|
|
14
|
-
var _storage = require("../storage");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
27
|
-
var _props$userInfo = props.userInfo,
|
|
28
|
-
userInfo = _props$userInfo === void 0 ? {} : _props$userInfo,
|
|
29
|
-
_props$extendMap = props.extendMap,
|
|
30
|
-
extendMap = _props$extendMap === void 0 ? {} : _props$extendMap; // 企业级的默认蓝色主题
|
|
31
|
-
|
|
32
|
-
var theme = (0, _storage.getThemeStore)() || (extendMap == null ? void 0 : extendMap.defaultTheme) || userInfo.theme || 'themeS3';
|
|
33
|
-
theme = theme === 'default' ? 'themeS3' : theme;
|
|
34
|
-
|
|
35
|
-
var newProps = _objectSpread({}, props, {
|
|
36
|
-
userInfo: _objectSpread({}, userInfo, {
|
|
37
|
-
theme: theme
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
return React.createElement(_Layout["default"], _extends({}, newProps, {
|
|
42
|
-
AvatarCustom: _Avatar["default"]
|
|
43
|
-
}));
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
exports["default"] = _default;
|