dtable-ui-component 6.0.126 → 7.0.0-xia.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/ActionSheet/index.js +16 -14
- package/lib/ActivityIndicator/index.js +8 -7
- package/lib/AsyncUserSelect/index.js +19 -40
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +11 -9
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +3 -1
- package/lib/CheckboxEditor/mb-editor.js +20 -9
- package/lib/CheckboxEditor/pc-editor.js +24 -12
- package/lib/CheckboxFormatter/index.js +5 -4
- package/lib/CollaboratorEditor/index.js +4 -2
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +34 -25
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +7 -9
- package/lib/Comment/body/comment.js +18 -10
- package/lib/Comment/body/index.js +4 -2
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +20 -9
- package/lib/Comment/footer/input/index.js +50 -29
- package/lib/Comment/footer/input/participant/index.js +5 -4
- package/lib/Comment/footer/participants/index.js +5 -4
- package/lib/Comment/footer/participants/participant/index.js +3 -1
- package/lib/Comment/footer/participants/participant-select/index.js +24 -8
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +21 -15
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +18 -22
- package/lib/DTableColorPicker/index.js +40 -55
- package/lib/DTableColorPicker/utils.js +6 -4
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +8 -6
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeCollaboratorSelect/index.js +20 -17
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +18 -16
- package/lib/DTableDropdownMenu/index.js +10 -8
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +50 -34
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +113 -63
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
- package/lib/DTableFiltersPopover/widgets/filter-group.js +56 -35
- package/lib/DTableFiltersPopover/widgets/filter-item.js +171 -108
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
- package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
- package/lib/DTableGroupSelect/index.js +15 -11
- package/lib/DTableGroupSelect/select-option-group.js +32 -23
- package/lib/DTableIcon/index.js +7 -6
- package/lib/DTableIcon/svg-icon.js +7 -5
- package/lib/DTableModalHeader/index.css +3 -20
- package/lib/DTableModalHeader/index.js +3 -1
- package/lib/DTablePopover/index.js +15 -11
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +17 -8
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +5 -6
- package/lib/DTableSelect/index.js +22 -21
- package/lib/DTableSelect/utils.js +15 -7
- package/lib/DTableSubDropdownMenu/index.js +10 -8
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +8 -7
- package/lib/DateEditor/index.js +15 -20
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +45 -26
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +3 -1
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
- package/lib/DepartmentSelectFilter/index.js +8 -6
- package/lib/DepartmentSingleSelectEditor/index.js +3 -1
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +3 -1
- package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
- package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
- package/lib/DigitalSignEditor/service.js +4 -2
- package/lib/DigitalSignEditor/signature-board/index.js +8 -5
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +5 -4
- package/lib/DurationEditor/index.js +31 -21
- package/lib/DurationFormatter/index.js +5 -4
- package/lib/EditEditorButton/index.js +3 -1
- package/lib/EmailFormatter/index.js +4 -3
- package/lib/FieldDisplaySetting/field-item.js +12 -12
- package/lib/FieldDisplaySetting/index.js +10 -12
- package/lib/FileEditor/files-previewer/index.js +3 -1
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +21 -14
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +3 -1
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
- package/lib/FileEditor/pc-editor/index.js +27 -19
- package/lib/FileFormatter/index.js +19 -26
- package/lib/FileItemFormatter/index.js +9 -6
- package/lib/FileUploader/index.js +45 -28
- package/lib/FormulaFormatter/index.js +29 -15
- package/lib/GeolocationEditor/index.js +12 -11
- package/lib/GeolocationEditor/map-editor-utils.js +15 -17
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +6 -4
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
- package/lib/GeolocationEditor/pc-editor/country-editor.js +23 -10
- package/lib/GeolocationEditor/pc-editor/index.js +20 -12
- package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
- package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +12 -4
- package/lib/Icon/index.js +5 -3
- package/lib/IconButton/index.js +6 -4
- package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +3 -1
- package/lib/ImageEditor/mb-editor/index.js +20 -28
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +3 -1
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +13 -11
- package/lib/ImagePreviewerLightbox/index.js +13 -15
- package/lib/ImageThumbnail/index.js +13 -10
- package/lib/InputItem/custom-input.js +46 -26
- package/lib/InputItem/custom-keyboard.js +18 -15
- package/lib/InputItem/index.js +50 -34
- package/lib/InputItem/input.js +4 -2
- package/lib/LastModifierFormatter/index.js +8 -6
- package/lib/LinkEditor/index.js +53 -33
- package/lib/LinkEditor/link-editor-option.js +4 -3
- package/lib/LinkEditor/mb-popover/index.js +22 -9
- package/lib/LinkEditor/pc-popover/index.js +10 -5
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +8 -6
- package/lib/List/list-item.js +28 -22
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +8 -7
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +5 -3
- package/lib/MobileFullScreenPage/header/index.js +6 -4
- package/lib/MobileFullScreenPage/index.js +11 -13
- package/lib/MobileModal/index.js +3 -1
- package/lib/MobileOperationSheet/index.js +8 -7
- package/lib/MobileSelector/empty/index.js +3 -1
- package/lib/MobileSelector/index.js +7 -5
- package/lib/MobileSelector/option/index.js +5 -3
- package/lib/MobileSelector/options/index.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/modal.js +15 -14
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +3 -1
- package/lib/MultipleSelectFormatter/index.js +8 -6
- package/lib/NotificationPopover/index.js +5 -4
- package/lib/NumberEditor/index.js +21 -12
- package/lib/NumberFormatter/index.js +5 -4
- package/lib/PhoneNumberLink/index.js +4 -2
- package/lib/Picker/AbstractPicker.js +27 -23
- package/lib/Popover/index.js +4 -3
- package/lib/Popover/item.js +9 -7
- package/lib/Progress/index.js +8 -9
- package/lib/Radio/Radio.js +8 -4
- package/lib/Radio/RadioItem.js +12 -8
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +17 -18
- package/lib/RowExpandDialog/body/index.js +49 -32
- package/lib/RowExpandDialog/column-content/index.js +9 -5
- package/lib/RowExpandDialog/header/index.js +8 -6
- package/lib/RowExpandDialog/index.js +34 -49
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
- package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
- package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +19 -9
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
- package/lib/RowExpandEditor/index.js +8 -4
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +19 -11
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
- package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +25 -12
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +13 -5
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
- package/lib/RowExpandFormatter/email-formatter/index.js +7 -4
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
- package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
- package/lib/RowExpandFormatter/index.js +41 -27
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
- package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
- package/lib/RowExpandView/body/index.js +35 -22
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +30 -42
- package/lib/SelectItem/index.js +8 -6
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +9 -7
- package/lib/SimpleLongTextFormatter/index.js +16 -10
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
- package/lib/SingleSelectEditor/index.js +3 -1
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +16 -14
- package/lib/TabBar/index.js +21 -18
- package/lib/Tabs/index.js +3 -1
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +26 -19
- package/lib/Toast/index.js +4 -3
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +3 -1
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +42 -27
- package/lib/toaster/alert.js +7 -6
- package/lib/toaster/toast.js +3 -2
- package/lib/toaster/toastManager.js +4 -2
- package/lib/utils/cell.js +11 -8
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +3 -1
- package/lib/utils/url.js +31 -24
- package/lib/utils/utils.js +6 -2
- package/package.json +1 -1
package/lib/ActionSheet/index.js
CHANGED
|
@@ -28,12 +28,13 @@ function createActionSheet(flag, config, callback) {
|
|
|
28
28
|
prefixCls: 'am-action-sheet',
|
|
29
29
|
cancelButtonText: '取消'
|
|
30
30
|
}, config);
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
maskClosable =
|
|
31
|
+
const {
|
|
32
|
+
prefixCls,
|
|
33
|
+
className,
|
|
34
|
+
transitionName,
|
|
35
|
+
maskTransitionName,
|
|
36
|
+
maskClosable = true
|
|
37
|
+
} = props;
|
|
37
38
|
const div = document.createElement('div');
|
|
38
39
|
document.body.appendChild(div);
|
|
39
40
|
const root = (0, _client.createRoot)(div);
|
|
@@ -61,14 +62,15 @@ function createActionSheet(flag, config, callback) {
|
|
|
61
62
|
close();
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
badges =
|
|
65
|
+
const {
|
|
66
|
+
title,
|
|
67
|
+
message,
|
|
68
|
+
options,
|
|
69
|
+
destructiveButtonIndex,
|
|
70
|
+
cancelButtonIndex,
|
|
71
|
+
cancelButtonText,
|
|
72
|
+
badges = []
|
|
73
|
+
} = props;
|
|
72
74
|
const titleMsg = [title ? /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
|
|
73
75
|
className: "".concat(prefixCls, "-title"),
|
|
74
76
|
children: title
|
|
@@ -14,13 +14,14 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
14
|
|
|
15
15
|
class ActivityIndicator extends React.Component {
|
|
16
16
|
render() {
|
|
17
|
-
const
|
|
18
|
-
prefixCls
|
|
19
|
-
className
|
|
20
|
-
animating
|
|
21
|
-
toast
|
|
22
|
-
size
|
|
23
|
-
text
|
|
17
|
+
const {
|
|
18
|
+
prefixCls,
|
|
19
|
+
className,
|
|
20
|
+
animating,
|
|
21
|
+
toast,
|
|
22
|
+
size,
|
|
23
|
+
text
|
|
24
|
+
} = this.props;
|
|
24
25
|
const wrapClass = (0, _classnames.default)(prefixCls, className, {
|
|
25
26
|
["".concat(prefixCls, "-lg")]: size === 'large',
|
|
26
27
|
["".concat(prefixCls, "-sm")]: size === 'small',
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
9
8
|
var _react = require("react");
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _reactstrap = require("reactstrap");
|
|
@@ -17,43 +16,22 @@ var _keyCodes = _interopRequireDefault(require("../constants/key-codes"));
|
|
|
17
16
|
require("./index.css");
|
|
18
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
18
|
const AsyncUserSelect = _ref => {
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
emptyPlaceholder =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
setIsPopoverOpen = _useState2[1];
|
|
37
|
-
const _useState3 = (0, _react.useState)(''),
|
|
38
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
39
|
-
searchValue = _useState4[0],
|
|
40
|
-
setSearchValue = _useState4[1];
|
|
41
|
-
const _useState5 = (0, _react.useState)([]),
|
|
42
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
43
|
-
searchedUsers = _useState6[0],
|
|
44
|
-
setSearchedUsers = _useState6[1];
|
|
45
|
-
const _useState7 = (0, _react.useState)(-1),
|
|
46
|
-
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
47
|
-
highlightIndex = _useState8[0],
|
|
48
|
-
setHighlightIndex = _useState8[1];
|
|
49
|
-
const _useState9 = (0, _react.useState)(0),
|
|
50
|
-
_useState0 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
51
|
-
maxItemNum = _useState0[0],
|
|
52
|
-
setMaxItemNum = _useState0[1];
|
|
53
|
-
const _useState1 = (0, _react.useState)(0),
|
|
54
|
-
_useState10 = (0, _slicedToArray2.default)(_useState1, 2),
|
|
55
|
-
itemHeight = _useState10[0],
|
|
56
|
-
setItemHeight = _useState10[1];
|
|
19
|
+
let {
|
|
20
|
+
className,
|
|
21
|
+
emptyPlaceholder = '',
|
|
22
|
+
searchPlaceholder = '',
|
|
23
|
+
isMulti = true,
|
|
24
|
+
enableShowIDInOrgWhenSearchUser = false,
|
|
25
|
+
selectedUsers = [],
|
|
26
|
+
loadOptions,
|
|
27
|
+
modifySelectedUsers
|
|
28
|
+
} = _ref;
|
|
29
|
+
const [isPopoverOpen, setIsPopoverOpen] = (0, _react.useState)(false);
|
|
30
|
+
const [searchValue, setSearchValue] = (0, _react.useState)('');
|
|
31
|
+
const [searchedUsers, setSearchedUsers] = (0, _react.useState)([]);
|
|
32
|
+
const [highlightIndex, setHighlightIndex] = (0, _react.useState)(-1);
|
|
33
|
+
const [maxItemNum, setMaxItemNum] = (0, _react.useState)(0);
|
|
34
|
+
const [itemHeight, setItemHeight] = (0, _react.useState)(0);
|
|
57
35
|
const selectorRef = (0, _react.useRef)(null);
|
|
58
36
|
const userSelectContainerRef = (0, _react.useRef)(null);
|
|
59
37
|
const userListContainerRef = (0, _react.useRef)(null);
|
|
@@ -187,8 +165,9 @@ const AsyncUserSelect = _ref => {
|
|
|
187
165
|
}, [onEnter, onUpArrow, onDownArrow, onEsc]);
|
|
188
166
|
(0, _react.useEffect)(() => {
|
|
189
167
|
if (userSelectContainerRef.current) {
|
|
190
|
-
const
|
|
191
|
-
bottom
|
|
168
|
+
const {
|
|
169
|
+
bottom
|
|
170
|
+
} = userSelectContainerRef.current.getBoundingClientRect();
|
|
192
171
|
if (bottom > window.innerHeight) {
|
|
193
172
|
userSelectContainerRef.current.style.top = "".concat(window.innerHeight - bottom, "px");
|
|
194
173
|
}
|
|
@@ -10,11 +10,12 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _lang = require("../lang");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const UserItem = _ref => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
enableShowIDInOrgWhenSearchUser =
|
|
13
|
+
let {
|
|
14
|
+
className,
|
|
15
|
+
user,
|
|
16
|
+
deleteUser,
|
|
17
|
+
enableShowIDInOrgWhenSearchUser = false
|
|
18
|
+
} = _ref;
|
|
18
19
|
const name = (0, _react.useMemo)(() => (user === null || user === void 0 ? void 0 : user.name) || '', [user]);
|
|
19
20
|
const avatarUrl = (0, _react.useMemo)(() => (user === null || user === void 0 ? void 0 : user.avatar_url) || '', [user]);
|
|
20
21
|
const idInOrg = (0, _react.useMemo)(() => (user === null || user === void 0 ? void 0 : user.id_in_org) || '', [user]);
|
|
@@ -11,9 +11,10 @@ require("./index.css");
|
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
class AutoNumberFormatter extends _react.default.Component {
|
|
13
13
|
render() {
|
|
14
|
-
const
|
|
15
|
-
containerClassName
|
|
16
|
-
value
|
|
14
|
+
const {
|
|
15
|
+
containerClassName,
|
|
16
|
+
value
|
|
17
|
+
} = this.props;
|
|
17
18
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container auto-number-formatter', containerClassName);
|
|
18
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19
20
|
title: value,
|
package/lib/Badge/index.js
CHANGED
|
@@ -17,15 +17,17 @@ class Badge extends React.Component {
|
|
|
17
17
|
render() {
|
|
18
18
|
// tslint:disable:prefer-const
|
|
19
19
|
let _this$props = this.props,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
{
|
|
21
|
+
className,
|
|
22
|
+
prefixCls,
|
|
23
|
+
children,
|
|
24
|
+
text,
|
|
25
|
+
size,
|
|
26
|
+
overflowCount,
|
|
27
|
+
dot,
|
|
28
|
+
corner,
|
|
29
|
+
hot
|
|
30
|
+
} = _this$props,
|
|
29
31
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
30
32
|
// eslint-disable-next-line no-self-assign
|
|
31
33
|
overflowCount = overflowCount;
|
|
@@ -21,12 +21,14 @@ class ButtonFormatter extends _react.default.Component {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
let
|
|
25
|
-
data
|
|
26
|
-
containerClassName
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
let {
|
|
25
|
+
data,
|
|
26
|
+
containerClassName
|
|
27
|
+
} = this.props;
|
|
28
|
+
const {
|
|
29
|
+
button_color,
|
|
30
|
+
button_name
|
|
31
|
+
} = data || {};
|
|
30
32
|
const colorObj = _dtableUtils.SELECT_OPTION_COLORS.find(item => item.COLOR === button_color) || _dtableUtils.SELECT_OPTION_COLORS[0];
|
|
31
33
|
const color = colorObj.TEXT_COLOR === WHITE ? WHITE : '#666666';
|
|
32
34
|
const btnStyle = {
|
|
@@ -18,9 +18,10 @@ class CTimeFormatter extends _react.default.Component {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
let
|
|
22
|
-
date
|
|
23
|
-
containerClassName
|
|
21
|
+
let {
|
|
22
|
+
value: date,
|
|
23
|
+
containerClassName
|
|
24
|
+
} = this.props;
|
|
24
25
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container ctime-formatter', containerClassName);
|
|
25
26
|
if (date) {
|
|
26
27
|
date = this.formatDate(date);
|
|
@@ -16,7 +16,9 @@ require("./index.css");
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const _excluded = ["isMobile"];
|
|
18
18
|
const CheckboxEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
|
-
let
|
|
19
|
+
let {
|
|
20
|
+
isMobile
|
|
21
|
+
} = _ref,
|
|
20
22
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
21
23
|
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
22
24
|
ref: ref
|
|
@@ -15,7 +15,9 @@ class MBCheckboxEditor extends _react.Component {
|
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
17
17
|
this.getValue = () => {
|
|
18
|
-
const
|
|
18
|
+
const {
|
|
19
|
+
value
|
|
20
|
+
} = this.state;
|
|
19
21
|
return value;
|
|
20
22
|
};
|
|
21
23
|
this.updateValue = value => {
|
|
@@ -27,14 +29,18 @@ class MBCheckboxEditor extends _react.Component {
|
|
|
27
29
|
});
|
|
28
30
|
};
|
|
29
31
|
this.onChangeCheckboxValue = event => {
|
|
30
|
-
const
|
|
32
|
+
const {
|
|
33
|
+
readOnly
|
|
34
|
+
} = this.props;
|
|
31
35
|
if (readOnly) return;
|
|
32
36
|
if (event) {
|
|
33
37
|
event.stopPropagation();
|
|
34
38
|
event.nativeEvent.stopImmediatePropagation();
|
|
35
39
|
event.persist();
|
|
36
40
|
}
|
|
37
|
-
const
|
|
41
|
+
const {
|
|
42
|
+
value
|
|
43
|
+
} = this.state;
|
|
38
44
|
const newValue = !value;
|
|
39
45
|
this.setState({
|
|
40
46
|
value: newValue
|
|
@@ -57,7 +63,9 @@ class MBCheckboxEditor extends _react.Component {
|
|
|
57
63
|
};
|
|
58
64
|
}
|
|
59
65
|
componentDidUpdate(prevProps) {
|
|
60
|
-
const
|
|
66
|
+
const {
|
|
67
|
+
value
|
|
68
|
+
} = this.props;
|
|
61
69
|
if (value !== prevProps.value) {
|
|
62
70
|
this.setState({
|
|
63
71
|
value
|
|
@@ -66,11 +74,14 @@ class MBCheckboxEditor extends _react.Component {
|
|
|
66
74
|
}
|
|
67
75
|
render() {
|
|
68
76
|
var _column$data;
|
|
69
|
-
const
|
|
70
|
-
className
|
|
71
|
-
style
|
|
72
|
-
column
|
|
73
|
-
|
|
77
|
+
const {
|
|
78
|
+
className,
|
|
79
|
+
style,
|
|
80
|
+
column
|
|
81
|
+
} = this.props;
|
|
82
|
+
const {
|
|
83
|
+
value
|
|
84
|
+
} = this.state;
|
|
74
85
|
let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
|
|
75
86
|
if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
|
|
76
87
|
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
@@ -15,9 +15,10 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
17
17
|
this.onKeyDown = event => {
|
|
18
|
-
const
|
|
19
|
-
isEditorShow
|
|
20
|
-
readOnly
|
|
18
|
+
const {
|
|
19
|
+
isEditorShow,
|
|
20
|
+
readOnly
|
|
21
|
+
} = this.props;
|
|
21
22
|
if (event.keyCode === _constants.KeyCodes.Enter && isEditorShow && !readOnly) {
|
|
22
23
|
this.setState({
|
|
23
24
|
value: !this.state.value
|
|
@@ -25,7 +26,9 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
28
|
this.getValue = () => {
|
|
28
|
-
const
|
|
29
|
+
const {
|
|
30
|
+
value
|
|
31
|
+
} = this.state;
|
|
29
32
|
return value;
|
|
30
33
|
};
|
|
31
34
|
this.updateValue = value => {
|
|
@@ -37,14 +40,18 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
37
40
|
});
|
|
38
41
|
};
|
|
39
42
|
this.onChangeCheckboxValue = event => {
|
|
40
|
-
const
|
|
43
|
+
const {
|
|
44
|
+
readOnly
|
|
45
|
+
} = this.props;
|
|
41
46
|
if (readOnly) return;
|
|
42
47
|
if (event) {
|
|
43
48
|
event.stopPropagation();
|
|
44
49
|
event.nativeEvent.stopImmediatePropagation();
|
|
45
50
|
event.persist();
|
|
46
51
|
}
|
|
47
|
-
const
|
|
52
|
+
const {
|
|
53
|
+
value
|
|
54
|
+
} = this.state;
|
|
48
55
|
const newValue = !value;
|
|
49
56
|
this.setState({
|
|
50
57
|
value: newValue
|
|
@@ -75,7 +82,9 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
75
82
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
76
83
|
}
|
|
77
84
|
componentDidUpdate(prevProps) {
|
|
78
|
-
const
|
|
85
|
+
const {
|
|
86
|
+
value
|
|
87
|
+
} = this.props;
|
|
79
88
|
if (value !== prevProps.value) {
|
|
80
89
|
this.setState({
|
|
81
90
|
value
|
|
@@ -84,11 +93,14 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
84
93
|
}
|
|
85
94
|
render() {
|
|
86
95
|
var _column$data;
|
|
87
|
-
const
|
|
88
|
-
className
|
|
89
|
-
style
|
|
90
|
-
column
|
|
91
|
-
|
|
96
|
+
const {
|
|
97
|
+
className,
|
|
98
|
+
style,
|
|
99
|
+
column
|
|
100
|
+
} = this.props;
|
|
101
|
+
const {
|
|
102
|
+
value
|
|
103
|
+
} = this.state;
|
|
92
104
|
let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
|
|
93
105
|
if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
|
|
94
106
|
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
@@ -26,10 +26,11 @@ class CheckboxFormatter extends _react.default.PureComponent {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
let
|
|
30
|
-
value
|
|
31
|
-
containerClassName
|
|
32
|
-
checkboxStyle
|
|
29
|
+
let {
|
|
30
|
+
value,
|
|
31
|
+
containerClassName,
|
|
32
|
+
checkboxStyle
|
|
33
|
+
} = this.props;
|
|
33
34
|
if (!checkboxStyle || !('type' in checkboxStyle && 'color' in checkboxStyle)) {
|
|
34
35
|
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
35
36
|
}
|
|
@@ -16,8 +16,10 @@ require("./index.css");
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const _excluded = ["isMobile", "value"];
|
|
18
18
|
const CollaboratorEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
|
-
let
|
|
20
|
-
|
|
19
|
+
let {
|
|
20
|
+
isMobile,
|
|
21
|
+
value: oldValue
|
|
22
|
+
} = _ref,
|
|
21
23
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
22
24
|
const value = Array.isArray(oldValue) ? oldValue : [];
|
|
23
25
|
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
@@ -12,10 +12,12 @@ var _lang = require("../../lang");
|
|
|
12
12
|
var _CollaboratorItem = _interopRequireDefault(require("../../CollaboratorItem"));
|
|
13
13
|
require("./index.css");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const {
|
|
16
|
+
Search,
|
|
17
|
+
Option,
|
|
18
|
+
Options,
|
|
19
|
+
Empty
|
|
20
|
+
} = _MobileSelector.default;
|
|
19
21
|
class MBCollaboratorEditor extends _react.default.Component {
|
|
20
22
|
constructor(props) {
|
|
21
23
|
super(props);
|
|
@@ -24,7 +26,9 @@ class MBCollaboratorEditor extends _react.default.Component {
|
|
|
24
26
|
this.props.onClose();
|
|
25
27
|
};
|
|
26
28
|
this.onChangeSearch = newValue => {
|
|
27
|
-
let
|
|
29
|
+
let {
|
|
30
|
+
searchVal
|
|
31
|
+
} = this.state;
|
|
28
32
|
if (searchVal === newValue) return;
|
|
29
33
|
this.setState({
|
|
30
34
|
searchVal: newValue
|
|
@@ -34,8 +38,9 @@ class MBCollaboratorEditor extends _react.default.Component {
|
|
|
34
38
|
this.props.onCommit(collaborator);
|
|
35
39
|
};
|
|
36
40
|
this.renderCollaborators = collaborators => {
|
|
37
|
-
const
|
|
38
|
-
value =
|
|
41
|
+
const {
|
|
42
|
+
value = []
|
|
43
|
+
} = this.props;
|
|
39
44
|
return collaborators.map(collaborator => {
|
|
40
45
|
const isSelected = value.includes(collaborator.email);
|
|
41
46
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Option, {
|
|
@@ -59,10 +64,13 @@ class MBCollaboratorEditor extends _react.default.Component {
|
|
|
59
64
|
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
60
65
|
}
|
|
61
66
|
render() {
|
|
62
|
-
const
|
|
63
|
-
column
|
|
64
|
-
collaborators
|
|
65
|
-
|
|
67
|
+
const {
|
|
68
|
+
column,
|
|
69
|
+
collaborators
|
|
70
|
+
} = this.props;
|
|
71
|
+
const {
|
|
72
|
+
searchVal
|
|
73
|
+
} = this.state;
|
|
66
74
|
const displayCollaborators = searchVal ? (0, _dtableUtils.searchCollaborators)(collaborators, searchVal) : collaborators;
|
|
67
75
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MobileSelector.default, {
|
|
68
76
|
onClose: this.props.onClose,
|
|
@@ -21,7 +21,9 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
21
21
|
super(props);
|
|
22
22
|
this.onValueChanged = newSearchValue => {
|
|
23
23
|
if (newSearchValue === this.state.searchValue) return;
|
|
24
|
-
const
|
|
24
|
+
const {
|
|
25
|
+
collaborators
|
|
26
|
+
} = this.props;
|
|
25
27
|
this.filteredCollaborators = (0, _dtableUtils.searchCollaborators)(collaborators, newSearchValue);
|
|
26
28
|
this.setState({
|
|
27
29
|
highlightIndex: this.filteredCollaborators.length > 0 ? 0 : -1,
|
|
@@ -32,7 +34,9 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
32
34
|
this.props.onCommit(collaborator);
|
|
33
35
|
};
|
|
34
36
|
this.getFilterCollaborator = () => {
|
|
35
|
-
const
|
|
37
|
+
const {
|
|
38
|
+
collaborators
|
|
39
|
+
} = this.props;
|
|
36
40
|
const searchValue = this.state.searchValue.toLowerCase();
|
|
37
41
|
if (!searchValue) return collaborators;
|
|
38
42
|
return (0, _dtableUtils.searchCollaborators)(collaborators, searchValue);
|
|
@@ -73,10 +77,11 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
73
77
|
this.onUpArrow = e => {
|
|
74
78
|
e.preventDefault();
|
|
75
79
|
e.stopPropagation();
|
|
76
|
-
let
|
|
77
|
-
highlightIndex
|
|
78
|
-
maxItemNum
|
|
79
|
-
itemHeight
|
|
80
|
+
let {
|
|
81
|
+
highlightIndex,
|
|
82
|
+
maxItemNum,
|
|
83
|
+
itemHeight
|
|
84
|
+
} = this.state;
|
|
80
85
|
if (highlightIndex > 0) {
|
|
81
86
|
this.setState({
|
|
82
87
|
highlightIndex: highlightIndex - 1
|
|
@@ -96,10 +101,11 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
96
101
|
this.onDownArrow = e => {
|
|
97
102
|
e.preventDefault();
|
|
98
103
|
e.stopPropagation();
|
|
99
|
-
let
|
|
100
|
-
highlightIndex
|
|
101
|
-
maxItemNum
|
|
102
|
-
itemHeight
|
|
104
|
+
let {
|
|
105
|
+
highlightIndex,
|
|
106
|
+
maxItemNum,
|
|
107
|
+
itemHeight
|
|
108
|
+
} = this.state;
|
|
103
109
|
if (highlightIndex < this.filteredCollaborators.length - 1) {
|
|
104
110
|
this.setState({
|
|
105
111
|
highlightIndex: highlightIndex + 1
|
|
@@ -119,11 +125,12 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
119
125
|
this.onEsc = e => {
|
|
120
126
|
e.preventDefault();
|
|
121
127
|
e.stopPropagation();
|
|
122
|
-
const
|
|
123
|
-
isInModal
|
|
124
|
-
value
|
|
125
|
-
onCommitCancel
|
|
126
|
-
onClose
|
|
128
|
+
const {
|
|
129
|
+
isInModal,
|
|
130
|
+
value,
|
|
131
|
+
onCommitCancel,
|
|
132
|
+
onClose
|
|
133
|
+
} = this.props;
|
|
127
134
|
if (isInModal) {
|
|
128
135
|
onClose && onClose();
|
|
129
136
|
return;
|
|
@@ -165,8 +172,9 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
165
172
|
}
|
|
166
173
|
}
|
|
167
174
|
if (!this.props.isInModal && this.ref) {
|
|
168
|
-
const
|
|
169
|
-
bottom
|
|
175
|
+
const {
|
|
176
|
+
bottom
|
|
177
|
+
} = this.ref.getBoundingClientRect();
|
|
170
178
|
if (bottom > window.innerHeight) {
|
|
171
179
|
this.ref.style.top = "".concat(window.innerHeight - bottom, "px");
|
|
172
180
|
}
|
|
@@ -190,14 +198,15 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
190
198
|
document.removeEventListener('keydown', this.onHotKey, true);
|
|
191
199
|
}
|
|
192
200
|
render() {
|
|
193
|
-
const
|
|
194
|
-
searchValue
|
|
195
|
-
highlightIndex
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
value =
|
|
200
|
-
target
|
|
201
|
+
const {
|
|
202
|
+
searchValue,
|
|
203
|
+
highlightIndex
|
|
204
|
+
} = this.state;
|
|
205
|
+
const {
|
|
206
|
+
isInModal,
|
|
207
|
+
value = [],
|
|
208
|
+
target
|
|
209
|
+
} = this.props;
|
|
201
210
|
const dom = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
202
211
|
className: "dtable-ui-editor-container dtable-ui-collaborator-editor-container",
|
|
203
212
|
ref: ref => this.ref = ref,
|
|
@@ -20,11 +20,12 @@ class CollaboratorFormatter extends _react.default.PureComponent {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.getCollaborators = () => {
|
|
23
|
-
let
|
|
24
|
-
value
|
|
25
|
-
collaborators
|
|
26
|
-
enableDeleteCollaborator
|
|
27
|
-
onDeleteCollaborator
|
|
23
|
+
let {
|
|
24
|
+
value,
|
|
25
|
+
collaborators,
|
|
26
|
+
enableDeleteCollaborator,
|
|
27
|
+
onDeleteCollaborator
|
|
28
|
+
} = this.props;
|
|
28
29
|
if (!Array.isArray(value)) {
|
|
29
30
|
value = [value];
|
|
30
31
|
}
|
|
@@ -45,9 +46,10 @@ class CollaboratorFormatter extends _react.default.PureComponent {
|
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
render() {
|
|
48
|
-
const
|
|
49
|
-
containerClassName
|
|
50
|
-
value
|
|
49
|
+
const {
|
|
50
|
+
containerClassName,
|
|
51
|
+
value
|
|
52
|
+
} = this.props;
|
|
51
53
|
const classname = (0, _classnames.default)('dtable-ui cell-formatter-container collaborator-formatter', containerClassName);
|
|
52
54
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
53
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -19,10 +19,11 @@ class CollaboratorItem extends _react.default.Component {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
const
|
|
23
|
-
className
|
|
24
|
-
collaborator
|
|
25
|
-
enableDeleteCollaborator
|
|
22
|
+
const {
|
|
23
|
+
className,
|
|
24
|
+
collaborator,
|
|
25
|
+
enableDeleteCollaborator
|
|
26
|
+
} = this.props;
|
|
26
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
27
28
|
title: collaborator.name,
|
|
28
29
|
className: (0, _classnames.default)('dtable-ui collaborator-item', className),
|