dtable-ui-component 6.0.89 → 6.0.92
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 +53 -42
- 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 +134 -116
- 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 +8 -4
- 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
|
@@ -12,6 +12,7 @@ var _dtableUtils = require("dtable-utils");
|
|
|
12
12
|
var _lang = require("../../../../lang");
|
|
13
13
|
var _CollaboratorItem = _interopRequireDefault(require("../../../../CollaboratorItem"));
|
|
14
14
|
require("./index.css");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
class ParticipantSelect extends _react.Component {
|
|
16
17
|
constructor(props) {
|
|
17
18
|
super(props);
|
|
@@ -87,31 +88,36 @@ class ParticipantSelect extends _react.Component {
|
|
|
87
88
|
if (filteredParticipants.length > 0) {
|
|
88
89
|
return filteredParticipants.map(participant => {
|
|
89
90
|
let selectedIndex = participants.findIndex(item => item.email === participant.email);
|
|
90
|
-
return /*#__PURE__*/
|
|
91
|
-
key: participant.email,
|
|
91
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
92
92
|
className: "dropdown-item dtable-ui-participant-item",
|
|
93
|
-
onClick: this.onSelectParticipant.bind(this, participant)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
93
|
+
onClick: this.onSelectParticipant.bind(this, participant),
|
|
94
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
95
|
+
className: "dtable-ui-participant-container",
|
|
96
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
97
|
+
className: "dtable-ui-participant",
|
|
98
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
99
|
+
className: "dtable-ui-participant-avatar",
|
|
100
|
+
alt: participant.name,
|
|
101
|
+
src: participant.avatar_url
|
|
102
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
103
|
+
className: "dtable-ui-participant-name text-truncate",
|
|
104
|
+
children: participant.name
|
|
105
|
+
})]
|
|
106
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
107
|
+
className: "dtable-ui-participant-check-icon",
|
|
108
|
+
children: selectedIndex > -1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
109
|
+
"aria-hidden": "true",
|
|
110
|
+
className: "dtable-font dtable-icon-check-mark"
|
|
111
|
+
})
|
|
112
|
+
})]
|
|
113
|
+
})
|
|
114
|
+
}, participant.email);
|
|
110
115
|
});
|
|
111
116
|
} else {
|
|
112
|
-
return /*#__PURE__*/
|
|
113
|
-
className: "none-search-result"
|
|
114
|
-
|
|
117
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
118
|
+
className: "none-search-result",
|
|
119
|
+
children: (0, _lang.getLocale)('No_collaborators_available')
|
|
120
|
+
});
|
|
115
121
|
}
|
|
116
122
|
};
|
|
117
123
|
this.state = {
|
|
@@ -121,12 +127,12 @@ class ParticipantSelect extends _react.Component {
|
|
|
121
127
|
}
|
|
122
128
|
componentDidMount() {
|
|
123
129
|
let collaboratorListHeight = this.participantsRef.offsetHeight;
|
|
124
|
-
this.participantsRef.style.top =
|
|
130
|
+
this.participantsRef.style.top = `${-collaboratorListHeight + 10}px`;
|
|
125
131
|
this.registerHandlers();
|
|
126
132
|
}
|
|
127
133
|
componentDidUpdate() {
|
|
128
134
|
let collaboratorListHeight = this.participantsRef.offsetHeight;
|
|
129
|
-
this.participantsRef.style.top =
|
|
135
|
+
this.participantsRef.style.top = `${-collaboratorListHeight + 10}px`;
|
|
130
136
|
}
|
|
131
137
|
componentWillUnmount() {
|
|
132
138
|
this.unregisterHandlers();
|
|
@@ -139,44 +145,49 @@ class ParticipantSelect extends _react.Component {
|
|
|
139
145
|
return this.state.participants.find(participant => participant.email === item.email);
|
|
140
146
|
});
|
|
141
147
|
if (selectedParticipants.length === 0) return null;
|
|
142
|
-
return /*#__PURE__*/
|
|
143
|
-
className: "dtable-ui-participants-editor-header"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
})
|
|
152
|
-
})
|
|
148
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
149
|
+
className: "dtable-ui-participants-editor-header",
|
|
150
|
+
children: selectedParticipants.map(participant => {
|
|
151
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
|
|
152
|
+
collaborator: participant,
|
|
153
|
+
className: "dtable-ui-participant",
|
|
154
|
+
enableDeleteCollaborator: true,
|
|
155
|
+
onDeleteCollaborator: this.removeParticipant
|
|
156
|
+
}, participant.email);
|
|
157
|
+
})
|
|
158
|
+
});
|
|
153
159
|
}
|
|
154
160
|
render() {
|
|
155
161
|
const {
|
|
156
162
|
target
|
|
157
163
|
} = this.props;
|
|
158
|
-
return /*#__PURE__*/
|
|
159
|
-
ref: ref => this.outerRef = ref
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
164
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
165
|
+
ref: ref => this.outerRef = ref,
|
|
166
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
167
|
+
placement: "top",
|
|
168
|
+
isOpen: true,
|
|
169
|
+
target: target,
|
|
170
|
+
fade: false,
|
|
171
|
+
hideArrow: true,
|
|
172
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
173
|
+
className: "dropdown-menu dtable-ui-participants-editor show m-0 p-0",
|
|
174
|
+
ref: ref => this.participantsRef = ref,
|
|
175
|
+
children: [this.renderParticipantList(), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
176
|
+
className: "dtable-ui-participants-editor-search",
|
|
177
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
178
|
+
className: "form-control",
|
|
179
|
+
type: "text",
|
|
180
|
+
placeholder: (0, _lang.getLocale)('Search_collaborator'),
|
|
181
|
+
value: this.state.searchVal,
|
|
182
|
+
onChange: this.onChangeSearch
|
|
183
|
+
})
|
|
184
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
185
|
+
className: "dtable-ui-participants-editor-participants-container",
|
|
186
|
+
children: this.renderMenuContent()
|
|
187
|
+
})]
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
});
|
|
180
191
|
}
|
|
181
192
|
}
|
|
182
193
|
var _default = exports.default = ParticipantSelect;
|
package/lib/Comment/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var _model = _interopRequireDefault(require("./model"));
|
|
|
15
15
|
var _utils = require("../utils/utils");
|
|
16
16
|
var _lang = require("../lang");
|
|
17
17
|
require("./index.css");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
const ROW_COMMENT = 'row_comment';
|
|
19
20
|
class Comment extends _react.default.Component {
|
|
20
21
|
constructor(_props) {
|
|
@@ -271,34 +272,38 @@ class Comment extends _react.default.Component {
|
|
|
271
272
|
api,
|
|
272
273
|
uploadFile
|
|
273
274
|
} = this.props;
|
|
274
|
-
return /*#__PURE__*/
|
|
275
|
-
className: "dtable-ui-comments h-100 w-100"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
275
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
276
|
+
className: "dtable-ui-comments h-100 w-100",
|
|
277
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
278
|
+
className: "dtable-ui-comments-body",
|
|
279
|
+
onScroll: this.onScroll,
|
|
280
|
+
ref: ref => this.body = ref,
|
|
281
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
282
|
+
ref: ref => this.bodyContent = ref,
|
|
283
|
+
children: isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
284
|
+
className: "w-100 h-100 d-flex align-items-center justify-content-center",
|
|
285
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.default, {})
|
|
286
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_body.default, {
|
|
287
|
+
isFirstLoading: isFirstLoading,
|
|
288
|
+
comments: comments,
|
|
289
|
+
collaborators: collaborators,
|
|
290
|
+
onDelete: this.deleteComment,
|
|
291
|
+
onResolve: this.resolveComment,
|
|
292
|
+
onScrollBottom: this.onScrollBottom
|
|
293
|
+
})
|
|
294
|
+
})
|
|
295
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_footer.default, {
|
|
296
|
+
autoFocusInput: autoFocusInput,
|
|
297
|
+
collaborators: collaborators,
|
|
298
|
+
row: row,
|
|
299
|
+
columns: columns,
|
|
300
|
+
addComment: this.addComment,
|
|
301
|
+
onChangeParticipants: api.modifyParticipants,
|
|
302
|
+
uploadFile: uploadFile,
|
|
303
|
+
onInputFocus: onInputFocus,
|
|
304
|
+
onInputBlur: onInputBlur
|
|
305
|
+
})]
|
|
306
|
+
});
|
|
302
307
|
}
|
|
303
308
|
}
|
|
304
309
|
var _default = exports.default = Comment;
|
|
@@ -74,7 +74,7 @@ class Utilities {
|
|
|
74
74
|
spanNode2 = document.createElement('span');
|
|
75
75
|
spanNode1.className = 'at-text';
|
|
76
76
|
spanNode1.contentEditable = 'true';
|
|
77
|
-
spanNode1.innerHTML =
|
|
77
|
+
spanNode1.innerHTML = `@${content.name}`;
|
|
78
78
|
spanNode2.innerHTML = ' ';
|
|
79
79
|
}
|
|
80
80
|
let frag = document.createDocumentFragment();
|
|
@@ -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
|
|
@@ -35,10 +36,9 @@ class CreatorFormatter extends _react.default.PureComponent {
|
|
|
35
36
|
avatar_url: _default_avatar.default
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
-
key: index,
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
|
|
40
40
|
collaborator: collaborator
|
|
41
|
-
});
|
|
41
|
+
}, index);
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -49,14 +49,15 @@ class CreatorFormatter extends _react.default.PureComponent {
|
|
|
49
49
|
} = this.props;
|
|
50
50
|
const classname = (0, _classnames.default)('dtable-ui cell-formatter-container creator-formatter', containerClassName);
|
|
51
51
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
52
|
-
return /*#__PURE__*/
|
|
52
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
53
53
|
className: classname
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
const collaborators = this.getCollaborators();
|
|
57
|
-
return /*#__PURE__*/
|
|
58
|
-
className: classname
|
|
59
|
-
|
|
57
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
58
|
+
className: classname,
|
|
59
|
+
children: collaborators
|
|
60
|
+
});
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
CreatorFormatter.defaultProps = {
|
|
@@ -9,59 +9,84 @@ exports.default = ColorPickerPortal;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
11
11
|
var _utils = require("../../utils/utils");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function ColorPickerPortal(_ref) {
|
|
13
14
|
let {
|
|
14
15
|
target,
|
|
15
16
|
scrollContainerId,
|
|
16
|
-
throttleDelay,
|
|
17
|
+
throttleDelay = 16,
|
|
17
18
|
children
|
|
18
19
|
} = _ref;
|
|
19
20
|
const containerRef = (0, _react.useRef)(null);
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const [isPositioned, setIsPositioned] = (0, _react.useState)(false);
|
|
22
|
+
const [position, setPosition] = (0, _react.useState)(() => {
|
|
23
|
+
return {
|
|
24
|
+
top: '-9999px',
|
|
25
|
+
left: '-9999px',
|
|
26
|
+
visibility: 'hidden'
|
|
27
|
+
};
|
|
23
28
|
});
|
|
24
|
-
(0, _react.
|
|
29
|
+
const updatePosition = (0, _react.useCallback)(() => {
|
|
25
30
|
if (!target || !containerRef.current) return;
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
const targetRect = target.getBoundingClientRect();
|
|
32
|
+
const {
|
|
33
|
+
top: spaceAbove,
|
|
34
|
+
left
|
|
35
|
+
} = targetRect;
|
|
36
|
+
const portalRectHeight = containerRef.current.clientHeight;
|
|
37
|
+
const newPosition = {
|
|
38
|
+
left: `${left + 1}px`,
|
|
39
|
+
visibility: 'visible'
|
|
40
|
+
};
|
|
41
|
+
if (spaceAbove < portalRectHeight) {
|
|
42
|
+
newPosition.top = `calc(${spaceAbove}px + 2.375rem)`;
|
|
43
|
+
} else {
|
|
44
|
+
newPosition.top = `calc(${spaceAbove - portalRectHeight}px)`;
|
|
45
|
+
}
|
|
46
|
+
setPosition(prev => ({
|
|
47
|
+
...prev,
|
|
48
|
+
...newPosition
|
|
49
|
+
}));
|
|
50
|
+
if (!isPositioned) {
|
|
51
|
+
setIsPositioned(true);
|
|
52
|
+
}
|
|
53
|
+
}, [target, isPositioned]);
|
|
54
|
+
(0, _react.useEffect)(() => {
|
|
55
|
+
if (!target) return;
|
|
56
|
+
const initialPosition = () => {
|
|
57
|
+
updatePosition();
|
|
58
|
+
requestAnimationFrame(updatePosition);
|
|
44
59
|
};
|
|
45
|
-
|
|
60
|
+
const timer = setTimeout(initialPosition, 0);
|
|
46
61
|
const throttledUpdatePosition = (0, _utils.throttle)(updatePosition, throttleDelay);
|
|
47
62
|
const scrollContainer = scrollContainerId ? document.getElementById(scrollContainerId) : null;
|
|
48
|
-
scrollContainer
|
|
49
|
-
|
|
63
|
+
scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.addEventListener('scroll', throttledUpdatePosition, {
|
|
64
|
+
passive: true
|
|
65
|
+
});
|
|
66
|
+
window.addEventListener('resize', throttledUpdatePosition, {
|
|
67
|
+
passive: true
|
|
68
|
+
});
|
|
50
69
|
return () => {
|
|
51
|
-
|
|
52
|
-
|
|
70
|
+
clearTimeout(timer);
|
|
71
|
+
window.removeEventListener('resize', throttledUpdatePosition);
|
|
72
|
+
scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.removeEventListener('scroll', throttledUpdatePosition);
|
|
53
73
|
};
|
|
54
|
-
}, [target,
|
|
55
|
-
|
|
74
|
+
}, [target, scrollContainerId, throttleDelay, updatePosition]);
|
|
75
|
+
if (!target) return null;
|
|
76
|
+
return /*#__PURE__*/_reactDom.default.createPortal(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
56
77
|
className: "dtable-color-picker-portal",
|
|
57
78
|
style: {
|
|
58
|
-
position: '
|
|
59
|
-
zIndex: '
|
|
79
|
+
position: 'fixed',
|
|
80
|
+
zIndex: '1049',
|
|
60
81
|
left: position.left,
|
|
61
82
|
top: position.top,
|
|
62
83
|
width: '240px',
|
|
63
|
-
height: '370px'
|
|
84
|
+
height: '370px',
|
|
85
|
+
visibility: position.visibility,
|
|
86
|
+
opacity: isPositioned ? 1 : 0,
|
|
87
|
+
transition: 'opacity 0.15s ease-in-out'
|
|
64
88
|
},
|
|
65
|
-
ref: containerRef
|
|
66
|
-
|
|
89
|
+
ref: containerRef,
|
|
90
|
+
children: children
|
|
91
|
+
}), document.body);
|
|
67
92
|
}
|