@zohodesk/dot 1.9.12 → 1.9.13

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 (58) hide show
  1. package/README.md +14 -0
  2. package/es/ActionButton/__tests__/ActionButton.spec.js +4 -5
  3. package/es/AttachmentViewer/AttachmentImage.js +3 -1
  4. package/es/AttachmentViewer/AttachmentViewer.js +340 -273
  5. package/es/AttachmentViewer/AttachmentViewer.module.css +8 -15
  6. package/es/AttachmentViewer/__tests__/AttachmentViewer.spec.js +104 -100
  7. package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
  8. package/es/AttachmentViewer/props/defaultProps.js +4 -2
  9. package/es/AttachmentViewer/props/propTypes.js +9 -2
  10. package/es/AttachmentViewer/utils.js +6 -7
  11. package/es/AudioPlayer/utils/utils.js +2 -5
  12. package/es/DotProvider/hooks/useDotProvider.js +14 -15
  13. package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +12 -13
  14. package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +3 -4
  15. package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +4 -5
  16. package/es/DotProvider/utils/errorValidation.js +5 -6
  17. package/es/DotProvider/utils/getAssetsImportPromises.js +4 -5
  18. package/es/Drawer/Drawer.js +6 -8
  19. package/es/FreezeLayer/css/cssJSLogic.js +4 -5
  20. package/es/Hooks/Dragger/useDragger.js +5 -6
  21. package/es/Hooks/Dragger/utils/DraggerUtil.js +7 -8
  22. package/es/Hooks/useFreezeLayer.js +4 -5
  23. package/es/Link/Link.js +4 -3
  24. package/es/Link/props/propTypes.js +1 -0
  25. package/es/Onboarding/CarouselDots/CarouselDots.js +29 -32
  26. package/es/Onboarding/Onboarding.js +23 -24
  27. package/es/Onboarding/hooks/useOnboarding.js +4 -5
  28. package/es/Onboarding/hooks/useOnboardingSlider.js +5 -6
  29. package/es/deprecated/SelectDropdown/SelectDropdown.js +43 -47
  30. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +214 -225
  31. package/es/errorstate/Inconvenience/Inconvenience.js +32 -36
  32. package/es/errorstate/NoRequestFound/NoRequestFound.js +32 -36
  33. package/es/errorstate/PermissionPlay/PermissionPlay.js +31 -35
  34. package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +32 -36
  35. package/es/errorstate/UnableToProcess/UnableToProcess.js +32 -36
  36. package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +32 -36
  37. package/es/errorstate/WillBack/WillBack.js +30 -34
  38. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +81 -85
  39. package/es/list/status/StatusDropdown/StatusDropdown.js +109 -113
  40. package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +3 -4
  41. package/es/lookup/header/Search/Search.js +4 -5
  42. package/es/lookup/header/Search/__tests__/Search.spec.js +3 -4
  43. package/es/lookup/header/ViewDropDown/ViewDropDown.js +67 -75
  44. package/es/utils/General.js +2 -7
  45. package/es/utils/editorUtils.js +1 -5
  46. package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +4 -5
  47. package/es/version2/notification/DesktopNotification/DesktopNotification.js +59 -63
  48. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +40 -44
  49. package/lib/AttachmentViewer/AttachmentImage.js +3 -1
  50. package/lib/AttachmentViewer/AttachmentViewer.js +158 -82
  51. package/lib/AttachmentViewer/AttachmentViewer.module.css +8 -15
  52. package/lib/AttachmentViewer/__tests__/AttachmentViewer.spec.js +100 -100
  53. package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
  54. package/lib/AttachmentViewer/props/defaultProps.js +6 -2
  55. package/lib/AttachmentViewer/props/propTypes.js +9 -2
  56. package/lib/Link/Link.js +4 -3
  57. package/lib/Link/props/propTypes.js +1 -0
  58. package/package.json +4 -4
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.AttachmentViewer_defaultProps = exports.AttachmentImage_defaultProps = void 0;
7
+
8
+ var _General = require("../../utils/General");
9
+
7
10
  var AttachmentImage_defaultProps = {
8
11
  dataId: 'AttachmentImage',
9
12
  customClass: {
@@ -18,7 +21,8 @@ var AttachmentViewer_defaultProps = {
18
21
  maintainZoom: false,
19
22
  isActive: false,
20
23
  dataId: 'AttachmentViewer',
21
- i18nKeys: {},
22
- customProps: {}
24
+ i18nKeys: _General.DUMMY_OBJECT,
25
+ customProps: _General.DUMMY_OBJECT,
26
+ hasCount: true
23
27
  };
24
28
  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
@@ -41,7 +44,7 @@ var AttachmentViewer_propTypes = {
41
44
  showText: _propTypes["default"].string,
42
45
  previewUnsupportedText: _propTypes["default"].string
43
46
  }),
44
- needDownload: _propTypes["default"].string,
47
+ needDownload: _propTypes["default"].bool,
45
48
  previewObj: _propTypes["default"].object,
46
49
  responsiveId: _propTypes["default"].string,
47
50
  maintainZoom: _propTypes["default"].bool,
@@ -54,8 +57,12 @@ var AttachmentViewer_propTypes = {
54
57
  document: _propTypes["default"].arrayOf(_propTypes["default"].string)
55
58
  }),
56
59
  renderUnSupportedElement: _propTypes["default"].func,
60
+ renderCustomImagePreviewElement: _propTypes["default"].func,
57
61
  customProps: _propTypes["default"].shape({
58
62
  avatarProps: _propTypes["default"].exact(_propTypes2.propTypes)
59
- })
63
+ }),
64
+ hasCount: _propTypes["default"].bool,
65
+ renderCustomIcons: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node]),
66
+ onSelectedAttachmentChange: _propTypes["default"].func
60
67
  };
61
68
  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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/dot",
3
- "version": "1.9.12",
3
+ "version": "1.9.13",
4
4
  "main": "lib/index",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -70,8 +70,8 @@
70
70
  "@zohodesk-private/node-plugins": "1.1.14",
71
71
  "@zohodesk-private/react-prop-validator": "1.2.3",
72
72
  "@zohodesk/a11y": "2.3.9",
73
- "@zohodesk/client_build_tool": "0.0.20",
74
- "@zohodesk/components": "1.6.13",
73
+ "@zohodesk/client_build_tool": "0.0.23",
74
+ "@zohodesk/components": "1.6.16",
75
75
  "@zohodesk/dotkit": "1.0.9",
76
76
  "@zohodesk/hooks": "2.0.8",
77
77
  "@zohodesk/icons": "1.3.3",
@@ -89,7 +89,7 @@
89
89
  "peerDependencies": {
90
90
  "velocity-react": "1.4.3",
91
91
  "@zohodesk/variables": "1.3.1",
92
- "@zohodesk/components": "1.6.13",
92
+ "@zohodesk/components": "1.6.16",
93
93
  "@zohodesk/icons": "1.3.3",
94
94
  "@zohodesk/svg": "1.3.5",
95
95
  "@zohodesk/virtualizer": "1.0.13",