@zohodesk/dot 1.0.0-temp-200.2 → 1.0.0-temp-187.4

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.
Files changed (37) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/es/Attachment/Attachment.js +1 -2
  3. package/es/Attachment/Attachment.module.css +3 -7
  4. package/es/AttachmentViewer/Attachment.js +1 -60
  5. package/es/AttachmentViewer/AttachmentViewer.js +14 -148
  6. package/es/AttachmentViewer/AttachmentViewer.module.css +5 -125
  7. package/es/common/dot_common.module.css +2 -37
  8. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -2
  9. package/es/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
  10. package/es/list/DepartmentDropDown/DepartmentDropDown.js +7 -2
  11. package/es/list/DepartmentDropDown/props/defaultProps.js +2 -1
  12. package/es/list/DepartmentDropDown/props/propTypes.js +3 -0
  13. package/es/list/status/StatusListItem/StatusListItem.module.css +35 -5
  14. package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -2
  15. package/es/v1/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
  16. package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +7 -2
  17. package/es/v1/list/DepartmentDropDown/props/defaultProps.js +2 -1
  18. package/es/v1/list/DepartmentDropDown/props/propTypes.js +3 -0
  19. package/lib/Attachment/Attachment.js +1 -3
  20. package/lib/Attachment/Attachment.module.css +3 -7
  21. package/lib/AttachmentViewer/Attachment.js +1 -88
  22. package/lib/AttachmentViewer/AttachmentViewer.js +15 -148
  23. package/lib/AttachmentViewer/AttachmentViewer.module.css +5 -125
  24. package/lib/common/dot_common.module.css +2 -37
  25. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -3
  26. package/lib/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
  27. package/lib/list/DepartmentDropDown/DepartmentDropDown.js +8 -3
  28. package/lib/list/DepartmentDropDown/props/defaultProps.js +2 -1
  29. package/lib/list/DepartmentDropDown/props/propTypes.js +2 -0
  30. package/lib/list/status/StatusListItem/StatusListItem.module.css +35 -5
  31. package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -3
  32. package/lib/v1/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
  33. package/lib/v1/list/DepartmentDropDown/DepartmentDropDown.js +8 -3
  34. package/lib/v1/list/DepartmentDropDown/props/defaultProps.js +2 -1
  35. package/lib/v1/list/DepartmentDropDown/props/propTypes.js +2 -0
  36. package/package.json +6 -6
  37. /package/images/{audio_thumbnail_old.png → audio_thumbnail.png} +0 -0
@@ -6,43 +6,58 @@
6
6
  min-height: var(--zd_size35) ;
7
7
  cursor: pointer;
8
8
  }
9
+
9
10
  [dir=ltr] .withBorder {
10
11
  border-left: 1px solid var(--zdt_statuslistitem_default_border);
11
12
  }
13
+
12
14
  [dir=rtl] .withBorder {
13
15
  border-right: 1px solid var(--zdt_statuslistitem_default_border);
14
16
  }
17
+
15
18
  [dir=ltr] .small {
16
19
  padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5) ;
17
20
  }
21
+
18
22
  [dir=rtl] .small {
19
23
  padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size3) ;
20
24
  }
25
+
21
26
  .medium {
22
27
  padding: var(--zd_size7) var(--zd_size20) ;
23
28
  }
29
+
24
30
  .large {
25
31
  height: var(--zd_size48) ;
26
32
  }
33
+
27
34
  [dir=ltr] .large {
28
35
  padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25) ;
29
36
  }
37
+
30
38
  [dir=rtl] .large {
31
39
  padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3) ;
32
40
  }
33
- .value,.multiLineValue {
41
+
42
+ .value,
43
+ .multiLineValue {
34
44
  line-height: 1.5385;
35
45
  }
46
+
36
47
  .value {
37
48
  composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
38
49
  }
39
- .multiLineValue{
50
+
51
+ .multiLineValue {
40
52
  word-break: break-word;
53
+ -webkit-line-clamp: 3;
41
54
  composes: clamp from '~@zohodesk/components/lib/common/common.module.css';
42
55
  }
56
+
43
57
  [dir=ltr] .withBorder.active {
44
58
  border-left-color: var(--zdt_statuslistitem_default_active_border);
45
59
  }
60
+
46
61
  [dir=rtl] .withBorder.active {
47
62
  border-right-color: var(--zdt_statuslistitem_default_active_border);
48
63
  }
@@ -50,44 +65,56 @@
50
65
  .default.hover, .default.effect:hover {
51
66
  background-color: var(--zdt_statuslistitem_default_effect_bg);
52
67
  }
68
+
53
69
  .primary.hover, .primary.effect:hover, .selected {
54
70
  background-color: var(--zdt_statuslistitem_primary_efffect_bg);
55
71
  }
72
+
56
73
  .secondary.hover, .secondary.effect:hover {
57
74
  background-color: var(--zdt_statuslistitem_secondary_effect_bg);
58
75
  }
76
+
59
77
  .list.active.default, .list.active.primary {
60
78
  background-color: var(--zdt_statuslistitem_primary_efffect_bg);
61
79
  }
80
+
62
81
  .list.active.secondary {
63
82
  background-color: var(--zdt_statuslistitem_secondary_effect_bg);
64
83
  }
84
+
65
85
  .secondary.hover,
66
86
  .secondary.effect:hover,
67
87
  .list.active.secondary {
68
88
  color: var(--zdt_statuslistitem_secondary_effect_text);
69
89
  }
90
+
70
91
  .tickIcon {
71
92
  color: var(--zdt_statuslistitem_tickicon);
72
93
  position: absolute;
73
- top:50% ;
94
+ top: 50% ;
74
95
  transform: translateY(-50%);
75
96
  }
97
+
76
98
  [dir=ltr] .tickIcon {
77
99
  right: var(--zd_size20) ;
78
100
  }
101
+
79
102
  [dir=rtl] .tickIcon {
80
103
  left: var(--zd_size20) ;
81
104
  }
82
- .tickIcon > i {
105
+
106
+ .tickIcon>i {
83
107
  display: block;
84
108
  }
109
+
85
110
  [dir=ltr] .active.withTick {
86
111
  padding-right: var(--zd_size39) ;
87
112
  }
113
+
88
114
  [dir=rtl] .active.withTick {
89
115
  padding-left: var(--zd_size39) ;
90
116
  }
117
+
91
118
  /* Status Type */
92
119
  .statusType {
93
120
  width: var(--zd_size8) ;
@@ -100,12 +127,15 @@
100
127
  [dir=rtl] .statusType {
101
128
  margin-left: var(--zd_size13) ;
102
129
  }
130
+
103
131
  .black {
104
132
  background-color: var(--zdt_statuslistitem_black_bg);
105
133
  }
134
+
106
135
  .orange {
107
136
  background-color: var(--zdt_statuslistitem_orange_bg);
108
137
  }
138
+
109
139
  .green {
110
140
  background-color: var(--zdt_statuslistitem_green_bg);
111
- }
141
+ }
@@ -164,7 +164,8 @@ export default class TagsMultiSelect extends React.Component {
164
164
  const {
165
165
  TextBoxIconProps = {},
166
166
  TagWrapperProps = {},
167
- TagProps = {}
167
+ TagProps = {},
168
+ listProps = {}
168
169
  } = customProps;
169
170
  return /*#__PURE__*/React.createElement("div", {
170
171
  className: `${style.container} ${!isReadOnly ? ` ${needBorder ? style.hasBorder : ''}
@@ -298,7 +299,8 @@ export default class TagsMultiSelect extends React.Component {
298
299
  getRef: this.getSelectedItemRef,
299
300
  isDisabled: listDisabled,
300
301
  customProps: listItemProps,
301
- customClass: listItemClass
302
+ customClass: listItemClass,
303
+ ...listProps
302
304
  }, isNew ? /*#__PURE__*/React.createElement(Container, {
303
305
  alignBox: "row",
304
306
  align: "vertical"
@@ -52,6 +52,7 @@ export const propTypes = {
52
52
  customProps: PropTypes.shape({
53
53
  TextBoxIconProps: PropTypes.object,
54
54
  TagWrapperProps: PropTypes.object,
55
- TagProps: PropTypes.object
55
+ TagProps: PropTypes.object,
56
+ listProps: PropTypes.object
56
57
  })
57
58
  };
@@ -21,8 +21,12 @@ function DepartmentDropDown(props) {
21
21
  searchStr,
22
22
  i18nKeys,
23
23
  onMoveDepartment,
24
- getDepartment
24
+ getDepartment,
25
+ customProps
25
26
  } = props;
27
+ const {
28
+ toggleDropDownProps = {}
29
+ } = customProps;
26
30
  let {
27
31
  title = 'Move Department',
28
32
  searchEmptyText = 'No results found',
@@ -71,7 +75,8 @@ function DepartmentDropDown(props) {
71
75
  getNextOptions: getNextOptions,
72
76
  isNextOptions: isNextOptions,
73
77
  onSearch: onSearch,
74
- needSearchFetching: needSearchFetching
78
+ needSearchFetching: needSearchFetching,
79
+ ...toggleDropDownProps
75
80
  });
76
81
  }
77
82
 
@@ -3,5 +3,6 @@ export const defaultProps = {
3
3
  isPopupActive: true,
4
4
  isNextOptions: false,
5
5
  searchStr: '',
6
- i18nKeys: {}
6
+ i18nKeys: {},
7
+ customProps: {}
7
8
  };
@@ -20,5 +20,8 @@ export const propTypes = {
20
20
  searchEmptyText: PropTypes.string,
21
21
  searchErrorText: PropTypes.string,
22
22
  placeholder: PropTypes.string
23
+ }),
24
+ customProps: PropTypes.shape({
25
+ toggleDropDownProps: PropTypes.object
23
26
  })
24
27
  };
@@ -70,9 +70,7 @@ var Attachment = /*#__PURE__*/function (_React$Component) {
70
70
  fileInfo = _this$props.fileInfo,
71
71
  i18nKeys = _this$props.i18nKeys,
72
72
  dataSelectorId = _this$props.dataSelectorId,
73
- isDisabled = _this$props.isDisabled,
74
- _this$props$iconPalet = _this$props.iconPalette,
75
- iconPalette = _this$props$iconPalet === void 0 ? "white" : _this$props$iconPalet;
73
+ isDisabled = _this$props.isDisabled;
76
74
  var _i18nKeys$downloadTit = i18nKeys.downloadTitle,
77
75
  downloadTitle = _i18nKeys$downloadTit === void 0 ? 'Download' : _i18nKeys$downloadTit;
78
76
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
@@ -14,15 +14,15 @@
14
14
  height: 100% ;
15
15
  width: 100% ;
16
16
  position: absolute;
17
- top: 0
17
+ top:0
18
18
  }
19
19
 
20
20
  [dir=ltr] .disableLayer {
21
- left: 0
21
+ left:0
22
22
  }
23
23
 
24
24
  [dir=rtl] .disableLayer {
25
- right: 0
25
+ right:0
26
26
  }
27
27
 
28
28
  .attachmentHover {
@@ -66,10 +66,6 @@
66
66
  height: var(--zd_size40) ;
67
67
  }
68
68
 
69
- .attachleft {
70
- padding: var(--zd_size3) ;
71
- }
72
-
73
69
  [dir=ltr] .attachleft {
74
70
  border-right: 1px solid var(--zdt_attachment_default_border);
75
71
  }
@@ -3,89 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.designFileTypes = designFileTypes;
7
- exports.docsFileTypes = docsFileTypes;
8
6
  exports.getExtensionFromFileName = getExtensionFromFileName;
9
7
  exports.isAudioFile = isAudioFile;
10
8
  exports.isBrowserSupportedFile = isBrowserSupportedFile;
11
- exports.isDocsFile = isDocsFile;
12
- exports.isEmailFile = isEmailFile;
13
- exports.isImageFile = isImageFile;
14
- exports.isPdfFile = isPdfFile;
15
- exports.isSheetFile = isSheetFile;
16
- exports.isShowFile = isShowFile;
17
- exports.isVideoFile = isVideoFile;
18
- exports.openInNewTabWithNoopener = openInNewTabWithNoopener;
19
- exports.openNewTab = openNewTab;
20
- exports.sheetFileTypes = sheetFileTypes;
21
- exports.showFileTypes = showFileTypes;
22
- exports.zipFileType = zipFileType;
23
9
  var UNASSIGNED = 'Unassigned';
24
10
  var BROWSER_SUPPORTED_FILES = ['pdf', 'text', 'txt', 'css', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'ico', 'sh', 'mp3', 'wav', 'ogg'];
25
11
 
26
12
  function isAudioFile(fileName) {
27
13
  var extension = getExtensionFromFileName(fileName);
28
- return /mp3|wav|ogg|oga|m4a|weba|opus|m4b|webma|aac/i.test(extension);
29
- }
30
-
31
- function isVideoFile(fileName) {
32
- var extension = getExtensionFromFileName(fileName);
33
- return /mp4|webm|ogg/i.test(extension);
34
- }
35
-
36
- function isPdfFile(fileName) {
37
- var extension = getExtensionFromFileName(fileName);
38
- return /pdf/i.test(extension);
39
- }
40
-
41
- function isDocsFile(fileName) {
42
- var extension = getExtensionFromFileName(fileName);
43
- return /docx|doc|docm|rtf|odt|dot|dotm|dotx|pages/i.test(extension);
44
- }
45
-
46
- function isSheetFile(fileName) {
47
- var extension = getExtensionFromFileName(fileName);
48
- return /xlsx|numbers/i.test(extension);
49
- }
50
-
51
- function isShowFile(fileName) {
52
- var extension = getExtensionFromFileName(fileName);
53
- return /pptx|ppt|pps|ppsx|key/i.test(extension);
54
- }
55
-
56
- function isEmailFile(fileName) {
57
- var extension = getExtensionFromFileName(fileName);
58
- return /eml|msg/i.test(extension);
59
- }
60
-
61
- function isImageFile(fileName) {
62
- var extension = getExtensionFromFileName(fileName);
63
- return /jpeg|jpg|png|gif|bmp|tiff|tif|ico/i.test(extension);
64
- }
65
-
66
- function docsFileTypes(fileName) {
67
- var extension = getExtensionFromFileName(fileName);
68
- return /docx|doc|docm|rtf|odt|dot|dotm|dotx|sxw|odt|ott|txt|pages/i.test(extension);
69
- }
70
-
71
- function sheetFileTypes(fileName) {
72
- var extension = getExtensionFromFileName(fileName);
73
- return /xls|xlsx|sxc|ods|csv|tsv|ots|xlsm|xlsb|xlt|xltx|xltm|numbers/i.test(extension);
74
- }
75
-
76
- function showFileTypes(fileName) {
77
- var extension = getExtensionFromFileName(fileName);
78
- return /pptx|ppt|pps|ppsx|odp|sxi|key|pot|potx/i.test(extension);
79
- }
80
-
81
- function designFileTypes(fileName) {
82
- var extension = getExtensionFromFileName(fileName);
83
- return /sketch|xd|psd|ai|fig|svg/i.test(extension);
84
- }
85
-
86
- function zipFileType(fileName) {
87
- var extension = getExtensionFromFileName(fileName);
88
- return /zip/i.test(extension);
14
+ return /mp3|wav|ogg/i.test(extension);
89
15
  }
90
16
 
91
17
  function getExtensionFromFileName(fileName) {
@@ -99,17 +25,4 @@ function getExtensionFromFileName(fileName) {
99
25
  function isBrowserSupportedFile(fileName) {
100
26
  var extension = getExtensionFromFileName(fileName);
101
27
  return BROWSER_SUPPORTED_FILES.indexOf(extension) !== -1;
102
- }
103
-
104
- function openInNewTabWithNoopener(url) {
105
- var targetnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_blank';
106
- var aTag = document.createElement('a');
107
- aTag.rel = 'noopener noreferrer';
108
- aTag.target = targetnName;
109
- aTag.href = url;
110
- aTag.click();
111
- }
112
-
113
- function openNewTab(href) {
114
- openInNewTabWithNoopener(href);
115
28
  }
@@ -39,6 +39,8 @@ var _AttachmentViewerModule = _interopRequireDefault(require("./AttachmentViewer
39
39
 
40
40
  var _utils = require("./utils");
41
41
 
42
+ var _audio_thumbnail = _interopRequireDefault(require("../../images/audio_thumbnail.png"));
43
+
42
44
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
43
45
 
44
46
  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); }
@@ -79,7 +81,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
79
81
 
80
82
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
81
83
 
82
- // import audioThumbNail from '../../images/audio_thumbnail.png'
83
84
  var AttachmentViewer = /*#__PURE__*/function (_Component) {
84
85
  _inherits(AttachmentViewer, _Component);
85
86
 
@@ -392,60 +393,6 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
392
393
  _customClass$customCh = customClass.customChildrenClass,
393
394
  customChildrenClass = _customClass$customCh === void 0 ? '' : _customClass$customCh;
394
395
  var retainZoom = canZoom && selectedIndex == i && maintainZoom;
395
- var previewurl = data.previewurl;
396
- var fileTypeIconList = [{
397
- check: (0, _Attachment.isAudioFile)(data.name),
398
- name: 'ZD-EF-fileMp3',
399
- size: '50'
400
- }, {
401
- check: (0, _Attachment.isVideoFile)(data.name),
402
- name: 'ZD-EF-fileMp4',
403
- size: '50'
404
- }, {
405
- check: (0, _Attachment.isPdfFile)(data.name),
406
- name: 'ZD-EF-filePdf',
407
- size: '50'
408
- }, {
409
- check: (0, _Attachment.docsFileTypes)(data.name),
410
- name: 'ZD-EF-fileWord',
411
- size: '50'
412
- }, {
413
- check: (0, _Attachment.sheetFileTypes)(data.name),
414
- name: 'ZD-EF-fileExcel',
415
- size: '50'
416
- }, {
417
- check: (0, _Attachment.showFileTypes)(data.name),
418
- name: 'ZD-SE-ppt',
419
- size: '50'
420
- }, {
421
- check: (0, _Attachment.designFileTypes)(data.name),
422
- name: 'ZD-EF-file',
423
- size: '50'
424
- }, {
425
- check: (0, _Attachment.isEmailFile)(data.name),
426
- name: 'ZD-CH-mail',
427
- size: '50'
428
- }, {
429
- check: (0, _Attachment.zipFileType)(data.name),
430
- name: 'ZD-EF-fileZip',
431
- size: '50'
432
- }];
433
-
434
- var PreviewFileIcon = function PreviewFileIcon(_ref3) {
435
- var data = _ref3.data;
436
- var matchedIcon = fileTypeIconList.find(function (item) {
437
- return item.check;
438
- });
439
- var iconName = matchedIcon ? matchedIcon.name : 'ZD-EF-file';
440
- var iconSize = matchedIcon ? matchedIcon.size : '50';
441
- return /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
442
- iconClass: _AttachmentViewerModule["default"].prevIcon,
443
- name: iconName,
444
- size: iconSize
445
- });
446
- };
447
-
448
- console.log("...previewUrl", previewurl, "...data", data);
449
396
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
450
397
  className: _AttachmentViewerModule["default"].imgBox,
451
398
  id: "imgBox".concat(i),
@@ -463,26 +410,11 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
463
410
  "data-id": "".concat(dataId, "_videoPreview"),
464
411
  "data-test-id": "".concat(dataId, "_videoPreview")
465
412
  }, audioProps), /*#__PURE__*/_react["default"].createElement("source", {
466
- src: previewurl,
413
+ src: viewUrl,
467
414
  type: "audio/".concat((0, _Attachment.getExtensionFromFileName)(name))
468
- })) : null : (0, _Attachment.isVideoFile)(data.name) ? selectedIndex == i ? /*#__PURE__*/_react["default"].createElement("video", {
469
- autoPlay: true,
470
- controls: true,
471
- className: _AttachmentViewerModule["default"].zoomIn
472
- }, /*#__PURE__*/_react["default"].createElement("source", {
473
- src: previewurl,
474
- type: "video/".concat((0, _Attachment.getExtensionFromFileName)(data.name))
475
- })) : null : (0, _Attachment.isDocsFile)(data.name) || (0, _Attachment.isSheetFile)(data.name) || (0, _Attachment.isShowFile)(data.name) ? selectedIndex == i ? (console.log("...previewurl", previewurl), /*#__PURE__*/_react["default"].createElement("iframe", {
476
- src: previewurl,
477
- className: _AttachmentViewerModule["default"].pdfFrame
478
- }) // <iframe src={previewurl+"&frameorigin=https://deskqa.localzoho.com"} className={style.pdfFrame}></iframe>
479
- ) : null : (0, _Attachment.isPdfFile)(data.name) || (0, _Attachment.isEmailFile)(data.name) ? selectedIndex == i ? /*#__PURE__*/_react["default"].createElement("iframe", {
480
- src: previewurl,
481
- className: _AttachmentViewerModule["default"].pdfFrame
482
- }) // <iframe src={previewurl+"&frameorigin=https://deskqa.localzoho.com"} className={style.pdfFrame}/>
483
- : null : (0, _Attachment.isImageFile)(data.name) ? /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
415
+ })) : null : /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
484
416
  customClass: {
485
- customImageClass: "".concat(_AttachmentViewerModule["default"].img, " ").concat(_AttachmentViewerModule["default"].altText, "\n ").concat(canZoom || retainZoom ? isZoomed ? "".concat(_AttachmentViewerModule["default"].zoomedImg, " ").concat(_AttachmentViewerModule["default"].zoomOutCursor) : "".concat(_AttachmentViewerModule["default"].normalImg, " ").concat(_AttachmentViewerModule["default"].zoomInCursor) : '', " ").concat(customImageClass),
417
+ customImageClass: "".concat(_AttachmentViewerModule["default"].img, " ").concat(_AttachmentViewerModule["default"].altText, "\n ").concat(canZoom || retainZoom ? isZoomed ? "".concat(_AttachmentViewerModule["default"].zoomedImg, " ").concat(_AttachmentViewerModule["default"].zoomOutCursor) : "".concat(_AttachmentViewerModule["default"].normalImg, " ").concat(_AttachmentViewerModule["default"].zoomInCursor) : '', " ").concat(customImageClass),
486
418
  customChildrenClass: customChildrenClass
487
419
  },
488
420
  src: viewUrl,
@@ -493,19 +425,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
493
425
  dataId: dataId,
494
426
  id: "img".concat(i),
495
427
  isCover: false
496
- }, imageProps), children) : /*#__PURE__*/_react["default"].createElement("div", {
497
- className: _AttachmentViewerModule["default"].previewNone
498
- }, /*#__PURE__*/_react["default"].createElement("div", {
499
- className: _AttachmentViewerModule["default"].fileTypeImg
500
- }, /*#__PURE__*/_react["default"].createElement(PreviewFileIcon, {
501
- data: data.name
502
- })), "Preview not available for the selected file type.", /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement(_Link["default"], {
503
- href: data.href,
504
- className: _AttachmentViewerModule["default"].downloadLink,
505
- onClick: function onClick() {
506
- return (0, _Attachment.openNewTab)(data.href);
507
- }
508
- }, "Download"))));
428
+ }, imageProps), children)));
509
429
  });
510
430
  }
511
431
  }, {
@@ -533,8 +453,8 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
533
453
  var authorHref;
534
454
  var authorName;
535
455
 
536
- var _ref4 = data[selectedIndex] ? data[selectedIndex] : {},
537
- author = _ref4.author;
456
+ var _ref3 = data[selectedIndex] ? data[selectedIndex] : {},
457
+ author = _ref3.author;
538
458
 
539
459
  if (author) {
540
460
  authorHref = author.href;
@@ -549,8 +469,8 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
549
469
  }, /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
550
470
  responsiveId: responsiveId,
551
471
  query: this.responsiveFunc
552
- }, function (_ref5) {
553
- var uptoTablet = _ref5.uptoTablet;
472
+ }, function (_ref4) {
473
+ var uptoTablet = _ref4.uptoTablet;
554
474
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
555
475
  scroll: "none",
556
476
  "data-scroll-palette": "dark"
@@ -742,62 +662,11 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
742
662
  var _customClass$customIm2 = customClass.customImageClass,
743
663
  customImageClass = _customClass$customIm2 === void 0 ? '' : _customClass$customIm2,
744
664
  _customClass$customCh2 = customClass.customChildrenClass,
745
- customChildrenClass = _customClass$customCh2 === void 0 ? '' : _customClass$customCh2; // thumbnail= isAudioFile(name) ? thumbnail || audioThumbNail : thumbnail //fallback thumbnail for audio
746
-
747
- var fileTypeIconList = [{
748
- check: (0, _Attachment.isAudioFile)(name),
749
- name: thumbnail || 'ZD-EF-fileMp3',
750
- size: '30'
751
- }, {
752
- check: (0, _Attachment.isVideoFile)(name),
753
- name: 'ZD-EF-fileMp4',
754
- size: '30'
755
- }, {
756
- check: (0, _Attachment.isPdfFile)(name),
757
- name: 'ZD-EF-filePdf',
758
- size: '30'
759
- }, {
760
- check: (0, _Attachment.docsFileTypes)(name),
761
- name: 'ZD-EF-fileWord',
762
- size: '30'
763
- }, {
764
- check: (0, _Attachment.sheetFileTypes)(name),
765
- name: 'ZD-EF-fileExcel',
766
- size: '30'
767
- }, {
768
- check: (0, _Attachment.showFileTypes)(name),
769
- name: 'ZD-SE-ppt',
770
- size: '30'
771
- }, {
772
- check: (0, _Attachment.designFileTypes)(name),
773
- name: 'ZD-EF-file',
774
- size: '30'
775
- }, {
776
- check: (0, _Attachment.isEmailFile)(name),
777
- name: 'ZD-CH-mail',
778
- size: '30'
779
- }, {
780
- check: (0, _Attachment.zipFileType)(name),
781
- name: 'ZD-EF-fileZip',
782
- size: '30'
783
- }];
784
-
785
- var PreviewFileIcon = function PreviewFileIcon(_ref6) {
786
- var data = _ref6.data;
787
- var matchedIcon = fileTypeIconList.find(function (item) {
788
- return item.check;
789
- });
790
- var iconName = matchedIcon ? matchedIcon.name : 'ZD-EF-file';
791
- var iconSize = matchedIcon ? matchedIcon.size : '30';
792
- return /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
793
- iconClass: _AttachmentViewerModule["default"].prevFooterIcon,
794
- name: iconName,
795
- size: iconSize
796
- });
797
- };
665
+ customChildrenClass = _customClass$customCh2 === void 0 ? '' : _customClass$customCh2;
666
+ thumbnail = (0, _Attachment.isAudioFile)(name) ? thumbnail || _audio_thumbnail["default"] : thumbnail; //fallback thumbnail for audio
798
667
 
799
668
  return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
800
- className: "".concat(_AttachmentViewerModule["default"].imgItem, " ").concat(index === selectedIndex ? _AttachmentViewerModule["default"].selected : '', " ").concat((0, _Attachment.isImageFile)(name) || thumbnail ? '' : _AttachmentViewerModule["default"].previewIconDiv),
669
+ className: "".concat(_AttachmentViewerModule["default"].imgItem, " ").concat(index === selectedIndex ? _AttachmentViewerModule["default"].selected : ''),
801
670
  key: index,
802
671
  onClick: _this6.changeSelectedIndex.bind(_this6, index),
803
672
  eleRef: function eleRef(el) {
@@ -805,7 +674,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
805
674
  },
806
675
  dataId: "attachPreviewList",
807
676
  "data-title": name
808
- }, (0, _Attachment.isImageFile)(name) || thumbnail ? /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
677
+ }, /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
809
678
  src: thumbnail || viewUrl,
810
679
  size: "small",
811
680
  alt: name,
@@ -814,9 +683,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
814
683
  customChildrenClass: "".concat(_AttachmentViewerModule["default"].crsrPointer, " ").concat(customChildrenClass)
815
684
  },
816
685
  dataId: dataId
817
- }, customProps), children) : /*#__PURE__*/_react["default"].createElement(PreviewFileIcon, {
818
- data: name
819
- }));
686
+ }, customProps), children));
820
687
  }))))), totalLen !== 1 && /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
821
688
  dataId: "attachToggle",
822
689
  onClick: _this6.togglePViewList,