dtable-ui-component 4.3.0 → 4.3.1-alpha1

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.
@@ -56,7 +56,6 @@
56
56
  padding: 10px 10px 10px 16px;
57
57
  font-size: 13px;
58
58
  background-color: #fff;
59
- color: #202428;
60
59
  }
61
60
 
62
61
  .dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item {
@@ -92,7 +92,7 @@
92
92
  }
93
93
 
94
94
  .dtable-customize-collaborator-select.dtable-select .option.option-active .select-option-name {
95
- color: #202428;
95
+ color: #212529;
96
96
  }
97
97
 
98
98
  .collaborator-select .option-group-content .collaborator,
@@ -2,19 +2,22 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
6
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
7
+ var _excluded = ["innerProps"];
6
8
  import React from 'react';
7
9
  import Select, { components } from 'react-select';
8
10
  var MenuSelectStyle = {
9
11
  option: function option(provided, state) {
10
12
  var isDisabled = state.isDisabled,
11
- isSelected = state.isSelected,
12
13
  isFocused = state.isFocused;
13
14
  return _objectSpread(_objectSpread({}, provided), {}, {
15
+ fontSize: '13px',
16
+ color: '#212529',
14
17
  cursor: isDisabled ? 'default' : 'pointer',
15
- backgroundColor: isSelected ? '#20a0ff' : isFocused ? '#f5f5f5' : '#fff',
18
+ backgroundColor: isFocused ? '#f5f5f5' : '#fff',
16
19
  '.header-icon .dtable-font': {
17
- color: isSelected ? '#fff' : '#aaa'
20
+ color: '#aaa'
18
21
  }
19
22
  });
20
23
  },
@@ -40,6 +43,18 @@ var DropdownIndicator = function DropdownIndicator(props) {
40
43
  }
41
44
  }));
42
45
  };
46
+ var ClearIndicator = function ClearIndicator(_ref) {
47
+ var innerProps = _ref.innerProps,
48
+ props = _objectWithoutProperties(_ref, _excluded);
49
+ var onMouseDown = function onMouseDown(e) {
50
+ e.nativeEvent.stopImmediatePropagation();
51
+ innerProps.onMouseDown(e);
52
+ };
53
+ props.innerProps = _objectSpread(_objectSpread({}, innerProps), {}, {
54
+ onMouseDown: onMouseDown
55
+ });
56
+ return /*#__PURE__*/React.createElement(components.ClearIndicator, props);
57
+ };
43
58
  var MenuList = function MenuList(props) {
44
59
  return /*#__PURE__*/React.createElement("div", {
45
60
  onClick: function onClick(e) {
@@ -85,7 +100,11 @@ var DtableSelect = /*#__PURE__*/function (_React$Component) {
85
100
  isClearable = _this$props.isClearable,
86
101
  noOptionsMessage = _this$props.noOptionsMessage,
87
102
  classNamePrefix = _this$props.classNamePrefix,
88
- style = _this$props.style;
103
+ style = _this$props.style,
104
+ innerRef = _this$props.innerRef,
105
+ isDisabled = _this$props.isDisabled,
106
+ form = _this$props.form,
107
+ customFilterOption = _this$props.customFilterOption;
89
108
  return /*#__PURE__*/React.createElement(Select, {
90
109
  value: value,
91
110
  onChange: onChange,
@@ -96,7 +115,8 @@ var DtableSelect = /*#__PURE__*/function (_React$Component) {
96
115
  components: {
97
116
  Option: Option,
98
117
  DropdownIndicator: DropdownIndicator,
99
- MenuList: MenuList
118
+ MenuList: MenuList,
119
+ ClearIndicator: ClearIndicator
100
120
  },
101
121
  placeholder: placeholder,
102
122
  isSearchable: isSearchable,
@@ -106,7 +126,12 @@ var DtableSelect = /*#__PURE__*/function (_React$Component) {
106
126
  menuShouldScrollIntoView: true,
107
127
  menuPortalTarget: this.getMenuPortalTarget(),
108
128
  captureMenuScroll: false,
109
- noOptionsMessage: noOptionsMessage
129
+ hideSelectedOptions: false,
130
+ noOptionsMessage: noOptionsMessage,
131
+ isDisabled: isDisabled,
132
+ ref: innerRef,
133
+ filterOption: customFilterOption,
134
+ form: form
110
135
  });
111
136
  }
112
137
  }]);
@@ -115,6 +140,7 @@ var DtableSelect = /*#__PURE__*/function (_React$Component) {
115
140
  DtableSelect.defaultProps = {
116
141
  options: [],
117
142
  value: {},
143
+ isDisabled: false,
118
144
  isSearchable: false,
119
145
  isClearable: false,
120
146
  placeholder: '',
@@ -55,7 +55,7 @@
55
55
  height: 50px;
56
56
  padding: 10px 10px 10px 16px;
57
57
  font-size: 13px;
58
- color: #202428;
58
+ color: #212529;
59
59
  background-color: #fff;
60
60
  }
61
61
 
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  .dtable-select .select-option-name {
40
- color: #202428;
40
+ color: #212529;
41
41
  }
42
42
 
43
43
  .dtable-select .dtable-icon-drop-down {
@@ -33,7 +33,6 @@
33
33
  font-size: 18px;
34
34
  text-align: center;
35
35
  text-overflow: ellipsis;
36
- color: #333;
37
36
  overflow: hidden;
38
37
  white-space: nowrap;
39
38
  }
@@ -534,15 +534,15 @@ var DTABLE_VALUE = {
534
534
  }, {
535
535
  'name': 'Start',
536
536
  'color': '#D7E8FF',
537
- 'text_color': '#202428',
537
+ 'text_color': '#212529',
538
538
  'id': '968592',
539
- 'textColor': '#202428'
539
+ 'textColor': '#212529'
540
540
  }, {
541
541
  'name': 'Finished',
542
542
  'color': '#DDFFE6',
543
- 'text_color': '#202428',
543
+ 'text_color': '#212529',
544
544
  'id': '523201',
545
- 'textColor': '#202428'
545
+ 'textColor': '#212529'
546
546
  }, {
547
547
  'name': 'Node 1',
548
548
  'color': '#FBD44A',
@@ -77,7 +77,7 @@
77
77
  padding: 10px 10px 10px 16px;
78
78
  font-size: 13px;
79
79
  background-color: #fff;
80
- color: #202428;
80
+ color: #212529;
81
81
  }
82
82
 
83
83
  .dtable-ui-mb-select-editor-body .mb-select-options-container .mb-select-option-item + .mb-select-option-item {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "4.3.0",
3
+ "version": "4.3.1-alpha1",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "2.0.5",