@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
|
@@ -7,13 +7,12 @@ import style from '../../../list/Thread/Thread.module.css';
|
|
|
7
7
|
|
|
8
8
|
const Thread = props => {
|
|
9
9
|
const {
|
|
10
|
-
count
|
|
10
|
+
count,
|
|
11
11
|
className,
|
|
12
12
|
iconTitle,
|
|
13
13
|
dataId,
|
|
14
14
|
align
|
|
15
15
|
} = props;
|
|
16
|
-
const count = threadCount === '0' ? '1' : threadCount;
|
|
17
16
|
return /*#__PURE__*/React.createElement(Button, {
|
|
18
17
|
customClass: `${style.container} ${style[`align_${align}`]} ${className}`,
|
|
19
18
|
title: iconTitle,
|
|
@@ -8,9 +8,9 @@ import { Box, Container } from '@zohodesk/components/es/v1/Layout';
|
|
|
8
8
|
import DropDownHeading from '@zohodesk/components/es/v1/DropDown/DropDownHeading';
|
|
9
9
|
import TextBoxIcon from '@zohodesk/components/es/v1/TextBoxIcon/TextBoxIcon';
|
|
10
10
|
import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
11
|
-
import EmptySearch from '@zohodesk/svg/lib/emptystate/version3/EmptySearch';
|
|
12
|
-
import
|
|
13
|
-
|
|
11
|
+
import EmptySearch from '@zohodesk/svg/lib/emptystate/version3/EmptySearch'; // import { scrollTo } from '@zohodesk/components/es/utils/Common';
|
|
12
|
+
// import TextBox from '@zohodesk/components/es/v1/TextBox/TextBox';
|
|
13
|
+
|
|
14
14
|
import CommonEmptyState from '../../../emptystate/CommonEmptyState/CommonEmptyState';
|
|
15
15
|
import StatusListItem from '../StatusListItem/StatusListItem';
|
|
16
16
|
import commonStyle from '@zohodesk/components/es/common/common.module.css';
|
|
@@ -73,13 +73,13 @@ function StatusDropdown(props) {
|
|
|
73
73
|
options,
|
|
74
74
|
a11y = {}
|
|
75
75
|
} = props;
|
|
76
|
-
const [optionsList, setOptionsList] = useState(options);
|
|
77
|
-
|
|
78
|
-
const [searchString, setSearchString] = useState('');
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
|
|
76
|
+
const [optionsList, setOptionsList] = useState(options); // const [selectedIndex, setSelectedIndex] = useState(0);
|
|
77
|
+
|
|
78
|
+
const [searchString, setSearchString] = useState(''); // const hiddenInput = useRef(null);
|
|
79
|
+
// const searchInput = useRef(null);
|
|
80
|
+
// const optionsContainer = useRef(null);
|
|
81
|
+
// const dropdown = useRef({});
|
|
82
|
+
|
|
83
83
|
const getAriaId = useUniqueId();
|
|
84
84
|
const {
|
|
85
85
|
tabIndex = 0,
|
|
@@ -94,87 +94,72 @@ function StatusDropdown(props) {
|
|
|
94
94
|
return /*#__PURE__*/React.createElement(EmptySearch, {
|
|
95
95
|
size: "small"
|
|
96
96
|
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
97
|
+
} // function handleInputRef(el) {
|
|
98
|
+
// hiddenInput.current = el;
|
|
99
|
+
// }
|
|
100
|
+
// function itemRef(ele, index, id) {
|
|
101
|
+
// dropdown.current[`suggestion_${id}`] = ele;
|
|
102
|
+
// }
|
|
103
|
+
// function searchInputRef(el) {
|
|
104
|
+
// searchInput.current = el;
|
|
105
|
+
// }
|
|
102
106
|
|
|
103
|
-
function itemRef(ele, index, id) {
|
|
104
|
-
dropdown.current[`suggestion_${id}`] = ele;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function searchInputRef(el) {
|
|
108
|
-
searchInput.current = el;
|
|
109
|
-
}
|
|
110
107
|
|
|
111
108
|
function handleTogglePopup(e) {
|
|
112
109
|
!isPopupOpen && onSelectLabel && onSelectLabel(e);
|
|
113
110
|
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
114
111
|
togglePopup(e, boxPosition);
|
|
115
|
-
}
|
|
112
|
+
} // function scrollContentRef(el) {
|
|
113
|
+
// if (isPopupOpen) {
|
|
114
|
+
// optionsContainer.current = el;
|
|
115
|
+
// }
|
|
116
|
+
// }
|
|
116
117
|
|
|
117
|
-
function scrollContentRef(el) {
|
|
118
|
-
if (isPopupOpen) {
|
|
119
|
-
optionsContainer.current = el;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
118
|
|
|
123
119
|
function onSelect(element, e) {
|
|
124
120
|
onClick && onClick(e, element);
|
|
125
121
|
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
126
122
|
togglePopup(e);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
123
|
+
} // function handleKeyDown(e) {
|
|
124
|
+
// let { keyCode } = e;
|
|
125
|
+
// let totalIndex = optionsList.length;
|
|
126
|
+
// if (isPopupReady && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
|
|
127
|
+
// e.preventDefault(); //prevent body scroll
|
|
128
|
+
// }
|
|
129
|
+
// if (isPopupReady) {
|
|
130
|
+
// switch (keyCode) {
|
|
131
|
+
// case 40:
|
|
132
|
+
// if (selectedIndex === totalIndex - 1) {
|
|
133
|
+
// setSelectedIndex(0);
|
|
134
|
+
// } else {
|
|
135
|
+
// if (selectedIndex === totalIndex - 3) {
|
|
136
|
+
// isNextOptions && getNextOptions && getNextOptions();
|
|
137
|
+
// }
|
|
138
|
+
// setSelectedIndex(selectedIndex + 1);
|
|
139
|
+
// }
|
|
140
|
+
// break;
|
|
141
|
+
// case 38:
|
|
142
|
+
// if (selectedIndex === 0) {
|
|
143
|
+
// setSelectedIndex(totalIndex - 1);
|
|
144
|
+
// } else {
|
|
145
|
+
// setSelectedIndex(selectedIndex - 1);
|
|
146
|
+
// }
|
|
147
|
+
// break;
|
|
148
|
+
// case 13:
|
|
149
|
+
// onClick && onClick(optionsList[selectedIndex].name, e);
|
|
150
|
+
// onTogglePopup && onTogglePopup(isPopupOpen);
|
|
151
|
+
// togglePopup(e, boxPosition);
|
|
152
|
+
// break;
|
|
153
|
+
// default:
|
|
154
|
+
// break;
|
|
155
|
+
// }
|
|
156
|
+
// } else {
|
|
157
|
+
// if (keyCode === 13 || keyCode === 40) {
|
|
158
|
+
// togglePopup(e, boxPosition);
|
|
159
|
+
// }
|
|
160
|
+
// }
|
|
161
|
+
// }
|
|
148
162
|
|
|
149
|
-
setSelectedIndex(selectedIndex + 1);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
break;
|
|
153
|
-
|
|
154
|
-
case 38:
|
|
155
|
-
if (selectedIndex === 0) {
|
|
156
|
-
setSelectedIndex(totalIndex - 1);
|
|
157
|
-
} else {
|
|
158
|
-
setSelectedIndex(selectedIndex - 1);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
break;
|
|
162
|
-
|
|
163
|
-
case 13:
|
|
164
|
-
onClick && onClick(optionsList[selectedIndex].name, e);
|
|
165
|
-
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
166
|
-
togglePopup(e, boxPosition);
|
|
167
|
-
break;
|
|
168
|
-
|
|
169
|
-
default:
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
} else {
|
|
173
|
-
if (keyCode === 13 || keyCode === 40) {
|
|
174
|
-
togglePopup(e, boxPosition);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
163
|
|
|
179
164
|
function searchList(value) {
|
|
180
165
|
let foptions = options.filter(dept => dept[keyName].toLowerCase().indexOf(value.toLowerCase()) != -1);
|
|
@@ -183,8 +168,8 @@ function StatusDropdown(props) {
|
|
|
183
168
|
|
|
184
169
|
function handleChange(value, e) {
|
|
185
170
|
let foptions = searchList(value);
|
|
186
|
-
setSearchString(value);
|
|
187
|
-
|
|
171
|
+
setSearchString(value); // setSelectedIndex(-1);
|
|
172
|
+
|
|
188
173
|
setOptionsList(foptions);
|
|
189
174
|
}
|
|
190
175
|
|
|
@@ -192,11 +177,10 @@ function StatusDropdown(props) {
|
|
|
192
177
|
let foptions = searchList('');
|
|
193
178
|
setSearchString('');
|
|
194
179
|
setOptionsList(foptions);
|
|
195
|
-
}
|
|
180
|
+
} // function handleMouseEnter(id, value, index, e) {
|
|
181
|
+
// setSelectedIndex(index);
|
|
182
|
+
// }
|
|
196
183
|
|
|
197
|
-
function handleMouseEnter(id, value, index, e) {
|
|
198
|
-
setSelectedIndex(index);
|
|
199
|
-
}
|
|
200
184
|
|
|
201
185
|
function handleScroll(e) {
|
|
202
186
|
if (e.target.scrollTop + e.target.offsetHeight > e.target.scrollHeight - 1) {
|
|
@@ -219,18 +203,19 @@ function StatusDropdown(props) {
|
|
|
219
203
|
setOptionsList(options);
|
|
220
204
|
}, [options.length]);
|
|
221
205
|
useEffectCallOnlyAfterState(() => {
|
|
222
|
-
setTimeout(() => {
|
|
223
|
-
isPopupOpen && isSearch ? searchInput.current && searchInput.current.focus() : hiddenInput.current && hiddenInput.current.focus();
|
|
224
|
-
}, 10);
|
|
225
|
-
let mergeOptions = optionsList;
|
|
226
|
-
let option = mergeOptions[selectedIndex];
|
|
227
|
-
let id = option && option[idName] || {};
|
|
228
|
-
let selSuggestion = dropdown.current[`suggestion_${id}`];
|
|
229
|
-
|
|
230
206
|
if (isPopupOpen) {
|
|
231
|
-
optionsContainer.current && scrollTo(optionsContainer.current, selSuggestion);
|
|
232
207
|
onSearchClear();
|
|
233
|
-
}
|
|
208
|
+
} // setTimeout(() => {
|
|
209
|
+
// isPopupOpen && isSearch
|
|
210
|
+
// ? searchInput.current && searchInput.current.focus()
|
|
211
|
+
// : hiddenInput.current && hiddenInput.current.focus();
|
|
212
|
+
// }, 10);
|
|
213
|
+
// let mergeOptions = optionsList;
|
|
214
|
+
// let option = mergeOptions[selectedIndex];
|
|
215
|
+
// let id = (option && option[idName]) || {};
|
|
216
|
+
// let selSuggestion = dropdown.current[`suggestion_${id}`];
|
|
217
|
+
// optionsContainer.current && scrollTo(optionsContainer.current, selSuggestion);
|
|
218
|
+
|
|
234
219
|
}, [isPopupOpen]);
|
|
235
220
|
return /*#__PURE__*/React.createElement("div", {
|
|
236
221
|
className: style.posRel,
|
|
@@ -240,12 +225,12 @@ function StatusDropdown(props) {
|
|
|
240
225
|
tagName: "button",
|
|
241
226
|
alignBox: "row",
|
|
242
227
|
className: `${style.container} ${containerClass} ${btnStyle.buttonReset}`,
|
|
243
|
-
|
|
228
|
+
onClick: !showOnHover && !isDisabled && !isReadOnly && isEditable ? handleTogglePopup : null,
|
|
244
229
|
eleRef: getTargetRef,
|
|
245
230
|
align: targetAlign,
|
|
246
231
|
isCover: false,
|
|
247
|
-
dataId: dataId
|
|
248
|
-
|
|
232
|
+
dataId: dataId // onClick={removeClose}
|
|
233
|
+
,
|
|
249
234
|
disabled: isDisabled || isReadOnly ? true : false,
|
|
250
235
|
"aria-haspopup": isSearch ? 'listbox' : 'menu',
|
|
251
236
|
"aria-expanded": isPopupReady && isEditable ? true : false,
|
|
@@ -253,15 +238,7 @@ function StatusDropdown(props) {
|
|
|
253
238
|
"aria-labelledby": ariaLabelledby,
|
|
254
239
|
"aria-label": ariaLabel,
|
|
255
240
|
"aria-disabled": isDisabled || isReadOnly
|
|
256
|
-
},
|
|
257
|
-
className: style.hiddenInput
|
|
258
|
-
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
259
|
-
type: "text",
|
|
260
|
-
inputRef: handleInputRef,
|
|
261
|
-
onKeyDown: handleKeyDown,
|
|
262
|
-
needAppearance: false,
|
|
263
|
-
placeHolder: placeHolderText
|
|
264
|
-
})) : null, children ? children : /*#__PURE__*/React.createElement(Box, {
|
|
241
|
+
}, children ? children : /*#__PURE__*/React.createElement(Box, {
|
|
265
242
|
className: `${style.value} toggleDropText`,
|
|
266
243
|
shrink: true,
|
|
267
244
|
tagName: "span",
|
|
@@ -295,7 +272,9 @@ function StatusDropdown(props) {
|
|
|
295
272
|
customDropBoxWrap: style.dropBoxContainer
|
|
296
273
|
},
|
|
297
274
|
needResponsive: needResponsive,
|
|
298
|
-
isResponsivePadding: true
|
|
275
|
+
isResponsivePadding: true,
|
|
276
|
+
needFocusScope: true,
|
|
277
|
+
onClose: handleTogglePopup
|
|
299
278
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
|
|
300
279
|
className: style.search
|
|
301
280
|
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
@@ -303,9 +282,14 @@ function StatusDropdown(props) {
|
|
|
303
282
|
onChange: handleChange,
|
|
304
283
|
value: searchString,
|
|
305
284
|
onClear: onSearchClear,
|
|
306
|
-
size: searchBoxSize
|
|
307
|
-
|
|
308
|
-
|
|
285
|
+
size: searchBoxSize // inputRef={searchInputRef}
|
|
286
|
+
// onKeyDown={handleKeyDown}
|
|
287
|
+
,
|
|
288
|
+
customProps: {
|
|
289
|
+
TextBoxProps: {
|
|
290
|
+
'data-a11y-autofocus': true
|
|
291
|
+
}
|
|
292
|
+
},
|
|
309
293
|
a11y: {
|
|
310
294
|
ariaHaspopup: isSearch ? 'listbox' : 'menu',
|
|
311
295
|
ariaExpanded: isPopupReady,
|
|
@@ -327,35 +311,40 @@ function StatusDropdown(props) {
|
|
|
327
311
|
shrink: true,
|
|
328
312
|
dataId: `${dataId}_list`,
|
|
329
313
|
preventParentScroll: "vertical",
|
|
330
|
-
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}
|
|
331
|
-
|
|
314
|
+
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}` // eleRef={scrollContentRef}
|
|
315
|
+
,
|
|
332
316
|
onScroll: handleScroll,
|
|
333
317
|
role: isSearch ? 'listbox' : 'menu',
|
|
334
|
-
"
|
|
335
|
-
|
|
336
|
-
}, optionsList.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, optionsList.map((item, i) =>
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
318
|
+
tabindex: "-1",
|
|
319
|
+
"data-scroll": "true"
|
|
320
|
+
}, optionsList.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, optionsList.map((item, i) => {
|
|
321
|
+
const listItemText = item[keyName];
|
|
322
|
+
const isActive = value === listItemText;
|
|
323
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
324
|
+
key: i
|
|
325
|
+
}, /*#__PURE__*/React.createElement(StatusListItem, {
|
|
326
|
+
dataId: `dataid_${i}`,
|
|
327
|
+
value: listItemText,
|
|
328
|
+
id: item[idName],
|
|
329
|
+
active: isActive,
|
|
330
|
+
onClick: e => onSelect(item, e),
|
|
331
|
+
index: i // highlight={selectedIndex === i}
|
|
332
|
+
,
|
|
333
|
+
needTick: needTick,
|
|
334
|
+
needBorder: false // onMouseEnter={handleMouseEnter}
|
|
335
|
+
// getRef={itemRef}
|
|
336
|
+
,
|
|
337
|
+
bulletColor: item[statusColor],
|
|
338
|
+
title: listItemText,
|
|
339
|
+
needMultiLineText: needMultiLineText,
|
|
340
|
+
autoHover: true,
|
|
341
|
+
a11y: {
|
|
342
|
+
role: isSearch ? 'option' : 'menuitem',
|
|
343
|
+
ariaSelected: isActive,
|
|
344
|
+
ariaLabel: listItemText
|
|
345
|
+
}
|
|
346
|
+
}));
|
|
347
|
+
})) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
|
|
359
348
|
className: style.svgWrapper,
|
|
360
349
|
title: searchErrorText || 'No results',
|
|
361
350
|
description: searchEmptyHint,
|
|
@@ -43,7 +43,9 @@ export default function StatusListItem(props) {
|
|
|
43
43
|
let {
|
|
44
44
|
role,
|
|
45
45
|
ariaSelected,
|
|
46
|
-
ariaHidden = true
|
|
46
|
+
ariaHidden = true,
|
|
47
|
+
ariaLabel,
|
|
48
|
+
insetFocus = true
|
|
47
49
|
} = a11y;
|
|
48
50
|
|
|
49
51
|
if (isLink) {
|
|
@@ -69,6 +71,8 @@ export default function StatusListItem(props) {
|
|
|
69
71
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
70
72
|
role: role,
|
|
71
73
|
"aria-selected": ariaSelected,
|
|
74
|
+
"aria-label": ariaLabel,
|
|
75
|
+
"data-a11y-inset-focus": insetFocus,
|
|
72
76
|
isCover: false,
|
|
73
77
|
align: "baseline",
|
|
74
78
|
alignBox: "row",
|
|
@@ -223,9 +223,7 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
223
223
|
_customProps$TagWrapp = customProps.TagWrapperProps,
|
|
224
224
|
TagWrapperProps = _customProps$TagWrapp === void 0 ? {} : _customProps$TagWrapp,
|
|
225
225
|
_customProps$TagProps = customProps.TagProps,
|
|
226
|
-
TagProps = _customProps$TagProps === void 0 ? {} : _customProps$TagProps
|
|
227
|
-
_customProps$listProp = customProps.listProps,
|
|
228
|
-
listProps = _customProps$listProp === void 0 ? {} : _customProps$listProp;
|
|
226
|
+
TagProps = _customProps$TagProps === void 0 ? {} : _customProps$TagProps;
|
|
229
227
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
230
228
|
className: "".concat(_TagsMultiSelectModule["default"].container, " ").concat(!isReadOnly ? " ".concat(needBorder ? _TagsMultiSelectModule["default"].hasBorder : '', "\n ").concat(needBorder ? _TagsMultiSelectModule["default"]["borderColor_".concat(borderColor)] : _TagsMultiSelectModule["default"].borderColor_transparent, " ").concat(isPopupReady && needBorder ? _TagsMultiSelectModule["default"].active : '') : '', " ").concat(className),
|
|
231
229
|
onClick: _General.stopBubbling,
|
|
@@ -329,7 +327,7 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
329
327
|
var name = item.name,
|
|
330
328
|
isNew = item.isNew,
|
|
331
329
|
listItemProps = item.listItemProps;
|
|
332
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/_react["default"].createElement(_DropDownSeparator["default"], null) : null, /*#__PURE__*/_react["default"].createElement(_ListItem["default"],
|
|
330
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/_react["default"].createElement(_DropDownSeparator["default"], null) : null, /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
|
|
333
331
|
key: index,
|
|
334
332
|
index: index,
|
|
335
333
|
autoHover: true,
|
|
@@ -342,7 +340,7 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
342
340
|
isDisabled: listDisabled,
|
|
343
341
|
customProps: listItemProps,
|
|
344
342
|
customClass: listItemClass
|
|
345
|
-
},
|
|
343
|
+
}, isNew ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
346
344
|
alignBox: "row",
|
|
347
345
|
align: "vertical"
|
|
348
346
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
@@ -25,8 +25,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
29
|
|
|
32
30
|
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); } }
|
|
@@ -102,10 +100,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
102
100
|
onSearch = _this$props3.onSearch,
|
|
103
101
|
needSearchFetching = _this$props3.needSearchFetching,
|
|
104
102
|
searchStr = _this$props3.searchStr,
|
|
105
|
-
i18nKeys = _this$props3.i18nKeys
|
|
106
|
-
customProps = _this$props3.customProps;
|
|
107
|
-
var _customProps$toggleDr = customProps.toggleDropDownProps,
|
|
108
|
-
toggleDropDownProps = _customProps$toggleDr === void 0 ? {} : _customProps$toggleDr;
|
|
103
|
+
i18nKeys = _this$props3.i18nKeys;
|
|
109
104
|
var _i18nKeys$title = i18nKeys.title,
|
|
110
105
|
title = _i18nKeys$title === void 0 ? 'Move Department' : _i18nKeys$title,
|
|
111
106
|
_i18nKeys$searchEmpty = i18nKeys.searchEmptyText,
|
|
@@ -114,7 +109,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
114
109
|
searchErrorText = _i18nKeys$searchError === void 0 ? 'No results' : _i18nKeys$searchError,
|
|
115
110
|
_i18nKeys$placeholder = i18nKeys.placeholder,
|
|
116
111
|
placeholder = _i18nKeys$placeholder === void 0 ? 'Search Department' : _i18nKeys$placeholder;
|
|
117
|
-
return /*#__PURE__*/_react["default"].createElement(_ToggleDropDown["default"],
|
|
112
|
+
return /*#__PURE__*/_react["default"].createElement(_ToggleDropDown["default"], {
|
|
118
113
|
title: title,
|
|
119
114
|
options: departmentList,
|
|
120
115
|
value: /*#__PURE__*/_react["default"].createElement(_SecondaryText.DepartmentText, {
|
|
@@ -143,7 +138,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
143
138
|
isNextOptions: isNextOptions,
|
|
144
139
|
onSearch: onSearch,
|
|
145
140
|
needSearchFetching: needSearchFetching
|
|
146
|
-
}
|
|
141
|
+
});
|
|
147
142
|
}
|
|
148
143
|
}]);
|
|
149
144
|
|
|
@@ -31,5 +31,5 @@ var propTypes = (_propTypes = {
|
|
|
31
31
|
searchEmptyText: _propTypes2["default"].string,
|
|
32
32
|
searchErrorText: _propTypes2["default"].string,
|
|
33
33
|
placeholder: _propTypes2["default"].string
|
|
34
|
-
})),
|
|
34
|
+
})), _propTypes);
|
|
35
35
|
exports.propTypes = propTypes;
|
|
@@ -60,12 +60,11 @@ var Thread = /*#__PURE__*/function (_Component) {
|
|
|
60
60
|
key: "render",
|
|
61
61
|
value: function render() {
|
|
62
62
|
var _this$props = this.props,
|
|
63
|
-
|
|
63
|
+
count = _this$props.count,
|
|
64
64
|
className = _this$props.className,
|
|
65
65
|
iconTitle = _this$props.iconTitle,
|
|
66
66
|
dataId = _this$props.dataId,
|
|
67
67
|
align = _this$props.align;
|
|
68
|
-
var count = threadCount === '0' ? '1' : threadCount;
|
|
69
68
|
return /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
70
69
|
customClass: "".concat(_ThreadModule["default"].container, " ").concat(_ThreadModule["default"]["align_".concat(align)], " ").concat(className),
|
|
71
70
|
title: iconTitle,
|