dtable-ui-component 4.3.3-alpha1 → 4.3.3-alpha3
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.
|
@@ -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
|
+
}
|
|
@@ -3,31 +3,38 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import './index.css';
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var RoleStatusEditor = function RoleStatusEditor(_ref) {
|
|
7
|
+
var isShowDropdownIcon = _ref.isShowDropdownIcon,
|
|
8
|
+
currentOption = _ref.currentOption,
|
|
8
9
|
menuOptions = _ref.menuOptions,
|
|
9
|
-
onChangeOption = _ref.onChangeOption
|
|
10
|
+
onChangeOption = _ref.onChangeOption,
|
|
11
|
+
closeShowDropdownIcon = _ref.closeShowDropdownIcon;
|
|
10
12
|
var _useState = useState(false),
|
|
11
13
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12
14
|
isOpen = _useState2[0],
|
|
13
15
|
setIsOpen = _useState2[1];
|
|
14
16
|
var handleClickMenuOption = function handleClickMenuOption(menuOption) {
|
|
15
17
|
var value = menuOption.value;
|
|
18
|
+
closeShowDropdownIcon && closeShowDropdownIcon();
|
|
16
19
|
if (value === currentOption.value) return;
|
|
17
20
|
onChangeOption(value);
|
|
18
21
|
};
|
|
19
22
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
20
23
|
isOpen: isOpen,
|
|
21
|
-
className: "role-status-
|
|
24
|
+
className: "role-status-editor",
|
|
22
25
|
toggle: function toggle() {
|
|
23
26
|
return setIsOpen(!isOpen);
|
|
24
27
|
}
|
|
25
28
|
}, /*#__PURE__*/React.createElement(DropdownToggle, {
|
|
26
29
|
className: "dropdown-toggle-button d-flex align-items-center",
|
|
27
30
|
tag: "div"
|
|
28
|
-
}, currentOption.label, /*#__PURE__*/React.createElement("
|
|
29
|
-
className: "
|
|
30
|
-
}
|
|
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, {
|
|
31
38
|
positionFixed: true,
|
|
32
39
|
modifiers: {
|
|
33
40
|
preventOverflow: {
|
|
@@ -35,20 +42,16 @@ var RoleStatusPermissionEditor = function RoleStatusPermissionEditor(_ref) {
|
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
44
|
}, menuOptions.map(function (option) {
|
|
38
|
-
var
|
|
39
|
-
menuOptionClassName = _option$menuOptionCla === void 0 ? '' : _option$menuOptionCla,
|
|
40
|
-
value = option.value,
|
|
45
|
+
var value = option.value,
|
|
41
46
|
label = option.label;
|
|
42
|
-
return /*#__PURE__*/React.createElement(
|
|
47
|
+
return /*#__PURE__*/React.createElement(DropdownItem, {
|
|
43
48
|
key: "item-".concat(value),
|
|
44
|
-
className: classnames('editor-item', menuOptionClassName)
|
|
45
|
-
}, /*#__PURE__*/React.createElement(DropdownItem, {
|
|
46
49
|
onClick: function onClick() {
|
|
47
50
|
return handleClickMenuOption(option);
|
|
48
51
|
}
|
|
49
52
|
}, label, value === currentOption.value && /*#__PURE__*/React.createElement("i", {
|
|
50
|
-
className: "dtable-font dtable-icon-check-mark"
|
|
51
|
-
}))
|
|
53
|
+
className: "dtable-font dtable-icon-check-mark ml-2"
|
|
54
|
+
}));
|
|
52
55
|
})));
|
|
53
56
|
};
|
|
54
|
-
export default
|
|
57
|
+
export default RoleStatusEditor;
|
package/lib/index.js
CHANGED
|
@@ -67,7 +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
|
|
70
|
+
export { default as RoleStatusEditor } from './RoleStatusEditor';
|
|
71
71
|
|
|
72
72
|
// setting
|
|
73
73
|
export { default as FieldDisplaySetting } from './FieldDisplaySetting';
|
package/package.json
CHANGED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
.role-status-permission-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-permission-editor .dropdown-toggle-button .dtable-icon-drop-down:hover {
|
|
9
|
-
color: #555;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.role-status-permission-editor .dropdown-menu {
|
|
13
|
-
max-width: 200px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.role-status-permission-editor .dropdown-menu .dropdown-item {
|
|
17
|
-
display: flex;
|
|
18
|
-
justify-content: space-between;
|
|
19
|
-
align-items: center;
|
|
20
|
-
padding: 2px 12px;
|
|
21
|
-
min-width: 140px;
|
|
22
|
-
min-height: 28px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.role-status-permission-editor .dropdown-menu .dropdown-item:hover {
|
|
26
|
-
color: #212529;
|
|
27
|
-
background: #f5f5f5;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.role-status-permission-editor .dropdown-menu .dropdown-item:focus {
|
|
32
|
-
outline: 0;
|
|
33
|
-
color: unset;
|
|
34
|
-
background-color: unset;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.role-status-permission-editor .dropdown-toggle-button div,
|
|
38
|
-
.role-status-permission-editor .dropdown-menu .dropdown-item div {
|
|
39
|
-
white-space: pre-wrap;
|
|
40
|
-
word-wrap: break-word;
|
|
41
|
-
word-break: break-all;
|
|
42
|
-
user-select: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.role-status-permission-editor .dropdown-menu .dropdown-item .dtable-icon-check-mark {
|
|
46
|
-
font-size: 12px;
|
|
47
|
-
color: #798d99;
|
|
48
|
-
}
|