@zohodesk/dot 1.3.0 → 1.3.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/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +21 -12
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +163 -553
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +163 -553
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +163 -553
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +3 -12
- 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 +466 -0
- package/coverage/IconButton/IconButton.module.css.html +151 -0
- package/coverage/IconButton/index.html +131 -0
- package/coverage/IconButton/props/defaultProps.js.html +136 -0
- package/coverage/IconButton/props/index.html +131 -0
- package/coverage/IconButton/props/propTypes.js.html +187 -0
- 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 +4 -0
- package/coverage/coverage-summary.json +5 -1
- package/coverage/index.html +40 -10
- package/es/IconButton/__tests__/IconButton.spec.js +148 -0
- package/es/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/es/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/es/v1/ActionButton/ActionButton.js +2 -2
- package/es/v1/AlphabeticList/AlphabeticList.js +6 -2
- package/es/v1/Attachment/Attachment.js +78 -75
- package/es/v1/AttachmentViewer/AttachmentImage.js +44 -63
- package/es/v1/Image/Image.js +26 -33
- package/es/v1/Loader/Loader.js +12 -18
- package/es/v1/Message/Message.js +16 -42
- package/es/v1/PlusIcon/PlusIcon.js +25 -37
- package/es/v1/Separator/Separator.js +40 -47
- package/es/v1/Upload/Upload.js +59 -66
- package/es/v1/alert/AlertHeader/AlertHeader.js +5 -4
- package/es/v1/alert/AlertHeader/props/defaultProps.js +12 -0
- package/es/v1/alert/AlertHeader/props/propTypes.js +20 -0
- package/es/v1/alert/AlertLookup/AlertLookup.js +6 -4
- package/es/v1/alert/AlertLookup/props/defaultProps.js +13 -0
- package/es/v1/alert/AlertLookup/props/propTypes.js +36 -0
- package/es/v1/avatar/AvatarClose/AvatarClose.js +32 -43
- package/es/v1/avatar/AvatarCollision/AvatarCollision.js +41 -52
- package/es/v1/avatar/AvatarIcon/AvatarIcon.js +38 -43
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +52 -63
- package/es/v1/avatar/AvatarThread/AvatarThread.js +62 -69
- package/es/v1/avatar/AvatarUser/AvatarUser.js +93 -100
- package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +81 -88
- package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +6 -6
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
- package/es/v1/form/fields/DateField/DateField.js +6 -6
- package/es/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
- package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
- package/es/v1/form/fields/PhoneField/PhoneField.js +6 -6
- package/es/v1/form/fields/RadioField/RadioField.js +89 -97
- package/es/v1/form/fields/SelectField/SelectField.js +139 -154
- package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +154 -197
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +108 -124
- package/es/v1/list/SecondaryText/AccountName.js +61 -69
- package/es/v1/list/SecondaryText/ContactName.js +66 -74
- package/es/v1/list/SecondaryText/DepartmentText.js +15 -27
- package/es/v1/list/SecondaryText/Email.js +32 -40
- package/es/v1/list/SecondaryText/HappinessRating.js +17 -25
- package/es/v1/list/SecondaryText/PhoneNumber.js +36 -44
- package/es/v1/list/SecondaryText/PriorityText.js +16 -28
- package/es/v1/list/SecondaryText/SecondaryText.js +21 -33
- package/es/v1/list/SecondaryText/StatusText.js +17 -29
- package/es/v1/list/SecondaryText/TicketId.js +33 -45
- package/es/v1/list/SecondaryText/Website.js +22 -30
- package/es/v1/list/SecondryPanel/SecondryPanel.js +66 -83
- package/es/v1/list/SentimentStatus/SentimentStatus.js +18 -29
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/es/v1/list/status/StatusListItem/StatusListItem.js +75 -100
- package/es/v1/lookup/EmptyPage/EmptyPage.js +15 -26
- package/es/v1/lookup/Section/Section.js +14 -20
- package/es/v1/svg/PlusIcon.js +20 -27
- package/es/v1/svg/SnippetIcon.js +22 -29
- package/es/v1/svg/TemplateIcon.js +23 -30
- package/lib/IconButton/__tests__/IconButton.spec.js +156 -0
- package/lib/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/lib/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/lib/v1/ActionButton/ActionButton.js +2 -2
- package/lib/v1/AlphabeticList/AlphabeticList.js +7 -3
- package/lib/v1/Attachment/Attachment.js +77 -112
- package/lib/v1/AttachmentViewer/AttachmentImage.js +61 -96
- package/lib/v1/Image/Image.js +26 -71
- package/lib/v1/Loader/Loader.js +12 -55
- package/lib/v1/Message/Message.js +23 -80
- package/lib/v1/PlusIcon/PlusIcon.js +25 -71
- package/lib/v1/Separator/Separator.js +44 -85
- package/lib/v1/Upload/Upload.js +58 -103
- package/lib/v1/alert/AlertHeader/AlertHeader.js +5 -4
- package/lib/v1/alert/AlertHeader/props/defaultProps.js +19 -0
- package/lib/v1/alert/AlertHeader/props/propTypes.js +31 -0
- package/lib/v1/alert/AlertLookup/AlertLookup.js +6 -4
- package/lib/v1/alert/AlertLookup/props/defaultProps.js +20 -0
- package/lib/v1/alert/AlertLookup/props/propTypes.js +47 -0
- package/lib/v1/avatar/AvatarClose/AvatarClose.js +32 -77
- package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +41 -86
- package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +37 -80
- package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +52 -97
- package/lib/v1/avatar/AvatarThread/AvatarThread.js +61 -106
- package/lib/v1/avatar/AvatarUser/AvatarUser.js +95 -140
- package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +85 -130
- package/lib/v1/form/fields/CheckBoxField/CheckBoxField.js +6 -6
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
- package/lib/v1/form/fields/DateField/DateField.js +6 -6
- package/lib/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
- package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
- package/lib/v1/form/fields/PhoneField/PhoneField.js +6 -6
- package/lib/v1/form/fields/RadioField/RadioField.js +91 -137
- package/lib/v1/form/fields/SelectField/SelectField.js +149 -200
- package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +160 -253
- package/lib/v1/layout/SubtabLayout/SubtabLayout.js +107 -206
- package/lib/v1/list/SecondaryText/AccountName.js +63 -113
- package/lib/v1/list/SecondaryText/ContactName.js +67 -117
- package/lib/v1/list/SecondaryText/DepartmentText.js +16 -66
- package/lib/v1/list/SecondaryText/Email.js +32 -82
- package/lib/v1/list/SecondaryText/HappinessRating.js +21 -68
- package/lib/v1/list/SecondaryText/PhoneNumber.js +36 -86
- package/lib/v1/list/SecondaryText/PriorityText.js +16 -66
- package/lib/v1/list/SecondaryText/SecondaryText.js +19 -69
- package/lib/v1/list/SecondaryText/StatusText.js +17 -67
- package/lib/v1/list/SecondaryText/TicketId.js +33 -83
- package/lib/v1/list/SecondaryText/Website.js +29 -72
- package/lib/v1/list/SecondryPanel/SecondryPanel.js +69 -168
- package/lib/v1/list/SentimentStatus/SentimentStatus.js +19 -64
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/lib/v1/list/status/StatusListItem/StatusListItem.js +81 -137
- package/lib/v1/lookup/EmptyPage/EmptyPage.js +43 -93
- package/lib/v1/lookup/Section/Section.js +14 -58
- package/lib/v1/svg/PlusIcon.js +20 -65
- package/lib/v1/svg/SnippetIcon.js +22 -67
- package/lib/v1/svg/TemplateIcon.js +23 -68
- package/package.json +12 -12
- package/result.json +1 -1
- package/unittest/index.html +1 -1
|
@@ -29,141 +29,95 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
|
|
30
30
|
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); }
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
size: "medium",
|
|
117
|
-
id: id,
|
|
118
|
-
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : 'default',
|
|
119
|
-
customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
|
|
120
|
-
dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
|
|
121
|
-
}, LabelProps)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
|
-
className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"].fieldMargin_medium : '', " ").concat(_FieldsModule["default"].radioContainer)
|
|
123
|
-
}, options.map(function (option, index) {
|
|
124
|
-
var text = option.text,
|
|
125
|
-
value = option.value;
|
|
126
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
127
|
-
key: index,
|
|
128
|
-
className: "".concat(_FieldsModule["default"].radio)
|
|
129
|
-
}, /*#__PURE__*/_react["default"].createElement(_Radio["default"], _extends({
|
|
130
|
-
id: index,
|
|
131
|
-
value: value,
|
|
132
|
-
name: id,
|
|
133
|
-
text: text,
|
|
134
|
-
labelPalette: labelPalette,
|
|
135
|
-
labelSize: labelSize,
|
|
136
|
-
active: isActive,
|
|
137
|
-
disabled: isDisabled,
|
|
138
|
-
onChange: _this2.handleChange,
|
|
139
|
-
size: size,
|
|
140
|
-
checked: selectedValue == value,
|
|
141
|
-
dataId: dataId,
|
|
142
|
-
isReadOnly: isReadOnly,
|
|
143
|
-
variant: variant
|
|
144
|
-
}, RadioProps)));
|
|
145
|
-
})), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
146
|
-
text: validationMessage,
|
|
147
|
-
palette: validationPalette,
|
|
148
|
-
type: errorType,
|
|
149
|
-
dataId: "".concat(dataId, "_ValidationMessage")
|
|
150
|
-
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
151
|
-
text: validationRuleMessage,
|
|
152
|
-
palette: validationRulePalette,
|
|
153
|
-
type: errorType,
|
|
154
|
-
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
155
|
-
}, ValidationMessageProps2)));
|
|
156
|
-
}
|
|
157
|
-
}]);
|
|
158
|
-
|
|
159
|
-
return RadioField;
|
|
160
|
-
}(_react.PureComponent);
|
|
161
|
-
|
|
162
|
-
exports["default"] = RadioField;
|
|
32
|
+
var RadioField = function RadioField(props) {
|
|
33
|
+
var labelName = props.labelName,
|
|
34
|
+
id = props.id,
|
|
35
|
+
isMandatory = props.isMandatory,
|
|
36
|
+
options = props.options,
|
|
37
|
+
validationMessage = props.validationMessage,
|
|
38
|
+
validationPalette = props.validationPalette,
|
|
39
|
+
errorType = props.errorType,
|
|
40
|
+
isDisabled = props.isDisabled,
|
|
41
|
+
title = props.title,
|
|
42
|
+
labelPalette = props.labelPalette,
|
|
43
|
+
labelSize = props.labelSize,
|
|
44
|
+
size = props.size,
|
|
45
|
+
selectedValue = props.selectedValue,
|
|
46
|
+
isActive = props.isActive,
|
|
47
|
+
dataId = props.dataId,
|
|
48
|
+
dataSelectorId = props.dataSelectorId,
|
|
49
|
+
validationRuleMessage = props.validationRuleMessage,
|
|
50
|
+
validationRulePalette = props.validationRulePalette,
|
|
51
|
+
isReadOnly = props.isReadOnly,
|
|
52
|
+
variant = props.variant,
|
|
53
|
+
customProps = props.customProps,
|
|
54
|
+
onChange = props.onChange;
|
|
55
|
+
var _customProps$LabelPro = customProps.LabelProps,
|
|
56
|
+
LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
|
|
57
|
+
_customProps$RadioPro = customProps.RadioProps,
|
|
58
|
+
RadioProps = _customProps$RadioPro === void 0 ? {} : _customProps$RadioPro,
|
|
59
|
+
_customProps$Validati = customProps.ValidationMessageProps1,
|
|
60
|
+
ValidationMessageProps1 = _customProps$Validati === void 0 ? {} : _customProps$Validati,
|
|
61
|
+
_customProps$Validati2 = customProps.ValidationMessageProps2,
|
|
62
|
+
ValidationMessageProps2 = _customProps$Validati2 === void 0 ? {} : _customProps$Validati2;
|
|
63
|
+
|
|
64
|
+
var handleChange = function handleChange(value) {
|
|
65
|
+
onChange && onChange(id, value);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
69
|
+
className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : isReadOnly ? _FieldsModule["default"].readonly : ''),
|
|
70
|
+
"data-title": isDisabled ? title : null,
|
|
71
|
+
"data-selector-id": dataSelectorId
|
|
72
|
+
}, labelName && /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
|
|
73
|
+
text: labelName,
|
|
74
|
+
size: "medium",
|
|
75
|
+
id: id,
|
|
76
|
+
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : 'default',
|
|
77
|
+
customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
|
|
78
|
+
dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
|
|
79
|
+
}, LabelProps)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"].fieldMargin_medium : '', " ").concat(_FieldsModule["default"].radioContainer)
|
|
81
|
+
}, options.map(function (option, index) {
|
|
82
|
+
var text = option.text,
|
|
83
|
+
value = option.value;
|
|
84
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
|
+
key: index,
|
|
86
|
+
className: "".concat(_FieldsModule["default"].radio)
|
|
87
|
+
}, /*#__PURE__*/_react["default"].createElement(_Radio["default"], _extends({
|
|
88
|
+
id: index,
|
|
89
|
+
value: value,
|
|
90
|
+
name: id,
|
|
91
|
+
text: text,
|
|
92
|
+
labelPalette: labelPalette,
|
|
93
|
+
labelSize: labelSize,
|
|
94
|
+
active: isActive,
|
|
95
|
+
disabled: isDisabled,
|
|
96
|
+
onChange: handleChange,
|
|
97
|
+
size: size,
|
|
98
|
+
checked: selectedValue == value,
|
|
99
|
+
dataId: dataId,
|
|
100
|
+
isReadOnly: isReadOnly,
|
|
101
|
+
variant: variant
|
|
102
|
+
}, RadioProps)));
|
|
103
|
+
})), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
104
|
+
text: validationMessage,
|
|
105
|
+
palette: validationPalette,
|
|
106
|
+
type: errorType,
|
|
107
|
+
dataId: "".concat(dataId, "_ValidationMessage")
|
|
108
|
+
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
109
|
+
text: validationRuleMessage,
|
|
110
|
+
palette: validationRulePalette,
|
|
111
|
+
type: errorType,
|
|
112
|
+
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
113
|
+
}, ValidationMessageProps2)));
|
|
114
|
+
};
|
|
115
|
+
|
|
163
116
|
RadioField.propTypes = _propTypes.propTypes;
|
|
164
|
-
RadioField.defaultProps = _defaultProps.defaultProps;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
117
|
+
RadioField.defaultProps = _defaultProps.defaultProps;
|
|
118
|
+
var MemoizedRadioField = /*#__PURE__*/(0, _react.memo)(RadioField);
|
|
119
|
+
MemoizedRadioField.propTypes = _propTypes.propTypes;
|
|
120
|
+
MemoizedRadioField.defaultProps = _defaultProps.defaultProps;
|
|
121
|
+
MemoizedRadioField.displayName = 'RadioField';
|
|
122
|
+
var _default = MemoizedRadioField;
|
|
123
|
+
exports["default"] = _default;
|
|
@@ -33,204 +33,153 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
33
33
|
|
|
34
34
|
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); }
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}, /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
|
|
179
|
-
options: options,
|
|
180
|
-
selectedValue: selectedValue,
|
|
181
|
-
onChange: this.handleChange,
|
|
182
|
-
onFocus: onFocus,
|
|
183
|
-
getRef: this.handleGetRef,
|
|
184
|
-
needSearch: needSearch,
|
|
185
|
-
emptyMessage: emptyMessage,
|
|
186
|
-
animationStyle: animationStyle,
|
|
187
|
-
textBoxSize: fieldSize === 'medium' ? textBoxSize : 'xsmall',
|
|
188
|
-
textBoxVariant: textBoxVariant,
|
|
189
|
-
searchBoxSize: searchBoxSize,
|
|
190
|
-
searchBoxPlaceHolder: searchBoxPlaceHolder,
|
|
191
|
-
valueField: valueField,
|
|
192
|
-
textField: textField,
|
|
193
|
-
excludeOptions: excludeOptions,
|
|
194
|
-
dataId: dataId,
|
|
195
|
-
onKeyDown: onKeyDown,
|
|
196
|
-
borderColor: borderColor,
|
|
197
|
-
isDisabled: isDisabled,
|
|
198
|
-
isReadOnly: isReadOnly,
|
|
199
|
-
isNextOptions: isNextOptions,
|
|
200
|
-
getNextOptions: getNextOptions,
|
|
201
|
-
popupGroup: popupGroup,
|
|
202
|
-
onSearch: onSearch,
|
|
203
|
-
htmlId: uniqueId,
|
|
204
|
-
needLocalSearch: needLocalSearch,
|
|
205
|
-
isDefaultSelectValue: isDefaultSelectValue,
|
|
206
|
-
placeHolder: placeHolder,
|
|
207
|
-
iconOnHover: iconOnHover
|
|
208
|
-
}, SelectProps, {
|
|
209
|
-
ariaLabelledby: uniqueId
|
|
210
|
-
}), children ? children : null)), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
211
|
-
text: validationMessage,
|
|
212
|
-
palette: validationPalette,
|
|
213
|
-
type: errorType,
|
|
214
|
-
htmlFor: uniqueId,
|
|
215
|
-
dataId: "".concat(dataId, "_ValidationMessage")
|
|
216
|
-
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
217
|
-
text: validationRuleMessage,
|
|
218
|
-
palette: validationRulePalette,
|
|
219
|
-
type: errorType,
|
|
220
|
-
htmlFor: uniqueId,
|
|
221
|
-
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
222
|
-
}, ValidationMessageProps2)));
|
|
223
|
-
}
|
|
224
|
-
}]);
|
|
225
|
-
|
|
226
|
-
return SelectField;
|
|
227
|
-
}(_react.PureComponent);
|
|
228
|
-
|
|
229
|
-
exports["default"] = SelectField;
|
|
36
|
+
var SelectField = function SelectField(props) {
|
|
37
|
+
var labelName = props.labelName,
|
|
38
|
+
isMandatory = props.isMandatory,
|
|
39
|
+
options = props.options,
|
|
40
|
+
selectedValue = props.selectedValue,
|
|
41
|
+
needSearch = props.needSearch,
|
|
42
|
+
emptyMessage = props.emptyMessage,
|
|
43
|
+
animationStyle = props.animationStyle,
|
|
44
|
+
textBoxSize = props.textBoxSize,
|
|
45
|
+
textBoxVariant = props.textBoxVariant,
|
|
46
|
+
searchBoxSize = props.searchBoxSize,
|
|
47
|
+
searchBoxPlaceHolder = props.searchBoxPlaceHolder,
|
|
48
|
+
validationMessage = props.validationMessage,
|
|
49
|
+
validationPalette = props.validationPalette,
|
|
50
|
+
isReadOnly = props.isReadOnly,
|
|
51
|
+
valueField = props.valueField,
|
|
52
|
+
textField = props.textField,
|
|
53
|
+
excludeOptions = props.excludeOptions,
|
|
54
|
+
errorType = props.errorType,
|
|
55
|
+
isDisabled = props.isDisabled,
|
|
56
|
+
title = props.title,
|
|
57
|
+
dataId = props.dataId,
|
|
58
|
+
dataSelectorId = props.dataSelectorId,
|
|
59
|
+
fieldClass = props.fieldClass,
|
|
60
|
+
validationRuleMessage = props.validationRuleMessage,
|
|
61
|
+
validationRulePalette = props.validationRulePalette,
|
|
62
|
+
onKeyDown = props.onKeyDown,
|
|
63
|
+
infoText = props.infoText,
|
|
64
|
+
isLocked = props.isLocked,
|
|
65
|
+
lockedInfoText = props.lockedInfoText,
|
|
66
|
+
borderColor = props.borderColor,
|
|
67
|
+
fieldSize = props.fieldSize,
|
|
68
|
+
isNextOptions = props.isNextOptions,
|
|
69
|
+
getNextOptions = props.getNextOptions,
|
|
70
|
+
popupGroup = props.popupGroup,
|
|
71
|
+
onSearch = props.onSearch,
|
|
72
|
+
labelPalette = props.labelPalette,
|
|
73
|
+
labelCustomClass = props.labelCustomClass,
|
|
74
|
+
htmlId = props.htmlId,
|
|
75
|
+
needLocalSearch = props.needLocalSearch,
|
|
76
|
+
isDefaultSelectValue = props.isDefaultSelectValue,
|
|
77
|
+
placeHolder = props.placeHolder,
|
|
78
|
+
children = props.children,
|
|
79
|
+
onFocus = props.onFocus,
|
|
80
|
+
iconOnHover = props.iconOnHover,
|
|
81
|
+
customProps = props.customProps,
|
|
82
|
+
renderLabelProps = props.renderLabelProps,
|
|
83
|
+
id = props.id,
|
|
84
|
+
onChange = props.onChange,
|
|
85
|
+
getRef = props.getRef;
|
|
86
|
+
var _customProps$LabelPro = customProps.LabelProps,
|
|
87
|
+
LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
|
|
88
|
+
_customProps$SelectPr = customProps.SelectProps,
|
|
89
|
+
SelectProps = _customProps$SelectPr === void 0 ? {} : _customProps$SelectPr,
|
|
90
|
+
_customProps$Validati = customProps.ValidationMessageProps1,
|
|
91
|
+
ValidationMessageProps1 = _customProps$Validati === void 0 ? {} : _customProps$Validati,
|
|
92
|
+
_customProps$Validati2 = customProps.ValidationMessageProps2,
|
|
93
|
+
ValidationMessageProps2 = _customProps$Validati2 === void 0 ? {} : _customProps$Validati2;
|
|
94
|
+
var getNextId = (0, _IdProvider.useUniqueId)();
|
|
95
|
+
var uniqueId = htmlId ? htmlId : getNextId();
|
|
96
|
+
|
|
97
|
+
var handleChange = function handleChange(selectedId, selectedVal) {
|
|
98
|
+
onChange && selectedValue !== selectedId && onChange(id, selectedId, selectedVal);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var handleGetRef = function handleGetRef(el) {
|
|
102
|
+
getRef && getRef(el, id);
|
|
103
|
+
}; // handleLabelClick() {
|
|
104
|
+
// let { isFocusOnLabelClick } = this.props;
|
|
105
|
+
// if (isFocusOnLabelClick && this.selectBox && this.selectBox.focus) {
|
|
106
|
+
// this.selectBox.focus();
|
|
107
|
+
// }
|
|
108
|
+
// }
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : isReadOnly ? _FieldsModule["default"].readonly : ''),
|
|
113
|
+
"data-title": isDisabled ? title : null,
|
|
114
|
+
"data-selector-id": dataSelectorId
|
|
115
|
+
}, labelName && /*#__PURE__*/_react["default"].createElement(_FieldContainer["default"], {
|
|
116
|
+
infoText: infoText,
|
|
117
|
+
isLocked: isLocked,
|
|
118
|
+
lockedInfoText: lockedInfoText,
|
|
119
|
+
renderProps: renderLabelProps
|
|
120
|
+
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
|
|
121
|
+
text: labelName,
|
|
122
|
+
size: fieldSize === 'small' ? 'small' : 'medium',
|
|
123
|
+
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
|
|
124
|
+
customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
|
|
125
|
+
htmlFor: uniqueId,
|
|
126
|
+
dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
|
|
127
|
+
}, LabelProps, {
|
|
128
|
+
id: uniqueId
|
|
129
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
|
+
className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '', " ").concat(fieldClass ? fieldClass : '')
|
|
131
|
+
}, /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
|
|
132
|
+
options: options,
|
|
133
|
+
selectedValue: selectedValue,
|
|
134
|
+
onChange: handleChange,
|
|
135
|
+
onFocus: onFocus,
|
|
136
|
+
getRef: handleGetRef,
|
|
137
|
+
needSearch: needSearch,
|
|
138
|
+
emptyMessage: emptyMessage,
|
|
139
|
+
animationStyle: animationStyle,
|
|
140
|
+
textBoxSize: fieldSize === 'medium' ? textBoxSize : 'xsmall',
|
|
141
|
+
textBoxVariant: textBoxVariant,
|
|
142
|
+
searchBoxSize: searchBoxSize,
|
|
143
|
+
searchBoxPlaceHolder: searchBoxPlaceHolder,
|
|
144
|
+
valueField: valueField,
|
|
145
|
+
textField: textField,
|
|
146
|
+
excludeOptions: excludeOptions,
|
|
147
|
+
dataId: dataId,
|
|
148
|
+
onKeyDown: onKeyDown,
|
|
149
|
+
borderColor: borderColor,
|
|
150
|
+
isDisabled: isDisabled,
|
|
151
|
+
isReadOnly: isReadOnly,
|
|
152
|
+
isNextOptions: isNextOptions,
|
|
153
|
+
getNextOptions: getNextOptions,
|
|
154
|
+
popupGroup: popupGroup,
|
|
155
|
+
onSearch: onSearch,
|
|
156
|
+
htmlId: uniqueId,
|
|
157
|
+
needLocalSearch: needLocalSearch,
|
|
158
|
+
isDefaultSelectValue: isDefaultSelectValue,
|
|
159
|
+
placeHolder: placeHolder,
|
|
160
|
+
iconOnHover: iconOnHover
|
|
161
|
+
}, SelectProps, {
|
|
162
|
+
ariaLabelledby: uniqueId
|
|
163
|
+
}), children ? children : null)), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
164
|
+
text: validationMessage,
|
|
165
|
+
palette: validationPalette,
|
|
166
|
+
type: errorType,
|
|
167
|
+
htmlFor: uniqueId,
|
|
168
|
+
dataId: "".concat(dataId, "_ValidationMessage")
|
|
169
|
+
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
170
|
+
text: validationRuleMessage,
|
|
171
|
+
palette: validationRulePalette,
|
|
172
|
+
type: errorType,
|
|
173
|
+
htmlFor: uniqueId,
|
|
174
|
+
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
175
|
+
}, ValidationMessageProps2)));
|
|
176
|
+
};
|
|
177
|
+
|
|
230
178
|
SelectField.propTypes = _propTypes.propTypes;
|
|
231
|
-
SelectField.defaultProps = _defaultProps.defaultProps;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
179
|
+
SelectField.defaultProps = _defaultProps.defaultProps;
|
|
180
|
+
var MemoizedSelectField = /*#__PURE__*/(0, _react.memo)(SelectField);
|
|
181
|
+
MemoizedSelectField.propTypes = _propTypes.propTypes;
|
|
182
|
+
MemoizedSelectField.defaultProps = _defaultProps.defaultProps;
|
|
183
|
+
MemoizedSelectField.displayName = 'SelectField';
|
|
184
|
+
var _default = MemoizedSelectField;
|
|
185
|
+
exports["default"] = _default;
|