dtable-ui-component 4.3.3-alpha2 → 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,23 +3,25 @@ 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 RoleStatusPermissionEditor = function RoleStatusPermissionEditor(_ref) {
6
+ var RoleStatusEditor = function RoleStatusEditor(_ref) {
7
7
  var isShowDropdownIcon = _ref.isShowDropdownIcon,
8
8
  currentOption = _ref.currentOption,
9
9
  menuOptions = _ref.menuOptions,
10
- onChangeOption = _ref.onChangeOption;
10
+ onChangeOption = _ref.onChangeOption,
11
+ closeShowDropdownIcon = _ref.closeShowDropdownIcon;
11
12
  var _useState = useState(false),
12
13
  _useState2 = _slicedToArray(_useState, 2),
13
14
  isOpen = _useState2[0],
14
15
  setIsOpen = _useState2[1];
15
16
  var handleClickMenuOption = function handleClickMenuOption(menuOption) {
16
17
  var value = menuOption.value;
18
+ closeShowDropdownIcon && closeShowDropdownIcon();
17
19
  if (value === currentOption.value) return;
18
20
  onChangeOption(value);
19
21
  };
20
22
  return /*#__PURE__*/React.createElement(Dropdown, {
21
23
  isOpen: isOpen,
22
- className: "role-status-permission-editor",
24
+ className: "role-status-editor",
23
25
  toggle: function toggle() {
24
26
  return setIsOpen(!isOpen);
25
27
  }
@@ -27,7 +29,7 @@ var RoleStatusPermissionEditor = function RoleStatusPermissionEditor(_ref) {
27
29
  className: "dropdown-toggle-button d-flex align-items-center",
28
30
  tag: "div"
29
31
  }, currentOption.label, /*#__PURE__*/React.createElement("div", {
30
- className: "dropdown-icon-container ml-2"
32
+ className: "dropdown-icon-container ml-1"
31
33
  }, /*#__PURE__*/React.createElement("span", {
32
34
  className: classnames('dtable-font dtable-icon-drop-down', {
33
35
  'hide': !isShowDropdownIcon
@@ -40,20 +42,16 @@ var RoleStatusPermissionEditor = function RoleStatusPermissionEditor(_ref) {
40
42
  }
41
43
  }
42
44
  }, menuOptions.map(function (option) {
43
- var _option$menuOptionCla = option.menuOptionClassName,
44
- menuOptionClassName = _option$menuOptionCla === void 0 ? '' : _option$menuOptionCla,
45
- value = option.value,
45
+ var value = option.value,
46
46
  label = option.label;
47
- return /*#__PURE__*/React.createElement("div", {
47
+ return /*#__PURE__*/React.createElement(DropdownItem, {
48
48
  key: "item-".concat(value),
49
- className: classnames('editor-item', menuOptionClassName)
50
- }, /*#__PURE__*/React.createElement(DropdownItem, {
51
49
  onClick: function onClick() {
52
50
  return handleClickMenuOption(option);
53
51
  }
54
52
  }, label, value === currentOption.value && /*#__PURE__*/React.createElement("i", {
55
53
  className: "dtable-font dtable-icon-check-mark ml-2"
56
- })));
54
+ }));
57
55
  })));
58
56
  };
59
- export default RoleStatusPermissionEditor;
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 RoleStatusPermissionEditor } from './RoleStatusPermissionEditor';
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,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "4.3.3-alpha2",
3
+ "version": "4.3.3-alpha3",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "2.0.5",
@@ -1,57 +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.hide{
9
- display: none;
10
- }
11
-
12
- .role-status-permission-editor .dropdown-toggle-button .dtable-icon-drop-down:hover {
13
- color: #555;
14
- }
15
-
16
- .role-status-permission-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-permission-editor .dropdown-menu {
25
- max-width: 200px;
26
- }
27
-
28
- .role-status-permission-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-permission-editor .dropdown-menu .dropdown-item .label-container span {
38
- word-wrap: normal;
39
- white-space: pre-wrap;
40
- }
41
-
42
- .role-status-permission-editor .dropdown-menu .dropdown-item:hover {
43
- color: #212529;
44
- background: #f5f5f5;
45
- cursor: pointer;
46
- }
47
-
48
- .role-status-permission-editor .dropdown-menu .dropdown-item:focus {
49
- outline: 0;
50
- color: unset;
51
- background-color: unset;
52
- }
53
-
54
- .role-status-permission-editor .dropdown-menu .dropdown-item .dtable-icon-check-mark {
55
- font-size: 12px;
56
- color: #798d99;
57
- }