tntd 1.4.32 → 1.4.33-beta.1

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.
Files changed (157) hide show
  1. package/components/Ellipsis/index.js +47 -15
  2. package/components/QueryListScene/QueryForm.js +4 -4
  3. package/components/QueryListScene/createActions.js +4 -4
  4. package/dist/1.tntd.js +1 -1
  5. package/dist/stats.json +24089 -23289
  6. package/dist/tntd.css +1 -1
  7. package/dist/tntd.js +7 -10
  8. package/es/ArrayInput/icon.js +5 -5
  9. package/es/ArrayInput/index.js +79 -111
  10. package/es/AuthContext.js +1 -1
  11. package/es/Columns/index.js +33 -40
  12. package/es/DevelopmentLogin/LoginModal.js +33 -46
  13. package/es/DevelopmentLogin/index.js +14 -18
  14. package/es/Ellipsis/Svg/CopySVG.js +13 -13
  15. package/es/Ellipsis/Svg/TickSVG.js +8 -8
  16. package/es/Ellipsis/index.js +100 -79
  17. package/es/Handle/index.js +46 -64
  18. package/es/Icon/fonts/iconfont.js +7 -12
  19. package/es/Icon/index.js +12 -15
  20. package/es/Img/Contain.js +26 -31
  21. package/es/Img/Cover.js +43 -57
  22. package/es/Img/index.js +39 -48
  23. package/es/Layout/ActionsContext.js +3 -2
  24. package/es/Layout/AppList.js +39 -94
  25. package/es/Layout/Application.js +28 -74
  26. package/es/Layout/Avatar.js +30 -67
  27. package/es/Layout/CompatibleLanguage.js +41 -96
  28. package/es/Layout/EnterpriseLayout/Avatar.js +39 -77
  29. package/es/Layout/EnterpriseLayout/Language.js +16 -34
  30. package/es/Layout/EnterpriseLayout/Theme.js +18 -36
  31. package/es/Layout/EnterpriseLayout/index.js +14 -16
  32. package/es/Layout/GlobalNavigation/NavigationPopup.js +61 -172
  33. package/es/Layout/GlobalNavigation/index.js +22 -56
  34. package/es/Layout/Header.js +26 -47
  35. package/es/Layout/HeaderActions.js +45 -59
  36. package/es/Layout/HeaderNavs.js +24 -51
  37. package/es/Layout/HeaderTabs.js +53 -106
  38. package/es/Layout/Iconfont.js +1 -1
  39. package/es/Layout/Language.js +16 -34
  40. package/es/Layout/Layout.js +88 -110
  41. package/es/Layout/Logo.js +17 -33
  42. package/es/Layout/OrgAppList.js +64 -109
  43. package/es/Layout/SideMenu.js +67 -128
  44. package/es/Layout/Theme.js +25 -63
  45. package/es/Layout/index.js +28 -37
  46. package/es/Layout/paaslayout/CompactSideMenu.js +37 -76
  47. package/es/Layout/paaslayout/Header.js +23 -46
  48. package/es/Layout/paaslayout/Logo.js +4 -14
  49. package/es/Layout/paaslayout/SideMenu.js +41 -80
  50. package/es/Layout/paaslayout/index.js +77 -104
  51. package/es/Layout/storage.js +10 -9
  52. package/es/LoadingButton/index.js +18 -27
  53. package/es/Modal/index.js +42 -51
  54. package/es/Page/Box.js +36 -43
  55. package/es/Page/index.js +56 -71
  56. package/es/Page/utils.js +0 -5
  57. package/es/QueryForm/Field/Checkbox.js +7 -11
  58. package/es/QueryForm/Field/Select.js +34 -44
  59. package/es/QueryForm/Field/SelectInput.js +31 -46
  60. package/es/QueryForm/Field/fieldsMap.js +0 -1
  61. package/es/QueryForm/Field/index.js +46 -78
  62. package/es/QueryForm/createActions.js +6 -7
  63. package/es/QueryForm/index.js +79 -140
  64. package/es/QueryListScene/List.js +83 -139
  65. package/es/QueryListScene/QueryForm.js +54 -91
  66. package/es/QueryListScene/QueryListScene.js +29 -47
  67. package/es/QueryListScene/Title.js +3 -3
  68. package/es/QueryListScene/Toolbar.js +13 -14
  69. package/es/QueryListScene/createActions.js +4 -4
  70. package/es/Select/DropDownWrap.js +32 -55
  71. package/es/Select/index.js +140 -232
  72. package/es/Table/ResizableTable/index.js +29 -43
  73. package/es/Table/index.js +20 -19
  74. package/es/Title/index.js +23 -25
  75. package/es/locale.js +1 -5
  76. package/es/utils/checkAuth.js +6 -8
  77. package/es/utils/findMenuInfoByPath.js +0 -4
  78. package/es/utils/index.js +17 -27
  79. package/lib/ArrayInput/icon.js +7 -9
  80. package/lib/ArrayInput/index.js +82 -131
  81. package/lib/AuthContext.js +2 -6
  82. package/lib/Columns/index.js +36 -54
  83. package/lib/DevelopmentLogin/LoginModal.js +36 -63
  84. package/lib/DevelopmentLogin/index.js +21 -31
  85. package/lib/Ellipsis/Svg/CopySVG.js +15 -18
  86. package/lib/Ellipsis/Svg/TickSVG.js +10 -13
  87. package/lib/Ellipsis/index.js +105 -93
  88. package/lib/Handle/index.js +51 -87
  89. package/lib/Icon/fonts/iconfont.js +7 -12
  90. package/lib/Icon/iconList.js +1 -2
  91. package/lib/Icon/index.js +16 -26
  92. package/lib/Img/Contain.js +29 -40
  93. package/lib/Img/Cover.js +48 -72
  94. package/lib/Img/index.js +42 -58
  95. package/lib/Layout/ActionsContext.js +1 -5
  96. package/lib/Layout/AppList.js +45 -124
  97. package/lib/Layout/Application.js +31 -92
  98. package/lib/Layout/Avatar.js +36 -91
  99. package/lib/Layout/CompatibleLanguage.js +44 -116
  100. package/lib/Layout/EnterpriseLayout/Avatar.js +45 -105
  101. package/lib/Layout/EnterpriseLayout/Language.js +22 -54
  102. package/lib/Layout/EnterpriseLayout/Theme.js +21 -50
  103. package/lib/Layout/EnterpriseLayout/index.js +17 -27
  104. package/lib/Layout/GlobalNavigation/NavigationPopup.js +64 -192
  105. package/lib/Layout/GlobalNavigation/index.js +28 -80
  106. package/lib/Layout/Header.js +36 -68
  107. package/lib/Layout/HeaderActions.js +51 -81
  108. package/lib/Layout/HeaderNavs.js +30 -70
  109. package/lib/Layout/HeaderTabs.js +58 -127
  110. package/lib/Layout/Iconfont.js +4 -9
  111. package/lib/Layout/Language.js +22 -54
  112. package/lib/Layout/Layout.js +93 -134
  113. package/lib/Layout/Logo.js +26 -47
  114. package/lib/Layout/OrgAppList.js +69 -133
  115. package/lib/Layout/SideMenu.js +72 -151
  116. package/lib/Layout/Theme.js +28 -79
  117. package/lib/Layout/createActions.js +3 -9
  118. package/lib/Layout/images/index.js +5 -36
  119. package/lib/Layout/index.js +35 -63
  120. package/lib/Layout/paaslayout/CompactSideMenu.js +40 -90
  121. package/lib/Layout/paaslayout/Header.js +30 -60
  122. package/lib/Layout/paaslayout/Logo.js +11 -24
  123. package/lib/Layout/paaslayout/SideMenu.js +44 -93
  124. package/lib/Layout/paaslayout/index.js +82 -128
  125. package/lib/Layout/storage.js +26 -68
  126. package/lib/LoadingButton/index.js +21 -36
  127. package/lib/Modal/index.js +45 -62
  128. package/lib/Page/Box.js +38 -50
  129. package/lib/Page/index.js +58 -84
  130. package/lib/Page/utils.js +5 -16
  131. package/lib/QueryForm/Field/Checkbox.js +10 -19
  132. package/lib/QueryForm/Field/Select.js +39 -60
  133. package/lib/QueryForm/Field/SelectInput.js +36 -65
  134. package/lib/QueryForm/Field/fieldsMap.js +6 -23
  135. package/lib/QueryForm/Field/index.js +50 -91
  136. package/lib/QueryForm/createActions.js +9 -16
  137. package/lib/QueryForm/index.js +83 -165
  138. package/lib/QueryForm/useForm.js +1 -6
  139. package/lib/QueryListScene/List.js +89 -153
  140. package/lib/QueryListScene/QueryForm.js +58 -101
  141. package/lib/QueryListScene/QueryListScene.js +31 -56
  142. package/lib/QueryListScene/Title.js +6 -11
  143. package/lib/QueryListScene/Toolbar.js +16 -22
  144. package/lib/QueryListScene/createActions.js +7 -13
  145. package/lib/QueryListScene/index.js +5 -19
  146. package/lib/QueryListScene/useActions.js +1 -6
  147. package/lib/Select/DropDownWrap.js +35 -63
  148. package/lib/Select/index.js +142 -245
  149. package/lib/Table/ResizableTable/index.js +31 -54
  150. package/lib/Table/index.js +21 -34
  151. package/lib/Title/index.js +26 -34
  152. package/lib/index.js +36 -57
  153. package/lib/locale.js +9 -25
  154. package/lib/utils/checkAuth.js +9 -16
  155. package/lib/utils/findMenuInfoByPath.js +3 -12
  156. package/lib/utils/index.js +26 -60
  157. package/package.json +3 -2
@@ -1,123 +1,90 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports["default"] = void 0;
7
-
8
8
  require("antd/lib/spin/style");
9
-
10
9
  var _spin = _interopRequireDefault(require("antd/lib/spin"));
11
-
12
10
  var _react = _interopRequireWildcard(require("react"));
13
-
14
11
  var _reactDom = require("react-dom");
15
-
16
12
  var _classnames = _interopRequireDefault(require("classnames"));
17
-
18
13
  var _lodash = require("lodash");
19
-
20
14
  var _Table = _interopRequireDefault(require("../Table"));
21
-
22
15
  var _locale = require("../locale");
23
-
24
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
25
-
26
- 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; }
27
-
28
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
-
30
- 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); }
31
-
32
- 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); }
33
-
34
- 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; }
35
-
36
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
37
-
38
- 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; }
39
-
40
- 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; }
41
-
42
- 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; }
43
-
44
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
45
-
46
- 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, descriptor.key, descriptor); } }
47
-
48
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
49
-
50
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
51
-
52
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
53
-
54
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
-
56
- 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); }
57
-
58
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
59
-
60
- var QueryList =
61
- /*#__PURE__*/
62
- function (_React$PureComponent) {
63
- _inherits(QueryList, _React$PureComponent);
64
-
16
+ var _excluded = ["columns", "children", "pagination", "localPagination", "paginationSticky", "className", "qlsProps"];
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
20
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
21
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
22
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
23
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
26
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
27
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
28
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
29
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
30
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
31
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
32
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
33
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
34
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
35
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
36
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
37
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /**
38
+ * @file QueryList
39
+ * @author you.zhang
40
+ */
41
+ var QueryList = exports["default"] = /*#__PURE__*/function (_React$PureComponent) {
65
42
  function QueryList(props) {
66
43
  var _props$scroll;
67
-
68
44
  var _this;
69
-
70
45
  _classCallCheck(this, QueryList);
71
-
72
- _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryList).call(this, props));
46
+ _this = _callSuper(this, QueryList, [props]);
73
47
  _this.onWindowResize = (0, _lodash.debounce)(function () {
74
48
  var scroll = _this.state.scroll;
75
-
76
49
  _this.setState({
77
- scroll: _objectSpread({}, scroll, {
50
+ scroll: _objectSpread(_objectSpread({}, scroll), {}, {
78
51
  y: window.innerHeight - (_this.initialTop || _this.props.top || 200)
79
52
  })
80
53
  });
81
54
  }, 50);
82
-
83
55
  _this.fetchData = function () {
84
56
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
85
-
86
57
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
87
- callback = _ref.callback,
88
- _ref$showLoading = _ref.showLoading,
89
- showLoading = _ref$showLoading === void 0 ? true : _ref$showLoading,
90
- isInterval = _ref.isInterval;
91
-
58
+ callback = _ref.callback,
59
+ _ref$showLoading = _ref.showLoading,
60
+ showLoading = _ref$showLoading === void 0 ? true : _ref$showLoading,
61
+ isInterval = _ref.isInterval;
92
62
  var _this$props = _this.props,
93
- query = _this$props.qlsProps.query,
94
- defaultExpandAllRows = _this$props.defaultExpandAllRows,
95
- rowKey = _this$props.rowKey,
96
- actions = _this$props.actions;
63
+ query = _this$props.qlsProps.query,
64
+ defaultExpandAllRows = _this$props.defaultExpandAllRows,
65
+ rowKey = _this$props.rowKey,
66
+ actions = _this$props.actions;
97
67
  var pagination = _this.state.pagination;
98
68
  var hasPagination = _this.props.pagination !== false;
99
-
100
69
  if (hasPagination) {
101
70
  params = _objectSpread({
102
71
  pageSize: pagination.pageSize,
103
72
  current: pagination.current
104
73
  }, params);
105
74
  }
106
-
107
75
  showLoading && _this.setState({
108
76
  loading: true
109
- }); // 当用户操作查询还未得到服务端响应前,不要执行轮询请求时序问题导致覆盖
77
+ });
110
78
 
79
+ // 当用户操作查询还未得到服务端响应前,不要执行轮询请求时序问题导致覆盖
111
80
  if (!isInterval) {
112
81
  _this.isFetching = true;
113
82
  }
114
-
115
83
  actions.setData('submittedFormData', params);
116
84
  return query((0, _lodash.pickBy)(params, function (val) {
117
85
  return val !== '' && val !== null && val !== undefined;
118
86
  })).then(function (result) {
119
87
  var dataSource = hasPagination ? result.data || [] : result;
120
-
121
88
  _this.setState(_objectSpread({
122
89
  loading: false,
123
90
  dataSource: dataSource,
@@ -142,50 +109,42 @@ function (_React$PureComponent) {
142
109
  callback && callback();
143
110
  });
144
111
  };
145
-
146
112
  _this.updateDataSource = function (dataSource) {
147
113
  _this.setState({
148
114
  dataSource: dataSource
149
115
  });
150
-
151
116
  _this.props.actions.setData('dataSource', dataSource);
152
117
  };
153
-
154
118
  _this.updatePagination = function (pagination) {
155
119
  _this.setState({
156
120
  pagination: pagination
157
121
  });
158
-
159
122
  _this.props.actions.setData('pagination', pagination);
160
123
  };
161
-
162
124
  _this.onFormChange = function (values) {
163
- _this.formData = (0, _lodash.pickBy)(_objectSpread({}, values, {
125
+ _this.formData = (0, _lodash.pickBy)(_objectSpread(_objectSpread({}, values), {}, {
164
126
  sorter: (0, _lodash.get)(_this.formData, 'sorter'),
165
127
  filters: (0, _lodash.get)(_this.formData, 'filters')
166
128
  }), function (val) {
167
129
  return val !== undefined;
168
130
  });
169
131
  };
170
-
171
132
  _this.onSearch = function (values) {
172
133
  var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
173
- callback = _ref2.callback,
174
- _ref2$showLoading = _ref2.showLoading,
175
- showLoading = _ref2$showLoading === void 0 ? true : _ref2$showLoading;
176
-
177
- _this.formData = _objectSpread({}, _this.formData, {}, values); // this.props.actions.setData('formData', this.formData);
178
-
134
+ callback = _ref2.callback,
135
+ _ref2$showLoading = _ref2.showLoading,
136
+ showLoading = _ref2$showLoading === void 0 ? true : _ref2$showLoading;
137
+ _this.formData = _objectSpread(_objectSpread({}, _this.formData), values);
138
+ // this.props.actions.setData('formData', this.formData);
179
139
  return _this.fetchData(_this.formData, {
180
140
  callback: callback,
181
141
  showLoading: showLoading
182
142
  });
183
143
  };
184
-
185
144
  _this.onTableChange = function (pagination, filters, sorter) {
186
145
  var _this$props2 = _this.props,
187
- actions = _this$props2.actions,
188
- localPagination = _this$props2.localPagination;
146
+ actions = _this$props2.actions,
147
+ localPagination = _this$props2.localPagination;
189
148
  var tableParams = {
190
149
  pageSize: pagination.pageSize,
191
150
  current: pagination.current,
@@ -193,17 +152,17 @@ function (_React$PureComponent) {
193
152
  sorter: (0, _lodash.isEmpty)(sorter) ? undefined : sorter
194
153
  };
195
154
  console.log('onTableChange...', actions.getSubmittedFormData(), _this.formData);
196
- Object.assign(_this.formData, tableParams); // 排序变化暂时不处理,因为有时可能是前端sorter不需要走请求
197
- // 所以暂时排序有使用者自己处理
155
+ Object.assign(_this.formData, tableParams);
198
156
 
157
+ // 排序变化暂时不处理,因为有时可能是前端sorter不需要走请求
158
+ // 所以暂时排序有使用者自己处理
199
159
  if (!localPagination) {
200
- _this.fetchData(_objectSpread({}, actions.getSubmittedFormData(), {}, tableParams));
201
-
160
+ _this.fetchData(_objectSpread(_objectSpread({}, actions.getSubmittedFormData()), tableParams));
202
161
  return;
203
162
  }
163
+ var dataSource = _this.state.dataSource;
204
164
 
205
- var dataSource = _this.state.dataSource; // 前端本地分页
206
-
165
+ // 前端本地分页
207
166
  if (localPagination) {
208
167
  _this.setState({
209
168
  dataSource: dataSource,
@@ -218,26 +177,21 @@ function (_React$PureComponent) {
218
177
  });
219
178
  }
220
179
  };
221
-
222
180
  _this.onTableBodyScroll = (0, _lodash.throttle)(function (evt) {
223
181
  console.log('onTableBodyScroll', evt.target.scrollTop);
224
-
225
182
  _this.updateIsScrollToBottom(evt.target);
226
183
  }, 50);
227
-
228
184
  _this.updateIsScrollToBottom = function (tableBody) {
229
185
  var isScrollToBottom = function isScrollToBottom(tableBody) {
230
186
  var scrollHeight = tableBody.scrollHeight,
231
- scrollTop = tableBody.scrollTop,
232
- offsetHeight = tableBody.offsetHeight;
187
+ scrollTop = tableBody.scrollTop,
188
+ offsetHeight = tableBody.offsetHeight;
233
189
  return scrollHeight === scrollTop + offsetHeight;
234
190
  };
235
-
236
191
  _this.setState({
237
192
  hasScrollToBottom: isScrollToBottom(tableBody)
238
193
  });
239
194
  };
240
-
241
195
  _this.state = {
242
196
  loading: false,
243
197
  dataSource: [],
@@ -247,48 +201,41 @@ function (_React$PureComponent) {
247
201
  total: 0
248
202
  },
249
203
  scroll: props.scroll,
250
- hasScrollToBottom: !((_props$scroll = props.scroll) == null ? void 0 : _props$scroll.y)
204
+ hasScrollToBottom: !((_props$scroll = props.scroll) != null && _props$scroll.y)
251
205
  };
252
- _this.tableRef = (0, _react.createRef)();
206
+ _this.tableRef = /*#__PURE__*/(0, _react.createRef)();
253
207
  var _actions = props.actions;
254
-
255
208
  _actions.on('search', _this.onSearch);
256
-
257
209
  _actions.on('setTableDataSource', _this.updateDataSource);
258
-
259
210
  _actions.on('setPagination', _this.updatePagination);
260
-
261
211
  _actions.on('setFormData', _this.onFormChange);
262
-
263
212
  return _this;
264
213
  }
265
-
266
- _createClass(QueryList, [{
214
+ _inherits(QueryList, _React$PureComponent);
215
+ return _createClass(QueryList, [{
267
216
  key: "render",
268
217
  value: function render() {
269
218
  var _this$props3 = this.props,
270
- columns = _this$props3.columns,
271
- children = _this$props3.children,
272
- pagination = _this$props3.pagination,
273
- _this$props3$localPag = _this$props3.localPagination,
274
- localPagination = _this$props3$localPag === void 0 ? false : _this$props3$localPag,
275
- _this$props3$paginati = _this$props3.paginationSticky,
276
- paginationSticky = _this$props3$paginati === void 0 ? false : _this$props3$paginati,
277
- _this$props3$classNam = _this$props3.className,
278
- className = _this$props3$classNam === void 0 ? '' : _this$props3$classNam,
279
- qlsProps = _this$props3.qlsProps,
280
- rest = _objectWithoutProperties(_this$props3, ["columns", "children", "pagination", "localPagination", "paginationSticky", "className", "qlsProps"]);
281
-
219
+ columns = _this$props3.columns,
220
+ children = _this$props3.children,
221
+ pagination = _this$props3.pagination,
222
+ _this$props3$localPag = _this$props3.localPagination,
223
+ localPagination = _this$props3$localPag === void 0 ? false : _this$props3$localPag,
224
+ _this$props3$paginati = _this$props3.paginationSticky,
225
+ paginationSticky = _this$props3$paginati === void 0 ? false : _this$props3$paginati,
226
+ _this$props3$classNam = _this$props3.className,
227
+ className = _this$props3$classNam === void 0 ? '' : _this$props3$classNam,
228
+ qlsProps = _this$props3.qlsProps,
229
+ rest = _objectWithoutProperties(_this$props3, _excluded);
282
230
  var _this$state = this.state,
283
- dataSource = _this$state.dataSource,
284
- loading = _this$state.loading,
285
- _this$state$expandedR = _this$state.expandedRowKeys,
286
- expandedRowKeys = _this$state$expandedR === void 0 ? [] : _this$state$expandedR,
287
- scroll = _this$state.scroll,
288
- hasScrollToBottom = _this$state.hasScrollToBottom;
231
+ dataSource = _this$state.dataSource,
232
+ loading = _this$state.loading,
233
+ _this$state$expandedR = _this$state.expandedRowKeys,
234
+ expandedRowKeys = _this$state$expandedR === void 0 ? [] : _this$state$expandedR,
235
+ scroll = _this$state.scroll,
236
+ hasScrollToBottom = _this$state.hasScrollToBottom;
289
237
  var hasPagination = typeof pagination !== 'undefined' ? pagination : true;
290
-
291
- var paginationInfo = _objectSpread({}, this.state.pagination, {
238
+ var paginationInfo = _objectSpread(_objectSpread({}, this.state.pagination), {}, {
292
239
  // size: 'small',
293
240
  showQuickJumper: true,
294
241
  showSizeChanger: true,
@@ -296,20 +243,18 @@ function (_React$PureComponent) {
296
243
  return (0, _locale.getText)('totalRecords', (0, _locale.getLanguage)(), total);
297
244
  }
298
245
  }, pagination || {});
299
-
300
246
  var expandProps = _objectSpread({}, rest.defaultExpandAllRows ? {
301
247
  expandedRowKeys: expandedRowKeys,
302
248
  onExpandedRowsChange: this.onExpandedRowsChange
303
249
  } : {});
304
-
305
- return _react["default"].createElement("div", {
250
+ return /*#__PURE__*/_react["default"].createElement("div", {
306
251
  className: (0, _classnames["default"])("tnt-querylistscene-list ".concat(className), {
307
252
  paginationSticky: paginationSticky,
308
253
  hasScrollToBottom: hasScrollToBottom
309
254
  })
310
- }, _react["default"].createElement(_spin["default"], {
255
+ }, /*#__PURE__*/_react["default"].createElement(_spin["default"], {
311
256
  spinning: loading
312
- }, _react["default"].createElement(_Table["default"], _extends({
257
+ }, /*#__PURE__*/_react["default"].createElement(_Table["default"], _extends({
313
258
  ref: this.tableRef
314
259
  }, expandProps, rest, columns ? {
315
260
  columns: columns
@@ -324,19 +269,17 @@ function (_React$PureComponent) {
324
269
  key: "componentDidMount",
325
270
  value: function componentDidMount() {
326
271
  var _this2 = this,
327
- _this$state$scroll;
328
-
272
+ _this$state$scroll;
329
273
  var _this$props4 = this.props,
330
- qlsProps = _this$props4.qlsProps,
331
- actions = _this$props4.actions;
332
- this.formData = _objectSpread({}, actions.getFormData() || {}, {}, qlsProps.memory ? actions.getPagination() : {});
333
-
274
+ qlsProps = _this$props4.qlsProps,
275
+ actions = _this$props4.actions;
276
+ this.formData = _objectSpread(_objectSpread({}, actions.getFormData() || {}), qlsProps.memory ? actions.getPagination() : {});
334
277
  if (!qlsProps.initSearch) {
335
278
  // 默认进来不请求
336
279
  this.fetchData(this.formData)["finally"](function () {
337
280
  // 轮询
338
281
  if (qlsProps.interval && !_this2.isUnmounted) {
339
- var doIntervalQuery = function doIntervalQuery(ms) {
282
+ var _doIntervalQuery = function doIntervalQuery(ms) {
340
283
  // 组件unmounted后,不执行轮训逻辑
341
284
  if (!_this2.isUnmounted) {
342
285
  _this2.timmer = setTimeout(function () {
@@ -346,23 +289,20 @@ function (_React$PureComponent) {
346
289
  isInterval: true,
347
290
  showLoading: false
348
291
  }).then(function () {
349
- doIntervalQuery(ms);
292
+ _doIntervalQuery(ms);
350
293
  });
351
294
  } else {
352
- doIntervalQuery(ms);
295
+ _doIntervalQuery(ms);
353
296
  }
354
297
  }, ms);
355
298
  }
356
299
  };
357
-
358
- doIntervalQuery(qlsProps.interval);
300
+ _doIntervalQuery(qlsProps.interval);
359
301
  }
360
302
  });
361
303
  }
362
-
363
- if ((_this$state$scroll = this.state.scroll) == null ? void 0 : _this$state$scroll.y) {
304
+ if ((_this$state$scroll = this.state.scroll) != null && _this$state$scroll.y) {
364
305
  window.addEventListener('resize', this.onWindowResize);
365
-
366
306
  if (this.tableRef.current) {
367
307
  // table内垂直滚动,需要动态设置分页组件上阴影样式
368
308
  var tableBody = (0, _reactDom.findDOMNode)(this.tableRef.current).querySelector('.ant-table-body');
@@ -385,9 +325,5 @@ function (_React$PureComponent) {
385
325
  this.timmer && clearTimeout(this.timmer);
386
326
  }
387
327
  }]);
388
-
389
- return QueryList;
390
328
  }(_react["default"].PureComponent);
391
-
392
- exports["default"] = QueryList;
393
329
  ;