@zohodesk/dot 1.0.0-temp-66 → 1.0.0-temp-69

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 (52) hide show
  1. package/README.md +6 -0
  2. package/es/ActionButton/ActionButton.js +4 -7
  3. package/es/IconButton/IconButton.js +2 -5
  4. package/es/form/fields/CheckBoxField/CheckBoxField.js +1 -1
  5. package/es/form/fields/CurrencyField/CurrencyField.js +1 -1
  6. package/es/form/fields/DateField/DateField.js +1 -1
  7. package/es/form/fields/MultiSelectField/MultiSelectField.js +1 -1
  8. package/es/form/fields/PhoneField/PhoneField.js +1 -1
  9. package/es/form/fields/RadioField/RadioField.js +1 -1
  10. package/es/form/fields/SelectField/SelectField.js +1 -1
  11. package/es/form/fields/TextBoxField/TextBoxField.js +1 -1
  12. package/es/form/fields/TextEditor/TextEditor.module.css +13 -2
  13. package/es/form/fields/TextareaField/TextareaField.js +1 -1
  14. package/es/list/Comment/Comment.js +1 -4
  15. package/es/list/Icons/AddNewIcon.js +7 -12
  16. package/es/list/Icons/CompleteIcon.js +7 -12
  17. package/es/list/Icons/DeleteIcon.js +7 -12
  18. package/es/list/Icons/EditIcon.js +7 -12
  19. package/es/list/Icons/ReadUnreadIcon.js +7 -12
  20. package/es/list/Icons/SmartIcon.js +7 -12
  21. package/es/list/SecondaryText/AccountName.js +38 -34
  22. package/es/list/SecondaryText/ContactName.js +13 -18
  23. package/es/list/SecondaryText/SecondaryText.module.css +28 -13
  24. package/es/list/Thread/Thread.js +5 -10
  25. package/es/list/status/StatusDropdown/StatusDropdown.js +47 -40
  26. package/es/setup/header/Views/Views.js +2 -2
  27. package/lib/ActionButton/ActionButton.js +4 -8
  28. package/lib/IconButton/IconButton.js +2 -5
  29. package/lib/form/fields/CheckBoxField/CheckBoxField.js +1 -1
  30. package/lib/form/fields/CurrencyField/CurrencyField.js +1 -1
  31. package/lib/form/fields/DateField/DateField.js +1 -1
  32. package/lib/form/fields/MultiSelectField/MultiSelectField.js +1 -1
  33. package/lib/form/fields/PhoneField/PhoneField.js +1 -1
  34. package/lib/form/fields/RadioField/RadioField.js +1 -1
  35. package/lib/form/fields/SelectField/SelectField.js +1 -1
  36. package/lib/form/fields/TextBoxField/TextBoxField.js +1 -1
  37. package/lib/form/fields/TextEditor/TextEditor.module.css +13 -2
  38. package/lib/form/fields/TextareaField/TextareaField.js +1 -1
  39. package/lib/list/Comment/Comment.js +1 -4
  40. package/lib/list/Icons/AddNewIcon.js +7 -13
  41. package/lib/list/Icons/CompleteIcon.js +7 -13
  42. package/lib/list/Icons/DeleteIcon.js +7 -13
  43. package/lib/list/Icons/EditIcon.js +7 -13
  44. package/lib/list/Icons/ReadUnreadIcon.js +7 -13
  45. package/lib/list/Icons/SmartIcon.js +7 -13
  46. package/lib/list/SecondaryText/AccountName.js +38 -34
  47. package/lib/list/SecondaryText/ContactName.js +13 -18
  48. package/lib/list/SecondaryText/SecondaryText.module.css +28 -13
  49. package/lib/list/Thread/Thread.js +5 -10
  50. package/lib/list/status/StatusDropdown/StatusDropdown.js +44 -37
  51. package/lib/setup/header/Views/Views.js +2 -2
  52. package/package.json +2 -2
@@ -82,40 +82,44 @@ var AccountName = /*#__PURE__*/function (_Component) {
82
82
  TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp,
83
83
  _customProps$Secondar = customProps.SecondaryTextProps,
84
84
  SecondaryTextProps = _customProps$Secondar === void 0 ? {} : _customProps$Secondar;
85
- return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
86
- alignBox: "row",
87
- align: "baseline",
88
- isCover: false,
89
- "data-title": dataTitle,
90
- dataId: dataId
91
- }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
92
- flexible: true
93
- }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
94
- alignBox: "row",
95
- align: "baseline",
96
- isCover: false,
97
- className: _SecondaryTextModule["default"].primaryAccountNameCnt
98
- }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
99
- className: _SecondaryTextModule["default"].primaryAccountName,
100
- shrink: true
101
- }, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
102
- href: href,
103
- urlName: urlName,
104
- urlData: urlData,
105
- onClick: onClick,
106
- dataId: "".concat(dataId, "_link"),
107
- className: _SecondaryTextModule["default"].link
108
- }, LinkProps), /*#__PURE__*/_react["default"].createElement("div", {
109
- className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
110
- }, text)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
111
- className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : '')
112
- }, TextProps), text)), secondaryAccountText && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
113
- href: secondaryAccountHref,
114
- onClick: secondaryAccountClick,
115
- className: _SecondaryTextModule["default"].link
116
- }, /*#__PURE__*/_react["default"].createElement("div", _extends({
117
- className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
118
- }, SecondaryTextProps), secondaryAccountText))))));
85
+ return (
86
+ /*#__PURE__*/
87
+ // <Container
88
+ // alignBox='row'
89
+ // align='baseline'
90
+ // isCover={false}
91
+ // data-title={dataTitle}
92
+ // dataId={dataId}
93
+ // >
94
+ // <Box flexible>
95
+ _react["default"].createElement("div", {
96
+ className: _SecondaryTextModule["default"].primaryAccountNameCnt,
97
+ "data-title": dataTitle,
98
+ "data-id": dataId
99
+ }, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
100
+ className: _SecondaryTextModule["default"].primaryAccountName,
101
+ shrink: true
102
+ }, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
103
+ href: href,
104
+ urlName: urlName,
105
+ urlData: urlData,
106
+ onClick: onClick,
107
+ dataId: "".concat(dataId, "_link"),
108
+ className: "".concat(_SecondaryTextModule["default"].gridItem, " ").concat(_SecondaryTextModule["default"].link)
109
+ }, LinkProps), /*#__PURE__*/_react["default"].createElement("div", {
110
+ className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
111
+ }, text)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
112
+ className: "".concat(_SecondaryTextModule["default"].gridItem, " ").concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : '')
113
+ }, TextProps), text)), secondaryAccountText && /*#__PURE__*/_react["default"].createElement(_Link["default"], {
114
+ href: secondaryAccountHref,
115
+ onClick: secondaryAccountClick,
116
+ className: "".concat(_SecondaryTextModule["default"].gridItem, " ").concat(_SecondaryTextModule["default"].link)
117
+ }, /*#__PURE__*/_react["default"].createElement("div", _extends({
118
+ className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
119
+ }, SecondaryTextProps), secondaryAccountText))) // </Box>
120
+ // </Container>
121
+
122
+ );
119
123
  }
120
124
  }]);
121
125
 
@@ -93,36 +93,30 @@ var ContactName = /*#__PURE__*/function (_Component) {
93
93
  LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
94
94
  _customProps$TextProp = customProps.TextProps,
95
95
  TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
96
- return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
97
- alignBox: "row",
98
- align: "baseline",
99
- isCover: false,
100
- dataId: dataId
101
- }, isPaidUser && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
102
- className: _SecondaryTextModule["default"].paidUserIcon,
103
- title: paidTitle
104
- }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
96
+ return /*#__PURE__*/_react["default"].createElement("div", {
97
+ className: _SecondaryTextModule["default"].contactNameCnt,
98
+ "data-id": dataId
99
+ }, isPaidUser && /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
105
100
  name: "ZD-paiduser",
106
- iconClass: _SecondaryTextModule["default"].icon
107
- })), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
108
- flexible: true
109
- }, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
101
+ iconClass: _SecondaryTextModule["default"].paidUserIcon,
102
+ title: paidTitle
103
+ }), /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
110
104
  urlName: urlName,
111
105
  href: href,
112
106
  urlData: urlData,
113
107
  onClick: onClick,
114
108
  title: dataTitle,
115
109
  dataId: "".concat(dataId, "_link"),
116
- className: _SecondaryTextModule["default"].link
110
+ className: "".concat(_SecondaryTextModule["default"].gridItem, " ").concat(_SecondaryTextModule["default"].link)
117
111
  }, LinkProps), /*#__PURE__*/_react["default"].createElement("div", {
118
112
  className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
119
113
  }, text)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
120
- className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : ''),
114
+ className: "".concat(_SecondaryTextModule["default"].gridItem, " ").concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : ''),
121
115
  "data-title": dataTitle
122
- }, TextProps), text)), sentimentType && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_SentimentStatus["default"], {
116
+ }, TextProps), text)), sentimentType && /*#__PURE__*/_react["default"].createElement(_SentimentStatus["default"], {
123
117
  type: sentimentType,
124
118
  dataTitle: sentimentDataTitle
125
- })));
119
+ }));
126
120
  }
127
121
  }]);
128
122
 
@@ -164,7 +158,8 @@ ContactName.defaultProps = {
164
158
  dataId: 'contactName',
165
159
  fontWeight: 'regular',
166
160
  i18nKeys: {},
167
- customProps: {}
161
+ customProps: {},
162
+ sentimentType: 'positive'
168
163
  };
169
164
 
170
165
  if (false) {
@@ -1,13 +1,3 @@
1
- .paidUserIcon {
2
- vertical-align: middle;
3
- bottom: var(--zd_size1);
4
- position: relative;
5
- font-size: var(--zd_font_size8);
6
- }[dir=ltr] .paidUserIcon {
7
- margin-right: var(--zd_size5);
8
- }[dir=rtl] .paidUserIcon {
9
- margin-left: var(--zd_size5);
10
- }
11
1
  .icon {
12
2
  display: block;
13
3
  }
@@ -67,9 +57,6 @@ display: block
67
57
  .ticketIdLink:hover, .ticketIdLink:focus {
68
58
  color: var(--zdt_secondaryText_blue_hover_text);
69
59
  }
70
- .primaryAccountNameCnt {
71
- max-width: 100%;
72
- }
73
60
  /* status */
74
61
  .font_regular {
75
62
  font-family: var(--zd_regular);
@@ -134,3 +121,31 @@ display: block
134
121
  .black {
135
122
  color: var(--zdt_secondaryText_black_text);
136
123
  }
124
+ /* Contact Name */
125
+ .contactNameCnt {
126
+ display: inline-grid;
127
+ grid-template-columns: minmax(auto,max-content) 1fr minmax(auto,max-content);
128
+ align-items: baseline;
129
+ }
130
+ .paidUserIcon {
131
+ vertical-align: middle;
132
+ bottom: var(--zd_size1);
133
+ position: relative;
134
+ font-size: var(--zd_font_size8);
135
+ }
136
+ [dir=ltr] .paidUserIcon {
137
+ margin-right: var(--zd_size5);
138
+ }
139
+ [dir=rtl] .paidUserIcon {
140
+ margin-left: var(--zd_size5);
141
+ }
142
+ .gridItem {
143
+ min-width: 0;
144
+ }
145
+ /* Account Name */
146
+ .primaryAccountNameCnt {
147
+ max-width: 100%;
148
+ display: grid;
149
+ grid-template-columns: 1fr minmax(auto,max-content);
150
+ align-items: baseline;
151
+ }
@@ -23,8 +23,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
23
23
 
24
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
25
 
26
- function _extends() { _extends = Object.assign || 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); }
27
-
28
26
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
27
 
30
28
  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); } }
@@ -64,14 +62,13 @@ var Thread = /*#__PURE__*/function (_Component) {
64
62
  className = _this$props.className,
65
63
  iconTitle = _this$props.iconTitle,
66
64
  dataId = _this$props.dataId,
67
- align = _this$props.align,
68
- customProps = _this$props.customProps;
65
+ align = _this$props.align;
69
66
  var count = threadCount === '0' ? '1' : threadCount;
70
- return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
67
+ return /*#__PURE__*/_react["default"].createElement(_Button["default"], {
71
68
  customClass: "".concat(_ThreadModule["default"].container, " ").concat(_ThreadModule["default"]["align_".concat(align)], " ").concat(className),
72
69
  title: iconTitle,
73
70
  dataId: dataId
74
- }, customProps), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
71
+ }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
75
72
  name: "ZD-TK-thread",
76
73
  size: "9"
77
74
  }), /*#__PURE__*/_react["default"].createElement("span", {
@@ -89,13 +86,11 @@ Thread.propTypes = {
89
86
  className: _propTypes["default"].string,
90
87
  count: _propTypes["default"].string,
91
88
  dataId: _propTypes["default"].string,
92
- iconTitle: _propTypes["default"].string,
93
- customProps: _propTypes["default"].object
89
+ iconTitle: _propTypes["default"].string
94
90
  };
95
91
  Thread.defaultProps = {
96
92
  align: 'left',
97
- className: '',
98
- customProps: {}
93
+ className: ''
99
94
  };
100
95
 
101
96
  if (false) {
@@ -182,7 +182,7 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
182
182
 
183
183
  if (prevProps.isPopupOpen != isPopupOpen) {
184
184
  setTimeout(function () {
185
- isPopupOpen ? isSearch ? _this2.searchInput && _this2.searchInput.focus() : _this2.hiddenInput && _this2.hiddenInput.focus() : _this2.hiddenInput && _this2.hiddenInput.focus();
185
+ isPopupOpen && isSearch ? _this2.searchInput && _this2.searchInput.focus() : _this2.hiddenInput && _this2.hiddenInput.focus();
186
186
  }, 10);
187
187
  }
188
188
 
@@ -211,54 +211,61 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
211
211
  togglePopup = _this$props4.togglePopup,
212
212
  onClick = _this$props4.onClick,
213
213
  boxPosition = _this$props4.boxPosition,
214
- isPopupOpen = _this$props4.isPopupOpen,
214
+ isPopupReady = _this$props4.isPopupReady,
215
215
  isNextOptions = _this$props4.isNextOptions,
216
216
  getNextOptions = _this$props4.getNextOptions,
217
- onTogglePopup = _this$props4.onTogglePopup;
217
+ onTogglePopup = _this$props4.onTogglePopup,
218
+ isPopupOpen = _this$props4.isPopupOpen;
218
219
 
219
- if (isPopupOpen && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
220
+ if (isPopupReady && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
220
221
  e.preventDefault(); //prevent body scroll
221
222
  }
222
223
 
223
- switch (keyCode) {
224
- case 40:
225
- if (selectedIndex === totalIndex - 1) {
226
- this.setState({
227
- selectedIndex: 0
228
- });
229
- } else {
230
- if (selectedIndex === totalIndex - 3) {
231
- isNextOptions && getNextOptions && getNextOptions();
224
+ if (isPopupReady) {
225
+ switch (keyCode) {
226
+ case 40:
227
+ if (selectedIndex === totalIndex - 1) {
228
+ this.setState({
229
+ selectedIndex: 0
230
+ });
231
+ } else {
232
+ if (selectedIndex === totalIndex - 3) {
233
+ isNextOptions && getNextOptions && getNextOptions();
234
+ }
235
+
236
+ this.setState({
237
+ selectedIndex: selectedIndex + 1
238
+ });
232
239
  }
233
240
 
234
- this.setState({
235
- selectedIndex: selectedIndex + 1
236
- });
237
- }
241
+ break;
242
+
243
+ case 38:
244
+ if (selectedIndex === 0) {
245
+ this.setState({
246
+ selectedIndex: totalIndex - 1
247
+ });
248
+ } else {
249
+ this.setState({
250
+ selectedIndex: selectedIndex - 1
251
+ });
252
+ }
238
253
 
239
- break;
240
-
241
- case 38:
242
- if (selectedIndex === 0) {
243
- this.setState({
244
- selectedIndex: totalIndex - 1
245
- });
246
- } else {
247
- this.setState({
248
- selectedIndex: selectedIndex - 1
249
- });
250
- }
254
+ break;
251
255
 
252
- break;
256
+ case 13:
257
+ onClick && onClick(options[selectedIndex].name, e);
258
+ onTogglePopup && onTogglePopup(isPopupOpen);
259
+ togglePopup(e, boxPosition);
260
+ break;
253
261
 
254
- case 13:
255
- onClick && onClick(options[selectedIndex].name, e);
256
- onTogglePopup && onTogglePopup(isPopupOpen);
262
+ default:
263
+ break;
264
+ }
265
+ } else {
266
+ if (keyCode === 13 || keyCode === 40) {
257
267
  togglePopup(e, boxPosition);
258
- break;
259
-
260
- default:
261
- break;
268
+ }
262
269
  }
263
270
  }
264
271
  }, {
@@ -62,14 +62,14 @@ var Views = /*#__PURE__*/function (_React$Component) {
62
62
  className: _ViewsModule["default"].container
63
63
  }, /*#__PURE__*/_react["default"].createElement("span", {
64
64
  className: "".concat(_ViewsModule["default"].icon, " ").concat(_ViewsModule["default"].first, " ").concat(isList ? _ViewsModule["default"].active : ''),
65
- "data-title": !isList ? listTitle : '',
65
+ "data-title": !isList ? listTitle : null,
66
66
  onClick: onListClick
67
67
  }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
68
68
  name: "ZD-list22",
69
69
  size: "10"
70
70
  })), /*#__PURE__*/_react["default"].createElement("span", {
71
71
  className: "".concat(_ViewsModule["default"].icon, " ").concat(_ViewsModule["default"].last, " ").concat(isGrid ? _ViewsModule["default"].active : ''),
72
- "data-title": !isGrid ? gridTitle : '',
72
+ "data-title": !isGrid ? gridTitle : null,
73
73
  onClick: onGridClick
74
74
  }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
75
75
  name: "ZD-grid",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/dot",
3
- "version": "1.0.0-temp-66",
3
+ "version": "1.0.0-temp-69",
4
4
  "main": "lib/index",
5
5
  "module": "es/index.js",
6
6
  "jsnext:main": "es/index.js",
@@ -33,7 +33,7 @@
33
33
  "velocity-react": "^1.4.3",
34
34
  "@zohodesk/variables": "1.0.0-beta.29",
35
35
  "@zohodesk/i18n": "^1.0.0-beta.7",
36
- "@zohodesk/components": "1.0.0-temp-49",
36
+ "@zohodesk/components": "file:../components",
37
37
  "@zohodesk/icons": "1.0.0-beta.92",
38
38
  "@zohodesk/svg": "1.0.0-beta.41",
39
39
  "@zohodesk/virtualizer": "1.0.3",