@zohodesk/dot 1.9.12 → 1.9.14

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 (167) hide show
  1. package/README.md +19 -6
  2. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +7 -7
  3. package/assets/Appearance/dark/themes/blue/blue_DotCTA_DarkModifyCategory.module.css +13 -0
  4. package/assets/Appearance/dark/themes/green/green_DotCTA_DarkModifyCategory.module.css +13 -0
  5. package/assets/Appearance/dark/themes/orange/orange_DotCTA_DarkModifyCategory.module.css +13 -0
  6. package/assets/Appearance/dark/themes/red/red_DotCTA_DarkModifyCategory.module.css +13 -0
  7. package/assets/Appearance/dark/themes/yellow/yellow_DotCTA_DarkModifyCategory.module.css +13 -0
  8. package/assets/Appearance/light/mode/Dot_LightMode.module.css +13 -13
  9. package/assets/Appearance/light/themes/blue/blue_DotCTA_LightModifyCategory.module.css +13 -0
  10. package/assets/Appearance/light/themes/green/green_DotCTA_LightModifyCategory.module.css +13 -0
  11. package/assets/Appearance/light/themes/orange/orange_DotCTA_LightModifyCategory.module.css +13 -0
  12. package/assets/Appearance/light/themes/red/red_DotCTA_LightModifyCategory.module.css +13 -0
  13. package/assets/Appearance/light/themes/yellow/yellow_DotCTA_LightModifyCategory.module.css +13 -0
  14. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +5 -5
  15. package/assets/Appearance/pureDark/themes/blue/blue_DotCTA_PureDarkModifyCategory.module.css +13 -0
  16. package/assets/Appearance/pureDark/themes/green/green_DotCTA_PureDarkModifyCategory.module.css +13 -0
  17. package/assets/Appearance/pureDark/themes/orange/orange_DotCTA_PureDarkModifyCategory.module.css +13 -0
  18. package/assets/Appearance/pureDark/themes/red/red_DotCTA_PureDarkModifyCategory.module.css +13 -0
  19. package/assets/Appearance/pureDark/themes/yellow/yellow_DotCTA_PureDarkModifyCategory.module.css +13 -0
  20. package/cbt.config.js +12 -3
  21. package/es/ActionButton/__tests__/ActionButton.spec.js +4 -5
  22. package/es/AttachmentViewer/AttachmentImage.js +3 -1
  23. package/es/AttachmentViewer/AttachmentViewer.js +340 -273
  24. package/es/AttachmentViewer/AttachmentViewer.module.css +8 -15
  25. package/es/AttachmentViewer/__tests__/AttachmentViewer.spec.js +104 -100
  26. package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
  27. package/es/AttachmentViewer/props/defaultProps.js +4 -2
  28. package/es/AttachmentViewer/props/propTypes.js +9 -2
  29. package/es/AttachmentViewer/utils.js +6 -7
  30. package/es/AudioPlayer/utils/utils.js +2 -5
  31. package/es/DotProvider/hooks/useDotProvider.js +14 -15
  32. package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +12 -13
  33. package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +2 -1
  34. package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +2 -1
  35. package/es/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +2 -1
  36. package/es/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +2 -1
  37. package/es/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +2 -1
  38. package/es/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +2 -1
  39. package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +2 -1
  40. package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +2 -1
  41. package/es/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +2 -1
  42. package/es/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +2 -1
  43. package/es/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +2 -1
  44. package/es/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +2 -1
  45. package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +2 -1
  46. package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +2 -1
  47. package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +2 -1
  48. package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +1 -0
  49. package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +1 -0
  50. package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +1 -0
  51. package/es/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +1 -0
  52. package/es/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +1 -0
  53. package/es/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +1 -0
  54. package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +1 -0
  55. package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +1 -0
  56. package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +1 -0
  57. package/es/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +1 -0
  58. package/es/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +1 -0
  59. package/es/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +1 -0
  60. package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +1 -0
  61. package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +1 -0
  62. package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +1 -0
  63. package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_Dark_Variables.js +1 -2
  64. package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_Light_Variables.js +1 -2
  65. package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_PureDark_Variables.js +1 -2
  66. package/es/DotProvider/libraryChunks/themes/variables/green/Green_Dark_Variables.js +1 -2
  67. package/es/DotProvider/libraryChunks/themes/variables/green/Green_Light_Variables.js +1 -2
  68. package/es/DotProvider/libraryChunks/themes/variables/green/Green_PureDark_Variables.js +1 -2
  69. package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_Dark_Variables.js +1 -2
  70. package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_Light_Variables.js +1 -2
  71. package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_PureDark_Variables.js +1 -2
  72. package/es/DotProvider/libraryChunks/themes/variables/red/Red_Dark_Variables.js +1 -2
  73. package/es/DotProvider/libraryChunks/themes/variables/red/Red_Light_Variables.js +1 -2
  74. package/es/DotProvider/libraryChunks/themes/variables/red/Red_PureDark_Variables.js +1 -2
  75. package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Dark_Variables.js +1 -2
  76. package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Light_Variables.js +1 -2
  77. package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_PureDark_Variables.js +1 -2
  78. package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +3 -4
  79. package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +4 -5
  80. package/es/DotProvider/utils/errorValidation.js +5 -6
  81. package/es/DotProvider/utils/getAssetsImportPromises.js +4 -5
  82. package/es/Drawer/Drawer.js +6 -8
  83. package/es/FreezeLayer/css/cssJSLogic.js +4 -5
  84. package/es/Hooks/Dragger/useDragger.js +5 -6
  85. package/es/Hooks/Dragger/utils/DraggerUtil.js +7 -8
  86. package/es/Hooks/useFreezeLayer.js +4 -5
  87. package/es/Link/Link.js +4 -3
  88. package/es/Link/props/propTypes.js +1 -0
  89. package/es/Onboarding/CarouselDots/CarouselDots.js +29 -32
  90. package/es/Onboarding/Onboarding.js +23 -24
  91. package/es/Onboarding/hooks/useOnboarding.js +4 -5
  92. package/es/Onboarding/hooks/useOnboardingSlider.js +5 -6
  93. package/es/deprecated/SelectDropdown/SelectDropdown.js +43 -47
  94. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +214 -225
  95. package/es/errorstate/Inconvenience/Inconvenience.js +32 -36
  96. package/es/errorstate/NoRequestFound/NoRequestFound.js +32 -36
  97. package/es/errorstate/PermissionPlay/PermissionPlay.js +31 -35
  98. package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +32 -36
  99. package/es/errorstate/UnableToProcess/UnableToProcess.js +32 -36
  100. package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +32 -36
  101. package/es/errorstate/WillBack/WillBack.js +30 -34
  102. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +81 -85
  103. package/es/list/status/StatusDropdown/StatusDropdown.js +109 -113
  104. package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +3 -4
  105. package/es/lookup/header/Search/Search.js +4 -5
  106. package/es/lookup/header/Search/__tests__/Search.spec.js +3 -4
  107. package/es/lookup/header/ViewDropDown/ViewDropDown.js +67 -75
  108. package/es/utils/General.js +2 -7
  109. package/es/utils/editorUtils.js +1 -5
  110. package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +4 -5
  111. package/es/version2/notification/DesktopNotification/DesktopNotification.js +59 -63
  112. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +40 -44
  113. package/lib/AttachmentViewer/AttachmentImage.js +3 -1
  114. package/lib/AttachmentViewer/AttachmentViewer.js +158 -82
  115. package/lib/AttachmentViewer/AttachmentViewer.module.css +8 -15
  116. package/lib/AttachmentViewer/__tests__/AttachmentViewer.spec.js +100 -100
  117. package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
  118. package/lib/AttachmentViewer/props/defaultProps.js +6 -2
  119. package/lib/AttachmentViewer/props/propTypes.js +9 -2
  120. package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +3 -1
  121. package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +3 -1
  122. package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +3 -1
  123. package/lib/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +3 -1
  124. package/lib/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +3 -1
  125. package/lib/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +3 -1
  126. package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +3 -1
  127. package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +3 -1
  128. package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +3 -1
  129. package/lib/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +3 -1
  130. package/lib/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +3 -1
  131. package/lib/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +3 -1
  132. package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +3 -1
  133. package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +3 -1
  134. package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +3 -1
  135. package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +2 -0
  136. package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +2 -0
  137. package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +2 -0
  138. package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +2 -0
  139. package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +2 -0
  140. package/lib/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +2 -0
  141. package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +2 -0
  142. package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +2 -0
  143. package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +2 -0
  144. package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +2 -0
  145. package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +2 -0
  146. package/lib/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +2 -0
  147. package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +2 -0
  148. package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +2 -0
  149. package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +2 -0
  150. package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_Dark_Variables.js +1 -3
  151. package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_Light_Variables.js +1 -3
  152. package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_PureDark_Variables.js +1 -3
  153. package/lib/DotProvider/libraryChunks/themes/variables/green/Green_Dark_Variables.js +1 -3
  154. package/lib/DotProvider/libraryChunks/themes/variables/green/Green_Light_Variables.js +1 -3
  155. package/lib/DotProvider/libraryChunks/themes/variables/green/Green_PureDark_Variables.js +1 -3
  156. package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_Dark_Variables.js +1 -3
  157. package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_Light_Variables.js +1 -3
  158. package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_PureDark_Variables.js +1 -3
  159. package/lib/DotProvider/libraryChunks/themes/variables/red/Red_Dark_Variables.js +1 -3
  160. package/lib/DotProvider/libraryChunks/themes/variables/red/Red_Light_Variables.js +1 -3
  161. package/lib/DotProvider/libraryChunks/themes/variables/red/Red_PureDark_Variables.js +1 -3
  162. package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Dark_Variables.js +1 -3
  163. package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Light_Variables.js +1 -3
  164. package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_PureDark_Variables.js +1 -3
  165. package/lib/Link/Link.js +4 -3
  166. package/lib/Link/props/propTypes.js +1 -0
  167. package/package.json +12 -11
@@ -25,10 +25,9 @@ export default class DesktopNotificationHeader extends Component {
25
25
  responsiveId
26
26
  } = this.props;
27
27
 
28
- function responsiveFunc(_ref) {
29
- let {
30
- mediaQueryOR
31
- } = _ref;
28
+ function responsiveFunc({
29
+ mediaQueryOR
30
+ }) {
32
31
  return {
33
32
  uptoTablet: mediaQueryOR([{
34
33
  maxWidth: 760
@@ -45,46 +44,43 @@ export default class DesktopNotificationHeader extends Component {
45
44
  }, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
46
45
  query: responsiveFunc,
47
46
  responsiveId: responsiveId
48
- }, _ref2 => {
49
- let {
50
- uptoTablet
51
- } = _ref2;
52
- return /*#__PURE__*/React.createElement(React.Fragment, null, needIcon ? /*#__PURE__*/React.createElement("div", {
53
- className: style.iconContainer
54
- }, /*#__PURE__*/React.createElement(AlertIcons, {
55
- type: type
56
- })) : null, /*#__PURE__*/React.createElement(Box, {
57
- flexible: true
58
- }, /*#__PURE__*/React.createElement(Container, {
59
- alignBox: "row",
60
- align: "center"
61
- }, variant === 'primary' ? /*#__PURE__*/React.createElement(Box, {
62
- shrink: true
63
- }, /*#__PURE__*/React.createElement(Typography, {
64
- $i18n_dataTitle: title,
65
- $ui_className: style.title,
66
- $ui_tagName: "h1",
67
- $ui_size: uptoTablet ? '16' : '18',
68
- $ui_lineHeight: "1.2",
69
- $ui_weight: "bold",
70
- $flag_reset: true,
71
- $ui_wordBreak: "breakWord"
72
- }, title)) : /*#__PURE__*/React.createElement(Box, {
73
- className: `${style.infoText}`
74
- }, /*#__PURE__*/React.createElement(Typography, {
75
- $i18n_dataTitle: title,
76
- $ui_className: style.title,
77
- $ui_size: "14",
78
- $ui_wordBreak: "breakWord"
79
- }, title)))), needClose ? /*#__PURE__*/React.createElement(Box, {
80
- className: style.close
81
- }, /*#__PURE__*/React.createElement(AlertClose, {
82
- onClose: onClose,
83
- dataTitle: closeTitle,
84
- dataId: dataId,
85
- type: "light"
86
- })) : null);
87
- }));
47
+ }, ({
48
+ uptoTablet
49
+ }) => /*#__PURE__*/React.createElement(React.Fragment, null, needIcon ? /*#__PURE__*/React.createElement("div", {
50
+ className: style.iconContainer
51
+ }, /*#__PURE__*/React.createElement(AlertIcons, {
52
+ type: type
53
+ })) : null, /*#__PURE__*/React.createElement(Box, {
54
+ flexible: true
55
+ }, /*#__PURE__*/React.createElement(Container, {
56
+ alignBox: "row",
57
+ align: "center"
58
+ }, variant === 'primary' ? /*#__PURE__*/React.createElement(Box, {
59
+ shrink: true
60
+ }, /*#__PURE__*/React.createElement(Typography, {
61
+ $i18n_dataTitle: title,
62
+ $ui_className: style.title,
63
+ $ui_tagName: "h1",
64
+ $ui_size: uptoTablet ? '16' : '18',
65
+ $ui_lineHeight: "1.2",
66
+ $ui_weight: "bold",
67
+ $flag_reset: true,
68
+ $ui_wordBreak: "breakWord"
69
+ }, title)) : /*#__PURE__*/React.createElement(Box, {
70
+ className: `${style.infoText}`
71
+ }, /*#__PURE__*/React.createElement(Typography, {
72
+ $i18n_dataTitle: title,
73
+ $ui_className: style.title,
74
+ $ui_size: "14",
75
+ $ui_wordBreak: "breakWord"
76
+ }, title)))), needClose ? /*#__PURE__*/React.createElement(Box, {
77
+ className: style.close
78
+ }, /*#__PURE__*/React.createElement(AlertClose, {
79
+ onClose: onClose,
80
+ dataTitle: closeTitle,
81
+ dataId: dataId,
82
+ type: "light"
83
+ })) : null)));
88
84
  }
89
85
 
90
86
  }
@@ -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
  });
@@ -35,11 +35,13 @@ var _IconButton = _interopRequireDefault(require("../IconButton/IconButton"));
35
35
 
36
36
  var _FreezeLayer = _interopRequireDefault(require("../FreezeLayer/FreezeLayer"));
37
37
 
38
- var _Attachment = require("./Attachment");
38
+ var _utils = require("@zohodesk/utils");
39
39
 
40
40
  var _General = require("../utils/General");
41
41
 
42
- var _utils = require("./utils");
42
+ var _Attachment = require("./Attachment");
43
+
44
+ var _utils2 = require("./utils");
43
45
 
44
46
  var _AttachmentViewerModule = _interopRequireDefault(require("./AttachmentViewer.module.css"));
45
47
 
@@ -119,8 +121,11 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
119
121
  _this.getUpdateDataList = _this.getUpdateDataList.bind(_assertThisInitialized(_this));
120
122
  _this.zoomMaintain = _this.zoomMaintain.bind(_assertThisInitialized(_this));
121
123
  _this.handleMenuValidation = _this.handleMenuValidation.bind(_assertThisInitialized(_this));
124
+ _this.notifySelectedAttachmentChange = _this.notifySelectedAttachmentChange.bind(_assertThisInitialized(_this));
122
125
  _this.getPreviewIconData = _this.getPreviewIconData.bind(_assertThisInitialized(_this));
123
126
  _this.renderIframe = _this.renderIframe.bind(_assertThisInitialized(_this));
127
+ _this.getRenderImageFrameCustomClass = _this.getRenderImageFrameCustomClass.bind(_assertThisInitialized(_this));
128
+ _this.renderImageFrame = _this.renderImageFrame.bind(_assertThisInitialized(_this));
124
129
  return _this;
125
130
  }
126
131
 
@@ -129,7 +134,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
129
134
  value: function isImageFileType(fileName) {
130
135
  var extension = ((0, _Attachment.getExtensionFromFileName)(fileName) || '').toLowerCase();
131
136
  if (!extension) return false;
132
- return _utils.FILE_EXTENSIONS.image.map(function (ext) {
137
+ return _utils2.FILE_EXTENSIONS.image.map(function (ext) {
133
138
  return ext.toLowerCase();
134
139
  }).includes(extension);
135
140
  }
@@ -138,7 +143,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
138
143
  value: function isVideoFileType(fileName) {
139
144
  var extension = ((0, _Attachment.getExtensionFromFileName)(fileName) || '').toLowerCase();
140
145
  if (!extension) return false;
141
- return _utils.FILE_EXTENSIONS.video.map(function (ext) {
146
+ return _utils2.FILE_EXTENSIONS.video.map(function (ext) {
142
147
  return ext.toLowerCase();
143
148
  }).includes(extension);
144
149
  }
@@ -147,25 +152,45 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
147
152
  value: function isAudioFileType(fileName) {
148
153
  var extension = ((0, _Attachment.getExtensionFromFileName)(fileName) || '').toLowerCase();
149
154
  if (!extension) return false;
150
- return _utils.FILE_EXTENSIONS.audio.map(function (ext) {
155
+ return _utils2.FILE_EXTENSIONS.audio.map(function (ext) {
151
156
  return ext.toLowerCase();
152
157
  }).includes(extension);
153
158
  }
159
+ }, {
160
+ key: "notifySelectedAttachmentChange",
161
+ value: function notifySelectedAttachmentChange() {
162
+ var onSelectedAttachmentChange = this.props.onSelectedAttachmentChange;
163
+ var _this$state = this.state,
164
+ selectedIndex = _this$state.selectedIndex,
165
+ data = _this$state.data;
166
+ onSelectedAttachmentChange && onSelectedAttachmentChange({
167
+ data: data[selectedIndex] || _General.DUMMY_OBJECT,
168
+ index: selectedIndex
169
+ });
170
+ }
154
171
  }, {
155
172
  key: "componentDidMount",
156
173
  value: function componentDidMount() {
157
174
  this.handleMenuValidation();
175
+ this.notifySelectedAttachmentChange();
158
176
  }
159
177
  }, {
160
178
  key: "componentDidUpdate",
161
179
  value: function componentDidUpdate(prevProps, prevState) {
162
180
  var previewObj = this.props.previewObj;
163
- var selectedIndex = this.state.selectedIndex;
181
+ var _this$state2 = this.state,
182
+ selectedIndex = _this$state2.selectedIndex,
183
+ data = _this$state2.data;
164
184
  var indexChanged = previewObj.selectedIndex != prevProps.previewObj.selectedIndex;
185
+ var attachmentPreviewUrlChanged = previewObj.previewData.some(function (value, index) {
186
+ var _prevState$data$index;
187
+
188
+ 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);
189
+ }); // Triggers an update if any previewed attachment is edited by the Attachment Annotator.
165
190
 
166
- if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged) {
191
+ if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged || attachmentPreviewUrlChanged) {
167
192
  var objChanged = previewObj.previewData.some(function (value, index) {
168
- return (0, _General.shallowDiff)(value, prevProps.previewObj[index]);
193
+ return (0, _General.shallowDiff)(value, prevProps.previewObj.previewData[index]);
169
194
  });
170
195
 
171
196
  if (objChanged || indexChanged) {
@@ -182,7 +207,8 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
182
207
  }
183
208
  }
184
209
 
185
- if (prevState.selectedIndex != selectedIndex) {
210
+ if (prevState.selectedIndex != selectedIndex || attachmentPreviewUrlChanged) {
211
+ this.notifySelectedAttachmentChange();
186
212
  this.handleMenuValidation();
187
213
  }
188
214
  }
@@ -191,16 +217,16 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
191
217
  value: function handleMenuValidation() {
192
218
  var _this2 = this;
193
219
 
194
- var _this$state = this.state,
195
- data = _this$state.data,
196
- selectedIndex = _this$state.selectedIndex;
220
+ var _this$state3 = this.state,
221
+ data = _this$state3.data,
222
+ selectedIndex = _this$state3.selectedIndex;
197
223
  var allowedPreviewExtensionsData = this.props.allowedPreviewExtensionsData;
198
- var selectedAttachment = data[selectedIndex] || {};
224
+ var selectedAttachment = data[selectedIndex] || _General.DUMMY_OBJECT;
199
225
  var selectedAttachmentViewUrl = selectedAttachment.viewUrl; // const selectedAttachmentDownloadUrl = selectedAttachment.downloadUrl;
200
226
 
201
227
  var selectedAttachmentName = selectedAttachment.name;
202
228
  var selectedAttachmentPreviewUrl = selectedAttachment.previewurl;
203
- (0, _utils.checkFileSourcesValidation)({
229
+ (0, _utils2.checkFileSourcesValidation)({
204
230
  fileName: selectedAttachmentName,
205
231
  viewURL: selectedAttachmentViewUrl,
206
232
  previewUrl: selectedAttachmentPreviewUrl,
@@ -322,9 +348,9 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
322
348
  value: function changeSelectedIndex(index) {
323
349
  var _this4 = this;
324
350
 
325
- var _this$state2 = this.state,
326
- data = _this$state2.data,
327
- selectedIndex = _this$state2.selectedIndex;
351
+ var _this$state4 = this.state,
352
+ data = _this$state4.data,
353
+ selectedIndex = _this$state4.selectedIndex;
328
354
  var maintainZoom = this.props.maintainZoom;
329
355
  maintainZoom ? this.zoomMaintain(index) : this.zoomOut(selectedIndex);
330
356
 
@@ -396,19 +422,83 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
396
422
  className: _AttachmentViewerModule["default"].previewFrame
397
423
  }, this.props.customProps.iframeProps));
398
424
  }
425
+ }, {
426
+ key: "getRenderImageFrameCustomClass",
427
+ value: function getRenderImageFrameCustomClass() {
428
+ var _this$state5 = this.state,
429
+ selectedIndex = _this$state5.selectedIndex,
430
+ isZoomed = _this$state5.isZoomed,
431
+ canZoom = _this$state5.canZoom,
432
+ data = _this$state5.data;
433
+ var maintainZoom = this.props.maintainZoom;
434
+ var selectedData = data[selectedIndex] || _General.DUMMY_OBJECT;
435
+ var _selectedData$customC = selectedData.customClass,
436
+ customClass = _selectedData$customC === void 0 ? _General.DUMMY_OBJECT : _selectedData$customC;
437
+ var _customClass$customIm = customClass.customImageClass,
438
+ customImageClass = _customClass$customIm === void 0 ? '' : _customClass$customIm,
439
+ _customClass$customCh = customClass.customChildrenClass,
440
+ customChildrenClass = _customClass$customCh === void 0 ? '' : _customClass$customCh;
441
+ var retainZoom = canZoom && maintainZoom;
442
+ return {
443
+ customImageClass: "".concat(_AttachmentViewerModule["default"].img, " ").concat(_AttachmentViewerModule["default"].altText, " ").concat(canZoom || retainZoom ? isZoomed ? "".concat(_AttachmentViewerModule["default"].zoomedImg, " ").concat(_AttachmentViewerModule["default"].zoomOutCursor) : "".concat(_AttachmentViewerModule["default"].normalImg, " ").concat(_AttachmentViewerModule["default"].zoomInCursor) : '', " ").concat(customImageClass),
444
+ customChildrenClass: customChildrenClass
445
+ };
446
+ }
447
+ }, {
448
+ key: "renderImageFrame",
449
+ value: function renderImageFrame() {
450
+ var _this5 = this;
451
+
452
+ var _this$state6 = this.state,
453
+ selectedIndex = _this$state6.selectedIndex,
454
+ isZoomed = _this$state6.isZoomed,
455
+ isPreviewAttachmentValid = _this$state6.isPreviewAttachmentValid;
456
+ var renderCustomImagePreviewElement = this.props.renderCustomImagePreviewElement;
457
+ var data = this.state.data[selectedIndex] || _General.DUMMY_OBJECT;
458
+ var viewUrl = data.viewUrl,
459
+ name = data.name,
460
+ children = data.children,
461
+ _data$dataId = data.dataId,
462
+ dataId = _data$dataId === void 0 ? 'attachViewer' : _data$dataId,
463
+ _data$customProps = data.customProps,
464
+ customProps = _data$customProps === void 0 ? _General.DUMMY_OBJECT : _data$customProps,
465
+ imageRef = data.imageRef;
466
+ var _customProps$imagePro = customProps.imageProps,
467
+ imageProps = _customProps$imagePro === void 0 ? _General.DUMMY_OBJECT : _customProps$imagePro;
468
+ var resolvedImageRef = imageRef;
469
+ var handleZoomOut = isPreviewAttachmentValid && isZoomed ? this.zoomOut.bind(this, selectedIndex) : undefined;
470
+ var handleZoomIn = isPreviewAttachmentValid && !isZoomed ? function (e) {
471
+ return _this5.zoomIn(e, selectedIndex, true);
472
+ } : undefined;
473
+ var handleImageClick = isPreviewAttachmentValid ? isZoomed ? handleZoomOut : handleZoomIn : undefined;
474
+ var imageFrameCustomClass = this.getRenderImageFrameCustomClass();
475
+
476
+ var img = /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
477
+ customClass: imageFrameCustomClass,
478
+ src: viewUrl,
479
+ onClick: handleImageClick,
480
+ alt: name,
481
+ dataId: dataId,
482
+ id: "img".concat(selectedIndex),
483
+ isCover: false,
484
+ imageRef: resolvedImageRef
485
+ }, imageProps), children);
486
+
487
+ return typeof renderCustomImagePreviewElement === 'function' ? renderCustomImagePreviewElement({
488
+ defaultView: img,
489
+ data: data,
490
+ index: selectedIndex
491
+ }) : img;
492
+ }
399
493
  }, {
400
494
  key: "imgPreviewView",
401
495
  value: function imgPreviewView(downloadUrl) {
402
- var _this5 = this;
496
+ var _this6 = this;
403
497
 
404
- var _this$state3 = this.state,
405
- dataList = _this$state3.dataList,
406
- selectedIndex = _this$state3.selectedIndex,
407
- isZoomed = _this$state3.isZoomed,
408
- canZoom = _this$state3.canZoom,
409
- isPreviewAttachmentValid = _this$state3.isPreviewAttachmentValid;
498
+ var _this$state7 = this.state,
499
+ dataList = _this$state7.dataList,
500
+ selectedIndex = _this$state7.selectedIndex;
410
501
  var _this$props = this.props,
411
- maintainZoom = _this$props.maintainZoom,
412
502
  dataId = _this$props.dataId,
413
503
  i18nKeys = _this$props.i18nKeys,
414
504
  renderUnSupportedElement = _this$props.renderUnSupportedElement;
@@ -444,25 +534,16 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
444
534
  var viewUrl = data.viewUrl,
445
535
  name = data.name,
446
536
  children = data.children,
447
- _data$dataId = data.dataId,
448
- dataId = _data$dataId === void 0 ? 'attachViewer' : _data$dataId,
449
- _data$customClass = data.customClass,
450
- customClass = _data$customClass === void 0 ? {} : _data$customClass,
451
- _data$customProps = data.customProps,
452
- customProps = _data$customProps === void 0 ? {} : _data$customProps,
537
+ _data$dataId2 = data.dataId,
538
+ dataId = _data$dataId2 === void 0 ? 'attachViewer' : _data$dataId2,
539
+ _data$customProps2 = data.customProps,
540
+ customProps = _data$customProps2 === void 0 ? {} : _data$customProps2,
453
541
  previewurl = data.previewurl,
454
542
  type = data.type;
455
543
  var _customProps$audioPro = customProps.audioProps,
456
544
  audioProps = _customProps$audioPro === void 0 ? {} : _customProps$audioPro,
457
- _customProps$imagePro = customProps.imageProps,
458
- imageProps = _customProps$imagePro === void 0 ? {} : _customProps$imagePro,
459
545
  _customProps$videoPro = customProps.videoProps,
460
546
  videoProps = _customProps$videoPro === void 0 ? {} : _customProps$videoPro;
461
- var _customClass$customIm = customClass.customImageClass,
462
- customImageClass = _customClass$customIm === void 0 ? '' : _customClass$customIm,
463
- _customClass$customCh = customClass.customChildrenClass,
464
- customChildrenClass = _customClass$customCh === void 0 ? '' : _customClass$customCh;
465
- var retainZoom = canZoom && selectedIndex == i && maintainZoom;
466
547
  var extension = (0, _Attachment.getExtensionFromFileName)(name);
467
548
  var _i18nKeys$previewUnsu = i18nKeys.previewUnsupportedText,
468
549
  previewUnsupportedText = _i18nKeys$previewUnsu === void 0 ? "Preview not available for the selected file type." : _i18nKeys$previewUnsu,
@@ -478,7 +559,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
478
559
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
479
560
  className: _AttachmentViewerModule["default"].imgRef,
480
561
  id: "imgPreviewRef".concat(i)
481
- }, selectedIndex == i && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _this5.isAudioFileType(name) ? /*#__PURE__*/_react["default"].createElement("audio", _extends({
562
+ }, selectedIndex == i && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _this6.isAudioFileType(name) ? /*#__PURE__*/_react["default"].createElement("audio", _extends({
482
563
  controls: true,
483
564
  className: _AttachmentViewerModule["default"].zoomIn,
484
565
  "data-id": "".concat(dataId, "_audioPreview"),
@@ -486,7 +567,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
486
567
  }, audioProps), /*#__PURE__*/_react["default"].createElement("source", {
487
568
  src: previewurl || viewUrl,
488
569
  type: "audio/".concat(extension)
489
- })) : _this5.isVideoFileType(name) ? /*#__PURE__*/_react["default"].createElement("video", _extends({
570
+ })) : _this6.isVideoFileType(name) ? /*#__PURE__*/_react["default"].createElement("video", _extends({
490
571
  controls: true,
491
572
  className: _AttachmentViewerModule["default"].zoomIn,
492
573
  "data-id": "".concat(dataId, "_videoPreview"),
@@ -494,31 +575,19 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
494
575
  }, videoProps), /*#__PURE__*/_react["default"].createElement("source", {
495
576
  src: viewUrl,
496
577
  type: "video/".concat(extension)
497
- })) : _this5.isImageFileType(name) || children ? /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
498
- customClass: {
499
- customImageClass: "".concat(_AttachmentViewerModule["default"].img, " ").concat(_AttachmentViewerModule["default"].altText, " ").concat(canZoom || retainZoom ? isZoomed ? "".concat(_AttachmentViewerModule["default"].zoomedImg, " ").concat(_AttachmentViewerModule["default"].zoomOutCursor) : "".concat(_AttachmentViewerModule["default"].normalImg, " ").concat(_AttachmentViewerModule["default"].zoomInCursor) : '', " ").concat(customImageClass),
500
- customChildrenClass: customChildrenClass
501
- },
502
- src: viewUrl,
503
- onClick: isPreviewAttachmentValid ? isZoomed ? _this5.zoomOut.bind(_this5, i) : function (e) {
504
- return _this5.zoomIn(e, i, true);
505
- } : undefined,
506
- alt: name,
507
- dataId: dataId,
508
- id: "img".concat(i),
509
- isCover: false
510
- }, imageProps), children) : type === "document" && previewurl != null ? _this5.renderIframe(previewurl) : typeof renderUnSupportedElement === 'function' ? renderUnSupportedElement(data) : /*#__PURE__*/_react["default"].createElement("div", {
578
+ })) : _this6.isImageFileType(name) || children ? _this6.renderImageFrame() : type === "document" && previewurl != null ? _this6.renderIframe(previewurl) : typeof renderUnSupportedElement === 'function' ? renderUnSupportedElement(data) : /*#__PURE__*/_react["default"].createElement("div", {
511
579
  className: _AttachmentViewerModule["default"].previewNone
512
580
  }, /*#__PURE__*/_react["default"].createElement("div", {
513
581
  className: _AttachmentViewerModule["default"].fileTypeImg
514
- }, _this5.getPreviewIconData(name, '70')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
582
+ }, _this6.getPreviewIconData(name, '70')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
515
583
  $ui_size: "20",
516
584
  $ui_weight: "semibold"
517
585
  }, previewUnsupportedText), downloadUrl ? /*#__PURE__*/_react["default"].createElement(_Link["default"], {
518
586
  href: downloadUrl,
587
+ download: true,
588
+ downloadName: name,
519
589
  className: _AttachmentViewerModule["default"].downloadLink,
520
- hasReload: true,
521
- download: true
590
+ hasReload: true
522
591
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
523
592
  palette: "primaryFilled",
524
593
  text: downloadText
@@ -528,22 +597,24 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
528
597
  }, {
529
598
  key: "render",
530
599
  value: function render() {
531
- var _this6 = this;
532
-
533
- var _this$state4 = this.state,
534
- isPViewListOpen = _this$state4.isPViewListOpen,
535
- selectedIndex = _this$state4.selectedIndex,
536
- data = _this$state4.data,
537
- isZoomed = _this$state4.isZoomed,
538
- canZoom = _this$state4.canZoom,
539
- canOpenInNewTab = _this$state4.canOpenInNewTab;
600
+ var _this7 = this;
601
+
602
+ var _this$state8 = this.state,
603
+ isPViewListOpen = _this$state8.isPViewListOpen,
604
+ selectedIndex = _this$state8.selectedIndex,
605
+ data = _this$state8.data,
606
+ isZoomed = _this$state8.isZoomed,
607
+ canZoom = _this$state8.canZoom,
608
+ canOpenInNewTab = _this$state8.canOpenInNewTab;
540
609
  var _this$props2 = this.props,
541
610
  responsiveId = _this$props2.responsiveId,
542
611
  needDownload = _this$props2.needDownload,
543
612
  i18nKeys = _this$props2.i18nKeys,
544
613
  isActive = _this$props2.isActive,
545
614
  dataId = _this$props2.dataId,
546
- customProps = _this$props2.customProps;
615
+ customProps = _this$props2.customProps,
616
+ hasCount = _this$props2.hasCount,
617
+ renderCustomIcons = _this$props2.renderCustomIcons;
547
618
  var _customProps$avatarPr = customProps.avatarProps,
548
619
  avatarProps = _customProps$avatarPr === void 0 ? {} : _customProps$avatarPr;
549
620
  var totalLen = data.length;
@@ -585,7 +656,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
585
656
  "data-title": selectedAttachment.name,
586
657
  dataId: "attachName",
587
658
  id: ariaId
588
- }, selectedAttachment.name), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
659
+ }, selectedAttachment.name), hasCount && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
589
660
  flexible: true,
590
661
  className: _AttachmentViewerModule["default"].count,
591
662
  dataId: "attachCountContainer"
@@ -597,9 +668,13 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
597
668
  align: uptoTablet ? 'bottom' : 'center',
598
669
  wrap: "wrap",
599
670
  isCover: false
600
- }, canZoom ? isZoomed ? /*#__PURE__*/_react["default"].createElement("div", {
671
+ }, (0, _utils.renderNode)(renderCustomIcons, {
672
+ selectedAttachment: selectedAttachment,
673
+ selectedIndex: selectedIndex,
674
+ totalLen: totalLen
675
+ }), canZoom ? isZoomed ? /*#__PURE__*/_react["default"].createElement("div", {
601
676
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
602
- onClick: _this6.zoomOut.bind(_this6, selectedIndex),
677
+ onClick: _this7.zoomOut.bind(_this7, selectedIndex),
603
678
  "data-id": "zoomOut",
604
679
  "data-test-id": "zoomOut",
605
680
  "data-title": i18nKeys.zoomOutText
@@ -614,7 +689,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
614
689
  })) : /*#__PURE__*/_react["default"].createElement("div", {
615
690
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
616
691
  onClick: function onClick(e) {
617
- return _this6.zoomIn(e, selectedIndex);
692
+ return _this7.zoomIn(e, selectedIndex);
618
693
  },
619
694
  "data-id": "zoomIn",
620
695
  "data-test-id": "zoomIn",
@@ -647,6 +722,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
647
722
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu
648
723
  }, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
649
724
  href: downloadUrl,
725
+ downloadName: selectedAttachment.name,
650
726
  target: "_parent",
651
727
  hasReload: true,
652
728
  download: true,
@@ -663,7 +739,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
663
739
  }
664
740
  }))) : null, /*#__PURE__*/_react["default"].createElement("div", {
665
741
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
666
- onClick: _this6.closeAttachmentViewer,
742
+ onClick: _this7.closeAttachmentViewer,
667
743
  "data-id": "closeAttach",
668
744
  "data-test-id": "closeAttach",
669
745
  "data-title": i18nKeys.closeText
@@ -684,7 +760,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
684
760
  alignBox: "row"
685
761
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
686
762
  className: "".concat(_AttachmentViewerModule["default"].arrowBox, " ").concat(uptoTablet ? _AttachmentViewerModule["default"].mbleArrowBox : _AttachmentViewerModule["default"].nrmlArrowBox, " ").concat(selectedIndex === 0 ? _AttachmentViewerModule["default"].hidden : ''),
687
- onClick: _this6.changeSelectedIndex.bind(_this6, selectedIndex - 1),
763
+ onClick: _this7.changeSelectedIndex.bind(_this7, selectedIndex - 1),
688
764
  "data-title": i18nKeys.previousText,
689
765
  "data-title-position": "left"
690
766
  }, /*#__PURE__*/_react["default"].createElement("button", {
@@ -700,12 +776,12 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
700
776
  tabindex: "0",
701
777
  "aria-describedby": ariaId,
702
778
  isShrink: false,
703
- eleRef: _this6.setImgBoxRef,
779
+ eleRef: _this7.setImgBoxRef,
704
780
  scroll: "both",
705
781
  flexible: true
706
- }, _this6.imgPreviewView(downloadUrl)), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
782
+ }, _this7.imgPreviewView(downloadUrl)), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
707
783
  className: "".concat(_AttachmentViewerModule["default"].arrowBox, " ").concat(uptoTablet ? _AttachmentViewerModule["default"].mbleArrowBox : _AttachmentViewerModule["default"].nrmlArrowBox, " ").concat(totalLen === selectedIndex + 1 ? _AttachmentViewerModule["default"].hidden : ''),
708
- onClick: _this6.changeSelectedIndex.bind(_this6, selectedIndex + 1),
784
+ onClick: _this7.changeSelectedIndex.bind(_this7, selectedIndex + 1),
709
785
  "data-title": i18nKeys.nextText,
710
786
  "data-title-position": "right"
711
787
  }, /*#__PURE__*/_react["default"].createElement("button", {
@@ -745,7 +821,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
745
821
  alignBox: "row",
746
822
  scroll: "horizontal",
747
823
  eleRef: function eleRef(el) {
748
- return _this6.imgListCont = el;
824
+ return _this7.imgListCont = el;
749
825
  },
750
826
  className: _AttachmentViewerModule["default"].listContainer
751
827
  }, data.map(function (item, index) {
@@ -759,7 +835,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
759
835
  _item$customProps = item.customProps,
760
836
  customProps = _item$customProps === void 0 ? {} : _item$customProps;
761
837
  var thumbnail = item.thumbnail;
762
- var isImageFileType = _this6.isImageFileType(name) || thumbnail;
838
+ var isImageFileType = _this7.isImageFileType(name) || thumbnail;
763
839
  var _customClass$customIm2 = customClass.customImageClass,
764
840
  customImageClass = _customClass$customIm2 === void 0 ? '' : _customClass$customIm2,
765
841
  _customClass$customCh2 = customClass.customChildrenClass,
@@ -767,9 +843,9 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
767
843
  return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
768
844
  className: "".concat(_AttachmentViewerModule["default"].imgItem, " ").concat(index === selectedIndex ? _AttachmentViewerModule["default"].selected : '', " ").concat(isImageFileType ? '' : _AttachmentViewerModule["default"].previewIconDiv),
769
845
  key: index,
770
- onClick: _this6.changeSelectedIndex.bind(_this6, index),
846
+ onClick: _this7.changeSelectedIndex.bind(_this7, index),
771
847
  eleRef: function eleRef(el) {
772
- return _this6["img_".concat(index)] = el;
848
+ return _this7["img_".concat(index)] = el;
773
849
  },
774
850
  dataId: "attachPreviewList",
775
851
  "data-title": name
@@ -782,10 +858,10 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
782
858
  customChildrenClass: "".concat(_AttachmentViewerModule["default"].crsrPointer, " ").concat(customChildrenClass)
783
859
  },
784
860
  dataId: dataId
785
- }, customProps), children) : _this6.getPreviewIconData(name, '40'));
861
+ }, customProps), children) : _this7.getPreviewIconData(name, '40'));
786
862
  }))))), totalLen !== 1 && /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
787
863
  dataId: "attachToggle",
788
- onClick: _this6.togglePViewList,
864
+ onClick: _this7.togglePViewList,
789
865
  iconName: "ZD-GN-hideTab",
790
866
  iconSize: "14",
791
867
  hoverType: "border",
@@ -1,8 +1,8 @@
1
1
  .header {
2
- height: var(--zd_size40) ;
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
+ }