tntd 1.4.19 → 1.4.20
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/Avatar.js +4 -4
- package/components/Layout/EnterpriseLayout/Avatar.js +10 -7
- package/components/Layout/EnterpriseLayout/Language.js +5 -3
- package/components/Layout/EnterpriseLayout/Theme.js +6 -7
- package/components/Layout/EnterpriseLayout/index.js +1 -1
- package/components/Layout/HeaderActions.js +13 -10
- package/components/Layout/HeaderTabs.js +13 -14
- package/components/Layout/Layout.js +2 -0
- package/components/Layout/index.js +2 -1
- package/components/Layout/storage.js +12 -2
- package/components/Page/index.js +2 -2
- package/components/locale.js +7 -2
- package/dist/1.tntd.js +1 -12
- package/dist/stats.json +28424 -27998
- package/dist/tntd.css +1 -1
- package/dist/tntd.js +13 -7
- package/es/ArrayInput/icon.js +5 -5
- package/es/ArrayInput/index.js +76 -108
- package/es/AuthContext.js +1 -1
- package/es/Columns/index.js +31 -38
- package/es/DevelopmentLogin/LoginModal.js +32 -45
- package/es/DevelopmentLogin/index.js +13 -17
- package/es/Ellipsis/Svg/CopySVG.js +13 -13
- package/es/Ellipsis/Svg/TickSVG.js +8 -8
- package/es/Ellipsis/index.js +58 -69
- package/es/Handle/index.js +25 -35
- package/es/Icon/fonts/iconfont.js +7 -12
- package/es/Icon/index.js +10 -13
- package/es/Img/Contain.js +24 -29
- package/es/Img/Cover.js +40 -54
- package/es/Img/index.js +36 -45
- package/es/Layout/ActionsContext.js +3 -2
- package/es/Layout/AppList.js +37 -92
- package/es/Layout/Application.js +26 -72
- package/es/Layout/Avatar.js +32 -69
- package/es/Layout/CompatibleLanguage.js +39 -94
- package/es/Layout/EnterpriseLayout/Avatar.js +49 -79
- package/es/Layout/EnterpriseLayout/Language.js +19 -34
- package/es/Layout/EnterpriseLayout/Theme.js +23 -37
- package/es/Layout/EnterpriseLayout/index.js +14 -16
- package/es/Layout/GlobalNavigation/NavigationPopup.js +59 -170
- package/es/Layout/GlobalNavigation/index.js +20 -54
- package/es/Layout/Header.js +25 -46
- package/es/Layout/HeaderActions.js +52 -63
- package/es/Layout/HeaderNavs.js +20 -47
- package/es/Layout/HeaderTabs.js +61 -115
- package/es/Layout/Iconfont.js +1 -1
- package/es/Layout/Language.js +14 -32
- package/es/Layout/Layout.js +88 -108
- package/es/Layout/Logo.js +16 -32
- package/es/Layout/OrgAppList.js +62 -107
- package/es/Layout/SideMenu.js +63 -124
- package/es/Layout/Theme.js +23 -61
- package/es/Layout/index.js +29 -36
- package/es/Layout/paaslayout/CompactSideMenu.js +35 -74
- package/es/Layout/paaslayout/Header.js +22 -45
- package/es/Layout/paaslayout/Logo.js +3 -13
- package/es/Layout/paaslayout/SideMenu.js +39 -78
- package/es/Layout/paaslayout/index.js +75 -102
- package/es/Layout/storage.js +26 -9
- package/es/LoadingButton/index.js +15 -24
- package/es/Modal/index.js +38 -46
- package/es/Page/Box.js +34 -41
- package/es/Page/index.js +54 -68
- package/es/Page/utils.js +0 -5
- package/es/QueryForm/Field/Checkbox.js +5 -9
- package/es/QueryForm/Field/Select.js +31 -41
- package/es/QueryForm/Field/SelectInput.js +26 -41
- package/es/QueryForm/Field/fieldsMap.js +0 -1
- package/es/QueryForm/Field/index.js +41 -71
- package/es/QueryForm/createActions.js +6 -7
- package/es/QueryForm/index.js +76 -135
- package/es/QueryListScene/List.js +74 -128
- package/es/QueryListScene/QueryForm.js +46 -81
- package/es/QueryListScene/QueryListScene.js +25 -40
- package/es/QueryListScene/Title.js +3 -3
- package/es/QueryListScene/Toolbar.js +11 -12
- package/es/Select/DropDownWrap.js +29 -50
- package/es/Select/index.js +135 -231
- package/es/Table/ResizableTable/index.js +26 -40
- package/es/Table/index.js +18 -16
- package/es/Title/index.js +21 -23
- package/es/locale.js +9 -7
- package/es/utils/checkAuth.js +3 -5
- package/es/utils/findMenuInfoByPath.js +0 -4
- package/es/utils/index.js +12 -23
- package/lib/ArrayInput/icon.js +6 -6
- package/lib/ArrayInput/index.js +78 -127
- package/lib/AuthContext.js +1 -4
- package/lib/Columns/index.js +31 -47
- package/lib/DevelopmentLogin/LoginModal.js +32 -58
- package/lib/DevelopmentLogin/index.js +16 -27
- package/lib/Ellipsis/Svg/CopySVG.js +13 -15
- package/lib/Ellipsis/Svg/TickSVG.js +8 -10
- package/lib/Ellipsis/index.js +57 -80
- package/lib/Handle/index.js +25 -47
- package/lib/Icon/fonts/iconfont.js +7 -12
- package/lib/Icon/index.js +11 -20
- package/lib/Img/Contain.js +24 -34
- package/lib/Img/Cover.js +42 -65
- package/lib/Img/index.js +36 -51
- package/lib/Layout/ActionsContext.js +1 -4
- package/lib/Layout/AppList.js +40 -118
- package/lib/Layout/Application.js +26 -86
- package/lib/Layout/Avatar.js +35 -89
- package/lib/Layout/CompatibleLanguage.js +39 -110
- package/lib/Layout/EnterpriseLayout/Avatar.js +52 -101
- package/lib/Layout/EnterpriseLayout/Language.js +21 -49
- package/lib/Layout/EnterpriseLayout/Theme.js +22 -46
- package/lib/Layout/EnterpriseLayout/index.js +14 -23
- package/lib/Layout/GlobalNavigation/NavigationPopup.js +59 -186
- package/lib/Layout/GlobalNavigation/index.js +23 -74
- package/lib/Layout/Header.js +28 -63
- package/lib/Layout/HeaderActions.js +48 -74
- package/lib/Layout/HeaderNavs.js +23 -61
- package/lib/Layout/HeaderTabs.js +58 -126
- package/lib/Layout/Iconfont.js +1 -5
- package/lib/Layout/Language.js +17 -48
- package/lib/Layout/Layout.js +90 -128
- package/lib/Layout/Logo.js +19 -43
- package/lib/Layout/OrgAppList.js +64 -127
- package/lib/Layout/SideMenu.js +65 -143
- package/lib/Layout/Theme.js +23 -73
- package/lib/Layout/createActions.js +0 -5
- package/lib/Layout/images/index.js +0 -28
- package/lib/Layout/index.js +33 -57
- package/lib/Layout/paaslayout/CompactSideMenu.js +35 -84
- package/lib/Layout/paaslayout/Header.js +22 -55
- package/lib/Layout/paaslayout/Logo.js +3 -19
- package/lib/Layout/paaslayout/SideMenu.js +39 -87
- package/lib/Layout/paaslayout/index.js +77 -122
- package/lib/Layout/storage.js +29 -35
- package/lib/LoadingButton/index.js +15 -29
- package/lib/Modal/index.js +38 -53
- package/lib/Page/Box.js +34 -45
- package/lib/Page/index.js +54 -78
- package/lib/Page/utils.js +1 -9
- package/lib/QueryForm/Field/Checkbox.js +5 -13
- package/lib/QueryForm/Field/Select.js +33 -53
- package/lib/QueryForm/Field/SelectInput.js +28 -56
- package/lib/QueryForm/Field/fieldsMap.js +1 -15
- package/lib/QueryForm/Field/index.js +43 -81
- package/lib/QueryForm/createActions.js +6 -12
- package/lib/QueryForm/index.js +78 -157
- package/lib/QueryForm/useForm.js +0 -5
- package/lib/QueryListScene/List.js +76 -140
- package/lib/QueryListScene/QueryForm.js +46 -86
- package/lib/QueryListScene/QueryListScene.js +25 -46
- package/lib/QueryListScene/Title.js +3 -7
- package/lib/QueryListScene/Toolbar.js +11 -16
- package/lib/QueryListScene/createActions.js +0 -5
- package/lib/QueryListScene/index.js +0 -10
- package/lib/QueryListScene/useActions.js +0 -5
- package/lib/Select/DropDownWrap.js +31 -56
- package/lib/Select/index.js +135 -241
- package/lib/Table/ResizableTable/index.js +26 -48
- package/lib/Table/index.js +17 -28
- package/lib/Title/index.js +21 -28
- package/lib/index.js +35 -56
- package/lib/locale.js +11 -12
- package/lib/utils/checkAuth.js +4 -9
- package/lib/utils/findMenuInfoByPath.js +1 -8
- package/lib/utils/index.js +15 -42
- package/package.json +2 -2
- 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/lib/Layout/OrgAppList.js
CHANGED
|
@@ -1,117 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) {
|
|
4
|
-
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
require("antd/lib/tree-select/style");
|
|
11
|
-
|
|
12
9
|
var _treeSelect = _interopRequireDefault(require("antd/lib/tree-select"));
|
|
13
|
-
|
|
14
10
|
require("antd/lib/select/style");
|
|
15
|
-
|
|
16
11
|
var _select = _interopRequireDefault(require("antd/lib/select"));
|
|
17
|
-
|
|
18
12
|
require("antd/lib/input/style");
|
|
19
|
-
|
|
20
13
|
var _input = _interopRequireDefault(require("antd/lib/input"));
|
|
21
|
-
|
|
22
14
|
var _react = require("react");
|
|
23
|
-
|
|
24
15
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
25
|
-
|
|
26
16
|
var _lodash = require("lodash");
|
|
27
|
-
|
|
28
17
|
var _storage = require("./storage");
|
|
29
|
-
|
|
30
18
|
var _utils = require("../utils");
|
|
31
|
-
|
|
32
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
19
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
36
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
49
|
-
|
|
50
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
-
|
|
23
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
24
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
28
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
29
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
30
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
33
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
52
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
-
|
|
54
|
-
function _templateObject3() {
|
|
55
|
-
var data = _taggedTemplateLiteral(["\n .org-tree-select {\n &.ant-select-tree-dropdown .ant-select-dropdown-search{\n padding: 10px;\n .ant-select-search__field{\n padding: 0 7px;\n height:28px;\n line-height: 28px;\n }\n }\n .ant-select-tree {\n margin-top:0;\n padding: 0 10px 0 4px;\n li{\n margin:4px 0 ;\n .ant-select-tree-switcher{\n height: 30px;\n line-height: 30px;\n float: left;\n }\n .ant-select-tree-node-content-wrapper{\n height: 30px;\n line-height:30px;\n padding: 0;\n border-radius: 0;\n &.ant-select-tree-node-selected{\n background: #E7F0FE;\n }\n }\n .ant-select-tree-node-content-wrapper:hover{\n background: #E7F0FE;\n }\n .ant-select-tree-title{\n font-family: PingFangSC-Regular;\n color: #17233D;\n padding-left: 4px;\n padding-right: 4px;\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n }\n }\n .org-tree-check-select {\n .ant-select-tree {\n margin-top:0;\n padding: 0 10px 0 4px;\n li{\n margin:4px 0 ;\n .ant-select-tree-switcher{\n height: 30px;\n line-height: 30px;\n vertical-align: top;\n }\n\n .ant-select-tree-checkbox{\n vertical-align: super;\n }\n \n .ant-select-tree-node-content-wrapper{\n height: 30px;\n line-height:30px;\n padding: 0;\n border-radius: 0;\n &.ant-select-tree-node-selected{\n background: #E7F0FE;\n }\n }\n .ant-select-tree-node-content-wrapper:hover{\n background: #E7F0FE;\n }\n .ant-select-tree-title{\n font-family: PingFangSC-Regular;\n color: #17233D;\n padding-left: 4px;\n padding-right: 4px;\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n }\n }\n"]);
|
|
56
|
-
|
|
57
|
-
_templateObject3 = function _templateObject3() {
|
|
58
|
-
return data;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _templateObject2() {
|
|
65
|
-
var data = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n .ant-select-selection--multiple {\n padding-bottom: 0;\n overflow: auto;\n min-height: 28px;\n }\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u5220\u9664\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u4E3A\u6D45\u8272\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n }\n // \u4E0D\u9700\u8981\u533A\u5206\u8272\u7CFB\n // .tnt-themeS1.hasHeaderTabs & {\n // /* background: #141825; */\n // /* color: rgba(255,255,255,.85); */\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"]);
|
|
66
|
-
|
|
67
|
-
_templateObject2 = function _templateObject2() {
|
|
68
|
-
return data;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
return data;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function _templateObject() {
|
|
75
|
-
var data = _taggedTemplateLiteral(["\n display: inline-block !important;\n width:auto !important;\n min-width: 260px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n\n &.ant-input-group.ant-input-group-compact::before,\n &.ant-input-group.ant-input-group-compact::after{\n content:\"\";\n display: none;\n }\n\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n .ant-select-selection--multiple {\n padding-bottom: 0;\n overflow: auto;\n min-height: 28px;\n }\n\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u5220\u9664\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u6539\u4E3A\u6D45\u8272\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n\n .ant-select-selection__placeholder, .ant-select-search__field__placeholder{\n color: #8B919E;\n }\n }\n // \u5220\u9664\u8272\u7CFB\u5DEE\u5F02\n // .tnt-themeS1.hasHeaderTabs & {\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // \u5220\u9664\u8272\u7CFB\u5DEE\u5F02\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295 !important;\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"]);
|
|
76
|
-
|
|
77
|
-
_templateObject = function _templateObject() {
|
|
78
|
-
return data;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
return data;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
35
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
85
|
-
|
|
86
36
|
var InputGroup = _input["default"].Group;
|
|
87
|
-
var Option = _select["default"].Option;
|
|
37
|
+
var Option = _select["default"].Option;
|
|
88
38
|
|
|
89
|
-
|
|
39
|
+
// 机构+应用UI
|
|
40
|
+
var OrgAppsInputGroup = (0, _styledComponents["default"])(InputGroup)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block !important;\n width:auto !important;\n min-width: 260px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n\n &.ant-input-group.ant-input-group-compact::before,\n &.ant-input-group.ant-input-group-compact::after{\n content:\"\";\n display: none;\n }\n\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n .ant-select-selection--multiple {\n padding-bottom: 0;\n overflow: auto;\n min-height: 28px;\n }\n\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u5220\u9664\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u6539\u4E3A\u6D45\u8272\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n\n .ant-select-selection__placeholder, .ant-select-search__field__placeholder{\n color: #8B919E;\n }\n }\n // \u5220\u9664\u8272\u7CFB\u5DEE\u5F02\n // .tnt-themeS1.hasHeaderTabs & {\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // \u5220\u9664\u8272\u7CFB\u5DEE\u5F02\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295 !important;\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"])), function (props) {
|
|
90
41
|
return "".concat(props.theme.blueBgColor, " !important");
|
|
91
|
-
});
|
|
42
|
+
});
|
|
92
43
|
|
|
93
|
-
|
|
44
|
+
// 只展示机构
|
|
45
|
+
var AppTreeSelect = (0, _styledComponents["default"])(_treeSelect["default"])(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n .ant-select-selection--multiple {\n padding-bottom: 0;\n overflow: auto;\n min-height: 28px;\n }\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u5220\u9664\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u4E3A\u6D45\u8272\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n }\n // \u4E0D\u9700\u8981\u533A\u5206\u8272\u7CFB\n // .tnt-themeS1.hasHeaderTabs & {\n // /* background: #141825; */\n // /* color: rgba(255,255,255,.85); */\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"])), function (props) {
|
|
94
46
|
return "".concat(props.theme.blueBgColor, " !important");
|
|
95
47
|
});
|
|
96
|
-
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject3());
|
|
97
|
-
|
|
48
|
+
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .org-tree-select {\n &.ant-select-tree-dropdown .ant-select-dropdown-search{\n padding: 10px;\n .ant-select-search__field{\n padding: 0 7px;\n height:28px;\n line-height: 28px;\n }\n }\n .ant-select-tree {\n margin-top:0;\n padding: 0 10px 0 4px;\n li{\n margin:4px 0 ;\n .ant-select-tree-switcher{\n height: 30px;\n line-height: 30px;\n float: left;\n }\n .ant-select-tree-node-content-wrapper{\n height: 30px;\n line-height:30px;\n padding: 0;\n border-radius: 0;\n &.ant-select-tree-node-selected{\n background: #E7F0FE;\n }\n }\n .ant-select-tree-node-content-wrapper:hover{\n background: #E7F0FE;\n }\n .ant-select-tree-title{\n font-family: PingFangSC-Regular;\n color: #17233D;\n padding-left: 4px;\n padding-right: 4px;\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n }\n }\n .org-tree-check-select {\n .ant-select-tree {\n margin-top:0;\n padding: 0 10px 0 4px;\n li{\n margin:4px 0 ;\n .ant-select-tree-switcher{\n height: 30px;\n line-height: 30px;\n vertical-align: top;\n }\n\n .ant-select-tree-checkbox{\n vertical-align: super;\n }\n \n .ant-select-tree-node-content-wrapper{\n height: 30px;\n line-height:30px;\n padding: 0;\n border-radius: 0;\n &.ant-select-tree-node-selected{\n background: #E7F0FE;\n }\n }\n .ant-select-tree-node-content-wrapper:hover{\n background: #E7F0FE;\n }\n .ant-select-tree-title{\n font-family: PingFangSC-Regular;\n color: #17233D;\n padding-left: 4px;\n padding-right: 4px;\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n }\n }\n"])));
|
|
98
49
|
var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
99
50
|
var orgAppShow = props.orgAppShow,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
51
|
+
selectedOrgKey = props.selectedOrgKey,
|
|
52
|
+
orgList = props.orgList,
|
|
53
|
+
orgTreeConfig = props.orgTreeConfig,
|
|
54
|
+
onOrgChange = props.onOrgChange,
|
|
55
|
+
selectedAppKey = props.selectedAppKey,
|
|
56
|
+
_props$orgAppList = props.orgAppList,
|
|
57
|
+
orgAppList = _props$orgAppList === void 0 ? [] : _props$orgAppList,
|
|
58
|
+
onAppChange = props.onAppChange,
|
|
59
|
+
headerTabs = props.headerTabs;
|
|
109
60
|
var orgListFormatData = (0, _utils.traverseTree)([orgList], function (item) {
|
|
110
61
|
item.title = item.name;
|
|
111
62
|
item.value = item.uuid;
|
|
112
63
|
item.key = item.uuid;
|
|
113
|
-
});
|
|
64
|
+
});
|
|
114
65
|
|
|
66
|
+
// 初始化数据函数
|
|
115
67
|
var getInitialSelected = function getInitialSelected(selectedKey, currentStore, dataList, type) {
|
|
116
68
|
var findByKey = function findByKey(selectedKey) {
|
|
117
69
|
var find;
|
|
@@ -123,17 +75,13 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
123
75
|
});
|
|
124
76
|
return find;
|
|
125
77
|
};
|
|
126
|
-
|
|
127
78
|
var current = findByKey(selectedKey || (0, _lodash.get)(currentStore, 'key'));
|
|
128
|
-
|
|
129
79
|
if (type) {
|
|
130
80
|
return current;
|
|
131
81
|
}
|
|
132
|
-
|
|
133
82
|
return current || dataList[0];
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
|
|
83
|
+
};
|
|
84
|
+
// 初始化数据函数机构树
|
|
137
85
|
var getInitialSelectedTree = function getInitialSelectedTree(selecteds, dataList) {
|
|
138
86
|
if (selecteds.length) {
|
|
139
87
|
return selecteds;
|
|
@@ -147,28 +95,28 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
147
95
|
(0, _storage.setCurrentOrgTreeStore)(temp);
|
|
148
96
|
return temp;
|
|
149
97
|
}
|
|
150
|
-
};
|
|
151
|
-
// 机构
|
|
152
|
-
|
|
98
|
+
};
|
|
153
99
|
|
|
100
|
+
// 初始化值
|
|
101
|
+
// 机构
|
|
154
102
|
var _useState = (0, _react.useState)(getInitialSelected(selectedOrgKey, (0, _storage.getCurrentOrgStore)(), orgListFormatData)),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
103
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
104
|
+
selectedOrg = _useState2[0],
|
|
105
|
+
setSelectedOrg = _useState2[1];
|
|
159
106
|
|
|
107
|
+
// 机构树
|
|
160
108
|
var _useState3 = (0, _react.useState)(getInitialSelectedTree((0, _storage.getCurrentOrgTreeStore)(), orgListFormatData)),
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
109
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
110
|
+
selectedOrgTree = _useState4[0],
|
|
111
|
+
setSelectedOrgTree = _useState4[1];
|
|
165
112
|
|
|
113
|
+
// 应用
|
|
166
114
|
var _useState5 = (0, _react.useState)(getInitialSelected(selectedAppKey, (0, _storage.getCurrentAppStore)(), orgAppList, 'default')),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
115
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
116
|
+
selectedApp = _useState6[0],
|
|
117
|
+
setSelectedApp = _useState6[1];
|
|
171
118
|
|
|
119
|
+
// org变化事件
|
|
172
120
|
var changeOrg = function changeOrg() {
|
|
173
121
|
var org = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
174
122
|
setSelectedOrg(org);
|
|
@@ -179,10 +127,8 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
179
127
|
});
|
|
180
128
|
onOrgChange && onOrgChange(org);
|
|
181
129
|
};
|
|
182
|
-
|
|
183
130
|
var changeOrgTree = function changeOrgTree() {
|
|
184
131
|
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
185
|
-
|
|
186
132
|
if (!val.length) {
|
|
187
133
|
val = orgListFormatData.map(function (res) {
|
|
188
134
|
return {
|
|
@@ -191,38 +137,34 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
191
137
|
};
|
|
192
138
|
});
|
|
193
139
|
}
|
|
194
|
-
|
|
195
140
|
setSelectedOrgTree(val);
|
|
196
141
|
(0, _storage.setCurrentOrgTreeStore)(val);
|
|
197
142
|
onOrgChange && onOrgChange(val);
|
|
198
|
-
};
|
|
199
|
-
|
|
143
|
+
};
|
|
200
144
|
|
|
145
|
+
// app变化事件
|
|
201
146
|
var changeApp = function changeApp(app) {
|
|
202
147
|
setSelectedApp(app);
|
|
203
148
|
(0, _storage.setCurrentAppStore)(app);
|
|
204
149
|
onAppChange && onAppChange(app);
|
|
205
150
|
};
|
|
206
|
-
|
|
207
151
|
(0, _react.useEffect)(function () {
|
|
208
152
|
// 监听org机构
|
|
209
153
|
var newOrg = getInitialSelected(selectedOrgKey, (0, _storage.getCurrentOrgStore)(), orgListFormatData);
|
|
210
|
-
|
|
211
154
|
if ((newOrg == null ? void 0 : newOrg.key) !== (selectedOrg == null ? void 0 : selectedOrg.key)) {
|
|
212
155
|
changeOrg(newOrg);
|
|
213
|
-
}
|
|
214
|
-
|
|
156
|
+
}
|
|
215
157
|
|
|
158
|
+
// 监听应用
|
|
216
159
|
var newApp = getInitialSelected(selectedAppKey, (0, _storage.getCurrentAppStore)(), orgAppList);
|
|
217
|
-
|
|
218
160
|
if ((newApp == null ? void 0 : newApp.key) !== (selectedApp == null ? void 0 : selectedApp.key)) {
|
|
219
161
|
changeApp(newApp);
|
|
220
162
|
}
|
|
221
|
-
}, [orgList, selectedOrgKey, selectedAppKey, orgAppList]);
|
|
163
|
+
}, [orgList, selectedOrgKey, selectedAppKey, orgAppList]);
|
|
222
164
|
|
|
165
|
+
// 如果是多签页的模式 则居右对齐
|
|
223
166
|
var treeSelectPosition = {},
|
|
224
|
-
|
|
225
|
-
|
|
167
|
+
selectPosition = {};
|
|
226
168
|
if (headerTabs) {
|
|
227
169
|
treeSelectPosition = {
|
|
228
170
|
dropdownPopupAlign: {
|
|
@@ -235,10 +177,8 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
235
177
|
}
|
|
236
178
|
};
|
|
237
179
|
}
|
|
238
|
-
|
|
239
180
|
;
|
|
240
181
|
var orgTreeConfigProp = {};
|
|
241
|
-
|
|
242
182
|
if (orgTreeConfig) {
|
|
243
183
|
orgTreeConfigProp = _objectSpread({
|
|
244
184
|
dropdownClassName: 'org-tree-check-select',
|
|
@@ -265,9 +205,8 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
265
205
|
value: (0, _lodash.get)(selectedOrg, 'key')
|
|
266
206
|
};
|
|
267
207
|
}
|
|
268
|
-
|
|
269
208
|
if (!orgAppShow) {
|
|
270
|
-
return React.createElement(React.Fragment, null, React.createElement(AppTreeSelect, _extends({
|
|
209
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AppTreeSelect, _extends({
|
|
271
210
|
placeholder: "\u9009\u62E9\u673A\u6784",
|
|
272
211
|
searchPlaceholder: "\u673A\u6784\u540D\u79F0",
|
|
273
212
|
treeNodeFilterProp: "title",
|
|
@@ -285,12 +224,11 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
285
224
|
overflow: 'auto',
|
|
286
225
|
width: 320
|
|
287
226
|
}
|
|
288
|
-
}, orgTreeConfigProp)), React.createElement(GlobalStyle, null));
|
|
227
|
+
}, orgTreeConfigProp)), /*#__PURE__*/React.createElement(GlobalStyle, null));
|
|
289
228
|
}
|
|
290
|
-
|
|
291
|
-
return React.createElement(OrgAppsInputGroup, {
|
|
229
|
+
return /*#__PURE__*/React.createElement(OrgAppsInputGroup, {
|
|
292
230
|
compact: true
|
|
293
|
-
}, React.createElement(_treeSelect["default"], _extends({
|
|
231
|
+
}, /*#__PURE__*/React.createElement(_treeSelect["default"], _extends({
|
|
294
232
|
placeholder: "\u9009\u62E9\u673A\u6784",
|
|
295
233
|
searchPlaceholder: "\u673A\u6784\u540D\u79F0",
|
|
296
234
|
treeNodeFilterProp: "title",
|
|
@@ -307,7 +245,7 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
307
245
|
overflow: 'auto',
|
|
308
246
|
width: 320
|
|
309
247
|
}
|
|
310
|
-
}, orgTreeConfigProp)), React.createElement(GlobalStyle, null), React.createElement(_select["default"], {
|
|
248
|
+
}, orgTreeConfigProp)), /*#__PURE__*/React.createElement(GlobalStyle, null), /*#__PURE__*/React.createElement(_select["default"], {
|
|
311
249
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
312
250
|
showSearch: true,
|
|
313
251
|
optionFilterProp: "children",
|
|
@@ -325,13 +263,12 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
325
263
|
}
|
|
326
264
|
}, orgAppList.map(function (_ref2) {
|
|
327
265
|
var key = _ref2.key,
|
|
328
|
-
|
|
329
|
-
return React.createElement(Option, {
|
|
266
|
+
name = _ref2.name;
|
|
267
|
+
return /*#__PURE__*/React.createElement(Option, {
|
|
330
268
|
key: key,
|
|
331
269
|
value: key,
|
|
332
270
|
title: name
|
|
333
271
|
}, name);
|
|
334
272
|
})));
|
|
335
273
|
});
|
|
336
|
-
|
|
337
274
|
exports["default"] = _default;
|