dtable-ui-component 6.0.110-oot.2 → 6.0.110-oot.20
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/DTableCustomizeSearchInput/index.css +83 -0
- package/lib/{DTableCustomizeSelect/select-option-group/search-input.js → DTableCustomizeSearchInput/index.js} +12 -6
- package/lib/DTableCustomizeSelect/index.css +20 -1
- package/lib/DTableCustomizeSelect/index.js +7 -2
- package/lib/DTableCustomizeSelect/select-option-group/index.css +12 -8
- package/lib/DTableCustomizeSelect/select-option-group/index.js +4 -3
- package/lib/DTableSelect/index.js +27 -19
- package/lib/DTableSelect/select-dropdown-indicator/index.js +4 -2
- package/lib/DTableSelect/user-select.css +4 -0
- package/lib/assets/icons/down.svg +3 -0
- package/lib/index.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
|
|
2
|
+
.seatable-search-input {
|
|
3
|
+
width: 100%;
|
|
4
|
+
padding: 6px 10px;
|
|
5
|
+
min-width: 170px;
|
|
6
|
+
position: relative;
|
|
7
|
+
padding: 0;
|
|
8
|
+
height: 32px;
|
|
9
|
+
border-bottom: 1px solid var(--bs-border-color);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.seatable-search-input .form-control {
|
|
13
|
+
height: 32px;
|
|
14
|
+
border: none;
|
|
15
|
+
padding: .375rem 1rem;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
border-bottom: 1px solid var(--bs-border-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.seatable-search-input-multiple .form-control:focus,
|
|
21
|
+
.seatable-search-input .form-control:focus {
|
|
22
|
+
outline: none;
|
|
23
|
+
box-shadow: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.seatable-search-input .input-icon-addon {
|
|
27
|
+
z-index: 1;
|
|
28
|
+
pointer-events: auto;
|
|
29
|
+
min-width: 2.5rem !important;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.seatable-search-input .input-icon-addon svg {
|
|
33
|
+
color: var(--bs-body-secondary-color);
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.seatable-search-input .none-search-result {
|
|
38
|
+
height: 100px;
|
|
39
|
+
width: 100%;
|
|
40
|
+
padding: 10px;
|
|
41
|
+
color: var(--bs-body-secondary-color);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
.seatable-search-input-multiple {
|
|
46
|
+
width: 100%;
|
|
47
|
+
padding: 6px 10px;
|
|
48
|
+
min-width: 170px;
|
|
49
|
+
position: relative;
|
|
50
|
+
padding: 0;
|
|
51
|
+
height: 40px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.seatable-search-input-multiple .form-control {
|
|
55
|
+
height: 30px;
|
|
56
|
+
padding: .375rem 2.5rem .375rem 1rem;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.seatable-search-input-multiple .input-icon-addon {
|
|
61
|
+
z-index: 1;
|
|
62
|
+
pointer-events: auto;
|
|
63
|
+
min-width: 2.5rem !important;
|
|
64
|
+
top: 10px;
|
|
65
|
+
height: 30px;
|
|
66
|
+
right: 10px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.seatable-search-input-multiple .input-icon-addon svg {
|
|
70
|
+
color: var(--bs-body-secondary-color);
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.seatable-search-input-multiple .none-search-result {
|
|
75
|
+
height: 100px;
|
|
76
|
+
width: 100%;
|
|
77
|
+
padding: 10px;
|
|
78
|
+
color: var(--bs-body-secondary-color);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.multiple-selects-editor-list .seatable-search-input-multiple {
|
|
82
|
+
padding: 10px 10px 0;
|
|
83
|
+
}
|
|
@@ -8,9 +8,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var _DTableIcon = _interopRequireDefault(require("
|
|
11
|
+
var _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
|
|
12
|
+
require("./index.css");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
class
|
|
14
|
+
class DTableCustomizeSearchInput extends _react.Component {
|
|
14
15
|
constructor(props) {
|
|
15
16
|
super(props);
|
|
16
17
|
this.onCompositionStart = () => {
|
|
@@ -66,9 +67,13 @@ class SearchInput extends _react.Component {
|
|
|
66
67
|
if (!isClearable || !searchValue) return null;
|
|
67
68
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
68
69
|
className: (0, _classnames.default)('search-text-clear input-icon-addon', clearClassName),
|
|
70
|
+
style: {
|
|
71
|
+
fontSize: '12px'
|
|
72
|
+
},
|
|
69
73
|
onClick: this.clearSearch,
|
|
70
74
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
|
|
71
|
-
symbol: "close"
|
|
75
|
+
symbol: "close",
|
|
76
|
+
color: "var(--bs-icon-secondary-color)"
|
|
72
77
|
})
|
|
73
78
|
});
|
|
74
79
|
};
|
|
@@ -106,12 +111,13 @@ class SearchInput extends _react.Component {
|
|
|
106
111
|
onKeyDown,
|
|
107
112
|
disabled = false,
|
|
108
113
|
style = {},
|
|
109
|
-
isClearable
|
|
114
|
+
isClearable,
|
|
115
|
+
isMultiple = false
|
|
110
116
|
} = this.props;
|
|
111
117
|
const {
|
|
112
118
|
searchValue
|
|
113
119
|
} = this.state;
|
|
114
|
-
const inputWidth = isClearable && searchValue ? 'calc(100% - 40px)' : '100%';
|
|
120
|
+
const inputWidth = isClearable && searchValue && !isMultiple ? 'calc(100% - 40px)' : '100%';
|
|
115
121
|
style.width = inputWidth;
|
|
116
122
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
117
123
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
@@ -132,4 +138,4 @@ class SearchInput extends _react.Component {
|
|
|
132
138
|
});
|
|
133
139
|
}
|
|
134
140
|
}
|
|
135
|
-
var _default = exports.default =
|
|
141
|
+
var _default = exports.default = DTableCustomizeSearchInput;
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
background: inherit;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
.seatable-check-color {
|
|
53
|
+
color: var(--bs-icon-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
52
56
|
.seatable-customize-select.dtable-ui-collaborator-selector .seatable-option-group .seatable-option-group-content,
|
|
53
57
|
.seatable-customize-select.selector-group .seatable-option-group .seatable-option-group-content {
|
|
54
58
|
padding: 10px;
|
|
@@ -79,10 +83,25 @@
|
|
|
79
83
|
border-radius: 3px;
|
|
80
84
|
}
|
|
81
85
|
|
|
82
|
-
|
|
83
86
|
.seatable-customize-select .select-placeholder {
|
|
84
87
|
line-height: 1;
|
|
85
88
|
font-size: 14px;
|
|
86
89
|
white-space: nowrap;
|
|
87
90
|
color: #868E96;
|
|
88
91
|
}
|
|
92
|
+
|
|
93
|
+
.seatable-customize-select .selected-option-show {
|
|
94
|
+
height: 20px;
|
|
95
|
+
line-height: 20px;
|
|
96
|
+
margin-right: 8px;
|
|
97
|
+
width: calc(100% - 20px);
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.seatable-customize-select .multiple-check-icon,
|
|
102
|
+
.seatable-customize-select .header-icon .dtable-font,
|
|
103
|
+
.seatable-option-group .select-label .header-icon .dtable-font {
|
|
104
|
+
color: var(--bs-icon-secondary-color) !important;
|
|
105
|
+
cursor: default;
|
|
106
|
+
font-size: 14px;
|
|
107
|
+
}
|
|
@@ -11,6 +11,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
var _selectOptionGroup = _interopRequireDefault(require("./select-option-group"));
|
|
12
12
|
var _ModalPortal = _interopRequireDefault(require("../ModalPortal"));
|
|
13
13
|
var _util = require("./util");
|
|
14
|
+
var _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
|
|
14
15
|
require("./index.css");
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
class DTableCustomizeSelect extends _react.Component {
|
|
@@ -115,8 +116,12 @@ class DTableCustomizeSelect extends _react.Component {
|
|
|
115
116
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
116
117
|
className: "select-placeholder",
|
|
117
118
|
children: placeholder
|
|
118
|
-
}), !isLocked && /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
119
|
-
className: "
|
|
119
|
+
}), !isLocked && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
120
|
+
className: "d-inline-flex align-items-center",
|
|
121
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
|
|
122
|
+
symbol: "down",
|
|
123
|
+
color: "var(--bs-icon-color)"
|
|
124
|
+
})
|
|
120
125
|
})]
|
|
121
126
|
}), this.state.isShowSelectOptions && !isInModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectOptionGroup.default, {
|
|
122
127
|
value: value,
|
|
@@ -23,10 +23,11 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.seatable-option-group .seatable-option-group-search .form-control {
|
|
26
|
-
height:
|
|
26
|
+
height: 32px;
|
|
27
27
|
border: none;
|
|
28
28
|
padding: .375rem 1rem;
|
|
29
29
|
cursor: pointer;
|
|
30
|
+
border-bottom: 1px solid var(--bs-border-color);
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
.seatable-option-group .seatable-option-group-search .form-control:focus {
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
align-items: center;
|
|
66
67
|
width: 100%;
|
|
67
68
|
line-height: 24px;
|
|
68
|
-
padding: 0.25rem
|
|
69
|
+
padding: 0.25rem 8px;
|
|
69
70
|
clear: both;
|
|
70
71
|
font-weight: 400;
|
|
71
72
|
text-align: inherit;
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
text-overflow: ellipsis;
|
|
76
77
|
white-space: nowrap;
|
|
77
78
|
border-radius: 4px;
|
|
79
|
+
height: 32px;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
.seatable-select-option.seatable-select-option-active {
|
|
@@ -96,18 +98,20 @@
|
|
|
96
98
|
color: #aaa;
|
|
97
99
|
} */
|
|
98
100
|
|
|
99
|
-
.seatable-select-option .select-option-name .single-select-option {
|
|
100
|
-
margin: 0 0 0 12px;
|
|
101
|
-
}
|
|
102
101
|
|
|
103
102
|
.seatable-select-option .select-option-name .multiple-select-option {
|
|
104
103
|
margin: 0;
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
.seatable-option-group .dtable-icon-check {
|
|
108
|
-
color:
|
|
107
|
+
color: var(--bs-icon-color);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.select-label {
|
|
111
|
+
width: 100%;
|
|
109
112
|
}
|
|
110
113
|
|
|
114
|
+
.seatable-option-group-selector-multiple-select .select-label,
|
|
111
115
|
.seatable-option-group-selector-single-select .select-option-name,
|
|
112
116
|
.seatable-option-group-selector-multiple-select .multiple-option-name {
|
|
113
117
|
display: flex;
|
|
@@ -119,11 +123,11 @@
|
|
|
119
123
|
display: inline-flex;
|
|
120
124
|
width: 20px;
|
|
121
125
|
text-align: center;
|
|
126
|
+
color: var(--bs-icon-color);
|
|
122
127
|
}
|
|
123
128
|
|
|
124
|
-
.seatable-option-group-selector-multiple-select .multiple-check-icon .dtable-icon-check
|
|
129
|
+
.seatable-option-group-selector-multiple-select .multiple-check-icon .dtable-icon-check {
|
|
125
130
|
font-size: 12px;
|
|
126
|
-
color: #798d99;
|
|
127
131
|
}
|
|
128
132
|
|
|
129
133
|
.seatable-option-group-selector-single-select .seatable-select-option:hover,
|
|
@@ -9,7 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _ClickOutside = _interopRequireDefault(require("../../ClickOutside"));
|
|
12
|
-
var
|
|
12
|
+
var _DTableCustomizeSearchInput = _interopRequireDefault(require("../../DTableCustomizeSearchInput"));
|
|
13
13
|
var _option = _interopRequireDefault(require("./option"));
|
|
14
14
|
var _KeyCodes = _interopRequireDefault(require("./KeyCodes"));
|
|
15
15
|
require("./index.css");
|
|
@@ -154,9 +154,10 @@ class SelectOptionGroup extends _react.Component {
|
|
|
154
154
|
supportMultipleSelect: this.props.supportMultipleSelect,
|
|
155
155
|
disableHover: this.state.disableHover,
|
|
156
156
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
157
|
+
className: "select-label",
|
|
157
158
|
children: opt.label
|
|
158
159
|
}), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
159
|
-
className: "dtable-font dtable-icon-check"
|
|
160
|
+
className: "dtable-font dtable-icon-check seatable-check-color"
|
|
160
161
|
})]
|
|
161
162
|
}, key);
|
|
162
163
|
});
|
|
@@ -232,7 +233,7 @@ class SelectOptionGroup extends _react.Component {
|
|
|
232
233
|
children: value.label || ''
|
|
233
234
|
}), searchable && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
234
235
|
className: "seatable-option-group-search",
|
|
235
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
236
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSearchInput.default, {
|
|
236
237
|
className: "option-search-control",
|
|
237
238
|
placeholder: searchPlaceholder,
|
|
238
239
|
onChange: this.onChangeSearch,
|
|
@@ -129,24 +129,7 @@ class DTableSelect extends _react.default.Component {
|
|
|
129
129
|
options.shift();
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
const optionsWithCheck = options.map(option => {
|
|
133
|
-
const isSelected = value && value.value === option.value;
|
|
134
|
-
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, option), {}, {
|
|
135
|
-
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
136
|
-
className: "d-flex align-items-center justify-content-between",
|
|
137
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
138
|
-
className: "select-option-label",
|
|
139
|
-
children: option.label
|
|
140
|
-
}), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
141
|
-
className: "dtable-font dtable-icon-check",
|
|
142
|
-
style: {
|
|
143
|
-
width: '12px',
|
|
144
|
-
height: '12px'
|
|
145
|
-
}
|
|
146
|
-
})]
|
|
147
|
-
})
|
|
148
|
-
});
|
|
149
|
-
});
|
|
132
|
+
const optionsWithCheck = options.map(option => (0, _objectSpread2.default)({}, option));
|
|
150
133
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.default, {
|
|
151
134
|
value: value,
|
|
152
135
|
isDisabled: isDisabled,
|
|
@@ -177,7 +160,32 @@ class DTableSelect extends _react.default.Component {
|
|
|
177
160
|
filterOption: customFilterOption,
|
|
178
161
|
autoFocus: autoFocus,
|
|
179
162
|
form: form,
|
|
180
|
-
|
|
163
|
+
formatOptionLabel: (option, _ref3) => {
|
|
164
|
+
let {
|
|
165
|
+
context
|
|
166
|
+
} = _ref3;
|
|
167
|
+
const isSelected = value && value.value === option.value;
|
|
168
|
+
if (context === 'menu') {
|
|
169
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
170
|
+
className: "d-flex align-items-center justify-content-between",
|
|
171
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
172
|
+
className: "select-option-label",
|
|
173
|
+
children: option.label
|
|
174
|
+
}), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
175
|
+
className: "dtable-font dtable-icon-check seatable-check-color",
|
|
176
|
+
style: {
|
|
177
|
+
width: '12px',
|
|
178
|
+
height: '12px'
|
|
179
|
+
}
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
// context === 'value'
|
|
184
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
185
|
+
className: "select-option-label",
|
|
186
|
+
children: option.label
|
|
187
|
+
});
|
|
188
|
+
}
|
|
181
189
|
});
|
|
182
190
|
}
|
|
183
191
|
}
|
|
@@ -6,14 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _DTableIcon = _interopRequireDefault(require("../../DTableIcon"));
|
|
9
10
|
require("./index.css");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
const SelectDropdownIndicator = () => {
|
|
12
13
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
13
14
|
className: "select-dropdown-indicator d-flex align-items-center",
|
|
14
15
|
"aria-hidden": "true",
|
|
15
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
16
|
-
|
|
16
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
|
|
17
|
+
symbol: "down",
|
|
18
|
+
color: "var(--bs-icon-color)"
|
|
17
19
|
})
|
|
18
20
|
});
|
|
19
21
|
};
|
package/lib/index.js
CHANGED
|
@@ -124,6 +124,12 @@ Object.defineProperty(exports, "DTableCustomizeCollaboratorSelect", {
|
|
|
124
124
|
return _DTableCustomizeCollaboratorSelect.default;
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
|
+
Object.defineProperty(exports, "DTableCustomizeSearchInput", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () {
|
|
130
|
+
return _DTableCustomizeSearchInput.default;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
127
133
|
Object.defineProperty(exports, "DTableCustomizeSelect", {
|
|
128
134
|
enumerable: true,
|
|
129
135
|
get: function () {
|
|
@@ -693,6 +699,7 @@ var _DTableSwitch = _interopRequireDefault(require("./DTableSwitch"));
|
|
|
693
699
|
var _DTableCustomizeSelect = _interopRequireDefault(require("./DTableCustomizeSelect"));
|
|
694
700
|
var _DTableCustomizeCollaboratorSelect = _interopRequireDefault(require("./DTableCustomizeCollaboratorSelect"));
|
|
695
701
|
var _DTableSearchInput = _interopRequireDefault(require("./DTableSearchInput"));
|
|
702
|
+
var _DTableCustomizeSearchInput = _interopRequireDefault(require("./DTableCustomizeSearchInput"));
|
|
696
703
|
var _DTableColorPicker = _interopRequireDefault(require("./DTableColorPicker"));
|
|
697
704
|
var _ModalPortal = _interopRequireDefault(require("./ModalPortal"));
|
|
698
705
|
var _RoleStatusEditor = _interopRequireDefault(require("./RoleStatusEditor"));
|