@zohodesk/dot 1.0.0-temp-183.1 → 1.0.0-temp-184.2
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.
- package/.cli/propValidation_report.html +1 -1
- package/coverage/ExternalLink/ExternalLink.js.html +1 -1
- package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
- package/coverage/ExternalLink/index.html +1 -1
- package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
- package/coverage/ExternalLink/props/index.html +1 -1
- package/coverage/ExternalLink/props/propTypes.js.html +1 -1
- package/coverage/IconButton/IconButton.js.html +1 -1
- package/coverage/IconButton/IconButton.module.css.html +1 -1
- package/coverage/IconButton/index.html +1 -1
- package/coverage/IconButton/props/defaultProps.js.html +1 -1
- package/coverage/IconButton/props/index.html +1 -1
- package/coverage/IconButton/props/propTypes.js.html +1 -1
- package/coverage/Image/Image.js.html +1 -1
- package/coverage/Image/Image.module.css.html +1 -1
- package/coverage/Image/index.html +1 -1
- package/coverage/Image/props/defaultProps.js.html +1 -1
- package/coverage/Image/props/index.html +1 -1
- package/coverage/Image/props/propTypes.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
- package/coverage/avatar/AvatarWithTeam/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
- package/coverage/coverage-final.json +16 -16
- package/coverage/coverage-summary.json +16 -16
- package/coverage/index.html +1 -1
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +3 -4
- package/es/list/DepartmentDropDown/DepartmentDropDown.js +3 -9
- package/es/list/DepartmentDropDown/props/defaultProps.js +1 -2
- package/es/list/DepartmentDropDown/props/propTypes.js +1 -2
- package/es/list/Thread/Thread.js +1 -2
- package/es/list/status/StatusDropdown/StatusDropdown.js +138 -182
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +6 -6
- package/es/list/status/StatusListItem/StatusListItem.js +5 -1
- package/es/list/status/StatusListItem/StatusListItem.module.css +5 -35
- package/es/v1/list/Thread/Thread.js +1 -2
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +126 -137
- package/es/v1/list/status/StatusListItem/StatusListItem.js +5 -1
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +3 -5
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +3 -8
- package/lib/list/DepartmentDropDown/props/defaultProps.js +1 -2
- package/lib/list/DepartmentDropDown/props/propTypes.js +1 -1
- package/lib/list/Thread/Thread.js +1 -2
- package/lib/list/status/StatusDropdown/StatusDropdown.js +182 -233
- package/lib/list/status/StatusDropdown/StatusDropdown.module.css +6 -6
- package/lib/list/status/StatusListItem/StatusListItem.js +6 -1
- package/lib/list/status/StatusListItem/StatusListItem.module.css +5 -35
- package/lib/v1/list/Thread/Thread.js +1 -2
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +111 -130
- package/lib/v1/list/status/StatusListItem/StatusListItem.js +6 -1
- package/package.json +3 -3
- 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
|
import React, { Component } from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -50,19 +48,15 @@ class DepartmentDropDown extends Component {
|
|
|
50
48
|
onSearch,
|
|
51
49
|
needSearchFetching,
|
|
52
50
|
searchStr,
|
|
53
|
-
i18nKeys
|
|
54
|
-
customProps
|
|
51
|
+
i18nKeys
|
|
55
52
|
} = this.props;
|
|
56
|
-
const {
|
|
57
|
-
toggleDropDownProps = {}
|
|
58
|
-
} = customProps;
|
|
59
53
|
let {
|
|
60
54
|
title = 'Move Department',
|
|
61
55
|
searchEmptyText = 'No results found',
|
|
62
56
|
searchErrorText = 'No results',
|
|
63
57
|
placeholder = 'Search Department'
|
|
64
58
|
} = i18nKeys;
|
|
65
|
-
return /*#__PURE__*/React.createElement(ToggleDropDown,
|
|
59
|
+
return /*#__PURE__*/React.createElement(ToggleDropDown, {
|
|
66
60
|
title: title,
|
|
67
61
|
options: departmentList,
|
|
68
62
|
value: /*#__PURE__*/React.createElement(DepartmentText, {
|
|
@@ -91,7 +85,7 @@ class DepartmentDropDown extends Component {
|
|
|
91
85
|
isNextOptions: isNextOptions,
|
|
92
86
|
onSearch: onSearch,
|
|
93
87
|
needSearchFetching: needSearchFetching
|
|
94
|
-
}
|
|
88
|
+
});
|
|
95
89
|
}
|
|
96
90
|
|
|
97
91
|
}
|
package/es/list/Thread/Thread.js
CHANGED
|
@@ -11,13 +11,12 @@ export default class Thread extends Component {
|
|
|
11
11
|
|
|
12
12
|
render() {
|
|
13
13
|
let {
|
|
14
|
-
count
|
|
14
|
+
count,
|
|
15
15
|
className,
|
|
16
16
|
iconTitle,
|
|
17
17
|
dataId,
|
|
18
18
|
align
|
|
19
19
|
} = this.props;
|
|
20
|
-
let count = threadCount === '0' ? '1' : threadCount;
|
|
21
20
|
return /*#__PURE__*/React.createElement(Button, {
|
|
22
21
|
customClass: `${style.container} ${style[`align_${align}`]} ${className}`,
|
|
23
22
|
title: iconTitle,
|
|
@@ -7,9 +7,9 @@ import { Box, Container } from '@zohodesk/components/lib/Layout';
|
|
|
7
7
|
import DropDownHeading from '@zohodesk/components/lib/DropDown/DropDownHeading';
|
|
8
8
|
import TextBoxIcon from '@zohodesk/components/lib/TextBoxIcon/TextBoxIcon';
|
|
9
9
|
import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
10
|
-
import EmptySearch from '@zohodesk/svg/lib/emptystate/version3/EmptySearch';
|
|
11
|
-
import
|
|
12
|
-
|
|
10
|
+
import EmptySearch from '@zohodesk/svg/lib/emptystate/version3/EmptySearch'; // import { scrollTo } from '@zohodesk/components/lib/utils/Common.js';
|
|
11
|
+
// import TextBox from '@zohodesk/components/lib/TextBox/TextBox';
|
|
12
|
+
|
|
13
13
|
import CommonEmptyState from '../../../emptystate/CommonEmptyState/CommonEmptyState';
|
|
14
14
|
import StatusListItem from '../StatusListItem/StatusListItem';
|
|
15
15
|
import commonStyle from '@zohodesk/components/lib/common/common.module.css';
|
|
@@ -23,20 +23,20 @@ export class StatusDropdown extends React.Component {
|
|
|
23
23
|
super(props);
|
|
24
24
|
this.state = {
|
|
25
25
|
searchString: '',
|
|
26
|
-
selectedIndex: 0,
|
|
26
|
+
// selectedIndex: 0,
|
|
27
27
|
options: props.options
|
|
28
28
|
};
|
|
29
|
-
this.handleChange = this.handleChange.bind(this);
|
|
30
|
-
|
|
29
|
+
this.handleChange = this.handleChange.bind(this); // this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
30
|
+
|
|
31
31
|
this.onSelect = this.onSelect.bind(this);
|
|
32
32
|
this.handleTogglePopup = this.handleTogglePopup.bind(this);
|
|
33
33
|
this.onSearchClear = this.onSearchClear.bind(this);
|
|
34
|
-
this.searchList = this.searchList.bind(this);
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
|
|
34
|
+
this.searchList = this.searchList.bind(this); // this.scrollContentRef = this.scrollContentRef.bind(this);
|
|
35
|
+
// this.handleMouseEnter = this.handleMouseEnter.bind(this);
|
|
36
|
+
// this.searchInputRef = this.searchInputRef.bind(this);
|
|
37
|
+
// this.itemRef = this.itemRef.bind(this);
|
|
38
|
+
// this.inputRef = this.inputRef.bind(this);
|
|
39
|
+
|
|
40
40
|
this.handleScroll = this.handleScroll.bind(this);
|
|
41
41
|
this.emptySearchSVG = this.emptySearchSVG.bind(this);
|
|
42
42
|
this.getAriaId = getUniqueId(this);
|
|
@@ -46,19 +46,16 @@ export class StatusDropdown extends React.Component {
|
|
|
46
46
|
return /*#__PURE__*/React.createElement(EmptySearch, {
|
|
47
47
|
size: "small"
|
|
48
48
|
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
49
|
+
} // inputRef(el) {
|
|
50
|
+
// this.hiddenInput = el;
|
|
51
|
+
// }
|
|
52
|
+
// itemRef(ele, index, id) {
|
|
53
|
+
// this[`suggestion_${id}`] = ele;
|
|
54
|
+
// }
|
|
55
|
+
// searchInputRef(el) {
|
|
56
|
+
// this.searchInput = el;
|
|
57
|
+
// }
|
|
58
58
|
|
|
59
|
-
searchInputRef(el) {
|
|
60
|
-
this.searchInput = el;
|
|
61
|
-
}
|
|
62
59
|
|
|
63
60
|
handleTogglePopup(e) {
|
|
64
61
|
let {
|
|
@@ -71,17 +68,13 @@ export class StatusDropdown extends React.Component {
|
|
|
71
68
|
!isPopupOpen && onSelectLabel && onSelectLabel(e);
|
|
72
69
|
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
73
70
|
togglePopup(e, boxPosition);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
71
|
+
} // scrollContentRef(el) {
|
|
72
|
+
// let { isPopupOpen } = this.props;
|
|
73
|
+
// if (isPopupOpen) {
|
|
74
|
+
// this.optionsContainer = el;
|
|
75
|
+
// }
|
|
76
|
+
// }
|
|
80
77
|
|
|
81
|
-
if (isPopupOpen) {
|
|
82
|
-
this.optionsContainer = el;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
78
|
|
|
86
79
|
componentWillReceiveProps(nextProps) {
|
|
87
80
|
if (nextProps.options.length != this.props.options.length) {
|
|
@@ -104,107 +97,68 @@ export class StatusDropdown extends React.Component {
|
|
|
104
97
|
}
|
|
105
98
|
|
|
106
99
|
componentDidUpdate(prevProps) {
|
|
107
|
-
let {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
let mergeOptions = options;
|
|
124
|
-
let option = mergeOptions[selectedIndex];
|
|
125
|
-
let id = option && option[idName] || {};
|
|
126
|
-
let selSuggestion = this[`suggestion_${id}`];
|
|
127
|
-
|
|
128
|
-
if (isPopupOpen) {
|
|
129
|
-
this.optionsContainer && scrollTo(this.optionsContainer, selSuggestion);
|
|
130
|
-
}
|
|
131
|
-
|
|
100
|
+
// let { isPopupOpen, isSearch, idName } = this.props;
|
|
101
|
+
// let { selectedIndex, options } = this.state;
|
|
102
|
+
// if (prevProps.isPopupOpen != isPopupOpen) {
|
|
103
|
+
// setTimeout(() => {
|
|
104
|
+
// isPopupOpen && isSearch
|
|
105
|
+
// ? this.searchInput && this.searchInput.focus()
|
|
106
|
+
// : this.hiddenInput && this.hiddenInput.focus();
|
|
107
|
+
// }, 10);
|
|
108
|
+
// }
|
|
109
|
+
// let mergeOptions = options;
|
|
110
|
+
// let option = mergeOptions[selectedIndex];
|
|
111
|
+
// let id = (option && option[idName]) || {};
|
|
112
|
+
// let selSuggestion = this[`suggestion_${id}`];
|
|
113
|
+
// if (isPopupOpen) {
|
|
114
|
+
// this.optionsContainer && scrollTo(this.optionsContainer, selSuggestion);
|
|
115
|
+
// }
|
|
132
116
|
if (!prevProps.isPopupOpen && this.props.isPopupOpen) {
|
|
133
117
|
this.onSearchClear();
|
|
134
118
|
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
break;
|
|
179
|
-
|
|
180
|
-
case 38:
|
|
181
|
-
if (selectedIndex === 0) {
|
|
182
|
-
this.setState({
|
|
183
|
-
selectedIndex: totalIndex - 1
|
|
184
|
-
});
|
|
185
|
-
} else {
|
|
186
|
-
this.setState({
|
|
187
|
-
selectedIndex: selectedIndex - 1
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
break;
|
|
119
|
+
} // handleKeyDown(e) {
|
|
120
|
+
// let { keyCode } = e;
|
|
121
|
+
// let { selectedIndex, options } = this.state;
|
|
122
|
+
// let totalIndex = options.length;
|
|
123
|
+
// let { togglePopup, onClick, boxPosition, isPopupReady, isNextOptions, getNextOptions, onTogglePopup, isPopupOpen } =
|
|
124
|
+
// this.props;
|
|
125
|
+
// if (isPopupReady && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
|
|
126
|
+
// e.preventDefault(); //prevent body scroll
|
|
127
|
+
// }
|
|
128
|
+
// if (isPopupReady) {
|
|
129
|
+
// switch (keyCode) {
|
|
130
|
+
// case 40:
|
|
131
|
+
// if (selectedIndex === totalIndex - 1) {
|
|
132
|
+
// this.setState({ selectedIndex: 0 });
|
|
133
|
+
// } else {
|
|
134
|
+
// if (selectedIndex === totalIndex - 3) {
|
|
135
|
+
// isNextOptions && getNextOptions && getNextOptions();
|
|
136
|
+
// }
|
|
137
|
+
// this.setState({ selectedIndex: selectedIndex + 1 });
|
|
138
|
+
// }
|
|
139
|
+
// break;
|
|
140
|
+
// case 38:
|
|
141
|
+
// if (selectedIndex === 0) {
|
|
142
|
+
// this.setState({ selectedIndex: totalIndex - 1 });
|
|
143
|
+
// } else {
|
|
144
|
+
// this.setState({ selectedIndex: selectedIndex - 1 });
|
|
145
|
+
// }
|
|
146
|
+
// break;
|
|
147
|
+
// case 13:
|
|
148
|
+
// onClick && onClick(options[selectedIndex].name, e);
|
|
149
|
+
// onTogglePopup && onTogglePopup(isPopupOpen);
|
|
150
|
+
// togglePopup(e, boxPosition);
|
|
151
|
+
// break;
|
|
152
|
+
// default:
|
|
153
|
+
// break;
|
|
154
|
+
// }
|
|
155
|
+
// } else {
|
|
156
|
+
// if (keyCode === 13 || keyCode === 40) {
|
|
157
|
+
// togglePopup(e, boxPosition);
|
|
158
|
+
// }
|
|
159
|
+
// }
|
|
160
|
+
// }
|
|
192
161
|
|
|
193
|
-
case 13:
|
|
194
|
-
onClick && onClick(options[selectedIndex].name, e);
|
|
195
|
-
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
196
|
-
togglePopup(e, boxPosition);
|
|
197
|
-
break;
|
|
198
|
-
|
|
199
|
-
default:
|
|
200
|
-
break;
|
|
201
|
-
}
|
|
202
|
-
} else {
|
|
203
|
-
if (keyCode === 13 || keyCode === 40) {
|
|
204
|
-
togglePopup(e, boxPosition);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
162
|
|
|
209
163
|
searchList(value) {
|
|
210
164
|
let {
|
|
@@ -219,7 +173,7 @@ export class StatusDropdown extends React.Component {
|
|
|
219
173
|
let foptions = this.searchList(value);
|
|
220
174
|
this.setState({
|
|
221
175
|
searchString: value,
|
|
222
|
-
selectedIndex: -1,
|
|
176
|
+
// selectedIndex: -1,
|
|
223
177
|
options: foptions
|
|
224
178
|
});
|
|
225
179
|
}
|
|
@@ -230,13 +184,12 @@ export class StatusDropdown extends React.Component {
|
|
|
230
184
|
searchString: '',
|
|
231
185
|
options: foptions
|
|
232
186
|
});
|
|
233
|
-
}
|
|
187
|
+
} // handleMouseEnter(id, value, index, e) {
|
|
188
|
+
// this.setState({
|
|
189
|
+
// selectedIndex: index
|
|
190
|
+
// });
|
|
191
|
+
// }
|
|
234
192
|
|
|
235
|
-
handleMouseEnter(id, value, index, e) {
|
|
236
|
-
this.setState({
|
|
237
|
-
selectedIndex: index
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
193
|
|
|
241
194
|
handleScroll(e) {
|
|
242
195
|
const {
|
|
@@ -262,8 +215,7 @@ export class StatusDropdown extends React.Component {
|
|
|
262
215
|
|
|
263
216
|
render() {
|
|
264
217
|
let {
|
|
265
|
-
options
|
|
266
|
-
selectedIndex
|
|
218
|
+
options
|
|
267
219
|
} = this.state;
|
|
268
220
|
let {
|
|
269
221
|
value,
|
|
@@ -328,12 +280,11 @@ export class StatusDropdown extends React.Component {
|
|
|
328
280
|
tagName: "button",
|
|
329
281
|
alignBox: "row",
|
|
330
282
|
className: `${style.container} ${containerClass} ${btnStyle.buttonReset}`,
|
|
331
|
-
|
|
283
|
+
onClick: !showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : null,
|
|
332
284
|
eleRef: getTargetRef,
|
|
333
285
|
align: targetAlign,
|
|
334
286
|
isCover: false,
|
|
335
287
|
dataId: dataId,
|
|
336
|
-
onClick: removeClose,
|
|
337
288
|
disabled: isDisabled || isReadOnly ? true : false,
|
|
338
289
|
"aria-haspopup": isSearch ? 'listbox' : 'menu',
|
|
339
290
|
"aria-expanded": isPopupReady && isEditable ? true : false,
|
|
@@ -341,15 +292,7 @@ export class StatusDropdown extends React.Component {
|
|
|
341
292
|
"aria-labelledby": ariaLabelledby,
|
|
342
293
|
"aria-label": ariaLabel,
|
|
343
294
|
"aria-disabled": isDisabled || isReadOnly
|
|
344
|
-
},
|
|
345
|
-
className: style.hiddenInput
|
|
346
|
-
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
347
|
-
type: "text",
|
|
348
|
-
inputRef: this.inputRef,
|
|
349
|
-
onKeyDown: this.handleKeyDown,
|
|
350
|
-
needAppearance: false,
|
|
351
|
-
placeHolder: placeHolderText
|
|
352
|
-
})) : null, children ? children : /*#__PURE__*/React.createElement(Box, {
|
|
295
|
+
}, children ? children : /*#__PURE__*/React.createElement(Box, {
|
|
353
296
|
className: `${style.value} toggleDropText`,
|
|
354
297
|
shrink: true,
|
|
355
298
|
tagName: "span",
|
|
@@ -383,7 +326,9 @@ export class StatusDropdown extends React.Component {
|
|
|
383
326
|
customDropBoxWrap: style.dropBoxContainer
|
|
384
327
|
},
|
|
385
328
|
needResponsive: needResponsive,
|
|
386
|
-
isResponsivePadding: true
|
|
329
|
+
isResponsivePadding: true,
|
|
330
|
+
needFocusScope: true,
|
|
331
|
+
onClose: this.handleTogglePopup
|
|
387
332
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
|
|
388
333
|
className: style.search
|
|
389
334
|
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
@@ -391,9 +336,14 @@ export class StatusDropdown extends React.Component {
|
|
|
391
336
|
onChange: this.handleChange,
|
|
392
337
|
value: searchString,
|
|
393
338
|
onClear: this.onSearchClear,
|
|
394
|
-
size: searchBoxSize
|
|
395
|
-
|
|
396
|
-
|
|
339
|
+
size: searchBoxSize // inputRef={this.searchInputRef}
|
|
340
|
+
// onKeyDown={this.handleKeyDown}
|
|
341
|
+
,
|
|
342
|
+
customProps: {
|
|
343
|
+
TextBoxProps: {
|
|
344
|
+
'data-a11y-autofocus': true
|
|
345
|
+
}
|
|
346
|
+
},
|
|
397
347
|
a11y: {
|
|
398
348
|
ariaHaspopup: isSearch ? 'listbox' : 'menu',
|
|
399
349
|
ariaExpanded: isPopupReady,
|
|
@@ -415,35 +365,41 @@ export class StatusDropdown extends React.Component {
|
|
|
415
365
|
shrink: true,
|
|
416
366
|
dataId: `${dataId}_list`,
|
|
417
367
|
preventParentScroll: "vertical",
|
|
418
|
-
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}
|
|
419
|
-
|
|
368
|
+
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}` // eleRef={this.scrollContentRef}
|
|
369
|
+
,
|
|
420
370
|
onScroll: this.handleScroll,
|
|
421
371
|
role: isSearch ? 'listbox' : 'menu',
|
|
422
|
-
"
|
|
423
|
-
|
|
424
|
-
}, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) =>
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
372
|
+
tabindex: "-1",
|
|
373
|
+
"data-scroll": "true"
|
|
374
|
+
}, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => {
|
|
375
|
+
const listItemText = item[keyName];
|
|
376
|
+
;
|
|
377
|
+
const isActive = value === listItemText;
|
|
378
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
379
|
+
key: i
|
|
380
|
+
}, /*#__PURE__*/React.createElement(StatusListItem, {
|
|
381
|
+
dataId: `dataid_${i}`,
|
|
382
|
+
value: listItemText,
|
|
383
|
+
id: item[idName],
|
|
384
|
+
active: isActive,
|
|
385
|
+
onClick: this.onSelect.bind(this, item),
|
|
386
|
+
index: i // highlight={selectedIndex === i}
|
|
387
|
+
,
|
|
388
|
+
needTick: needTick,
|
|
389
|
+
needBorder: false // onMouseEnter={this.handleMouseEnter}
|
|
390
|
+
// getRef={this.itemRef}
|
|
391
|
+
,
|
|
392
|
+
bulletColor: item[statusColor],
|
|
393
|
+
title: listItemText,
|
|
394
|
+
needMultiLineText: needMultiLineText,
|
|
395
|
+
autoHover: true,
|
|
396
|
+
a11y: {
|
|
397
|
+
role: isSearch ? 'option' : 'menuitem',
|
|
398
|
+
ariaSelected: isActive,
|
|
399
|
+
ariaLabel: listItemText
|
|
400
|
+
}
|
|
401
|
+
}));
|
|
402
|
+
})) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
|
|
447
403
|
className: style.svgWrapper,
|
|
448
404
|
title: searchErrorText || 'No results',
|
|
449
405
|
description: searchEmptyHint,
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
border-bottom: 1px solid var(--zdt_statusdropdown_line_border);
|
|
82
82
|
margin: var(--zd_size9) 0 var(--zd_size10) ;
|
|
83
83
|
}
|
|
84
|
-
.hiddenInput {
|
|
85
|
-
width: 0
|
|
86
|
-
height: 0
|
|
84
|
+
/* .hiddenInput {
|
|
85
|
+
width: 0;
|
|
86
|
+
height: 0;
|
|
87
87
|
opacity: 0;
|
|
88
88
|
}
|
|
89
89
|
.hiddenInput > input {
|
|
90
|
-
width: 100
|
|
91
|
-
padding: 0
|
|
92
|
-
}
|
|
90
|
+
width: 100%;
|
|
91
|
+
padding: 0;
|
|
92
|
+
} */
|
|
@@ -76,7 +76,9 @@ export default class StatusListItem extends React.Component {
|
|
|
76
76
|
let {
|
|
77
77
|
role,
|
|
78
78
|
ariaSelected,
|
|
79
|
-
ariaHidden = true
|
|
79
|
+
ariaHidden = true,
|
|
80
|
+
ariaLabel,
|
|
81
|
+
insetFocus = true
|
|
80
82
|
} = a11y;
|
|
81
83
|
|
|
82
84
|
if (isLink) {
|
|
@@ -87,6 +89,8 @@ export default class StatusListItem extends React.Component {
|
|
|
87
89
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
88
90
|
role: role,
|
|
89
91
|
"aria-selected": ariaSelected,
|
|
92
|
+
"aria-label": ariaLabel,
|
|
93
|
+
"data-a11y-inset-focus": insetFocus,
|
|
90
94
|
isCover: false,
|
|
91
95
|
align: "baseline",
|
|
92
96
|
alignBox: "row",
|
|
@@ -6,58 +6,43 @@
|
|
|
6
6
|
min-height: var(--zd_size35) ;
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
[dir=ltr] .withBorder {
|
|
11
10
|
border-left: 1px solid var(--zdt_statuslistitem_default_border);
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
[dir=rtl] .withBorder {
|
|
15
13
|
border-right: 1px solid var(--zdt_statuslistitem_default_border);
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
[dir=ltr] .small {
|
|
19
16
|
padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5) ;
|
|
20
17
|
}
|
|
21
|
-
|
|
22
18
|
[dir=rtl] .small {
|
|
23
19
|
padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size3) ;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
.medium {
|
|
27
22
|
padding: var(--zd_size7) var(--zd_size20) ;
|
|
28
23
|
}
|
|
29
|
-
|
|
30
24
|
.large {
|
|
31
25
|
height: var(--zd_size48) ;
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
[dir=ltr] .large {
|
|
35
28
|
padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25) ;
|
|
36
29
|
}
|
|
37
|
-
|
|
38
30
|
[dir=rtl] .large {
|
|
39
31
|
padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3) ;
|
|
40
32
|
}
|
|
41
|
-
|
|
42
|
-
.value,
|
|
43
|
-
.multiLineValue {
|
|
33
|
+
.value,.multiLineValue {
|
|
44
34
|
line-height: 1.5385;
|
|
45
35
|
}
|
|
46
|
-
|
|
47
36
|
.value {
|
|
48
37
|
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
49
38
|
}
|
|
50
|
-
|
|
51
|
-
.multiLineValue {
|
|
39
|
+
.multiLineValue{
|
|
52
40
|
word-break: break-word;
|
|
53
|
-
-webkit-line-clamp: 5;
|
|
54
41
|
composes: clamp from '~@zohodesk/components/lib/common/common.module.css';
|
|
55
42
|
}
|
|
56
|
-
|
|
57
43
|
[dir=ltr] .withBorder.active {
|
|
58
44
|
border-left-color: var(--zdt_statuslistitem_default_active_border);
|
|
59
45
|
}
|
|
60
|
-
|
|
61
46
|
[dir=rtl] .withBorder.active {
|
|
62
47
|
border-right-color: var(--zdt_statuslistitem_default_active_border);
|
|
63
48
|
}
|
|
@@ -65,56 +50,44 @@
|
|
|
65
50
|
.default.hover, .default.effect:hover {
|
|
66
51
|
background-color: var(--zdt_statuslistitem_default_effect_bg);
|
|
67
52
|
}
|
|
68
|
-
|
|
69
53
|
.primary.hover, .primary.effect:hover, .selected {
|
|
70
54
|
background-color: var(--zdt_statuslistitem_primary_efffect_bg);
|
|
71
55
|
}
|
|
72
|
-
|
|
73
56
|
.secondary.hover, .secondary.effect:hover {
|
|
74
57
|
background-color: var(--zdt_statuslistitem_secondary_effect_bg);
|
|
75
58
|
}
|
|
76
|
-
|
|
77
59
|
.list.active.default, .list.active.primary {
|
|
78
60
|
background-color: var(--zdt_statuslistitem_primary_efffect_bg);
|
|
79
61
|
}
|
|
80
|
-
|
|
81
62
|
.list.active.secondary {
|
|
82
63
|
background-color: var(--zdt_statuslistitem_secondary_effect_bg);
|
|
83
64
|
}
|
|
84
|
-
|
|
85
65
|
.secondary.hover,
|
|
86
66
|
.secondary.effect:hover,
|
|
87
67
|
.list.active.secondary {
|
|
88
68
|
color: var(--zdt_statuslistitem_secondary_effect_text);
|
|
89
69
|
}
|
|
90
|
-
|
|
91
70
|
.tickIcon {
|
|
92
71
|
color: var(--zdt_statuslistitem_tickicon);
|
|
93
72
|
position: absolute;
|
|
94
|
-
top:
|
|
73
|
+
top:50% ;
|
|
95
74
|
transform: translateY(-50%);
|
|
96
75
|
}
|
|
97
|
-
|
|
98
76
|
[dir=ltr] .tickIcon {
|
|
99
77
|
right: var(--zd_size20) ;
|
|
100
78
|
}
|
|
101
|
-
|
|
102
79
|
[dir=rtl] .tickIcon {
|
|
103
80
|
left: var(--zd_size20) ;
|
|
104
81
|
}
|
|
105
|
-
|
|
106
|
-
.tickIcon>i {
|
|
82
|
+
.tickIcon > i {
|
|
107
83
|
display: block;
|
|
108
84
|
}
|
|
109
|
-
|
|
110
85
|
[dir=ltr] .active.withTick {
|
|
111
86
|
padding-right: var(--zd_size39) ;
|
|
112
87
|
}
|
|
113
|
-
|
|
114
88
|
[dir=rtl] .active.withTick {
|
|
115
89
|
padding-left: var(--zd_size39) ;
|
|
116
90
|
}
|
|
117
|
-
|
|
118
91
|
/* Status Type */
|
|
119
92
|
.statusType {
|
|
120
93
|
width: var(--zd_size8) ;
|
|
@@ -127,15 +100,12 @@
|
|
|
127
100
|
[dir=rtl] .statusType {
|
|
128
101
|
margin-left: var(--zd_size13) ;
|
|
129
102
|
}
|
|
130
|
-
|
|
131
103
|
.black {
|
|
132
104
|
background-color: var(--zdt_statuslistitem_black_bg);
|
|
133
105
|
}
|
|
134
|
-
|
|
135
106
|
.orange {
|
|
136
107
|
background-color: var(--zdt_statuslistitem_orange_bg);
|
|
137
108
|
}
|
|
138
|
-
|
|
139
109
|
.green {
|
|
140
110
|
background-color: var(--zdt_statuslistitem_green_bg);
|
|
141
|
-
}
|
|
111
|
+
}
|