tntd 1.4.18 → 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/Ellipsis/index.js +1 -1
- 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 +28426 -28000
- 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 +59 -70
- 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 +58 -81
- 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
|
@@ -1,89 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
10
|
var _Title = _interopRequireDefault(require("./Title"));
|
|
13
|
-
|
|
14
11
|
var _Toolbar = _interopRequireDefault(require("./Toolbar"));
|
|
15
|
-
|
|
16
12
|
var _createActions = _interopRequireDefault(require("./createActions"));
|
|
17
|
-
|
|
18
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
14
|
+
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; }
|
|
24
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
16
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
21
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
22
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
23
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
32
24
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
-
|
|
34
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
-
|
|
36
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
37
|
-
|
|
38
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
39
|
-
|
|
40
|
-
var QueryListScene =
|
|
41
|
-
/*#__PURE__*/
|
|
42
|
-
function (_React$Component) {
|
|
25
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27
|
+
var QueryListScene = /*#__PURE__*/function (_React$Component) {
|
|
43
28
|
_inherits(QueryListScene, _React$Component);
|
|
44
|
-
|
|
29
|
+
var _super = _createSuper(QueryListScene);
|
|
45
30
|
function QueryListScene(props) {
|
|
46
31
|
var _this;
|
|
47
|
-
|
|
48
32
|
_classCallCheck(this, QueryListScene);
|
|
49
|
-
|
|
50
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(QueryListScene).call(this, props));
|
|
33
|
+
_this = _super.call(this, props);
|
|
51
34
|
_this.actions = props.actions || (0, _createActions["default"])();
|
|
52
35
|
return _this;
|
|
53
36
|
}
|
|
54
|
-
|
|
55
37
|
_createClass(QueryListScene, [{
|
|
56
38
|
key: "render",
|
|
57
39
|
value: function render() {
|
|
58
40
|
var _cn,
|
|
59
|
-
|
|
60
|
-
|
|
41
|
+
_this2 = this;
|
|
61
42
|
var _this$props = this.props,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
43
|
+
title = _this$props.title,
|
|
44
|
+
children = _this$props.children,
|
|
45
|
+
size = _this$props.size,
|
|
46
|
+
_this$props$className = _this$props.className,
|
|
47
|
+
className = _this$props$className === void 0 ? '' : _this$props$className;
|
|
67
48
|
var hasToolbar = [].some.call(children || [], function (child) {
|
|
68
49
|
return (child == null ? void 0 : child.type) === _Toolbar["default"];
|
|
69
50
|
});
|
|
70
|
-
return _react["default"].createElement("div", {
|
|
51
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
52
|
className: (0, _classnames["default"])('tnt-querylistscene', (_cn = {}, _defineProperty(_cn, className, className), _defineProperty(_cn, 'large-size', size === 'large'), _defineProperty(_cn, "hasToolbar", hasToolbar), _cn))
|
|
72
|
-
}, title && _react["default"].createElement(_Title["default"], {
|
|
53
|
+
}, title && /*#__PURE__*/_react["default"].createElement(_Title["default"], {
|
|
73
54
|
title: title,
|
|
74
55
|
size: size
|
|
75
|
-
}), _react["default"].createElement("div", {
|
|
56
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
57
|
className: "tnt-querylistscene-content"
|
|
77
58
|
}, _react["default"].Children.map(children, function (child) {
|
|
78
|
-
return child && _react["default"].cloneElement(child, {
|
|
59
|
+
return child && /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
79
60
|
qlsProps: _this2.props,
|
|
80
61
|
actions: _this2.actions
|
|
81
62
|
});
|
|
82
63
|
})));
|
|
83
64
|
}
|
|
84
65
|
}]);
|
|
85
|
-
|
|
86
66
|
return QueryListScene;
|
|
87
67
|
}(_react["default"].Component);
|
|
88
|
-
|
|
89
68
|
exports["default"] = QueryListScene;
|
|
@@ -4,21 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* @file Title
|
|
14
11
|
* @author zhangyou
|
|
15
12
|
*/
|
|
16
13
|
var _default = function _default(_ref) {
|
|
17
14
|
var title = _ref.title,
|
|
18
|
-
|
|
19
|
-
return _react["default"].createElement("div", {
|
|
15
|
+
children = _ref.children;
|
|
16
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
20
17
|
className: "tnt-querylistscene-title"
|
|
21
|
-
}, _react["default"].createElement("span", null, title), _react["default"].createElement("span", null, children));
|
|
18
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, title), /*#__PURE__*/_react["default"].createElement("span", null, children));
|
|
22
19
|
};
|
|
23
|
-
|
|
24
20
|
exports["default"] = _default;
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
-
|
|
9
|
+
var _excluded = ["className", "children", "actions", "qslProps"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
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); }
|
|
16
15
|
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; }
|
|
17
|
-
|
|
18
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
|
-
|
|
20
17
|
var _default = function _default(_ref) {
|
|
21
18
|
var className = _ref.className,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return React.createElement("div", _extends({}, rest, {
|
|
19
|
+
children = _ref.children,
|
|
20
|
+
actions = _ref.actions,
|
|
21
|
+
qslProps = _ref.qslProps,
|
|
22
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
|
28
24
|
className: (0, _classnames["default"])('tnt-querylistscene-toolbar', _defineProperty({}, className, className))
|
|
29
25
|
}), children);
|
|
30
26
|
};
|
|
31
|
-
|
|
32
27
|
exports["default"] = _default;
|
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _eventemitter = _interopRequireDefault(require("eventemitter3"));
|
|
9
|
-
|
|
10
8
|
var _lodash = require("lodash");
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
10
|
var _default = function _default() {
|
|
15
11
|
var eventEmitter = new _eventemitter["default"]();
|
|
16
12
|
var data = {
|
|
@@ -81,5 +77,4 @@ var _default = function _default() {
|
|
|
81
77
|
}
|
|
82
78
|
};
|
|
83
79
|
};
|
|
84
|
-
|
|
85
80
|
exports["default"] = _default;
|
|
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.createActions = exports.QueryList = exports.QueryForm = void 0;
|
|
7
|
-
|
|
8
7
|
var _QueryListScene = _interopRequireDefault(require("./QueryListScene"));
|
|
9
|
-
|
|
10
8
|
var _Title = _interopRequireDefault(require("./Title"));
|
|
11
|
-
|
|
12
9
|
var _QueryForm = _interopRequireDefault(require("./QueryForm"));
|
|
13
|
-
|
|
14
10
|
var _Toolbar = _interopRequireDefault(require("./Toolbar"));
|
|
15
|
-
|
|
16
11
|
var _List = _interopRequireDefault(require("./List"));
|
|
17
|
-
|
|
18
12
|
var _createActions = _interopRequireDefault(require("./createActions"));
|
|
19
|
-
|
|
20
13
|
var _useActions = _interopRequireDefault(require("./useActions"));
|
|
21
|
-
|
|
22
14
|
require("./index.less");
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
-
|
|
26
16
|
var QueryForm = _QueryForm["default"];
|
|
27
17
|
exports.QueryForm = QueryForm;
|
|
28
18
|
var QueryList = _List["default"];
|
|
@@ -4,16 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = useActions;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _createActions = _interopRequireDefault(require("./createActions"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
10
|
function useActions() {
|
|
15
11
|
var actions = (0, _react.useRef)((0, _createActions["default"])());
|
|
16
12
|
return actions.current;
|
|
17
13
|
}
|
|
18
|
-
|
|
19
14
|
;
|
|
@@ -1,52 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
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); }
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
22
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
15
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
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); }
|
|
19
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
20
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
22
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
30
23
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
|
-
|
|
32
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
|
-
|
|
34
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
35
|
-
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
|
-
|
|
38
|
-
var DropDownWrap =
|
|
39
|
-
/*#__PURE__*/
|
|
40
|
-
function (_PureComponent) {
|
|
24
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
25
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
+
var DropDownWrap = /*#__PURE__*/function (_PureComponent) {
|
|
41
27
|
_inherits(DropDownWrap, _PureComponent);
|
|
42
|
-
|
|
28
|
+
var _super = _createSuper(DropDownWrap);
|
|
43
29
|
function DropDownWrap(props) {
|
|
44
30
|
var _this;
|
|
45
|
-
|
|
46
31
|
_classCallCheck(this, DropDownWrap);
|
|
47
|
-
|
|
48
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(DropDownWrap).call(this, props));
|
|
49
|
-
|
|
32
|
+
_this = _super.call(this, props);
|
|
50
33
|
_this.getItemStyle = function (i) {
|
|
51
34
|
var itemHeight = _this.props.itemHeight;
|
|
52
35
|
return {
|
|
@@ -56,7 +39,6 @@ function (_PureComponent) {
|
|
|
56
39
|
width: '100%'
|
|
57
40
|
};
|
|
58
41
|
};
|
|
59
|
-
|
|
60
42
|
_this.reactList = function (allHeight, startIndex, endIndex) {
|
|
61
43
|
return _this.setState({
|
|
62
44
|
allHeight: allHeight,
|
|
@@ -64,10 +46,9 @@ function (_PureComponent) {
|
|
|
64
46
|
endIndex: endIndex
|
|
65
47
|
});
|
|
66
48
|
};
|
|
67
|
-
|
|
68
49
|
var _allHeight = props.allHeight,
|
|
69
|
-
|
|
70
|
-
|
|
50
|
+
_startIndex = props.startIndex,
|
|
51
|
+
_endIndex = props.endIndex;
|
|
71
52
|
_this.state = {
|
|
72
53
|
allHeight: _allHeight,
|
|
73
54
|
startIndex: _startIndex,
|
|
@@ -75,7 +56,6 @@ function (_PureComponent) {
|
|
|
75
56
|
};
|
|
76
57
|
return _this;
|
|
77
58
|
}
|
|
78
|
-
|
|
79
59
|
_createClass(DropDownWrap, [{
|
|
80
60
|
key: "componentDidUpdate",
|
|
81
61
|
value: function componentDidUpdate(prevProps) {
|
|
@@ -89,40 +69,35 @@ function (_PureComponent) {
|
|
|
89
69
|
key: "render",
|
|
90
70
|
value: function render() {
|
|
91
71
|
var _this2 = this;
|
|
92
|
-
|
|
93
72
|
var menu = this.props.menu;
|
|
94
73
|
var _this$state = this.state,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
74
|
+
startIndex = _this$state.startIndex,
|
|
75
|
+
endIndex = _this$state.endIndex,
|
|
76
|
+
allHeight = _this$state.allHeight;
|
|
98
77
|
|
|
99
|
-
|
|
78
|
+
// 截取 Select 下拉列表中需要显示的部分
|
|
79
|
+
var cloneMenu = /*#__PURE__*/_react["default"].cloneElement(menu, {
|
|
100
80
|
menuItems: menu.props.menuItems.slice(startIndex, endIndex).map(function (item, i) {
|
|
101
81
|
var realIndex = (startIndex || 0) + Number(i);
|
|
82
|
+
var style = _this2.getItemStyle(realIndex);
|
|
102
83
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
84
|
+
// 未搜到数据提示高度使用默认高度
|
|
106
85
|
if (item.key === 'NOT_FOUND') {
|
|
107
86
|
delete style.height;
|
|
108
87
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
style: _objectSpread({}, item.props.style, {}, style)
|
|
88
|
+
return /*#__PURE__*/_react["default"].cloneElement(item, {
|
|
89
|
+
style: _objectSpread(_objectSpread({}, item.props.style), style)
|
|
112
90
|
});
|
|
113
91
|
}),
|
|
114
|
-
dropdownMenuStyle: _objectSpread({}, menu.props.dropdownMenuStyle, {
|
|
92
|
+
dropdownMenuStyle: _objectSpread(_objectSpread({}, menu.props.dropdownMenuStyle), {}, {
|
|
115
93
|
height: allHeight,
|
|
116
94
|
maxHeight: allHeight,
|
|
117
95
|
overflow: 'hidden'
|
|
118
96
|
})
|
|
119
97
|
});
|
|
120
|
-
|
|
121
98
|
return cloneMenu;
|
|
122
99
|
}
|
|
123
100
|
}]);
|
|
124
|
-
|
|
125
101
|
return DropDownWrap;
|
|
126
102
|
}(_react.PureComponent);
|
|
127
|
-
|
|
128
103
|
exports["default"] = DropDownWrap;
|