dtable-ui-component 7.0.9-beta.2 → 7.0.9-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.
@@ -18,6 +18,7 @@ var _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
18
18
  require("./index.css");
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
20
  const AsyncUserSelect = _ref => {
21
+ var _selectorRef$current;
21
22
  let className = _ref.className,
22
23
  _ref$emptyPlaceholder = _ref.emptyPlaceholder,
23
24
  emptyPlaceholder = _ref$emptyPlaceholder === void 0 ? '' : _ref$emptyPlaceholder,
@@ -211,6 +212,7 @@ const AsyncUserSelect = _ref => {
211
212
  document.removeEventListener('keydown', onHotKey, true);
212
213
  };
213
214
  }, [onHotKey]);
215
+ const popoverContainer = ((_selectorRef$current = selectorRef.current) === null || _selectorRef$current === void 0 ? void 0 : _selectorRef$current.closest('.modal[aria-modal="true"]')) || 'body';
214
216
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickOutside.default, {
215
217
  onClickOutside: onClickOutside,
216
218
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
@@ -245,6 +247,7 @@ const AsyncUserSelect = _ref => {
245
247
  hideArrow: true,
246
248
  fade: false,
247
249
  className: "dtable-ui-user-select-popover",
250
+ container: popoverContainer,
248
251
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
249
252
  className: "dtable-ui-user-select-container",
250
253
  ref: userSelectContainerRef,
@@ -28,6 +28,18 @@
28
28
  border-top-right-radius: 4px;
29
29
  }
30
30
 
31
+ .select-search-control:-webkit-autofill,
32
+ .select-search-control:-webkit-autofill:hover,
33
+ .select-search-control:-webkit-autofill:focus,
34
+ .select-search-control:-webkit-autofill:active,
35
+ .select-search-control:-internal-autofill-previewed,
36
+ .select-search-control:-internal-autofill-selected {
37
+ -webkit-box-shadow: inset 0 0 0 1000px var(--bs-popover-bg) !important;
38
+ box-shadow: inset 0 0 0 1000px var(--bs-popover-bg) !important;
39
+ -webkit-text-fill-color: var(--bs-body-color) !important;
40
+ transition: background-color 5000s ease-in-out 0s !important;
41
+ }
42
+
31
43
  .select-search-control:focus {
32
44
  outline: none;
33
45
  box-shadow: none;
@@ -70,6 +82,6 @@
70
82
 
71
83
  .dtable-ui-user-select-popover .select-search-control,
72
84
  .dtable-popover .select-search-control {
73
- border-top-left-radius: 8px;
74
- border-top-right-radius: 8px;
85
+ border-top-left-radius: 4px;
86
+ border-top-right-radius: 4px;
75
87
  }
@@ -107,10 +107,6 @@
107
107
  white-space: nowrap;
108
108
  }
109
109
 
110
- .seatable-customize-select .selected-option .multicolor-icon {
111
- font-size: 12px;
112
- }
113
-
114
110
  .seatable-customize-select .multiple-check-icon,
115
111
  .seatable-customize-select .header-icon .dtable-font,
116
112
  .seatable-option-group .select-label .header-icon .dtable-font {
@@ -125,6 +121,12 @@
125
121
  margin-left: 0 !important;
126
122
  }
127
123
 
124
+ .seatable-customize-select .selected-option .dtable-icon-down3,
125
+ .seatable-customize-select .selected-option .multicolor-icon {
126
+ color: var(--bs-icon-color) !important;
127
+ font-size: 12px;
128
+ }
129
+
128
130
  .selector-group-select .selected-option-show .selected-option-item {
129
131
  align-items: center;
130
132
  border-radius: 4px;
@@ -159,7 +161,9 @@
159
161
  }
160
162
 
161
163
  .selector-group-select {
162
- padding: 7px 16px 7px 8px;
164
+ height: auto;
165
+ min-height: 38px;
166
+ padding: 6px 16px 6px 8px;
163
167
  }
164
168
 
165
169
  .selector-group-select .selected-option {
@@ -172,7 +176,3 @@
172
176
  height: auto;
173
177
  min-height: 24px
174
178
  }
175
-
176
- .selector-group-select {
177
- height: auto;
178
- }
@@ -45,6 +45,13 @@ class DTableCustomizeSelect extends _react.Component {
45
45
  isShowSelectOptions: false
46
46
  });
47
47
  };
48
+ this.handleDocumentMouseDown = event => {
49
+ if (!this.state.isShowSelectOptions) return;
50
+ const target = event.target;
51
+ if (this.selector && this.selector.contains(target)) return;
52
+ if (target && target.closest && target.closest('.seatable-option-group')) return;
53
+ this.closeSelect();
54
+ };
48
55
  this.getSelectedOptionTop = () => {
49
56
  if (!this.selector) return 38;
50
57
  const _this$selector$getBou = this.selector.getBoundingClientRect(),
@@ -80,6 +87,12 @@ class DTableCustomizeSelect extends _react.Component {
80
87
  isShowSelectOptions: false
81
88
  };
82
89
  }
90
+ componentDidMount() {
91
+ document.addEventListener('mousedown', this.handleDocumentMouseDown, true);
92
+ }
93
+ componentWillUnmount() {
94
+ document.removeEventListener('mousedown', this.handleDocumentMouseDown, true);
95
+ }
83
96
  render() {
84
97
  let _this$props2 = this.props,
85
98
  className = _this$props2.className,
@@ -132,7 +132,7 @@
132
132
  }
133
133
 
134
134
  .dtable-ui-filters-list .filter-conjunction {
135
- width: 72px;
135
+ width: 88px;
136
136
  }
137
137
 
138
138
  .dtable-ui-filters-list .filter-conjunction-readonly {
@@ -166,21 +166,12 @@
166
166
  color: #666666;
167
167
  }
168
168
 
169
- .dtable-ui-filters-list .filter-column {
170
- max-width: 150px;
171
- }
172
-
173
169
  .filter-term .dtable-ui-multiple-select-selector .option,
174
170
  .filter-term .dtable-ui-single-select-selector .option {
175
171
  height: 30px;
176
172
  padding: 0 10px;
177
173
  }
178
174
 
179
- .filter-term .dtable-ui-multiple-select-selector .select-option-name,
180
- .filter-term .dtable-ui-single-select-selector .select-option-name {
181
- margin-top: 5px !important;
182
- }
183
-
184
175
  .filter-term .dtable-ui-single-select-selector .option:hover {
185
176
  color: #212529;
186
177
  background-color: #f7f7f7;
@@ -9,7 +9,15 @@
9
9
  color: var(--bs-icon-color);
10
10
  }
11
11
 
12
- .seatable-option .select-option-name .seatable-tip-default {
12
+ .seatable-option .seatable-tip-default {
13
13
  font-size: 12px;
14
14
  margin-top: 4px
15
15
  }
16
+
17
+ .select-option-name .group-select-option,
18
+ .seatable-option.option-name {
19
+ width: 100%;
20
+ overflow: hidden;
21
+ text-overflow: ellipsis;
22
+ white-space: nowrap;
23
+ }
@@ -214,7 +214,7 @@ const Option = props => {
214
214
  whiteSpace: 'pre-line'
215
215
  },
216
216
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
217
- className: "seatable-option",
217
+ className: "seatable-option option-name",
218
218
  children: label
219
219
  }), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
220
220
  className: "dtable-font dtable-icon-check",
@@ -66,6 +66,9 @@
66
66
 
67
67
  .select-label {
68
68
  width: 100%;
69
+ overflow: hidden;
70
+ white-space: nowrap;
71
+ text-overflow: ellipsis;
69
72
  }
70
73
 
71
74
  .seatable-option-group-selector-multiple-select .select-label,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "7.0.9-beta.2",
3
+ "version": "7.0.9-beta.3",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "5.0.9",