@lemon-fe/components 0.1.135 → 0.1.136

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.
@@ -11,11 +11,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
11
11
  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; }
12
12
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
- 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; }
15
- 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; }
16
14
  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; }
17
15
  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; }
18
16
  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; }
17
+ 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; }
18
+ 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
19
  /// <reference path="../../typings.d.ts" />
20
20
  import React, { useMemo, useState, useEffect, useRef, forwardRef, useContext } from 'react';
21
21
  import { Table as AntdTable, ConfigProvider } from 'antd';
@@ -29,22 +29,6 @@ import VirtualList from './VirtualBody';
29
29
  import BaseTableContext from './BaseTableContext';
30
30
  import Actions from './Actions';
31
31
  import empty from './empty.png';
32
- function formatSummary(summary) {
33
- if (!summary) {
34
- return summary;
35
- }
36
- var obj = _objectSpread({}, summary);
37
- var pretty = new Intl.NumberFormat('en-US', {
38
- minimumFractionDigits: 2,
39
- maximumFractionDigits: 2
40
- });
41
- Object.keys(obj).forEach(function (key) {
42
- if (obj.hasOwnProperty(key) && typeof obj[key] === 'number') {
43
- obj[key] = pretty.format(obj[key]);
44
- }
45
- });
46
- return obj;
47
- }
48
32
  function Th(props) {
49
33
  var onWidthChange = props.onWidthChange,
50
34
  width = props.width,
@@ -306,7 +290,6 @@ function BaseTable(props, _ref) {
306
290
  }
307
291
  return function () {
308
292
  var _props$rowSelection;
309
- var data = formatSummary(summaryRecord);
310
293
  var offset = 0;
311
294
  return /*#__PURE__*/React.createElement(Summary, {
312
295
  fixed: true
@@ -317,7 +300,7 @@ function BaseTable(props, _ref) {
317
300
  if (index === 0) {
318
301
  value = summaryTitle;
319
302
  } else if (item.dataIndex) {
320
- value = get(data, item.dataIndex);
303
+ value = get(summaryRecord, item.dataIndex);
321
304
  }
322
305
  return /*#__PURE__*/React.createElement(Summary.Cell, {
323
306
  index: index + offset,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "0.1.135",
3
+ "version": "0.1.136",
4
4
  "description": "> TODO: description",
5
5
  "author": "鲁盛杰 <lusj@cnlemon.net>",
6
6
  "homepage": "",