@zohodesk/dot 1.4.10 → 1.4.12
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/UnValidatedFiles.html +101 -0
- package/.cli/propValidation_report.html +1 -1
- package/README.md +11 -1
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +3 -0
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +3 -0
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +3 -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/form/fields/CheckBoxField/CheckBoxField.js +3 -1
- package/es/form/fields/CheckBoxField/props/propTypes.js +1 -0
- package/es/form/fields/Fields.module.css +20 -0
- package/es/form/fields/RadioField/RadioField.js +12 -3
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -4
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +9 -0
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +9 -2
- package/es/form/fields/TagsMultiSelectField/props/defaultProps.js +3 -1
- package/es/form/fields/TagsMultiSelectField/props/propTypes.js +5 -1
- package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +3 -1
- package/es/v1/form/fields/CheckBoxField/props/propTypes.js +1 -0
- package/es/v1/form/fields/RadioField/RadioField.js +34 -12
- package/es/v1/form/fields/RadioField/props/defaultProps.js +1 -0
- package/es/v1/form/fields/RadioField/props/propTypes.js +2 -0
- package/es/v1/form/fields/RadioField/useRadio.js +44 -0
- package/es/v1/form/fields/SelectField/SelectField.js +1 -9
- package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +42 -13
- package/es/v1/form/fields/TagsMultiSelect/props/defaultProps.js +4 -1
- package/es/v1/form/fields/TagsMultiSelect/props/propTypes.js +10 -1
- package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +9 -2
- package/es/v1/form/fields/TagsMultiSelectField/props/defaultProps.js +3 -1
- package/es/v1/form/fields/TagsMultiSelectField/props/propTypes.js +5 -1
- package/es/v1/form/fields/TextBoxField/TextBoxField.js +122 -142
- package/es/v1/form/fields/TextEditorField/TextEditorField.js +133 -153
- package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +137 -178
- package/es/v1/form/fields/TextareaField/TextareaField.js +113 -137
- package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +43 -43
- package/es/v1/form/layout/Field/Field.js +24 -28
- package/es/v1/form/layout/Section/Section.js +26 -33
- package/es/v1/list/Subject/Subject.js +39 -48
- package/es/v1/list/TagNew/TagNew.js +18 -27
- package/es/v1/list/Thread/Thread.js +26 -35
- package/lib/form/fields/CheckBoxField/CheckBoxField.js +3 -1
- package/lib/form/fields/CheckBoxField/props/propTypes.js +1 -0
- package/lib/form/fields/Fields.module.css +20 -0
- package/lib/form/fields/RadioField/RadioField.js +15 -3
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -5
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +9 -0
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +9 -2
- package/lib/form/fields/TagsMultiSelectField/props/defaultProps.js +3 -1
- package/lib/form/fields/TagsMultiSelectField/props/propTypes.js +5 -1
- package/lib/v1/form/fields/CheckBoxField/CheckBoxField.js +3 -1
- package/lib/v1/form/fields/CheckBoxField/props/propTypes.js +1 -0
- package/lib/v1/form/fields/RadioField/RadioField.js +37 -10
- package/lib/v1/form/fields/RadioField/props/defaultProps.js +1 -0
- package/lib/v1/form/fields/RadioField/props/propTypes.js +2 -0
- package/lib/v1/form/fields/RadioField/useRadio.js +50 -0
- package/lib/v1/form/fields/SelectField/SelectField.js +1 -7
- package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +45 -13
- package/lib/v1/form/fields/TagsMultiSelect/props/defaultProps.js +4 -1
- package/lib/v1/form/fields/TagsMultiSelect/props/propTypes.js +10 -1
- package/lib/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +9 -2
- package/lib/v1/form/fields/TagsMultiSelectField/props/defaultProps.js +3 -1
- package/lib/v1/form/fields/TagsMultiSelectField/props/propTypes.js +5 -1
- package/lib/v1/form/fields/TextBoxField/TextBoxField.js +125 -181
- package/lib/v1/form/fields/TextEditorField/TextEditorField.js +138 -193
- package/lib/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +160 -212
- package/lib/v1/form/fields/TextareaField/TextareaField.js +117 -177
- package/lib/v1/form/fields/ValidationMessage/ValidationMessage.js +41 -80
- package/lib/v1/form/layout/Field/Field.js +22 -69
- package/lib/v1/form/layout/Section/Section.js +26 -72
- package/lib/v1/list/Subject/Subject.js +39 -87
- package/lib/v1/list/TagNew/TagNew.js +18 -66
- package/lib/v1/list/Thread/Thread.js +25 -73
- package/package.json +8 -8
- package/propValidationArg.json +8 -4
- package/result.json +1 -1
|
@@ -10,6 +10,9 @@ import Icon from '@zohodesk/icons/es/Icon';
|
|
|
10
10
|
import Label from '@zohodesk/components/es/v1/Label/Label';
|
|
11
11
|
import Radio from '@zohodesk/components/es/v1/Radio/Radio';
|
|
12
12
|
import ValidationMessage from '../ValidationMessage/ValidationMessage';
|
|
13
|
+
/** Hook */
|
|
14
|
+
|
|
15
|
+
import useRadio from './useRadio';
|
|
13
16
|
/** Css */
|
|
14
17
|
|
|
15
18
|
import style from '../../../../form/fields/Fields.module.css';
|
|
@@ -30,11 +33,13 @@ const RadioField = props => {
|
|
|
30
33
|
size,
|
|
31
34
|
selectedValue,
|
|
32
35
|
isActive,
|
|
36
|
+
getRef,
|
|
33
37
|
dataId,
|
|
34
38
|
dataSelectorId,
|
|
35
39
|
validationRuleMessage,
|
|
36
40
|
validationRulePalette,
|
|
37
41
|
isReadOnly,
|
|
42
|
+
isBoxStyle,
|
|
38
43
|
variant,
|
|
39
44
|
customProps,
|
|
40
45
|
onChange
|
|
@@ -46,11 +51,16 @@ const RadioField = props => {
|
|
|
46
51
|
ValidationMessageProps1 = {},
|
|
47
52
|
ValidationMessageProps2 = {}
|
|
48
53
|
} = customProps;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
+
const {
|
|
55
|
+
handleGetRef,
|
|
56
|
+
handleChange
|
|
57
|
+
} = useRadio({
|
|
58
|
+
id,
|
|
59
|
+
onChange,
|
|
60
|
+
getRef,
|
|
61
|
+
options,
|
|
62
|
+
selectedValue
|
|
63
|
+
});
|
|
54
64
|
return /*#__PURE__*/React.createElement("div", {
|
|
55
65
|
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
56
66
|
"data-title": isDisabled ? title : null,
|
|
@@ -63,16 +73,18 @@ const RadioField = props => {
|
|
|
63
73
|
customClass: `${style.fieldLabel} ${isMandatory ? style.labelMandatory : ''}`,
|
|
64
74
|
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`
|
|
65
75
|
}, LabelProps)), /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
className: `${style.fieldContainer} ${labelName ? style.fieldMargin_medium : ''} ${style.radioContainer}`
|
|
76
|
+
className: `${style.fieldContainer} ${isBoxStyle ? style.radiosWrapper : ''} ${labelName ? style.fieldMargin_medium : ''} ${style.radioContainer}`
|
|
67
77
|
}, options.map((option, index) => {
|
|
68
78
|
let {
|
|
69
79
|
text,
|
|
70
80
|
value,
|
|
81
|
+
disabled = false,
|
|
71
82
|
infoTooltip
|
|
72
83
|
} = option;
|
|
84
|
+
let isChecked = selectedValue == value;
|
|
73
85
|
return /*#__PURE__*/React.createElement("span", {
|
|
74
86
|
key: index,
|
|
75
|
-
className: `${
|
|
87
|
+
className: `${!isBoxStyle ? style.radio : ''} ${style.radioWrap}`
|
|
76
88
|
}, /*#__PURE__*/React.createElement(Radio, _extends({
|
|
77
89
|
id: index,
|
|
78
90
|
value: value,
|
|
@@ -80,20 +92,30 @@ const RadioField = props => {
|
|
|
80
92
|
text: text,
|
|
81
93
|
labelPalette: labelPalette,
|
|
82
94
|
labelSize: labelSize,
|
|
83
|
-
active: isActive,
|
|
84
|
-
disabled: isDisabled,
|
|
95
|
+
active: isActive || isBoxStyle && isChecked,
|
|
96
|
+
disabled: disabled || isDisabled,
|
|
85
97
|
onChange: handleChange,
|
|
98
|
+
getRef: handleGetRef,
|
|
86
99
|
size: size,
|
|
87
|
-
checked:
|
|
100
|
+
checked: isChecked,
|
|
88
101
|
dataId: dataId,
|
|
89
102
|
isReadOnly: isReadOnly,
|
|
90
103
|
variant: variant
|
|
91
|
-
}, RadioProps
|
|
104
|
+
}, RadioProps, {
|
|
105
|
+
a11y: {
|
|
106
|
+
tabIndex: !!selectedValue ? isChecked ? '0' : '-1' : index === 0 ? '0' : '-1',
|
|
107
|
+
...RadioProps.a11y
|
|
108
|
+
},
|
|
109
|
+
customClass: {
|
|
110
|
+
customRadioWrap: `${isBoxStyle ? style.radioBox : ''} ${isBoxStyle && isChecked ? style.radioBoxActive : ''}`,
|
|
111
|
+
...RadioProps.customClass
|
|
112
|
+
}
|
|
113
|
+
}), !!infoTooltip ? /*#__PURE__*/React.createElement(Icon, _extends({
|
|
92
114
|
name: "ZD-GN-info",
|
|
93
115
|
size: "16",
|
|
94
116
|
title: infoTooltip,
|
|
95
117
|
iconClass: style.infoIcon
|
|
96
|
-
}, InfoIconProps)) : null);
|
|
118
|
+
}, InfoIconProps)) : null));
|
|
97
119
|
})), validationMessage && /*#__PURE__*/React.createElement(ValidationMessage, _extends({
|
|
98
120
|
text: validationMessage,
|
|
99
121
|
palette: validationPalette,
|
|
@@ -2,8 +2,10 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
export const propTypes = {
|
|
3
3
|
dataId: PropTypes.string,
|
|
4
4
|
errorType: PropTypes.oneOf(['primary', 'secondary']),
|
|
5
|
+
getRef: PropTypes.func,
|
|
5
6
|
id: PropTypes.string,
|
|
6
7
|
isActive: PropTypes.bool,
|
|
8
|
+
isBoxStyle: PropTypes.bool,
|
|
7
9
|
isDisabled: PropTypes.bool,
|
|
8
10
|
isMandatory: PropTypes.bool,
|
|
9
11
|
isReadOnly: PropTypes.bool,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useRef, useEffect } from 'react';
|
|
2
|
+
export default function useRadio(_ref) {
|
|
3
|
+
let {
|
|
4
|
+
id,
|
|
5
|
+
onChange,
|
|
6
|
+
getRef,
|
|
7
|
+
options,
|
|
8
|
+
selectedValue
|
|
9
|
+
} = _ref;
|
|
10
|
+
|
|
11
|
+
const handleChange = value => {
|
|
12
|
+
onChange && onChange(id, value);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const radioRef = useRef({
|
|
16
|
+
radios: {},
|
|
17
|
+
focus: () => {}
|
|
18
|
+
}).current;
|
|
19
|
+
const firstRadioValue = options[0].value;
|
|
20
|
+
|
|
21
|
+
function handleGetRef(ele, val) {
|
|
22
|
+
radioRef.radios[val] = ele;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function handleFocus() {
|
|
26
|
+
if (!!selectedValue) {
|
|
27
|
+
radioRef.radios[selectedValue].focus();
|
|
28
|
+
} else {
|
|
29
|
+
radioRef.radios[firstRadioValue].focus();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
radioRef.focus = handleFocus;
|
|
35
|
+
getRef && getRef(radioRef, id);
|
|
36
|
+
return () => {
|
|
37
|
+
getRef && getRef(null, id);
|
|
38
|
+
};
|
|
39
|
+
}, [getRef]);
|
|
40
|
+
return {
|
|
41
|
+
handleGetRef,
|
|
42
|
+
handleChange
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -11,8 +11,6 @@ import Select from '@zohodesk/components/es/v1/Select/Select';
|
|
|
11
11
|
import ValidationMessage from '../ValidationMessage/ValidationMessage';
|
|
12
12
|
import { useUniqueId } from '@zohodesk/components/es/v1/Provider/IdProvider';
|
|
13
13
|
import FieldContainer from '../FieldContainer/FieldContainer';
|
|
14
|
-
/**** props ****/
|
|
15
|
-
|
|
16
14
|
/** CSS */
|
|
17
15
|
|
|
18
16
|
import style from '../../../../form/fields/Fields.module.css';
|
|
@@ -84,13 +82,7 @@ const SelectField = props => {
|
|
|
84
82
|
|
|
85
83
|
const handleGetRef = el => {
|
|
86
84
|
getRef && getRef(el, id);
|
|
87
|
-
};
|
|
88
|
-
// let { isFocusOnLabelClick } = this.props;
|
|
89
|
-
// if (isFocusOnLabelClick && this.selectBox && this.selectBox.focus) {
|
|
90
|
-
// this.selectBox.focus();
|
|
91
|
-
// }
|
|
92
|
-
// }
|
|
93
|
-
|
|
85
|
+
};
|
|
94
86
|
|
|
95
87
|
return /*#__PURE__*/React.createElement("div", {
|
|
96
88
|
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { defaultProps } from './props/defaultProps';
|
|
3
5
|
import { propTypes } from './props/propTypes';
|
|
@@ -11,6 +13,7 @@ import DropDownSeparator from '@zohodesk/components/es/v1/DropDown/DropDownSepar
|
|
|
11
13
|
import CommonEmptyState from '../../../emptystate/CommonEmptyState/CommonEmptyState';
|
|
12
14
|
import ResponsiveDropBox from '@zohodesk/components/es/v1/ResponsiveDropBox/ResponsiveDropBox';
|
|
13
15
|
import { ResponsiveReceiver } from '@zohodesk/components/es/v1/Responsive/CustomResponsive';
|
|
16
|
+
import MultiSelectHeader from '@zohodesk/components/es/v1/MultiSelect/MultiSelectHeader';
|
|
14
17
|
import { stopBubbling } from '../../../../utils/General';
|
|
15
18
|
import { scrollTo, findScrollEnd } from '@zohodesk/components/es/utils/Common.js';
|
|
16
19
|
import style from '../../../../form/fields/TagsMultiSelect/TagsMultiSelect.module.css';
|
|
@@ -140,14 +143,29 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
140
143
|
boxSize,
|
|
141
144
|
onSelectTag,
|
|
142
145
|
clickableTag,
|
|
143
|
-
dataSelectorId
|
|
146
|
+
dataSelectorId,
|
|
147
|
+
handleSelectAll,
|
|
148
|
+
selectAllText,
|
|
149
|
+
needSelectAll,
|
|
150
|
+
customClass,
|
|
151
|
+
customProps
|
|
144
152
|
} = this.props;
|
|
145
153
|
let {
|
|
146
154
|
showAll
|
|
147
155
|
} = this.state;
|
|
148
156
|
let chipLimit = !isPopupReady ? showAll ? tagsList.length : chipNeedToShow : tagsList.length;
|
|
157
|
+
let {
|
|
158
|
+
tagCustomClass = '',
|
|
159
|
+
listItemClass = '',
|
|
160
|
+
textBoxIconWrapperClass = ''
|
|
161
|
+
} = customClass;
|
|
162
|
+
const {
|
|
163
|
+
TextBoxIconProps = {},
|
|
164
|
+
TagWrapperProps = {},
|
|
165
|
+
TagProps = {}
|
|
166
|
+
} = customProps;
|
|
149
167
|
return /*#__PURE__*/React.createElement("div", {
|
|
150
|
-
className:
|
|
168
|
+
className: `${style.container} ${!isReadOnly ? ` ${needBorder ? style.hasBorder : ''}
|
|
151
169
|
${needBorder ? style[`borderColor_${borderColor}`] : style.borderColor_transparent} ${isPopupReady && needBorder ? style.active : ''}` : ''} ${className}`,
|
|
152
170
|
onClick: stopBubbling,
|
|
153
171
|
"data-id": `${dataId}_tagsContainer`,
|
|
@@ -157,7 +175,7 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
157
175
|
alignBox: "row",
|
|
158
176
|
align: "vertical",
|
|
159
177
|
isCover: false,
|
|
160
|
-
className: style.tagDiv
|
|
178
|
+
className: `${style.tagDiv} ${textBoxIconWrapperClass}`,
|
|
161
179
|
wrap: "wrap",
|
|
162
180
|
eleRef: getTargetRef,
|
|
163
181
|
scroll: "vertical"
|
|
@@ -165,20 +183,23 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
165
183
|
let {
|
|
166
184
|
name,
|
|
167
185
|
tagType,
|
|
168
|
-
id
|
|
186
|
+
id,
|
|
187
|
+
boxCustomProps,
|
|
188
|
+
tagCustomProps
|
|
169
189
|
} = tag;
|
|
170
|
-
return index < chipLimit ? /*#__PURE__*/React.createElement(Box, {
|
|
190
|
+
return index < chipLimit ? /*#__PURE__*/React.createElement(Box, _extends({
|
|
171
191
|
className: style.tag,
|
|
172
192
|
key: index
|
|
173
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
193
|
+
}, TagWrapperProps, boxCustomProps), /*#__PURE__*/React.createElement(Tag, _extends({
|
|
174
194
|
id: id,
|
|
175
195
|
text: name,
|
|
176
196
|
onRemove: isReadOnly ? null : deleteTag.bind(this, name),
|
|
177
197
|
closeTitle: i18nKeys.deleteText,
|
|
178
198
|
palette: clickableTag ? 'defaultLink' : tagType === 'SYSTEM' ? 'primary' : 'default',
|
|
179
199
|
isReadOnly: isReadOnly,
|
|
180
|
-
onSelectTag: onSelectTag ? onSelectTag : undefined
|
|
181
|
-
|
|
200
|
+
onSelectTag: onSelectTag ? onSelectTag : undefined,
|
|
201
|
+
customClass: tagCustomClass
|
|
202
|
+
}, TagProps, tagCustomProps))) : null;
|
|
182
203
|
}), tagsList.length > chipNeedToShow && !isPopupReady ? /*#__PURE__*/React.createElement(Box, {
|
|
183
204
|
className: style.moreLess,
|
|
184
205
|
dataId: `${dataId}_tagsMore`,
|
|
@@ -190,7 +211,7 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
190
211
|
className: style.inputWrapper
|
|
191
212
|
}, /*#__PURE__*/React.createElement("span", {
|
|
192
213
|
className: style.custmSpan
|
|
193
|
-
}, name), /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
214
|
+
}, name), /*#__PURE__*/React.createElement(TextBoxIcon, _extends({
|
|
194
215
|
htmlId: htmlId,
|
|
195
216
|
dataId: `${dataId}_tagInp`,
|
|
196
217
|
value: name,
|
|
@@ -207,7 +228,7 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
207
228
|
},
|
|
208
229
|
size: "xsmall",
|
|
209
230
|
inputRef: this.textInputRef
|
|
210
|
-
}, getTextBoxChildren ? getTextBoxChildren() : null))), isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
231
|
+
}, TextBoxIconProps), getTextBoxChildren ? getTextBoxChildren() : null))), isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
211
232
|
query: this.responsiveFunc,
|
|
212
233
|
responsiveId: "Helmet"
|
|
213
234
|
}, _ref2 => {
|
|
@@ -231,7 +252,12 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
231
252
|
alignBox: "row"
|
|
232
253
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
233
254
|
flexible: true
|
|
234
|
-
},
|
|
255
|
+
}, needSelectAll ? /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
256
|
+
onSelect: handleSelectAll,
|
|
257
|
+
selectAllText: selectAllText,
|
|
258
|
+
suggestions: searchList,
|
|
259
|
+
dataId: `${dataId}_selectAll`
|
|
260
|
+
}) : null, isTagListLoading ? /*#__PURE__*/React.createElement(Container, {
|
|
235
261
|
align: "both",
|
|
236
262
|
className: `${tabletMode ? '' : style.viewpopNew}`
|
|
237
263
|
}, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, {
|
|
@@ -245,7 +271,8 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
245
271
|
}, searchList.map((item, index) => {
|
|
246
272
|
let {
|
|
247
273
|
name,
|
|
248
|
-
isNew
|
|
274
|
+
isNew,
|
|
275
|
+
listItemProps
|
|
249
276
|
} = item;
|
|
250
277
|
return /*#__PURE__*/React.createElement(React.Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/React.createElement(DropDownSeparator, null) : null, /*#__PURE__*/React.createElement(ListItem, {
|
|
251
278
|
key: index,
|
|
@@ -257,7 +284,9 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
257
284
|
needTick: true,
|
|
258
285
|
highlight: selectSearchIndex === index,
|
|
259
286
|
getRef: this.getSelectedItemRef,
|
|
260
|
-
isDisabled: listDisabled
|
|
287
|
+
isDisabled: listDisabled,
|
|
288
|
+
customProps: listItemProps,
|
|
289
|
+
customClass: listItemClass
|
|
261
290
|
}, isNew ? /*#__PURE__*/React.createElement(Container, {
|
|
262
291
|
alignBox: "row",
|
|
263
292
|
align: "vertical"
|
|
@@ -40,5 +40,14 @@ export const propTypes = {
|
|
|
40
40
|
boxSize: PropTypes.string,
|
|
41
41
|
onSelectTag: PropTypes.func,
|
|
42
42
|
clickableTag: PropTypes.bool,
|
|
43
|
-
dataSelectorId: PropTypes.string
|
|
43
|
+
dataSelectorId: PropTypes.string,
|
|
44
|
+
handleSelectAll: PropTypes.func,
|
|
45
|
+
selectAllText: PropTypes.string,
|
|
46
|
+
needSelectAll: PropTypes.bool,
|
|
47
|
+
customClass: PropTypes.object,
|
|
48
|
+
customProps: PropTypes.shape({
|
|
49
|
+
TextBoxIconProps: PropTypes.object,
|
|
50
|
+
TagWrapperProps: PropTypes.object,
|
|
51
|
+
TagProps: PropTypes.object
|
|
52
|
+
})
|
|
44
53
|
};
|
|
@@ -75,7 +75,11 @@ const TagsMultiSelectField = props => {
|
|
|
75
75
|
value,
|
|
76
76
|
selectedValueCount,
|
|
77
77
|
validationMessage,
|
|
78
|
-
options
|
|
78
|
+
options,
|
|
79
|
+
infoText,
|
|
80
|
+
isLocked,
|
|
81
|
+
lockedInfoText,
|
|
82
|
+
alignField
|
|
79
83
|
} = fieldProperties;
|
|
80
84
|
options = options || [];
|
|
81
85
|
|
|
@@ -191,7 +195,10 @@ const TagsMultiSelectField = props => {
|
|
|
191
195
|
"data-selector-id": dataSelectorId
|
|
192
196
|
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
193
197
|
ePhiData: ePhiData,
|
|
194
|
-
alignContainer:
|
|
198
|
+
alignContainer: alignField,
|
|
199
|
+
infoText: infoText,
|
|
200
|
+
isLocked: isLocked,
|
|
201
|
+
lockedInfoText: lockedInfoText,
|
|
195
202
|
renderProps: {
|
|
196
203
|
end: renderEnd
|
|
197
204
|
}
|
|
@@ -2,7 +2,9 @@ import { FieldCommonDefaultProps } from '../../props/FieldCommonDefaultProps';
|
|
|
2
2
|
export const defaultProps = {
|
|
3
3
|
fieldProperties: {
|
|
4
4
|
isDisabled: false,
|
|
5
|
-
isMandatory: false
|
|
5
|
+
isMandatory: false,
|
|
6
|
+
isLocked: false,
|
|
7
|
+
alignField: 'baseline'
|
|
6
8
|
},
|
|
7
9
|
styleProperties: {
|
|
8
10
|
containerClass: '',
|
|
@@ -11,7 +11,11 @@ export const propTypes = {
|
|
|
11
11
|
selectedValueCount: PropTypes.string,
|
|
12
12
|
validationMessage: PropTypes.string,
|
|
13
13
|
options: PropTypes.array,
|
|
14
|
-
clickableTag: PropTypes.bool
|
|
14
|
+
clickableTag: PropTypes.bool,
|
|
15
|
+
infoText: PropTypes.string,
|
|
16
|
+
isLocked: PropTypes.bool,
|
|
17
|
+
lockedInfoText: PropTypes.string,
|
|
18
|
+
alignField: PropTypes.oneOf(['vertical', 'baseline'])
|
|
15
19
|
}),
|
|
16
20
|
styleProperties: PropTypes.shape({
|
|
17
21
|
labelSize: PropTypes.string,
|