@teamix/pro 1.5.31 → 1.5.33

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 (37) hide show
  1. package/dist/pro.js +571 -952
  2. package/dist/pro.min.js +1 -1
  3. package/es/actions/index.js +4 -3
  4. package/es/index.d.ts +1 -1
  5. package/es/index.js +1 -1
  6. package/es/table/components/Layout/index.js +7 -9
  7. package/es/table/components/Pagination/index.d.ts +4 -5
  8. package/es/table/components/Pagination/index.js +3 -5
  9. package/es/table/index.js +115 -89
  10. package/es/table/index.scss +1 -1
  11. package/es/table/typing.d.ts +0 -2
  12. package/es/table/utils/genAutoWidthColumns.js +6 -42
  13. package/es/table/utils/genProColumnToColumn.js +2 -20
  14. package/lib/actions/index.js +4 -3
  15. package/lib/index.d.ts +1 -1
  16. package/lib/index.js +1 -1
  17. package/lib/table/components/Layout/index.js +6 -8
  18. package/lib/table/components/Pagination/index.d.ts +4 -5
  19. package/lib/table/components/Pagination/index.js +2 -4
  20. package/lib/table/index.js +117 -91
  21. package/lib/table/index.scss +1 -1
  22. package/lib/table/typing.d.ts +0 -2
  23. package/lib/table/utils/genAutoWidthColumns.js +6 -42
  24. package/lib/table/utils/genProColumnToColumn.js +1 -19
  25. package/package.json +1 -1
  26. package/es/table/components/Cell/index.d.ts +0 -17
  27. package/es/table/components/Cell/index.js +0 -209
  28. package/es/table/components/TableContent/index.d.ts +0 -7
  29. package/es/table/components/TableContent/index.js +0 -23
  30. package/es/table/utils/processColumns.d.ts +0 -8
  31. package/es/table/utils/processColumns.js +0 -39
  32. package/lib/table/components/Cell/index.d.ts +0 -17
  33. package/lib/table/components/Cell/index.js +0 -214
  34. package/lib/table/components/TableContent/index.d.ts +0 -7
  35. package/lib/table/components/TableContent/index.js +0 -34
  36. package/lib/table/utils/processColumns.d.ts +0 -8
  37. package/lib/table/utils/processColumns.js +0 -46
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _utils = require("@teamix/utils");
8
- 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; }
9
- 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; }
10
- 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; }
11
- /**
12
- * 处理原生传入的 columns 以便于 选择列 方便处理
13
- * @param columns 原生传入的 columns
14
- * @returns
15
- */
16
- var processColumns = function processColumns(columns, initialColumns) {
17
- var _getGlobalConfig;
18
- var globalFilterColumns = (_getGlobalConfig = (0, _utils.getGlobalConfig)('ProTable')) === null || _getGlobalConfig === void 0 ? void 0 : _getGlobalConfig.filterColumns;
19
- var filterColumns = columns.filter(function (item) {
20
- return item.columnFilters !== false && (item === null || item === void 0 ? void 0 : item.hidden) !== true && (!globalFilterColumns || globalFilterColumns(_objectSpread({}, item)));
21
- });
22
- // 处理只剩一列批量选择的情况下宽度错乱问题
23
- if (filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) {
24
- var _initialColumns$;
25
- if ((filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) === 1) {
26
- var _filterColumns$, _filterColumns$2;
27
- if ((_filterColumns$ = filterColumns[0]) === null || _filterColumns$ === void 0 ? void 0 : _filterColumns$.width) {
28
- delete filterColumns[0].width;
29
- }
30
- if ((_filterColumns$2 = filterColumns[0]) === null || _filterColumns$2 === void 0 ? void 0 : _filterColumns$2.lock) {
31
- filterColumns[0].lock = false;
32
- }
33
- } else if (((_initialColumns$ = initialColumns[0]) === null || _initialColumns$ === void 0 ? void 0 : _initialColumns$.columnFilters) !== false) {
34
- var _initialColumns$2, _initialColumns$3;
35
- if ((_initialColumns$2 = initialColumns[0]) === null || _initialColumns$2 === void 0 ? void 0 : _initialColumns$2.width) {
36
- filterColumns[0].width = initialColumns[0].width;
37
- }
38
- if ((_initialColumns$3 = initialColumns[0]) === null || _initialColumns$3 === void 0 ? void 0 : _initialColumns$3.lock) {
39
- filterColumns[0].lock = initialColumns[0].lock;
40
- }
41
- }
42
- }
43
- return filterColumns;
44
- };
45
- var _default = processColumns;
46
- exports.default = _default;