@zohodesk/components 1.2.35 → 1.2.36
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 +5 -0
- package/es/DropDown/DropDownSearch.js +5 -2
- package/es/DropDown/__tests__/__snapshots__/DropDownSearch.spec.js.snap +2 -0
- package/es/DropDown/props/defaultProps.js +2 -1
- package/es/DropDown/props/propTypes.js +2 -1
- package/es/ListItem/ListItemWithCheckBox.js +2 -1
- package/es/ListItem/ListItemWithRadio.js +2 -1
- package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
- package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +2 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +6 -3
- package/es/MultiSelect/AdvancedMultiSelect.js +6 -2
- package/es/MultiSelect/MultiSelect.js +2 -1
- package/es/MultiSelect/MultiSelectWithAvatar.js +2 -1
- package/es/MultiSelect/SelectedOptions.js +8 -4
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +2 -2
- package/es/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +6 -6
- package/es/MultiSelect/props/defaultProps.js +2 -1
- package/es/MultiSelect/props/propTypes.js +2 -1
- package/es/Select/SelectWithAvatar.js +5 -2
- package/es/Select/SelectWithIcon.js +4 -2
- package/es/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +2 -2
- package/es/Tab/Tabs.js +4 -2
- package/es/v1/DropDown/DropDownSearch.js +5 -2
- package/es/v1/DropDown/props/defaultProps.js +2 -1
- package/es/v1/DropDown/props/propTypes.js +2 -1
- package/es/v1/ListItem/ListItemWithCheckBox.js +2 -1
- package/es/v1/ListItem/ListItemWithRadio.js +2 -1
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +6 -3
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +6 -2
- package/es/v1/MultiSelect/MultiSelect.js +2 -1
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +2 -1
- package/es/v1/MultiSelect/SelectedOptions.js +8 -4
- package/es/v1/MultiSelect/props/defaultProps.js +2 -1
- package/es/v1/MultiSelect/props/propTypes.js +2 -1
- package/es/v1/Select/SelectWithAvatar.js +5 -2
- package/es/v1/Select/SelectWithIcon.js +4 -2
- package/es/v1/Tab/Tabs.js +4 -2
- package/lib/DropDown/DropDownSearch.js +5 -2
- package/lib/DropDown/__tests__/__snapshots__/DropDownSearch.spec.js.snap +2 -0
- package/lib/DropDown/props/defaultProps.js +2 -1
- package/lib/DropDown/props/propTypes.js +1 -1
- package/lib/ListItem/ListItemWithCheckBox.js +2 -1
- package/lib/ListItem/ListItemWithRadio.js +2 -1
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +6 -3
- package/lib/MultiSelect/AdvancedMultiSelect.js +8 -4
- package/lib/MultiSelect/MultiSelect.js +2 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +2 -1
- package/lib/MultiSelect/SelectedOptions.js +8 -4
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +2 -2
- package/lib/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +6 -6
- package/lib/MultiSelect/props/defaultProps.js +2 -1
- package/lib/MultiSelect/props/propTypes.js +2 -1
- package/lib/Select/SelectWithAvatar.js +5 -2
- package/lib/Select/SelectWithIcon.js +4 -2
- package/lib/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +2 -2
- package/lib/Tab/Tabs.js +4 -2
- package/lib/v1/DropDown/DropDownSearch.js +5 -2
- package/lib/v1/DropDown/props/defaultProps.js +2 -1
- package/lib/v1/DropDown/props/propTypes.js +1 -1
- package/lib/v1/ListItem/ListItemWithCheckBox.js +2 -1
- package/lib/v1/ListItem/ListItemWithRadio.js +2 -1
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +6 -3
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +8 -4
- package/lib/v1/MultiSelect/MultiSelect.js +2 -1
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +2 -1
- package/lib/v1/MultiSelect/SelectedOptions.js +8 -4
- package/lib/v1/MultiSelect/props/defaultProps.js +2 -1
- package/lib/v1/MultiSelect/props/propTypes.js +2 -1
- package/lib/v1/Select/SelectWithAvatar.js +5 -2
- package/lib/v1/Select/SelectWithIcon.js +4 -2
- package/lib/v1/Tab/Tabs.js +4 -2
- package/package.json +3 -3
- package/result.json +1 -1
|
@@ -37,14 +37,17 @@ export default class DropDownSearch extends React.Component {
|
|
|
37
37
|
size,
|
|
38
38
|
textBoxSize,
|
|
39
39
|
placeHolder,
|
|
40
|
-
customClass
|
|
40
|
+
customClass,
|
|
41
|
+
dataId
|
|
41
42
|
} = this.props;
|
|
42
43
|
let {
|
|
43
44
|
searchClass = '',
|
|
44
45
|
customTextBox = ''
|
|
45
46
|
} = customClass;
|
|
46
47
|
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
-
className: `${style.search} ${style[`${size}Search`]} ${searchClass}
|
|
48
|
+
className: `${style.search} ${style[`${size}Search`]} ${searchClass}`,
|
|
49
|
+
"data-id": dataId,
|
|
50
|
+
"data-test-id": dataId
|
|
48
51
|
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
49
52
|
id: id,
|
|
50
53
|
inputRef: this.getRef,
|
|
@@ -58,7 +58,8 @@ export const DropDownSearch_propTypes = {
|
|
|
58
58
|
customClass: PropTypes.shape({
|
|
59
59
|
searchClass: PropTypes.string,
|
|
60
60
|
customTextBox: PropTypes.string
|
|
61
|
-
})
|
|
61
|
+
}),
|
|
62
|
+
dataId: PropTypes.string
|
|
62
63
|
};
|
|
63
64
|
export const DropDownSeparator_propTypes = {
|
|
64
65
|
customClass: PropTypes.string
|
|
@@ -93,7 +93,8 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
93
93
|
customProps: ListItemProps,
|
|
94
94
|
...ContainerProps
|
|
95
95
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
96
|
-
className: style.iconBox
|
|
96
|
+
className: style.iconBox,
|
|
97
|
+
dataId: `${dataId ? dataId : value}_checkBox`
|
|
97
98
|
}, /*#__PURE__*/React.createElement(CheckBox, {
|
|
98
99
|
checked: checked,
|
|
99
100
|
a11y: {
|
|
@@ -94,7 +94,8 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
94
94
|
customProps: ListItemProps,
|
|
95
95
|
...ContainerProps
|
|
96
96
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
97
|
-
className: style.iconBox
|
|
97
|
+
className: style.iconBox,
|
|
98
|
+
dataId: `${dataId}_radio`
|
|
98
99
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
99
100
|
checked: checked,
|
|
100
101
|
id: id,
|
|
@@ -13,9 +13,9 @@ exports[`ListItemWithCheckBox rendering the defult props 1`] = `
|
|
|
13
13
|
>
|
|
14
14
|
<div
|
|
15
15
|
class="iconBox shrinkOff"
|
|
16
|
-
data-id="
|
|
16
|
+
data-id="List_checkBox"
|
|
17
17
|
data-selector-id="box"
|
|
18
|
-
data-test-id="
|
|
18
|
+
data-test-id="List_checkBox"
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
21
21
|
aria-checked="false"
|
|
@@ -13,9 +13,9 @@ exports[`ListItemWithRadio rendering the defult props 1`] = `
|
|
|
13
13
|
>
|
|
14
14
|
<div
|
|
15
15
|
class="iconBox shrinkOff"
|
|
16
|
-
data-id="
|
|
16
|
+
data-id="listItemWithRadioComp_radio"
|
|
17
17
|
data-selector-id="box"
|
|
18
|
-
data-test-id="
|
|
18
|
+
data-test-id="listItemWithRadioComp_radio"
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
21
21
|
aria-checked="false"
|
|
@@ -924,7 +924,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
924
924
|
getRef: this.selectedOptionRef,
|
|
925
925
|
onRemove: this.handleRemoveOption,
|
|
926
926
|
onSelect: this.handleClickSelectedOption,
|
|
927
|
-
isGroupSelect: true
|
|
927
|
+
isGroupSelect: true,
|
|
928
|
+
dataId: `${dataId}_selectedOptions`
|
|
928
929
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
929
930
|
flexible: true,
|
|
930
931
|
className: style.wrapper,
|
|
@@ -998,7 +999,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
998
999
|
role: 'listbox',
|
|
999
1000
|
ariaMultiselectable: true
|
|
1000
1001
|
},
|
|
1001
|
-
alignBox: "row"
|
|
1002
|
+
alignBox: "row",
|
|
1003
|
+
dataId: `${dataId}_dropbox`
|
|
1002
1004
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
1003
1005
|
flexible: true
|
|
1004
1006
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
@@ -1042,7 +1044,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1042
1044
|
listItemSize: listItemSize,
|
|
1043
1045
|
a11y: {
|
|
1044
1046
|
role: 'option'
|
|
1045
|
-
}
|
|
1047
|
+
},
|
|
1048
|
+
dataId: `${dataId}_Options`
|
|
1046
1049
|
}));
|
|
1047
1050
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1048
1051
|
options: revampedGroups,
|
|
@@ -429,7 +429,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
429
429
|
isReadOnly: isReadOnly,
|
|
430
430
|
getRef: this.selectedOptionRef,
|
|
431
431
|
onRemove: this.handleRemoveOption,
|
|
432
|
-
onSelect: this.handleClickSelectedOption
|
|
432
|
+
onSelect: this.handleClickSelectedOption,
|
|
433
|
+
dataId: `${dataIdMultiSelectComp}_selectedOptions`
|
|
433
434
|
}), moreCount > 0 ? /*#__PURE__*/React.createElement(Box, {
|
|
434
435
|
className: style.more,
|
|
435
436
|
onClick: this.handleMoreClick,
|
|
@@ -438,7 +439,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
438
439
|
flexible: true,
|
|
439
440
|
className: style.wrapper,
|
|
440
441
|
adjust: true,
|
|
441
|
-
shrink: true
|
|
442
|
+
shrink: true,
|
|
443
|
+
dataId: `${dataIdMultiSelectComp}_textBox`
|
|
442
444
|
}, /*#__PURE__*/React.createElement("span", {
|
|
443
445
|
className: ` ${style.custmSpan} ${textBoxSize === 'xmedium' ? style.custmSpanXmedium : style.custmSpanMedium} ${isShowClearIcon ? style.clearIconSpace : ''}
|
|
444
446
|
`
|
|
@@ -505,6 +507,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
505
507
|
role: 'listbox',
|
|
506
508
|
ariaMultiselectable: true
|
|
507
509
|
},
|
|
510
|
+
dataId: `${dataIdMultiSelectComp}_dropbox`,
|
|
508
511
|
...DropBoxProps,
|
|
509
512
|
alignBox: "row",
|
|
510
513
|
isResponsivePadding: getFooter ? false : true
|
|
@@ -537,6 +540,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
537
540
|
a11y: {
|
|
538
541
|
role: 'option'
|
|
539
542
|
},
|
|
543
|
+
dataId: `${dataIdMultiSelectComp}_Options`,
|
|
540
544
|
...SuggestionsProps
|
|
541
545
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
542
546
|
isLoading: isFetchingOptions,
|
|
@@ -900,7 +900,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
900
900
|
onRemove: this.handleRemoveOption,
|
|
901
901
|
onSelect: this.handleClickSelectedOption,
|
|
902
902
|
size: size,
|
|
903
|
-
palette: palette
|
|
903
|
+
palette: palette,
|
|
904
|
+
dataId: `${dataId}_selectedOptions`
|
|
904
905
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
905
906
|
flexible: true,
|
|
906
907
|
className: style.wrapper,
|
|
@@ -131,7 +131,8 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
131
131
|
role: 'listbox'
|
|
132
132
|
},
|
|
133
133
|
isResponsivePadding: true,
|
|
134
|
-
alignBox: "row"
|
|
134
|
+
alignBox: "row",
|
|
135
|
+
dataId: `${dataId}_dropbox`
|
|
135
136
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
136
137
|
flexible: true
|
|
137
138
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
@@ -21,7 +21,8 @@ export default class SelectedOptions extends React.PureComponent {
|
|
|
21
21
|
onRemove,
|
|
22
22
|
onSelect,
|
|
23
23
|
size,
|
|
24
|
-
palette
|
|
24
|
+
palette,
|
|
25
|
+
dataId
|
|
25
26
|
} = this.props;
|
|
26
27
|
const isDarkPalette = palette === 'dark' ? 'dark' : 'danger';
|
|
27
28
|
return /*#__PURE__*/React.createElement(React.Fragment, null, selectedOptions.map(option => {
|
|
@@ -49,7 +50,8 @@ export default class SelectedOptions extends React.PureComponent {
|
|
|
49
50
|
if (optionType === 'avatar') {
|
|
50
51
|
return /*#__PURE__*/React.createElement(Box, {
|
|
51
52
|
className: `${style.tag} ${style[size]}`,
|
|
52
|
-
key: `${id}photoTag
|
|
53
|
+
key: `${id}photoTag`,
|
|
54
|
+
dataId: dataId
|
|
53
55
|
}, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
|
|
54
56
|
active: highLightedSelectOptions.indexOf(id) >= 0,
|
|
55
57
|
hasAvatar: true,
|
|
@@ -58,7 +60,8 @@ export default class SelectedOptions extends React.PureComponent {
|
|
|
58
60
|
} else if (optionType === 'icon') {
|
|
59
61
|
return /*#__PURE__*/React.createElement(Box, {
|
|
60
62
|
className: `${style.tag} ${style[size]}`,
|
|
61
|
-
key: `${id}iconTag
|
|
63
|
+
key: `${id}iconTag`,
|
|
64
|
+
dataId: dataId
|
|
62
65
|
}, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
|
|
63
66
|
active: highLightedSelectOptions.indexOf(id) >= 0,
|
|
64
67
|
iconName: icon,
|
|
@@ -68,7 +71,8 @@ export default class SelectedOptions extends React.PureComponent {
|
|
|
68
71
|
|
|
69
72
|
return /*#__PURE__*/React.createElement(Box, {
|
|
70
73
|
className: `${style.tag} ${style[size]}`,
|
|
71
|
-
key: `${id}tag
|
|
74
|
+
key: `${id}tag`,
|
|
75
|
+
dataId: dataId
|
|
72
76
|
}, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
|
|
73
77
|
active: highLightedSelectOptions.indexOf(id) >= 0
|
|
74
78
|
}));
|
|
@@ -16,9 +16,9 @@ exports[`AdvancedMultiSelect rendering the defult props 1`] = `
|
|
|
16
16
|
>
|
|
17
17
|
<div
|
|
18
18
|
class="wrapper grow basisAuto shrinkOn"
|
|
19
|
-
data-id="
|
|
19
|
+
data-id="multiSelectComp_textBox"
|
|
20
20
|
data-selector-id="box"
|
|
21
|
-
data-test-id="
|
|
21
|
+
data-test-id="multiSelectComp_textBox"
|
|
22
22
|
>
|
|
23
23
|
<span
|
|
24
24
|
class=" custmSpan custmSpanMedium
|
|
@@ -4,9 +4,9 @@ exports[`SelectedOptions rendering the basic select options 1`] = `
|
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
6
|
class="tag medium shrinkOff"
|
|
7
|
-
data-id="
|
|
7
|
+
data-id="selectedOptions"
|
|
8
8
|
data-selector-id="box"
|
|
9
|
-
data-test-id="
|
|
9
|
+
data-test-id="selectedOptions"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
12
|
aria-labelledby="1"
|
|
@@ -28,9 +28,9 @@ exports[`SelectedOptions rendering the basic select options 1`] = `
|
|
|
28
28
|
</div>
|
|
29
29
|
<div
|
|
30
30
|
class="tag medium shrinkOff"
|
|
31
|
-
data-id="
|
|
31
|
+
data-id="selectedOptions"
|
|
32
32
|
data-selector-id="box"
|
|
33
|
-
data-test-id="
|
|
33
|
+
data-test-id="selectedOptions"
|
|
34
34
|
>
|
|
35
35
|
<div
|
|
36
36
|
aria-labelledby="2"
|
|
@@ -52,9 +52,9 @@ exports[`SelectedOptions rendering the basic select options 1`] = `
|
|
|
52
52
|
</div>
|
|
53
53
|
<div
|
|
54
54
|
class="tag medium shrinkOff"
|
|
55
|
-
data-id="
|
|
55
|
+
data-id="selectedOptions"
|
|
56
56
|
data-selector-id="box"
|
|
57
|
-
data-test-id="
|
|
57
|
+
data-test-id="selectedOptions"
|
|
58
58
|
>
|
|
59
59
|
<div
|
|
60
60
|
aria-labelledby="3"
|
|
@@ -149,7 +149,8 @@ export const MultiSelectWithAvatar_defaultProps = {
|
|
|
149
149
|
needResponsive: true
|
|
150
150
|
};
|
|
151
151
|
export const SelectedOptions_defaultProps = {
|
|
152
|
-
size: 'medium'
|
|
152
|
+
size: 'medium',
|
|
153
|
+
dataId: 'selectedOptions'
|
|
153
154
|
};
|
|
154
155
|
export const Suggestions_defaultProps = {
|
|
155
156
|
a11y: {}
|
|
@@ -139,7 +139,8 @@ export const SelectedOptions_propTypes = {
|
|
|
139
139
|
optionType: PropTypes.string
|
|
140
140
|
})),
|
|
141
141
|
size: PropTypes.oneOf(['medium', 'xmedium']),
|
|
142
|
-
palette: PropTypes.string
|
|
142
|
+
palette: PropTypes.string,
|
|
143
|
+
dataId: PropTypes.string
|
|
143
144
|
};
|
|
144
145
|
export const Suggestions_propTypes = {
|
|
145
146
|
a11y: PropTypes.shape({
|
|
@@ -209,7 +209,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
209
209
|
size: tagSize
|
|
210
210
|
})) : null, /*#__PURE__*/React.createElement(Box, {
|
|
211
211
|
flexible: true,
|
|
212
|
-
className: style.textBox
|
|
212
|
+
className: style.textBox,
|
|
213
|
+
dataId: `${dataId}_textBox`
|
|
213
214
|
}, /*#__PURE__*/React.createElement(Textbox, {
|
|
214
215
|
a11y: {
|
|
215
216
|
ariaActivedescendant: selectedId,
|
|
@@ -257,7 +258,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
257
258
|
needResponsive: needResponsive,
|
|
258
259
|
isPadding: false,
|
|
259
260
|
isResponsivePadding: true,
|
|
260
|
-
alignBox: "row"
|
|
261
|
+
alignBox: "row",
|
|
262
|
+
dataId: `${dataId}_dropbox`
|
|
261
263
|
}, isLoading ? /*#__PURE__*/React.createElement(Container, {
|
|
262
264
|
align: "both",
|
|
263
265
|
className: style.loader
|
|
@@ -295,6 +297,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
295
297
|
role: 'heading'
|
|
296
298
|
}
|
|
297
299
|
})) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
300
|
+
dataId: `${dataId}_Options`,
|
|
298
301
|
activeId: selectedId,
|
|
299
302
|
suggestions: suggestions,
|
|
300
303
|
getRef: this.suggestionItemRef,
|
|
@@ -377,7 +377,8 @@ class SelectWithIcon extends Component {
|
|
|
377
377
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
378
378
|
name: iconName,
|
|
379
379
|
size: iconSize,
|
|
380
|
-
iconClass: iconClass
|
|
380
|
+
iconClass: iconClass,
|
|
381
|
+
dataId: `${dataId}_icon`
|
|
381
382
|
})) : null, /*#__PURE__*/React.createElement(Box, {
|
|
382
383
|
flexible: true
|
|
383
384
|
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
@@ -470,7 +471,8 @@ class SelectWithIcon extends Component {
|
|
|
470
471
|
}))) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
471
472
|
customClass: `${tabletMode ? style.responsivedropBoxList : style.dropBoxList} ${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''}`,
|
|
472
473
|
shrink: true,
|
|
473
|
-
eleRef: this.scrollContentRef
|
|
474
|
+
eleRef: this.scrollContentRef,
|
|
475
|
+
dataId: `${dataId}_Options`
|
|
474
476
|
}, options.length ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((options, i) => {
|
|
475
477
|
let {
|
|
476
478
|
iconName,
|
|
@@ -16,9 +16,9 @@ exports[`SelectWithAvatar rendering the defult props 1`] = `
|
|
|
16
16
|
>
|
|
17
17
|
<div
|
|
18
18
|
class="grow basis shrinkOff"
|
|
19
|
-
data-id="
|
|
19
|
+
data-id="selectWithAvatar_textBox"
|
|
20
20
|
data-selector-id="box"
|
|
21
|
-
data-test-id="
|
|
21
|
+
data-test-id="selectWithAvatar_textBox"
|
|
22
22
|
>
|
|
23
23
|
<input
|
|
24
24
|
aria-activedescendant=""
|
package/es/Tab/Tabs.js
CHANGED
|
@@ -508,13 +508,15 @@ class Tabs extends React.Component {
|
|
|
508
508
|
...DropBoxProps,
|
|
509
509
|
isResponsivePadding: true,
|
|
510
510
|
needFocusScope: true,
|
|
511
|
-
onClose: this.togglePopup
|
|
511
|
+
onClose: this.togglePopup,
|
|
512
|
+
dataId: `${dataId}_dropbox`
|
|
512
513
|
}, getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), /*#__PURE__*/React.createElement(Box, {
|
|
513
514
|
flexible: true,
|
|
514
515
|
shrink: true,
|
|
515
516
|
scroll: "vertical",
|
|
516
517
|
className: `${tabletMode ? '' : tabsStyle.menuBox} ${moreBoxClass}`,
|
|
517
|
-
onScroll: this.onScroll
|
|
518
|
+
onScroll: this.onScroll,
|
|
519
|
+
dataId: `${dataId}_Tabs`
|
|
518
520
|
}, React.Children.map(moreTabs, child => {
|
|
519
521
|
if (!child) {
|
|
520
522
|
return null;
|
|
@@ -16,7 +16,8 @@ export default function DropDownSearch(props) {
|
|
|
16
16
|
textBoxSize,
|
|
17
17
|
placeHolder,
|
|
18
18
|
customClass,
|
|
19
|
-
getRef
|
|
19
|
+
getRef,
|
|
20
|
+
dataId
|
|
20
21
|
} = props;
|
|
21
22
|
let {
|
|
22
23
|
searchClass = '',
|
|
@@ -36,7 +37,9 @@ export default function DropDownSearch(props) {
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className: `${style.search} ${style[`${size}Search`]} ${searchClass}
|
|
40
|
+
className: `${style.search} ${style[`${size}Search`]} ${searchClass}`,
|
|
41
|
+
"data-id": dataId,
|
|
42
|
+
"data-test-id": dataId
|
|
40
43
|
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
41
44
|
id: id,
|
|
42
45
|
inputRef: getReference,
|
|
@@ -58,7 +58,8 @@ export const DropDownSearch_propTypes = {
|
|
|
58
58
|
customClass: PropTypes.shape({
|
|
59
59
|
searchClass: PropTypes.string,
|
|
60
60
|
customTextBox: PropTypes.string
|
|
61
|
-
})
|
|
61
|
+
}),
|
|
62
|
+
dataId: PropTypes.string
|
|
62
63
|
};
|
|
63
64
|
export const DropDownSeparator_propTypes = {
|
|
64
65
|
customClass: PropTypes.string
|
|
@@ -75,7 +75,8 @@ const ListItemWithCheckBox = props => {
|
|
|
75
75
|
customProps: ListItemProps,
|
|
76
76
|
...ContainerProps
|
|
77
77
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
78
|
-
className: style.iconBox
|
|
78
|
+
className: style.iconBox,
|
|
79
|
+
dataId: `${dataId ? dataId : value}_checkBox`
|
|
79
80
|
}, /*#__PURE__*/React.createElement(CheckBox, {
|
|
80
81
|
checked: checked,
|
|
81
82
|
a11y: {
|
|
@@ -75,7 +75,8 @@ const ListItemWithRadio = props => {
|
|
|
75
75
|
customProps: ListItemProps,
|
|
76
76
|
...ContainerProps
|
|
77
77
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
78
|
-
className: style.iconBox
|
|
78
|
+
className: style.iconBox,
|
|
79
|
+
dataId: `${dataId}_radio`
|
|
79
80
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
80
81
|
checked: checked,
|
|
81
82
|
id: id,
|
|
@@ -925,7 +925,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
925
925
|
getRef: this.selectedOptionRef,
|
|
926
926
|
onRemove: this.handleRemoveOption,
|
|
927
927
|
onSelect: this.handleClickSelectedOption,
|
|
928
|
-
isGroupSelect: true
|
|
928
|
+
isGroupSelect: true,
|
|
929
|
+
dataId: `${dataId}_selectedOptions`
|
|
929
930
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
930
931
|
flexible: true,
|
|
931
932
|
className: style.wrapper,
|
|
@@ -999,7 +1000,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
999
1000
|
role: 'listbox',
|
|
1000
1001
|
ariaMultiselectable: true
|
|
1001
1002
|
},
|
|
1002
|
-
alignBox: "row"
|
|
1003
|
+
alignBox: "row",
|
|
1004
|
+
dataId: `${dataId}_dropbox`
|
|
1003
1005
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
1004
1006
|
flexible: true
|
|
1005
1007
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
@@ -1043,7 +1045,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1043
1045
|
listItemSize: listItemSize,
|
|
1044
1046
|
a11y: {
|
|
1045
1047
|
role: 'option'
|
|
1046
|
-
}
|
|
1048
|
+
},
|
|
1049
|
+
dataId: `${dataId}_Options`
|
|
1047
1050
|
}));
|
|
1048
1051
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1049
1052
|
options: revampedGroups,
|
|
@@ -429,7 +429,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
429
429
|
isReadOnly: isReadOnly,
|
|
430
430
|
getRef: this.selectedOptionRef,
|
|
431
431
|
onRemove: this.handleRemoveOption,
|
|
432
|
-
onSelect: this.handleClickSelectedOption
|
|
432
|
+
onSelect: this.handleClickSelectedOption,
|
|
433
|
+
dataId: `${dataIdMultiSelectComp}_selectedOptions`
|
|
433
434
|
}), moreCount > 0 ? /*#__PURE__*/React.createElement(Box, {
|
|
434
435
|
className: style.more,
|
|
435
436
|
onClick: this.handleMoreClick,
|
|
@@ -438,7 +439,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
438
439
|
flexible: true,
|
|
439
440
|
className: style.wrapper,
|
|
440
441
|
adjust: true,
|
|
441
|
-
shrink: true
|
|
442
|
+
shrink: true,
|
|
443
|
+
dataId: `${dataIdMultiSelectComp}_textBox`
|
|
442
444
|
}, /*#__PURE__*/React.createElement("span", {
|
|
443
445
|
className: ` ${style.custmSpan} ${textBoxSize === 'xmedium' ? style.custmSpanXmedium : style.custmSpanMedium} ${isShowClearIcon ? style.clearIconSpace : ''}
|
|
444
446
|
`
|
|
@@ -505,6 +507,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
505
507
|
role: 'listbox',
|
|
506
508
|
ariaMultiselectable: true
|
|
507
509
|
},
|
|
510
|
+
dataId: `${dataIdMultiSelectComp}_dropbox`,
|
|
508
511
|
...DropBoxProps,
|
|
509
512
|
alignBox: "row",
|
|
510
513
|
isResponsivePadding: getFooter ? false : true
|
|
@@ -537,6 +540,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
537
540
|
a11y: {
|
|
538
541
|
role: 'option'
|
|
539
542
|
},
|
|
543
|
+
dataId: `${dataIdMultiSelectComp}_Options`,
|
|
540
544
|
...SuggestionsProps
|
|
541
545
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
542
546
|
isLoading: isFetchingOptions,
|
|
@@ -901,7 +901,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
901
901
|
onRemove: this.handleRemoveOption,
|
|
902
902
|
onSelect: this.handleClickSelectedOption,
|
|
903
903
|
size: size,
|
|
904
|
-
palette: palette
|
|
904
|
+
palette: palette,
|
|
905
|
+
dataId: `${dataId}_selectedOptions`
|
|
905
906
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
906
907
|
flexible: true,
|
|
907
908
|
className: style.wrapper,
|
|
@@ -134,7 +134,8 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
134
134
|
role: 'listbox'
|
|
135
135
|
},
|
|
136
136
|
isResponsivePadding: true,
|
|
137
|
-
alignBox: "row"
|
|
137
|
+
alignBox: "row",
|
|
138
|
+
dataId: `${dataId}_dropbox`
|
|
138
139
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
139
140
|
flexible: true
|
|
140
141
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
@@ -21,7 +21,8 @@ export default class SelectedOptions extends React.PureComponent {
|
|
|
21
21
|
onRemove,
|
|
22
22
|
onSelect,
|
|
23
23
|
size,
|
|
24
|
-
palette
|
|
24
|
+
palette,
|
|
25
|
+
dataId
|
|
25
26
|
} = this.props;
|
|
26
27
|
const isDarkPalette = palette === 'dark' ? 'dark' : 'danger';
|
|
27
28
|
return /*#__PURE__*/React.createElement(React.Fragment, null, selectedOptions.map(option => {
|
|
@@ -49,7 +50,8 @@ export default class SelectedOptions extends React.PureComponent {
|
|
|
49
50
|
if (optionType === 'avatar') {
|
|
50
51
|
return /*#__PURE__*/React.createElement(Box, {
|
|
51
52
|
className: `${style.tag} ${style[size]}`,
|
|
52
|
-
key: `${id}photoTag
|
|
53
|
+
key: `${id}photoTag`,
|
|
54
|
+
dataId: dataId
|
|
53
55
|
}, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
|
|
54
56
|
active: highLightedSelectOptions.indexOf(id) >= 0,
|
|
55
57
|
hasAvatar: true,
|
|
@@ -58,7 +60,8 @@ export default class SelectedOptions extends React.PureComponent {
|
|
|
58
60
|
} else if (optionType === 'icon') {
|
|
59
61
|
return /*#__PURE__*/React.createElement(Box, {
|
|
60
62
|
className: `${style.tag} ${style[size]}`,
|
|
61
|
-
key: `${id}iconTag
|
|
63
|
+
key: `${id}iconTag`,
|
|
64
|
+
dataId: dataId
|
|
62
65
|
}, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
|
|
63
66
|
active: highLightedSelectOptions.indexOf(id) >= 0,
|
|
64
67
|
iconName: icon,
|
|
@@ -68,7 +71,8 @@ export default class SelectedOptions extends React.PureComponent {
|
|
|
68
71
|
|
|
69
72
|
return /*#__PURE__*/React.createElement(Box, {
|
|
70
73
|
className: `${style.tag} ${style[size]}`,
|
|
71
|
-
key: `${id}tag
|
|
74
|
+
key: `${id}tag`,
|
|
75
|
+
dataId: dataId
|
|
72
76
|
}, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
|
|
73
77
|
active: highLightedSelectOptions.indexOf(id) >= 0
|
|
74
78
|
}));
|
|
@@ -149,7 +149,8 @@ export const MultiSelectWithAvatar_defaultProps = {
|
|
|
149
149
|
needResponsive: true
|
|
150
150
|
};
|
|
151
151
|
export const SelectedOptions_defaultProps = {
|
|
152
|
-
size: 'medium'
|
|
152
|
+
size: 'medium',
|
|
153
|
+
dataId: 'selectedOptions'
|
|
153
154
|
};
|
|
154
155
|
export const Suggestions_defaultProps = {
|
|
155
156
|
a11y: {}
|
|
@@ -139,7 +139,8 @@ export const SelectedOptions_propTypes = {
|
|
|
139
139
|
optionType: PropTypes.string
|
|
140
140
|
})),
|
|
141
141
|
size: PropTypes.oneOf(['medium', 'xmedium']),
|
|
142
|
-
palette: PropTypes.string
|
|
142
|
+
palette: PropTypes.string,
|
|
143
|
+
dataId: PropTypes.string
|
|
143
144
|
};
|
|
144
145
|
export const Suggestions_propTypes = {
|
|
145
146
|
a11y: PropTypes.shape({
|
|
@@ -209,7 +209,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
209
209
|
size: tagSize
|
|
210
210
|
})) : null, /*#__PURE__*/React.createElement(Box, {
|
|
211
211
|
flexible: true,
|
|
212
|
-
className: style.textBox
|
|
212
|
+
className: style.textBox,
|
|
213
|
+
dataId: `${dataId}_textBox`
|
|
213
214
|
}, /*#__PURE__*/React.createElement(Textbox, {
|
|
214
215
|
a11y: {
|
|
215
216
|
ariaActivedescendant: selectedId,
|
|
@@ -257,7 +258,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
257
258
|
needResponsive: needResponsive,
|
|
258
259
|
isPadding: false,
|
|
259
260
|
isResponsivePadding: true,
|
|
260
|
-
alignBox: "row"
|
|
261
|
+
alignBox: "row",
|
|
262
|
+
dataId: `${dataId}_dropbox`
|
|
261
263
|
}, isLoading ? /*#__PURE__*/React.createElement(Container, {
|
|
262
264
|
align: "both",
|
|
263
265
|
className: style.loader
|
|
@@ -295,6 +297,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
295
297
|
role: 'heading'
|
|
296
298
|
}
|
|
297
299
|
})) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
300
|
+
dataId: `${dataId}_Options`,
|
|
298
301
|
activeId: selectedId,
|
|
299
302
|
suggestions: suggestions,
|
|
300
303
|
getRef: this.suggestionItemRef,
|
|
@@ -379,7 +379,8 @@ class SelectWithIcon extends Component {
|
|
|
379
379
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
380
380
|
name: iconName,
|
|
381
381
|
size: iconSize,
|
|
382
|
-
iconClass: iconClass
|
|
382
|
+
iconClass: iconClass,
|
|
383
|
+
dataId: `${dataId}_icon`
|
|
383
384
|
})) : null, /*#__PURE__*/React.createElement(Box, {
|
|
384
385
|
flexible: true
|
|
385
386
|
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
@@ -472,7 +473,8 @@ class SelectWithIcon extends Component {
|
|
|
472
473
|
}))) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
473
474
|
customClass: `${tabletMode ? style.responsivedropBoxList : style.dropBoxList} ${!tabletMode && dropBoxSize ? style[dropBoxSize] : ''}`,
|
|
474
475
|
shrink: true,
|
|
475
|
-
eleRef: this.scrollContentRef
|
|
476
|
+
eleRef: this.scrollContentRef,
|
|
477
|
+
dataId: `${dataId}_Options`
|
|
476
478
|
}, options.length ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((options, i) => {
|
|
477
479
|
let {
|
|
478
480
|
iconName,
|