@zohodesk/dot 1.0.0-temp-191 → 1.0.0-temp-189.1

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 (126) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/es/ActionButton/ActionButton.js +2 -4
  3. package/es/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +2 -2
  4. package/es/Attachment/Attachment.js +1 -2
  5. package/es/AttachmentViewer/AttachmentViewer.js +6 -13
  6. package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +2 -4
  7. package/es/AttachmentViewer/props/defaultProps.js +1 -2
  8. package/es/AttachmentViewer/props/propTypes.js +1 -2
  9. package/es/ChannelIcon/ChannelIcon.js +0 -1
  10. package/es/MessageBanner/MessageBanner.js +3 -5
  11. package/es/alert/AlertHeader/AlertHeader.js +1 -2
  12. package/es/alert/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +2 -2
  13. package/es/avatar/AvatarClose/AvatarClose.js +2 -7
  14. package/es/avatar/AvatarClose/__tests__/__snapshots__/AvatarClose.spec.js.snap +0 -2
  15. package/es/avatar/AvatarClose/props/defaultProps.js +1 -2
  16. package/es/avatar/AvatarClose/props/propTypes.js +1 -2
  17. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +0 -2
  18. package/es/list/Subject/Subject.js +7 -3
  19. package/es/list/Subject/Subject.module.css +20 -0
  20. package/es/list/Subject/__tests__/Subject.spec.js +9 -0
  21. package/es/list/Subject/__tests__/__snapshots__/Subject.spec.js.snap +38 -1
  22. package/es/list/Subject/props/defaultProps.js +2 -1
  23. package/es/list/Subject/props/propTypes.js +2 -1
  24. package/es/list/status/StatusDropdown/StatusDropdown.js +1 -3
  25. package/es/lookup/header/ViewDropDown/ViewDropDown.js +5 -11
  26. package/es/lookup/header/ViewDropDown/__test__/__snapshots__/ViewDropDown.spec.js.snap +0 -2
  27. package/es/lookup/header/ViewDropDown/props/defaultProps.js +1 -2
  28. package/es/lookup/header/ViewDropDown/props/propTypes.js +0 -1
  29. package/es/setup/header/Search/Search.js +3 -8
  30. package/es/setup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +0 -2
  31. package/es/setup/header/Search/props/defaultProps.js +1 -2
  32. package/es/setup/header/Search/props/propTypes.js +1 -2
  33. package/es/v1/ActionButton/ActionButton.js +2 -4
  34. package/es/v1/Attachment/Attachment.js +1 -2
  35. package/es/v1/AttachmentViewer/AttachmentViewer.js +6 -13
  36. package/es/v1/AttachmentViewer/props/defaultProps.js +1 -2
  37. package/es/v1/AttachmentViewer/props/propTypes.js +1 -2
  38. package/es/v1/ChannelIcon/ChannelIcon.js +0 -1
  39. package/es/v1/MessageBanner/MessageBanner.js +2 -4
  40. package/es/v1/alert/AlertHeader/AlertHeader.js +1 -2
  41. package/es/v1/avatar/AvatarClose/AvatarClose.js +2 -7
  42. package/es/v1/avatar/AvatarClose/props/defaultProps.js +1 -2
  43. package/es/v1/avatar/AvatarClose/props/propTypes.js +1 -2
  44. package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +0 -2
  45. package/es/v1/errorstate/Inconvenience/Inconvenience.js +1 -2
  46. package/es/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -2
  47. package/es/v1/errorstate/UrlNotFound/UrlNotFound.js +1 -2
  48. package/es/v1/errorstate/WillBeRightBack/WillBeRightBack.js +1 -2
  49. package/es/v1/list/Subject/Subject.js +7 -3
  50. package/es/v1/list/Subject/props/defaultProps.js +2 -1
  51. package/es/v1/list/Subject/props/propTypes.js +2 -1
  52. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +1 -3
  53. package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +5 -11
  54. package/es/v1/lookup/header/ViewDropDown/props/defaultProps.js +1 -2
  55. package/es/v1/lookup/header/ViewDropDown/props/propTypes.js +0 -1
  56. package/es/v1/setup/header/Search/Search.js +3 -8
  57. package/es/v1/setup/header/Search/props/defaultProps.js +1 -2
  58. package/es/v1/setup/header/Search/props/propTypes.js +1 -2
  59. package/es/version2/errorstate/Inconvenience/Inconvenience.js +1 -2
  60. package/es/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -2
  61. package/es/version2/errorstate/UrlNotFound/UrlNotFound.js +1 -2
  62. package/es/version2/errorstate/WillBeRightBack/WillBeRightBack.js +1 -2
  63. package/lib/ActionButton/ActionButton.js +2 -4
  64. package/lib/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +2 -2
  65. package/lib/Attachment/Attachment.js +1 -2
  66. package/lib/AttachmentViewer/AttachmentViewer.js +10 -18
  67. package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +2 -4
  68. package/lib/AttachmentViewer/props/defaultProps.js +1 -2
  69. package/lib/AttachmentViewer/props/propTypes.js +1 -2
  70. package/lib/ChannelIcon/ChannelIcon.js +0 -1
  71. package/lib/MessageBanner/MessageBanner.js +3 -5
  72. package/lib/alert/AlertHeader/AlertHeader.js +1 -2
  73. package/lib/alert/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +2 -2
  74. package/lib/avatar/AvatarClose/AvatarClose.js +3 -8
  75. package/lib/avatar/AvatarClose/__tests__/__snapshots__/AvatarClose.spec.js.snap +0 -2
  76. package/lib/avatar/AvatarClose/props/defaultProps.js +1 -2
  77. package/lib/avatar/AvatarClose/props/propTypes.js +1 -2
  78. package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +1 -3
  79. package/lib/list/Subject/Subject.js +9 -5
  80. package/lib/list/Subject/Subject.module.css +20 -0
  81. package/lib/list/Subject/__tests__/Subject.spec.js +9 -0
  82. package/lib/list/Subject/__tests__/__snapshots__/Subject.spec.js.snap +38 -1
  83. package/lib/list/Subject/props/defaultProps.js +2 -1
  84. package/lib/list/Subject/props/propTypes.js +2 -1
  85. package/lib/list/status/StatusDropdown/StatusDropdown.js +1 -3
  86. package/lib/lookup/header/ViewDropDown/ViewDropDown.js +5 -11
  87. package/lib/lookup/header/ViewDropDown/__test__/__snapshots__/ViewDropDown.spec.js.snap +0 -2
  88. package/lib/lookup/header/ViewDropDown/props/defaultProps.js +1 -2
  89. package/lib/lookup/header/ViewDropDown/props/propTypes.js +0 -1
  90. package/lib/setup/header/Search/Search.js +3 -8
  91. package/lib/setup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +0 -2
  92. package/lib/setup/header/Search/props/defaultProps.js +1 -2
  93. package/lib/setup/header/Search/props/propTypes.js +1 -2
  94. package/lib/v1/ActionButton/ActionButton.js +2 -4
  95. package/lib/v1/Attachment/Attachment.js +1 -2
  96. package/lib/v1/AttachmentViewer/AttachmentViewer.js +10 -18
  97. package/lib/v1/AttachmentViewer/props/defaultProps.js +1 -2
  98. package/lib/v1/AttachmentViewer/props/propTypes.js +1 -2
  99. package/lib/v1/ChannelIcon/ChannelIcon.js +0 -1
  100. package/lib/v1/MessageBanner/MessageBanner.js +2 -4
  101. package/lib/v1/alert/AlertHeader/AlertHeader.js +1 -2
  102. package/lib/v1/avatar/AvatarClose/AvatarClose.js +3 -8
  103. package/lib/v1/avatar/AvatarClose/props/defaultProps.js +1 -2
  104. package/lib/v1/avatar/AvatarClose/props/propTypes.js +1 -2
  105. package/lib/v1/dropdown/ToggleDropDown/ToggleDropDown.js +1 -3
  106. package/lib/v1/errorstate/Inconvenience/Inconvenience.js +1 -2
  107. package/lib/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -2
  108. package/lib/v1/errorstate/UrlNotFound/UrlNotFound.js +1 -2
  109. package/lib/v1/errorstate/WillBeRightBack/WillBeRightBack.js +1 -2
  110. package/lib/v1/list/Subject/Subject.js +9 -5
  111. package/lib/v1/list/Subject/props/defaultProps.js +2 -1
  112. package/lib/v1/list/Subject/props/propTypes.js +2 -1
  113. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +1 -3
  114. package/lib/v1/lookup/header/ViewDropDown/ViewDropDown.js +5 -11
  115. package/lib/v1/lookup/header/ViewDropDown/props/defaultProps.js +1 -2
  116. package/lib/v1/lookup/header/ViewDropDown/props/propTypes.js +0 -1
  117. package/lib/v1/setup/header/Search/Search.js +3 -8
  118. package/lib/v1/setup/header/Search/props/defaultProps.js +1 -2
  119. package/lib/v1/setup/header/Search/props/propTypes.js +1 -2
  120. package/lib/version2/errorstate/Inconvenience/Inconvenience.js +1 -2
  121. package/lib/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -2
  122. package/lib/version2/errorstate/UrlNotFound/UrlNotFound.js +1 -2
  123. package/lib/version2/errorstate/WillBeRightBack/WillBeRightBack.js +1 -2
  124. package/package.json +3 -3
  125. package/result.json +1 -1
  126. package/unittest/index.html +18 -2
@@ -32,25 +32,29 @@ var Subject = function Subject(props) {
32
32
  className = props.className,
33
33
  isDotted = props.isDotted,
34
34
  children = props.children,
35
- customProps = props.customProps;
35
+ customProps = props.customProps,
36
+ whiteSpace = props.whiteSpace;
36
37
  var _customProps$LinkProp = customProps.LinkProps,
37
38
  LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
38
39
  _customProps$TextProp = customProps.TextProps,
39
40
  TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
41
+ var isTooltipWrap = whiteSpace === 'pre' || whiteSpace === 'preWrap';
40
42
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
41
43
  urlName: urlName,
42
44
  href: href,
43
45
  urlData: urlData,
44
46
  onClick: onClick,
45
- className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)], " ").concat(_SubjectModule["default"].cursorPointer),
47
+ className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(_SubjectModule["default"]["whiteSpace_".concat(whiteSpace)], " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)], " ").concat(_SubjectModule["default"].cursorPointer),
46
48
  dataId: dataId,
47
49
  title: text,
48
- target: target
50
+ target: target,
51
+ "data-title-wrap": isTooltipWrap
49
52
  }, LinkProps), children ? children : text) : /*#__PURE__*/_react["default"].createElement("span", _extends({
50
- className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)]),
53
+ className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(_SubjectModule["default"]["whiteSpace_".concat(whiteSpace)], " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)]),
51
54
  "data-title": text,
52
55
  "data-id": dataId,
53
- "data-test-id": dataId
56
+ "data-test-id": dataId,
57
+ "data-title-wrap": isTooltipWrap
54
58
  }, TextProps), text));
55
59
  };
56
60
 
@@ -9,6 +9,7 @@ var defaultProps = {
9
9
  fontWeight: 'regular',
10
10
  className: '',
11
11
  isDotted: true,
12
- customProps: {}
12
+ customProps: {},
13
+ whiteSpace: 'pre'
13
14
  };
14
15
  exports.defaultProps = defaultProps;
@@ -25,6 +25,7 @@ var propTypes = {
25
25
  customProps: _propTypes["default"].shape({
26
26
  LinkProps: _propTypes["default"].object,
27
27
  TextProps: _propTypes["default"].object
28
- })
28
+ }),
29
+ whiteSpace: _propTypes["default"].oneOf(['normal', 'noWrap', 'pre', 'preLine', 'preWrap'])
29
30
  };
30
31
  exports.propTypes = propTypes;
@@ -251,7 +251,6 @@ function StatusDropdown(props) {
251
251
  isResponsivePadding: true,
252
252
  needFocusScope: true,
253
253
  onClose: handleTogglePopup,
254
- dataId: "".concat(dataId, "_dropbox"),
255
254
  customProps: {
256
255
  focusScopeProps: {
257
256
  searchValue: searchString,
@@ -278,8 +277,7 @@ function StatusDropdown(props) {
278
277
  role: 'combobox',
279
278
  ariaActivedescendant: isPopupReady ? value : '',
280
279
  ariaOwns: ariaTitleId
281
- },
282
- dataId: "".concat(dataId, "_search")
280
+ }
283
281
  })) : null, title && optionsList.length != 0 && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
284
282
  className: _StatusDropdownModule["default"].title
285
283
  }, /*#__PURE__*/_react["default"].createElement(_DropDownHeading["default"], {
@@ -117,8 +117,7 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
117
117
  searchBoxSize = _this$props.searchBoxSize,
118
118
  searchBoxVariant = _this$props.searchBoxVariant,
119
119
  searchBoxPlaceHolder = _this$props.searchBoxPlaceHolder,
120
- maxLength = _this$props.maxLength,
121
- dataId = _this$props.dataId;
120
+ maxLength = _this$props.maxLength;
122
121
  var _this$state = this.state,
123
122
  hoverIndex = _this$state.hoverIndex,
124
123
  selected = _this$state.selected,
@@ -127,9 +126,7 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
127
126
  selectedId = _this$state.selectedId;
128
127
  var suggestions = this.handleFilterSuggestions();
129
128
  return /*#__PURE__*/_react["default"].createElement("div", {
130
- className: _ViewDropDownModule["default"].container,
131
- "data-id": dataId,
132
- "data-test-id": dataId
129
+ className: _ViewDropDownModule["default"].container
133
130
  }, /*#__PURE__*/_react["default"].createElement("div", {
134
131
  onClick: this.togglePopup,
135
132
  ref: getTargetRef
@@ -157,8 +154,7 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
157
154
  animationStyle: animationStyle,
158
155
  size: "large",
159
156
  alignBox: "row",
160
- isResponsivePadding: true,
161
- dataId: "".concat(dataId, "_dropbox")
157
+ isResponsivePadding: true
162
158
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
163
159
  flexible: true
164
160
  }, /*#__PURE__*/_react["default"].createElement(_Card.Card, null, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement(_DropDownSearch["default"], {
@@ -169,15 +165,13 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
169
165
  size: searchBoxSize,
170
166
  variant: searchBoxVariant,
171
167
  placeHolder: searchBoxPlaceHolder,
172
- maxLength: maxLength,
173
- dataId: "".concat(dataId, "_search")
168
+ maxLength: maxLength
174
169
  })) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
175
170
  shrink: true,
176
171
  eleRef: _this2.suggestionContainerRef,
177
172
  customClass: !tabletMode && dropBoxSize ? _ViewDropDownModule["default"][dropBoxSize] : ''
178
173
  }, suggestions.length ? /*#__PURE__*/_react["default"].createElement("div", {
179
- className: _ViewDropDownModule["default"].listItemContainer,
180
- "data-id": "".concat(dataId, "_Options")
174
+ className: _ViewDropDownModule["default"].listItemContainer
181
175
  }, suggestions.map(function () {
182
176
  var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
183
177
  var index = arguments.length > 1 ? arguments[1] : undefined;
@@ -9,7 +9,6 @@ var defaultProps = {
9
9
  needLocalSearch: true,
10
10
  needSearch: true,
11
11
  textField: 'text',
12
- valueField: 'id',
13
- dataId: 'ViewDropDown'
12
+ valueField: 'id'
14
13
  };
15
14
  exports.defaultProps = defaultProps;
@@ -15,7 +15,6 @@ var propTypes = {
15
15
  searchBoxPlaceHolder: _propTypes["default"].string,
16
16
  searchEmptyMessage: _propTypes["default"].string,
17
17
  dropBoxSize: _propTypes["default"].oneOf(['small', 'medium', 'large']),
18
- dataId: _propTypes["default"].string,
19
18
 
20
19
  /**** Popup props ****/
21
20
  isPopupOpen: _propTypes["default"].bool,
@@ -45,8 +45,7 @@ function Search(props) {
45
45
  onKeyPress = props.onKeyPress,
46
46
  onFocus = props.onFocus,
47
47
  onBlur = props.onBlur,
48
- customClass = props.customClass,
49
- dataId = props.dataId;
48
+ customClass = props.customClass;
50
49
 
51
50
  var _useState = (0, _react.useState)(false),
52
51
  _useState2 = _slicedToArray(_useState, 2),
@@ -71,9 +70,7 @@ function Search(props) {
71
70
  };
72
71
 
73
72
  return /*#__PURE__*/_react["default"].createElement("div", {
74
- className: "".concat(_SearchModule["default"].container, " ").concat(isFocus ? _SearchModule["default"].active : '', " ").concat(customClass),
75
- "data-id": "".concat(dataId, "_search"),
76
- "data-test-id": "".concat(dataId, "_search")
73
+ className: "".concat(_SearchModule["default"].container, " ").concat(isFocus ? _SearchModule["default"].active : '', " ").concat(customClass)
77
74
  }, /*#__PURE__*/_react["default"].createElement(_TextBox["default"], {
78
75
  placeHolder: placeHolder,
79
76
  customClass: _SearchModule["default"].input,
@@ -86,9 +83,7 @@ function Search(props) {
86
83
  onBlur: handleBlur
87
84
  }), value != '' && value ? /*#__PURE__*/_react["default"].createElement("span", {
88
85
  className: _SearchModule["default"].icon,
89
- onClick: handleBlur,
90
- "data-id": "".concat(dataId, "_clear"),
91
- "data-test-id": "".concat(dataId, "_clear")
86
+ onClick: handleBlur
92
87
  }, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
93
88
  name: "ZD-close",
94
89
  size: "19"
@@ -7,7 +7,6 @@ exports.defaultProps = void 0;
7
7
  var defaultProps = {
8
8
  placeHolder: 'Search',
9
9
  maxLength: 150,
10
- customClass: '',
11
- dataId: 'search'
10
+ customClass: ''
12
11
  };
13
12
  exports.defaultProps = defaultProps;
@@ -17,7 +17,6 @@ var propTypes = {
17
17
  onFocus: _propTypes["default"].func,
18
18
  onKeyPress: _propTypes["default"].func,
19
19
  placeHolder: _propTypes["default"].string,
20
- value: _propTypes["default"].string,
21
- dataId: _propTypes["default"].string
20
+ value: _propTypes["default"].string
22
21
  };
23
22
  exports.propTypes = propTypes;
@@ -108,8 +108,7 @@ var Inconvenience = /*#__PURE__*/function (_React$Component) {
108
108
  customClass: {
109
109
  customButton: _V2_ErrorStatesModule["default"].errorBtn
110
110
  },
111
- onClick: onButtonClick,
112
- dataId: "".concat(dataId, "_button")
111
+ onClick: onButtonClick
113
112
  }) : null));
114
113
  }
115
114
  }]);
@@ -108,8 +108,7 @@ var UnableToProcessRequest = /*#__PURE__*/function (_React$Component) {
108
108
  customClass: {
109
109
  customButton: _V2_ErrorStatesModule["default"].errorBtn
110
110
  },
111
- onClick: onButtonClick,
112
- dataId: "".concat(dataId, "_button")
111
+ onClick: onButtonClick
113
112
  }) : null));
114
113
  }
115
114
  }]);
@@ -108,8 +108,7 @@ var UrlNotFound = /*#__PURE__*/function (_React$Component) {
108
108
  customClass: {
109
109
  customButton: _V2_ErrorStatesModule["default"].errorBtn
110
110
  },
111
- onClick: onButtonClick,
112
- dataId: "".concat(dataId, "_button")
111
+ onClick: onButtonClick
113
112
  }) : null));
114
113
  }
115
114
  }]);
@@ -108,8 +108,7 @@ var WillBeRightBack = /*#__PURE__*/function (_React$Component) {
108
108
  customClass: {
109
109
  customButton: _V2_ErrorStatesModule["default"].errorBtn
110
110
  },
111
- onClick: onButtonClick,
112
- dataId: "".concat(dataId, "_button")
111
+ onClick: onButtonClick
113
112
  }) : null));
114
113
  }
115
114
  }]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/dot",
3
- "version": "1.0.0-temp-191",
3
+ "version": "1.0.0-temp-189.1",
4
4
  "main": "lib/index",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -62,7 +62,7 @@
62
62
  "@zohodesk-private/node-plugins": "1.1.8",
63
63
  "@zohodesk-private/react-prop-validator": "1.2.3",
64
64
  "@zohodesk/a11y": "2.2.3",
65
- "@zohodesk/components": "1.0.0-temp-203",
65
+ "@zohodesk/components": "1.0.0-temp-201.1",
66
66
  "@zohodesk/hooks": "2.0.4",
67
67
  "@zohodesk/icons": "1.0.50",
68
68
  "@zohodesk/svg": "1.1.14",
@@ -75,7 +75,7 @@
75
75
  "peerDependencies": {
76
76
  "velocity-react": "1.4.3",
77
77
  "@zohodesk/variables": "1.0.0",
78
- "@zohodesk/components": "1.0.0-temp-203",
78
+ "@zohodesk/components": "1.0.0-temp-201.1",
79
79
  "@zohodesk/icons": "1.0.50",
80
80
  "@zohodesk/svg": "1.1.14",
81
81
  "@zohodesk/virtualizer": "1.0.3",