@zohodesk/dot 1.0.0-temp-230.1 → 1.0.0-temp-230.3
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/es/AttachmentViewer/AttachmentImage.js +3 -1
- package/es/AttachmentViewer/AttachmentViewer.js +10 -7
- package/es/AttachmentViewer/AttachmentViewer.module.css +7 -14
- package/es/AttachmentViewer/props/defaultProps.js +3 -2
- package/es/AttachmentViewer/props/propTypes.js +5 -1
- package/lib/AttachmentViewer/AttachmentImage.js +3 -1
- package/lib/AttachmentViewer/AttachmentViewer.js +17 -12
- package/lib/AttachmentViewer/AttachmentViewer.module.css +7 -14
- package/lib/AttachmentViewer/props/defaultProps.js +5 -2
- package/lib/AttachmentViewer/props/propTypes.js +5 -1
- package/package.json +10 -10
|
@@ -43,7 +43,8 @@ export default class AttachmentImage extends Component {
|
|
|
43
43
|
isCover,
|
|
44
44
|
customClass,
|
|
45
45
|
onLoad,
|
|
46
|
-
onError
|
|
46
|
+
onError,
|
|
47
|
+
imageRef
|
|
47
48
|
} = this.props;
|
|
48
49
|
const {
|
|
49
50
|
isImageValid
|
|
@@ -59,6 +60,7 @@ export default class AttachmentImage extends Component {
|
|
|
59
60
|
className: customImageClass,
|
|
60
61
|
alt: alt,
|
|
61
62
|
isCover: isCover,
|
|
63
|
+
eleRef: imageRef,
|
|
62
64
|
onLoad: onLoad,
|
|
63
65
|
onError: onError
|
|
64
66
|
});
|
|
@@ -4,7 +4,7 @@ import React, { Component } from 'react';
|
|
|
4
4
|
import { AttachmentViewer_defaultProps } from "./props/defaultProps";
|
|
5
5
|
import { AttachmentViewer_propTypes } from "./props/propTypes";
|
|
6
6
|
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
7
|
-
import
|
|
7
|
+
import Icon from '@zohodesk/icons/es/Icon';
|
|
8
8
|
import Avatar from '@zohodesk/components/es/Avatar/Avatar';
|
|
9
9
|
import { ResponsiveReceiver } from '@zohodesk/components/es/Responsive/CustomResponsive';
|
|
10
10
|
import Typography from '@zohodesk/components/es/Typography/Typography';
|
|
@@ -107,11 +107,11 @@ export default class AttachmentViewer extends Component {
|
|
|
107
107
|
selectedIndex
|
|
108
108
|
} = this.state;
|
|
109
109
|
let indexChanged = previewObj.selectedIndex != prevProps.previewObj.selectedIndex;
|
|
110
|
-
const attachmentPreviewUrlChanged = previewObj.previewData
|
|
110
|
+
const attachmentPreviewUrlChanged = previewObj.previewData.some((value, index) => value?.viewUrl !== prevState.data[index]?.viewUrl); // Triggers an update if any previewed attachment is edited by the Attachment Annotator.
|
|
111
111
|
|
|
112
112
|
if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged || attachmentPreviewUrlChanged) {
|
|
113
113
|
let objChanged = previewObj.previewData.some((value, index) => {
|
|
114
|
-
return shallowDiff(value, prevProps.previewObj[index]);
|
|
114
|
+
return shallowDiff(value, prevProps.previewObj.previewData[index]);
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
if (objChanged || indexChanged) {
|
|
@@ -367,7 +367,8 @@ export default class AttachmentViewer extends Component {
|
|
|
367
367
|
children,
|
|
368
368
|
dataId = 'attachViewer',
|
|
369
369
|
customClass = {},
|
|
370
|
-
customProps = {}
|
|
370
|
+
customProps = {},
|
|
371
|
+
imageRef
|
|
371
372
|
} = data;
|
|
372
373
|
const {
|
|
373
374
|
imageProps = {}
|
|
@@ -376,6 +377,7 @@ export default class AttachmentViewer extends Component {
|
|
|
376
377
|
customImageClass = '',
|
|
377
378
|
customChildrenClass = ''
|
|
378
379
|
} = customClass;
|
|
380
|
+
const resolvedImageRef = imageRef;
|
|
379
381
|
const retainZoom = canZoom && selectedIndex == i && maintainZoom;
|
|
380
382
|
const handleZoomOut = isPreviewAttachmentValid && isZoomed ? this.zoomOut.bind(this, i) : undefined;
|
|
381
383
|
const handleZoomIn = isPreviewAttachmentValid && !isZoomed ? e => this.zoomIn(e, i, true) : undefined;
|
|
@@ -387,15 +389,16 @@ export default class AttachmentViewer extends Component {
|
|
|
387
389
|
customImageClass,
|
|
388
390
|
customChildrenClass
|
|
389
391
|
});
|
|
390
|
-
const img = /*#__PURE__*/React.createElement(AttachmentImage, _extends({
|
|
392
|
+
const img = /*#__PURE__*/React.createElement(AttachmentImage, _extends({}, imageProps, {
|
|
391
393
|
customClass: imageFrameCustomClass,
|
|
392
394
|
src: viewUrl,
|
|
393
395
|
onClick: handleImageClick,
|
|
394
396
|
alt: name,
|
|
395
397
|
dataId: dataId,
|
|
396
398
|
id: `img${i}`,
|
|
397
|
-
isCover: false
|
|
398
|
-
|
|
399
|
+
isCover: false,
|
|
400
|
+
imageRef: resolvedImageRef
|
|
401
|
+
}), children);
|
|
399
402
|
return typeof renderCustomImagePreviewElement === 'function' ? renderCustomImagePreviewElement({
|
|
400
403
|
defaultView: img,
|
|
401
404
|
data,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
height: var(--zd_size48) ;
|
|
3
3
|
position: relative;
|
|
4
4
|
z-index: 1;
|
|
5
|
-
padding-block:0 ;
|
|
5
|
+
padding-block: 0 ;
|
|
6
6
|
padding-inline: var(--zd_size15) ;
|
|
7
7
|
composes: alignVertical from '~@zohodesk/components/es/common/common.module.css';
|
|
8
8
|
background-color: var(--zdt_attachmentviewer_header_bg);
|
|
@@ -10,20 +10,13 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.title {
|
|
13
|
+
padding-inline-end: var(--zd_size15) ;
|
|
13
14
|
max-width: 50% ;
|
|
14
15
|
composes: dotted from '~@zohodesk/components/es/common/common.module.css';
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
[dir=ltr] .title {
|
|
18
|
-
padding-right: var(--zd_size15) ;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
[dir=rtl] .title {
|
|
22
|
-
padding-left: var(--zd_size15) ;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
18
|
.count {
|
|
26
|
-
padding-block:0 ;
|
|
19
|
+
padding-block: 0 ;
|
|
27
20
|
padding-inline: var(--zd_size10) ;
|
|
28
21
|
position: absolute;
|
|
29
22
|
composes: xMiddle from '~@zohodesk/components/es/common/common.module.css';
|
|
@@ -80,7 +73,7 @@
|
|
|
80
73
|
|
|
81
74
|
.preview {
|
|
82
75
|
margin-block: var(--zd_size20) ;
|
|
83
|
-
margin-inline:0 ;
|
|
76
|
+
margin-inline: 0 ;
|
|
84
77
|
composes: posrel from '~@zohodesk/components/es/common/common.module.css';
|
|
85
78
|
text-align: center;
|
|
86
79
|
}
|
|
@@ -136,7 +129,7 @@
|
|
|
136
129
|
}
|
|
137
130
|
|
|
138
131
|
.listContainer {
|
|
139
|
-
padding-block:0 ;
|
|
132
|
+
padding-block: 0 ;
|
|
140
133
|
padding-inline: var(--zd_size18) ;
|
|
141
134
|
}
|
|
142
135
|
|
|
@@ -324,7 +317,7 @@
|
|
|
324
317
|
}
|
|
325
318
|
|
|
326
319
|
.authorName {
|
|
327
|
-
margin-block:0 ;
|
|
320
|
+
margin-block: 0 ;
|
|
328
321
|
margin-inline: var(--zd_size10) ;
|
|
329
322
|
font-size: var(--zd_font_size15) ;
|
|
330
323
|
color: var(--zdt_attachmentviewer_title_text);
|
|
@@ -364,4 +357,4 @@
|
|
|
364
357
|
color: var(--zdt_attachmentviewer_title_text);
|
|
365
358
|
padding: var(--zd_size2) ;
|
|
366
359
|
margin: auto ;
|
|
367
|
-
}
|
|
360
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DUMMY_OBJECT } from "../../utils/General";
|
|
1
2
|
export const AttachmentImage_defaultProps = {
|
|
2
3
|
dataId: 'AttachmentImage',
|
|
3
4
|
customClass: {
|
|
@@ -11,7 +12,7 @@ export const AttachmentViewer_defaultProps = {
|
|
|
11
12
|
maintainZoom: false,
|
|
12
13
|
isActive: false,
|
|
13
14
|
dataId: 'AttachmentViewer',
|
|
14
|
-
i18nKeys:
|
|
15
|
-
customProps:
|
|
15
|
+
i18nKeys: DUMMY_OBJECT,
|
|
16
|
+
customProps: DUMMY_OBJECT,
|
|
16
17
|
showCount: true
|
|
17
18
|
};
|
|
@@ -2,6 +2,9 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
import { propTypes as AvatarProps } from '@zohodesk/components/es/Avatar/props/propTypes';
|
|
3
3
|
export const AttachmentImage_propTypes = {
|
|
4
4
|
alt: PropTypes.string,
|
|
5
|
+
imageRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
6
|
+
current: PropTypes.any
|
|
7
|
+
})]),
|
|
5
8
|
customClass: PropTypes.shape({
|
|
6
9
|
customImageClass: PropTypes.string,
|
|
7
10
|
customChildrenClass: PropTypes.string
|
|
@@ -29,7 +32,7 @@ export const AttachmentViewer_propTypes = {
|
|
|
29
32
|
showText: PropTypes.string,
|
|
30
33
|
previewUnsupportedText: PropTypes.string
|
|
31
34
|
}),
|
|
32
|
-
needDownload: PropTypes.
|
|
35
|
+
needDownload: PropTypes.bool,
|
|
33
36
|
previewObj: PropTypes.object,
|
|
34
37
|
responsiveId: PropTypes.string,
|
|
35
38
|
maintainZoom: PropTypes.bool,
|
|
@@ -42,6 +45,7 @@ export const AttachmentViewer_propTypes = {
|
|
|
42
45
|
document: PropTypes.arrayOf(PropTypes.string)
|
|
43
46
|
}),
|
|
44
47
|
renderUnSupportedElement: PropTypes.func,
|
|
48
|
+
renderCustomImagePreviewElement: PropTypes.func,
|
|
45
49
|
customProps: PropTypes.shape({
|
|
46
50
|
avatarProps: PropTypes.exact(AvatarProps)
|
|
47
51
|
}),
|
|
@@ -92,7 +92,8 @@ var AttachmentImage = /*#__PURE__*/function (_Component) {
|
|
|
92
92
|
isCover = _this$props.isCover,
|
|
93
93
|
customClass = _this$props.customClass,
|
|
94
94
|
onLoad = _this$props.onLoad,
|
|
95
|
-
onError = _this$props.onError
|
|
95
|
+
onError = _this$props.onError,
|
|
96
|
+
imageRef = _this$props.imageRef;
|
|
96
97
|
var isImageValid = this.state.isImageValid;
|
|
97
98
|
var _customClass$customIm = customClass.customImageClass,
|
|
98
99
|
customImageClass = _customClass$customIm === void 0 ? '' : _customClass$customIm;
|
|
@@ -104,6 +105,7 @@ var AttachmentImage = /*#__PURE__*/function (_Component) {
|
|
|
104
105
|
className: customImageClass,
|
|
105
106
|
alt: alt,
|
|
106
107
|
isCover: isCover,
|
|
108
|
+
eleRef: imageRef,
|
|
107
109
|
onLoad: onLoad,
|
|
108
110
|
onError: onError
|
|
109
111
|
});
|
|
@@ -15,7 +15,7 @@ var _propTypes = require("./props/propTypes");
|
|
|
15
15
|
|
|
16
16
|
var _Layout = require("@zohodesk/components/es/Layout");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _Icon = _interopRequireDefault(require("@zohodesk/icons/es/Icon"));
|
|
19
19
|
|
|
20
20
|
var _Avatar = _interopRequireDefault(require("@zohodesk/components/es/Avatar/Avatar"));
|
|
21
21
|
|
|
@@ -187,16 +187,18 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
187
187
|
}, {
|
|
188
188
|
key: "componentDidUpdate",
|
|
189
189
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
190
|
-
var _previewObj$previewDa, _prevState$data$;
|
|
191
|
-
|
|
192
190
|
var previewObj = this.props.previewObj;
|
|
193
191
|
var selectedIndex = this.state.selectedIndex;
|
|
194
192
|
var indexChanged = previewObj.selectedIndex != prevProps.previewObj.selectedIndex;
|
|
195
|
-
var attachmentPreviewUrlChanged =
|
|
193
|
+
var attachmentPreviewUrlChanged = previewObj.previewData.some(function (value, index) {
|
|
194
|
+
var _prevState$data$index;
|
|
195
|
+
|
|
196
|
+
return (value === null || value === void 0 ? void 0 : value.viewUrl) !== ((_prevState$data$index = prevState.data[index]) === null || _prevState$data$index === void 0 ? void 0 : _prevState$data$index.viewUrl);
|
|
197
|
+
}); // Triggers an update if any previewed attachment is edited by the Attachment Annotator.
|
|
196
198
|
|
|
197
199
|
if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged || attachmentPreviewUrlChanged) {
|
|
198
200
|
var objChanged = previewObj.previewData.some(function (value, index) {
|
|
199
|
-
return (0, _General.shallowDiff)(value, prevProps.previewObj[index]);
|
|
201
|
+
return (0, _General.shallowDiff)(value, prevProps.previewObj.previewData[index]);
|
|
200
202
|
});
|
|
201
203
|
|
|
202
204
|
if (objChanged || indexChanged) {
|
|
@@ -412,7 +414,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
412
414
|
} : fileUnknown;
|
|
413
415
|
var iconName = fileDetails.iconName,
|
|
414
416
|
iconSize = fileDetails.iconSize;
|
|
415
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
417
|
+
return /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
416
418
|
iconClass: _AttachmentViewerModule["default"].prevFooterIcon,
|
|
417
419
|
name: iconName,
|
|
418
420
|
size: iconSize,
|
|
@@ -461,13 +463,15 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
461
463
|
_data$customClass = data.customClass,
|
|
462
464
|
customClass = _data$customClass === void 0 ? {} : _data$customClass,
|
|
463
465
|
_data$customProps = data.customProps,
|
|
464
|
-
customProps = _data$customProps === void 0 ? {} : _data$customProps
|
|
466
|
+
customProps = _data$customProps === void 0 ? {} : _data$customProps,
|
|
467
|
+
imageRef = data.imageRef;
|
|
465
468
|
var _customProps$imagePro = customProps.imageProps,
|
|
466
469
|
imageProps = _customProps$imagePro === void 0 ? {} : _customProps$imagePro;
|
|
467
470
|
var _customClass$customIm = customClass.customImageClass,
|
|
468
471
|
customImageClass = _customClass$customIm === void 0 ? '' : _customClass$customIm,
|
|
469
472
|
_customClass$customCh = customClass.customChildrenClass,
|
|
470
473
|
customChildrenClass = _customClass$customCh === void 0 ? '' : _customClass$customCh;
|
|
474
|
+
var resolvedImageRef = imageRef;
|
|
471
475
|
var retainZoom = canZoom && selectedIndex == i && maintainZoom;
|
|
472
476
|
var handleZoomOut = isPreviewAttachmentValid && isZoomed ? this.zoomOut.bind(this, i) : undefined;
|
|
473
477
|
var handleZoomIn = isPreviewAttachmentValid && !isZoomed ? function (e) {
|
|
@@ -482,15 +486,16 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
482
486
|
customChildrenClass: customChildrenClass
|
|
483
487
|
});
|
|
484
488
|
|
|
485
|
-
var img = /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
|
|
489
|
+
var img = /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({}, imageProps, {
|
|
486
490
|
customClass: imageFrameCustomClass,
|
|
487
491
|
src: viewUrl,
|
|
488
492
|
onClick: handleImageClick,
|
|
489
493
|
alt: name,
|
|
490
494
|
dataId: dataId,
|
|
491
495
|
id: "img".concat(i),
|
|
492
|
-
isCover: false
|
|
493
|
-
|
|
496
|
+
isCover: false,
|
|
497
|
+
imageRef: resolvedImageRef
|
|
498
|
+
}), children);
|
|
494
499
|
|
|
495
500
|
return typeof renderCustomImagePreviewElement === 'function' ? renderCustomImagePreviewElement({
|
|
496
501
|
defaultView: img,
|
|
@@ -787,7 +792,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
787
792
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
788
793
|
className: _AttachmentViewerModule["default"].btn,
|
|
789
794
|
"aria-label": i18nKeys.previousText
|
|
790
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
795
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
791
796
|
name: "ZD-arrowLeft3",
|
|
792
797
|
iconClass: _AttachmentViewerModule["default"].arrow,
|
|
793
798
|
dataId: "leftAttachNav",
|
|
@@ -808,7 +813,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
808
813
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
809
814
|
className: _AttachmentViewerModule["default"].btn,
|
|
810
815
|
"aria-label": i18nKeys.nextText
|
|
811
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
816
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
812
817
|
name: "ZD-arrowRight3",
|
|
813
818
|
iconClass: _AttachmentViewerModule["default"].arrow,
|
|
814
819
|
dataId: "rightAttachNav",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
height: var(--zd_size48) ;
|
|
3
3
|
position: relative;
|
|
4
4
|
z-index: 1;
|
|
5
|
-
padding-block:0 ;
|
|
5
|
+
padding-block: 0 ;
|
|
6
6
|
padding-inline: var(--zd_size15) ;
|
|
7
7
|
composes: alignVertical from '~@zohodesk/components/es/common/common.module.css';
|
|
8
8
|
background-color: var(--zdt_attachmentviewer_header_bg);
|
|
@@ -10,20 +10,13 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.title {
|
|
13
|
+
padding-inline-end: var(--zd_size15) ;
|
|
13
14
|
max-width: 50% ;
|
|
14
15
|
composes: dotted from '~@zohodesk/components/es/common/common.module.css';
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
[dir=ltr] .title {
|
|
18
|
-
padding-right: var(--zd_size15) ;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
[dir=rtl] .title {
|
|
22
|
-
padding-left: var(--zd_size15) ;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
18
|
.count {
|
|
26
|
-
padding-block:0 ;
|
|
19
|
+
padding-block: 0 ;
|
|
27
20
|
padding-inline: var(--zd_size10) ;
|
|
28
21
|
position: absolute;
|
|
29
22
|
composes: xMiddle from '~@zohodesk/components/es/common/common.module.css';
|
|
@@ -80,7 +73,7 @@
|
|
|
80
73
|
|
|
81
74
|
.preview {
|
|
82
75
|
margin-block: var(--zd_size20) ;
|
|
83
|
-
margin-inline:0 ;
|
|
76
|
+
margin-inline: 0 ;
|
|
84
77
|
composes: posrel from '~@zohodesk/components/es/common/common.module.css';
|
|
85
78
|
text-align: center;
|
|
86
79
|
}
|
|
@@ -136,7 +129,7 @@
|
|
|
136
129
|
}
|
|
137
130
|
|
|
138
131
|
.listContainer {
|
|
139
|
-
padding-block:0 ;
|
|
132
|
+
padding-block: 0 ;
|
|
140
133
|
padding-inline: var(--zd_size18) ;
|
|
141
134
|
}
|
|
142
135
|
|
|
@@ -324,7 +317,7 @@
|
|
|
324
317
|
}
|
|
325
318
|
|
|
326
319
|
.authorName {
|
|
327
|
-
margin-block:0 ;
|
|
320
|
+
margin-block: 0 ;
|
|
328
321
|
margin-inline: var(--zd_size10) ;
|
|
329
322
|
font-size: var(--zd_font_size15) ;
|
|
330
323
|
color: var(--zdt_attachmentviewer_title_text);
|
|
@@ -364,4 +357,4 @@
|
|
|
364
357
|
color: var(--zdt_attachmentviewer_title_text);
|
|
365
358
|
padding: var(--zd_size2) ;
|
|
366
359
|
margin: auto ;
|
|
367
|
-
}
|
|
360
|
+
}
|
|
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AttachmentViewer_defaultProps = exports.AttachmentImage_defaultProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _General = require("../../utils/General");
|
|
9
|
+
|
|
7
10
|
var AttachmentImage_defaultProps = {
|
|
8
11
|
dataId: 'AttachmentImage',
|
|
9
12
|
customClass: {
|
|
@@ -18,8 +21,8 @@ var AttachmentViewer_defaultProps = {
|
|
|
18
21
|
maintainZoom: false,
|
|
19
22
|
isActive: false,
|
|
20
23
|
dataId: 'AttachmentViewer',
|
|
21
|
-
i18nKeys:
|
|
22
|
-
customProps:
|
|
24
|
+
i18nKeys: _General.DUMMY_OBJECT,
|
|
25
|
+
customProps: _General.DUMMY_OBJECT,
|
|
23
26
|
showCount: true
|
|
24
27
|
};
|
|
25
28
|
exports.AttachmentViewer_defaultProps = AttachmentViewer_defaultProps;
|
|
@@ -13,6 +13,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
13
13
|
|
|
14
14
|
var AttachmentImage_propTypes = {
|
|
15
15
|
alt: _propTypes["default"].string,
|
|
16
|
+
imageRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].shape({
|
|
17
|
+
current: _propTypes["default"].any
|
|
18
|
+
})]),
|
|
16
19
|
customClass: _propTypes["default"].shape({
|
|
17
20
|
customImageClass: _propTypes["default"].string,
|
|
18
21
|
customChildrenClass: _propTypes["default"].string
|
|
@@ -41,7 +44,7 @@ var AttachmentViewer_propTypes = {
|
|
|
41
44
|
showText: _propTypes["default"].string,
|
|
42
45
|
previewUnsupportedText: _propTypes["default"].string
|
|
43
46
|
}),
|
|
44
|
-
needDownload: _propTypes["default"].
|
|
47
|
+
needDownload: _propTypes["default"].bool,
|
|
45
48
|
previewObj: _propTypes["default"].object,
|
|
46
49
|
responsiveId: _propTypes["default"].string,
|
|
47
50
|
maintainZoom: _propTypes["default"].bool,
|
|
@@ -54,6 +57,7 @@ var AttachmentViewer_propTypes = {
|
|
|
54
57
|
document: _propTypes["default"].arrayOf(_propTypes["default"].string)
|
|
55
58
|
}),
|
|
56
59
|
renderUnSupportedElement: _propTypes["default"].func,
|
|
60
|
+
renderCustomImagePreviewElement: _propTypes["default"].func,
|
|
57
61
|
customProps: _propTypes["default"].shape({
|
|
58
62
|
avatarProps: _propTypes["default"].exact(_propTypes2.propTypes)
|
|
59
63
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.0.0-temp-230.
|
|
3
|
+
"version": "1.0.0-temp-230.3",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"snap-update": "npm run test-clean && npm run test -- -u",
|
|
35
35
|
"sstest": "react-cli sstest",
|
|
36
36
|
"common_package_build": "cd ../common && npm run build && cd ../dot",
|
|
37
|
-
"prepublishOnly": "node ../prePublish.js && npm run css:review",
|
|
37
|
+
"prepublishOnly": "node ../prePublish.js && npm run css:review && npm run review:props",
|
|
38
38
|
"postpublish": "node ../postPublish.js",
|
|
39
39
|
"test-clean": "react-cli clean ./coverage && react-cli clean ./unittest react-cli clean ./es && react-cli clean ./lib && react-cli clean ./package-lock.json && react-cli clean ./result.json",
|
|
40
40
|
"download": "npm run downloadOnly && cd ../ && npm run download",
|
|
41
41
|
"downloadOnly": "react-cli clean ./node_modules ./package-lock.json && npm install --legacy-peer-deps",
|
|
42
42
|
"expublish": "node ../publish.js -- exp",
|
|
43
43
|
"css:lineheight:validate": "npx z-node-plugins lineheight:errorcheck ./src/",
|
|
44
|
-
"variable:addignore": "
|
|
45
|
-
"variable:convert": "
|
|
46
|
-
"variable:check": "
|
|
44
|
+
"variable:addignore": "npx css-variable-migrator addignore ./src",
|
|
45
|
+
"variable:convert": "npx css-variable-migrator convert ./src",
|
|
46
|
+
"variable:check": "npx css-variable-migrator check ./src",
|
|
47
47
|
"css:review": " npm run dubCheck && npm run css:lineheight:validate && npm run theme:validate ",
|
|
48
48
|
"theme:validate": "npx z-node-plugins theme:validate ./src ./.cli ./.cli/stringContains.js",
|
|
49
49
|
"theme:addignore": "npx z-node-plugins theme:addignore ./src ./.cli ./.cli/stringContains.js",
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"@testing-library/react-hooks": "^7.0.2",
|
|
67
67
|
"@testing-library/user-event": "^13.0.10",
|
|
68
68
|
"@zohodesk-private/color-variable-preprocessor": "1.3.1",
|
|
69
|
-
"@zohodesk-private/css-variable-migrator": "1.0.
|
|
69
|
+
"@zohodesk-private/css-variable-migrator": "1.0.11",
|
|
70
70
|
"@zohodesk-private/node-plugins": "1.1.14",
|
|
71
71
|
"@zohodesk-private/react-prop-validator": "1.2.3",
|
|
72
72
|
"@zohodesk/a11y": "2.3.9",
|
|
73
73
|
"@zohodesk/client_build_tool": "0.0.20",
|
|
74
|
-
"@zohodesk/components": "1.6.
|
|
74
|
+
"@zohodesk/components": "1.6.13",
|
|
75
75
|
"@zohodesk/dotkit": "1.0.9",
|
|
76
76
|
"@zohodesk/hooks": "2.0.8",
|
|
77
|
-
"@zohodesk/icons": "1.3.
|
|
77
|
+
"@zohodesk/icons": "1.3.1",
|
|
78
78
|
"@zohodesk/layout": "3.1.0",
|
|
79
79
|
"@zohodesk/react-cli": "1.1.27",
|
|
80
80
|
"@zohodesk/svg": "1.3.5",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"velocity-react": "1.4.3",
|
|
91
91
|
"@zohodesk/variables": "1.3.1",
|
|
92
|
-
"@zohodesk/components": "1.6.
|
|
93
|
-
"@zohodesk/icons": "1.3.
|
|
92
|
+
"@zohodesk/components": "1.6.13",
|
|
93
|
+
"@zohodesk/icons": "1.3.1",
|
|
94
94
|
"@zohodesk/svg": "1.3.5",
|
|
95
95
|
"@zohodesk/virtualizer": "1.0.13",
|
|
96
96
|
"react-sortable-hoc": "^0.8.3",
|