dtable-ui-component 6.0.91 → 6.0.93
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 +96 -70
- package/lib/ActivityIndicator/index.js +41 -33
- package/lib/AsyncUserSelect/index.css +122 -0
- package/lib/AsyncUserSelect/index.js +260 -0
- package/lib/AsyncUserSelect/user-item.js +55 -0
- package/lib/AutoNumberFormatter/index.js +5 -3
- package/lib/Badge/index.js +22 -18
- package/lib/ButtonFormatter/index.js +15 -10
- package/lib/CTimeFormatter/index.js +5 -3
- package/lib/CheckboxEditor/index.js +22 -13
- package/lib/CheckboxEditor/mb-editor.js +8 -6
- package/lib/CheckboxEditor/pc-editor.js +8 -6
- package/lib/CheckboxFormatter/index.js +8 -6
- package/lib/CollaboratorEditor/index.js +24 -15
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -13
- package/lib/CollaboratorEditor/pc-editor/index.js +51 -43
- package/lib/CollaboratorFormatter/index.js +8 -7
- package/lib/CollaboratorItem/index.js +21 -16
- package/lib/CollapsibleSettingLayout/index.css +0 -5
- package/lib/CollapsibleSettingLayout/index.js +17 -12
- package/lib/Comment/body/comment.js +79 -63
- package/lib/Comment/body/index.js +14 -11
- package/lib/Comment/footer/btns/index.js +68 -53
- package/lib/Comment/footer/index.js +30 -28
- package/lib/Comment/footer/input/index.js +49 -44
- package/lib/Comment/footer/input/participant/index.js +19 -14
- package/lib/Comment/footer/participants/index.js +31 -28
- package/lib/Comment/footer/participants/participant/index.js +18 -15
- package/lib/Comment/footer/participants/participant-select/index.js +68 -57
- package/lib/Comment/index.js +33 -28
- package/lib/Comment/utils/utilities.js +1 -1
- package/lib/CreatorFormatter/index.js +8 -7
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +60 -35
- package/lib/DTableColorPicker/index.js +135 -99
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableCommonAddTool/index.js +11 -8
- package/lib/DTableCustomFooter/index.js +5 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.css +1 -39
- package/lib/DTableCustomizeCollaboratorSelect/index.js +38 -32
- package/lib/DTableCustomizeSelect/index.js +51 -44
- package/lib/DTableEmptyTip/index.js +20 -16
- package/lib/DTableFiltersPopover/index.js +71 -61
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +74 -57
- package/lib/DTableFiltersPopover/utils/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +64 -49
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +49 -41
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +57 -47
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +35 -31
- package/lib/DTableFiltersPopover/widgets/filter-group.js +38 -32
- package/lib/DTableFiltersPopover/widgets/filter-item.js +125 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +1 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +18 -17
- package/lib/DTableFiltersPopover/widgets/rate-item.js +12 -9
- package/lib/DTableGroupSelect/index.js +52 -44
- package/lib/DTableGroupSelect/option.js +5 -3
- package/lib/DTableGroupSelect/select-option-group.css +0 -37
- package/lib/DTableGroupSelect/select-option-group.js +31 -25
- package/lib/DTableModalHeader/index.js +13 -9
- package/lib/DTablePopover/index.js +9 -6
- package/lib/DTableRadio/index.js +20 -17
- package/lib/DTableRadioGroup/index.js +22 -19
- package/lib/DTableSearchInput/index.js +23 -19
- package/lib/DTableSelect/dtable-select-label.js +12 -7
- package/lib/DTableSelect/index.js +2 -1
- package/lib/DTableSelect/utils.js +34 -20
- package/lib/DTableSwitch/index.css +1 -2
- package/lib/DTableSwitch/index.js +30 -18
- package/lib/DateEditor/index.js +25 -16
- package/lib/DateEditor/mb-editor/index.js +90 -68
- package/lib/DateEditor/pc-editor.js +39 -35
- package/lib/DateFormatter/index.js +5 -3
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DeleteTip/index.js +29 -20
- package/lib/DepartmentMultipleSelectEditor/index.js +57 -49
- package/lib/DepartmentSelectFilter/index.js +8 -1
- package/lib/DepartmentSingleSelectEditor/index.js +22 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +75 -55
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +78 -61
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +14 -11
- package/lib/DepartmentSingleSelectFormatter/index.js +13 -10
- package/lib/DigitalSignEditor/index.js +22 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +39 -24
- package/lib/DigitalSignEditor/pc-editor/index.js +44 -30
- package/lib/DigitalSignEditor/service.js +1 -1
- package/lib/DigitalSignEditor/signature-board/index.js +21 -17
- package/lib/DigitalSignFormatter/index.js +23 -19
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/Drawer/index.js +4 -1
- package/lib/DurationEditor/index.js +2 -1
- package/lib/DurationFormatter/index.js +5 -3
- package/lib/EditEditorButton/index.js +5 -3
- package/lib/EmailEditor/index.js +2 -1
- package/lib/EmailFormatter/index.js +5 -3
- package/lib/FieldDisplaySetting/field-item.js +26 -20
- package/lib/FieldDisplaySetting/index.css +0 -6
- package/lib/FieldDisplaySetting/index.js +50 -41
- package/lib/FileEditor/files-previewer/index.js +22 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +43 -28
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +24 -21
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +30 -24
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +13 -11
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +82 -64
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +81 -65
- package/lib/FileEditor/index.js +22 -13
- package/lib/FileEditor/mb-editor/index.js +43 -31
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +27 -20
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +108 -82
- package/lib/FileEditor/pc-editor/index.js +46 -36
- package/lib/FileFormatter/index.js +40 -36
- package/lib/FileItemFormatter/index.js +3 -2
- package/lib/FileUploader/index.js +23 -21
- package/lib/FormulaFormatter/index.js +24 -17
- package/lib/GeolocationEditor/index.js +31 -22
- package/lib/GeolocationEditor/map-editor-utils.js +2 -2
- package/lib/GeolocationEditor/mb-editor/country-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/index.js +22 -14
- package/lib/GeolocationEditor/mb-editor/location-editor.js +54 -34
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +102 -74
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +144 -110
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/province-editor.js +42 -27
- package/lib/GeolocationEditor/pc-editor/country-editor.js +38 -31
- package/lib/GeolocationEditor/pc-editor/index.js +26 -17
- package/lib/GeolocationEditor/pc-editor/location-editor.js +122 -96
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +99 -74
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +99 -76
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +139 -94
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +122 -85
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +89 -69
- package/lib/GeolocationEditor/pc-editor/province-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +9 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +15 -13
- package/lib/GeolocationFormatter/index.js +5 -3
- package/lib/HtmlLongTextFormatter/index.js +3 -2
- package/lib/Icon/index.js +9 -6
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +9 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +53 -45
- package/lib/ImageEditor/images-previewer/index.js +35 -32
- package/lib/ImageEditor/index.js +22 -13
- package/lib/ImageEditor/mb-editor/index.js +43 -31
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +19 -15
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +32 -24
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +102 -77
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +33 -30
- package/lib/ImageEditor/pc-editor/index.js +44 -32
- package/lib/ImageFormatter/images-lazy-load.js +12 -10
- package/lib/ImageFormatter/index.js +40 -34
- package/lib/ImagePreviewerLightbox/index.js +12 -8
- package/lib/ImageThumbnail/index.js +47 -39
- package/lib/InputItem/custom-input.js +32 -27
- package/lib/InputItem/custom-keyboard.js +68 -47
- package/lib/InputItem/index.js +81 -71
- package/lib/InputItem/input.js +5 -3
- package/lib/LastModifierFormatter/index.js +8 -7
- package/lib/LinkEditor/index.js +38 -32
- package/lib/LinkEditor/link-editor-option.js +25 -20
- package/lib/LinkEditor/mb-popover/index.js +53 -41
- package/lib/LinkEditor/pc-popover/index.js +41 -33
- package/lib/LinkFormatter/index.js +13 -10
- package/lib/List/index.js +15 -9
- package/lib/List/list-item.js +51 -42
- package/lib/Loading/index.js +2 -1
- package/lib/LongTextFormatter/index.js +3 -2
- package/lib/MBEditorHeader/index.js +19 -14
- package/lib/MTimeFormatter/index.js +5 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +22 -17
- package/lib/MobileFullScreenPage/index.js +11 -8
- package/lib/MobileModal/index.js +6 -3
- package/lib/MobileOperationSheet/index.js +28 -18
- package/lib/MobileSelector/empty/index.js +5 -3
- package/lib/MobileSelector/index.js +18 -12
- package/lib/MobileSelector/option/index.js +17 -12
- package/lib/MobileSelector/options/index.js +5 -3
- package/lib/MobileSelector/search/index.js +10 -8
- package/lib/MobileUpload/index.js +87 -67
- package/lib/Modal/alert.js +9 -6
- package/lib/Modal/modal.js +26 -22
- package/lib/Modal/operation.js +2 -1
- package/lib/Modal/prompt.js +76 -56
- package/lib/MultipleSelectEditor/index.js +4 -2
- package/lib/MultipleSelectFormatter/index.js +8 -7
- package/lib/NotificationPopover/index.js +43 -32
- package/lib/NumberEditor/index.js +2 -1
- package/lib/NumberFormatter/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +26 -22
- package/lib/Picker/index.js +2 -1
- package/lib/Popover/index.js +8 -5
- package/lib/Popover/item.js +26 -19
- package/lib/Progress/index.js +17 -15
- package/lib/Radio/Radio.js +12 -8
- package/lib/Radio/RadioItem.js +11 -5
- package/lib/RateFormatter/index.js +8 -7
- package/lib/RoleStatusEditor/index.js +36 -31
- package/lib/RowExpand/index.js +16 -9
- package/lib/RowExpandDialog/body/index.js +53 -42
- package/lib/RowExpandDialog/column-content/index.js +34 -25
- package/lib/RowExpandDialog/header/index.js +29 -22
- package/lib/RowExpandDialog/index.js +43 -30
- package/lib/RowExpandEditor/add-btn/index.js +16 -9
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +5 -3
- package/lib/RowExpandEditor/add-btn/pc-add-btn/index.js +8 -5
- package/lib/RowExpandEditor/checkbox-editor/index.js +16 -9
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +10 -8
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +2 -1
- package/lib/RowExpandEditor/collaborator-editor/index.js +16 -9
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +19 -17
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +52 -47
- package/lib/RowExpandEditor/date-editor/index.js +16 -9
- package/lib/RowExpandEditor/date-editor/mb-editor.js +20 -15
- package/lib/RowExpandEditor/date-editor/pc-editor.js +24 -21
- package/lib/RowExpandEditor/department-editor/index.js +16 -9
- package/lib/RowExpandEditor/department-editor/mb-editor.js +27 -22
- package/lib/RowExpandEditor/department-editor/pc-editor.js +35 -29
- package/lib/RowExpandEditor/digital-sign-editor/index.js +16 -9
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +34 -32
- package/lib/RowExpandEditor/duration-editor/index.js +16 -9
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +15 -12
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +17 -13
- package/lib/RowExpandEditor/email-editor/index.js +16 -9
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -18
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +21 -19
- package/lib/RowExpandEditor/file-editor/index.js +16 -9
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +22 -20
- package/lib/RowExpandEditor/geolocation-editor/index.js +16 -9
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +12 -9
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +20 -17
- package/lib/RowExpandEditor/image-editor/index.js +16 -9
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +29 -25
- package/lib/RowExpandEditor/index.js +4 -2
- package/lib/RowExpandEditor/long-text-editor/index.js +16 -9
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +27 -16
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +22 -18
- package/lib/RowExpandEditor/multiple-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +26 -23
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +82 -68
- package/lib/RowExpandEditor/number-editor/index.js +16 -9
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +10 -7
- package/lib/RowExpandEditor/number-editor/pc-editor.js +6 -4
- package/lib/RowExpandEditor/rate-editor/index.js +16 -9
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +10 -8
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +12 -10
- package/lib/RowExpandEditor/right-angle/index.js +8 -6
- package/lib/RowExpandEditor/single-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +30 -23
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +43 -35
- package/lib/RowExpandEditor/text-editor/index.js +16 -9
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +11 -9
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +16 -12
- package/lib/RowExpandEditor/url-editor/index.js +16 -9
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +20 -18
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +21 -19
- package/lib/RowExpandFormatter/department-formatter/index.js +14 -5
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -1
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +15 -11
- package/lib/RowExpandFormatter/email-formatter/index.js +12 -9
- package/lib/RowExpandFormatter/file-formatter/index.js +15 -14
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +43 -36
- package/lib/RowExpandFormatter/formula-formatter/index.js +41 -33
- package/lib/RowExpandFormatter/image-formatter/index.js +30 -27
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +47 -39
- package/lib/RowExpandFormatter/index.js +132 -115
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +3 -2
- package/lib/RowExpandFormatter/link-formatter/index.js +70 -67
- package/lib/RowExpandFormatter/rate-formatter/index.js +8 -7
- package/lib/RowExpandFormatter/url-formatter/index.js +12 -9
- package/lib/RowExpandView/body/index.js +39 -33
- package/lib/RowExpandView/column-content/index.js +10 -5
- package/lib/RowExpandView/index.js +27 -16
- package/lib/SelectItem/index.js +16 -12
- package/lib/SelectOptionGroup/index.css +4 -2
- package/lib/SelectOptionGroup/index.js +39 -32
- package/lib/SelectOptionGroup/option.js +5 -3
- package/lib/SelectedDepartments/index.js +54 -44
- package/lib/SimpleLongTextFormatter/index.js +39 -30
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +11 -8
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -2
- package/lib/SingleSelectEditor/index.js +4 -2
- package/lib/SingleSelectFormatter/index.js +6 -4
- package/lib/SvgIcon/index.js +5 -2
- package/lib/TabBar/Tab.js +28 -21
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +8 -5
- package/lib/TextEditor/index.js +21 -18
- package/lib/TextFormatter/index.js +5 -3
- package/lib/TextareaItem/index.js +49 -40
- package/lib/Toast/index.js +20 -14
- package/lib/UploadProgress/index.js +2 -1
- package/lib/UrlEditor/index.js +2 -1
- package/lib/UrlFormatter/index.js +5 -3
- package/lib/formatterConfig/base-formatter-config.js +24 -23
- package/lib/formatterConfig/index.js +3 -2
- package/lib/index.js +7 -0
- package/lib/locales/de.json +5 -1
- package/lib/locales/en.json +5 -1
- package/lib/locales/es.json +6 -2
- package/lib/locales/fr.json +5 -1
- package/lib/locales/pt.json +5 -1
- package/lib/locales/ru.json +5 -1
- package/lib/locales/zh-CN.json +5 -1
- package/lib/select-editor/index.js +22 -13
- package/lib/select-editor/mb-editor/index.js +22 -16
- package/lib/select-editor/pc-editor/index.js +75 -61
- package/lib/toaster/alert.js +25 -16
- package/lib/toaster/toast.js +27 -23
- package/lib/toaster/toastManager.js +17 -14
- package/lib/toaster/toaster.js +4 -1
- package/lib/utils/class.js +3 -3
- package/lib/utils/object-utils.js +1 -1
- package/lib/utils/url.js +4 -4
- package/package.json +13 -29
|
@@ -11,6 +11,7 @@ var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
|
11
11
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
12
12
|
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
13
13
|
require("./index.css");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
const CollaboratorEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
15
16
|
let {
|
|
16
17
|
isMobile,
|
|
@@ -18,24 +19,32 @@ const CollaboratorEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
18
19
|
...props
|
|
19
20
|
} = _ref;
|
|
20
21
|
const value = Array.isArray(oldValue) ? oldValue : [];
|
|
21
|
-
if (isMobile === false) return /*#__PURE__*/
|
|
22
|
+
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
23
|
+
...props,
|
|
22
24
|
value: value,
|
|
23
25
|
ref: ref
|
|
24
|
-
})
|
|
25
|
-
if (isMobile === true) return /*#__PURE__*/
|
|
26
|
+
});
|
|
27
|
+
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
28
|
+
...props,
|
|
26
29
|
value: value,
|
|
27
30
|
ref: ref
|
|
28
|
-
})
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
});
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
33
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
34
|
+
query: "(min-width: 768px)",
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
36
|
+
...props,
|
|
37
|
+
value: value,
|
|
38
|
+
ref: ref
|
|
39
|
+
})
|
|
40
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
41
|
+
query: "(max-width: 768px)",
|
|
42
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
43
|
+
...props,
|
|
44
|
+
value: value,
|
|
45
|
+
ref: ref
|
|
46
|
+
})
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
40
49
|
});
|
|
41
50
|
var _default = exports.default = CollaboratorEditor;
|
|
@@ -11,6 +11,7 @@ var _MobileSelector = _interopRequireDefault(require("../../MobileSelector"));
|
|
|
11
11
|
var _lang = require("../../lang");
|
|
12
12
|
var _CollaboratorItem = _interopRequireDefault(require("../../CollaboratorItem"));
|
|
13
13
|
require("./index.css");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
const {
|
|
15
16
|
Search,
|
|
16
17
|
Option,
|
|
@@ -42,13 +43,13 @@ class MBCollaboratorEditor extends _react.default.Component {
|
|
|
42
43
|
} = this.props;
|
|
43
44
|
return collaborators.map(collaborator => {
|
|
44
45
|
const isSelected = value.includes(collaborator.email);
|
|
45
|
-
return /*#__PURE__*/
|
|
46
|
-
key: collaborator.email,
|
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Option, {
|
|
47
47
|
isSelected: isSelected,
|
|
48
|
-
onChange: this.onChange.bind(this, collaborator)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
onChange: this.onChange.bind(this, collaborator),
|
|
49
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
|
|
50
|
+
collaborator: collaborator
|
|
51
|
+
})
|
|
52
|
+
}, collaborator.email);
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
55
|
this.state = {
|
|
@@ -71,15 +72,20 @@ class MBCollaboratorEditor extends _react.default.Component {
|
|
|
71
72
|
searchVal
|
|
72
73
|
} = this.state;
|
|
73
74
|
const displayCollaborators = searchVal ? (0, _dtableUtils.searchCollaborators)(collaborators, searchVal) : collaborators;
|
|
74
|
-
return /*#__PURE__*/
|
|
75
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MobileSelector.default, {
|
|
75
76
|
onClose: this.props.onClose,
|
|
76
77
|
title: column.name,
|
|
77
|
-
className: "dtable-ui-mobile-collaborator-editor"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
className: "dtable-ui-mobile-collaborator-editor",
|
|
79
|
+
children: [collaborators.length > 10 && /*#__PURE__*/(0, _jsxRuntime.jsx)(Search, {
|
|
80
|
+
value: searchVal,
|
|
81
|
+
placeholder: (0, _lang.getLocale)('Search_collaborator'),
|
|
82
|
+
onChange: this.onChangeSearch
|
|
83
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Options, {
|
|
84
|
+
children: [displayCollaborators.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(Empty, {
|
|
85
|
+
children: (0, _lang.getLocale)('No_collaborators_available')
|
|
86
|
+
}), displayCollaborators.length > 0 && this.renderCollaborators(displayCollaborators)]
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
83
89
|
}
|
|
84
90
|
}
|
|
85
91
|
MBCollaboratorEditor.defaultProps = {
|
|
@@ -15,6 +15,7 @@ var _lang = require("../../lang");
|
|
|
15
15
|
var _constants = require("../../constants");
|
|
16
16
|
var _objectUtils = _interopRequireDefault(require("../../utils/object-utils"));
|
|
17
17
|
require("./index.css");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
class PCCollaboratorEditor extends _react.default.Component {
|
|
19
20
|
constructor(props) {
|
|
20
21
|
super(props);
|
|
@@ -175,7 +176,7 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
175
176
|
bottom
|
|
176
177
|
} = this.ref.getBoundingClientRect();
|
|
177
178
|
if (bottom > window.innerHeight) {
|
|
178
|
-
this.ref.style.top =
|
|
179
|
+
this.ref.style.top = `${window.innerHeight - bottom}px`;
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
182
|
if (this.container && this.collaboratorItem) {
|
|
@@ -206,50 +207,57 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
206
207
|
value = [],
|
|
207
208
|
target
|
|
208
209
|
} = this.props;
|
|
209
|
-
const dom = /*#__PURE__*/
|
|
210
|
+
const dom = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
210
211
|
className: "dtable-ui-editor-container dtable-ui-collaborator-editor-container",
|
|
211
|
-
ref: ref => this.ref = ref
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
212
|
+
ref: ref => this.ref = ref,
|
|
213
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
214
|
+
className: "collaborator-search-container",
|
|
215
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
|
|
216
|
+
autoFocus: true,
|
|
217
|
+
placeholder: (0, _lang.getLocale)('Search_collaborator'),
|
|
218
|
+
value: searchValue,
|
|
219
|
+
onChange: this.onValueChanged,
|
|
220
|
+
onKeyDown: this.onKeyDown
|
|
221
|
+
})
|
|
222
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
223
|
+
className: "collaborator-list-container",
|
|
224
|
+
ref: ref => this.container = ref,
|
|
225
|
+
children: [this.filteredCollaborators.length > 0 && this.filteredCollaborators.map((collaborator, index) => {
|
|
226
|
+
const isSelected = value.includes(collaborator.email);
|
|
227
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
228
|
+
className: (0, _classnames.default)('collaborator-item-container', {
|
|
229
|
+
'collaborator-item-container-highlight': index === highlightIndex
|
|
230
|
+
}),
|
|
231
|
+
ref: ref => this.collaboratorItem = ref,
|
|
232
|
+
onClick: this.onCollaboratorClick.bind(this, collaborator),
|
|
233
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
|
|
234
|
+
collaborator: collaborator
|
|
235
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
236
|
+
className: "collaborator-checked",
|
|
237
|
+
children: isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
238
|
+
className: "dtable-font dtable-icon-check-mark"
|
|
239
|
+
})
|
|
240
|
+
})]
|
|
241
|
+
}, collaborator.email);
|
|
242
|
+
}), this.filteredCollaborators.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
243
|
+
className: "dtable-ui-editor-no-search-result",
|
|
244
|
+
children: (0, _lang.getLocale)('No_collaborators_available')
|
|
245
|
+
})]
|
|
246
|
+
})]
|
|
247
|
+
});
|
|
242
248
|
if (isInModal) {
|
|
243
|
-
return /*#__PURE__*/
|
|
244
|
-
ref: ref => this.parent = ref
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
250
|
+
ref: ref => this.parent = ref,
|
|
251
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
252
|
+
placement: "bottom-start",
|
|
253
|
+
isOpen: true,
|
|
254
|
+
target: target,
|
|
255
|
+
hideArrow: true,
|
|
256
|
+
fade: false,
|
|
257
|
+
className: "dtable-ui dtable-ui-row-expand-select-editor-popover",
|
|
258
|
+
children: dom
|
|
259
|
+
})
|
|
260
|
+
});
|
|
253
261
|
}
|
|
254
262
|
return dom;
|
|
255
263
|
}
|
|
@@ -10,6 +10,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _CollaboratorItem = _interopRequireDefault(require("../CollaboratorItem"));
|
|
11
11
|
var _default_avatar = _interopRequireDefault(require("../assets/images/avatar/default_avatar.png"));
|
|
12
12
|
require("./index.css");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
// there will be there conditions
|
|
14
15
|
// 1 value is not exist, typeof value is array, but it's length is 0
|
|
15
16
|
// 2 value is exist, but can't find in collaborators
|
|
@@ -36,12 +37,11 @@ class CollaboratorFormatter extends _react.default.PureComponent {
|
|
|
36
37
|
avatar_url: _default_avatar.default
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
|
-
return /*#__PURE__*/
|
|
40
|
-
key: index,
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
|
|
41
41
|
collaborator: collaborator,
|
|
42
42
|
enableDeleteCollaborator: enableDeleteCollaborator,
|
|
43
43
|
onDeleteCollaborator: onDeleteCollaborator
|
|
44
|
-
});
|
|
44
|
+
}, index);
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
}
|
|
@@ -52,14 +52,15 @@ class CollaboratorFormatter extends _react.default.PureComponent {
|
|
|
52
52
|
} = this.props;
|
|
53
53
|
const classname = (0, _classnames.default)('dtable-ui cell-formatter-container collaborator-formatter', containerClassName);
|
|
54
54
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
55
|
-
return /*#__PURE__*/
|
|
55
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
56
56
|
className: classname
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
const collaborators = this.getCollaborators();
|
|
60
|
-
return /*#__PURE__*/
|
|
61
|
-
className: classname
|
|
62
|
-
|
|
60
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
61
|
+
className: classname,
|
|
62
|
+
children: collaborators
|
|
63
|
+
});
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
CollaboratorFormatter.defaultProps = {
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
require("./index.css");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
class CollaboratorItem extends _react.default.Component {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -23,23 +24,27 @@ class CollaboratorItem extends _react.default.Component {
|
|
|
23
24
|
collaborator,
|
|
24
25
|
enableDeleteCollaborator
|
|
25
26
|
} = this.props;
|
|
26
|
-
return /*#__PURE__*/
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
27
28
|
title: collaborator.name,
|
|
28
|
-
className: (0, _classnames.default)('dtable-ui collaborator-item', className)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
className: (0, _classnames.default)('dtable-ui collaborator-item', className),
|
|
30
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
31
|
+
className: "collaborator-avatar",
|
|
32
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
33
|
+
className: "collaborator-avatar-icon",
|
|
34
|
+
alt: collaborator.name,
|
|
35
|
+
src: collaborator.avatar_url
|
|
36
|
+
})
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
38
|
+
className: "collaborator-name",
|
|
39
|
+
children: collaborator.name
|
|
40
|
+
}), enableDeleteCollaborator && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
41
|
+
className: "collaborator-remove",
|
|
42
|
+
onClick: this.onDeleteCollaborator,
|
|
43
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
44
|
+
className: "dtable-font dtable-icon-fork-number"
|
|
45
|
+
})
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
43
48
|
}
|
|
44
49
|
}
|
|
45
50
|
CollaboratorItem.defaultProps = {
|
|
@@ -9,6 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const CollapsibleSettingLayout = props => {
|
|
13
14
|
const {
|
|
14
15
|
className,
|
|
@@ -16,17 +17,21 @@ const CollapsibleSettingLayout = props => {
|
|
|
16
17
|
children
|
|
17
18
|
} = props;
|
|
18
19
|
const [isShowSettings, setIsShowSettings] = (0, _react.useState)(true);
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
className: (0, _classnames.default)('collapsible-setting-layout', className)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
|
+
className: (0, _classnames.default)('collapsible-setting-layout', className),
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
23
|
+
className: "collapsible-setting-layout-header seatable-collapse-header w-100 d-flex align-items-center",
|
|
24
|
+
onClick: () => setIsShowSettings(!isShowSettings),
|
|
25
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
26
|
+
className: "collapsible-setting-layout-title",
|
|
27
|
+
children: title
|
|
28
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
29
|
+
className: `dtable-font dtable-icon-right${isShowSettings ? ' dtable-icon-spin' : ''}`
|
|
30
|
+
})]
|
|
31
|
+
}), isShowSettings && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
|
+
className: "collapsible-setting-layout-body mt-3 pl-2",
|
|
33
|
+
children: children || ''
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
31
36
|
};
|
|
32
37
|
var _default = exports.default = CollapsibleSettingLayout;
|
|
@@ -11,6 +11,7 @@ var _reactstrap = require("reactstrap");
|
|
|
11
11
|
var _seafileEditor = require("@seafile/seafile-editor");
|
|
12
12
|
var _ImagePreviewerLightbox = _interopRequireDefault(require("../../ImagePreviewerLightbox"));
|
|
13
13
|
var _lang = require("../../lang");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
class Comment extends _react.PureComponent {
|
|
15
16
|
constructor(props) {
|
|
16
17
|
super(props);
|
|
@@ -83,17 +84,22 @@ class Comment extends _react.PureComponent {
|
|
|
83
84
|
collaborators
|
|
84
85
|
} = this.props;
|
|
85
86
|
let authorInfo = Array.isArray(collaborators) && collaborators.find(collaborator => comment.author === collaborator.email);
|
|
86
|
-
return /*#__PURE__*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
88
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
89
|
+
className: "avatar",
|
|
90
|
+
src: authorInfo.avatar_url,
|
|
91
|
+
alt: ""
|
|
92
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
93
|
+
className: "reviewer-info",
|
|
94
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
|
+
className: "reviewer-name",
|
|
96
|
+
children: authorInfo.name
|
|
97
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
98
|
+
className: "review-time",
|
|
99
|
+
children: comment.create_at
|
|
100
|
+
})]
|
|
101
|
+
})]
|
|
102
|
+
});
|
|
97
103
|
};
|
|
98
104
|
this.onCommentClick = e => {
|
|
99
105
|
// click participant link, page shouldn't jump
|
|
@@ -133,58 +139,68 @@ class Comment extends _react.PureComponent {
|
|
|
133
139
|
const moreOperationsText = (0, _lang.getLocale)('More_operations');
|
|
134
140
|
if (!this.isCommentUserExist(comment)) return null;
|
|
135
141
|
const isShowDropdownMenu = comment.author === username || !comment.resolved;
|
|
136
|
-
return /*#__PURE__*/
|
|
137
|
-
className:
|
|
138
|
-
id: comment.id
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
142
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
143
|
+
className: `dtable-ui-comment-container ${comment.resolved ? 'dtable-ui-comment-container-resolved' : ''}`,
|
|
144
|
+
id: comment.id,
|
|
145
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
146
|
+
className: "dtable-ui-comment-info",
|
|
147
|
+
children: [this.renderInfo(comment), isShowDropdownMenu && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Dropdown, {
|
|
148
|
+
isOpen: this.state.dropdownOpen,
|
|
149
|
+
size: "sm",
|
|
150
|
+
className: "dtable-ui-comments-dropdown",
|
|
151
|
+
toggle: this.toggleDropDownMenu,
|
|
152
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownToggle, {
|
|
153
|
+
className: "dtable-ui-comments-dropdown-btn",
|
|
154
|
+
role: "button",
|
|
155
|
+
"data-toggle": "dropdown",
|
|
156
|
+
title: moreOperationsText,
|
|
157
|
+
"aria-label": moreOperationsText,
|
|
158
|
+
"aria-expanded": this.state.dropdownOpen,
|
|
159
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
160
|
+
className: "dtable-font dtable-icon-more-level",
|
|
161
|
+
title: moreOperationsText,
|
|
162
|
+
"aria-label": moreOperationsText
|
|
163
|
+
})
|
|
164
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownMenu, {
|
|
165
|
+
className: "dtable-dropdown-menu dropdown-menu dtable-ui-comment-dropdown-list",
|
|
166
|
+
children: [!comment.resolved && onResolve && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownItem, {
|
|
167
|
+
onClick: event => onResolve(event, comment.id),
|
|
168
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
169
|
+
className: "comment-icon dtable-font dtable-icon-mark mr-2"
|
|
170
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
171
|
+
className: "comment-text",
|
|
172
|
+
children: (0, _lang.getLocale)('Mark_as_resolved')
|
|
173
|
+
})]
|
|
174
|
+
}), comment.author === username && onDelete && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownItem, {
|
|
175
|
+
onClick: event => onDelete(event, comment.id),
|
|
176
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
177
|
+
className: "comment-icon dtable-font dtable-icon-delete mr-2"
|
|
178
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
179
|
+
className: "comment-text",
|
|
180
|
+
children: (0, _lang.getLocale)('Delete')
|
|
181
|
+
})]
|
|
182
|
+
})]
|
|
183
|
+
})]
|
|
184
|
+
})]
|
|
185
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
186
|
+
className: "dtable-ui-comment-content",
|
|
187
|
+
onClick: e => this.onCommentClick(e),
|
|
188
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
189
|
+
className: "dtable-ui-comment-content-container",
|
|
190
|
+
ref: ref => this.commentContentRef = ref,
|
|
191
|
+
onClick: this.handleImageZoom,
|
|
192
|
+
dangerouslySetInnerHTML: {
|
|
193
|
+
__html: this.state.commentContent
|
|
194
|
+
}
|
|
195
|
+
})
|
|
196
|
+
}), this.state.isShowLargeImage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImagePreviewerLightbox.default, {
|
|
197
|
+
imageItems: this.state.imageUrlList,
|
|
198
|
+
imageIndex: this.state.largeImageIndex,
|
|
199
|
+
closeImagePopup: this.hideLargeImage,
|
|
200
|
+
moveToPrevImage: this.movePrev,
|
|
201
|
+
moveToNextImage: this.moveNext
|
|
202
|
+
})]
|
|
203
|
+
});
|
|
188
204
|
}
|
|
189
205
|
}
|
|
190
206
|
var _default = exports.default = Comment;
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _lang = require("../../lang");
|
|
10
10
|
var _comment = _interopRequireDefault(require("./comment"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const Body = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
comments,
|
|
@@ -16,17 +17,19 @@ const Body = _ref => {
|
|
|
16
17
|
...props
|
|
17
18
|
} = _ref;
|
|
18
19
|
if (comments.length === 0) {
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
className: "dtable-ui-comments-empty"
|
|
21
|
-
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21
|
+
className: "dtable-ui-comments-empty",
|
|
22
|
+
children: (0, _lang.getLocale)('No_comment_yet')
|
|
23
|
+
});
|
|
22
24
|
}
|
|
23
|
-
return /*#__PURE__*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
26
|
+
children: comments.map((comment, index) => {
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_comment.default, {
|
|
28
|
+
...props,
|
|
29
|
+
comment: comment,
|
|
30
|
+
isScrollBottom: index === comments.length - 1 && isFirstLoading
|
|
31
|
+
}, comment.id);
|
|
32
|
+
})
|
|
33
|
+
});
|
|
31
34
|
};
|
|
32
35
|
var _default = exports.default = Body;
|