dtable-ui-component 7.0.1-beta.select1 → 7.0.1
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/AsyncUserSelect/index.css +28 -38
- package/lib/AsyncUserSelect/index.js +18 -29
- package/lib/DTableCustomizeCollaboratorSelect/index.css +86 -0
- package/lib/DTableCustomizeCollaboratorSelect/index.js +158 -0
- package/lib/DTableCustomizeSelect/index.css +42 -120
- package/lib/DTableCustomizeSelect/index.js +6 -12
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +19 -7
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -5
- package/lib/DTableFiltersPopover/widgets/filter-item.js +7 -15
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +3 -3
- package/lib/DTableGroupSelect/index.css +96 -0
- package/lib/DTableGroupSelect/index.js +131 -0
- package/lib/DTableGroupSelect/option.js +42 -0
- package/lib/DTableGroupSelect/select-option-group.css +54 -0
- package/lib/DTableGroupSelect/select-option-group.js +227 -0
- package/lib/DTableSelect/dtable-select-label.css +3 -8
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSelect/index.js +3 -3
- package/lib/DTableSelect/user-select.css +46 -7
- package/lib/DTableSelect/utils.js +79 -170
- package/lib/ImageEditor/images-previewer/image-preview/index.js +2 -1
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +2 -2
- package/lib/ImageFormatter/images-lazy-load.js +2 -2
- package/lib/ImageFormatter/index.js +5 -2
- package/lib/ImagePreviewerLightbox/index.js +2 -1
- package/lib/ImageThumbnail/index.js +2 -1
- package/lib/SelectOptionGroup/KeyCodes.js +4 -96
- package/lib/SelectOptionGroup/index.css +54 -44
- package/lib/SelectOptionGroup/index.js +18 -35
- package/lib/SelectOptionGroup/option.js +4 -16
- package/lib/index.js +10 -3
- package/lib/utils/url.js +10 -35
- package/package.json +2 -2
- package/lib/DTableCustomizeSearchInput/index.css +0 -75
- package/lib/DTableCustomizeSearchInput/index.js +0 -133
- package/lib/DTableSelect/select-dropdown-indicator/index.css +0 -16
- package/lib/DTableSelect/select-dropdown-indicator/index.js +0 -24
- package/lib/assets/icons/close.svg +0 -1
- package/lib/assets/icons/down.svg +0 -3
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
.seatable-search-input {
|
|
2
|
-
width: 100%;
|
|
3
|
-
padding: 6px 10px;
|
|
4
|
-
min-width: 170px;
|
|
5
|
-
position: relative;
|
|
6
|
-
padding: 0;
|
|
7
|
-
height: 32px;
|
|
8
|
-
border-bottom: 1px solid var(--bs-border-secondary-color);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.seatable-select-search {
|
|
12
|
-
border-bottom: 1px solid var(--bs-border-secondary-color);
|
|
13
|
-
height: 32px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.select-search-control {
|
|
17
|
-
height: 100%;
|
|
18
|
-
border: none;
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
display: block;
|
|
21
|
-
background-color: var(--bs-popover-bg);
|
|
22
|
-
font-weight: 400;
|
|
23
|
-
font-size: .875rem;
|
|
24
|
-
line-height: 1.6;
|
|
25
|
-
width: 100%;
|
|
26
|
-
padding: .375rem 1rem;
|
|
27
|
-
border-top-left-radius: 4px;
|
|
28
|
-
border-top-right-radius: 4px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.select-search-control:focus {
|
|
32
|
-
outline: none;
|
|
33
|
-
box-shadow: none;
|
|
34
|
-
border: none;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
height: 100%;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.clear-icon-x {
|
|
40
|
-
position: absolute;
|
|
41
|
-
display: flex;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
align-items: center;
|
|
44
|
-
min-width: 20px;
|
|
45
|
-
pointer-events: auto;
|
|
46
|
-
color: var(--bs-icon-color);
|
|
47
|
-
right: 13px;
|
|
48
|
-
top: 6px;
|
|
49
|
-
z-index: 1;
|
|
50
|
-
height: 20px;
|
|
51
|
-
width: 20px;
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
border-radius: 3px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.clear-icon-x .multicolor-icon {
|
|
57
|
-
font-size: 12px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.clear-icon-x:hover {
|
|
61
|
-
background-color: var(--bs-btn-background-hover);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.seatable-search-input .none-search-result {
|
|
65
|
-
height: 100px;
|
|
66
|
-
width: 100%;
|
|
67
|
-
padding: 10px;
|
|
68
|
-
color: var(--bs-icon-color);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.dtable-ui-user-select-popover .select-search-control,
|
|
72
|
-
.dtable-popover .select-search-control {
|
|
73
|
-
border-top-left-radius: 8px;
|
|
74
|
-
border-top-right-radius: 8px;
|
|
75
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
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 _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
|
|
12
|
-
require("./index.css");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
class DTableCustomizeSearchInput extends _react.Component {
|
|
15
|
-
constructor(props) {
|
|
16
|
-
super(props);
|
|
17
|
-
this.onCompositionStart = () => {
|
|
18
|
-
this.isInputtingChinese = true;
|
|
19
|
-
};
|
|
20
|
-
this.onChange = e => {
|
|
21
|
-
this.timer && clearTimeout(this.timer);
|
|
22
|
-
const _this$props = this.props,
|
|
23
|
-
onChange = _this$props.onChange,
|
|
24
|
-
_this$props$wait = _this$props.wait,
|
|
25
|
-
wait = _this$props$wait === void 0 ? 100 : _this$props$wait;
|
|
26
|
-
let text = e.target.value;
|
|
27
|
-
this.setState({
|
|
28
|
-
searchValue: text || ''
|
|
29
|
-
}, () => {
|
|
30
|
-
if (this.isInputtingChinese) return;
|
|
31
|
-
this.timer = setTimeout(() => {
|
|
32
|
-
onChange && onChange(this.state.searchValue.trim());
|
|
33
|
-
}, wait);
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
this.onCompositionEnd = e => {
|
|
37
|
-
this.isInputtingChinese = false;
|
|
38
|
-
this.onChange(e);
|
|
39
|
-
};
|
|
40
|
-
this.clearSearch = e => {
|
|
41
|
-
e && e.stopPropagation && e.stopPropagation();
|
|
42
|
-
const clearValue = this.props.clearValue;
|
|
43
|
-
this.setState({
|
|
44
|
-
searchValue: ''
|
|
45
|
-
}, () => {
|
|
46
|
-
clearValue && clearValue();
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
this.setFocus = isSelectAllText => {
|
|
50
|
-
if (this.inputRef === document.activeElement) return;
|
|
51
|
-
this.inputRef.focus();
|
|
52
|
-
if (isSelectAllText) {
|
|
53
|
-
const txtLength = this.state.searchValue.length;
|
|
54
|
-
this.inputRef.setSelectionRange(0, txtLength);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
this.renderClear = () => {
|
|
58
|
-
const _this$props2 = this.props,
|
|
59
|
-
isClearable = _this$props2.isClearable,
|
|
60
|
-
clearClassName = _this$props2.clearClassName;
|
|
61
|
-
const searchValue = this.state.searchValue;
|
|
62
|
-
if (!isClearable || !searchValue) return null;
|
|
63
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
64
|
-
className: (0, _classnames.default)('clear-icon-x', clearClassName),
|
|
65
|
-
onClick: this.clearSearch,
|
|
66
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
|
|
67
|
-
symbol: "close",
|
|
68
|
-
color: "var(--bs-icon-secondary-color)"
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
this.state = {
|
|
73
|
-
searchValue: props.value || ''
|
|
74
|
-
};
|
|
75
|
-
this.isInputtingChinese = false;
|
|
76
|
-
this.timer = null;
|
|
77
|
-
this.inputRef = null;
|
|
78
|
-
}
|
|
79
|
-
componentDidMount() {
|
|
80
|
-
if (this.props.autoFocus && this.inputRef && this.inputRef !== document.activeElement) {
|
|
81
|
-
setTimeout(() => {
|
|
82
|
-
this.inputRef.focus();
|
|
83
|
-
}, 0);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
87
|
-
if (nextProps.value !== this.props.value) {
|
|
88
|
-
this.setState({
|
|
89
|
-
searchValue: nextProps.value
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
componentWillUnmount() {
|
|
94
|
-
this.timer && clearTimeout(this.timer);
|
|
95
|
-
this.timer = null;
|
|
96
|
-
this.inputRef = null;
|
|
97
|
-
}
|
|
98
|
-
render() {
|
|
99
|
-
const _this$props3 = this.props,
|
|
100
|
-
placeholder = _this$props3.placeholder,
|
|
101
|
-
autoFocus = _this$props3.autoFocus,
|
|
102
|
-
className = _this$props3.className,
|
|
103
|
-
onKeyDown = _this$props3.onKeyDown,
|
|
104
|
-
_this$props3$disabled = _this$props3.disabled,
|
|
105
|
-
disabled = _this$props3$disabled === void 0 ? false : _this$props3$disabled,
|
|
106
|
-
_this$props3$style = _this$props3.style,
|
|
107
|
-
style = _this$props3$style === void 0 ? {} : _this$props3$style,
|
|
108
|
-
isClearable = _this$props3.isClearable,
|
|
109
|
-
_this$props3$isMultip = _this$props3.isMultiple,
|
|
110
|
-
isMultiple = _this$props3$isMultip === void 0 ? false : _this$props3$isMultip;
|
|
111
|
-
const searchValue = this.state.searchValue;
|
|
112
|
-
const inputWidth = isClearable && searchValue && !isMultiple ? 'calc(100% - 40px)' : '100%';
|
|
113
|
-
style.width = inputWidth;
|
|
114
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
115
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
116
|
-
type: "text",
|
|
117
|
-
name: "search-input",
|
|
118
|
-
value: searchValue,
|
|
119
|
-
className: (0, _classnames.default)('select-search-control', className),
|
|
120
|
-
onChange: this.onChange,
|
|
121
|
-
autoFocus: autoFocus,
|
|
122
|
-
placeholder: placeholder,
|
|
123
|
-
onCompositionStart: this.onCompositionStart,
|
|
124
|
-
onCompositionEnd: this.onCompositionEnd,
|
|
125
|
-
onKeyDown: onKeyDown,
|
|
126
|
-
disabled: disabled,
|
|
127
|
-
style: style,
|
|
128
|
-
ref: ref => this.inputRef = ref
|
|
129
|
-
}), this.renderClear()]
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
var _default = exports.default = DTableCustomizeSearchInput;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
.select-dropdown-indicator {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 50%;
|
|
4
|
-
right: 18px;
|
|
5
|
-
transform: translateY(-50%);
|
|
6
|
-
margin-left: -2px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.select-dropdown-indicator svg {
|
|
10
|
-
width: 12px;
|
|
11
|
-
height: 12px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.dis-multicolor-icon-down {
|
|
15
|
-
opacity: 0.65 !important;
|
|
16
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _DTableIcon = _interopRequireDefault(require("../../DTableIcon"));
|
|
10
|
-
require("./index.css");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
const SelectDropdownIndicator = _ref => {
|
|
13
|
-
let isDisabled = _ref.isDisabled;
|
|
14
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
15
|
-
className: "select-dropdown-indicator d-flex align-items-center",
|
|
16
|
-
"aria-hidden": "true",
|
|
17
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
|
|
18
|
-
symbol: "down",
|
|
19
|
-
color: "var(--bs-icon-color)",
|
|
20
|
-
className: isDisabled ? 'dis-multicolor-icon-down' : ''
|
|
21
|
-
})
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
var _default = exports.default = SelectDropdownIndicator;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718937171668" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18368" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M489.6 444.8l294.4-294.4 67.2 67.2-294.4 294.4 294.4 294.4-67.2 67.2-294.4-294.4-272 272-67.2-67.2 272-272-272-272 67.2-67.2z" p-id="18369" fill="currentColor"></path></svg>
|