@zohodesk/dot 1.0.0-temp-184.2 → 1.0.0-temp-186
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/README.md +8 -0
- 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/index.html +1 -1
- package/es/Drawer/Drawer.js +4 -5
- package/es/ExternalLink/ExternalLink.js +4 -5
- package/es/FlipCard/FlipCard.js +14 -12
- package/es/IconButton/IconButton.js +4 -5
- package/es/Link/Link.js +8 -10
- package/es/Message/Message.js +4 -5
- package/es/ToastMessage/ToastMessage.js +2 -4
- package/es/actions/AutoClose.js +2 -1
- package/es/alert/AlertLookup/AlertLookup.js +14 -12
- package/es/avatar/AvatarClose/AvatarClose.js +7 -7
- package/es/avatar/AvatarCollision/AvatarCollision.js +7 -7
- package/es/avatar/AvatarIcon/AvatarIcon.js +4 -5
- package/es/avatar/AvatarStatus/AvatarStatus.js +7 -8
- package/es/avatar/AvatarThread/AvatarThread.js +7 -7
- package/es/avatar/AvatarUser/AvatarUser.js +10 -9
- package/es/avatar/AvatarWithTeam/AvatarWithTeam.js +17 -14
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +28 -24
- package/es/form/fields/CheckBoxField/CheckBoxField.js +15 -13
- package/es/form/fields/CurrencyField/CurrencyField.js +14 -12
- package/es/form/fields/DateField/DateField.js +14 -14
- package/es/form/fields/MultiSelectField/MultiSelectField.js +13 -12
- package/es/form/fields/PhoneField/PhoneField.js +7 -7
- package/es/form/fields/RadioField/RadioField.js +18 -15
- package/es/form/fields/SelectField/SelectField.js +14 -14
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +15 -11
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -11
- package/es/form/fields/TextBoxField/TextBoxField.js +14 -14
- package/es/form/fields/TextEditorField/TextEditorField.js +11 -10
- package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +11 -10
- package/es/form/fields/TextareaField/TextareaField.js +14 -13
- package/es/layout/SubtabLayout/SubtabLayout.js +4 -6
- package/es/list/ListLayout/ListLayout.js +4 -5
- package/es/list/SecondaryText/AccountName.js +12 -12
- package/es/list/SecondaryText/ContactName.js +8 -9
- package/es/list/SecondaryText/Email.js +8 -8
- package/es/list/SecondaryText/PhoneNumber.js +8 -8
- package/es/list/SecondaryText/SecondaryText.js +4 -5
- package/es/list/SecondaryText/TicketId.js +7 -7
- package/es/list/Subject/Subject.js +7 -7
- package/es/list/status/StatusDropdown/StatusDropdown.js +30 -115
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +1 -10
- package/es/list/status/StatusDropdown/props/defaultProps.js +2 -1
- package/es/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/es/list/status/StatusListItem/StatusListItem.js +5 -5
- package/es/lookup/Lookup/Lookup.js +4 -5
- package/es/lookup/header/Search/Search.js +5 -3
- package/es/v1/Drawer/Drawer.js +4 -5
- package/es/v1/ExternalLink/ExternalLink.js +4 -5
- package/es/v1/FlipCard/FlipCard.js +14 -12
- package/es/v1/GlobalNotification/GlobalNotification.js +6 -7
- package/es/v1/IconButton/IconButton.js +4 -5
- package/es/v1/Link/Link.js +8 -10
- package/es/v1/Message/Message.js +4 -5
- package/es/v1/ToastMessage/ToastMessage.js +2 -4
- package/es/v1/actions/AutoClose.js +2 -1
- package/es/v1/alert/AlertLookup/AlertLookup.js +15 -15
- package/es/v1/avatar/AvatarClose/AvatarClose.js +7 -7
- package/es/v1/avatar/AvatarCollision/AvatarCollision.js +7 -7
- package/es/v1/avatar/AvatarIcon/AvatarIcon.js +4 -5
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +7 -8
- package/es/v1/avatar/AvatarThread/AvatarThread.js +7 -7
- package/es/v1/avatar/AvatarUser/AvatarUser.js +10 -9
- package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +17 -14
- package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +28 -24
- package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +15 -13
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +14 -12
- package/es/v1/form/fields/DateField/DateField.js +14 -14
- package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +13 -12
- package/es/v1/form/fields/PhoneField/PhoneField.js +7 -7
- package/es/v1/form/fields/RadioField/RadioField.js +18 -16
- package/es/v1/form/fields/SelectField/SelectField.js +14 -14
- package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +15 -11
- package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -11
- package/es/v1/form/fields/TextBoxField/TextBoxField.js +14 -14
- package/es/v1/form/fields/TextEditorField/TextEditorField.js +11 -10
- package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +11 -10
- package/es/v1/form/fields/TextareaField/TextareaField.js +14 -13
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +4 -6
- package/es/v1/list/ListLayout/ListLayout.js +4 -5
- package/es/v1/list/SecondaryText/AccountName.js +12 -12
- package/es/v1/list/SecondaryText/ContactName.js +8 -9
- package/es/v1/list/SecondaryText/Email.js +8 -8
- package/es/v1/list/SecondaryText/PhoneNumber.js +8 -8
- package/es/v1/list/SecondaryText/SecondaryText.js +4 -5
- package/es/v1/list/SecondaryText/TicketId.js +7 -7
- package/es/v1/list/Subject/Subject.js +7 -7
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +32 -106
- package/es/v1/list/status/StatusDropdown/props/defaultProps.js +2 -1
- package/es/v1/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/es/v1/list/status/StatusListItem/StatusListItem.js +5 -5
- package/es/v1/lookup/Lookup/Lookup.js +4 -5
- package/es/v1/lookup/header/Search/Search.js +5 -3
- package/es/v1/notification/DesktopNotification/DesktopNotification.js +6 -7
- package/es/version2/GlobalNotification/GlobalNotification.js +6 -7
- package/es/version2/lookup/AlertLookup/AlertLookup.js +15 -15
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +6 -7
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +2 -1
- package/lib/list/status/StatusDropdown/StatusDropdown.js +77 -161
- package/lib/list/status/StatusDropdown/StatusDropdown.module.css +1 -10
- package/lib/list/status/StatusDropdown/props/defaultProps.js +2 -1
- package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +2 -1
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +31 -103
- package/lib/v1/list/status/StatusDropdown/props/defaultProps.js +2 -1
- package/lib/v1/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/package.json +3 -3
- package/result.json +1 -1
|
@@ -8,9 +8,7 @@ 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 TextBox from '@zohodesk/components/es/v1/TextBox/TextBox';
|
|
13
|
-
|
|
11
|
+
import EmptySearch from '@zohodesk/svg/lib/emptystate/version3/EmptySearch';
|
|
14
12
|
import CommonEmptyState from '../../../emptystate/CommonEmptyState/CommonEmptyState';
|
|
15
13
|
import StatusListItem from '../StatusListItem/StatusListItem';
|
|
16
14
|
import commonStyle from '@zohodesk/components/es/common/common.module.css';
|
|
@@ -68,18 +66,13 @@ function StatusDropdown(props) {
|
|
|
68
66
|
onTogglePopup,
|
|
69
67
|
onClick,
|
|
70
68
|
onSelectLabel,
|
|
71
|
-
|
|
69
|
+
isFetchingOptions,
|
|
72
70
|
getNextOptions,
|
|
73
71
|
options,
|
|
74
72
|
a11y = {}
|
|
75
73
|
} = props;
|
|
76
|
-
const [optionsList, setOptionsList] = useState(options);
|
|
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
|
-
|
|
74
|
+
const [optionsList, setOptionsList] = useState(options);
|
|
75
|
+
const [searchString, setSearchString] = useState('');
|
|
83
76
|
const getAriaId = useUniqueId();
|
|
84
77
|
const {
|
|
85
78
|
tabIndex = 0,
|
|
@@ -94,72 +87,19 @@ function StatusDropdown(props) {
|
|
|
94
87
|
return /*#__PURE__*/React.createElement(EmptySearch, {
|
|
95
88
|
size: "small"
|
|
96
89
|
});
|
|
97
|
-
}
|
|
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
|
-
// }
|
|
106
|
-
|
|
90
|
+
}
|
|
107
91
|
|
|
108
92
|
function handleTogglePopup(e) {
|
|
109
93
|
!isPopupOpen && onSelectLabel && onSelectLabel(e);
|
|
110
94
|
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
111
95
|
togglePopup(e, boxPosition);
|
|
112
|
-
}
|
|
113
|
-
// if (isPopupOpen) {
|
|
114
|
-
// optionsContainer.current = el;
|
|
115
|
-
// }
|
|
116
|
-
// }
|
|
117
|
-
|
|
96
|
+
}
|
|
118
97
|
|
|
119
98
|
function onSelect(element, e) {
|
|
120
99
|
onClick && onClick(e, element);
|
|
121
100
|
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
122
101
|
togglePopup(e);
|
|
123
|
-
}
|
|
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
|
-
// }
|
|
162
|
-
|
|
102
|
+
}
|
|
163
103
|
|
|
164
104
|
function searchList(value) {
|
|
165
105
|
let foptions = options.filter(dept => dept[keyName].toLowerCase().indexOf(value.toLowerCase()) != -1);
|
|
@@ -168,8 +108,7 @@ function StatusDropdown(props) {
|
|
|
168
108
|
|
|
169
109
|
function handleChange(value, e) {
|
|
170
110
|
let foptions = searchList(value);
|
|
171
|
-
setSearchString(value);
|
|
172
|
-
|
|
111
|
+
setSearchString(value);
|
|
173
112
|
setOptionsList(foptions);
|
|
174
113
|
}
|
|
175
114
|
|
|
@@ -177,14 +116,11 @@ function StatusDropdown(props) {
|
|
|
177
116
|
let foptions = searchList('');
|
|
178
117
|
setSearchString('');
|
|
179
118
|
setOptionsList(foptions);
|
|
180
|
-
}
|
|
181
|
-
// setSelectedIndex(index);
|
|
182
|
-
// }
|
|
183
|
-
|
|
119
|
+
}
|
|
184
120
|
|
|
185
121
|
function handleScroll(e) {
|
|
186
122
|
if (e.target.scrollTop + e.target.offsetHeight > e.target.scrollHeight - 1) {
|
|
187
|
-
|
|
123
|
+
getNextOptions && getNextOptions(e);
|
|
188
124
|
}
|
|
189
125
|
}
|
|
190
126
|
|
|
@@ -203,19 +139,7 @@ function StatusDropdown(props) {
|
|
|
203
139
|
setOptionsList(options);
|
|
204
140
|
}, [options.length]);
|
|
205
141
|
useEffectCallOnlyAfterState(() => {
|
|
206
|
-
|
|
207
|
-
onSearchClear();
|
|
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
|
-
|
|
142
|
+
isPopupOpen && onSearchClear();
|
|
219
143
|
}, [isPopupOpen]);
|
|
220
144
|
return /*#__PURE__*/React.createElement("div", {
|
|
221
145
|
className: style.posRel,
|
|
@@ -229,8 +153,7 @@ function StatusDropdown(props) {
|
|
|
229
153
|
eleRef: getTargetRef,
|
|
230
154
|
align: targetAlign,
|
|
231
155
|
isCover: false,
|
|
232
|
-
dataId: dataId
|
|
233
|
-
,
|
|
156
|
+
dataId: dataId,
|
|
234
157
|
disabled: isDisabled || isReadOnly ? true : false,
|
|
235
158
|
"aria-haspopup": isSearch ? 'listbox' : 'menu',
|
|
236
159
|
"aria-expanded": isPopupReady && isEditable ? true : false,
|
|
@@ -274,7 +197,14 @@ function StatusDropdown(props) {
|
|
|
274
197
|
needResponsive: needResponsive,
|
|
275
198
|
isResponsivePadding: true,
|
|
276
199
|
needFocusScope: true,
|
|
277
|
-
onClose: handleTogglePopup
|
|
200
|
+
onClose: handleTogglePopup,
|
|
201
|
+
customProps: {
|
|
202
|
+
focusScopeProps: {
|
|
203
|
+
searchValue: searchString,
|
|
204
|
+
loadNextOptions: getNextOptions,
|
|
205
|
+
isFetchingOptions: isFetchingOptions
|
|
206
|
+
}
|
|
207
|
+
}
|
|
278
208
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
|
|
279
209
|
className: style.search
|
|
280
210
|
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
@@ -282,9 +212,7 @@ function StatusDropdown(props) {
|
|
|
282
212
|
onChange: handleChange,
|
|
283
213
|
value: searchString,
|
|
284
214
|
onClear: onSearchClear,
|
|
285
|
-
size: searchBoxSize
|
|
286
|
-
// onKeyDown={handleKeyDown}
|
|
287
|
-
,
|
|
215
|
+
size: searchBoxSize,
|
|
288
216
|
customProps: {
|
|
289
217
|
TextBoxProps: {
|
|
290
218
|
'data-a11y-autofocus': true
|
|
@@ -311,29 +239,24 @@ function StatusDropdown(props) {
|
|
|
311
239
|
shrink: true,
|
|
312
240
|
dataId: `${dataId}_list`,
|
|
313
241
|
preventParentScroll: "vertical",
|
|
314
|
-
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}
|
|
315
|
-
,
|
|
242
|
+
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
|
|
316
243
|
onScroll: handleScroll,
|
|
317
244
|
role: isSearch ? 'listbox' : 'menu',
|
|
318
245
|
tabindex: "-1",
|
|
319
|
-
|
|
246
|
+
isScrollAttribute: true
|
|
320
247
|
}, optionsList.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, optionsList.map((item, i) => {
|
|
321
248
|
const listItemText = item[keyName];
|
|
322
249
|
const isActive = value === listItemText;
|
|
323
|
-
return /*#__PURE__*/React.createElement(
|
|
324
|
-
key: i
|
|
325
|
-
}, /*#__PURE__*/React.createElement(StatusListItem, {
|
|
250
|
+
return /*#__PURE__*/React.createElement(StatusListItem, {
|
|
251
|
+
key: i,
|
|
326
252
|
dataId: `dataid_${i}`,
|
|
327
253
|
value: listItemText,
|
|
328
254
|
id: item[idName],
|
|
329
255
|
active: isActive,
|
|
330
256
|
onClick: e => onSelect(item, e),
|
|
331
|
-
index: i
|
|
332
|
-
,
|
|
257
|
+
index: i,
|
|
333
258
|
needTick: needTick,
|
|
334
|
-
needBorder: false
|
|
335
|
-
// getRef={itemRef}
|
|
336
|
-
,
|
|
259
|
+
needBorder: false,
|
|
337
260
|
bulletColor: item[statusColor],
|
|
338
261
|
title: listItemText,
|
|
339
262
|
needMultiLineText: needMultiLineText,
|
|
@@ -343,8 +266,11 @@ function StatusDropdown(props) {
|
|
|
343
266
|
ariaSelected: isActive,
|
|
344
267
|
ariaLabel: listItemText
|
|
345
268
|
}
|
|
346
|
-
})
|
|
347
|
-
})
|
|
269
|
+
});
|
|
270
|
+
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
271
|
+
isCover: false,
|
|
272
|
+
align: "both"
|
|
273
|
+
}, /*#__PURE__*/React.createElement(Loader, null))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
|
|
348
274
|
className: style.svgWrapper,
|
|
349
275
|
title: searchErrorText || 'No results',
|
|
350
276
|
description: searchEmptyHint,
|
|
@@ -19,7 +19,7 @@ export const propTypes = {
|
|
|
19
19
|
isDataLoaded: PropTypes.bool,
|
|
20
20
|
isDisabled: PropTypes.bool,
|
|
21
21
|
isEditable: PropTypes.bool,
|
|
22
|
-
|
|
22
|
+
isFetchingOptions: PropTypes.bool,
|
|
23
23
|
isPopupActive: PropTypes.bool,
|
|
24
24
|
isPopupOpen: PropTypes.bool,
|
|
25
25
|
isPopupReady: PropTypes.bool,
|
|
@@ -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, { useRef } from 'react';
|
|
5
3
|
import { defaultProps } from './props/defaultProps';
|
|
@@ -68,7 +66,7 @@ export default function StatusListItem(props) {
|
|
|
68
66
|
onMouseEnter && onMouseEnter(id, value, index, e);
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
return /*#__PURE__*/React.createElement(Container,
|
|
69
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
72
70
|
role: role,
|
|
73
71
|
"aria-selected": ariaSelected,
|
|
74
72
|
"aria-label": ariaLabel,
|
|
@@ -83,8 +81,10 @@ export default function StatusListItem(props) {
|
|
|
83
81
|
eleRef: getReference,
|
|
84
82
|
tagName: isLink ? 'a' : 'li',
|
|
85
83
|
"data-title": isDisabled ? disableTitle : null,
|
|
86
|
-
tabindex: isDisabled ? '-1' : '0'
|
|
87
|
-
|
|
84
|
+
tabindex: isDisabled ? '-1' : '0',
|
|
85
|
+
...options,
|
|
86
|
+
...a11y
|
|
87
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
88
88
|
className: `${style.statusType} ${style[bulletColor]}`
|
|
89
89
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
90
90
|
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, { useRef, useCallback, useEffect } from 'react';
|
|
5
3
|
import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
|
|
@@ -68,7 +66,7 @@ export default function Lookup(props) {
|
|
|
68
66
|
document.removeEventListener('keydown', handleKeyDown);
|
|
69
67
|
};
|
|
70
68
|
}, []);
|
|
71
|
-
const content = /*#__PURE__*/React.createElement("div",
|
|
69
|
+
const content = /*#__PURE__*/React.createElement("div", {
|
|
72
70
|
ref: createRef,
|
|
73
71
|
tabIndex: "-1",
|
|
74
72
|
"data-a11y-need-focus-style": "false",
|
|
@@ -80,8 +78,9 @@ export default function Lookup(props) {
|
|
|
80
78
|
id: htmlId,
|
|
81
79
|
className: `${style.box} ${style[`${size}Size`]} ${lookupClass ? lookupClass : ''}`,
|
|
82
80
|
"data-id": dataId,
|
|
83
|
-
"data-test-id": dataId
|
|
84
|
-
|
|
81
|
+
"data-test-id": dataId,
|
|
82
|
+
...a11yAttributes
|
|
83
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
85
84
|
"data-drag-container": "true",
|
|
86
85
|
isCover: false,
|
|
87
86
|
className: isMinHeight ? `${style.wrapper}` : `${style.coverwrap}`
|
|
@@ -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 ***/
|
|
@@ -71,7 +69,11 @@ export default function Search(props) {
|
|
|
71
69
|
selectedId: selectedId,
|
|
72
70
|
onDropDownOpen: handleDropDownOpen,
|
|
73
71
|
onDropDownClose: handleDropDownClose
|
|
74
|
-
}, /*#__PURE__*/React.createElement(SearchUI,
|
|
72
|
+
}, /*#__PURE__*/React.createElement(SearchUI, { ...props,
|
|
73
|
+
...searchUIExtraProps
|
|
74
|
+
})) : /*#__PURE__*/React.createElement(SearchUI, { ...props,
|
|
75
|
+
...searchUIExtraProps
|
|
76
|
+
});
|
|
75
77
|
}
|
|
76
78
|
Search.propTypes = Search_propTypes;
|
|
77
79
|
|
|
@@ -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, DesktopNotificationUI_propTypes } from './props/propTypes';
|
|
@@ -117,14 +115,15 @@ export function DesktopNotificationUI(props) {
|
|
|
117
115
|
let {
|
|
118
116
|
uptoTablet
|
|
119
117
|
} = _ref2;
|
|
120
|
-
return /*#__PURE__*/React.createElement(Container,
|
|
118
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
121
119
|
className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass}
|
|
122
120
|
${isShrinkView ? style.globalNotify : ''} ${containerClass}
|
|
123
121
|
${uptoTablet ? style.tapWidth : style[`${size}`]}`,
|
|
124
122
|
isCover: false,
|
|
125
123
|
dataId: dataId,
|
|
126
|
-
isInline: uiVariantTwo
|
|
127
|
-
|
|
124
|
+
isInline: uiVariantTwo,
|
|
125
|
+
...ExtraProps
|
|
126
|
+
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
|
|
128
127
|
type: type,
|
|
129
128
|
title: title,
|
|
130
129
|
variant: titleVariant,
|
|
@@ -178,9 +177,9 @@ export function DesktopNotificationUI(props) {
|
|
|
178
177
|
DesktopNotificationUI.propTypes = DesktopNotificationUI_propTypes;
|
|
179
178
|
DesktopNotificationUI.propTypes = defaultProps;
|
|
180
179
|
export default function DesktopNotification(props) {
|
|
181
|
-
return /*#__PURE__*/React.createElement(AutoClose,
|
|
180
|
+
return /*#__PURE__*/React.createElement(AutoClose, { ...props,
|
|
182
181
|
Element: DesktopNotificationUI
|
|
183
|
-
})
|
|
182
|
+
});
|
|
184
183
|
}
|
|
185
184
|
DesktopNotification.propTypes = propTypes;
|
|
186
185
|
DesktopNotification.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 from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes, UI_propTypes, new_propTypes } from './props/propTypes';
|
|
@@ -121,7 +119,7 @@ export function GlobalNotificationUI(props) {
|
|
|
121
119
|
let {
|
|
122
120
|
ExtraProps = {}
|
|
123
121
|
} = customProps;
|
|
124
|
-
return /*#__PURE__*/React.createElement("div",
|
|
122
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
125
123
|
ref: eleRef,
|
|
126
124
|
className: ` ${style.message}
|
|
127
125
|
${needShadow && shadowCount >= 2 ? shadowCount > 2 ? `${style.stackShadowTwo} ${style.stackShadowOne}` : style.stackShadowOne : ''}
|
|
@@ -130,8 +128,9 @@ export function GlobalNotificationUI(props) {
|
|
|
130
128
|
"data-id": `show_${type}_message`,
|
|
131
129
|
"data-test-id": `show_${type}_message`,
|
|
132
130
|
tabIndex: 0,
|
|
133
|
-
"data-selector-id": dataSelectorId
|
|
134
|
-
|
|
131
|
+
"data-selector-id": dataSelectorId,
|
|
132
|
+
...ExtraProps
|
|
133
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
135
134
|
className: `${style.container}`,
|
|
136
135
|
alignBox: "row",
|
|
137
136
|
isCover: false,
|
|
@@ -163,8 +162,8 @@ export function GlobalNotificationUI(props) {
|
|
|
163
162
|
}
|
|
164
163
|
GlobalNotificationUI.propTypes = UI_propTypes;
|
|
165
164
|
export function GlobalNotificationNew(props) {
|
|
166
|
-
return /*#__PURE__*/React.createElement(AutoClose,
|
|
165
|
+
return /*#__PURE__*/React.createElement(AutoClose, { ...props,
|
|
167
166
|
Element: GlobalNotificationUI
|
|
168
|
-
})
|
|
167
|
+
});
|
|
169
168
|
}
|
|
170
169
|
GlobalNotificationNew.propTypes = new_propTypes;
|
|
@@ -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';
|
|
@@ -123,7 +121,7 @@ export default class AlertLookup extends Component {
|
|
|
123
121
|
ariaLabelledby: a11y && a11y.ariaLabelledby ? a11y.ariaLabelledby : ariaTitleId,
|
|
124
122
|
ariaDescribedby: a11y && a11y.ariaDescribedby ? a11y.ariaDescribedby : ariaMessageId + ' ' + ariaConfirmMsgId
|
|
125
123
|
};
|
|
126
|
-
return /*#__PURE__*/React.createElement(Lookup,
|
|
124
|
+
return /*#__PURE__*/React.createElement(Lookup, {
|
|
127
125
|
onClose: onEsc == 'close' ? onClose : onCancelClick,
|
|
128
126
|
needFocusScope: true,
|
|
129
127
|
isActive: isActive,
|
|
@@ -133,8 +131,9 @@ export default class AlertLookup extends Component {
|
|
|
133
131
|
onClick: onLookupClick,
|
|
134
132
|
customClass: containerClass,
|
|
135
133
|
a11y: a11y,
|
|
136
|
-
childAnimationName: childAnimationName
|
|
137
|
-
|
|
134
|
+
childAnimationName: childAnimationName,
|
|
135
|
+
...LookupProps
|
|
136
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
138
137
|
alignBox: "row",
|
|
139
138
|
align: align,
|
|
140
139
|
wrap: "wrap"
|
|
@@ -143,14 +142,15 @@ export default class AlertLookup extends Component {
|
|
|
143
142
|
className: style.section
|
|
144
143
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
145
144
|
alignBox: "column"
|
|
146
|
-
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(AlertHeader,
|
|
145
|
+
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(AlertHeader, {
|
|
147
146
|
htmlId: ariaTitleId,
|
|
148
147
|
title: title,
|
|
149
148
|
type: type,
|
|
150
149
|
needIcon: needIcon,
|
|
151
150
|
onClose: onClose,
|
|
152
|
-
breakChildren: wrapHeader
|
|
153
|
-
|
|
151
|
+
breakChildren: wrapHeader,
|
|
152
|
+
...AlertHeaderProps
|
|
153
|
+
}, headerChildren ? headerChildren() : null)), /*#__PURE__*/React.createElement(Box, {
|
|
154
154
|
flexible: true
|
|
155
155
|
}, /*#__PURE__*/React.createElement("div", {
|
|
156
156
|
className: `${style.innerSection} ${style[`${scroll}Scroll`] ? style[`${scroll}Scroll`] : ''} ${sectionClass}`
|
|
@@ -169,30 +169,30 @@ export default class AlertLookup extends Component {
|
|
|
169
169
|
}, /*#__PURE__*/React.createElement(FormAction, {
|
|
170
170
|
size: "small",
|
|
171
171
|
paddingLeftSize: "xmedium"
|
|
172
|
-
}, /*#__PURE__*/React.createElement(Button,
|
|
172
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
173
173
|
text: submitText,
|
|
174
174
|
dataId: dataId === 'alertPopup' ? 'alertConfirmButton' : `${dataId}_confirmButton`,
|
|
175
175
|
onClick: onSubmitClick,
|
|
176
176
|
palette: buttonPalette,
|
|
177
177
|
customProps: {
|
|
178
178
|
'data-a11y-autofocus': isDefaultFocus
|
|
179
|
-
}
|
|
180
|
-
|
|
179
|
+
},
|
|
180
|
+
...PrimaryButtonProps,
|
|
181
181
|
a11y: {
|
|
182
182
|
'aria-labelledby': ariaTitleId + ' ' + ariaMessageId + ' ' + ariaLeaveButtonId
|
|
183
183
|
},
|
|
184
184
|
id: ariaLeaveButtonId
|
|
185
|
-
})
|
|
185
|
+
}), cancelText && /*#__PURE__*/React.createElement(Button, {
|
|
186
186
|
dataId: dataId === 'alertPopup' ? 'alertCancelButton' : `${dataId}_cancelButton`,
|
|
187
187
|
text: cancelText,
|
|
188
188
|
onClick: onCancelClick,
|
|
189
|
-
palette: "secondary"
|
|
190
|
-
|
|
189
|
+
palette: "secondary",
|
|
190
|
+
...SecondaryButtonProps,
|
|
191
191
|
a11y: {
|
|
192
192
|
'aria-labelledby': ariaTitleId + ' ' + ariaMessageId + ' ' + ariaStayButtonId
|
|
193
193
|
},
|
|
194
194
|
id: ariaStayButtonId
|
|
195
|
-
}))))
|
|
195
|
+
})))) : null))));
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
}
|
|
@@ -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, { useState } from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes, DesktopNotificationUI_propTypes } from './props/propTypes';
|
|
@@ -116,13 +114,14 @@ export function DesktopNotificationUI(props) {
|
|
|
116
114
|
let {
|
|
117
115
|
uptoTablet
|
|
118
116
|
} = _ref2;
|
|
119
|
-
return /*#__PURE__*/React.createElement(Container,
|
|
117
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
120
118
|
className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass}
|
|
121
119
|
${isShrinkView ? style.globalNotify : ''} ${containerClass} ${uptoTablet ? style.tapWidth : style[`${size}`]}`,
|
|
122
120
|
isCover: false,
|
|
123
121
|
dataId: dataId,
|
|
124
|
-
isInline: uiVariantTwo
|
|
125
|
-
|
|
122
|
+
isInline: uiVariantTwo,
|
|
123
|
+
...ExtraProps
|
|
124
|
+
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
|
|
126
125
|
type: type,
|
|
127
126
|
title: title,
|
|
128
127
|
variant: titleVariant,
|
|
@@ -175,9 +174,9 @@ export function DesktopNotificationUI(props) {
|
|
|
175
174
|
}
|
|
176
175
|
DesktopNotificationUI.propTypes = DesktopNotificationUI_propTypes;
|
|
177
176
|
export default function DesktopNotification(props) {
|
|
178
|
-
return /*#__PURE__*/React.createElement(AutoClose,
|
|
177
|
+
return /*#__PURE__*/React.createElement(AutoClose, { ...props,
|
|
179
178
|
Element: DesktopNotificationUI
|
|
180
|
-
})
|
|
179
|
+
});
|
|
181
180
|
}
|
|
182
181
|
DesktopNotification.propTypes = propTypes;
|
|
183
182
|
DesktopNotification.defaultProps = defaultProps; // if (__DOCS__) {
|
|
@@ -322,7 +322,8 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
322
322
|
eleRef: _this3.getContainerRef
|
|
323
323
|
}, searchList.length ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
324
324
|
flexible: true,
|
|
325
|
-
shrink: true
|
|
325
|
+
shrink: true,
|
|
326
|
+
dataId: "".concat(dataId, "_Options")
|
|
326
327
|
}, searchList.map(function (item, index) {
|
|
327
328
|
var name = item.name,
|
|
328
329
|
isNew = item.isNew,
|