tntd 1.4.0 → 1.4.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.
@@ -1,12 +1,3 @@
1
- import "antd/es/form/style";
2
- import _Form from "antd/es/form";
3
- import "antd/es/drawer/style";
4
- import _Drawer from "antd/es/drawer";
5
- import "antd/es/badge/style";
6
- import _Badge from "antd/es/badge";
7
- import "antd/es/button/style";
8
- import _Button from "antd/es/button";
9
-
10
1
  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); }
11
2
 
12
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -36,6 +27,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
36
27
  import React, { createRef } from 'react';
37
28
  import classnames from 'classnames';
38
29
  import { debounce } from 'lodash';
30
+ import { Form, Button, Drawer, Badge } from 'antd';
39
31
  import useForm from './useForm';
40
32
  import createActions from './createActions';
41
33
  import Icon from '../Icon';
@@ -201,18 +193,18 @@ function (_React$PureComponent) {
201
193
  drawerFieldsValueCount = _this$state.drawerFieldsValueCount;
202
194
 
203
195
  var renderFormActions = renderActions || function () {
204
- return React.createElement(React.Fragment, null, showFieldCount && React.createElement(_Badge, {
196
+ return React.createElement(React.Fragment, null, showFieldCount && React.createElement(Badge, {
205
197
  count: drawerFieldsValueCount
206
- }, React.createElement(_Button, {
198
+ }, React.createElement(Button, {
207
199
  onClick: _this2.onShowDrawer
208
200
  }, React.createElement(Icon, {
209
201
  type: "filter"
210
- }), _this2.getText('moreFiltering'))), showSearch && React.createElement(_Button, {
202
+ }), _this2.getText('moreFiltering'))), showSearch && React.createElement(Button, {
211
203
  type: "primary",
212
204
  onClick: _this2.onSearch
213
- }, _this2.getText('search')), showReset && React.createElement(_Button, {
205
+ }, _this2.getText('search')), showReset && React.createElement(Button, {
214
206
  onClick: _this2.onReset
215
- }, _this2.getText('reset')), showMore && !showFieldCount && React.createElement(_Button, {
207
+ }, _this2.getText('reset')), showMore && !showFieldCount && React.createElement(Button, {
216
208
  className: "expand-link",
217
209
  type: "link",
218
210
  onClick: _this2.onToggleExpand
@@ -226,7 +218,7 @@ function (_React$PureComponent) {
226
218
  return React.createElement("div", {
227
219
  ref: this.formBoxRef,
228
220
  className: classnames(clsPrefix, _defineProperty({}, className, className))
229
- }, React.createElement(_Form, {
221
+ }, React.createElement(Form, {
230
222
  layout: "inline",
231
223
  className: classnames({
232
224
  expanded: !showMore || expanded,
@@ -244,7 +236,7 @@ function (_React$PureComponent) {
244
236
  });
245
237
  })), React.createElement("div", {
246
238
  className: "".concat(clsPrefix, "-actions")
247
- }, renderFormActions()), showFieldCount && React.createElement(_Drawer, _extends({
239
+ }, renderFormActions()), showFieldCount && React.createElement(Drawer, _extends({
248
240
  title: this.getText('moreFiltering'),
249
241
  visible: drawerVisible,
250
242
  onClose: function onClose() {
@@ -267,10 +259,10 @@ function (_React$PureComponent) {
267
259
  onChange: _this2.onFieldChange,
268
260
  onSearch: _this2.onSearch
269
261
  });
270
- }), React.createElement(_Button, {
262
+ }), React.createElement(Button, {
271
263
  type: "primary",
272
264
  onClick: this.onSearch
273
- }, this.getText('search')), React.createElement(_Button, {
265
+ }, this.getText('search')), React.createElement(Button, {
274
266
  onClick: this.onReset
275
267
  }, this.getText('reset')))), extraActions && React.createElement("div", {
276
268
  className: "".concat(clsPrefix, "-extra")
@@ -1,6 +1,3 @@
1
- import "antd/es/spin/style";
2
- import _Spin from "antd/es/spin";
3
-
4
1
  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); }
5
2
 
6
3
  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); }
@@ -39,6 +36,7 @@ import React, { createRef } from 'react';
39
36
  import { findDOMNode } from 'react-dom';
40
37
  import cn from 'classnames';
41
38
  import { get, pickBy, isEmpty, debounce, throttle } from 'lodash';
39
+ import { Spin } from 'antd';
42
40
  import Table from '../Table';
43
41
  import { getText, getLanguage } from '../locale';
44
42
 
@@ -292,7 +290,7 @@ function (_React$PureComponent) {
292
290
  paginationSticky: paginationSticky,
293
291
  hasScrollToBottom: hasScrollToBottom
294
292
  })
295
- }, React.createElement(_Spin, {
293
+ }, React.createElement(Spin, {
296
294
  spinning: loading
297
295
  }, React.createElement(Table, _extends({
298
296
  ref: this.tableRef
@@ -1,8 +1,3 @@
1
- import "antd/es/empty/style";
2
- import _Empty from "antd/es/empty";
3
- import "antd/es/select/style";
4
- import _Select from "antd/es/select";
5
-
6
1
  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); }
7
2
 
8
3
  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; }
@@ -34,6 +29,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
34
29
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
30
 
36
31
  import React, { PureComponent } from 'react';
32
+ import { Select, Empty } from 'antd';
37
33
  import DropDownWrap from './DropDownWrap'; // 页面实际渲染的下拉菜单数量,实际为 2 * ITEM_ELEMENT_NUMBER
38
34
 
39
35
  var ITEM_ELEMENT_NUMBER = 30; // Select size 配置
@@ -48,7 +44,7 @@ var ARROW_CODE = {
48
44
  38: 'up'
49
45
  };
50
46
  var DROPDOWN_HEIGHT = 224;
51
- var Option = _Select.Option;
47
+ var Option = Select.Option;
52
48
 
53
49
  var SuperSelect =
54
50
  /*#__PURE__*/
@@ -576,7 +572,7 @@ function (_PureComponent) {
576
572
  }
577
573
 
578
574
  optionLabelProp = optionLabelProp || 'children';
579
- return React.createElement(_Select, _extends({}, _props, {
575
+ return React.createElement(Select, _extends({}, _props, {
580
576
  id: this.id,
581
577
  onSearch: this.onSearch,
582
578
  onChange: this.onChange,
@@ -594,8 +590,8 @@ function (_PureComponent) {
594
590
  style: {
595
591
  padding: '5px 12px'
596
592
  }
597
- }, React.createElement(_Empty, {
598
- image: _Empty.PRESENTED_IMAGE_SIMPLE
593
+ }, React.createElement(Empty, {
594
+ image: Empty.PRESENTED_IMAGE_SIMPLE
599
595
  }));
600
596
  }
601
597
 
@@ -1,6 +1,3 @@
1
- import "antd/es/table/style";
2
- import _Table from "antd/es/table";
3
-
4
1
  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); }
5
2
 
6
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
@@ -24,6 +21,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
24
21
  import { useState, useEffect, forwardRef, useRef } from 'react';
25
22
  import cn from 'classnames';
26
23
  import { throttle } from 'lodash';
24
+ import { Table } from 'antd';
27
25
  import { Resizable } from 'react-resizable';
28
26
  import './index.less';
29
27
 
@@ -97,7 +95,7 @@ export default forwardRef(function (props, ref) {
97
95
  useEffect(function () {
98
96
  dataRef.current.columns = columns;
99
97
  }, [columns]);
100
- return React.createElement(_Table, _extends({}, props, {
98
+ return React.createElement(Table, _extends({}, props, {
101
99
  className: cn('tnt-resizable-table', _defineProperty({}, props.className, props.className)),
102
100
  components: {
103
101
  header: {
package/es/Table/index.js CHANGED
@@ -1,6 +1,3 @@
1
- import "antd/es/table/style";
2
- import _Table from "antd/es/table";
3
-
4
1
  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; }
5
2
 
6
3
  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); }
@@ -11,6 +8,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
11
8
 
12
9
  import React, { forwardRef } from 'react';
13
10
  import cn from 'classnames';
11
+ import { Table } from 'antd';
14
12
  import ResizableTable from './ResizableTable'; // const ResizableTable = React.lazy(() => import('./ResizableTable'));
15
13
 
16
14
  export default forwardRef(function (_ref, ref) {
@@ -27,7 +25,7 @@ export default forwardRef(function (_ref, ref) {
27
25
  );
28
26
  }
29
27
 
30
- return React.createElement(_Table, _extends({
28
+ return React.createElement(Table, _extends({
31
29
  className: cn('tnt-table', _defineProperty({}, props.className, props.className))
32
30
  }, props, {
33
31
  ref: ref
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tntd",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "ued tnt design",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",