@zohodesk/dot 1.0.0-beta.218 → 1.0.0-beta.219
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/README.md +1 -1
- package/es/AttachmentViewer/AttachmentImage.js +1 -1
- package/es/AttachmentViewer/AttachmentViewer.js +10 -5
- package/es/AttachmentViewer/AttachmentViewer.module.css +2 -2
- package/lib/AttachmentViewer/AttachmentImage.js +2 -2
- package/lib/AttachmentViewer/AttachmentViewer.js +10 -5
- package/lib/AttachmentViewer/AttachmentViewer.module.css +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
/** * Libraries ** */
|
|
4
4
|
import React, { Component } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import Image from '../Image/Image';
|
|
6
7
|
/** * CSS ** */
|
|
7
8
|
|
|
8
9
|
import style from './AttachmentViewer.module.css';
|
|
9
|
-
import Image from '../Image/Image';
|
|
10
10
|
export default class AttachmentImage extends Component {
|
|
11
11
|
constructor(props) {
|
|
12
12
|
super(props);
|
|
@@ -266,7 +266,8 @@ export default class AttachmentViewer extends Component {
|
|
|
266
266
|
const {
|
|
267
267
|
responsiveId,
|
|
268
268
|
needDownload,
|
|
269
|
-
i18nKeys
|
|
269
|
+
i18nKeys,
|
|
270
|
+
isActive
|
|
270
271
|
} = this.props;
|
|
271
272
|
const totalLen = data.length;
|
|
272
273
|
const selectedAttachment = data[selectedIndex] || {};
|
|
@@ -276,7 +277,7 @@ export default class AttachmentViewer extends Component {
|
|
|
276
277
|
let authorName;
|
|
277
278
|
const {
|
|
278
279
|
author
|
|
279
|
-
} = data[selectedIndex] ? data[selectedIndex] :
|
|
280
|
+
} = data[selectedIndex] ? data[selectedIndex] : {};
|
|
280
281
|
|
|
281
282
|
if (author) {
|
|
282
283
|
authorHref = author.href;
|
|
@@ -285,7 +286,9 @@ export default class AttachmentViewer extends Component {
|
|
|
285
286
|
|
|
286
287
|
const ariaId = this.getNextId();
|
|
287
288
|
return /*#__PURE__*/React.createElement(FreezeLayer, {
|
|
288
|
-
isActive:
|
|
289
|
+
isActive: isActive && totalLen >= 1,
|
|
290
|
+
palette: "dark",
|
|
291
|
+
animationName: "expand"
|
|
289
292
|
}, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
290
293
|
responsiveId: responsiveId,
|
|
291
294
|
query: this.responsiveFunc
|
|
@@ -514,13 +517,15 @@ AttachmentViewer.propTypes = {
|
|
|
514
517
|
needDownload: PropTypes.string,
|
|
515
518
|
previewObj: PropTypes.object,
|
|
516
519
|
responsiveId: PropTypes.string,
|
|
517
|
-
maintainZoom: PropTypes.bool
|
|
520
|
+
maintainZoom: PropTypes.bool,
|
|
521
|
+
isActive: PropTypes.bool
|
|
518
522
|
};
|
|
519
523
|
AttachmentViewer.defaultProps = {
|
|
520
524
|
responsiveId: "Helmet",
|
|
521
525
|
needDownload: true,
|
|
522
526
|
i18nKeys: {},
|
|
523
|
-
maintainZoom: false
|
|
527
|
+
maintainZoom: false,
|
|
528
|
+
isActive: false
|
|
524
529
|
};
|
|
525
530
|
|
|
526
531
|
if (false) {
|
|
@@ -268,13 +268,13 @@
|
|
|
268
268
|
cursor: zoom-in;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
.normalImg {
|
|
271
|
+
.imgRef .normalImg {
|
|
272
272
|
max-width: inherit;
|
|
273
273
|
max-height: inherit;
|
|
274
274
|
cursor: zoom-in;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
.zoomedImg {
|
|
277
|
+
.imgRef .zoomedImg {
|
|
278
278
|
max-width: initial;
|
|
279
279
|
max-height: initial;
|
|
280
280
|
cursor: zoom-out;
|
|
@@ -11,10 +11,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
|
14
|
-
var _AttachmentViewerModule = _interopRequireDefault(require("./AttachmentViewer.module.css"));
|
|
15
|
-
|
|
16
14
|
var _Image = _interopRequireDefault(require("../Image/Image"));
|
|
17
15
|
|
|
16
|
+
var _AttachmentViewerModule = _interopRequireDefault(require("./AttachmentViewer.module.css"));
|
|
17
|
+
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
19
|
|
|
20
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -344,7 +344,8 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
344
344
|
var _this$props = this.props,
|
|
345
345
|
responsiveId = _this$props.responsiveId,
|
|
346
346
|
needDownload = _this$props.needDownload,
|
|
347
|
-
i18nKeys = _this$props.i18nKeys
|
|
347
|
+
i18nKeys = _this$props.i18nKeys,
|
|
348
|
+
isActive = _this$props.isActive;
|
|
348
349
|
var totalLen = data.length;
|
|
349
350
|
var selectedAttachment = data[selectedIndex] || {};
|
|
350
351
|
var selectedImgUrl = selectedAttachment.viewUrl;
|
|
@@ -352,7 +353,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
352
353
|
var authorHref;
|
|
353
354
|
var authorName;
|
|
354
355
|
|
|
355
|
-
var _ref3 = data[selectedIndex] ? data[selectedIndex] :
|
|
356
|
+
var _ref3 = data[selectedIndex] ? data[selectedIndex] : {},
|
|
356
357
|
author = _ref3.author;
|
|
357
358
|
|
|
358
359
|
if (author) {
|
|
@@ -362,7 +363,9 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
362
363
|
|
|
363
364
|
var ariaId = this.getNextId();
|
|
364
365
|
return /*#__PURE__*/_react["default"].createElement(_FreezeLayer["default"], {
|
|
365
|
-
isActive:
|
|
366
|
+
isActive: isActive && totalLen >= 1,
|
|
367
|
+
palette: "dark",
|
|
368
|
+
animationName: "expand"
|
|
366
369
|
}, /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
367
370
|
responsiveId: responsiveId,
|
|
368
371
|
query: this.responsiveFunc
|
|
@@ -597,13 +600,15 @@ AttachmentViewer.propTypes = {
|
|
|
597
600
|
needDownload: _propTypes["default"].string,
|
|
598
601
|
previewObj: _propTypes["default"].object,
|
|
599
602
|
responsiveId: _propTypes["default"].string,
|
|
600
|
-
maintainZoom: _propTypes["default"].bool
|
|
603
|
+
maintainZoom: _propTypes["default"].bool,
|
|
604
|
+
isActive: _propTypes["default"].bool
|
|
601
605
|
};
|
|
602
606
|
AttachmentViewer.defaultProps = {
|
|
603
607
|
responsiveId: "Helmet",
|
|
604
608
|
needDownload: true,
|
|
605
609
|
i18nKeys: {},
|
|
606
|
-
maintainZoom: false
|
|
610
|
+
maintainZoom: false,
|
|
611
|
+
isActive: false
|
|
607
612
|
};
|
|
608
613
|
|
|
609
614
|
if (false) {
|
|
@@ -268,13 +268,13 @@
|
|
|
268
268
|
cursor: zoom-in;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
.normalImg {
|
|
271
|
+
.imgRef .normalImg {
|
|
272
272
|
max-width: inherit;
|
|
273
273
|
max-height: inherit;
|
|
274
274
|
cursor: zoom-in;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
.zoomedImg {
|
|
277
|
+
.imgRef .zoomedImg {
|
|
278
278
|
max-width: initial;
|
|
279
279
|
max-height: initial;
|
|
280
280
|
cursor: zoom-out;
|