dtable-ui-component 7.0.1-beta.5 → 7.0.1-beta.btn2

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 (45) hide show
  1. package/lib/AsyncUserSelect/index.css +28 -38
  2. package/lib/AsyncUserSelect/index.js +18 -29
  3. package/lib/DTableCustomizeCollaboratorSelect/index.css +86 -0
  4. package/lib/DTableCustomizeCollaboratorSelect/index.js +158 -0
  5. package/lib/DTableCustomizeSelect/index.css +42 -120
  6. package/lib/DTableCustomizeSelect/index.js +6 -12
  7. package/lib/DTableFiltersPopover/index.js +9 -8
  8. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +19 -7
  9. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -5
  10. package/lib/DTableFiltersPopover/widgets/filter-group.js +1 -1
  11. package/lib/DTableFiltersPopover/widgets/filter-item.js +8 -16
  12. package/lib/DTableFiltersPopover/widgets/filter-list/index.css +8 -8
  13. package/lib/DTableGroupSelect/index.css +96 -0
  14. package/lib/DTableGroupSelect/index.js +131 -0
  15. package/lib/DTableGroupSelect/option.js +42 -0
  16. package/lib/DTableGroupSelect/select-option-group.css +54 -0
  17. package/lib/DTableGroupSelect/select-option-group.js +227 -0
  18. package/lib/DTableModalHeader/index.js +3 -10
  19. package/lib/DTableSelect/dtable-select-label.css +3 -8
  20. package/lib/DTableSelect/dtable-select-label.js +1 -1
  21. package/lib/DTableSelect/index.js +3 -3
  22. package/lib/DTableSelect/user-select.css +46 -7
  23. package/lib/DTableSelect/utils.js +79 -166
  24. package/lib/FieldDisplaySetting/index.js +1 -1
  25. package/lib/ImageEditor/images-previewer/image-preview/index.js +2 -1
  26. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +2 -2
  27. package/lib/ImageFormatter/images-lazy-load.js +2 -2
  28. package/lib/ImageFormatter/index.js +5 -2
  29. package/lib/ImagePreviewerLightbox/index.js +2 -1
  30. package/lib/ImageThumbnail/index.js +2 -1
  31. package/lib/SelectItem/index.js +1 -1
  32. package/lib/SelectOptionGroup/KeyCodes.js +4 -96
  33. package/lib/SelectOptionGroup/index.css +54 -44
  34. package/lib/SelectOptionGroup/index.js +18 -35
  35. package/lib/SelectOptionGroup/option.js +4 -16
  36. package/lib/index.js +10 -3
  37. package/lib/utils/url.js +10 -35
  38. package/package.json +2 -2
  39. package/lib/DTableCustomizeSearchInput/index.css +0 -75
  40. package/lib/DTableCustomizeSearchInput/index.js +0 -133
  41. package/lib/DTableModalHeader/index.css +0 -22
  42. package/lib/DTableSelect/select-dropdown-indicator/index.css +0 -16
  43. package/lib/DTableSelect/select-dropdown-indicator/index.js +0 -24
  44. package/lib/assets/icons/close.svg +0 -1
  45. package/lib/assets/icons/down.svg +0 -3
@@ -0,0 +1,227 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _DTableSearchInput = _interopRequireDefault(require("../DTableSearchInput"));
12
+ var _option = _interopRequireDefault(require("./option"));
13
+ var _KeyCodes = _interopRequireDefault(require("../SelectOptionGroup/KeyCodes"));
14
+ require("./select-option-group.css");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ const OPTION_HEIGHT = 32;
17
+ class SelectOptionGroup extends _react.Component {
18
+ constructor(props) {
19
+ super(props);
20
+ this.handleDocumentClick = e => {
21
+ this.props.onClickOutside(e);
22
+ };
23
+ this.resetMenuStyle = () => {
24
+ const _this$props = this.props,
25
+ isInModal = _this$props.isInModal,
26
+ position = _this$props.position;
27
+ const _this$optionGroupRef$ = this.optionGroupRef.getBoundingClientRect(),
28
+ top = _this$optionGroupRef$.top,
29
+ height = _this$optionGroupRef$.height;
30
+ if (isInModal) {
31
+ if (position.y + position.height + height > window.innerHeight) {
32
+ this.optionGroupRef.style.top = position.y - height + 'px';
33
+ }
34
+ this.optionGroupRef.style.opacity = 1;
35
+ this.searchInputRef.current && this.searchInputRef.current.inputRef.focus();
36
+ } else {
37
+ if (height + top > window.innerHeight) {
38
+ const borderWidth = 2;
39
+ this.optionGroupRef.style.top = -1 * (height + borderWidth) + 'px';
40
+ }
41
+ }
42
+ };
43
+ this.onHotKey = event => {
44
+ const keyCode = event.keyCode;
45
+ if (keyCode === _KeyCodes.default.UpArrow) {
46
+ this.onPressUp();
47
+ } else if (keyCode === _KeyCodes.default.DownArrow) {
48
+ this.onPressDown();
49
+ } else if (keyCode === _KeyCodes.default.Enter) {
50
+ let option = this.filterOptions && this.filterOptions[this.state.activeIndex];
51
+ if (option) {
52
+ this.props.onSelectOption(option);
53
+ }
54
+ } else if (keyCode === _KeyCodes.default.Tab || keyCode === _KeyCodes.default.Escape) {
55
+ this.props.closeSelect();
56
+ }
57
+ };
58
+ this.onPressUp = () => {
59
+ if (this.state.activeIndex > 0) {
60
+ this.setState({
61
+ activeIndex: this.state.activeIndex - 1
62
+ }, () => {
63
+ this.scrollContent();
64
+ });
65
+ }
66
+ };
67
+ this.onPressDown = () => {
68
+ if (this.filterOptions && this.state.activeIndex < this.filterOptions.length - 1) {
69
+ this.setState({
70
+ activeIndex: this.state.activeIndex + 1
71
+ }, () => {
72
+ this.scrollContent();
73
+ });
74
+ }
75
+ };
76
+ this.onMouseDown = e => {
77
+ const isInModal = this.props.isInModal;
78
+ // prevent event propagation when click option or search input
79
+ if (isInModal) {
80
+ e.stopPropagation();
81
+ e.nativeEvent.stopImmediatePropagation();
82
+ }
83
+ };
84
+ this.scrollContent = () => {
85
+ const _this$optionGroupCont = this.optionGroupContentRef,
86
+ offsetHeight = _this$optionGroupCont.offsetHeight,
87
+ scrollTop = _this$optionGroupCont.scrollTop;
88
+ this.setState({
89
+ disableHover: true
90
+ });
91
+ this.timer = setTimeout(() => {
92
+ this.setState({
93
+ disableHover: false
94
+ });
95
+ }, 500);
96
+ if (this.state.activeIndex * OPTION_HEIGHT === 0) {
97
+ this.optionGroupContentRef.scrollTop = 0;
98
+ return;
99
+ }
100
+ if (this.state.activeIndex * OPTION_HEIGHT < scrollTop) {
101
+ this.optionGroupContentRef.scrollTop = scrollTop - OPTION_HEIGHT;
102
+ } else if (this.state.activeIndex * OPTION_HEIGHT > offsetHeight + scrollTop) {
103
+ this.optionGroupContentRef.scrollTop = scrollTop + OPTION_HEIGHT;
104
+ }
105
+ };
106
+ this.changeIndex = index => {
107
+ this.setState({
108
+ activeIndex: index
109
+ });
110
+ };
111
+ this.onChangeSearch = searchVal => {
112
+ this.setState({
113
+ searchVal: searchVal || '',
114
+ activeIndex: -1
115
+ });
116
+ };
117
+ this.clearValue = () => {
118
+ this.setState({
119
+ searchVal: '',
120
+ activeIndex: -1
121
+ });
122
+ };
123
+ this.renderOptGroup = searchVal => {
124
+ let _this$props2 = this.props,
125
+ noOptionsPlaceholder = _this$props2.noOptionsPlaceholder,
126
+ onSelectOption = _this$props2.onSelectOption,
127
+ selectedOptions = _this$props2.selectedOptions;
128
+ this.filterOptions = this.props.getFilterOptions(searchVal);
129
+ if (this.filterOptions.length === 0) {
130
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
131
+ className: "none-search-result",
132
+ children: noOptionsPlaceholder
133
+ });
134
+ }
135
+ return this.filterOptions.map((option, index) => {
136
+ const isSelected = selectedOptions.some(item => item.id === option.id);
137
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_option.default, {
138
+ index: index,
139
+ isActive: this.state.activeIndex === index,
140
+ option: option,
141
+ onSelectOption: onSelectOption,
142
+ changeIndex: this.changeIndex,
143
+ disableHover: this.state.disableHover,
144
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
145
+ className: "option-label text-truncate",
146
+ title: option.label,
147
+ children: option.label
148
+ }), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
149
+ className: "dtable-font dtable-icon-check-mark"
150
+ })]
151
+ }, "".concat(option.id, "-").concat(index));
152
+ });
153
+ };
154
+ this.state = {
155
+ searchVal: '',
156
+ activeIndex: -1,
157
+ disableHover: false
158
+ };
159
+ this.filterOptions = null;
160
+ this.timer = null;
161
+ this.searchInputRef = /*#__PURE__*/_react.default.createRef();
162
+ }
163
+ componentDidMount() {
164
+ window.addEventListener('keydown', this.onHotKey);
165
+ document.addEventListener('mousedown', this.handleDocumentClick);
166
+ setTimeout(() => {
167
+ this.resetMenuStyle();
168
+ }, 1);
169
+ }
170
+ componentWillUnmount() {
171
+ this.filterOptions = null;
172
+ this.timer && clearTimeout(this.timer);
173
+ window.removeEventListener('keydown', this.onHotKey);
174
+ document.removeEventListener('mousedown', this.handleDocumentClick);
175
+ }
176
+ render() {
177
+ const _this$props3 = this.props,
178
+ searchPlaceholder = _this$props3.searchPlaceholder,
179
+ top = _this$props3.top,
180
+ left = _this$props3.left,
181
+ minWidth = _this$props3.minWidth,
182
+ isInModal = _this$props3.isInModal,
183
+ position = _this$props3.position,
184
+ className = _this$props3.className;
185
+ let searchVal = this.state.searchVal;
186
+ let style = {
187
+ top: top || 0,
188
+ left: left || 0
189
+ };
190
+ if (minWidth) {
191
+ style = {
192
+ top: top || 0,
193
+ left: left || 0,
194
+ minWidth
195
+ };
196
+ }
197
+ if (isInModal) {
198
+ style = {
199
+ position: 'fixed',
200
+ left: position.x,
201
+ top: position.y + position.height,
202
+ minWidth: position.width,
203
+ opacity: 0
204
+ };
205
+ }
206
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
207
+ className: (0, _classnames.default)('option-group group-selector', className ? 'option-group-' + className : ''),
208
+ ref: ref => this.optionGroupRef = ref,
209
+ style: style,
210
+ onMouseDown: this.onMouseDown,
211
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
212
+ className: "option-group-search position-relative",
213
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
214
+ className: "option-search-control",
215
+ placeholder: searchPlaceholder,
216
+ onChange: this.onChangeSearch,
217
+ ref: this.searchInputRef
218
+ })
219
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
220
+ className: "option-group-content",
221
+ ref: ref => this.optionGroupContentRef = ref,
222
+ children: this.renderOptGroup(searchVal)
223
+ })]
224
+ });
225
+ }
226
+ }
227
+ var _default = exports.default = SelectOptionGroup;
@@ -10,22 +10,15 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _reactstrap = require("reactstrap");
12
12
  var _IconButton = _interopRequireDefault(require("../IconButton"));
13
- require("./index.css");
14
13
  var _jsxRuntime = require("react/jsx-runtime");
15
14
  const _excluded = ["children"];
16
15
  const DTableModalHeader = _ref => {
17
16
  let children = _ref.children,
18
17
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
19
- const customCloseBtn = /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
20
- type: "button",
21
- className: "close dtable-modal-close",
22
- "data-dismiss": "modal",
18
+ const customCloseBtn = /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
19
+ icon: "x",
23
20
  "aria-label": "Close",
24
- onClick: props.toggle,
25
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
26
- icon: "x",
27
- className: "dtable-modal-close-inner"
28
- })
21
+ onClick: props.toggle
29
22
  });
30
23
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
31
24
  close: customCloseBtn,
@@ -1,15 +1,10 @@
1
1
  .dtable-select-check-icon {
2
- width: 14px;
3
- height: 14px;
2
+ width: 20px;
3
+ height: 20px;
4
4
  text-align: center;
5
5
  }
6
6
 
7
7
  .dtable-select-check-icon .dtable-font {
8
- font-size: 14px;
9
- color: var(--bs-icon-color);
10
- }
11
-
12
- .seatable-option .select-option-name .seatable-tip-default {
13
8
  font-size: 12px;
14
- margin-top: 4px
9
+ color: #798d99;
15
10
  }
@@ -22,7 +22,7 @@ function DTableSelectLabel(_ref) {
22
22
  }), isSelect && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
23
23
  className: "dtable-select-check-icon",
24
24
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
25
- className: "dtable-font dtable-icon-check"
25
+ className: "dtable-font dtable-icon-check-mark"
26
26
  })
27
27
  })]
28
28
  });
@@ -39,11 +39,10 @@ class DTableSelect extends _react.default.Component {
39
39
  MenuList: _utils.MenuList,
40
40
  ClearIndicator: _utils.ClearIndicator
41
41
  }, userComponents);
42
- const processedOptions = (0, _utils.processOptionsWithClear)(options, isClearable);
43
42
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.default, {
44
43
  value: value,
45
- onChange: (0, _utils.createHandleChange)(onChange),
46
- options: processedOptions,
44
+ onChange: onChange,
45
+ options: options,
47
46
  isMulti: isMulti,
48
47
  className: className,
49
48
  classNamePrefix: classNamePrefix,
@@ -51,6 +50,7 @@ class DTableSelect extends _react.default.Component {
51
50
  components: mergedComponents,
52
51
  placeholder: placeholder,
53
52
  isSearchable: isSearchable,
53
+ isClearable: isClearable,
54
54
  menuPosition: menuPosition || 'fixed' // when use default menuPosition(absolute), menuPortalTarget is unnecessary.
55
55
  ,
56
56
  menuShouldScrollIntoView: true,
@@ -1,12 +1,51 @@
1
- /* hide checkbox in select value container */
2
- .seatable-select-value-container .seatable-multicolor-icon-check {
3
- display: none;
1
+ .user-select .select-module-container {
2
+ display: flex;
3
+ align-items: center;
4
4
  }
5
5
 
6
- .seatable-select-value-container .select-option-label {
7
- font-size: 14px !important;
6
+ .user-select .select-module.select-module-avatar {
7
+ height: 24px;
8
+ width: 24px;
9
+ border-radius: 50%;
8
10
  }
9
11
 
10
- .seatable-check-color {
11
- color: var(--bs-icon-secondary-color);
12
+ .user-select .select-module.select-module-name {
13
+ color: #212529;
14
+ font-size: 14px;
15
+ }
16
+
17
+ .user-select .true__value-container .select-module-container {
18
+ display: block;
19
+ }
20
+
21
+ .user-select .true__value-container .select-module.select-module-avatar {
22
+ height: 16px;
23
+ width: 16px;
24
+ border-radius: 50%;
25
+ }
26
+
27
+ .user-select .true__value-container .true__multi-value__label {
28
+ padding: 0px;
29
+ }
30
+
31
+ .user-select .true__value-container .true__multi-value__label .select-module.select-module-avatar {
32
+ transform: translateY(-2px);
33
+ }
34
+
35
+ .user-select .true__value-container .select-module.select-module-name {
36
+ font-size: 13px;
37
+ overflow: hidden;
38
+ text-overflow: ellipsis;
39
+ white-space: nowrap;
40
+ flex: 1 1;
41
+ line-height: 20px;
42
+ margin-left: 5px;
43
+ }
44
+
45
+ .user-select .true__control.true__control--is-focused,
46
+ .user-select .true__control.true__control--is-focused:hover {
47
+ background-color: #ffffff;
48
+ border-color: #1991eb;
49
+ outline: 0;
50
+ box-shadow: 0 0 0 2px rgba(70, 127, 207, 0.25);
12
51
  }
@@ -4,164 +4,124 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.processOptionsWithClear = exports.handleSelectChange = exports.createHandleChange = exports.Option = exports.MenuSelectStyle = exports.MenuList = exports.DropdownIndicator = exports.ClearIndicator = void 0;
7
+ exports.UserSelectStyle = exports.Option = exports.MenuSelectStyle = exports.MenuList = exports.DropdownIndicator = exports.ClearIndicator = void 0;
8
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
9
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _reactSelect = require("react-select");
12
- require("./dtable-select-label.css");
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
13
  const _excluded = ["innerProps"]; // DtableSelect is based on seatable-ui.css, so use the following content to override the default react-select style
15
14
  const DEFAULT_CONTROL_STYLE = {
16
- fontSize: '14px',
17
- padding: '0 4px 0 8px',
18
- border: '1px solid var(--bs-border-color) !important',
19
- boxShadow: 'none',
20
- backgroundColor: 'var(--bs-popover-bg)',
21
- borderRadius: '4px',
22
- outline: '0'
23
- };
24
- const DISABLED_CONTROL_STYLE = {
25
- fontSize: '14px',
26
- padding: '0 4px 0 8px',
27
- border: '1px solid rgba(0, 40, 100, 0.12)',
28
- boxShadow: 'none',
29
- backgroundColor: 'var(--bs-bg-color)',
30
- borderRadius: '4px',
31
- outline: '0',
32
- cursor: 'default',
33
- opacity: 0.65
15
+ border: '1px solid rgba(0, 40, 100, 0.12) !important'
34
16
  };
35
17
  const FOCUS_CONTROL_STYLE = {
36
18
  fontSize: '14px',
37
- padding: '0 4px 0 8px',
38
- border: '1px solid var(--bs-bg-border-color)',
39
- boxShadow: 'none',
40
- backgroundColor: 'var(--bs-popover-bg)',
41
- borderRadius: '4px',
42
- outline: '0'
43
- };
44
- const HEADER_ICON_STYLE = {
45
- padding: '0 0.5rem !important'
19
+ backgroundColor: '#ffffff',
20
+ borderColor: '#1991eb',
21
+ outline: '0',
22
+ boxShadow: '0 0 0 2px rgba(70, 127, 207, 0.25)'
46
23
  };
24
+ const noneCallback = () => ({
25
+ display: 'none'
26
+ });
47
27
  const controlCallback = (provided, state) => {
48
28
  const isDisabled = state.isDisabled,
49
29
  isFocused = state.isFocused;
50
- const headerIconStyle = {
51
- '.header-icon': HEADER_ICON_STYLE,
52
- '.header-icon .dtable-font': {
53
- color: 'var(--bs-icon-secondary-color) !important'
54
- }
55
- };
56
- if (isDisabled) {
57
- return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), DISABLED_CONTROL_STYLE), {}, {
58
- ':active': {
59
- border: '1px solid var(--bs-bg-border-color)'
60
- }
61
- }, headerIconStyle);
62
- }
63
- if (isFocused) {
64
- return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE), headerIconStyle);
30
+ if (isFocused && !isDisabled) {
31
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE), {}, {
32
+ '&:hover': (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), FOCUS_CONTROL_STYLE)
33
+ });
65
34
  }
66
35
  return (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
67
36
  fontSize: '14px',
68
37
  lineHeight: '1.5',
69
38
  cursor: 'pointer'
70
- }, DEFAULT_CONTROL_STYLE), headerIconStyle);
39
+ }, DEFAULT_CONTROL_STYLE), {}, {
40
+ '&:hover': (0, _objectSpread2.default)({}, DEFAULT_CONTROL_STYLE)
41
+ });
71
42
  };
72
- const MenuSelectStyle = exports.MenuSelectStyle = {
73
- menu: base => {
74
- return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, base), {}, {
75
- backgroundColor: 'var(--bs-popover-bg)',
76
- border: '1px solid var(--bs-border-secondary-color)',
77
- borderRadius: '4px',
78
- boxShadow: 'var(--bs-border-secondary-shadow)',
79
- marginTop: '4px',
80
- marginBottom: 0
81
- });
82
- },
83
- menuList: provided => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
84
- padding: '8px'
85
- }),
43
+ const UserSelectStyle = exports.UserSelectStyle = {
86
44
  option: (provided, state) => {
87
- const isDisabled = state.isDisabled;
45
+ const isDisabled = state.isDisabled,
46
+ isFocused = state.isFocused;
88
47
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
89
- color: 'var(--bs-body-color)',
90
- borderRadius: '4px',
91
- minHeight: '32px',
92
- padding: '8px',
93
48
  cursor: isDisabled ? 'default' : 'pointer',
94
- backgroundColor: 'var(--bs-popover-bg)',
95
- overflow: 'hidden',
96
- whiteSpace: 'nowrap',
97
- textOverflow: 'ellipsis',
98
- ':hover': {
99
- backgroundColor: 'var(--bs-btn-background-hover)'
100
- },
101
- '.header-icon': HEADER_ICON_STYLE
49
+ backgroundColor: isFocused ? '#f5f5f5' : '#fff'
102
50
  });
103
51
  },
104
52
  control: controlCallback,
105
- menuPortal: base => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, base), {}, {
106
- zIndex: 9999,
107
- backgroundColor: 'var(--bs-popover-bg)',
108
- color: 'var(--bs-body-color)',
109
- borderColor: 'var(--bs-border-secondary-color)'
110
- }),
111
- singleValue: provided => {
53
+ indicatorSeparator: noneCallback,
54
+ dropdownIndicator: noneCallback,
55
+ clearIndicator: noneCallback,
56
+ multiValue: provided => {
112
57
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
113
- color: 'var(--bs-body-color)'
58
+ display: 'inline-flex',
59
+ alignItems: 'center',
60
+ background: '#eaeaea',
61
+ borderRadius: '10px',
62
+ margin: '0 10px 0 0',
63
+ padding: '0 0 0 2px'
114
64
  });
115
65
  },
116
- multiValue: provided => {
66
+ multiValueLabel: provided => {
117
67
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
118
- color: 'var(--bs-body-color)'
68
+ padding: '0px'
119
69
  });
120
70
  },
121
- multiValueRemove: styles => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, styles), {}, {
122
- '.dtable-font': {
123
- color: 'var(--bs-icon-color)'
124
- },
125
- '.dtable-font:hover': {
126
- backgroundColor: 'transparent',
127
- color: 'var(--bs-icon-color)'
128
- }
129
- }),
130
- input: styles => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, styles), {}, {
131
- color: 'var(--bs-body-color)'
132
- }),
133
- placeholder: (provided, state) => {
134
- const isDisabled = state.isDisabled;
71
+ multiValueRemove: provided => {
135
72
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
136
- color: 'var(--bs-bg-placeholder-color)',
137
- opacity: isDisabled ? 0.65 : 1
73
+ color: '#666',
74
+ ':hover': {
75
+ backgroundColor: 'transparent',
76
+ color: '#555555'
77
+ }
138
78
  });
139
79
  },
140
- indicatorSeparator: (styles, state) => {
141
- return {
142
- 'display': 'none'
143
- };
144
- },
145
- dropdownIndicator: (provided, state) => {
146
- const isDisabled = state.isDisabled;
80
+ singleValue: provided => {
147
81
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
148
- paddingRight: '12px',
149
- '.dtable-font': {
150
- color: 'var(--bs-icon-color) !important',
151
- opacity: isDisabled ? 0.65 : 1
152
- }
82
+ display: 'inline-flex',
83
+ alignItems: 'center',
84
+ background: '#eaeaea',
85
+ borderRadius: '10px',
86
+ margin: '0',
87
+ padding: '0 2px',
88
+ width: 'fit-content'
153
89
  });
154
90
  }
155
91
  };
92
+ const MenuSelectStyle = exports.MenuSelectStyle = {
93
+ option: (provided, state) => {
94
+ const isDisabled = state.isDisabled,
95
+ isFocused = state.isFocused;
96
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, provided), {}, {
97
+ fontSize: '13px',
98
+ color: '#212529',
99
+ cursor: isDisabled ? 'default' : 'pointer',
100
+ backgroundColor: isFocused ? '#f5f5f5' : '#fff',
101
+ ':active': {
102
+ backgroundColor: '#f5f5f5'
103
+ },
104
+ '.header-icon .dtable-font': {
105
+ color: '#aaa'
106
+ },
107
+ '.header-icon .multicolor-icon': {
108
+ color: '#aaa'
109
+ }
110
+ });
111
+ },
112
+ control: controlCallback,
113
+ menuPortal: base => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, base), {}, {
114
+ zIndex: 9999
115
+ }),
116
+ indicatorSeparator: noneCallback
117
+ };
156
118
  const DropdownIndicator = props => {
157
119
  return _reactSelect.components.DropdownIndicator && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.DropdownIndicator, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
158
120
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
159
121
  className: "dtable-font dtable-icon-down3",
160
122
  style: {
161
123
  fontSize: '12px',
162
- marginLeft: '-2px',
163
- color: 'var(--bs-icon-color)',
164
- paddingRight: 0
124
+ marginLeft: '-2px'
165
125
  }
166
126
  })
167
127
  }));
@@ -182,8 +142,7 @@ const ClearIndicator = _ref => {
182
142
  className: "dtable-font dtable-icon-fork-number",
183
143
  style: {
184
144
  fontSize: '12px',
185
- marginRight: '-2px',
186
- color: 'var(--bs-icon-color)'
145
+ marginRight: '-2px'
187
146
  }
188
147
  })
189
148
  }));
@@ -198,55 +157,9 @@ const MenuList = props => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
198
157
  });
199
158
  exports.MenuList = MenuList;
200
159
  const Option = props => {
201
- const isSelected = props.isSelected,
202
- label = props.label;
203
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.Option, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
204
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
205
- style: {
206
- display: 'flex',
207
- alignItems: 'center',
208
- justifyContent: 'space-between',
209
- width: '100%',
210
- whiteSpace: 'pre-line'
211
- },
212
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
213
- className: "seatable-option",
214
- children: label
215
- }), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
216
- className: "dtable-font dtable-icon-check",
217
- style: {
218
- fontSize: '14px',
219
- color: 'var(--bs-icon-color)',
220
- paddingLeft: '16px'
221
- }
222
- })]
223
- })
224
- }));
225
- };
226
- exports.Option = Option;
227
- const processOptionsWithClear = (options, isClearable) => {
228
- if (isClearable && options && options.length > 0) {
229
- return [{
230
- label: '--',
231
- value: '__clear__'
232
- }, ...options];
233
- }
234
- return options;
235
- };
236
- exports.processOptionsWithClear = processOptionsWithClear;
237
- const handleSelectChange = (selectedOption, actionMeta, onChangeCallback) => {
238
- if (selectedOption && selectedOption.value === '__clear__') {
239
- onChangeCallback(null, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, actionMeta), {}, {
240
- action: 'clear'
241
- }));
242
- } else {
243
- onChangeCallback(selectedOption, actionMeta);
244
- }
245
- };
246
- exports.handleSelectChange = handleSelectChange;
247
- const createHandleChange = onChange => {
248
- return (selectedOption, actionMeta) => {
249
- handleSelectChange(selectedOption, actionMeta, onChange);
250
- };
160
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
161
+ style: props.data.style,
162
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.Option, (0, _objectSpread2.default)({}, props))
163
+ });
251
164
  };
252
- exports.createHandleChange = createHandleChange;
165
+ exports.Option = Option;
@@ -63,7 +63,7 @@ function FieldDisplaySetting(_ref) {
63
63
  className: "mb-0",
64
64
  children: textProperties.titleValue
65
65
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
66
- className: "dtable-font dtable-icon-right expand-button ".concat(isCollapsed ? '' : 'revolving')
66
+ className: "seatable-icon-btn sm dtable-font dtable-icon-right expand-button ".concat(isCollapsed ? '' : 'revolving')
67
67
  })]
68
68
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.Transition, {
69
69
  nodeRef: nodeRef,