dtable-ui-component 6.0.55-beta.2 → 6.0.55-beta.3

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.
@@ -45,13 +45,14 @@ const COLUMN_DISPLAY_TYPE_ICON_CONFIG = {
45
45
  };
46
46
  const DTableColumnIcon = _ref => {
47
47
  let {
48
- columnType,
49
- columnDisplayType,
48
+ column,
50
49
  color,
51
50
  className,
52
51
  ariaHidden = false,
53
52
  getSvg
54
53
  } = _ref;
54
+ const columnType = column.type;
55
+ const columnDisplayType = (0, _dtableUtils.getColumnDisplayType)(column);
55
56
  let symbol = null;
56
57
  let displayTypeIconConfig = COLUMN_DISPLAY_TYPE_ICON_CONFIG[columnType];
57
58
  if (displayTypeIconConfig && columnDisplayType) {
@@ -14,9 +14,7 @@ class FilterItemUtils {
14
14
  static generatorColumnOption(column) {
15
15
  if (!column) return null;
16
16
  const {
17
- type,
18
- name,
19
- data
17
+ name
20
18
  } = column;
21
19
  return {
22
20
  value: {
@@ -26,8 +24,7 @@ class FilterItemUtils {
26
24
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
27
25
  className: "filter-header-icon",
28
26
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableColumnIcon.default, {
29
- columnType: type,
30
- columnDisplayType: data === null || data === void 0 ? void 0 : data.display_type
27
+ column: column
31
28
  })
32
29
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
33
30
  className: "select-option-name",
@@ -70,8 +70,10 @@ function FieldItem(_ref) {
70
70
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
71
71
  className: "field-switch",
72
72
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableColumnIcon.default, {
73
- columnType: type,
74
- columnDisplayType: data === null || data === void 0 ? void 0 : data.display_type
73
+ column: {
74
+ type,
75
+ data
76
+ }
75
77
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
76
78
  children: field.name
77
79
  })]
@@ -19,9 +19,7 @@ const ColumnContent = _ref => {
19
19
  const descriptionRef = (0, _react.useRef)(null);
20
20
  const {
21
21
  name,
22
- type,
23
22
  key,
24
- data,
25
23
  description
26
24
  } = column;
27
25
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Row, {
@@ -33,8 +31,7 @@ const ColumnContent = _ref => {
33
31
  className: "dtable-ui-header-icon",
34
32
  id: `header-icon-${key}`,
35
33
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableColumnIcon.default, {
36
- columnType: type,
37
- columnDisplayType: data === null || data === void 0 ? void 0 : data.display_type
34
+ column: column
38
35
  })
39
36
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
40
37
  className: "dtable-ui-row-expand-column-name",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.55-beta.2",
3
+ "version": "6.0.55-beta.3",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "4.0.2",
@@ -8,7 +8,7 @@
8
8
  "@seafile/seafile-editor": "~2.0.14",
9
9
  "classnames": "~2.5.*",
10
10
  "dayjs": "1.10.7",
11
- "dtable-utils": "~5.0.26-beta.1",
11
+ "dtable-utils": "~5.0.26-beta.2",
12
12
  "is-hotkey": "0.2.0",
13
13
  "rc-checkbox": "3.5.0",
14
14
  "react-color": "2.19.3",