dtable-ui-component 0.3.0-beta1 → 0.3.0-beta3
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.
|
@@ -73,7 +73,6 @@ var DigitalSignFormatter = /*#__PURE__*/function (_Component) {
|
|
|
73
73
|
key: "render",
|
|
74
74
|
value: function render() {
|
|
75
75
|
var _this$props = this.props,
|
|
76
|
-
value = _this$props.value,
|
|
77
76
|
server = _this$props.server,
|
|
78
77
|
containerClassName = _this$props.containerClassName,
|
|
79
78
|
readOnly = _this$props.readOnly;
|
|
@@ -86,10 +85,11 @@ var DigitalSignFormatter = /*#__PURE__*/function (_Component) {
|
|
|
86
85
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
87
86
|
className: className
|
|
88
87
|
}, /*#__PURE__*/React.createElement(ImagesLazyLoad, {
|
|
89
|
-
images:
|
|
88
|
+
images: signImages,
|
|
90
89
|
server: server,
|
|
91
90
|
onImageClick: this.onClickSignImage
|
|
92
91
|
})), isPreviewSignImage && /*#__PURE__*/React.createElement(ImagePreviewerLightbox, {
|
|
92
|
+
className: "digital-sign-formatter-image-previewer",
|
|
93
93
|
readOnly: readOnly,
|
|
94
94
|
server: server,
|
|
95
95
|
imageItems: signImages,
|
|
@@ -105,4 +105,12 @@ var DigitalSignFormatter = /*#__PURE__*/function (_Component) {
|
|
|
105
105
|
return DigitalSignFormatter;
|
|
106
106
|
}(Component);
|
|
107
107
|
|
|
108
|
+
DigitalSignFormatter.defaultProps = {
|
|
109
|
+
isSample: false,
|
|
110
|
+
isSupportPreview: false,
|
|
111
|
+
readOnly: true,
|
|
112
|
+
value: '',
|
|
113
|
+
server: '',
|
|
114
|
+
containerClassName: ''
|
|
115
|
+
};
|
|
108
116
|
export default DigitalSignFormatter;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
2
|
import MediaQuery from 'react-responsive';
|
|
3
|
+
import cn from 'astro-classname';
|
|
3
4
|
import ModalPortal from '../ModalPortal';
|
|
4
5
|
import Lightbox from '@seafile/react-image-lightbox';
|
|
5
6
|
import { checkSVGImage, isInternalImg } from './utils';
|
|
@@ -15,7 +16,8 @@ function ImagePreviewerLightbox(props) {
|
|
|
15
16
|
readOnly = props.readOnly,
|
|
16
17
|
server = props.server,
|
|
17
18
|
moveToPrevRowImage = props.moveToPrevRowImage,
|
|
18
|
-
moveToNextRowImage = props.moveToNextRowImage
|
|
19
|
+
moveToNextRowImage = props.moveToNextRowImage,
|
|
20
|
+
className = props.className;
|
|
19
21
|
var imageItemsLength = imageItems.length;
|
|
20
22
|
var URL = imageItems[imageIndex];
|
|
21
23
|
var imageTitle = URL ? decodeURI(URL.slice(URL.lastIndexOf('/') + 1)) : ''; // svg image is vectorgraph and can't rotate, external image can't rotate
|
|
@@ -69,7 +71,7 @@ function ImagePreviewerLightbox(props) {
|
|
|
69
71
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(MediaQuery, {
|
|
70
72
|
query: "(min-width: 767.8px)"
|
|
71
73
|
}, /*#__PURE__*/React.createElement(Lightbox, {
|
|
72
|
-
wrapperClassName:
|
|
74
|
+
wrapperClassName: cn('PC-image-previewer', className),
|
|
73
75
|
imageTitle: imageTitleEl,
|
|
74
76
|
toolbarButtons: toolbarButtons,
|
|
75
77
|
mainSrc: imageItems[imageIndex],
|
|
@@ -91,7 +93,7 @@ function ImagePreviewerLightbox(props) {
|
|
|
91
93
|
query: "(max-width: 767.8px)"
|
|
92
94
|
}, /*#__PURE__*/React.createElement(Lightbox, {
|
|
93
95
|
isDesktop: false,
|
|
94
|
-
wrapperClassName:
|
|
96
|
+
wrapperClassName: cn('mobile-image-previewer dtable-ui-component', className),
|
|
95
97
|
mainSrc: imageItems[imageIndex],
|
|
96
98
|
nextSrc: imageItems[(imageIndex + 1) % imageItemsLength],
|
|
97
99
|
prevSrc: imageItems[(imageIndex + imageItemsLength - 1) % imageItemsLength],
|