dtable-ui-component 6.0.1140-oal.3 → 7.0.0
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 +14 -16
- package/lib/ActivityIndicator/index.js +7 -8
- package/lib/AsyncUserSelect/index.css +5 -0
- package/lib/AsyncUserSelect/index.js +40 -19
- package/lib/AsyncUserSelect/user-item.js +5 -6
- package/lib/AutoNumberFormatter/index.js +3 -4
- package/lib/Badge/index.js +9 -11
- package/lib/ButtonFormatter/index.js +6 -8
- package/lib/CTimeFormatter/index.js +3 -4
- package/lib/CheckboxEditor/index.js +1 -3
- package/lib/CheckboxEditor/mb-editor.js +9 -20
- package/lib/CheckboxEditor/pc-editor.js +12 -24
- package/lib/CheckboxFormatter/index.js +4 -5
- package/lib/CollaboratorEditor/index.js +2 -4
- package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
- package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
- package/lib/CollaboratorFormatter/index.js +8 -10
- package/lib/CollaboratorItem/index.js +4 -5
- package/lib/CollapsibleSettingLayout/index.js +9 -7
- package/lib/Comment/body/comment.js +24 -34
- package/lib/Comment/body/index.js +2 -4
- package/lib/Comment/footer/btns/index.js +4 -7
- package/lib/Comment/footer/index.js +9 -20
- package/lib/Comment/footer/input/index.js +29 -50
- package/lib/Comment/footer/input/participant/index.js +4 -5
- package/lib/Comment/footer/participants/index.js +6 -11
- package/lib/Comment/footer/participants/participant/index.js +4 -9
- package/lib/Comment/footer/participants/participant-select/index.js +9 -25
- package/lib/Comment/index.js +39 -57
- package/lib/Comment/utils/utilities.js +15 -21
- package/lib/CreatorFormatter/index.js +6 -8
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +23 -19
- package/lib/DTableColorPicker/index.css +0 -2
- package/lib/DTableColorPicker/index.js +56 -41
- package/lib/DTableColorPicker/utils.js +4 -6
- package/lib/DTableColumnIcon/index.js +6 -7
- package/lib/DTableCommonAddTool/index.css +1 -3
- package/lib/DTableCommonAddTool/index.js +6 -8
- package/lib/DTableCustomFooter/index.css +1 -3
- package/lib/DTableCustomFooter/index.js +1 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
- package/lib/DTableCustomizeSelect/index.js +19 -24
- package/lib/DTableDropdownItem/index.js +90 -0
- package/lib/DTableDropdownMenu/index.js +47 -0
- package/lib/DTableEmptyTip/index.js +4 -5
- package/lib/DTableFiltersPopover/index.css +0 -2
- package/lib/DTableFiltersPopover/index.js +26 -41
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +1 -3
- package/lib/DTableFiltersPopover/utils/index.js +63 -113
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +8 -9
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
- package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
- package/lib/DTableFiltersPopover/widgets/filter-item.js +110 -174
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
- package/lib/DTableFiltersPopover/widgets/rate-item.js +17 -22
- package/lib/DTableGroupSelect/index.js +11 -15
- package/lib/DTableGroupSelect/select-option-group.js +23 -32
- package/lib/DTableIcon/index.js +6 -7
- package/lib/DTableIcon/svg-icon.js +5 -7
- package/lib/DTableModalHeader/index.js +1 -3
- package/lib/DTablePopover/index.js +13 -16
- package/lib/DTableRadio/index.js +10 -9
- package/lib/DTableRadioGroup/index.js +8 -17
- package/lib/DTableSearchInput/index.js +19 -29
- package/lib/DTableSelect/dtable-select-label.js +6 -5
- package/lib/DTableSelect/index.js +32 -25
- package/lib/DTableSelect/utils.js +7 -15
- package/lib/DTableSubDropdownMenu/index.js +48 -0
- package/lib/DTableSubDropdownToggle/index.js +54 -0
- package/lib/DTableSwitch/index.css +0 -1
- package/lib/DTableSwitch/index.js +12 -11
- package/lib/DTableToolTip/index.css +45 -0
- package/lib/DTableToolTip/index.js +67 -0
- package/lib/DateEditor/index.js +20 -15
- package/lib/DateEditor/mb-editor/index.js +18 -31
- package/lib/DateEditor/pc-editor.js +26 -45
- package/lib/DateFormatter/index.js +4 -5
- package/lib/DatePicker/index.js +9 -15
- package/lib/DatePicker/utils.js +1 -3
- package/lib/DeleteTip/index.js +5 -6
- package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
- package/lib/DepartmentSelectFilter/index.js +6 -8
- package/lib/DepartmentSingleSelectEditor/index.js +1 -3
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
- package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
- package/lib/DigitalSignEditor/index.js +1 -3
- package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
- package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
- package/lib/DigitalSignEditor/service.js +2 -4
- package/lib/DigitalSignEditor/signature-board/index.js +5 -8
- package/lib/DigitalSignEditor/utils.js +2 -4
- package/lib/DigitalSignFormatter/index.js +12 -15
- package/lib/DigitalSignFormatter/utils.js +4 -5
- package/lib/DurationEditor/index.js +21 -31
- package/lib/DurationFormatter/index.js +4 -5
- package/lib/EditEditorButton/index.js +1 -3
- package/lib/EmailFormatter/index.js +3 -4
- package/lib/FieldDisplaySetting/field-item.js +12 -12
- package/lib/FieldDisplaySetting/index.js +11 -9
- package/lib/FileEditor/files-previewer/index.js +1 -3
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +16 -14
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +17 -32
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
- package/lib/FileEditor/index.js +1 -3
- package/lib/FileEditor/mb-editor/index.js +28 -20
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +13 -34
- package/lib/FileEditor/pc-editor/index.js +19 -27
- package/lib/FileFormatter/index.js +26 -19
- package/lib/FileItemFormatter/index.js +6 -9
- package/lib/FileUploader/index.js +28 -45
- package/lib/FormulaFormatter/index.js +15 -29
- package/lib/GeolocationEditor/index.js +11 -12
- package/lib/GeolocationEditor/map-editor-utils.js +17 -15
- package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/index.js +4 -6
- package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
- package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
- package/lib/GeolocationEditor/pc-editor/index.js +12 -20
- package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
- package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
- package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
- package/lib/GeolocationFormatter/index.js +4 -5
- package/lib/HtmlLongTextFormatter/index.js +4 -12
- package/lib/Icon/index.js +3 -5
- package/lib/IconButton/index.js +4 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +14 -31
- package/lib/ImageEditor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/index.js +1 -3
- package/lib/ImageEditor/mb-editor/index.js +28 -20
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/pc-editor/index.js +11 -16
- package/lib/ImageFormatter/images-lazy-load.js +19 -11
- package/lib/ImageFormatter/index.js +11 -13
- package/lib/ImagePreviewerLightbox/index.js +29 -16
- package/lib/ImageThumbnail/index.js +13 -29
- package/lib/InputItem/custom-input.js +26 -46
- package/lib/InputItem/custom-keyboard.js +15 -18
- package/lib/InputItem/index.js +34 -50
- package/lib/InputItem/input.js +2 -4
- package/lib/LastModifierFormatter/index.js +6 -8
- package/lib/LinkEditor/index.js +33 -53
- package/lib/LinkEditor/link-editor-option.js +3 -4
- package/lib/LinkEditor/mb-popover/index.js +9 -22
- package/lib/LinkEditor/pc-popover/index.js +5 -10
- package/lib/LinkFormatter/index.js +21 -37
- package/lib/List/index.js +6 -8
- package/lib/List/list-item.js +22 -28
- package/lib/LongTextFormatter/index.js +4 -5
- package/lib/MBEditorHeader/index.js +7 -8
- package/lib/MTimeFormatter/index.js +3 -4
- package/lib/MobileFullScreenPage/body/index.js +3 -5
- package/lib/MobileFullScreenPage/header/index.js +4 -6
- package/lib/MobileFullScreenPage/index.js +13 -11
- package/lib/MobileModal/index.js +1 -3
- package/lib/MobileOperationSheet/index.js +7 -8
- package/lib/MobileSelector/empty/index.js +1 -3
- package/lib/MobileSelector/index.js +5 -7
- package/lib/MobileSelector/option/index.js +3 -5
- package/lib/MobileSelector/options/index.js +1 -3
- package/lib/MobileSelector/search/index.js +3 -5
- package/lib/MobileUpload/index.js +4 -5
- package/lib/Modal/modal.js +14 -15
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +1 -3
- package/lib/MultipleSelectFormatter/index.js +6 -8
- package/lib/NotificationPopover/index.css +1 -6
- package/lib/NotificationPopover/index.js +6 -7
- package/lib/NumberEditor/index.js +12 -21
- package/lib/NumberFormatter/index.js +4 -5
- package/lib/PhoneNumberLink/index.js +2 -4
- package/lib/Picker/AbstractPicker.js +23 -27
- package/lib/Popover/index.js +3 -4
- package/lib/Popover/item.js +7 -9
- package/lib/Progress/index.js +9 -8
- package/lib/Radio/Radio.js +4 -8
- package/lib/Radio/RadioItem.js +8 -12
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.css +0 -35
- package/lib/RoleStatusEditor/index.js +40 -27
- package/lib/RowExpandDialog/body/index.js +32 -49
- package/lib/RowExpandDialog/column-content/index.js +7 -13
- package/lib/RowExpandDialog/header/index.js +6 -8
- package/lib/RowExpandDialog/index.js +49 -34
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
- package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
- package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
- package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
- package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
- package/lib/RowExpandEditor/index.js +4 -8
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
- package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
- package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
- package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -27
- package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
- package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +9 -23
- package/lib/RowExpandFormatter/index.js +27 -41
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
- package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
- package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
- package/lib/RowExpandFormatter/text/index.js +4 -5
- package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
- package/lib/RowExpandView/body/index.js +22 -35
- package/lib/RowExpandView/column-content/index.js +3 -7
- package/lib/RowExpandView/index.js +42 -30
- package/lib/SelectItem/index.js +5 -7
- package/lib/SelectOptionGroup/index.css +3 -3
- package/lib/SelectOptionGroup/index.js +31 -40
- package/lib/SelectedDepartments/index.js +7 -9
- package/lib/SimpleLongTextFormatter/index.js +10 -16
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
- package/lib/SingleSelectEditor/index.js +1 -3
- package/lib/SingleSelectFormatter/index.js +8 -9
- package/lib/TabBar/Tab.js +14 -16
- package/lib/TabBar/index.js +18 -21
- package/lib/Tabs/index.js +1 -3
- package/lib/TextEditor/index.js +14 -23
- package/lib/TextFormatter/index.js +3 -4
- package/lib/TextareaItem/index.js +19 -26
- package/lib/Toast/index.js +3 -4
- package/lib/UrlFormatter/index.js +3 -4
- package/lib/assets/icons/check-mark.svg +3 -0
- package/lib/common/editor-base.js +7 -12
- package/lib/hooks/common-hooks.js +2 -4
- package/lib/index.js +35 -0
- package/lib/locales/de.json +2 -0
- package/lib/locales/en.json +2 -0
- package/lib/locales/es.json +2 -0
- package/lib/locales/fr.json +2 -0
- package/lib/locales/pt.json +2 -0
- package/lib/locales/ru.json +2 -0
- package/lib/locales/zh-CN.json +2 -0
- package/lib/select-editor/index.js +1 -3
- package/lib/select-editor/mb-editor/index.js +17 -28
- package/lib/select-editor/pc-editor/index.js +27 -42
- package/lib/toaster/alert.js +6 -7
- package/lib/toaster/toast.js +2 -3
- package/lib/toaster/toastManager.js +2 -4
- package/lib/utils/cell.js +8 -11
- package/lib/utils/column-utils.js +8 -14
- package/lib/utils/departments.js +1 -3
- package/lib/utils/url.js +24 -31
- package/lib/utils/utils.js +2 -6
- package/package.json +10 -10
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
12
|
require("./index.css");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
const CollapsibleSettingLayout = props => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
const className = props.className,
|
|
16
|
+
title = props.title,
|
|
17
|
+
children = props.children;
|
|
18
|
+
const _useState = (0, _react.useState)(true),
|
|
19
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
20
|
+
isShowSettings = _useState2[0],
|
|
21
|
+
setIsShowSettings = _useState2[1];
|
|
20
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
23
|
className: (0, _classnames.default)('collapsible-setting-layout', className),
|
|
22
24
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -10,6 +10,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _reactstrap = require("reactstrap");
|
|
11
11
|
var _seafileEditor = require("@seafile/seafile-editor");
|
|
12
12
|
var _ImagePreviewerLightbox = _interopRequireDefault(require("../../ImagePreviewerLightbox"));
|
|
13
|
+
var _DTableDropdownMenu = _interopRequireDefault(require("../../DTableDropdownMenu"));
|
|
14
|
+
var _DTableDropdownItem = _interopRequireDefault(require("../../DTableDropdownItem"));
|
|
13
15
|
var _lang = require("../../lang");
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
17
|
class Comment extends _react.PureComponent {
|
|
@@ -26,10 +28,9 @@ class Comment extends _react.PureComponent {
|
|
|
26
28
|
const mdString = mdFile.replaceAll('&', '&');
|
|
27
29
|
_seafileEditor.processor.process(mdString).then(result => {
|
|
28
30
|
let commentContent = String(result);
|
|
29
|
-
let
|
|
30
|
-
isScrollBottom,
|
|
31
|
-
onScrollBottom
|
|
32
|
-
} = this.props;
|
|
31
|
+
let _this$props = this.props,
|
|
32
|
+
isScrollBottom = _this$props.isScrollBottom,
|
|
33
|
+
onScrollBottom = _this$props.onScrollBottom;
|
|
33
34
|
this.setState({
|
|
34
35
|
commentContent: commentContent
|
|
35
36
|
});
|
|
@@ -74,15 +75,11 @@ class Comment extends _react.PureComponent {
|
|
|
74
75
|
});
|
|
75
76
|
};
|
|
76
77
|
this.isCommentUserExist = commentItem => {
|
|
77
|
-
const
|
|
78
|
-
collaborators
|
|
79
|
-
} = this.props;
|
|
78
|
+
const collaborators = this.props.collaborators;
|
|
80
79
|
return !!collaborators.find(collaborator => collaborator.email === commentItem.author);
|
|
81
80
|
};
|
|
82
81
|
this.renderInfo = comment => {
|
|
83
|
-
const
|
|
84
|
-
collaborators
|
|
85
|
-
} = this.props;
|
|
82
|
+
const collaborators = this.props.collaborators;
|
|
86
83
|
let authorInfo = Array.isArray(collaborators) && collaborators.find(collaborator => comment.author === collaborator.email);
|
|
87
84
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
88
85
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
@@ -128,14 +125,11 @@ class Comment extends _react.PureComponent {
|
|
|
128
125
|
}
|
|
129
126
|
}
|
|
130
127
|
render() {
|
|
131
|
-
const
|
|
132
|
-
comment,
|
|
133
|
-
onResolve,
|
|
134
|
-
onDelete
|
|
135
|
-
|
|
136
|
-
const {
|
|
137
|
-
username
|
|
138
|
-
} = window.dtable;
|
|
128
|
+
const _this$props2 = this.props,
|
|
129
|
+
comment = _this$props2.comment,
|
|
130
|
+
onResolve = _this$props2.onResolve,
|
|
131
|
+
onDelete = _this$props2.onDelete;
|
|
132
|
+
const username = window.dtable.username;
|
|
139
133
|
const moreOperationsText = (0, _lang.getLocale)('More_operations');
|
|
140
134
|
if (!this.isCommentUserExist(comment)) return null;
|
|
141
135
|
const isShowDropdownMenu = comment.author === username || !comment.resolved;
|
|
@@ -161,24 +155,20 @@ class Comment extends _react.PureComponent {
|
|
|
161
155
|
title: moreOperationsText,
|
|
162
156
|
"aria-label": moreOperationsText
|
|
163
157
|
})
|
|
164
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
165
|
-
className: "dtable-
|
|
166
|
-
children: [!comment.resolved && onResolve && /*#__PURE__*/(0, _jsxRuntime.
|
|
158
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_DTableDropdownMenu.default, {
|
|
159
|
+
className: "dtable-ui-comment-dropdown-list",
|
|
160
|
+
children: [!comment.resolved && onResolve && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownItem.default, {
|
|
167
161
|
onClick: event => onResolve(event, comment.id),
|
|
168
|
-
|
|
169
|
-
className: "comment-icon dtable-font dtable-icon-mark
|
|
170
|
-
}),
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
})]
|
|
174
|
-
}), comment.author === username && onDelete && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownItem, {
|
|
162
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
163
|
+
className: "comment-icon dtable-font dtable-icon-mark"
|
|
164
|
+
}),
|
|
165
|
+
content: (0, _lang.getLocale)('Mark_as_resolved')
|
|
166
|
+
}), comment.author === username && onDelete && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownItem.default, {
|
|
175
167
|
onClick: event => onDelete(event, comment.id),
|
|
176
|
-
|
|
177
|
-
className: "comment-icon dtable-font dtable-icon-delete
|
|
178
|
-
}),
|
|
179
|
-
|
|
180
|
-
children: (0, _lang.getLocale)('Delete')
|
|
181
|
-
})]
|
|
168
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
169
|
+
className: "comment-icon dtable-font dtable-icon-delete"
|
|
170
|
+
}),
|
|
171
|
+
content: (0, _lang.getLocale)('Delete')
|
|
182
172
|
})]
|
|
183
173
|
})]
|
|
184
174
|
})]
|
|
@@ -14,10 +14,8 @@ require("./index.css");
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
const _excluded = ["comments", "isFirstLoading"];
|
|
16
16
|
const Body = _ref => {
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
isFirstLoading
|
|
20
|
-
} = _ref,
|
|
17
|
+
let comments = _ref.comments,
|
|
18
|
+
isFirstLoading = _ref.isFirstLoading,
|
|
21
19
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
22
20
|
if (comments.length === 0) {
|
|
23
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -40,9 +40,7 @@ class Btns extends _react.default.Component {
|
|
|
40
40
|
this.props.onInsertElement(uploadFileMessage.url, 'image');
|
|
41
41
|
};
|
|
42
42
|
this.getCollaboratorContent = () => {
|
|
43
|
-
const
|
|
44
|
-
collaborators
|
|
45
|
-
} = this.props;
|
|
43
|
+
const collaborators = this.props.collaborators;
|
|
46
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
47
45
|
className: "comment-popover-list",
|
|
48
46
|
children: collaborators.map(participant => {
|
|
@@ -75,10 +73,9 @@ class Btns extends _react.default.Component {
|
|
|
75
73
|
return nextProps.isAdding !== this.props.isAdding || nextState.isShowPopover !== this.state.isShowPopover;
|
|
76
74
|
}
|
|
77
75
|
render() {
|
|
78
|
-
const
|
|
79
|
-
isAdding,
|
|
80
|
-
canUpdateParticipants
|
|
81
|
-
} = this.props;
|
|
76
|
+
const _this$props = this.props,
|
|
77
|
+
isAdding = _this$props.isAdding,
|
|
78
|
+
canUpdateParticipants = _this$props.canUpdateParticipants;
|
|
82
79
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
83
80
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
84
81
|
className: "dtable-ui-comment-input-btns",
|
|
@@ -17,10 +17,8 @@ class Footer extends _react.default.Component {
|
|
|
17
17
|
constructor(_props) {
|
|
18
18
|
super(_props);
|
|
19
19
|
this.initParticipants = props => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
collaborators
|
|
23
|
-
} = props;
|
|
20
|
+
const row = props.row,
|
|
21
|
+
collaborators = props.collaborators;
|
|
24
22
|
if (row._participants && Array.isArray(row._participants)) {
|
|
25
23
|
let rowParticipants = row._participants.filter(Boolean);
|
|
26
24
|
rowParticipants = rowParticipants.filter(participant => {
|
|
@@ -45,12 +43,8 @@ class Footer extends _react.default.Component {
|
|
|
45
43
|
};
|
|
46
44
|
this.addParticipant = email => {
|
|
47
45
|
if (!email) return;
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
} = this.state;
|
|
51
|
-
const {
|
|
52
|
-
collaborators
|
|
53
|
-
} = this.props;
|
|
46
|
+
const participants = this.state.participants;
|
|
47
|
+
const collaborators = this.props.collaborators;
|
|
54
48
|
const isExist = participants.some(participant => participant.email === email);
|
|
55
49
|
if (isExist) return;
|
|
56
50
|
let newParticipantList = participants.slice(0);
|
|
@@ -106,9 +100,7 @@ class Footer extends _react.default.Component {
|
|
|
106
100
|
const comment = this.convertComment(commentValue);
|
|
107
101
|
if (!comment.trim()) return;
|
|
108
102
|
this.addComment(comment);
|
|
109
|
-
const
|
|
110
|
-
username
|
|
111
|
-
} = window.dtable;
|
|
103
|
+
const username = window.dtable.username;
|
|
112
104
|
this.addParticipant(username);
|
|
113
105
|
};
|
|
114
106
|
this.onInsertElement = (content, nodeType) => {
|
|
@@ -130,13 +122,10 @@ class Footer extends _react.default.Component {
|
|
|
130
122
|
}
|
|
131
123
|
}
|
|
132
124
|
render() {
|
|
133
|
-
const
|
|
134
|
-
isAdding,
|
|
135
|
-
participants
|
|
136
|
-
|
|
137
|
-
const {
|
|
138
|
-
collaborators
|
|
139
|
-
} = this.props;
|
|
125
|
+
const _this$state = this.state,
|
|
126
|
+
isAdding = _this$state.isAdding,
|
|
127
|
+
participants = _this$state.participants;
|
|
128
|
+
const collaborators = this.props.collaborators;
|
|
140
129
|
const canUpdateParticipants = Boolean(this.props.onChangeParticipants);
|
|
141
130
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
142
131
|
className: "dtable-ui-comments-footer",
|
|
@@ -42,13 +42,10 @@ class Input extends _react.default.Component {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
this.setPopoverPosition = () => {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
right,
|
|
50
|
-
left
|
|
51
|
-
} = this.commentRef.getBoundingClientRect();
|
|
45
|
+
const caretPosition = this.state.caretPosition;
|
|
46
|
+
let _this$commentRef$getB = this.commentRef.getBoundingClientRect(),
|
|
47
|
+
right = _this$commentRef$getB.right,
|
|
48
|
+
left = _this$commentRef$getB.left;
|
|
52
49
|
this.commentPopoverRef.style.left = "".concat(caretPosition.x + FONT_SIZE_WIDTH, "px");
|
|
53
50
|
this.commentPopoverRef.style.top = "".concat(caretPosition.y - this.commentPopoverRef.offsetHeight, "px");
|
|
54
51
|
if (caretPosition.x + FONT_SIZE_WIDTH > right - PADDING_WIDTH) {
|
|
@@ -108,10 +105,9 @@ class Input extends _react.default.Component {
|
|
|
108
105
|
this.props.onInputBlur && this.props.onInputBlur();
|
|
109
106
|
};
|
|
110
107
|
this.setScrollTop = (offsetTop, itemOffsetHeight, mouseDownType) => {
|
|
111
|
-
let
|
|
112
|
-
offsetHeight,
|
|
113
|
-
scrollTop
|
|
114
|
-
} = this.commentPopoverRef;
|
|
108
|
+
let _this$commentPopoverR = this.commentPopoverRef,
|
|
109
|
+
offsetHeight = _this$commentPopoverR.offsetHeight,
|
|
110
|
+
scrollTop = _this$commentPopoverR.scrollTop;
|
|
115
111
|
if (mouseDownType === DOWN) {
|
|
116
112
|
if (offsetTop + itemOffsetHeight - scrollTop - offsetHeight + POPOVER_PADDING_HEIGHT > 0) {
|
|
117
113
|
let top = offsetTop + itemOffsetHeight - offsetHeight + POPOVER_PADDING_HEIGHT;
|
|
@@ -132,9 +128,7 @@ class Input extends _react.default.Component {
|
|
|
132
128
|
};
|
|
133
129
|
this.onInsertElement = (content, nodeType) => {
|
|
134
130
|
const selection = window.getSelection();
|
|
135
|
-
let
|
|
136
|
-
range
|
|
137
|
-
} = this.state;
|
|
131
|
+
let range = this.state.range;
|
|
138
132
|
let newRange = this.commentUtilities.onInsertElement({
|
|
139
133
|
selection,
|
|
140
134
|
range,
|
|
@@ -195,9 +189,7 @@ class Input extends _react.default.Component {
|
|
|
195
189
|
};
|
|
196
190
|
this.onSelectCollaborator = collaborator => {
|
|
197
191
|
const selection = window.getSelection();
|
|
198
|
-
let
|
|
199
|
-
range
|
|
200
|
-
} = this.state;
|
|
192
|
+
let range = this.state.range;
|
|
201
193
|
let callBack = () => {
|
|
202
194
|
this.onHidePopover();
|
|
203
195
|
this.props.addParticipant(collaborator.email);
|
|
@@ -279,14 +271,10 @@ class Input extends _react.default.Component {
|
|
|
279
271
|
});
|
|
280
272
|
};
|
|
281
273
|
this.checkMentionOperation = event => {
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
Escape,
|
|
287
|
-
LeftArrow,
|
|
288
|
-
RightArrow
|
|
289
|
-
} = _constants.KeyCodes;
|
|
274
|
+
const keyCode = event.keyCode;
|
|
275
|
+
const Escape = _constants.KeyCodes.Escape,
|
|
276
|
+
LeftArrow = _constants.KeyCodes.LeftArrow,
|
|
277
|
+
RightArrow = _constants.KeyCodes.RightArrow;
|
|
290
278
|
if (keyCode === Escape || keyCode === LeftArrow || keyCode === RightArrow) {
|
|
291
279
|
return false;
|
|
292
280
|
}
|
|
@@ -301,15 +289,11 @@ class Input extends _react.default.Component {
|
|
|
301
289
|
return this.onHidePopover();
|
|
302
290
|
}
|
|
303
291
|
const selection = window.getSelection();
|
|
304
|
-
const
|
|
305
|
-
collaborators
|
|
306
|
-
} = this.props;
|
|
292
|
+
const collaborators = this.props.collaborators;
|
|
307
293
|
let filteredCollaborators = [];
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
anchorOffset
|
|
312
|
-
} = selection;
|
|
294
|
+
const isCollapsed = selection.isCollapsed,
|
|
295
|
+
anchorNode = selection.anchorNode,
|
|
296
|
+
anchorOffset = selection.anchorOffset;
|
|
313
297
|
if (!isCollapsed || !anchorNode || !anchorNode.data) {
|
|
314
298
|
return this.onHidePopover();
|
|
315
299
|
}
|
|
@@ -342,10 +326,9 @@ class Input extends _react.default.Component {
|
|
|
342
326
|
};
|
|
343
327
|
this.handleSelectingCollaborator = (event, direction) => {
|
|
344
328
|
event.stopPropagation();
|
|
345
|
-
const
|
|
346
|
-
filteredCollaborators,
|
|
347
|
-
activeCollaboratorIndex
|
|
348
|
-
} = this.state;
|
|
329
|
+
const _this$state = this.state,
|
|
330
|
+
filteredCollaborators = _this$state.filteredCollaborators,
|
|
331
|
+
activeCollaboratorIndex = _this$state.activeCollaboratorIndex;
|
|
349
332
|
const collaboratorsLen = filteredCollaborators.length;
|
|
350
333
|
if (collaboratorsLen === 0) {
|
|
351
334
|
return;
|
|
@@ -367,10 +350,9 @@ class Input extends _react.default.Component {
|
|
|
367
350
|
});
|
|
368
351
|
};
|
|
369
352
|
this.handleSelectCollaborator = () => {
|
|
370
|
-
const
|
|
371
|
-
filteredCollaborators,
|
|
372
|
-
activeCollaboratorIndex
|
|
373
|
-
} = this.state;
|
|
353
|
+
const _this$state2 = this.state,
|
|
354
|
+
filteredCollaborators = _this$state2.filteredCollaborators,
|
|
355
|
+
activeCollaboratorIndex = _this$state2.activeCollaboratorIndex;
|
|
374
356
|
if (filteredCollaborators.length === 0) {
|
|
375
357
|
return;
|
|
376
358
|
}
|
|
@@ -396,15 +378,12 @@ class Input extends _react.default.Component {
|
|
|
396
378
|
document.removeEventListener('mousedown', this.hidePopover);
|
|
397
379
|
}
|
|
398
380
|
render() {
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
filteredCollaborators,
|
|
406
|
-
activeCollaboratorIndex
|
|
407
|
-
} = this.state;
|
|
381
|
+
const api = this.props.api;
|
|
382
|
+
const _this$state3 = this.state,
|
|
383
|
+
imageUrlList = _this$state3.imageUrlList,
|
|
384
|
+
largeImageIndex = _this$state3.largeImageIndex,
|
|
385
|
+
filteredCollaborators = _this$state3.filteredCollaborators,
|
|
386
|
+
activeCollaboratorIndex = _this$state3.activeCollaboratorIndex;
|
|
408
387
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
409
388
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
410
389
|
className: (0, _classnames.default)('dtable-ui-comment-input', {
|
|
@@ -28,11 +28,10 @@ class Participant extends _react.default.Component {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
const
|
|
32
|
-
participant,
|
|
33
|
-
index,
|
|
34
|
-
activeIndex
|
|
35
|
-
} = this.props;
|
|
31
|
+
const _this$props = this.props,
|
|
32
|
+
participant = _this$props.participant,
|
|
33
|
+
index = _this$props.index,
|
|
34
|
+
activeIndex = _this$props.activeIndex;
|
|
36
35
|
const active = index === activeIndex;
|
|
37
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
37
|
className: "comment-participant-item ".concat(active ? 'active' : ''),
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _DTableToolTip = _interopRequireDefault(require("../../../DTableToolTip"));
|
|
10
10
|
var _participant = _interopRequireDefault(require("./participant"));
|
|
11
11
|
var _participantSelect = _interopRequireDefault(require("./participant-select"));
|
|
12
12
|
var _lang = require("../../../lang");
|
|
@@ -30,11 +30,10 @@ class Participants extends _react.default.Component {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
const
|
|
34
|
-
canUpdate,
|
|
35
|
-
participants,
|
|
36
|
-
collaborators
|
|
37
|
-
} = this.props;
|
|
33
|
+
const _this$props = this.props,
|
|
34
|
+
canUpdate = _this$props.canUpdate,
|
|
35
|
+
participants = _this$props.participants,
|
|
36
|
+
collaborators = _this$props.collaborators;
|
|
38
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
39
38
|
className: "dtable-ui-comments-participants mb-2 position-relative",
|
|
40
39
|
ref: ref => this.ref = ref,
|
|
@@ -50,11 +49,7 @@ class Participants extends _react.default.Component {
|
|
|
50
49
|
"aria-hidden": "true",
|
|
51
50
|
className: "dtable-font dtable-icon-add"
|
|
52
51
|
})
|
|
53
|
-
}), this.addIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
54
|
-
delay: {
|
|
55
|
-
show: 0,
|
|
56
|
-
hide: 0
|
|
57
|
-
},
|
|
52
|
+
}), this.addIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableToolTip.default, {
|
|
58
53
|
target: this.addIcon,
|
|
59
54
|
placement: "bottom",
|
|
60
55
|
children: (0, _lang.getLocale)('Add_participants')
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
8
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var
|
|
10
|
+
var _DTableToolTip = _interopRequireDefault(require("../../../../DTableToolTip"));
|
|
10
11
|
require("./index.css");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const Participant = _ref => {
|
|
13
|
-
let
|
|
14
|
-
participant
|
|
15
|
-
} = _ref;
|
|
14
|
+
let participant = _ref.participant;
|
|
16
15
|
const ref = (0, _react.useRef)(null);
|
|
17
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
18
17
|
className: "dtable-ui-participant-avatar",
|
|
@@ -21,11 +20,7 @@ const Participant = _ref => {
|
|
|
21
20
|
className: "avatar",
|
|
22
21
|
ref: ref,
|
|
23
22
|
alt: "avatar"
|
|
24
|
-
}), ref.current && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
25
|
-
delay: {
|
|
26
|
-
show: 0,
|
|
27
|
-
hide: 0
|
|
28
|
-
},
|
|
23
|
+
}), ref.current && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableToolTip.default, {
|
|
29
24
|
target: ref,
|
|
30
25
|
placement: "bottom",
|
|
31
26
|
children: participant.name
|
|
@@ -32,18 +32,12 @@ class ParticipantSelect extends _react.Component {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
this.getFilteredParticipants = () => {
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
} = window.app.state;
|
|
38
|
-
let {
|
|
39
|
-
searchVal
|
|
40
|
-
} = this.state;
|
|
35
|
+
let collaborators = window.app.state.collaborators;
|
|
36
|
+
let searchVal = this.state.searchVal;
|
|
41
37
|
return (0, _dtableUtils.searchCollaborators)(collaborators, searchVal);
|
|
42
38
|
};
|
|
43
39
|
this.removeParticipant = participant => {
|
|
44
|
-
let
|
|
45
|
-
participants
|
|
46
|
-
} = this.state;
|
|
40
|
+
let participants = this.state.participants;
|
|
47
41
|
let updatedValue = participants.slice(0);
|
|
48
42
|
let participant_index = participants.findIndex(participantItem => participantItem.email === participant.email);
|
|
49
43
|
updatedValue.splice(participant_index, 1);
|
|
@@ -53,9 +47,7 @@ class ParticipantSelect extends _react.Component {
|
|
|
53
47
|
});
|
|
54
48
|
};
|
|
55
49
|
this.onChangeSearch = event => {
|
|
56
|
-
let
|
|
57
|
-
searchVal
|
|
58
|
-
} = this.state;
|
|
50
|
+
let searchVal = this.state.searchVal;
|
|
59
51
|
if (searchVal === event.target.value) {
|
|
60
52
|
return;
|
|
61
53
|
}
|
|
@@ -65,9 +57,7 @@ class ParticipantSelect extends _react.Component {
|
|
|
65
57
|
});
|
|
66
58
|
};
|
|
67
59
|
this.onSelectParticipant = participant => {
|
|
68
|
-
let
|
|
69
|
-
participants
|
|
70
|
-
} = this.state;
|
|
60
|
+
let participants = this.state.participants;
|
|
71
61
|
participants = participants.slice(0);
|
|
72
62
|
let participant_index = participants.findIndex(participantItem => participantItem.email === participant.email);
|
|
73
63
|
if (participant_index > -1) {
|
|
@@ -81,15 +71,13 @@ class ParticipantSelect extends _react.Component {
|
|
|
81
71
|
});
|
|
82
72
|
};
|
|
83
73
|
this.renderMenuContent = () => {
|
|
84
|
-
let
|
|
85
|
-
participants
|
|
86
|
-
} = this.state;
|
|
74
|
+
let participants = this.state.participants;
|
|
87
75
|
let filteredParticipants = this.getFilteredParticipants();
|
|
88
76
|
if (filteredParticipants.length > 0) {
|
|
89
77
|
return filteredParticipants.map(participant => {
|
|
90
78
|
let selectedIndex = participants.findIndex(item => item.email === participant.email);
|
|
91
79
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
92
|
-
className: "
|
|
80
|
+
className: "dtable-ui-participant-item",
|
|
93
81
|
onClick: this.onSelectParticipant.bind(this, participant),
|
|
94
82
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
95
83
|
className: "dtable-ui-participant-container",
|
|
@@ -138,9 +126,7 @@ class ParticipantSelect extends _react.Component {
|
|
|
138
126
|
this.unregisterHandlers();
|
|
139
127
|
}
|
|
140
128
|
renderParticipantList() {
|
|
141
|
-
const
|
|
142
|
-
collaborators
|
|
143
|
-
} = this.props;
|
|
129
|
+
const collaborators = this.props.collaborators;
|
|
144
130
|
const selectedParticipants = collaborators.filter(item => {
|
|
145
131
|
return this.state.participants.find(participant => participant.email === item.email);
|
|
146
132
|
});
|
|
@@ -158,9 +144,7 @@ class ParticipantSelect extends _react.Component {
|
|
|
158
144
|
});
|
|
159
145
|
}
|
|
160
146
|
render() {
|
|
161
|
-
const
|
|
162
|
-
target
|
|
163
|
-
} = this.props;
|
|
147
|
+
const target = this.props.target;
|
|
164
148
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
165
149
|
ref: ref => this.outerRef = ref,
|
|
166
150
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|