dtable-ui-component 6.0.102-alpha.2 → 6.0.102-asd0.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.
@@ -24,7 +24,8 @@ const AsyncUserSelect = _ref => {
24
24
  enableShowIDInOrgWhenSearchUser = false,
25
25
  selectedUsers = [],
26
26
  loadOptions,
27
- modifySelectedUsers
27
+ modifySelectedUsers,
28
+ isShowInput = true
28
29
  } = _ref;
29
30
  const [isPopoverOpen, setIsPopoverOpen] = (0, _react.useState)(false);
30
31
  const [searchValue, setSearchValue] = (0, _react.useState)('');
@@ -190,8 +191,8 @@ const AsyncUserSelect = _ref => {
190
191
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickOutside.default, {
191
192
  onClickOutside: onClickOutside,
192
193
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
193
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
194
- className: (0, _classnames.default)('dtable-ui-selected-users-container form-control d-flex align-items-center', className, {
194
+ children: [isShowInput && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
195
+ className: classnames('dtable-ui-selected-users-container form-control d-flex align-items-center', className, {
195
196
  'focus': isPopoverOpen
196
197
  }),
197
198
  onClick: onTogglePopover,
@@ -231,7 +232,7 @@ const AsyncUserSelect = _ref => {
231
232
  ref: userListContainerRef,
232
233
  children: [searchedUsers.length > 0 && searchedUsers.map((user, index) => {
233
234
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
234
- className: (0, _classnames.default)('dtable-ui-user-item-container', {
235
+ className: classnames('dtable-ui-user-item-container', {
235
236
  'dtable-ui-user-item-container-highlight': index === highlightIndex
236
237
  }),
237
238
  ref: userItemContainerRef,
@@ -16,8 +16,7 @@ class CheckboxFormatter extends _react.default.PureComponent {
16
16
  super(...arguments);
17
17
  this.renderIcon = (symbol, color) => {
18
18
  const className = (0, _classnames.default)('dtable-ui-checkbox-check-mark', {
19
- 'dtable-ui-checkbox-check-svg': !(symbol !== null && symbol !== void 0 && symbol.startsWith('dtable-icon')),
20
- 'scale-icon-150': _constants.isMobile
19
+ 'dtable-ui-checkbox-check-svg': !(symbol !== null && symbol !== void 0 && symbol.startsWith('dtable-icon'))
21
20
  });
22
21
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
23
22
  className: className,
@@ -39,6 +39,11 @@ 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
+ };
42
47
  const DTableColumnIcon = _ref => {
43
48
  let {
44
49
  column,
@@ -49,11 +54,6 @@ const DTableColumnIcon = _ref => {
49
54
  } = _ref;
50
55
  const columnType = column === null || column === void 0 ? void 0 : column.type;
51
56
  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];
@@ -267,7 +267,7 @@ class FilterItem extends _react.default.Component {
267
267
  ref: ref => this.numberEditor = ref,
268
268
  column: filterColumn,
269
269
  value: filterTerm,
270
- onCommit: this.onFilterTermNumberChanged,
270
+ onBlur: this.onFilterTermNumberChanged,
271
271
  readOnly: readOnly
272
272
  });
273
273
  } else if (type === _constants.INPUT_CMP_TYPE_MAP.DURATION) {
@@ -4,7 +4,3 @@
4
4
  fill: currentColor;
5
5
  overflow: hidden;
6
6
  }
7
-
8
- .multicolor-icon.scale-icon-150 {
9
- transform: scale(1.5);
10
- }
@@ -20,6 +20,7 @@ const FileFormatter = _ref => {
20
20
  containerClassName = '',
21
21
  renderItem,
22
22
  isSupportOpenFile = false,
23
+ onOpenFile,
23
24
  server,
24
25
  workspaceID,
25
26
  dtableUuid
@@ -62,7 +63,8 @@ const FileFormatter = _ref => {
62
63
  let assetFileIndex = openFileUrl.indexOf('/asset');
63
64
  if (assetFileIndex > -1) {
64
65
  previewerUrl = openFileUrl.replace('/asset', '/asset-preview');
65
- window.open(previewerUrl, '_blank');
66
+ if (!onOpenFile) window.open(previewerUrl, '_blank');
67
+ onOpenFile(previewerUrl);
66
68
  }
67
69
  }, [fileImageUrlList, isSupportOpenFile, showLargeImage]);
68
70
  const moveNext = (0, _react.useCallback)(() => {
@@ -63,11 +63,7 @@ class NumberEditor extends _react.default.Component {
63
63
  return this.input.querySelector('input:not([type=hidden])');
64
64
  };
65
65
  this.onBlur = () => {
66
- if (this.props.onCommit) {
67
- this.props.onCommit(this.getValue());
68
- } else if (this.props.onBlur) {
69
- this.props.onBlur();
70
- }
66
+ this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onBlur();
71
67
  };
72
68
  this.setInputRef = input => {
73
69
  this.input = input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.102-alpha.2",
3
+ "version": "6.0.102asd0.1",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "4.0.2",