dtable-ui-component 4.3.4 → 4.3.6
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.
|
@@ -115,15 +115,6 @@
|
|
|
115
115
|
white-space: nowrap;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.dtable-select.selector-collaborator .option-group .option-group-content {
|
|
119
|
-
padding: 10px;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.dtable-select.selector-collaborator .option {
|
|
123
|
-
padding: 5px 0 5px 10px !important;
|
|
124
|
-
line-height: 20px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
118
|
.dtable-select .option.option-active {
|
|
128
119
|
background-color: #20a0ff;
|
|
129
120
|
color: #fff;
|
|
@@ -5,7 +5,7 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import SelectOptionGroup from '../SelectOptionGroup';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
|
-
import '
|
|
8
|
+
import './index.css';
|
|
9
9
|
var DTableCustomizeSelect = /*#__PURE__*/function (_Component) {
|
|
10
10
|
_inherits(DTableCustomizeSelect, _Component);
|
|
11
11
|
var _super = _createSuper(DTableCustomizeSelect);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.role-status-editor .dropdown-toggle-button .dtable-icon-drop-down {
|
|
2
|
+
font-size: 12px;
|
|
3
|
+
color: #b5b5b5;
|
|
4
|
+
transform: scale(0.8);
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.role-status-editor .dropdown-toggle-button .dtable-icon-drop-down.hide {
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.role-status-editor .dropdown-toggle-button .dtable-icon-drop-down:hover {
|
|
13
|
+
color: #555;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.role-status-editor .dropdown-toggle-button .dropdown-icon-container {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
flex: 1 0 auto;
|
|
20
|
+
width: 20px;
|
|
21
|
+
height: 20px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.role-status-editor .dropdown-menu {
|
|
25
|
+
max-width: 200px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.role-status-editor .dropdown-menu .dropdown-item {
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
align-items: center;
|
|
32
|
+
padding: 2px 12px;
|
|
33
|
+
min-width: 140px;
|
|
34
|
+
min-height: 28px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.role-status-editor .dropdown-menu .dropdown-item .label-container span {
|
|
38
|
+
word-wrap: normal;
|
|
39
|
+
white-space: pre-wrap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.role-status-editor .dropdown-menu .dropdown-item:hover {
|
|
43
|
+
color: #212529;
|
|
44
|
+
background: #f5f5f5;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.role-status-editor .dropdown-menu .dropdown-item:focus {
|
|
49
|
+
outline: 0;
|
|
50
|
+
color: unset;
|
|
51
|
+
background-color: unset;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.role-status-editor .dropdown-menu .dropdown-item .dtable-icon-check-mark {
|
|
55
|
+
font-size: 12px;
|
|
56
|
+
color: #798d99;
|
|
57
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import './index.css';
|
|
6
|
+
var RoleStatusEditor = function RoleStatusEditor(_ref) {
|
|
7
|
+
var isShowDropdownIcon = _ref.isShowDropdownIcon,
|
|
8
|
+
currentOption = _ref.currentOption,
|
|
9
|
+
menuOptions = _ref.menuOptions,
|
|
10
|
+
onChangeOption = _ref.onChangeOption,
|
|
11
|
+
closeShowDropdownIcon = _ref.closeShowDropdownIcon;
|
|
12
|
+
var _useState = useState(false),
|
|
13
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14
|
+
isOpen = _useState2[0],
|
|
15
|
+
setIsOpen = _useState2[1];
|
|
16
|
+
var handleClickMenuOption = function handleClickMenuOption(menuOption) {
|
|
17
|
+
var value = menuOption.value;
|
|
18
|
+
closeShowDropdownIcon && closeShowDropdownIcon();
|
|
19
|
+
if (value === currentOption.value) return;
|
|
20
|
+
onChangeOption(value);
|
|
21
|
+
};
|
|
22
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
23
|
+
isOpen: isOpen,
|
|
24
|
+
className: "role-status-editor",
|
|
25
|
+
toggle: function toggle() {
|
|
26
|
+
return setIsOpen(!isOpen);
|
|
27
|
+
}
|
|
28
|
+
}, /*#__PURE__*/React.createElement(DropdownToggle, {
|
|
29
|
+
className: "dropdown-toggle-button d-flex align-items-center",
|
|
30
|
+
tag: "div"
|
|
31
|
+
}, currentOption.label, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "dropdown-icon-container ml-1"
|
|
33
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
34
|
+
className: classnames('dtable-font dtable-icon-drop-down', {
|
|
35
|
+
'hide': !isShowDropdownIcon
|
|
36
|
+
})
|
|
37
|
+
}))), /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
38
|
+
positionFixed: true,
|
|
39
|
+
modifiers: {
|
|
40
|
+
preventOverflow: {
|
|
41
|
+
boundariesElement: document.body
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}, menuOptions.map(function (option) {
|
|
45
|
+
var value = option.value,
|
|
46
|
+
label = option.label;
|
|
47
|
+
return /*#__PURE__*/React.createElement(DropdownItem, {
|
|
48
|
+
key: "item-".concat(value),
|
|
49
|
+
onClick: function onClick() {
|
|
50
|
+
return handleClickMenuOption(option);
|
|
51
|
+
}
|
|
52
|
+
}, label, value === currentOption.value && /*#__PURE__*/React.createElement("i", {
|
|
53
|
+
className: "dtable-font dtable-icon-check-mark ml-2"
|
|
54
|
+
}));
|
|
55
|
+
})));
|
|
56
|
+
};
|
|
57
|
+
export default RoleStatusEditor;
|
package/lib/index.js
CHANGED
|
@@ -67,6 +67,7 @@ export { default as DTableCustomizeSelect } from './DTableCustomizeSelect';
|
|
|
67
67
|
export { default as DTableCustomizeCollaboratorSelect } from './DTableCustomizeCollaboratorSelect';
|
|
68
68
|
export { default as DTableSearchInput } from './DTableSearchInput';
|
|
69
69
|
export { default as ModalPortal } from './ModalPortal';
|
|
70
|
+
export { default as RoleStatusEditor } from './RoleStatusEditor';
|
|
70
71
|
|
|
71
72
|
// setting
|
|
72
73
|
export { default as FieldDisplaySetting } from './FieldDisplaySetting';
|