dtable-ui-component 6.0.101 → 6.0.102-alpha.2

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.
@@ -39,11 +39,6 @@ const COLUMNS_ICON_CONFIG = {
39
39
  [_dtableUtils.CellType.DIGITAL_SIGN]: 'dtable-font dtable-icon-handwritten-signature',
40
40
  [_dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT]: 'dtable-font dtable-icon-department-single-selection'
41
41
  };
42
- const COLUMN_DISPLAY_TYPE_ICON_CONFIG = {
43
- [_dtableUtils.CellType.TEXT]: {
44
- [_dtableUtils.TEXT_DISPLAY_TYPE_MAP.PHONE]: 'telephone'
45
- }
46
- };
47
42
  const DTableColumnIcon = _ref => {
48
43
  let {
49
44
  column,
@@ -54,6 +49,11 @@ const DTableColumnIcon = _ref => {
54
49
  } = _ref;
55
50
  const columnType = column === null || column === void 0 ? void 0 : column.type;
56
51
  if (!columnType) return null;
52
+ const COLUMN_DISPLAY_TYPE_ICON_CONFIG = {
53
+ [_dtableUtils.CellType.TEXT]: {
54
+ [_dtableUtils.TEXT_DISPLAY_TYPE_MAP.PHONE]: 'telephone'
55
+ }
56
+ };
57
57
  const columnDisplayType = (0, _dtableUtils.getColumnDisplayType)(column);
58
58
  let symbol = null;
59
59
  let displayTypeIconConfig = COLUMN_DISPLAY_TYPE_ICON_CONFIG[columnType];
@@ -186,19 +186,17 @@ class FilterItem extends _react.default.Component {
186
186
  this.props.updateFilter(index, newFilter);
187
187
  };
188
188
  this.onFilterTermCheckboxChanged = () => {
189
- const {
190
- filterColumn
191
- } = this.props;
192
- const value = this.checkboxEditor.getValue();
193
- const checked = value[filterColumn.key];
194
- this.onFilterTermChanged(checked);
189
+ var _this$checkboxEditor;
190
+ const value = (_this$checkboxEditor = this.checkboxEditor) === null || _this$checkboxEditor === void 0 ? void 0 : _this$checkboxEditor.getValue();
191
+ this.onFilterTermChanged(!!value);
195
192
  };
196
193
  this.onFilterTermTextChanged = value => {
197
194
  this.onFilterTermChanged(value);
198
195
  };
199
196
  this.onFilterTermNumberChanged = () => {
200
- const value = this.numberEditor.getValue();
201
- this.onFilterTermChanged(Object.values(value)[0]);
197
+ var _this$numberEditor;
198
+ const value = (_this$numberEditor = this.numberEditor) === null || _this$numberEditor === void 0 ? void 0 : _this$numberEditor.getValue();
199
+ this.onFilterTermChanged(value);
202
200
  };
203
201
  this.onFilterTermDurationChanged = () => {
204
202
  const value = this.durationEditor.getValue();
@@ -260,7 +258,7 @@ class FilterItem extends _react.default.Component {
260
258
  column: filterColumn,
261
259
  value: filterTerm,
262
260
  className: "dtable-ui-filter-item-checkbox",
263
- onChange: this.onFilterTermCheckboxChanged,
261
+ onCommit: this.onFilterTermCheckboxChanged,
264
262
  readOnly: readOnly
265
263
  })
266
264
  });
@@ -63,7 +63,11 @@ class NumberEditor extends _react.default.Component {
63
63
  return this.input.querySelector('input:not([type=hidden])');
64
64
  };
65
65
  this.onBlur = () => {
66
- this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onBlur();
66
+ if (this.props.onCommit) {
67
+ this.props.onCommit(this.getValue());
68
+ } else if (this.props.onBlur) {
69
+ this.props.onBlur();
70
+ }
67
71
  };
68
72
  this.setInputRef = input => {
69
73
  this.input = input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.101",
3
+ "version": "6.0.102-alpha.2",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "4.0.2",