dtable-ui-component 6.0.49 → 6.0.50
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 +94 -68
- package/lib/ActivityIndicator/index.js +36 -28
- 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 +12 -8
- 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 +7 -5
- package/lib/CheckboxEditor/pc-editor.js +7 -5
- package/lib/CheckboxFormatter/index.js +7 -5
- package/lib/CollaboratorEditor/index.js +24 -15
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -13
- package/lib/CollaboratorEditor/pc-editor/index.js +50 -42
- package/lib/CollaboratorFormatter/index.js +8 -7
- package/lib/CollaboratorItem/index.js +21 -16
- package/lib/CollapsibleSettingLayout/index.js +17 -12
- package/lib/Comment/body/comment.js +78 -62
- package/lib/Comment/body/index.js +14 -11
- package/lib/Comment/footer/btns/index.js +68 -53
- package/lib/Comment/footer/index.js +29 -27
- package/lib/Comment/footer/input/index.js +44 -39
- package/lib/Comment/footer/input/participant/index.js +18 -13
- 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 +66 -55
- package/lib/Comment/index.js +33 -28
- package/lib/CreatorFormatter/index.js +8 -7
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +5 -3
- package/lib/DTableColorPicker/index.js +135 -99
- package/lib/DTableCommonAddTool/index.js +10 -7
- package/lib/DTableCustomFooter/index.js +5 -3
- 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/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.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.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 +21 -18
- package/lib/DTableSearchInput/index.js +22 -18
- 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.js +25 -17
- package/lib/DateEditor/index.js +25 -16
- package/lib/DateEditor/mb-editor/index.js +90 -68
- package/lib/DateEditor/pc-editor.js +38 -34
- package/lib/DateFormatter/index.js +5 -3
- 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 -9
- 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/signature-board/index.js +19 -15
- package/lib/DigitalSignFormatter/index.js +23 -19
- 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 +25 -19
- package/lib/FieldDisplaySetting/index.js +47 -38
- 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 +81 -63
- 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 +107 -81
- package/lib/FileEditor/pc-editor/index.js +46 -36
- package/lib/FileFormatter/index.js +40 -36
- package/lib/FileItemFormatter/index.js +2 -1
- package/lib/FileUploader/index.js +22 -20
- package/lib/FormulaFormatter/index.js +21 -14
- package/lib/GeolocationEditor/index.js +28 -19
- 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 +37 -30
- package/lib/GeolocationEditor/pc-editor/index.js +26 -17
- package/lib/GeolocationEditor/pc-editor/location-editor.js +121 -95
- 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 +119 -91
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +102 -82
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +89 -69
- package/lib/GeolocationEditor/pc-editor/province-editor.js +30 -25
- 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 +2 -1
- package/lib/Icon/index.js +8 -5
- package/lib/IconButton/index.js +9 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +52 -44
- 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 +101 -76
- 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 +46 -38
- package/lib/InputItem/custom-input.js +23 -18
- package/lib/InputItem/custom-keyboard.js +65 -44
- package/lib/InputItem/index.js +66 -56
- 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 +32 -23
- 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 +5 -3
- package/lib/MobileFullScreenPage/header/index.js +21 -16
- 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 +8 -5
- package/lib/Modal/modal.js +19 -15
- package/lib/Modal/operation.js +2 -1
- package/lib/Modal/prompt.js +74 -54
- 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 +22 -15
- package/lib/Progress/index.js +12 -10
- package/lib/Radio/Radio.js +11 -7
- package/lib/Radio/RadioItem.js +9 -3
- package/lib/RateFormatter/index.js +7 -6
- package/lib/RoleStatusEditor/index.js +36 -31
- package/lib/RowExpand/index.js +16 -9
- package/lib/RowExpandDialog/body/index.js +52 -41
- package/lib/RowExpandDialog/column-content/index.js +34 -25
- package/lib/RowExpandDialog/header/index.js +28 -21
- package/lib/RowExpandDialog/index.js +40 -27
- 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 +19 -17
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +20 -18
- 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 +81 -67
- 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 +11 -9
- 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 +42 -34
- 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 +19 -17
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -18
- 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 +11 -8
- 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 +37 -29
- 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 +131 -114
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +2 -1
- package/lib/RowExpandFormatter/link-formatter/index.js +70 -67
- package/lib/RowExpandFormatter/rate-formatter/index.js +7 -6
- package/lib/RowExpandFormatter/url-formatter/index.js +11 -8
- package/lib/RowExpandView/body/index.js +38 -32
- 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.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 +4 -1
- package/lib/TabBar/Tab.js +27 -20
- package/lib/TabBar/index.js +25 -21
- 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 +35 -26
- package/lib/Toast/index.js +16 -10
- 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 +74 -60
- package/lib/toaster/alert.js +25 -16
- package/lib/toaster/toast.js +27 -23
- package/lib/toaster/toastManager.js +16 -13
- package/lib/toaster/toaster.js +2 -1
- package/package.json +2 -2
|
@@ -13,6 +13,7 @@ var _utils = require("../../utils/utils");
|
|
|
13
13
|
var _constants = require("../../constants");
|
|
14
14
|
var _lang = require("../../lang");
|
|
15
15
|
require("./index.css");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
class ImagesPreviewer extends _react.default.Component {
|
|
17
18
|
constructor(props) {
|
|
18
19
|
super(props);
|
|
@@ -104,37 +105,39 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
104
105
|
let {
|
|
105
106
|
value
|
|
106
107
|
} = this.props;
|
|
107
|
-
return /*#__PURE__*/
|
|
108
|
-
className: "dtable-ui-image-previewer-container"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
108
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
|
+
className: "dtable-ui-image-previewer-container",
|
|
110
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
111
|
+
className: "dtable-ui-image-previewer-wrapper ".concat(value.length === 0 && _constants.isMobile ? 'd-none' : ''),
|
|
112
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
113
|
+
className: "dtable-ui-image-previewer-content",
|
|
114
|
+
children: value.length > 0 && value.map((imageItemUrl, index) => {
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_imagePreview.default, {
|
|
116
|
+
imageItemUrl: imageItemUrl,
|
|
117
|
+
value: value,
|
|
118
|
+
itemIndex: index,
|
|
119
|
+
deleteImage: this.props.deleteImage,
|
|
120
|
+
showLargeImage: this.showLargeImage,
|
|
121
|
+
downloadImage: this.downloadImage,
|
|
122
|
+
enterImageItemIndex: this.state.enterImageItemIndex,
|
|
123
|
+
setImageItemIndex: this.setImageItemIndex
|
|
124
|
+
}, imageItemUrl + index);
|
|
125
|
+
})
|
|
126
|
+
})
|
|
127
|
+
}), this.state.isShowLargeImage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImagePreviewerLightbox.default, {
|
|
128
|
+
imageItems: value,
|
|
129
|
+
imageIndex: this.state.largeImageIndex,
|
|
130
|
+
closeImagePopup: this.hideLargeImage,
|
|
131
|
+
moveToPrevImage: this.movePrev,
|
|
132
|
+
moveToNextImage: this.moveNext,
|
|
133
|
+
deleteImage: this.props.deleteImage ? this.deleteImage : null,
|
|
121
134
|
downloadImage: this.downloadImage,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
closeImagePopup: this.hideLargeImage,
|
|
129
|
-
moveToPrevImage: this.movePrev,
|
|
130
|
-
moveToNextImage: this.moveNext,
|
|
131
|
-
deleteImage: this.props.deleteImage ? this.deleteImage : null,
|
|
132
|
-
downloadImage: this.downloadImage,
|
|
133
|
-
onRotateImage: this.props.onRotateImage
|
|
134
|
-
}), /*#__PURE__*/_react.default.createElement(_DTableCommonAddTool.default, {
|
|
135
|
-
callBack: this.togglePreviewer,
|
|
136
|
-
footerName: (0, _lang.getLocale)('Add_images')
|
|
137
|
-
}));
|
|
135
|
+
onRotateImage: this.props.onRotateImage
|
|
136
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCommonAddTool.default, {
|
|
137
|
+
callBack: this.togglePreviewer,
|
|
138
|
+
footerName: (0, _lang.getLocale)('Add_images')
|
|
139
|
+
})]
|
|
140
|
+
});
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
143
|
var _default = exports.default = ImagesPreviewer;
|
|
@@ -14,6 +14,7 @@ var _DTableModalHeader = _interopRequireDefault(require("../../DTableModalHeader
|
|
|
14
14
|
var _lang = require("../../lang");
|
|
15
15
|
var _constants2 = require("../constants");
|
|
16
16
|
require("./index.css");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
18
|
class PCImageEditor extends _react.default.Component {
|
|
18
19
|
constructor(props) {
|
|
19
20
|
var _this;
|
|
@@ -117,17 +118,24 @@ class PCImageEditor extends _react.default.Component {
|
|
|
117
118
|
editorView
|
|
118
119
|
} = this.state;
|
|
119
120
|
if (this.props.isInModal) {
|
|
120
|
-
return /*#__PURE__*/
|
|
121
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
122
|
+
children: (0, _lang.getLocale)('Add_images')
|
|
123
|
+
});
|
|
121
124
|
}
|
|
122
125
|
if (editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER) {
|
|
123
|
-
return /*#__PURE__*/
|
|
126
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
127
|
+
children: (0, _lang.getLocale)('All_images')
|
|
128
|
+
});
|
|
124
129
|
}
|
|
125
|
-
return /*#__PURE__*/
|
|
126
|
-
onClick: this.showImageListPreviewer
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
131
|
+
onClick: this.showImageListPreviewer,
|
|
132
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
133
|
+
"aria-hidden": "true",
|
|
134
|
+
className: "dtable-font dtable-icon-return mr-2"
|
|
135
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
136
|
+
children: (0, _lang.getLocale)('Add_images')
|
|
137
|
+
})]
|
|
138
|
+
});
|
|
131
139
|
};
|
|
132
140
|
this.showImageListPreviewer = () => {
|
|
133
141
|
let {
|
|
@@ -162,33 +170,37 @@ class PCImageEditor extends _react.default.Component {
|
|
|
162
170
|
};
|
|
163
171
|
}
|
|
164
172
|
render() {
|
|
165
|
-
return /*#__PURE__*/
|
|
173
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Modal, {
|
|
166
174
|
className: "dtable-ui-image-editor-dialog",
|
|
167
175
|
contentClassName: "dtable-ui-image-editor-modal",
|
|
168
176
|
isOpen: this.state.isOpen,
|
|
169
|
-
toggle: this.toggle
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
177
|
+
toggle: this.toggle,
|
|
178
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableModalHeader.default, {
|
|
179
|
+
toggle: this.toggle,
|
|
180
|
+
children: this.renderHeader()
|
|
181
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalBody, {
|
|
182
|
+
className: "p-0",
|
|
183
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
184
|
+
className: "dtable-ui-image-editor-container",
|
|
185
|
+
children: [this.state.editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER && /*#__PURE__*/(0, _jsxRuntime.jsx)(_imagesPreviewer.default, {
|
|
186
|
+
value: this.state.value,
|
|
187
|
+
togglePreviewer: this.togglePreviewer,
|
|
188
|
+
deleteImage: this.deleteImage,
|
|
189
|
+
resetAdditionImage: this.resetAdditionImage
|
|
190
|
+
}), this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION && /*#__PURE__*/(0, _jsxRuntime.jsx)(_additionPreviewer.default, {
|
|
191
|
+
deleteImage: this.deleteImage,
|
|
192
|
+
handleFilesChange: this.handleFilesChange,
|
|
193
|
+
uploadLocalImageValue: this.state.uploadLocalImageValue,
|
|
194
|
+
togglePreviewer: this.togglePreviewer,
|
|
195
|
+
saveImageLink: this.saveImageLink,
|
|
196
|
+
fileUploadCompleted: this.fileUploadCompleted,
|
|
197
|
+
addUploadedFile: this.addUploadedFile,
|
|
198
|
+
showImageListPreviewer: this.showImageListPreviewer,
|
|
199
|
+
uploadFile: this.uploadFile
|
|
200
|
+
})]
|
|
201
|
+
})
|
|
202
|
+
})]
|
|
203
|
+
});
|
|
192
204
|
}
|
|
193
205
|
}
|
|
194
206
|
var _default = exports.default = PCImageEditor;
|
|
@@ -9,6 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _Loading = _interopRequireDefault(require("../Loading"));
|
|
11
11
|
var _url = require("../utils/url");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const ImagesLazyLoad = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
images,
|
|
@@ -91,10 +92,11 @@ const ImagesLazyLoad = _ref => {
|
|
|
91
92
|
const style = {
|
|
92
93
|
marginLeft: '4px'
|
|
93
94
|
};
|
|
94
|
-
return /*#__PURE__*/
|
|
95
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
96
|
style: style,
|
|
96
|
-
className: "d-flex align-items-center"
|
|
97
|
-
|
|
97
|
+
className: "d-flex align-items-center",
|
|
98
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.default, {})
|
|
99
|
+
});
|
|
98
100
|
}
|
|
99
101
|
return loadedImages.map((image, index) => {
|
|
100
102
|
let imageName = '';
|
|
@@ -105,7 +107,7 @@ const ImagesLazyLoad = _ref => {
|
|
|
105
107
|
// eslint-disable-next-line no-console
|
|
106
108
|
console.log(error);
|
|
107
109
|
}
|
|
108
|
-
const imgDom = /*#__PURE__*/
|
|
110
|
+
const imgDom = /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
109
111
|
title: imageName,
|
|
110
112
|
className: "image-item",
|
|
111
113
|
src: image === null || image === void 0 ? void 0 : image.src,
|
|
@@ -113,12 +115,12 @@ const ImagesLazyLoad = _ref => {
|
|
|
113
115
|
onClick: event => handleImageClick(event, index),
|
|
114
116
|
alt: ""
|
|
115
117
|
});
|
|
116
|
-
if (renderItem) return /*#__PURE__*/
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
return /*#__PURE__*/
|
|
120
|
-
|
|
121
|
-
},
|
|
118
|
+
if (renderItem) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
|
|
119
|
+
children: renderItem(imgDom)
|
|
120
|
+
}, index);
|
|
121
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
|
|
122
|
+
children: imgDom
|
|
123
|
+
}, index);
|
|
122
124
|
});
|
|
123
125
|
};
|
|
124
126
|
var _default = exports.default = ImagesLazyLoad;
|
|
@@ -12,6 +12,7 @@ var _imagesLazyLoad = _interopRequireDefault(require("./images-lazy-load"));
|
|
|
12
12
|
var _ImagePreviewerLightbox = _interopRequireDefault(require("../ImagePreviewerLightbox"));
|
|
13
13
|
var _url = require("../utils/url");
|
|
14
14
|
require("./index.css");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
class ImageFormatter extends _react.default.Component {
|
|
16
17
|
constructor(props) {
|
|
17
18
|
super(props);
|
|
@@ -82,41 +83,46 @@ class ImageFormatter extends _react.default.Component {
|
|
|
82
83
|
if (isSample) {
|
|
83
84
|
let item = value[0];
|
|
84
85
|
let url = (0, _url.getImageThumbnailUrl)(item, server);
|
|
85
|
-
return /*#__PURE__*/
|
|
86
|
-
className: className
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
87
|
+
className: className,
|
|
88
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
89
|
+
className: "image-item",
|
|
90
|
+
src: url,
|
|
91
|
+
alt: ""
|
|
92
|
+
}), value.length !== 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
93
|
+
className: "image-item-count",
|
|
94
|
+
children: "+".concat(value.length)
|
|
95
|
+
})]
|
|
96
|
+
});
|
|
94
97
|
}
|
|
95
|
-
return /*#__PURE__*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
98
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
99
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
|
+
className: className,
|
|
101
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_imagesLazyLoad.default, {
|
|
102
|
+
images: value,
|
|
103
|
+
server: server,
|
|
104
|
+
onImageClick: this.onImageClick,
|
|
105
|
+
renderItem: this.props.renderItem,
|
|
106
|
+
dtableUuid: dtableUuid
|
|
107
|
+
})
|
|
108
|
+
}), isPreviewImage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImagePreviewerLightbox.default, {
|
|
109
|
+
imageItems: value,
|
|
110
|
+
className: lightboxClassName,
|
|
111
|
+
imageIndex: previewImageIndex,
|
|
112
|
+
closeImagePopup: this.closeImagePopup,
|
|
113
|
+
moveToPrevImage: this.movePrev,
|
|
114
|
+
moveToNextImage: this.moveNext,
|
|
115
|
+
deleteImage: this.canDelete ? this.deleteImage : null,
|
|
116
|
+
downloadImage: this.downloadImage,
|
|
117
|
+
onRotateImage: this.canRotate ? this.onRotateImage : null,
|
|
118
|
+
readOnly: readOnly,
|
|
119
|
+
server: server,
|
|
120
|
+
moveToPrevRowImage: this.props.moveToPrevRowImage,
|
|
121
|
+
moveToNextRowImage: this.props.moveToNextRowImage,
|
|
122
|
+
onViewOriginal: this.props.onViewOriginal,
|
|
123
|
+
dtableUuid: dtableUuid
|
|
124
|
+
})]
|
|
125
|
+
});
|
|
120
126
|
}
|
|
121
127
|
}
|
|
122
128
|
ImageFormatter.defaultProps = {
|
|
@@ -12,6 +12,7 @@ var _url = require("../utils/url");
|
|
|
12
12
|
var _lang = require("../lang");
|
|
13
13
|
require("@seafile/react-image-lightbox/style.css");
|
|
14
14
|
require("./index.css");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
function ImagePreviewerLightbox(props) {
|
|
16
17
|
const {
|
|
17
18
|
imageItems,
|
|
@@ -61,14 +62,17 @@ function ImagePreviewerLightbox(props) {
|
|
|
61
62
|
size: 512
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
|
-
const imageTitleDOM = props.imageTitle || /*#__PURE__*/
|
|
65
|
-
className: "d-flex"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
const imageTitleDOM = props.imageTitle || /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
66
|
+
className: "d-flex",
|
|
67
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
68
|
+
className: "text-truncate",
|
|
69
|
+
children: imageName
|
|
70
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
71
|
+
className: "flex-shrink-0 pl-1",
|
|
72
|
+
children: ["(", imageIndex + 1, "/", imagesLength, ")"]
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactImageLightbox.default, {
|
|
72
76
|
wrapperClassName: (0, _classnames.default)('dtable-ui-component', className),
|
|
73
77
|
imageTitle: imageTitleDOM,
|
|
74
78
|
mainSrc: mainSrc,
|
|
@@ -13,6 +13,7 @@ var _url = require("../utils/url");
|
|
|
13
13
|
var _lang = require("../lang");
|
|
14
14
|
var _constants = require("../constants");
|
|
15
15
|
require("./index.css");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
class ImageThumbnail extends _react.default.Component {
|
|
17
18
|
constructor(props) {
|
|
18
19
|
super(props);
|
|
@@ -95,44 +96,51 @@ class ImageThumbnail extends _react.default.Component {
|
|
|
95
96
|
const {
|
|
96
97
|
imageThumbnailUrl
|
|
97
98
|
} = this.state;
|
|
98
|
-
return /*#__PURE__*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
99
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
100
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
101
|
+
className: (0, _classnames.default)('dtable-ui-image-thumbnail', className),
|
|
102
|
+
onClick: this.onClick,
|
|
103
|
+
ref: ref => this.ref = ref,
|
|
104
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
105
|
+
src: imageThumbnailUrl,
|
|
106
|
+
id: "item-image-".concat(index),
|
|
107
|
+
alt: ""
|
|
108
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
|
+
className: "dtable-ui-image-icons-choice",
|
|
110
|
+
children: [downloadImage && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
111
|
+
className: "image-icon",
|
|
112
|
+
onClick: this.downloadImage,
|
|
113
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
114
|
+
"aria-hidden": "true",
|
|
115
|
+
className: "dtable-font dtable-icon-download"
|
|
116
|
+
})
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
118
|
+
className: "image-icon",
|
|
119
|
+
onClick: this.onClickDelete,
|
|
120
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
121
|
+
"aria-hidden": "true",
|
|
122
|
+
className: "dtable-font dtable-icon-fork-number"
|
|
123
|
+
})
|
|
124
|
+
})]
|
|
125
|
+
})]
|
|
126
|
+
}), this.state.showTip && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteTip.default, {
|
|
127
|
+
position: this.position,
|
|
128
|
+
toggle: this.closeTip,
|
|
129
|
+
handleDelete: this.deleteImage,
|
|
130
|
+
deleteTip: this.props.deleteTip || (0, _lang.getLocale)('Are_you_sure_you_want_to_delete_this_image')
|
|
131
|
+
}), !_constants.isMobile && this.ref && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Tooltip, {
|
|
132
|
+
placement: "bottom",
|
|
133
|
+
isOpen: this.state.isTooltipOpen,
|
|
134
|
+
toggle: this.toggle,
|
|
135
|
+
target: this.ref,
|
|
136
|
+
delay: {
|
|
137
|
+
show: 0,
|
|
138
|
+
hide: 0
|
|
139
|
+
},
|
|
140
|
+
fade: false,
|
|
141
|
+
children: name || (0, _url.getFileName)(src)
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
136
144
|
}
|
|
137
145
|
}
|
|
138
146
|
var _default = exports.default = ImageThumbnail;
|
|
@@ -13,6 +13,7 @@ var _class = require("../utils/class");
|
|
|
13
13
|
var _exenv = require("../utils/exenv");
|
|
14
14
|
var _customKeyboard = _interopRequireDefault(require("./custom-keyboard"));
|
|
15
15
|
var _portal = _interopRequireDefault(require("./portal"));
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
let customNumberKeyboard = null;
|
|
17
18
|
const IS_REACT_16 = !!ReactDOM.createPortal;
|
|
18
19
|
function getBodyScrollTop() {
|
|
@@ -231,7 +232,7 @@ class NumberInput extends React.Component {
|
|
|
231
232
|
moneyKeyboardHeader,
|
|
232
233
|
disabledKeys
|
|
233
234
|
} = this.props;
|
|
234
|
-
return /*#__PURE__*/
|
|
235
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_customKeyboard.default, {
|
|
235
236
|
ref: this.saveRef,
|
|
236
237
|
onClick: this.onKeyboardClick,
|
|
237
238
|
prefixCls: keyboardPrefixCls,
|
|
@@ -258,9 +259,10 @@ class NumberInput extends React.Component {
|
|
|
258
259
|
}
|
|
259
260
|
renderCustomKeyboard() {
|
|
260
261
|
if (IS_REACT_16) {
|
|
261
|
-
this.keyBoard = /*#__PURE__*/
|
|
262
|
-
getContainer: () => this.getContainer()
|
|
263
|
-
|
|
262
|
+
this.keyBoard = /*#__PURE__*/(0, _jsxRuntime.jsx)(_portal.default, {
|
|
263
|
+
getContainer: () => this.getContainer(),
|
|
264
|
+
children: this.getComponent()
|
|
265
|
+
});
|
|
264
266
|
} else {
|
|
265
267
|
const container = this.getContainer();
|
|
266
268
|
const root = ReactDOM.createRoot(container);
|
|
@@ -292,20 +294,23 @@ class NumberInput extends React.Component {
|
|
|
292
294
|
const fakeInputContainerCls = (0, _classnames.default)('fake-input-container', {
|
|
293
295
|
'fake-input-container-left': moneyKeyboardAlign === 'left'
|
|
294
296
|
});
|
|
295
|
-
return /*#__PURE__*/
|
|
296
|
-
className: fakeInputContainerCls
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
297
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
298
|
+
className: fakeInputContainerCls,
|
|
299
|
+
children: [value === '' &&
|
|
300
|
+
/*#__PURE__*/
|
|
301
|
+
// tslint:disable-next-line:jsx-no-multiline-js
|
|
302
|
+
(0, _jsxRuntime.jsx)("div", {
|
|
303
|
+
className: "fake-input-placeholder",
|
|
304
|
+
children: placeholder
|
|
305
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
306
|
+
role: "textbox",
|
|
307
|
+
"aria-label": value || placeholder,
|
|
308
|
+
className: fakeInputCls,
|
|
309
|
+
ref: el => this.inputRef = el,
|
|
310
|
+
onClick: preventKeyboard ? () => {} : this.onFakeInputClick,
|
|
311
|
+
children: value
|
|
312
|
+
}), this.renderPortal()]
|
|
313
|
+
});
|
|
309
314
|
}
|
|
310
315
|
}
|
|
311
316
|
NumberInput.defaultProps = {
|