@zohodesk/dot 1.0.0-temp-229 → 1.0.0-temp-230

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 (33) hide show
  1. package/README.md +8 -0
  2. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +0 -2
  3. package/assets/Appearance/light/mode/Dot_LightMode.module.css +0 -2
  4. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +0 -2
  5. package/es/AttachmentViewer/AttachmentViewer.js +57 -7
  6. package/es/AttachmentViewer/AttachmentViewer.module.css +1 -1
  7. package/es/AttachmentViewer/props/defaultProps.js +2 -1
  8. package/es/AttachmentViewer/props/propTypes.js +3 -1
  9. package/es/DotProvider/props/defaultProps.js +1 -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/propTypes.js +0 -1
  15. package/es/list/status/StatusDropdown/StatusDropdown.js +79 -121
  16. package/es/list/status/StatusDropdown/StatusDropdown.module.css +7 -54
  17. package/es/list/status/StatusDropdown/props/defaultProps.js +1 -2
  18. package/es/list/status/StatusDropdown/props/propTypes.js +0 -1
  19. package/lib/AttachmentViewer/AttachmentViewer.js +94 -37
  20. package/lib/AttachmentViewer/AttachmentViewer.module.css +1 -1
  21. package/lib/AttachmentViewer/props/defaultProps.js +2 -1
  22. package/lib/AttachmentViewer/props/propTypes.js +3 -1
  23. package/lib/DotProvider/props/defaultProps.js +2 -2
  24. package/lib/Link/Link.js +4 -3
  25. package/lib/Link/props/propTypes.js +1 -0
  26. package/lib/common/dot_boxShadow.module.css +0 -2
  27. package/lib/form/fields/SelectField/SelectField.js +2 -4
  28. package/lib/form/fields/SelectField/props/propTypes.js +0 -1
  29. package/lib/list/status/StatusDropdown/StatusDropdown.js +81 -133
  30. package/lib/list/status/StatusDropdown/StatusDropdown.module.css +7 -54
  31. package/lib/list/status/StatusDropdown/props/defaultProps.js +1 -2
  32. package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
  33. package/package.json +2 -2
@@ -19,6 +19,5 @@ export const defaultProps = {
19
19
  isFetchingOptions: false,
20
20
  isAbsolutePositioningNeeded: true,
21
21
  isRestrictScroll: false,
22
- customClass: {},
23
- renderSuggestedStatus: null
22
+ customClass: {}
24
23
  };
@@ -56,7 +56,6 @@ export const propTypes = {
56
56
  positionsOffset: PropTypes.object,
57
57
  renderTargetElement: PropTypes.func,
58
58
  renderFooterElement: PropTypes.node,
59
- renderSuggestedStatus: PropTypes.node,
60
59
  targetOffset: PropTypes.object,
61
60
  customClass: PropTypes.shape({
62
61
  dropBoxClass: PropTypes.string
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -63,6 +61,14 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
63
61
 
64
62
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
65
63
 
64
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
65
+
66
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
67
+
68
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
69
+
70
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
71
+
66
72
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
67
73
 
68
74
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -121,10 +127,50 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
121
127
  _this.handleMenuValidation = _this.handleMenuValidation.bind(_assertThisInitialized(_this));
122
128
  _this.getPreviewIconData = _this.getPreviewIconData.bind(_assertThisInitialized(_this));
123
129
  _this.renderIframe = _this.renderIframe.bind(_assertThisInitialized(_this));
130
+ _this.updateItem = _this.updateItem.bind(_assertThisInitialized(_this));
124
131
  return _this;
125
132
  }
126
133
 
127
134
  _createClass(AttachmentViewer, [{
135
+ key: "updateItem",
136
+ value: function updateItem(idOrIndex, changes) {
137
+ var _this2 = this;
138
+
139
+ if (!changes || _typeof(changes) !== 'object') {
140
+ return false;
141
+ }
142
+
143
+ var data = this.state.data;
144
+ var targetIdx = typeof idOrIndex === 'number' ? idOrIndex : data.findIndex(function (item) {
145
+ return item && item.id === idOrIndex;
146
+ });
147
+
148
+ if (targetIdx < 0 || targetIdx >= data.length) {
149
+ return false;
150
+ }
151
+
152
+ this.setState(function (prevState) {
153
+ var nextData = prevState.data.slice();
154
+ nextData[targetIdx] = _objectSpread(_objectSpread({}, nextData[targetIdx]), changes);
155
+ var nextDataList = prevState.dataList;
156
+
157
+ if (targetIdx < prevState.dataList.length) {
158
+ nextDataList = prevState.dataList.slice();
159
+ nextDataList[targetIdx] = _objectSpread(_objectSpread({}, nextDataList[targetIdx]), changes);
160
+ }
161
+
162
+ return {
163
+ data: nextData,
164
+ dataList: nextDataList
165
+ };
166
+ }, function () {
167
+ if (_this2.state.selectedIndex === targetIdx) {
168
+ _this2.handleMenuValidation();
169
+ }
170
+ });
171
+ return true;
172
+ }
173
+ }, {
128
174
  key: "isImageFileType",
129
175
  value: function isImageFileType(fileName) {
130
176
  var extension = ((0, _Attachment.getExtensionFromFileName)(fileName) || '').toLowerCase();
@@ -159,11 +205,14 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
159
205
  }, {
160
206
  key: "componentDidUpdate",
161
207
  value: function componentDidUpdate(prevProps, prevState) {
208
+ var _previewObj$previewDa, _prevState$data$;
209
+
162
210
  var previewObj = this.props.previewObj;
163
211
  var selectedIndex = this.state.selectedIndex;
164
212
  var indexChanged = previewObj.selectedIndex != prevProps.previewObj.selectedIndex;
213
+ 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
214
 
166
- if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged) {
215
+ if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged || attachmentPreviewUrlChanged) {
167
216
  var objChanged = previewObj.previewData.some(function (value, index) {
168
217
  return (0, _General.shallowDiff)(value, prevProps.previewObj[index]);
169
218
  });
@@ -182,14 +231,14 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
182
231
  }
183
232
  }
184
233
 
185
- if (prevState.selectedIndex != selectedIndex) {
234
+ if (prevState.selectedIndex != selectedIndex || attachmentPreviewUrlChanged) {
186
235
  this.handleMenuValidation();
187
236
  }
188
237
  }
189
238
  }, {
190
239
  key: "handleMenuValidation",
191
240
  value: function handleMenuValidation() {
192
- var _this2 = this;
241
+ var _this3 = this;
193
242
 
194
243
  var _this$state = this.state,
195
244
  data = _this$state.data,
@@ -209,7 +258,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
209
258
  var isViewURLValid = fileSourceValidation.isViewURLValid,
210
259
  canZoom = fileSourceValidation.canZoom;
211
260
 
212
- _this2.setState({
261
+ _this3.setState({
213
262
  isPreviewAttachmentValid: isViewURLValid,
214
263
  canZoom: canZoom,
215
264
  canOpenInNewTab: isViewURLValid
@@ -219,14 +268,14 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
219
268
  }, {
220
269
  key: "togglePViewList",
221
270
  value: function togglePViewList() {
222
- var _this3 = this;
271
+ var _this4 = this;
223
272
 
224
273
  this.setState(function (prevState) {
225
274
  return {
226
275
  isPViewListOpen: !prevState.isPViewListOpen
227
276
  };
228
277
  }, function () {
229
- _this3.focusSelectedImg(_this3.state.selectedIndex);
278
+ _this4.focusSelectedImg(_this4.state.selectedIndex);
230
279
  });
231
280
  }
232
281
  }, {
@@ -320,7 +369,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
320
369
  }, {
321
370
  key: "changeSelectedIndex",
322
371
  value: function changeSelectedIndex(index) {
323
- var _this4 = this;
372
+ var _this5 = this;
324
373
 
325
374
  var _this$state2 = this.state,
326
375
  data = _this$state2.data,
@@ -335,7 +384,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
335
384
  this.setState({
336
385
  selectedIndex: index
337
386
  }, function () {
338
- _this4.focusSelectedImg(index);
387
+ _this5.focusSelectedImg(index);
339
388
  });
340
389
  }
341
390
  }, {
@@ -399,7 +448,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
399
448
  }, {
400
449
  key: "imgPreviewView",
401
450
  value: function imgPreviewView(downloadUrl) {
402
- var _this5 = this;
451
+ var _this6 = this;
403
452
 
404
453
  var _this$state3 = this.state,
405
454
  dataList = _this$state3.dataList,
@@ -478,7 +527,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
478
527
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
479
528
  className: _AttachmentViewerModule["default"].imgRef,
480
529
  id: "imgPreviewRef".concat(i)
481
- }, selectedIndex == i && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _this5.isAudioFileType(name) ? /*#__PURE__*/_react["default"].createElement("audio", _extends({
530
+ }, selectedIndex == i && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _this6.isAudioFileType(name) ? /*#__PURE__*/_react["default"].createElement("audio", _extends({
482
531
  controls: true,
483
532
  className: _AttachmentViewerModule["default"].zoomIn,
484
533
  "data-id": "".concat(dataId, "_audioPreview"),
@@ -486,7 +535,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
486
535
  }, audioProps), /*#__PURE__*/_react["default"].createElement("source", {
487
536
  src: previewurl || viewUrl,
488
537
  type: "audio/".concat(extension)
489
- })) : _this5.isVideoFileType(name) ? /*#__PURE__*/_react["default"].createElement("video", _extends({
538
+ })) : _this6.isVideoFileType(name) ? /*#__PURE__*/_react["default"].createElement("video", _extends({
490
539
  controls: true,
491
540
  className: _AttachmentViewerModule["default"].zoomIn,
492
541
  "data-id": "".concat(dataId, "_videoPreview"),
@@ -494,31 +543,32 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
494
543
  }, videoProps), /*#__PURE__*/_react["default"].createElement("source", {
495
544
  src: viewUrl,
496
545
  type: "video/".concat(extension)
497
- })) : _this5.isImageFileType(name) || children ? /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
546
+ })) : _this6.isImageFileType(name) || children ? /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
498
547
  customClass: {
499
548
  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
549
  customChildrenClass: customChildrenClass
501
550
  },
502
551
  src: viewUrl,
503
- onClick: isPreviewAttachmentValid ? isZoomed ? _this5.zoomOut.bind(_this5, i) : function (e) {
504
- return _this5.zoomIn(e, i, true);
552
+ onClick: isPreviewAttachmentValid ? isZoomed ? _this6.zoomOut.bind(_this6, i) : function (e) {
553
+ return _this6.zoomIn(e, i, true);
505
554
  } : undefined,
506
555
  alt: name,
507
556
  dataId: dataId,
508
557
  id: "img".concat(i),
509
558
  isCover: false
510
- }, imageProps), children) : type === "document" && previewurl != null ? _this5.renderIframe(previewurl) : typeof renderUnSupportedElement === 'function' ? renderUnSupportedElement(data) : /*#__PURE__*/_react["default"].createElement("div", {
559
+ }, imageProps), children) : type === "document" && previewurl != null ? _this6.renderIframe(previewurl) : typeof renderUnSupportedElement === 'function' ? renderUnSupportedElement(data) : /*#__PURE__*/_react["default"].createElement("div", {
511
560
  className: _AttachmentViewerModule["default"].previewNone
512
561
  }, /*#__PURE__*/_react["default"].createElement("div", {
513
562
  className: _AttachmentViewerModule["default"].fileTypeImg
514
- }, _this5.getPreviewIconData(name, '70')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
563
+ }, _this6.getPreviewIconData(name, '70')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
515
564
  $ui_size: "20",
516
565
  $ui_weight: "semibold"
517
566
  }, previewUnsupportedText), downloadUrl ? /*#__PURE__*/_react["default"].createElement(_Link["default"], {
518
567
  href: downloadUrl,
568
+ download: true,
569
+ downloadName: name,
519
570
  className: _AttachmentViewerModule["default"].downloadLink,
520
- hasReload: true,
521
- download: true
571
+ hasReload: true
522
572
  }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
523
573
  palette: "primaryFilled",
524
574
  text: downloadText
@@ -528,7 +578,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
528
578
  }, {
529
579
  key: "render",
530
580
  value: function render() {
531
- var _this6 = this;
581
+ var _this7 = this;
532
582
 
533
583
  var _this$state4 = this.state,
534
584
  isPViewListOpen = _this$state4.isPViewListOpen,
@@ -543,7 +593,9 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
543
593
  i18nKeys = _this$props2.i18nKeys,
544
594
  isActive = _this$props2.isActive,
545
595
  dataId = _this$props2.dataId,
546
- customProps = _this$props2.customProps;
596
+ customProps = _this$props2.customProps,
597
+ showCount = _this$props2.showCount,
598
+ renderCustomIcons = _this$props2.renderCustomIcons;
547
599
  var _customProps$avatarPr = customProps.avatarProps,
548
600
  avatarProps = _customProps$avatarPr === void 0 ? {} : _customProps$avatarPr;
549
601
  var totalLen = data.length;
@@ -585,7 +637,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
585
637
  "data-title": selectedAttachment.name,
586
638
  dataId: "attachName",
587
639
  id: ariaId
588
- }, selectedAttachment.name), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
640
+ }, selectedAttachment.name), showCount && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
589
641
  flexible: true,
590
642
  className: _AttachmentViewerModule["default"].count,
591
643
  dataId: "attachCountContainer"
@@ -597,9 +649,13 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
597
649
  align: uptoTablet ? 'bottom' : 'center',
598
650
  wrap: "wrap",
599
651
  isCover: false
600
- }, canZoom ? isZoomed ? /*#__PURE__*/_react["default"].createElement("div", {
652
+ }, typeof renderCustomIcons === 'function' && renderCustomIcons({
653
+ selectedAttachment: selectedAttachment,
654
+ selectedIndex: selectedIndex,
655
+ totalLen: totalLen
656
+ }), canZoom ? isZoomed ? /*#__PURE__*/_react["default"].createElement("div", {
601
657
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
602
- onClick: _this6.zoomOut.bind(_this6, selectedIndex),
658
+ onClick: _this7.zoomOut.bind(_this7, selectedIndex),
603
659
  "data-id": "zoomOut",
604
660
  "data-test-id": "zoomOut",
605
661
  "data-title": i18nKeys.zoomOutText
@@ -614,7 +670,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
614
670
  })) : /*#__PURE__*/_react["default"].createElement("div", {
615
671
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
616
672
  onClick: function onClick(e) {
617
- return _this6.zoomIn(e, selectedIndex);
673
+ return _this7.zoomIn(e, selectedIndex);
618
674
  },
619
675
  "data-id": "zoomIn",
620
676
  "data-test-id": "zoomIn",
@@ -647,6 +703,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
647
703
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu
648
704
  }, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
649
705
  href: downloadUrl,
706
+ downloadName: selectedAttachment.name,
650
707
  target: "_parent",
651
708
  hasReload: true,
652
709
  download: true,
@@ -663,7 +720,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
663
720
  }
664
721
  }))) : null, /*#__PURE__*/_react["default"].createElement("div", {
665
722
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
666
- onClick: _this6.closeAttachmentViewer,
723
+ onClick: _this7.closeAttachmentViewer,
667
724
  "data-id": "closeAttach",
668
725
  "data-test-id": "closeAttach",
669
726
  "data-title": i18nKeys.closeText
@@ -684,7 +741,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
684
741
  alignBox: "row"
685
742
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
686
743
  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),
744
+ onClick: _this7.changeSelectedIndex.bind(_this7, selectedIndex - 1),
688
745
  "data-title": i18nKeys.previousText,
689
746
  "data-title-position": "left"
690
747
  }, /*#__PURE__*/_react["default"].createElement("button", {
@@ -700,12 +757,12 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
700
757
  tabindex: "0",
701
758
  "aria-describedby": ariaId,
702
759
  isShrink: false,
703
- eleRef: _this6.setImgBoxRef,
760
+ eleRef: _this7.setImgBoxRef,
704
761
  scroll: "both",
705
762
  flexible: true
706
- }, _this6.imgPreviewView(downloadUrl)), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
763
+ }, _this7.imgPreviewView(downloadUrl)), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
707
764
  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),
765
+ onClick: _this7.changeSelectedIndex.bind(_this7, selectedIndex + 1),
709
766
  "data-title": i18nKeys.nextText,
710
767
  "data-title-position": "right"
711
768
  }, /*#__PURE__*/_react["default"].createElement("button", {
@@ -745,7 +802,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
745
802
  alignBox: "row",
746
803
  scroll: "horizontal",
747
804
  eleRef: function eleRef(el) {
748
- return _this6.imgListCont = el;
805
+ return _this7.imgListCont = el;
749
806
  },
750
807
  className: _AttachmentViewerModule["default"].listContainer
751
808
  }, data.map(function (item, index) {
@@ -759,7 +816,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
759
816
  _item$customProps = item.customProps,
760
817
  customProps = _item$customProps === void 0 ? {} : _item$customProps;
761
818
  var thumbnail = item.thumbnail;
762
- var isImageFileType = _this6.isImageFileType(name) || thumbnail;
819
+ var isImageFileType = _this7.isImageFileType(name) || thumbnail;
763
820
  var _customClass$customIm2 = customClass.customImageClass,
764
821
  customImageClass = _customClass$customIm2 === void 0 ? '' : _customClass$customIm2,
765
822
  _customClass$customCh2 = customClass.customChildrenClass,
@@ -767,9 +824,9 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
767
824
  return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
768
825
  className: "".concat(_AttachmentViewerModule["default"].imgItem, " ").concat(index === selectedIndex ? _AttachmentViewerModule["default"].selected : '', " ").concat(isImageFileType ? '' : _AttachmentViewerModule["default"].previewIconDiv),
769
826
  key: index,
770
- onClick: _this6.changeSelectedIndex.bind(_this6, index),
827
+ onClick: _this7.changeSelectedIndex.bind(_this7, index),
771
828
  eleRef: function eleRef(el) {
772
- return _this6["img_".concat(index)] = el;
829
+ return _this7["img_".concat(index)] = el;
773
830
  },
774
831
  dataId: "attachPreviewList",
775
832
  "data-title": name
@@ -782,10 +839,10 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
782
839
  customChildrenClass: "".concat(_AttachmentViewerModule["default"].crsrPointer, " ").concat(customChildrenClass)
783
840
  },
784
841
  dataId: dataId
785
- }, customProps), children) : _this6.getPreviewIconData(name, '40'));
842
+ }, customProps), children) : _this7.getPreviewIconData(name, '40'));
786
843
  }))))), totalLen !== 1 && /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
787
844
  dataId: "attachToggle",
788
- onClick: _this6.togglePViewList,
845
+ onClick: _this7.togglePViewList,
789
846
  iconName: "ZD-GN-hideTab",
790
847
  iconSize: "14",
791
848
  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;
@@ -56,6 +56,8 @@ var AttachmentViewer_propTypes = {
56
56
  renderUnSupportedElement: _propTypes["default"].func,
57
57
  customProps: _propTypes["default"].shape({
58
58
  avatarProps: _propTypes["default"].exact(_propTypes2.propTypes)
59
- })
59
+ }),
60
+ showCount: _propTypes["default"].bool,
61
+ renderCustomIcons: _propTypes["default"].func
60
62
  };
61
63
  exports.AttachmentViewer_propTypes = AttachmentViewer_propTypes;
@@ -7,7 +7,7 @@ exports.defaultProps = void 0;
7
7
 
8
8
  var _constants = require("../utils/constants");
9
9
 
10
- var _utils = require("@zohodesk/utils");
10
+ var _constant = require("@zohodesk/utils/es/constantProps/constant");
11
11
 
12
12
  var defaultProps = {
13
13
  themeAppearance: _constants.THEME_APPEARANCE_LIGHT,
@@ -16,7 +16,7 @@ var defaultProps = {
16
16
  baseFontUnit: '16px',
17
17
  zoomUnitVariable: '--zd_baseUnit',
18
18
  fontUnitVariable: '--zd_baseFontUnit',
19
- excludeFeatures: _utils.DUMMY_ARRAY,
19
+ excludeFeatures: _constant.DUMMY_ARRAY,
20
20
  themeAppearanceAttr: 'data-mode',
21
21
  themeColorAttr: 'data-theme'
22
22
  };
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
- renderSuggestedStatus = _this$props3.renderSuggestedStatus;
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
- renderSuggestedStatus: renderSuggestedStatus
219
+ ariaLabelledby: uniqueId
222
220
  }), children ? children : null)), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
223
221
  text: validationMessage,
224
222
  palette: validationPalette,
@@ -62,7 +62,6 @@ var propTypes = _objectSpread({
62
62
  ValidationMessageProps1: _propTypes["default"].object,
63
63
  ValidationMessageProps2: _propTypes["default"].object
64
64
  }),
65
- renderSuggestedStatus: _propTypes["default"].node,
66
65
  htmlId: _propTypes["default"].string
67
66
  }, _FieldCommonPropTypes.FieldCommonPropTypes);
68
67