@zohodesk/dot 1.0.0-temp-200.8 → 1.0.0-temp-214

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 (155) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +12 -0
  3. package/es/ActionButton/ActionButton.module.css +2 -2
  4. package/es/AlphabeticList/AlphabeticList.module.css +2 -2
  5. package/es/Attachment/Attachment.module.css +1 -1
  6. package/es/AttachmentViewer/Attachment.js +96 -41
  7. package/es/AttachmentViewer/AttachmentViewer.js +8 -8
  8. package/es/AttachmentViewer/AttachmentViewer.module.css +9 -9
  9. package/es/AttachmentViewer/utils.js +19 -1
  10. package/es/ChannelIcon/ChannelIcon.module.css +2 -2
  11. package/es/DotProvider/hooks/useDotProvider.js +2 -2
  12. package/es/Drawer/Drawer.module.css +1 -1
  13. package/es/FormAction/FormAction.module.css +1 -1
  14. package/es/IconButton/IconButton.module.css +2 -2
  15. package/es/Message/Message.js +1 -1
  16. package/es/Message/Message.module.css +1 -1
  17. package/es/MessageBanner/MessageBanner.module.css +1 -1
  18. package/es/Onboarding/CarouselDots/CarouselDot/css/CarouselDot.module.css +3 -3
  19. package/es/Onboarding/css/Onboarding.module.css +2 -2
  20. package/es/PlusIcon/PlusIcon.module.css +1 -1
  21. package/es/TagWithIcon/TagWithIcon.module.css +2 -2
  22. package/es/ToastMessage/ToastMessage.module.css +8 -8
  23. package/es/Upload/Upload.module.css +1 -1
  24. package/es/avatar/AvatarClose/AvatarClose.module.css +3 -3
  25. package/es/avatar/AvatarCollision/AvatarCollision.module.css +3 -3
  26. package/es/avatar/AvatarIcon/AvatarIcon.module.css +1 -1
  27. package/es/avatar/AvatarStatus/AvatarStatus.module.css +2 -2
  28. package/es/avatar/AvatarThread/AvatarThread.module.css +2 -2
  29. package/es/avatar/AvatarUser/AvatarUser.module.css +3 -3
  30. package/es/avatar/AvatarWithTeam/AvatarWithTeam.module.css +1 -1
  31. package/es/deprecated/SelectDropdown/SelectDropdown.module.css +2 -2
  32. package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +1 -1
  33. package/es/errorstate/EmptyStates.module.css +1 -1
  34. package/es/errorstate/WillBack/WillBack.module.css +1 -1
  35. package/es/form/fields/CheckBoxField/CheckBoxField.js +7 -9
  36. package/es/form/fields/CurrencyField/CurrencyField.js +5 -5
  37. package/es/form/fields/DateField/DateField.js +7 -8
  38. package/es/form/fields/Fields.module.css +12 -9
  39. package/es/form/fields/MultiSelectField/MultiSelectField.js +5 -6
  40. package/es/form/fields/RadioField/RadioField.js +1 -1
  41. package/es/form/fields/SelectField/SelectField.js +5 -6
  42. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +2 -2
  43. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +6 -8
  44. package/es/form/fields/TextBoxField/TextBoxField.js +7 -7
  45. package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +1 -1
  46. package/es/form/fields/TextareaField/TextareaField.js +6 -6
  47. package/es/form/layout/Section/ModuleFormSection.module.css +1 -1
  48. package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +4 -4
  49. package/es/layout/SubtabLayout/SubtabLayout.module.css +1 -1
  50. package/es/list/DotNew/DotNew.module.css +1 -1
  51. package/es/list/ListStencils/ListStencils.module.css +3 -3
  52. package/es/list/SecondaryText/SecondaryText.module.css +4 -4
  53. package/es/list/SecondryPanel/SecondryPanel.module.css +1 -1
  54. package/es/list/Subject/Subject.module.css +2 -2
  55. package/es/list/TagNew/TagNew.module.css +1 -1
  56. package/es/list/Thread/Thread.module.css +1 -1
  57. package/es/list/listCommon.module.css +3 -3
  58. package/es/list/status/StatusDropdown/StatusDropdown.js +2 -2
  59. package/es/list/status/StatusDropdown/StatusDropdown.module.css +1 -1
  60. package/es/list/status/StatusListItem/StatusListItem.module.css +2 -2
  61. package/es/lookup/EmptyPage/LookupEmptyPage.module.css +1 -1
  62. package/es/lookup/Lookup/Lookup.js +2 -1
  63. package/es/lookup/Lookup/Lookup.module.css +6 -1
  64. package/es/lookup/Lookup/props/propTypes.js +1 -0
  65. package/es/lookup/Section/LookupSection.module.css +1 -1
  66. package/es/lookup/header/Title/LookupTitle.module.css +1 -1
  67. package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +4 -4
  68. package/es/lookup/header/lookupHeaderCommon.module.css +1 -1
  69. package/es/setup/header/Link/HeaderLink.module.css +2 -2
  70. package/es/setup/helptips/Title/HelpTipsTitle.module.css +1 -1
  71. package/es/setup/table/Text/TableText.module.css +4 -4
  72. package/es/version2/GlobalNotification/GlobalNotification.module.css +2 -2
  73. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -1
  74. package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +4 -4
  75. package/es/version2/lookup/alertLookupCommonNew.module.css +1 -1
  76. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +6 -6
  77. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +2 -2
  78. package/lib/ActionButton/ActionButton.module.css +2 -2
  79. package/lib/AlphabeticList/AlphabeticList.module.css +2 -2
  80. package/lib/Attachment/Attachment.module.css +1 -1
  81. package/lib/AttachmentViewer/Attachment.js +93 -45
  82. package/lib/AttachmentViewer/AttachmentViewer.js +8 -14
  83. package/lib/AttachmentViewer/AttachmentViewer.module.css +9 -9
  84. package/lib/AttachmentViewer/utils.js +21 -4
  85. package/lib/ChannelIcon/ChannelIcon.module.css +2 -2
  86. package/lib/DotProvider/hooks/useDotProvider.js +2 -2
  87. package/lib/Drawer/Drawer.module.css +1 -1
  88. package/lib/FormAction/FormAction.module.css +1 -1
  89. package/lib/IconButton/IconButton.module.css +2 -2
  90. package/lib/Message/Message.js +2 -2
  91. package/lib/Message/Message.module.css +1 -1
  92. package/lib/MessageBanner/MessageBanner.module.css +1 -1
  93. package/lib/Onboarding/CarouselDots/CarouselDot/css/CarouselDot.module.css +3 -3
  94. package/lib/Onboarding/css/Onboarding.module.css +2 -2
  95. package/lib/PlusIcon/PlusIcon.module.css +1 -1
  96. package/lib/TagWithIcon/TagWithIcon.module.css +2 -2
  97. package/lib/ToastMessage/ToastMessage.module.css +8 -8
  98. package/lib/Upload/Upload.module.css +1 -1
  99. package/lib/avatar/AvatarClose/AvatarClose.module.css +3 -3
  100. package/lib/avatar/AvatarCollision/AvatarCollision.module.css +3 -3
  101. package/lib/avatar/AvatarIcon/AvatarIcon.module.css +1 -1
  102. package/lib/avatar/AvatarStatus/AvatarStatus.module.css +2 -2
  103. package/lib/avatar/AvatarThread/AvatarThread.module.css +2 -2
  104. package/lib/avatar/AvatarUser/AvatarUser.module.css +3 -3
  105. package/lib/avatar/AvatarWithTeam/AvatarWithTeam.module.css +1 -1
  106. package/lib/deprecated/SelectDropdown/SelectDropdown.module.css +2 -2
  107. package/lib/dropdown/ToggleDropDown/ToggleDropDown.module.css +1 -1
  108. package/lib/errorstate/EmptyStates.module.css +1 -1
  109. package/lib/errorstate/WillBack/WillBack.module.css +1 -1
  110. package/lib/form/fields/CheckBoxField/CheckBoxField.js +7 -10
  111. package/lib/form/fields/CurrencyField/CurrencyField.js +4 -5
  112. package/lib/form/fields/DateField/DateField.js +6 -9
  113. package/lib/form/fields/Fields.module.css +12 -9
  114. package/lib/form/fields/MultiSelectField/MultiSelectField.js +5 -7
  115. package/lib/form/fields/RadioField/RadioField.js +1 -1
  116. package/lib/form/fields/SelectField/SelectField.js +5 -7
  117. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +2 -2
  118. package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +5 -8
  119. package/lib/form/fields/TextBoxField/TextBoxField.js +6 -8
  120. package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.js +2 -2
  121. package/lib/form/fields/TextareaField/TextareaField.js +5 -6
  122. package/lib/form/layout/Section/ModuleFormSection.module.css +1 -1
  123. package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +4 -4
  124. package/lib/layout/SubtabLayout/SubtabLayout.module.css +1 -1
  125. package/lib/list/DotNew/DotNew.module.css +1 -1
  126. package/lib/list/ListStencils/ListStencils.module.css +3 -3
  127. package/lib/list/SecondaryText/SecondaryText.module.css +4 -4
  128. package/lib/list/SecondryPanel/SecondryPanel.module.css +1 -1
  129. package/lib/list/Subject/Subject.module.css +2 -2
  130. package/lib/list/TagNew/TagNew.module.css +1 -1
  131. package/lib/list/Thread/Thread.module.css +1 -1
  132. package/lib/list/listCommon.module.css +3 -3
  133. package/lib/list/status/StatusDropdown/StatusDropdown.js +3 -3
  134. package/lib/list/status/StatusDropdown/StatusDropdown.module.css +1 -1
  135. package/lib/list/status/StatusListItem/StatusListItem.module.css +2 -2
  136. package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +1 -1
  137. package/lib/lookup/Lookup/Lookup.js +2 -1
  138. package/lib/lookup/Lookup/Lookup.module.css +6 -1
  139. package/lib/lookup/Lookup/props/propTypes.js +1 -0
  140. package/lib/lookup/Section/LookupSection.module.css +1 -1
  141. package/lib/lookup/header/Title/LookupTitle.module.css +1 -1
  142. package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +4 -4
  143. package/lib/lookup/header/lookupHeaderCommon.module.css +1 -1
  144. package/lib/setup/header/Link/HeaderLink.module.css +2 -2
  145. package/lib/setup/helptips/Title/HelpTipsTitle.module.css +1 -1
  146. package/lib/setup/table/Text/TableText.module.css +4 -4
  147. package/lib/version2/GlobalNotification/GlobalNotification.module.css +2 -2
  148. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -1
  149. package/lib/version2/lookup/AlertLookup/AlertLookupNew.module.css +4 -4
  150. package/lib/version2/lookup/alertLookupCommonNew.module.css +1 -1
  151. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +6 -6
  152. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +2 -2
  153. package/package.json +17 -15
  154. package/result.json +1 -1
  155. package/unittest/index.html +1 -1
package/README.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  In this Library, we Provide Some Basic Components to Build Your Application
4
4
 
5
+
6
+ # 1.7.19
7
+
8
+ - **AttachmentViewer**
9
+ - Added preview support for Videos and Documents (via iframe)
10
+
11
+ # 1.7.18
12
+
13
+ - Added UNSAFE_ prefix to deprecated lifecycle methods: componentWillMount, componentWillReceiveProps, and componentWillUpdate.
14
+ - **Lookup** - Added container width and containerClass support.
15
+ - **RadioField** - Fixed spacing between label and field
16
+
5
17
  # 1.7.17
6
18
 
7
19
  - **ToggleDropDown** - SecondaryValue supported for listitems and searchFields prop supported
@@ -114,14 +114,14 @@
114
114
 
115
115
  .txt,
116
116
  .subTxt {
117
- composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
117
+ composes: dotted from '~@zohodesk/components/es/common/common.module.css';
118
118
  /* css:theme-validation:ignore */
119
119
  color: var(--buttonText);
120
120
  }
121
121
 
122
122
  .arrowWrapper {
123
123
  position: relative;
124
- composes: offSelection from '~@zohodesk/components/lib/common/common.module.css';
124
+ composes: offSelection from '~@zohodesk/components/es/common/common.module.css';
125
125
  cursor: pointer;
126
126
  }
127
127
 
@@ -5,7 +5,7 @@
5
5
  }
6
6
  .container {
7
7
  composes: varClass;
8
- composes: h100 from '~@zohodesk/components/lib/common/common.module.css';
8
+ composes: h100 from '~@zohodesk/components/es/common/common.module.css';
9
9
  list-style: none;
10
10
  pointer-events: initial;
11
11
  margin: 0 ;
@@ -27,7 +27,7 @@
27
27
  padding: var(--zd_size3) 0 ;
28
28
  }
29
29
  .heading {
30
- composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
30
+ composes: dotted from '~@zohodesk/components/es/common/common.module.css';
31
31
  max-width: 100% ;
32
32
  }
33
33
  .list {
@@ -119,7 +119,7 @@
119
119
 
120
120
  .atatchName,
121
121
  .attachSize {
122
- composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
122
+ composes: dotted from '~@zohodesk/components/es/common/common.module.css';
123
123
  }
124
124
 
125
125
  .medium .attachSize {
@@ -1,5 +1,6 @@
1
1
  import { getBrowserWithVersion } from "../utils/General";
2
- const UNASSIGNED = 'Unassigned';
2
+ import { SUPPORTED_FILE_EXTENSIONS } from "./utils"; // const UNASSIGNED = 'Unassigned';
3
+
3
4
  const BROWSER_SUPPORTED_FILES = ['pdf', 'text', 'txt', 'css', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'ico', 'sh', 'mp3', 'wav', 'ogg'];
4
5
  export function isAudioFile(fileName) {
5
6
  const extension = getExtensionFromFileName(fileName);
@@ -17,49 +18,103 @@ export function isBrowserSupportedFile(fileName) {
17
18
  return BROWSER_SUPPORTED_FILES.indexOf(extension) !== -1;
18
19
  }
19
20
  export function getAttachmentIconDetails(fileName) {
20
- const extension = getExtensionFromFileName(fileName)?.toLowerCase();
21
- if (!extension) return 'ZD-GN-fileUnknown';
22
- const imageExtensions = ['jpeg', 'jpg', 'png', 'apng', 'gif', 'bmp', 'tiff', 'tif', 'ico', 'svg', 'heic', 'webp'];
23
- const docExtensions = ['txt'];
24
- const pdfExtensions = ['pdf'];
25
- const htmlExtensions = ['html', 'htm', 'xhtml'];
26
- const pptExtensions = ['ppt', 'pps', 'odp', 'sxi', 'pptx', 'ppsx', 'pot', 'potx', 'key'];
27
- const zipExtensions = ['rar', 'jar', 'zip'];
28
- const wordExtensions = ['doc', 'docx', 'sxw', 'odt', 'docm', 'dot', 'dotm', 'dotx', 'rtf', 'pages'];
29
- const xmlExtensions = ['xml'];
30
- const sheetExtensions = ['xls', 'xlsx', 'xlsm', 'xlsb', 'sxc', 'ods', 'csv', 'tsv', 'numbers'];
31
- const audioExtensions = ['mp3', 'wav', 'wma', 'aac', 'm4r', 'ogg', 'opus'];
32
- const videoExtensions = ['mp4', 'mkv', 'mov', 'mpeg', 'flv', 'wmv', 'avi', 'webm', 'ogv'];
33
- const mailExtensions = ['eml', 'msg'];
34
- const linuxExtensions = ['sh', 'bin'];
35
- const cssExtensions = ['css'];
36
- const exeExtensions = ['exe'];
37
- const eventExtensions = ['ics'];
38
- if (imageExtensions.includes(extension)) return 'ZD-EF-fileImage';
39
- if (docExtensions.includes(extension)) return 'ZD-GN-fileDoc';
40
- if (pdfExtensions.includes(extension)) return 'ZD-EF-filePdf';
41
- if (pptExtensions.includes(extension)) return 'ZD-GN-filePpt';
42
- if (zipExtensions.includes(extension)) return 'ZD-EF-fileZip';
43
-
44
- if (wordExtensions.includes(extension)) {
45
- const OSName = navigator.platform?.toLowerCase() || '';
21
+ const extension = (getExtensionFromFileName(fileName) || '').toLowerCase();
22
+
23
+ if (!extension) {
24
+ return 'ZD-GN-fileUnknown';
25
+ }
26
+
27
+ const {
28
+ image,
29
+ doc,
30
+ pdf,
31
+ html,
32
+ ppt,
33
+ zip,
34
+ word,
35
+ xml,
36
+ sheet,
37
+ audio,
38
+ video,
39
+ mail,
40
+ linux,
41
+ css,
42
+ exe,
43
+ event
44
+ } = SUPPORTED_FILE_EXTENSIONS;
45
+
46
+ if (image.includes(extension)) {
47
+ return 'ZD-EF-fileImage';
48
+ }
49
+
50
+ if (doc.includes(extension)) {
51
+ return 'ZD-GN-fileDoc';
52
+ }
53
+
54
+ if (pdf.includes(extension)) {
55
+ return 'ZD-EF-filePdf';
56
+ }
57
+
58
+ if (ppt.includes(extension)) {
59
+ return 'ZD-GN-filePpt';
60
+ }
61
+
62
+ if (zip.includes(extension)) {
63
+ return 'ZD-EF-fileZip';
64
+ }
65
+
66
+ if (word.includes(extension)) {
67
+ const OSName = (navigator.platform || '').toLowerCase();
46
68
  return OSName.includes('mac') || OSName.includes('linux') ? 'ZD-EF-fileOffice' : 'ZD-EF-fileWord';
47
69
  }
48
70
 
49
- if (xmlExtensions.includes(extension)) return 'ZD-EF-fileXml';
50
- if (sheetExtensions.includes(extension)) return 'ZD-GN-fileSheet';
51
- if (audioExtensions.includes(extension)) return 'ZD-EF-fileMp3';
52
- if (videoExtensions.includes(extension)) return 'ZD-EF-fileMp4';
53
- if (mailExtensions.includes(extension)) return 'ZD-GN-fileMail';
54
- if (linuxExtensions.includes(extension)) return 'ZD-EF-linux';
55
- if (cssExtensions.includes(extension)) return 'ZD-EF-clrCss';
56
- if (exeExtensions.includes(extension)) return 'ZD-EF-exe';
57
- if (eventExtensions.includes(extension)) return 'ZD-TK-event';
58
-
59
- if (htmlExtensions.includes(extension)) {
60
- const browser = getBrowserWithVersion()?.toLowerCase() || '';
61
- if (browser.includes('chrome') || browser.includes('safari')) return 'ZD-EF-fileXml';
62
- if (browser.includes('ie') || browser.includes('edge')) return 'ZD-EF-explorer';
71
+ if (xml.includes(extension)) {
72
+ return 'ZD-EF-fileXml';
73
+ }
74
+
75
+ if (sheet.includes(extension)) {
76
+ return 'ZD-GN-fileSheet';
77
+ }
78
+
79
+ if (audio.includes(extension)) {
80
+ return 'ZD-EF-fileMp3';
81
+ }
82
+
83
+ if (video.includes(extension)) {
84
+ return 'ZD-EF-fileMp4';
85
+ }
86
+
87
+ if (mail.includes(extension)) {
88
+ return 'ZD-GN-fileMail';
89
+ }
90
+
91
+ if (linux.includes(extension)) {
92
+ return 'ZD-EF-linux';
93
+ }
94
+
95
+ if (css.includes(extension)) {
96
+ return 'ZD-EF-clrCss';
97
+ }
98
+
99
+ if (exe.includes(extension)) {
100
+ return 'ZD-EF-exe';
101
+ }
102
+
103
+ if (event.includes(extension)) {
104
+ return 'ZD-TK-event';
105
+ }
106
+
107
+ if (html.includes(extension)) {
108
+ const browser = (getBrowserWithVersion() || '').toLowerCase();
109
+
110
+ if (browser.includes('chrome') || browser.includes('safari')) {
111
+ return 'ZD-EF-fileXml';
112
+ }
113
+
114
+ if (browser.includes('ie') || browser.includes('edge')) {
115
+ return 'ZD-EF-explorer';
116
+ }
117
+
63
118
  return 'ZD-EF-firebox';
64
119
  }
65
120
 
@@ -49,19 +49,19 @@ export default class AttachmentViewer extends Component {
49
49
  }
50
50
 
51
51
  isImageFileType(fileName) {
52
- const extension = getExtensionFromFileName(fileName)?.toLowerCase();
52
+ const extension = (getExtensionFromFileName(fileName) || '').toLowerCase();
53
53
  if (!extension) return false;
54
54
  return FILE_EXTENSIONS.image.map(ext => ext.toLowerCase()).includes(extension);
55
55
  }
56
56
 
57
57
  isVideoFileType(fileName) {
58
- const extension = getExtensionFromFileName(fileName)?.toLowerCase();
58
+ const extension = (getExtensionFromFileName(fileName) || '').toLowerCase();
59
59
  if (!extension) return false;
60
60
  return FILE_EXTENSIONS.video.map(ext => ext.toLowerCase()).includes(extension);
61
61
  }
62
62
 
63
63
  isAudioFileType(fileName) {
64
- const extension = getExtensionFromFileName(fileName)?.toLowerCase();
64
+ const extension = (getExtensionFromFileName(fileName) || '').toLowerCase();
65
65
  if (!extension) return false;
66
66
  return FILE_EXTENSIONS.audio.map(ext => ext.toLowerCase()).includes(extension);
67
67
  }
@@ -112,8 +112,8 @@ export default class AttachmentViewer extends Component {
112
112
  allowedPreviewExtensionsData
113
113
  } = this.props;
114
114
  const selectedAttachment = data[selectedIndex] || {};
115
- const selectedAttachmentViewUrl = selectedAttachment.viewUrl;
116
- const selectedAttachmentDownloadUrl = selectedAttachment.downloadUrl;
115
+ const selectedAttachmentViewUrl = selectedAttachment.viewUrl; // const selectedAttachmentDownloadUrl = selectedAttachment.downloadUrl;
116
+
117
117
  const selectedAttachmentName = selectedAttachment.name;
118
118
  const selectedAttachmentPreviewUrl = selectedAttachment.previewurl;
119
119
  checkFileSourcesValidation({
@@ -394,7 +394,7 @@ export default class AttachmentViewer extends Component {
394
394
  "data-test-id": `${dataId}_audioPreview`,
395
395
  ...audioProps
396
396
  }, /*#__PURE__*/React.createElement("source", {
397
- src: previewurl,
397
+ src: previewurl || viewUrl,
398
398
  type: `audio/${extension}`
399
399
  })) : _this.isVideoFileType(name) ? /*#__PURE__*/React.createElement("video", {
400
400
  controls: true,
@@ -424,7 +424,7 @@ export default class AttachmentViewer extends Component {
424
424
  }, _this.getPreviewIconData(name, '70')), /*#__PURE__*/React.createElement(Typography, {
425
425
  $ui_size: "20",
426
426
  $ui_weight: "semibold"
427
- }, previewUnsupportedText), /*#__PURE__*/React.createElement(Link, {
427
+ }, previewUnsupportedText), downloadUrl ? /*#__PURE__*/React.createElement(Link, {
428
428
  href: downloadUrl,
429
429
  className: style.downloadLink,
430
430
  hasReload: true,
@@ -432,7 +432,7 @@ export default class AttachmentViewer extends Component {
432
432
  }, /*#__PURE__*/React.createElement(Button, {
433
433
  palette: "primaryFilled",
434
434
  text: downloadText
435
- }))))));
435
+ })) : null))));
436
436
  });
437
437
  }
438
438
 
@@ -2,7 +2,7 @@
2
2
  height: var(--zd_size40) ;
3
3
  position: relative;
4
4
  z-index: 1;
5
- composes: alignVertical from '~@zohodesk/components/lib/common/common.module.css';
5
+ composes: alignVertical from '~@zohodesk/components/es/common/common.module.css';
6
6
  background-color: var(--zdt_attachmentviewer_header_bg);
7
7
  padding: 0 var(--zd_size15) ;
8
8
  border-bottom: 1px solid var(--zdt_attachmentviewer_header_border);
@@ -10,7 +10,7 @@
10
10
 
11
11
  .title {
12
12
  max-width: 50% ;
13
- composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
13
+ composes: dotted from '~@zohodesk/components/es/common/common.module.css';
14
14
  }
15
15
 
16
16
  [dir=ltr] .title {
@@ -23,7 +23,7 @@
23
23
 
24
24
  .count {
25
25
  position: absolute;
26
- composes: xMiddle from '~@zohodesk/components/lib/common/common.module.css';
26
+ composes: xMiddle from '~@zohodesk/components/es/common/common.module.css';
27
27
  padding: 0 var(--zd_size10) ;
28
28
  }
29
29
 
@@ -85,7 +85,7 @@
85
85
  }
86
86
 
87
87
  .preview {
88
- composes: posrel from '~@zohodesk/components/lib/common/common.module.css';
88
+ composes: posrel from '~@zohodesk/components/es/common/common.module.css';
89
89
  text-align: center;
90
90
  margin: var(--zd_size20) 0 ;
91
91
  }
@@ -94,7 +94,7 @@
94
94
  max-height: 100% ;
95
95
  max-width: 90% ;
96
96
  position: absolute;
97
- composes: middleBoth from '~@zohodesk/components/lib/common/common.module.css';
97
+ composes: middleBoth from '~@zohodesk/components/es/common/common.module.css';
98
98
  }
99
99
 
100
100
  .zoomOut {
@@ -269,7 +269,7 @@
269
269
  height: 100% ;
270
270
  max-width: 100% ;
271
271
  max-height: 100% ;
272
- composes: dflex from '~@zohodesk/components/lib/common/common.module.css';
272
+ composes: dflex from '~@zohodesk/components/es/common/common.module.css';
273
273
  }
274
274
 
275
275
  .img {
@@ -302,7 +302,7 @@
302
302
 
303
303
  .spinLoad {
304
304
  position: absolute;
305
- composes: middleBoth from '~@zohodesk/components/lib/common/common.module.css';
305
+ composes: middleBoth from '~@zohodesk/components/es/common/common.module.css';
306
306
  height: var(--zd_size18) ;
307
307
  width: var(--zd_size18) ;
308
308
  cursor: progress
@@ -312,7 +312,7 @@
312
312
  height: 100% ;
313
313
  width: 100% ;
314
314
  composes: rotate from '../common/dot_animation.module.css';
315
- composes: infinite from '~@zohodesk/components/lib/common/animation.module.css';
315
+ composes: infinite from '~@zohodesk/components/es/common/animation.module.css';
316
316
  border: 2px solid var(--zdt_attachmentviewer_loader_border);
317
317
  border-top-color: var(--zdt_attachmentviewer_loader_border_top);
318
318
  border-radius: 50%;
@@ -348,7 +348,7 @@
348
348
  .authorName {
349
349
  font-size: var(--zd_font_size15) ;
350
350
  color: var(--zdt_attachmentviewer_title_text);
351
- composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
351
+ composes: dotted from '~@zohodesk/components/es/common/common.module.css';
352
352
  margin: 0 var(--zd_size10) ;
353
353
  }
354
354
 
@@ -157,6 +157,24 @@ export const FILE_EXTENSIONS = {
157
157
  document: ['doc', 'docx', 'docm', 'dot', 'dotx', 'dotm', 'odt', 'rtf', 'txt', 'md', 'pages', 'xls', 'xlsx', 'xlsm', 'xlsb', 'csv', 'tsv', 'ods', 'sxc', 'numbers', 'ppt', 'pptx', 'pps', 'ppsx', 'pot', 'potx', 'odp', 'sxi', 'key', 'pdf', 'xml', 'json', 'yaml', 'yml', 'log', 'eml', 'msg'],
158
158
  image: ['jpeg', 'jpg', 'png', 'apng', 'gif', 'bmp', 'dib', 'tiff', 'tif', 'ico', 'svg', 'webp', 'heic', 'heif', 'jfif', 'pjpeg', 'pjp', 'avif']
159
159
  };
160
+ export const SUPPORTED_FILE_EXTENSIONS = {
161
+ image: ['jpeg', 'jpg', 'png', 'apng', 'gif', 'bmp', 'tiff', 'tif', 'ico', 'svg', 'heic', 'webp'],
162
+ doc: ['txt'],
163
+ pdf: ['pdf'],
164
+ html: ['html', 'htm', 'xhtml'],
165
+ ppt: ['ppt', 'pps', 'odp', 'sxi', 'pptx', 'ppsx', 'pot', 'potx', 'key'],
166
+ zip: ['rar', 'jar', 'zip'],
167
+ word: ['doc', 'docx', 'sxw', 'odt', 'docm', 'dot', 'dotm', 'dotx', 'rtf', 'pages'],
168
+ xml: ['xml'],
169
+ sheet: ['xls', 'xlsx', 'xlsm', 'xlsb', 'sxc', 'ods', 'csv', 'tsv', 'numbers'],
170
+ audio: ['mp3', 'wav', 'wma', 'aac', 'm4r', 'ogg', 'opus'],
171
+ video: ['mp4', 'mkv', 'mov', 'mpeg', 'flv', 'wmv', 'avi', 'webm', 'ogv'],
172
+ mail: ['eml', 'msg'],
173
+ linux: ['sh', 'bin'],
174
+ css: ['css'],
175
+ exe: ['exe'],
176
+ event: ['ics']
177
+ };
160
178
  export function checkFileSourcesValidation(_ref) {
161
179
  let {
162
180
  fileName,
@@ -164,7 +182,7 @@ export function checkFileSourcesValidation(_ref) {
164
182
  previewUrl,
165
183
  allowedPreviewExtensionsData
166
184
  } = _ref;
167
- const extension = getExtensionFromFileName(fileName)?.toLowerCase();
185
+ const extension = (getExtensionFromFileName(fileName) || '').toLowerCase();
168
186
 
169
187
  if (!extension) {
170
188
  return Promise.resolve({
@@ -7,13 +7,13 @@
7
7
 
8
8
  .container {
9
9
  position: relative;
10
- composes: dInflex from '~@zohodesk/components/lib/common/common.module.css';
10
+ composes: dInflex from '~@zohodesk/components/es/common/common.module.css';
11
11
  vertical-align: middle;
12
12
  composes: varClass;
13
13
  }
14
14
 
15
15
  .thread {
16
- composes: dflex alignVertical alignHorizontal rounded from '~@zohodesk/components/lib/common/common.module.css';
16
+ composes: dflex alignVertical alignHorizontal rounded from '~@zohodesk/components/es/common/common.module.css';
17
17
  position: absolute;
18
18
  top: calc( var(--zd_size4) * -1 ) ;
19
19
  height: var(--zd_size15) ;
@@ -6,8 +6,8 @@ import '@zohodesk/components/assets/Contrast/pureDarkContrastLightness.module.cs
6
6
  import '@zohodesk/variables/assets/colorVariables.module.css';
7
7
  import '@zohodesk/variables/assets/dotVariables.module.css';
8
8
  import '@zohodesk/components/es/common/basic.module.css';
9
- import '@zohodesk/variables/lib/fontFamilyVariables.module.css';
10
- import '@zohodesk/components/lib/common/boxShadow.module.css';
9
+ import '@zohodesk/variables/es/fontFamilyVariables.module.css';
10
+ import '@zohodesk/components/es/common/boxShadow.module.css';
11
11
  import "../../common/dot_boxShadow.module.css";
12
12
 
13
13
  function useDotProvider(_ref) {
@@ -110,7 +110,7 @@
110
110
  .title {
111
111
  color: var(--zdt_drawer_title_text);
112
112
  font-family: var(--zd_semibold);
113
- composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
113
+ composes: dotted from '~@zohodesk/components/es/common/common.module.css';
114
114
  font-size: var(--zd_font_size16) ;
115
115
  }
116
116
 
@@ -73,7 +73,7 @@
73
73
  }
74
74
 
75
75
  .marginRight {
76
- composes: dinblk from '~@zohodesk/components/lib/common/common.module.css';
76
+ composes: dinblk from '~@zohodesk/components/es/common/common.module.css';
77
77
  }
78
78
 
79
79
  [dir=ltr] .largeFooter .marginRight, [dir=ltr] .mediumFooter .marginRight {
@@ -3,7 +3,7 @@
3
3
  }
4
4
 
5
5
  .wrapper {
6
- composes: offSelection from '~@zohodesk/components/lib/common/common.module.css';
6
+ composes: offSelection from '~@zohodesk/components/es/common/common.module.css';
7
7
  composes: varClass;
8
8
  color: var(--iconColor);
9
9
  cursor: pointer;
@@ -48,5 +48,5 @@
48
48
  --iconColor: var(--zdt_iconButton_icon_primaryActive);
49
49
  }
50
50
  .icon_button_center {
51
- composes: tcenter from '~@zohodesk/components/lib/common/common.module.css';
51
+ composes: tcenter from '~@zohodesk/components/es/common/common.module.css';
52
52
  }
@@ -12,7 +12,7 @@ export default class Message extends React.Component {
12
12
  };
13
13
  }
14
14
 
15
- componentWillReceiveProps(nextProps) {
15
+ UNSAFE_componentWillReceiveProps(nextProps) {
16
16
  let {
17
17
  showMessage,
18
18
  hideMessage
@@ -83,7 +83,7 @@
83
83
  color: var(--zdt_message_tickicon);
84
84
  font-size: var(--zd_font_size16) ;
85
85
  position: absolute;
86
- composes: middleBoth from '~@zohodesk/components/lib/common/common.module.css';
86
+ composes: middleBoth from '~@zohodesk/components/es/common/common.module.css';
87
87
  }
88
88
 
89
89
  .close {
@@ -5,7 +5,7 @@
5
5
  }
6
6
  .message {
7
7
  color: var(--zdt_messagebanner_text);
8
- composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
8
+ composes: dotted from '~@zohodesk/components/es/common/common.module.css';
9
9
  padding: var(--zd_size10) 0 ;
10
10
  }
11
11
  [dir=ltr] .message {
@@ -1,5 +1,5 @@
1
1
  .bulletNormal{
2
- composes: pointer from '~@zohodesk/components/lib/common/common.module.css';
2
+ composes: pointer from '~@zohodesk/components/es/common/common.module.css';
3
3
  }
4
4
  .bulletNormal:hover {
5
5
  transform: scale(1.4);
@@ -66,9 +66,9 @@
66
66
  }
67
67
  @keyframes progressLoading {
68
68
  0% {
69
- inset-inline-start: -100%;
69
+ inset-inline-start: -100% ;
70
70
  }
71
71
  100% {
72
- inset-inline-start: 0%;
72
+ inset-inline-start: 0% ;
73
73
  }
74
74
  }
@@ -134,7 +134,7 @@
134
134
  position: absolute;
135
135
  top: 0 ;
136
136
  bottom: 0 ;
137
- composes: navigate transZ from '~@zohodesk/components/lib/common/animation.module.css';
137
+ composes: navigate transZ from '~@zohodesk/components/es/common/animation.module.css';
138
138
  }
139
139
  [dir=ltr] .playIconWrapper {
140
140
  left: 0 ;
@@ -203,7 +203,7 @@
203
203
  .secondaryButttonLink {
204
204
  letter-spacing: 0.2px;
205
205
  text-transform: capitalize;
206
- composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
206
+ composes: dotted from '~@zohodesk/components/es/common/common.module.css';
207
207
  border-radius: 4px;
208
208
  cursor: pointer;
209
209
  text-align:center;
@@ -1,5 +1,5 @@
1
1
  .container {
2
- composes: dinblk from '~@zohodesk/components/lib/common/common.module.css';
2
+ composes: dinblk from '~@zohodesk/components/es/common/common.module.css';
3
3
  border-radius: 50%;
4
4
  box-shadow: var(--zd_bs_plusicon_container);
5
5
  cursor: pointer;
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  .bold {
28
- composes: semibold from '~@zohodesk/components/lib/common/common.module.css';
28
+ composes: semibold from '~@zohodesk/components/es/common/common.module.css';
29
29
  }
30
30
 
31
31
  .small_text {
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  .text {
40
- composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
40
+ composes: dotted from '~@zohodesk/components/es/common/common.module.css';
41
41
  }
42
42
 
43
43
  [dir=ltr] .iconSpace {
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  .animation {
22
- composes: modeForward from '~@zohodesk/components/lib/common/animation.module.css';
22
+ composes: modeForward from '~@zohodesk/components/es/common/animation.module.css';
23
23
  }
24
24
 
25
25
  [dir=ltr] .animation {
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  .leftanimate {
36
- composes: slideLeft from '~@zohodesk/components/lib/common/animation.module.css';
36
+ composes: slideLeft from '~@zohodesk/components/es/common/animation.module.css';
37
37
  composes: animation;
38
38
  }
39
39
 
@@ -43,7 +43,7 @@
43
43
  }
44
44
 
45
45
  .rightanimate {
46
- composes: slideRight from '~@zohodesk/components/lib/common/animation.module.css';
46
+ composes: slideRight from '~@zohodesk/components/es/common/animation.module.css';
47
47
  composes: animation;
48
48
  composes: closeAnimation;
49
49
  }
@@ -79,7 +79,7 @@
79
79
  .popbutton {
80
80
  font-size: var(--zd_font_size10) ;
81
81
  color: var(--zdt_toastmessage_popbutton_text);
82
- composes: wbreak textCap from '~@zohodesk/components/lib/common/common.module.css';
82
+ composes: wbreak textCap from '~@zohodesk/components/es/common/common.module.css';
83
83
  transition: all var(--zd_transition3);
84
84
  position: relative;
85
85
  cursor: pointer;
@@ -161,7 +161,7 @@
161
161
  }
162
162
 
163
163
  .alertTitle {
164
- composes: semibold wbreak dotted from '~@zohodesk/components/lib/common/common.module.css';
164
+ composes: semibold wbreak dotted from '~@zohodesk/components/es/common/common.module.css';
165
165
  font-size: var(--zd_font_size14) ;
166
166
  color: var(--zdt_toastmessage_alerttitle_text);
167
167
  }
@@ -176,7 +176,7 @@
176
176
 
177
177
  .alertMessage {
178
178
  font-size: var(--zd_font_size12) ;
179
- composes: wbreak from '~@zohodesk/components/lib/common/common.module.css';
179
+ composes: wbreak from '~@zohodesk/components/es/common/common.module.css';
180
180
  line-height: 1.3333;
181
181
  color: var(--zdt_toastmessage_alert_text);
182
182
  margin-top: var(--zd_size5) ;
@@ -256,7 +256,7 @@
256
256
  position: relative;
257
257
  color: var(--zdt_toastmessage_popbutton_text);
258
258
  font-size: var(--zd_font_size11) ;
259
- composes: dotted textCap from '~@zohodesk/components/lib/common/common.module.css';
259
+ composes: dotted textCap from '~@zohodesk/components/es/common/common.module.css';
260
260
  height: var(--zd_size33) ;
261
261
  transition: padding var(--zd_transition3), height var(--zd_transition3);
262
262
  border-top: 1px solid var(--zdt_toastmessage_message_border);
@@ -295,7 +295,7 @@
295
295
  width: var(--zd_size29) ;
296
296
  height: var(--zd_size29) ;
297
297
  line-height: var(--zd_size29);
298
- composes: rounded from '~@zohodesk/components/lib/common/common.module.css';
298
+ composes: rounded from '~@zohodesk/components/es/common/common.module.css';
299
299
  text-align: center;
300
300
  }
301
301
 
@@ -73,7 +73,7 @@
73
73
  .attachsize {
74
74
  font-size: var(--zd_font_size10) ;
75
75
  letter-spacing: 1px;
76
- composes: dotted from "~@zohodesk/components/lib/common/common.module.css";
76
+ composes: dotted from "~@zohodesk/components/es/common/common.module.css";
77
77
  text-transform: uppercase;
78
78
  padding: var(--zd_size4) 0 var(--zd_size2) ;
79
79
  }
@@ -1,11 +1,11 @@
1
1
  .container {
2
2
  position: relative;
3
- composes: dInflex from '~@zohodesk/components/lib/common/common.module.css';
3
+ composes: dInflex from '~@zohodesk/components/es/common/common.module.css';
4
4
  vertical-align: middle;
5
5
  }
6
6
  .pop {
7
7
  position: absolute;
8
- composes: rounded from '~@zohodesk/components/lib/common/common.module.css';
8
+ composes: rounded from '~@zohodesk/components/es/common/common.module.css';
9
9
  opacity: 0;
10
10
  visibility: hidden;
11
11
  top: 0 ;
@@ -29,7 +29,7 @@
29
29
  position: absolute;
30
30
  line-height: 0;
31
31
  font-size: var(--zd_font_size16) ;
32
- composes: middleBoth from '~@zohodesk/components/lib/common/common.module.css';
32
+ composes: middleBoth from '~@zohodesk/components/es/common/common.module.css';
33
33
  }
34
34
  .container:hover .pop {
35
35
  opacity: 1;