dtable-ui-component 0.3.29 → 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.
- package/lib/CollaboratorEditor/mb-collaborator-editor-popover/index.css +0 -1
- package/lib/DTableCustomizeCollaboratorSelect/index.css +1 -1
- package/lib/DTableSelect/index.js +32 -6
- package/lib/LinkEditor/mb-link-editor-popover/index.css +1 -1
- package/lib/assets/css/DTableCustomSelect.css +1 -1
- package/lib/css/mb-cell-editor.css +0 -1
- package/lib/data/dtable-value.js +4 -4
- package/lib/select-editor/mb-select-editor-popover/index.css +1 -1
- package/package.json +1 -1
|
@@ -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:
|
|
18
|
+
backgroundColor: isFocused ? '#f5f5f5' : '#fff',
|
|
16
19
|
'.header-icon .dtable-font': {
|
|
17
|
-
color:
|
|
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
|
-
|
|
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: '',
|
package/lib/data/dtable-value.js
CHANGED
|
@@ -534,15 +534,15 @@ var DTABLE_VALUE = {
|
|
|
534
534
|
}, {
|
|
535
535
|
'name': 'Start',
|
|
536
536
|
'color': '#D7E8FF',
|
|
537
|
-
'text_color': '#
|
|
537
|
+
'text_color': '#212529',
|
|
538
538
|
'id': '968592',
|
|
539
|
-
'textColor': '#
|
|
539
|
+
'textColor': '#212529'
|
|
540
540
|
}, {
|
|
541
541
|
'name': 'Finished',
|
|
542
542
|
'color': '#DDFFE6',
|
|
543
|
-
'text_color': '#
|
|
543
|
+
'text_color': '#212529',
|
|
544
544
|
'id': '523201',
|
|
545
|
-
'textColor': '#
|
|
545
|
+
'textColor': '#212529'
|
|
546
546
|
}, {
|
|
547
547
|
'name': 'Node 1',
|
|
548
548
|
'color': '#FBD44A',
|