@zohodesk/dot 1.4.13 → 1.4.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 (176) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +6 -0
  3. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  4. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  5. package/coverage/ExternalLink/index.html +1 -1
  6. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  7. package/coverage/ExternalLink/props/index.html +1 -1
  8. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  9. package/coverage/IconButton/IconButton.js.html +1 -1
  10. package/coverage/IconButton/IconButton.module.css.html +2 -5
  11. package/coverage/IconButton/index.html +1 -1
  12. package/coverage/IconButton/props/defaultProps.js.html +1 -1
  13. package/coverage/IconButton/props/index.html +1 -1
  14. package/coverage/IconButton/props/propTypes.js.html +1 -1
  15. package/coverage/Image/Image.js.html +1 -1
  16. package/coverage/Image/Image.module.css.html +1 -1
  17. package/coverage/Image/index.html +1 -1
  18. package/coverage/Image/props/defaultProps.js.html +1 -1
  19. package/coverage/Image/props/index.html +1 -1
  20. package/coverage/Image/props/propTypes.js.html +1 -1
  21. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  22. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  23. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  24. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  25. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  26. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  27. package/coverage/index.html +1 -1
  28. package/es/ActionButton/ActionButton.module.css +51 -4
  29. package/es/AlphabeticList/AlphabeticList.module.css +0 -2
  30. package/es/AttachmentViewer/AttachmentViewer.module.css +0 -2
  31. package/es/ChannelIcon/ChannelIcon.module.css +9 -4
  32. package/es/Drawer/Drawer.js +4 -5
  33. package/es/ExternalLink/ExternalLink.js +4 -5
  34. package/es/FlipCard/FlipCard.js +14 -12
  35. package/es/FormAction/FormAction.module.css +18 -1
  36. package/es/IconButton/IconButton.js +4 -5
  37. package/es/IconButton/IconButton.module.css +0 -1
  38. package/es/Link/Link.js +8 -10
  39. package/es/Message/Message.js +4 -5
  40. package/es/TagWithIcon/TagWithIcon.module.css +0 -3
  41. package/es/ToastMessage/ToastMessage.js +2 -4
  42. package/es/actions/AutoClose.js +2 -1
  43. package/es/alert/AlertLookup/AlertLookup.js +14 -12
  44. package/es/avatar/AvatarClose/AvatarClose.js +7 -7
  45. package/es/avatar/AvatarCollision/AvatarCollision.js +7 -7
  46. package/es/avatar/AvatarIcon/AvatarIcon.js +4 -5
  47. package/es/avatar/AvatarIcon/AvatarIcon.module.css +0 -6
  48. package/es/avatar/AvatarStatus/AvatarStatus.js +7 -8
  49. package/es/avatar/AvatarThread/AvatarThread.js +7 -7
  50. package/es/avatar/AvatarUser/AvatarUser.js +10 -9
  51. package/es/avatar/AvatarWithTeam/AvatarWithTeam.js +17 -14
  52. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +28 -24
  53. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +0 -4
  54. package/es/form/fields/CheckBoxField/CheckBoxField.js +15 -13
  55. package/es/form/fields/CurrencyField/CurrencyField.js +14 -12
  56. package/es/form/fields/DateField/DateField.js +14 -14
  57. package/es/form/fields/MultiSelectField/MultiSelectField.js +13 -12
  58. package/es/form/fields/PhoneField/PhoneField.js +7 -7
  59. package/es/form/fields/RadioField/RadioField.js +18 -15
  60. package/es/form/fields/SelectField/SelectField.js +14 -14
  61. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +13 -10
  62. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -11
  63. package/es/form/fields/TextBoxField/TextBoxField.js +14 -14
  64. package/es/form/fields/TextEditorField/TextEditorField.js +11 -10
  65. package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +11 -10
  66. package/es/form/fields/TextareaField/TextareaField.js +14 -13
  67. package/es/form/fields/ValidationMessage/ValidationMessage.module.css +0 -1
  68. package/es/layout/SubtabLayout/SubtabLayout.js +4 -6
  69. package/es/layout/SubtabLayout/SubtabLayout.module.css +0 -2
  70. package/es/list/Comment/Comment.module.css +0 -1
  71. package/es/list/Dot/Dot.module.css +0 -1
  72. package/es/list/ListLayout/ListLayout.js +4 -5
  73. package/es/list/ListLayout/ListLayout.module.css +0 -6
  74. package/es/list/SecondaryText/AccountName.js +12 -12
  75. package/es/list/SecondaryText/ContactName.js +8 -9
  76. package/es/list/SecondaryText/Email.js +8 -8
  77. package/es/list/SecondaryText/PhoneNumber.js +8 -8
  78. package/es/list/SecondaryText/SecondaryText.js +4 -5
  79. package/es/list/SecondaryText/TicketId.js +7 -7
  80. package/es/list/Subject/Subject.js +7 -7
  81. package/es/list/Subject/Subject.module.css +8 -1
  82. package/es/list/Thread/Thread.module.css +0 -1
  83. package/es/list/status/StatusListItem/StatusListItem.js +5 -5
  84. package/es/lookup/Lookup/Lookup.js +7 -7
  85. package/es/lookup/Lookup/Lookup.module.css +4 -1
  86. package/es/lookup/Lookup/props/propTypes.js +3 -2
  87. package/es/lookup/header/Search/Search.js +5 -3
  88. package/es/lookup/header/TicketHeader/TicketHeader.js +88 -73
  89. package/es/lookup/header/TicketHeader/props/defaultProps.js +7 -1
  90. package/es/lookup/header/TicketHeader/props/propTypes.js +2 -1
  91. package/es/v1/Drawer/Drawer.js +4 -5
  92. package/es/v1/ExternalLink/ExternalLink.js +4 -5
  93. package/es/v1/FlipCard/FlipCard.js +14 -12
  94. package/es/v1/GlobalNotification/GlobalNotification.js +6 -7
  95. package/es/v1/IconButton/IconButton.js +4 -5
  96. package/es/v1/Link/Link.js +8 -10
  97. package/es/v1/Message/Message.js +4 -5
  98. package/es/v1/ToastMessage/ToastMessage.js +2 -4
  99. package/es/v1/actions/AutoClose.js +2 -1
  100. package/es/v1/alert/AlertLookup/AlertLookup.js +15 -15
  101. package/es/v1/avatar/AvatarClose/AvatarClose.js +7 -7
  102. package/es/v1/avatar/AvatarCollision/AvatarCollision.js +7 -7
  103. package/es/v1/avatar/AvatarIcon/AvatarIcon.js +4 -5
  104. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +7 -8
  105. package/es/v1/avatar/AvatarThread/AvatarThread.js +7 -7
  106. package/es/v1/avatar/AvatarUser/AvatarUser.js +10 -9
  107. package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +17 -14
  108. package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +28 -24
  109. package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +15 -13
  110. package/es/v1/form/fields/CurrencyField/CurrencyField.js +14 -12
  111. package/es/v1/form/fields/DateField/DateField.js +14 -14
  112. package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +13 -12
  113. package/es/v1/form/fields/PhoneField/PhoneField.js +7 -7
  114. package/es/v1/form/fields/RadioField/RadioField.js +18 -16
  115. package/es/v1/form/fields/SelectField/SelectField.js +14 -14
  116. package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +13 -10
  117. package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -11
  118. package/es/v1/form/fields/TextBoxField/TextBoxField.js +14 -14
  119. package/es/v1/form/fields/TextEditorField/TextEditorField.js +11 -10
  120. package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +11 -10
  121. package/es/v1/form/fields/TextareaField/TextareaField.js +14 -13
  122. package/es/v1/layout/SubtabLayout/SubtabLayout.js +4 -6
  123. package/es/v1/list/ListLayout/ListLayout.js +4 -5
  124. package/es/v1/list/SecondaryText/AccountName.js +12 -12
  125. package/es/v1/list/SecondaryText/ContactName.js +8 -9
  126. package/es/v1/list/SecondaryText/Email.js +8 -8
  127. package/es/v1/list/SecondaryText/PhoneNumber.js +8 -8
  128. package/es/v1/list/SecondaryText/SecondaryText.js +4 -5
  129. package/es/v1/list/SecondaryText/TicketId.js +7 -7
  130. package/es/v1/list/Subject/Subject.js +7 -7
  131. package/es/v1/list/status/StatusListItem/StatusListItem.js +5 -5
  132. package/es/v1/lookup/Lookup/Lookup.js +7 -7
  133. package/es/v1/lookup/Lookup/props/propTypes.js +3 -2
  134. package/es/v1/lookup/header/Search/Search.js +5 -3
  135. package/es/v1/lookup/header/TicketHeader/TicketHeader.js +30 -12
  136. package/es/v1/lookup/header/TicketHeader/props/defaultProps.js +7 -1
  137. package/es/v1/lookup/header/TicketHeader/props/propTypes.js +2 -1
  138. package/es/v1/notification/DesktopNotification/DesktopNotification.js +6 -7
  139. package/es/version2/GlobalNotification/GlobalNotification.js +6 -7
  140. package/es/version2/GlobalNotification/GlobalNotification.module.css +0 -4
  141. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +0 -1
  142. package/es/version2/lookup/AlertLookup/AlertLookup.js +15 -15
  143. package/es/version2/notification/DesktopNotification/DesktopNotification.js +6 -7
  144. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +0 -2
  145. package/lib/ActionButton/ActionButton.module.css +51 -4
  146. package/lib/AlphabeticList/AlphabeticList.module.css +0 -2
  147. package/lib/AttachmentViewer/AttachmentViewer.module.css +0 -2
  148. package/lib/ChannelIcon/ChannelIcon.module.css +9 -4
  149. package/lib/FormAction/FormAction.module.css +18 -1
  150. package/lib/IconButton/IconButton.module.css +0 -1
  151. package/lib/TagWithIcon/TagWithIcon.module.css +0 -3
  152. package/lib/avatar/AvatarIcon/AvatarIcon.module.css +0 -6
  153. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +0 -4
  154. package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +0 -1
  155. package/lib/layout/SubtabLayout/SubtabLayout.module.css +0 -2
  156. package/lib/list/Comment/Comment.module.css +0 -1
  157. package/lib/list/Dot/Dot.module.css +0 -1
  158. package/lib/list/ListLayout/ListLayout.module.css +0 -6
  159. package/lib/list/Subject/Subject.module.css +8 -1
  160. package/lib/list/Thread/Thread.module.css +0 -1
  161. package/lib/lookup/Lookup/Lookup.js +3 -2
  162. package/lib/lookup/Lookup/Lookup.module.css +4 -1
  163. package/lib/lookup/Lookup/props/propTypes.js +3 -2
  164. package/lib/lookup/header/TicketHeader/TicketHeader.js +93 -106
  165. package/lib/lookup/header/TicketHeader/props/defaultProps.js +7 -1
  166. package/lib/lookup/header/TicketHeader/props/propTypes.js +2 -1
  167. package/lib/v1/lookup/Lookup/Lookup.js +3 -2
  168. package/lib/v1/lookup/Lookup/props/propTypes.js +3 -2
  169. package/lib/v1/lookup/header/TicketHeader/TicketHeader.js +37 -12
  170. package/lib/v1/lookup/header/TicketHeader/props/defaultProps.js +7 -1
  171. package/lib/v1/lookup/header/TicketHeader/props/propTypes.js +2 -1
  172. package/lib/version2/GlobalNotification/GlobalNotification.module.css +0 -4
  173. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +0 -1
  174. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +0 -2
  175. package/package.json +9 -9
  176. package/result.json +1 -1
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /* eslint-disable react/forbid-component-props */
4
2
 
5
3
  /**** Libraries ****/
@@ -32,7 +30,7 @@ export default class PhoneNumber extends Component {
32
30
  LinkProps = {},
33
31
  TextProps = {}
34
32
  } = customProps;
35
- return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, _extends({
33
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, {
36
34
  href: href,
37
35
  title: title,
38
36
  urlData: urlData,
@@ -40,13 +38,15 @@ export default class PhoneNumber extends Component {
40
38
  dataId: dataId,
41
39
  target: target,
42
40
  hasReload: hasReload,
43
- className: style.link
44
- }, LinkProps), /*#__PURE__*/React.createElement("div", {
41
+ className: style.link,
42
+ ...LinkProps
43
+ }, /*#__PURE__*/React.createElement("div", {
45
44
  className: `${style.phoneNumber} ${style[`font_${fontWeight}`]} ${className ? className : ''}`
46
- }, text)) : /*#__PURE__*/React.createElement("div", _extends({
45
+ }, text)) : /*#__PURE__*/React.createElement("div", {
47
46
  className: `${style.secondaryText} ${style[`font_${fontWeight}`]} ${className ? className : ''}`,
48
- "data-title": title
49
- }, TextProps), text));
47
+ "data-title": title,
48
+ ...TextProps
49
+ }, text));
50
50
  }
51
51
 
52
52
  }
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { Component } from 'react';
4
2
  import { SecondaryText_defaultProps } from './props/defaultProps';
5
3
  import { SecondaryText_propTypes } from './props/propTypes';
@@ -21,13 +19,14 @@ export default class SecondaryText extends Component {
21
19
  let {
22
20
  SecondaryTextProps
23
21
  } = customProps;
24
- return /*#__PURE__*/React.createElement("div", _extends({
22
+ return /*#__PURE__*/React.createElement("div", {
25
23
  className: `${style.secondaryText} ${className ? className : ''}`,
26
24
  "data-title": dataTitle,
27
25
  "data-id": dataId,
28
26
  "data-test-id": dataId,
29
- onClick: onClick
30
- }, SecondaryTextProps), text);
27
+ onClick: onClick,
28
+ ...SecondaryTextProps
29
+ }, text);
31
30
  }
32
31
 
33
32
  }
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { Component } from 'react';
4
2
  import { TicketId_defaultProps } from './props/defaultProps';
5
3
  import { TicketId_propTypes } from './props/propTypes';
@@ -28,19 +26,21 @@ export default class TicketId extends Component {
28
26
  LinkProps = {},
29
27
  TicketIdProps = {}
30
28
  } = customProps;
31
- return /*#__PURE__*/React.createElement("div", _extends({
29
+ return /*#__PURE__*/React.createElement("div", {
32
30
  className: `${style.ticketId} ${isLink ? style.ticketIdLink : ''} ${className ? className : ''}`,
33
31
  "data-id": dataId,
34
32
  "data-test-id": dataId,
35
33
  "data-title": dataTitle,
36
- onClick: !isLink && onClick
37
- }, TicketIdProps), isLink ? /*#__PURE__*/React.createElement(Link, _extends({
34
+ onClick: !isLink && onClick,
35
+ ...TicketIdProps
36
+ }, isLink ? /*#__PURE__*/React.createElement(Link, {
38
37
  urlName: urlName,
39
38
  urlData: urlData,
40
39
  href: url,
41
40
  target: target,
42
- onClick: onClick
43
- }, LinkProps), text) : text);
41
+ onClick: onClick,
42
+ ...LinkProps
43
+ }, text) : text);
44
44
  }
45
45
 
46
46
  }
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { Component } from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -30,7 +28,7 @@ export default class Subject extends Component {
30
28
  LinkProps = {},
31
29
  TextProps = {}
32
30
  } = customProps;
33
- return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, _extends({
31
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, {
34
32
  urlName: urlName,
35
33
  href: href,
36
34
  urlData: urlData,
@@ -38,13 +36,15 @@ export default class Subject extends Component {
38
36
  className: `${style.subject} ${isDotted ? style.dotted : ''} ${className} ${style[`font_${fontWeight}`]} ${style.cursorPointer}`,
39
37
  dataId: dataId,
40
38
  title: text,
41
- target: target
42
- }, LinkProps), children ? children : text) : /*#__PURE__*/React.createElement("span", _extends({
39
+ target: target,
40
+ ...LinkProps
41
+ }, children ? children : text) : /*#__PURE__*/React.createElement("span", {
43
42
  className: `${style.subject} ${isDotted ? style.dotted : ''} ${className} ${style[`font_${fontWeight}`]}`,
44
43
  "data-title": text,
45
44
  "data-id": dataId,
46
- "data-test-id": dataId
47
- }, TextProps), text));
45
+ "data-test-id": dataId,
46
+ ...TextProps
47
+ }, text));
48
48
  }
49
49
 
50
50
  }
@@ -1,28 +1,35 @@
1
1
  .varClass {
2
2
  --subject_text: var(--zdt_subject_text);
3
3
  }
4
+
4
5
  .subject {
5
6
  composes: varClass;
6
7
  /* css:theme-validation:ignore */
7
8
  color: var(--subject_text);
8
9
  display: block;
9
10
  }
11
+
10
12
  .dotted {
11
13
  composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
12
14
  }
15
+
13
16
  .font_regular {
14
17
  font-family: var(--zd_regular);
15
18
  }
19
+
16
20
  .font_semibold {
17
21
  font-family: var(--zd_semibold);
18
22
  }
23
+
19
24
  .font_bold {
20
25
  font-family: var(--zd_bold);
21
26
  }
27
+
22
28
  .font_semibold,
23
29
  .font_bold {
24
30
  composes: ftsmooth from '~@zohodesk/components/lib/common/common.module.css';
25
31
  }
32
+
26
33
  .cursorPointer {
27
34
  cursor: pointer;
28
- }
35
+ }
@@ -4,7 +4,6 @@
4
4
  .container {
5
5
  composes: varClass;
6
6
  position: relative;
7
- /* css:theme-validation:ignore */
8
7
  color: var(--icon_color);
9
8
  cursor: pointer;
10
9
  }
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /**** Libraries ****/
4
2
  import React from 'react';
5
3
  import { defaultProps } from './props/defaultProps';
@@ -84,7 +82,7 @@ export default class StatusListItem extends React.Component {
84
82
  options.target = `_${target}`;
85
83
  }
86
84
 
87
- return /*#__PURE__*/React.createElement(Container, _extends({
85
+ return /*#__PURE__*/React.createElement(Container, {
88
86
  role: role,
89
87
  "aria-selected": ariaSelected,
90
88
  isCover: false,
@@ -97,8 +95,10 @@ export default class StatusListItem extends React.Component {
97
95
  eleRef: this.getRef,
98
96
  tagName: isLink ? 'a' : 'li',
99
97
  "data-title": isDisabled ? disableTitle : null,
100
- tabindex: isDisabled ? '-1' : '0'
101
- }, options, a11y), /*#__PURE__*/React.createElement(Box, {
98
+ tabindex: isDisabled ? '-1' : '0',
99
+ ...options,
100
+ ...a11y
101
+ }, /*#__PURE__*/React.createElement(Box, {
102
102
  className: `${style.statusType} ${style[bulletColor]}`
103
103
  }), /*#__PURE__*/React.createElement(Box, {
104
104
  flexible: true,
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /*** Libraries ***/
4
2
  import React, { Component } from 'react';
5
3
  import { defaultProps } from './props/defaultProps';
@@ -57,7 +55,8 @@ export default class Lookup extends Component {
57
55
  onClose,
58
56
  needFocusScope,
59
57
  customProps,
60
- isMinHeight
58
+ isMinHeight,
59
+ lookupClass
61
60
  } = this.props;
62
61
  const {
63
62
  role = 'dialog',
@@ -77,7 +76,7 @@ export default class Lookup extends Component {
77
76
  needFocusLoop = true,
78
77
  needEnterAction = true
79
78
  } = focusScopeProps;
80
- const content = /*#__PURE__*/React.createElement("div", _extends({
79
+ const content = /*#__PURE__*/React.createElement("div", {
81
80
  ref: this.createRef,
82
81
  tabIndex: "-1",
83
82
  "data-a11y-need-focus-style": "false",
@@ -87,10 +86,11 @@ export default class Lookup extends Component {
87
86
  "aria-label": ariaLabel,
88
87
  "aria-modal": ariaModal,
89
88
  id: htmlId,
90
- className: `${style.box} ${style[`${size}Size`]}`,
89
+ className: `${style.box} ${style[`${size}Size`]} ${lookupClass ? lookupClass : ''}`,
91
90
  "data-id": dataId,
92
- "data-test-id": dataId
93
- }, a11yAttributes), /*#__PURE__*/React.createElement(Container, {
91
+ "data-test-id": dataId,
92
+ ...a11yAttributes
93
+ }, /*#__PURE__*/React.createElement(Container, {
94
94
  "data-drag-container": "true",
95
95
  isCover: false,
96
96
  className: isMinHeight ? `${style.wrapper}` : `${style.coverwrap}`
@@ -35,7 +35,10 @@
35
35
  .largeSize {
36
36
  max-width: 70% ;
37
37
  }
38
+ .xlargeSize {
39
+ max-width: 80% ;
40
+ }
38
41
 
39
42
  .fullSize {
40
43
  max-width: 90% ;
41
- }
44
+ }
@@ -4,7 +4,7 @@ export const propTypes = {
4
4
  customClass: PropTypes.string,
5
5
  dataId: PropTypes.string,
6
6
  isActive: PropTypes.bool,
7
- size: PropTypes.oneOf(['small', 'xmedium', 'medium', 'large', 'full']),
7
+ size: PropTypes.oneOf(['small', 'xmedium', 'medium', 'large', 'xlarge', 'full']),
8
8
  htmlId: PropTypes.string,
9
9
  a11y: PropTypes.shape({
10
10
  role: PropTypes.string,
@@ -19,5 +19,6 @@ export const propTypes = {
19
19
  forwardRef: PropTypes.object,
20
20
  onClick: PropTypes.func,
21
21
  onClose: PropTypes.func,
22
- isMinHeight: PropTypes.bool
22
+ isMinHeight: PropTypes.bool,
23
+ lookupClass: PropTypes.string
23
24
  };
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /* eslint-disable react/forbid-component-props */
4
2
 
5
3
  /*** Libraries ***/
@@ -100,7 +98,11 @@ export default class Search extends Component {
100
98
  selectedId: selectedId,
101
99
  onDropDownOpen: this.handleDropDownOpen,
102
100
  onDropDownClose: this.handleDropDownClose
103
- }, /*#__PURE__*/React.createElement(SearchUI, _extends({}, this.props, searchUIExtraProps))) : /*#__PURE__*/React.createElement(SearchUI, _extends({}, this.props, searchUIExtraProps));
101
+ }, /*#__PURE__*/React.createElement(SearchUI, { ...this.props,
102
+ ...searchUIExtraProps
103
+ })) : /*#__PURE__*/React.createElement(SearchUI, { ...this.props,
104
+ ...searchUIExtraProps
105
+ });
104
106
  }
105
107
 
106
108
  }
@@ -1,5 +1,5 @@
1
1
  /*** Libraries ***/
2
- import React, { Component } from 'react';
2
+ import React, { memo, useRef } from 'react';
3
3
  import { defaultProps } from './props/defaultProps';
4
4
  import { propTypes } from './props/propTypes';
5
5
  /*** Components ***/
@@ -9,6 +9,7 @@ import Close from '../Close/Close';
9
9
  import Search from '../Search/Search';
10
10
  import ViewDropDown from '../ViewDropDown/ViewDropDown';
11
11
  import { Container, Box } from '@zohodesk/components/lib/Layout';
12
+ import useDragger from '../../../Hooks/Dragger/useDragger';
12
13
  /*** CSS ***/
13
14
 
14
15
  import commonStyle from '../lookupHeaderCommon.module.css';
@@ -16,81 +17,95 @@ import commonResponsive from '../lookupHeaderCommonResponsive.module.css';
16
17
  import style from './TicketHeader.module.css';
17
18
  /* eslint-disable react/forbid-component-props */
18
19
 
19
- export default class TicketHeader extends Component {
20
- render() {
21
- let {
22
- needSearch,
23
- onLookupClose,
24
- searchStr,
25
- onSearchChange,
26
- searchPlaceHolder,
27
- title,
28
- selectedViewId,
29
- onSelectView,
30
- allViews,
31
- onSearch,
32
- needOnTypeSearch,
33
- getSearchBoxRef,
34
- needViewsList,
35
- i18nKeys,
36
- palette
37
- } = this.props;
38
- let {
39
- menuEmptyMessage = 'No matches found'
40
- } = i18nKeys;
41
- return /*#__PURE__*/React.createElement(Container, {
42
- align: "vertical",
43
- alignBox: "row",
44
- className: `${commonStyle.container} ${commonStyle[`${palette}`]} ${commonResponsive.container} ${style.container}`,
45
- isCover: false,
46
- wrap: "wrap"
47
- }, /*#__PURE__*/React.createElement("div", {
48
- className: commonStyle.closeContainer
49
- }, /*#__PURE__*/React.createElement(Close, {
50
- onClose: onLookupClose,
51
- dataId: "close"
52
- })), /*#__PURE__*/React.createElement(Box, {
53
- flexible: true
54
- }, /*#__PURE__*/React.createElement(Container, {
55
- alignBox: "column",
56
- className: `${style.innerContainer}`,
57
- isCover: false,
58
- wrap: "wrap",
59
- dataId: "lookupView"
60
- }, /*#__PURE__*/React.createElement(Box, {
61
- className: commonStyle.title
62
- }, /*#__PURE__*/React.createElement(Title, {
63
- text: title
64
- })), needViewsList ? /*#__PURE__*/React.createElement(Box, {
65
- className: `${style.dropdown}`,
66
- dataId: "filterIdselected"
67
- }, /*#__PURE__*/React.createElement("div", {
68
- className: style.menuWrapper
69
- }, /*#__PURE__*/React.createElement(ViewDropDown, {
70
- dropBoxSize: "small",
71
- emptyMessage: menuEmptyMessage,
72
- needSearch: true,
73
- onChange: onSelectView,
74
- options: allViews,
75
- textField: "displayLabel",
76
- selectedValue: selectedViewId,
77
- needCloseOnSelect: true
78
- }))) : null)), needSearch ? /*#__PURE__*/React.createElement(Box, {
79
- className: `${commonStyle.searchContainer} ${commonResponsive.searchContainer} ${style.searchContainer}`
80
- }, /*#__PURE__*/React.createElement(Search, {
81
- onSearch: onSearch,
82
- searchStr: searchStr,
83
- onChange: onSearchChange,
84
- placeHolder: searchPlaceHolder,
85
- dataId: "search",
86
- needOnTypeSearch: needOnTypeSearch,
87
- getRef: getSearchBoxRef
88
- })) : null);
89
- }
20
+ function TicketHeader(props) {
21
+ let {
22
+ needSearch,
23
+ onLookupClose,
24
+ searchStr,
25
+ onSearchChange,
26
+ searchPlaceHolder,
27
+ title,
28
+ selectedViewId,
29
+ onSelectView,
30
+ allViews,
31
+ onSearch,
32
+ needOnTypeSearch,
33
+ getSearchBoxRef,
34
+ needViewsList,
35
+ i18nKeys,
36
+ palette,
37
+ dragBoundaryLimit
38
+ } = props;
39
+ let {
40
+ menuEmptyMessage = 'No matches found'
41
+ } = i18nKeys;
42
+ const dragRef = useRef(null); //dragRef
90
43
 
44
+ useDragger({
45
+ isActive: true,
46
+ ChildRef: dragRef,
47
+ boundaryLimit: dragBoundaryLimit
48
+ }); //custom Hook
49
+
50
+ return /*#__PURE__*/React.createElement(Container, {
51
+ align: "vertical",
52
+ alignBox: "row",
53
+ className: `${commonStyle.container} ${commonStyle[`${palette}`]} ${commonResponsive.container} ${style.container}`,
54
+ isCover: false,
55
+ wrap: "wrap",
56
+ eleRef: dragRef,
57
+ "data-drag-hook": "true"
58
+ }, /*#__PURE__*/React.createElement(Box, {
59
+ flexible: true
60
+ }, /*#__PURE__*/React.createElement(Container, {
61
+ alignBox: "column",
62
+ className: `${style.innerContainer}`,
63
+ isCover: false,
64
+ wrap: "wrap",
65
+ dataId: "lookupView"
66
+ }, /*#__PURE__*/React.createElement(Box, {
67
+ className: commonStyle.title
68
+ }, /*#__PURE__*/React.createElement(Title, {
69
+ text: title
70
+ })), needViewsList ? /*#__PURE__*/React.createElement(Box, {
71
+ className: `${style.dropdown}`,
72
+ dataId: "filterIdselected"
73
+ }, /*#__PURE__*/React.createElement("div", {
74
+ className: style.menuWrapper
75
+ }, /*#__PURE__*/React.createElement(ViewDropDown, {
76
+ dropBoxSize: "small",
77
+ emptyMessage: menuEmptyMessage,
78
+ needSearch: true,
79
+ onChange: onSelectView,
80
+ options: allViews,
81
+ textField: "displayLabel",
82
+ selectedValue: selectedViewId,
83
+ needCloseOnSelect: true
84
+ }))) : null)), needSearch ? /*#__PURE__*/React.createElement(Box, {
85
+ className: `${commonStyle.searchContainer} ${commonResponsive.searchContainer} ${style.searchContainer}`
86
+ }, /*#__PURE__*/React.createElement(Search, {
87
+ onSearch: onSearch,
88
+ searchStr: searchStr,
89
+ onChange: onSearchChange,
90
+ placeHolder: searchPlaceHolder,
91
+ dataId: "search",
92
+ needOnTypeSearch: needOnTypeSearch,
93
+ getRef: getSearchBoxRef
94
+ })) : null, /*#__PURE__*/React.createElement("div", {
95
+ className: commonStyle.closeContainer
96
+ }, /*#__PURE__*/React.createElement(Close, {
97
+ onClose: onLookupClose,
98
+ dataId: "close"
99
+ })));
91
100
  }
101
+
92
102
  TicketHeader.propTypes = propTypes;
93
- TicketHeader.defaultProps = defaultProps; // if (__DOCS__) {
103
+ TicketHeader.defaultProps = defaultProps;
104
+ const MemoizedTicketHeader = /*#__PURE__*/memo(TicketHeader);
105
+ MemoizedTicketHeader.propTypes = propTypes;
106
+ MemoizedTicketHeader.defaultProps = defaultProps;
107
+ MemoizedTicketHeader.displayName = 'TicketHeader';
108
+ export default MemoizedTicketHeader; // if (__DOCS__) {
94
109
  // TicketHeader.docs = {
95
110
  // componentGroup: 'Lookup'
96
111
  // };
@@ -1,4 +1,10 @@
1
1
  export const defaultProps = {
2
2
  i18nKeys: {},
3
- palette: 'default'
3
+ palette: 'default',
4
+ dragBoundaryLimit: {
5
+ top: 0,
6
+ left: 50,
7
+ right: 50,
8
+ bottom: 50
9
+ }
4
10
  };
@@ -16,5 +16,6 @@ export const propTypes = {
16
16
  i18nKeys: PropTypes.shape({
17
17
  menuEmptyMessage: PropTypes.string
18
18
  }),
19
- palette: PropTypes.oneOf(['default', 'white'])
19
+ palette: PropTypes.oneOf(['default', 'white']),
20
+ dragBoundaryLimit: PropTypes.object
20
21
  };
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { useRef } from 'react';
4
2
  import { Header_defaultProps, Footer_defaultProps, Drawer_defaultProps } from './props/defaultProps';
5
3
  import { Header_propTypes, Content_propTypes, Footer_propTypes, Drawer_propTypes } from './props/propTypes';
@@ -161,12 +159,13 @@ export default function Drawer(props) {
161
159
 
162
160
  return child;
163
161
  });
164
- let content = /*#__PURE__*/React.createElement(Box, _extends({
162
+ let content = /*#__PURE__*/React.createElement(Box, {
165
163
  className: `${style.container} ${style.columns} ${style.drawerModal} ${uptoTablet ? style.mbleSize : style[size]}`,
166
164
  "data-a11y-need-focus-style": "false",
167
165
  tabindex: -1,
168
- eleRef: contentRef
169
- }, a11y), /*#__PURE__*/React.createElement(Card, {
166
+ eleRef: contentRef,
167
+ ...a11y
168
+ }, /*#__PURE__*/React.createElement(Card, {
170
169
  onClick: e => {
171
170
  e && e.stopPropagation && e.stopPropagation();
172
171
  onBodyClick(e);
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /**** Libraries ****/
4
2
  import React from 'react';
5
3
  import { defaultProps } from './props/defaultProps';
@@ -32,7 +30,7 @@ const ExternalLink = props => {
32
30
  };
33
31
 
34
32
  let urlOutput = href && typeof href !== 'boolean' ? addHttp(String(href)) : 'javascript:void(0);';
35
- return /*#__PURE__*/React.createElement("a", _extends({
33
+ return /*#__PURE__*/React.createElement("a", {
36
34
  href: urlOutput,
37
35
  target: target,
38
36
  className: `${style.link} ${className ? className : ''}`,
@@ -40,8 +38,9 @@ const ExternalLink = props => {
40
38
  rel: rel,
41
39
  "data-id": dataId,
42
40
  "data-test-id": dataId,
43
- onClick: onClick
44
- }, customProps), children);
41
+ onClick: onClick,
42
+ ...customProps
43
+ }, children);
45
44
  };
46
45
 
47
46
  ExternalLink.defaultProps = defaultProps;
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes } from './props/propTypes';
@@ -76,16 +74,17 @@ export default function FlipCard(props) {
76
74
  }, !noNeedFlip ? /*#__PURE__*/React.createElement(Container, {
77
75
  align: "both",
78
76
  className: `${style.front} ${frontClass ? frontClass : ''}`
79
- }, /*#__PURE__*/React.createElement(CheckBox, _extends({
77
+ }, /*#__PURE__*/React.createElement(CheckBox, {
80
78
  isFilled: isFilledCheckbox,
81
79
  checked: isChecked,
82
80
  onChange: onChange,
83
81
  id: `checkbox_${id}`,
84
- dataId: `listViewCheckBox_${id}`
85
- }, CheckBoxProps))) : null, /*#__PURE__*/React.createElement(Container, {
82
+ dataId: `listViewCheckBox_${id}`,
83
+ ...CheckBoxProps
84
+ })) : null, /*#__PURE__*/React.createElement(Container, {
86
85
  align: "both",
87
86
  className: style.back
88
- }, channel && action ? /*#__PURE__*/React.createElement(ChannelIcon, _extends({
87
+ }, channel && action ? /*#__PURE__*/React.createElement(ChannelIcon, {
89
88
  name: channel,
90
89
  action: action,
91
90
  size: size,
@@ -98,8 +97,9 @@ export default function FlipCard(props) {
98
97
  customTextClass: customTextClass,
99
98
  iconColor: iconColor,
100
99
  title: channelTitle,
101
- iconTitle: channelTitle
102
- }, ChannelIconProps)) : icon ? /*#__PURE__*/React.createElement(AvatarIcon, _extends({
100
+ iconTitle: channelTitle,
101
+ ...ChannelIconProps
102
+ }) : icon ? /*#__PURE__*/React.createElement(AvatarIcon, {
103
103
  name: icon,
104
104
  iconSize: iconSize,
105
105
  size: size,
@@ -107,8 +107,9 @@ export default function FlipCard(props) {
107
107
  dataId: icon,
108
108
  className: className,
109
109
  iconColor: iconColor,
110
- title: needTitle ? name : ''
111
- }, AvatarIconProps)) : /*#__PURE__*/React.createElement(AvatarUser, _extends({
110
+ title: needTitle ? name : '',
111
+ ...AvatarIconProps
112
+ }) : /*#__PURE__*/React.createElement(AvatarUser, {
112
113
  name: name,
113
114
  initial: initial,
114
115
  size: size,
@@ -119,8 +120,9 @@ export default function FlipCard(props) {
119
120
  needTitle: needTitle,
120
121
  palette: palette,
121
122
  textPalette: textPalette,
122
- customTextClass: customTextClass
123
- }, AvatarUserProps)))));
123
+ customTextClass: customTextClass,
124
+ ...AvatarUserProps
125
+ }))));
124
126
  }
125
127
  FlipCard.propTypes = propTypes;
126
128
  FlipCard.defaultProps = defaultProps; // if (__DOCS__) {
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { useEffect } from 'react';
4
2
  import { defaultProps } from './props/defaultProps';
5
3
  import { propTypes, UI_propTypes, new_propTypes } from './props/propTypes';
@@ -96,7 +94,7 @@ export function GlobalNotificationUI(props) {
96
94
  onClose && onClose(e);
97
95
  }
98
96
 
99
- return /*#__PURE__*/React.createElement("div", _extends({
97
+ return /*#__PURE__*/React.createElement("div", {
100
98
  ref: eleRef,
101
99
  className: ` ${style.message}
102
100
  ${needShadow && shadowCount >= 2 ? shadowCount > 2 ? `${style.stackShadowTwo} ${style.stackShadowOne}` : style.stackShadowOne : ''}
@@ -105,8 +103,9 @@ export function GlobalNotificationUI(props) {
105
103
  "data-id": `show_${type}_message`,
106
104
  "data-test-id": `show_${type}_message`,
107
105
  tabIndex: 0,
108
- "data-selector-id": dataSelectorId
109
- }, ExtraProps), /*#__PURE__*/React.createElement(Container, {
106
+ "data-selector-id": dataSelectorId,
107
+ ...ExtraProps
108
+ }, /*#__PURE__*/React.createElement(Container, {
110
109
  className: `${style.container}`,
111
110
  alignBox: "row",
112
111
  isCover: false,
@@ -138,8 +137,8 @@ export function GlobalNotificationUI(props) {
138
137
  }
139
138
  GlobalNotificationUI.propTypes = UI_propTypes;
140
139
  export function GlobalNotificationNew(props) {
141
- return /*#__PURE__*/React.createElement(AutoClose, _extends({}, props, {
140
+ return /*#__PURE__*/React.createElement(AutoClose, { ...props,
142
141
  Element: GlobalNotificationUI
143
- }));
142
+ });
144
143
  }
145
144
  GlobalNotificationNew.propTypes = new_propTypes;