@zohodesk/dot 1.0.0-temp-229.2 → 1.0.0-temp-230.2

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 (35) hide show
  1. package/README.md +7 -5
  2. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +0 -3
  3. package/assets/Appearance/light/mode/Dot_LightMode.module.css +0 -3
  4. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +0 -3
  5. package/es/AttachmentViewer/AttachmentImage.js +3 -1
  6. package/es/AttachmentViewer/AttachmentViewer.js +119 -23
  7. package/es/AttachmentViewer/AttachmentViewer.module.css +1 -1
  8. package/es/AttachmentViewer/props/defaultProps.js +2 -1
  9. package/es/AttachmentViewer/props/propTypes.js +9 -1
  10. package/es/Link/Link.js +4 -3
  11. package/es/Link/props/propTypes.js +1 -0
  12. package/es/common/dot_boxShadow.module.css +0 -2
  13. package/es/form/fields/SelectField/SelectField.js +2 -4
  14. package/es/form/fields/SelectField/props/defaultProps.js +0 -1
  15. package/es/form/fields/SelectField/props/propTypes.js +0 -1
  16. package/es/list/status/StatusDropdown/StatusDropdown.js +79 -121
  17. package/es/list/status/StatusDropdown/StatusDropdown.module.css +7 -54
  18. package/es/list/status/StatusDropdown/props/defaultProps.js +1 -2
  19. package/es/list/status/StatusDropdown/props/propTypes.js +1 -2
  20. package/lib/AttachmentViewer/AttachmentImage.js +3 -1
  21. package/lib/AttachmentViewer/AttachmentViewer.js +181 -80
  22. package/lib/AttachmentViewer/AttachmentViewer.module.css +1 -1
  23. package/lib/AttachmentViewer/props/defaultProps.js +2 -1
  24. package/lib/AttachmentViewer/props/propTypes.js +9 -1
  25. package/lib/Link/Link.js +4 -3
  26. package/lib/Link/props/propTypes.js +1 -0
  27. package/lib/common/dot_boxShadow.module.css +0 -2
  28. package/lib/form/fields/SelectField/SelectField.js +2 -4
  29. package/lib/form/fields/SelectField/props/defaultProps.js +0 -1
  30. package/lib/form/fields/SelectField/props/propTypes.js +0 -1
  31. package/lib/list/status/StatusDropdown/StatusDropdown.js +81 -133
  32. package/lib/list/status/StatusDropdown/StatusDropdown.module.css +7 -54
  33. package/lib/list/status/StatusDropdown/props/defaultProps.js +1 -2
  34. package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
  35. package/package.json +8 -8
@@ -120,9 +120,37 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
120
120
  _this.zoomMaintain = _this.zoomMaintain.bind(_assertThisInitialized(_this));
121
121
  _this.handleMenuValidation = _this.handleMenuValidation.bind(_assertThisInitialized(_this));
122
122
  _this.getPreviewIconData = _this.getPreviewIconData.bind(_assertThisInitialized(_this));
123
- _this.renderIframe = _this.renderIframe.bind(_assertThisInitialized(_this));
123
+ _this.renderIframe = _this.renderIframe.bind(_assertThisInitialized(_this)); // this.updateItem = this.updateItem.bind(this);
124
+
124
125
  return _this;
125
- }
126
+ } // updateItem(idOrIndex, changes) {
127
+ // if (!changes || typeof changes !== 'object') {
128
+ // return false;
129
+ // }
130
+ // const { data } = this.state;
131
+ // const targetIdx = typeof idOrIndex === 'number'
132
+ // ? idOrIndex
133
+ // : data.findIndex((item) => item && item.id === idOrIndex);
134
+ // if (targetIdx < 0 || targetIdx >= data.length) {
135
+ // return false;
136
+ // }
137
+ // this.setState((prevState) => {
138
+ // const nextData = prevState.data.slice();
139
+ // nextData[targetIdx] = { ...nextData[targetIdx], ...changes };
140
+ // let nextDataList = prevState.dataList;
141
+ // if (targetIdx < prevState.dataList.length) {
142
+ // nextDataList = prevState.dataList.slice();
143
+ // nextDataList[targetIdx] = { ...nextDataList[targetIdx], ...changes };
144
+ // }
145
+ // return { data: nextData, dataList: nextDataList };
146
+ // }, () => {
147
+ // if (this.state.selectedIndex === targetIdx) {
148
+ // this.handleMenuValidation();
149
+ // }
150
+ // });
151
+ // return true;
152
+ // }
153
+
126
154
 
127
155
  _createClass(AttachmentViewer, [{
128
156
  key: "isImageFileType",
@@ -159,11 +187,14 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
159
187
  }, {
160
188
  key: "componentDidUpdate",
161
189
  value: function componentDidUpdate(prevProps, prevState) {
190
+ var _previewObj$previewDa, _prevState$data$;
191
+
162
192
  var previewObj = this.props.previewObj;
163
193
  var selectedIndex = this.state.selectedIndex;
164
194
  var indexChanged = previewObj.selectedIndex != prevProps.previewObj.selectedIndex;
195
+ var attachmentPreviewUrlChanged = ((_previewObj$previewDa = previewObj.previewData[0]) === null || _previewObj$previewDa === void 0 ? void 0 : _previewObj$previewDa.viewUrl) !== ((_prevState$data$ = prevState.data[0]) === null || _prevState$data$ === void 0 ? void 0 : _prevState$data$.viewUrl); // Triggers an update if the previewed attachment is edited by the Attachment Annotator.
165
196
 
166
- if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged) {
197
+ if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged || attachmentPreviewUrlChanged) {
167
198
  var objChanged = previewObj.previewData.some(function (value, index) {
168
199
  return (0, _General.shallowDiff)(value, prevProps.previewObj[index]);
169
200
  });
@@ -182,7 +213,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
182
213
  }
183
214
  }
184
215
 
185
- if (prevState.selectedIndex != selectedIndex) {
216
+ if (prevState.selectedIndex != selectedIndex || attachmentPreviewUrlChanged) {
186
217
  this.handleMenuValidation();
187
218
  }
188
219
  }
@@ -397,21 +428,96 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
397
428
  }, this.props.customProps.iframeProps));
398
429
  }
399
430
  }, {
400
- key: "imgPreviewView",
401
- value: function imgPreviewView(downloadUrl) {
431
+ key: "getRenderImageFrameCustomClass",
432
+ value: function getRenderImageFrameCustomClass(_ref3) {
433
+ var canZoom = _ref3.canZoom,
434
+ retainZoom = _ref3.retainZoom,
435
+ isZoomed = _ref3.isZoomed,
436
+ customImageClass = _ref3.customImageClass,
437
+ customChildrenClass = _ref3.customChildrenClass;
438
+ return {
439
+ 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),
440
+ customChildrenClass: customChildrenClass
441
+ };
442
+ }
443
+ }, {
444
+ key: "renderImageFrame",
445
+ value: function renderImageFrame(data, i) {
402
446
  var _this5 = this;
403
447
 
404
448
  var _this$state3 = this.state,
405
- dataList = _this$state3.dataList,
406
449
  selectedIndex = _this$state3.selectedIndex,
407
450
  isZoomed = _this$state3.isZoomed,
408
451
  canZoom = _this$state3.canZoom,
409
452
  isPreviewAttachmentValid = _this$state3.isPreviewAttachmentValid;
410
453
  var _this$props = this.props,
411
454
  maintainZoom = _this$props.maintainZoom,
412
- dataId = _this$props.dataId,
413
- i18nKeys = _this$props.i18nKeys,
414
- renderUnSupportedElement = _this$props.renderUnSupportedElement;
455
+ renderCustomImagePreviewElement = _this$props.renderCustomImagePreviewElement;
456
+ var viewUrl = data.viewUrl,
457
+ name = data.name,
458
+ children = data.children,
459
+ _data$dataId = data.dataId,
460
+ dataId = _data$dataId === void 0 ? 'attachViewer' : _data$dataId,
461
+ _data$customClass = data.customClass,
462
+ customClass = _data$customClass === void 0 ? {} : _data$customClass,
463
+ _data$customProps = data.customProps,
464
+ customProps = _data$customProps === void 0 ? {} : _data$customProps,
465
+ imageRef = data.imageRef;
466
+ var _customProps$imagePro = customProps.imageProps,
467
+ imageProps = _customProps$imagePro === void 0 ? {} : _customProps$imagePro;
468
+ var _customClass$customIm = customClass.customImageClass,
469
+ customImageClass = _customClass$customIm === void 0 ? '' : _customClass$customIm,
470
+ _customClass$customCh = customClass.customChildrenClass,
471
+ customChildrenClass = _customClass$customCh === void 0 ? '' : _customClass$customCh;
472
+ var resolvedImageRef = imageRef;
473
+ var retainZoom = canZoom && selectedIndex == i && maintainZoom;
474
+ var handleZoomOut = isPreviewAttachmentValid && isZoomed ? this.zoomOut.bind(this, i) : undefined;
475
+ var handleZoomIn = isPreviewAttachmentValid && !isZoomed ? function (e) {
476
+ return _this5.zoomIn(e, i, true);
477
+ } : undefined;
478
+ var handleImageClick = isPreviewAttachmentValid ? isZoomed ? handleZoomOut : handleZoomIn : undefined;
479
+ var imageFrameCustomClass = this.getRenderImageFrameCustomClass({
480
+ canZoom: canZoom,
481
+ retainZoom: retainZoom,
482
+ isZoomed: isZoomed,
483
+ customImageClass: customImageClass,
484
+ customChildrenClass: customChildrenClass
485
+ });
486
+
487
+ var img = /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
488
+ customClass: imageFrameCustomClass,
489
+ src: viewUrl,
490
+ onClick: handleImageClick,
491
+ alt: name,
492
+ dataId: dataId,
493
+ id: "img".concat(i),
494
+ isCover: false
495
+ }, imageProps, {
496
+ imageRef: resolvedImageRef
497
+ }), children);
498
+
499
+ return typeof renderCustomImagePreviewElement === 'function' ? renderCustomImagePreviewElement({
500
+ defaultView: img,
501
+ data: data,
502
+ index: i
503
+ }) : img;
504
+ }
505
+ }, {
506
+ key: "imgPreviewView",
507
+ value: function imgPreviewView(downloadUrl) {
508
+ var _this6 = this;
509
+
510
+ var _this$state4 = this.state,
511
+ dataList = _this$state4.dataList,
512
+ selectedIndex = _this$state4.selectedIndex,
513
+ isZoomed = _this$state4.isZoomed,
514
+ canZoom = _this$state4.canZoom,
515
+ isPreviewAttachmentValid = _this$state4.isPreviewAttachmentValid;
516
+ var _this$props2 = this.props,
517
+ maintainZoom = _this$props2.maintainZoom,
518
+ dataId = _this$props2.dataId,
519
+ i18nKeys = _this$props2.i18nKeys,
520
+ renderUnSupportedElement = _this$props2.renderUnSupportedElement;
415
521
 
416
522
  var getImgStyle = function getImgStyle(i) {
417
523
  var position;
@@ -444,24 +550,24 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
444
550
  var viewUrl = data.viewUrl,
445
551
  name = data.name,
446
552
  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,
553
+ _data$dataId2 = data.dataId,
554
+ dataId = _data$dataId2 === void 0 ? 'attachViewer' : _data$dataId2,
555
+ _data$customClass2 = data.customClass,
556
+ customClass = _data$customClass2 === void 0 ? {} : _data$customClass2,
557
+ _data$customProps2 = data.customProps,
558
+ customProps = _data$customProps2 === void 0 ? {} : _data$customProps2,
453
559
  previewurl = data.previewurl,
454
560
  type = data.type;
455
561
  var _customProps$audioPro = customProps.audioProps,
456
562
  audioProps = _customProps$audioPro === void 0 ? {} : _customProps$audioPro,
457
- _customProps$imagePro = customProps.imageProps,
458
- imageProps = _customProps$imagePro === void 0 ? {} : _customProps$imagePro,
563
+ _customProps$imagePro2 = customProps.imageProps,
564
+ imageProps = _customProps$imagePro2 === void 0 ? {} : _customProps$imagePro2,
459
565
  _customProps$videoPro = customProps.videoProps,
460
566
  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;
567
+ var _customClass$customIm2 = customClass.customImageClass,
568
+ customImageClass = _customClass$customIm2 === void 0 ? '' : _customClass$customIm2,
569
+ _customClass$customCh2 = customClass.customChildrenClass,
570
+ customChildrenClass = _customClass$customCh2 === void 0 ? '' : _customClass$customCh2;
465
571
  var retainZoom = canZoom && selectedIndex == i && maintainZoom;
466
572
  var extension = (0, _Attachment.getExtensionFromFileName)(name);
467
573
  var _i18nKeys$previewUnsu = i18nKeys.previewUnsupportedText,
@@ -478,7 +584,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
478
584
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
479
585
  className: _AttachmentViewerModule["default"].imgRef,
480
586
  id: "imgPreviewRef".concat(i)
481
- }, selectedIndex == i && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _this5.isAudioFileType(name) ? /*#__PURE__*/_react["default"].createElement("audio", _extends({
587
+ }, selectedIndex == i && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _this6.isAudioFileType(name) ? /*#__PURE__*/_react["default"].createElement("audio", _extends({
482
588
  controls: true,
483
589
  className: _AttachmentViewerModule["default"].zoomIn,
484
590
  "data-id": "".concat(dataId, "_audioPreview"),
@@ -486,7 +592,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
486
592
  }, audioProps), /*#__PURE__*/_react["default"].createElement("source", {
487
593
  src: previewurl || viewUrl,
488
594
  type: "audio/".concat(extension)
489
- })) : _this5.isVideoFileType(name) ? /*#__PURE__*/_react["default"].createElement("video", _extends({
595
+ })) : _this6.isVideoFileType(name) ? /*#__PURE__*/_react["default"].createElement("video", _extends({
490
596
  controls: true,
491
597
  className: _AttachmentViewerModule["default"].zoomIn,
492
598
  "data-id": "".concat(dataId, "_videoPreview"),
@@ -494,31 +600,19 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
494
600
  }, videoProps), /*#__PURE__*/_react["default"].createElement("source", {
495
601
  src: viewUrl,
496
602
  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", {
603
+ })) : _this6.isImageFileType(name) || children ? _this6.renderImageFrame(data, i) : type === "document" && previewurl != null ? _this6.renderIframe(previewurl) : typeof renderUnSupportedElement === 'function' ? renderUnSupportedElement(data) : /*#__PURE__*/_react["default"].createElement("div", {
511
604
  className: _AttachmentViewerModule["default"].previewNone
512
605
  }, /*#__PURE__*/_react["default"].createElement("div", {
513
606
  className: _AttachmentViewerModule["default"].fileTypeImg
514
- }, _this5.getPreviewIconData(name, '70')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
607
+ }, _this6.getPreviewIconData(name, '70')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
515
608
  $ui_size: "20",
516
609
  $ui_weight: "semibold"
517
610
  }, previewUnsupportedText), downloadUrl ? /*#__PURE__*/_react["default"].createElement(_Link["default"], {
518
611
  href: downloadUrl,
612
+ download: true,
613
+ downloadName: name,
519
614
  className: _AttachmentViewerModule["default"].downloadLink,
520
- hasReload: true,
521
- download: true
615
+ hasReload: true
522
616
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
523
617
  palette: "primaryFilled",
524
618
  text: downloadText
@@ -528,22 +622,24 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
528
622
  }, {
529
623
  key: "render",
530
624
  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;
540
- var _this$props2 = this.props,
541
- responsiveId = _this$props2.responsiveId,
542
- needDownload = _this$props2.needDownload,
543
- i18nKeys = _this$props2.i18nKeys,
544
- isActive = _this$props2.isActive,
545
- dataId = _this$props2.dataId,
546
- customProps = _this$props2.customProps;
625
+ var _this7 = this;
626
+
627
+ var _this$state5 = this.state,
628
+ isPViewListOpen = _this$state5.isPViewListOpen,
629
+ selectedIndex = _this$state5.selectedIndex,
630
+ data = _this$state5.data,
631
+ isZoomed = _this$state5.isZoomed,
632
+ canZoom = _this$state5.canZoom,
633
+ canOpenInNewTab = _this$state5.canOpenInNewTab;
634
+ var _this$props3 = this.props,
635
+ responsiveId = _this$props3.responsiveId,
636
+ needDownload = _this$props3.needDownload,
637
+ i18nKeys = _this$props3.i18nKeys,
638
+ isActive = _this$props3.isActive,
639
+ dataId = _this$props3.dataId,
640
+ customProps = _this$props3.customProps,
641
+ showCount = _this$props3.showCount,
642
+ renderCustomIcons = _this$props3.renderCustomIcons;
547
643
  var _customProps$avatarPr = customProps.avatarProps,
548
644
  avatarProps = _customProps$avatarPr === void 0 ? {} : _customProps$avatarPr;
549
645
  var totalLen = data.length;
@@ -553,8 +649,8 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
553
649
  var authorHref;
554
650
  var authorName;
555
651
 
556
- var _ref3 = data[selectedIndex] ? data[selectedIndex] : {},
557
- author = _ref3.author;
652
+ var _ref4 = data[selectedIndex] ? data[selectedIndex] : {},
653
+ author = _ref4.author;
558
654
 
559
655
  if (author) {
560
656
  authorHref = author.href;
@@ -569,8 +665,8 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
569
665
  }, /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
570
666
  responsiveId: responsiveId,
571
667
  query: this.responsiveFunc
572
- }, function (_ref4) {
573
- var uptoTablet = _ref4.uptoTablet;
668
+ }, function (_ref5) {
669
+ var uptoTablet = _ref5.uptoTablet;
574
670
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
575
671
  scroll: "none",
576
672
  "data-scroll-palette": "dark"
@@ -585,7 +681,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
585
681
  "data-title": selectedAttachment.name,
586
682
  dataId: "attachName",
587
683
  id: ariaId
588
- }, selectedAttachment.name), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
684
+ }, selectedAttachment.name), showCount && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
589
685
  flexible: true,
590
686
  className: _AttachmentViewerModule["default"].count,
591
687
  dataId: "attachCountContainer"
@@ -597,9 +693,13 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
597
693
  align: uptoTablet ? 'bottom' : 'center',
598
694
  wrap: "wrap",
599
695
  isCover: false
600
- }, canZoom ? isZoomed ? /*#__PURE__*/_react["default"].createElement("div", {
696
+ }, typeof renderCustomIcons === 'function' && renderCustomIcons({
697
+ selectedAttachment: selectedAttachment,
698
+ selectedIndex: selectedIndex,
699
+ totalLen: totalLen
700
+ }), canZoom ? isZoomed ? /*#__PURE__*/_react["default"].createElement("div", {
601
701
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
602
- onClick: _this6.zoomOut.bind(_this6, selectedIndex),
702
+ onClick: _this7.zoomOut.bind(_this7, selectedIndex),
603
703
  "data-id": "zoomOut",
604
704
  "data-test-id": "zoomOut",
605
705
  "data-title": i18nKeys.zoomOutText
@@ -614,7 +714,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
614
714
  })) : /*#__PURE__*/_react["default"].createElement("div", {
615
715
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
616
716
  onClick: function onClick(e) {
617
- return _this6.zoomIn(e, selectedIndex);
717
+ return _this7.zoomIn(e, selectedIndex);
618
718
  },
619
719
  "data-id": "zoomIn",
620
720
  "data-test-id": "zoomIn",
@@ -647,6 +747,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
647
747
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu
648
748
  }, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
649
749
  href: downloadUrl,
750
+ downloadName: selectedAttachment.name,
650
751
  target: "_parent",
651
752
  hasReload: true,
652
753
  download: true,
@@ -663,7 +764,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
663
764
  }
664
765
  }))) : null, /*#__PURE__*/_react["default"].createElement("div", {
665
766
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
666
- onClick: _this6.closeAttachmentViewer,
767
+ onClick: _this7.closeAttachmentViewer,
667
768
  "data-id": "closeAttach",
668
769
  "data-test-id": "closeAttach",
669
770
  "data-title": i18nKeys.closeText
@@ -684,7 +785,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
684
785
  alignBox: "row"
685
786
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
686
787
  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),
788
+ onClick: _this7.changeSelectedIndex.bind(_this7, selectedIndex - 1),
688
789
  "data-title": i18nKeys.previousText,
689
790
  "data-title-position": "left"
690
791
  }, /*#__PURE__*/_react["default"].createElement("button", {
@@ -700,12 +801,12 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
700
801
  tabindex: "0",
701
802
  "aria-describedby": ariaId,
702
803
  isShrink: false,
703
- eleRef: _this6.setImgBoxRef,
804
+ eleRef: _this7.setImgBoxRef,
704
805
  scroll: "both",
705
806
  flexible: true
706
- }, _this6.imgPreviewView(downloadUrl)), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
807
+ }, _this7.imgPreviewView(downloadUrl)), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
707
808
  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),
809
+ onClick: _this7.changeSelectedIndex.bind(_this7, selectedIndex + 1),
709
810
  "data-title": i18nKeys.nextText,
710
811
  "data-title-position": "right"
711
812
  }, /*#__PURE__*/_react["default"].createElement("button", {
@@ -745,7 +846,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
745
846
  alignBox: "row",
746
847
  scroll: "horizontal",
747
848
  eleRef: function eleRef(el) {
748
- return _this6.imgListCont = el;
849
+ return _this7.imgListCont = el;
749
850
  },
750
851
  className: _AttachmentViewerModule["default"].listContainer
751
852
  }, data.map(function (item, index) {
@@ -759,17 +860,17 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
759
860
  _item$customProps = item.customProps,
760
861
  customProps = _item$customProps === void 0 ? {} : _item$customProps;
761
862
  var thumbnail = item.thumbnail;
762
- var isImageFileType = _this6.isImageFileType(name) || thumbnail;
763
- var _customClass$customIm2 = customClass.customImageClass,
764
- customImageClass = _customClass$customIm2 === void 0 ? '' : _customClass$customIm2,
765
- _customClass$customCh2 = customClass.customChildrenClass,
766
- customChildrenClass = _customClass$customCh2 === void 0 ? '' : _customClass$customCh2;
863
+ var isImageFileType = _this7.isImageFileType(name) || thumbnail;
864
+ var _customClass$customIm3 = customClass.customImageClass,
865
+ customImageClass = _customClass$customIm3 === void 0 ? '' : _customClass$customIm3,
866
+ _customClass$customCh3 = customClass.customChildrenClass,
867
+ customChildrenClass = _customClass$customCh3 === void 0 ? '' : _customClass$customCh3;
767
868
  return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
768
869
  className: "".concat(_AttachmentViewerModule["default"].imgItem, " ").concat(index === selectedIndex ? _AttachmentViewerModule["default"].selected : '', " ").concat(isImageFileType ? '' : _AttachmentViewerModule["default"].previewIconDiv),
769
870
  key: index,
770
- onClick: _this6.changeSelectedIndex.bind(_this6, index),
871
+ onClick: _this7.changeSelectedIndex.bind(_this7, index),
771
872
  eleRef: function eleRef(el) {
772
- return _this6["img_".concat(index)] = el;
873
+ return _this7["img_".concat(index)] = el;
773
874
  },
774
875
  dataId: "attachPreviewList",
775
876
  "data-title": name
@@ -782,10 +883,10 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
782
883
  customChildrenClass: "".concat(_AttachmentViewerModule["default"].crsrPointer, " ").concat(customChildrenClass)
783
884
  },
784
885
  dataId: dataId
785
- }, customProps), children) : _this6.getPreviewIconData(name, '40'));
886
+ }, customProps), children) : _this7.getPreviewIconData(name, '40'));
786
887
  }))))), totalLen !== 1 && /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
787
888
  dataId: "attachToggle",
788
- onClick: _this6.togglePViewList,
889
+ onClick: _this7.togglePViewList,
789
890
  iconName: "ZD-GN-hideTab",
790
891
  iconSize: "14",
791
892
  hoverType: "border",
@@ -1,5 +1,5 @@
1
1
  .header {
2
- height: var(--zd_size40) ;
2
+ height: var(--zd_size48) ;
3
3
  position: relative;
4
4
  z-index: 1;
5
5
  padding-block:0 ;
@@ -19,6 +19,7 @@ var AttachmentViewer_defaultProps = {
19
19
  isActive: false,
20
20
  dataId: 'AttachmentViewer',
21
21
  i18nKeys: {},
22
- customProps: {}
22
+ customProps: {},
23
+ showCount: true
23
24
  };
24
25
  exports.AttachmentViewer_defaultProps = AttachmentViewer_defaultProps;
@@ -13,6 +13,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
13
13
 
14
14
  var AttachmentImage_propTypes = {
15
15
  alt: _propTypes["default"].string,
16
+ imageRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].shape({
17
+ current: _propTypes["default"].any
18
+ })]),
16
19
  customClass: _propTypes["default"].shape({
17
20
  customImageClass: _propTypes["default"].string,
18
21
  customChildrenClass: _propTypes["default"].string
@@ -29,6 +32,9 @@ var AttachmentImage_propTypes = {
29
32
  exports.AttachmentImage_propTypes = AttachmentImage_propTypes;
30
33
  var AttachmentViewer_propTypes = {
31
34
  hideAttachmentViewer: _propTypes["default"].func,
35
+ imageRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].shape({
36
+ current: _propTypes["default"].any
37
+ })]),
32
38
  i18nKeys: _propTypes["default"].shape({
33
39
  nextText: _propTypes["default"].string,
34
40
  previousText: _propTypes["default"].string,
@@ -56,6 +62,8 @@ var AttachmentViewer_propTypes = {
56
62
  renderUnSupportedElement: _propTypes["default"].func,
57
63
  customProps: _propTypes["default"].shape({
58
64
  avatarProps: _propTypes["default"].exact(_propTypes2.propTypes)
59
- })
65
+ }),
66
+ showCount: _propTypes["default"].bool,
67
+ renderCustomIcons: _propTypes["default"].func
60
68
  };
61
69
  exports.AttachmentViewer_propTypes = AttachmentViewer_propTypes;
package/lib/Link/Link.js CHANGED
@@ -110,7 +110,8 @@ var Link = /*#__PURE__*/function (_React$Component) {
110
110
  rel = _this$props2.rel,
111
111
  dataId = _this$props2.dataId,
112
112
  customProps = _this$props2.customProps,
113
- ariaLabel = _this$props2.ariaLabel;
113
+ ariaLabel = _this$props2.ariaLabel,
114
+ downloadName = _this$props2.downloadName;
114
115
  var _this$context$options = this.context.options,
115
116
  isLink = _this$context$options.isLink,
116
117
  constructURL = _this$context$options.constructURL;
@@ -118,10 +119,10 @@ var Link = /*#__PURE__*/function (_React$Component) {
118
119
  var option = {};
119
120
 
120
121
  if (download) {
121
- option.download = true;
122
+ option.download = downloadName || true;
122
123
  }
123
124
 
124
- var ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
125
+ var ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'downloadName', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
125
126
  var others = Object.keys(this.props).filter(function (key) {
126
127
  return ignoreKeys.indexOf(key) == -1;
127
128
  }).reduce(function (res, key) {
@@ -23,6 +23,7 @@ var propTypes = {
23
23
  customProps: _propTypes["default"].object,
24
24
  onClick: _propTypes["default"].func,
25
25
  download: _propTypes["default"].bool,
26
+ downloadName: _propTypes["default"].string,
26
27
  ariaLabel: _propTypes["default"].string,
27
28
  key: _propTypes["default"].string
28
29
  };
@@ -40,6 +40,4 @@
40
40
  --zd_bs_onboarding_close_icon: var(--zd_bs_contrast_outline, 0px 2px 15px var(--zd-shadow-saturation, rgba(0, 0, 0, 0.09)));
41
41
  --zd_bs_onboarding_gradient: var(--zd_bs_contrast_outline, 0px 20px 30px 0px var(--zdt_onboarding_bg_box_shadow));
42
42
  --zd_bs_onboarding_primary_button: var(--zd_bs_contrast_outline, 0px 4px 20px 0px var(--zdt_onboarding_primary_button_shadow));
43
- /* status dropdown */
44
- --zd_bs_statusdropdown_wrapper_container: var(--zd_bs_contrast_outline, 3px 3px 26px 0 var(--zdt_texteditor_menu_after_box_shadow));
45
43
  }
@@ -145,8 +145,7 @@ var SelectField = /*#__PURE__*/function (_PureComponent) {
145
145
  onFocus = _this$props3.onFocus,
146
146
  iconOnHover = _this$props3.iconOnHover,
147
147
  customProps = _this$props3.customProps,
148
- renderLabelProps = _this$props3.renderLabelProps,
149
- renderCustomDropBoxHeader = _this$props3.renderCustomDropBoxHeader;
148
+ renderLabelProps = _this$props3.renderLabelProps;
150
149
  var _customProps$LabelPro = customProps.LabelProps,
151
150
  LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
152
151
  _customProps$SelectPr = customProps.SelectProps,
@@ -217,8 +216,7 @@ var SelectField = /*#__PURE__*/function (_PureComponent) {
217
216
  iconOnHover: iconOnHover,
218
217
  title: title
219
218
  }, SelectProps, {
220
- ariaLabelledby: uniqueId,
221
- renderCustomDropBoxHeader: renderCustomDropBoxHeader
219
+ ariaLabelledby: uniqueId
222
220
  }), children ? children : null)), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
223
221
  text: validationMessage,
224
222
  palette: validationPalette,
@@ -27,7 +27,6 @@ var defaultProps = _objectSpread({
27
27
  isDefaultSelectValue: true,
28
28
  placeHolder: '',
29
29
  customProps: {},
30
- renderCustomDropBoxHeader: null,
31
30
  dataSelectorId: 'selectField'
32
31
  }, (0, _FieldCommonDefaultProps.FieldCommonDefaultProps)());
33
32
 
@@ -62,7 +62,6 @@ var propTypes = _objectSpread({
62
62
  ValidationMessageProps1: _propTypes["default"].object,
63
63
  ValidationMessageProps2: _propTypes["default"].object
64
64
  }),
65
- renderCustomDropBoxHeader: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node]),
66
65
  htmlId: _propTypes["default"].string
67
66
  }, _FieldCommonPropTypes.FieldCommonPropTypes);
68
67