@zohodesk/dot 1.4.10 → 1.4.11
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 +5 -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/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/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/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/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
|
@@ -33,183 +33,123 @@ 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
|
-
|
|
36
|
+
var TextareaField = function TextareaField(props) {
|
|
37
|
+
var labelName = props.labelName,
|
|
38
|
+
id = props.id,
|
|
39
|
+
isMandatory = props.isMandatory,
|
|
40
|
+
textBoxSize = props.textBoxSize,
|
|
41
|
+
animated = props.animated,
|
|
42
|
+
textBoxVariant = props.textBoxVariant,
|
|
43
|
+
isReadOnly = props.isReadOnly,
|
|
44
|
+
validationMessage = props.validationMessage,
|
|
45
|
+
validationPalette = props.validationPalette,
|
|
46
|
+
maxLength = props.maxLength,
|
|
47
|
+
value = props.value,
|
|
48
|
+
errorType = props.errorType,
|
|
49
|
+
isDisabled = props.isDisabled,
|
|
50
|
+
title = props.title,
|
|
51
|
+
placeHolder = props.placeHolder,
|
|
52
|
+
dataId = props.dataId,
|
|
53
|
+
dataSelectorId = props.dataSelectorId,
|
|
54
|
+
validationRuleMessage = props.validationRuleMessage,
|
|
55
|
+
validationRulePalette = props.validationRulePalette,
|
|
56
|
+
infoText = props.infoText,
|
|
57
|
+
borderColor = props.borderColor,
|
|
58
|
+
fieldSize = props.fieldSize,
|
|
59
|
+
labelPalette = props.labelPalette,
|
|
60
|
+
labelCustomClass = props.labelCustomClass,
|
|
61
|
+
htmlId = props.htmlId,
|
|
62
|
+
lockedInfoText = props.lockedInfoText,
|
|
63
|
+
isLocked = props.isLocked,
|
|
64
|
+
customProps = props.customProps,
|
|
65
|
+
renderLabelProps = props.renderLabelProps,
|
|
66
|
+
onChange = props.onChange,
|
|
67
|
+
onBlur = props.onBlur,
|
|
68
|
+
getRef = props.getRef;
|
|
69
|
+
var _customProps$LabelPro = customProps.LabelProps,
|
|
70
|
+
LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
|
|
71
|
+
_customProps$Textarea = customProps.TextareaProps,
|
|
72
|
+
TextareaProps = _customProps$Textarea === void 0 ? {} : _customProps$Textarea,
|
|
73
|
+
_customProps$Validati = customProps.ValidationMessageProps1,
|
|
74
|
+
ValidationMessageProps1 = _customProps$Validati === void 0 ? {} : _customProps$Validati,
|
|
75
|
+
_customProps$Validati2 = customProps.ValidationMessageProps2,
|
|
76
|
+
ValidationMessageProps2 = _customProps$Validati2 === void 0 ? {} : _customProps$Validati2;
|
|
77
|
+
var getNextId = (0, _IdProvider.useUniqueId)();
|
|
78
|
+
var uniqueId = htmlId ? htmlId : getNextId();
|
|
79
|
+
|
|
80
|
+
var handleChange = function handleChange(value) {
|
|
81
|
+
onChange && onChange(id, value);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var handleBlur = function handleBlur(value) {
|
|
85
|
+
onBlur && onBlur(id, value);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var handleGetRef = function handleGetRef(el) {
|
|
89
|
+
getRef && getRef(el, id);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
+
className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : isReadOnly ? _FieldsModule["default"].readonly : ''),
|
|
94
|
+
"data-title": isDisabled ? title : null,
|
|
95
|
+
"data-selector-id": dataSelectorId
|
|
96
|
+
}, labelName && /*#__PURE__*/_react["default"].createElement(_FieldContainer["default"], {
|
|
97
|
+
infoText: infoText,
|
|
98
|
+
isLocked: isLocked,
|
|
99
|
+
lockedInfoText: lockedInfoText,
|
|
100
|
+
renderProps: renderLabelProps
|
|
101
|
+
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
|
|
102
|
+
text: labelName,
|
|
103
|
+
id: id,
|
|
104
|
+
size: fieldSize === 'small' ? 'small' : 'medium',
|
|
105
|
+
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
|
|
106
|
+
customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
|
|
107
|
+
htmlFor: uniqueId,
|
|
108
|
+
dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
|
|
109
|
+
}, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
110
|
+
className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
|
|
111
|
+
}, /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
|
|
112
|
+
onChange: handleChange,
|
|
113
|
+
animated: animated,
|
|
114
|
+
size: fieldSize === 'medium' ? textBoxSize : 'xmedium',
|
|
115
|
+
variant: textBoxVariant,
|
|
116
|
+
isReadOnly: isReadOnly,
|
|
117
|
+
isDisabled: isDisabled,
|
|
118
|
+
getRef: handleGetRef,
|
|
119
|
+
maxLength: maxLength,
|
|
120
|
+
text: value,
|
|
121
|
+
placeHolder: placeHolder,
|
|
122
|
+
dataId: "property(".concat(dataId, ")"),
|
|
123
|
+
onBlur: handleBlur,
|
|
124
|
+
borderColor: borderColor,
|
|
125
|
+
needEffect: isReadOnly || isDisabled ? false : true,
|
|
126
|
+
resize: "vertical" // onKeyDown={onKeyDown}
|
|
127
|
+
,
|
|
128
|
+
htmlId: uniqueId
|
|
129
|
+
}, TextareaProps, {
|
|
130
|
+
a11y: {
|
|
131
|
+
ariaLabelledby: labelName
|
|
90
132
|
}
|
|
91
|
-
}, {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}, {
|
|
107
|
-
key: "render",
|
|
108
|
-
value: function render() {
|
|
109
|
-
var _this$props4 = this.props,
|
|
110
|
-
labelName = _this$props4.labelName,
|
|
111
|
-
id = _this$props4.id,
|
|
112
|
-
isMandatory = _this$props4.isMandatory,
|
|
113
|
-
textBoxSize = _this$props4.textBoxSize,
|
|
114
|
-
animated = _this$props4.animated,
|
|
115
|
-
textBoxVariant = _this$props4.textBoxVariant,
|
|
116
|
-
isReadOnly = _this$props4.isReadOnly,
|
|
117
|
-
validationMessage = _this$props4.validationMessage,
|
|
118
|
-
validationPalette = _this$props4.validationPalette,
|
|
119
|
-
maxLength = _this$props4.maxLength,
|
|
120
|
-
value = _this$props4.value,
|
|
121
|
-
errorType = _this$props4.errorType,
|
|
122
|
-
isDisabled = _this$props4.isDisabled,
|
|
123
|
-
title = _this$props4.title,
|
|
124
|
-
placeHolder = _this$props4.placeHolder,
|
|
125
|
-
dataId = _this$props4.dataId,
|
|
126
|
-
dataSelectorId = _this$props4.dataSelectorId,
|
|
127
|
-
validationRuleMessage = _this$props4.validationRuleMessage,
|
|
128
|
-
validationRulePalette = _this$props4.validationRulePalette,
|
|
129
|
-
infoText = _this$props4.infoText,
|
|
130
|
-
borderColor = _this$props4.borderColor,
|
|
131
|
-
fieldSize = _this$props4.fieldSize,
|
|
132
|
-
labelPalette = _this$props4.labelPalette,
|
|
133
|
-
labelCustomClass = _this$props4.labelCustomClass,
|
|
134
|
-
htmlId = _this$props4.htmlId,
|
|
135
|
-
lockedInfoText = _this$props4.lockedInfoText,
|
|
136
|
-
isLocked = _this$props4.isLocked,
|
|
137
|
-
customProps = _this$props4.customProps,
|
|
138
|
-
renderLabelProps = _this$props4.renderLabelProps;
|
|
139
|
-
var _customProps$LabelPro = customProps.LabelProps,
|
|
140
|
-
LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
|
|
141
|
-
_customProps$Textarea = customProps.TextareaProps,
|
|
142
|
-
TextareaProps = _customProps$Textarea === void 0 ? {} : _customProps$Textarea,
|
|
143
|
-
_customProps$Validati = customProps.ValidationMessageProps1,
|
|
144
|
-
ValidationMessageProps1 = _customProps$Validati === void 0 ? {} : _customProps$Validati,
|
|
145
|
-
_customProps$Validati2 = customProps.ValidationMessageProps2,
|
|
146
|
-
ValidationMessageProps2 = _customProps$Validati2 === void 0 ? {} : _customProps$Validati2;
|
|
147
|
-
var uniqueId = htmlId ? htmlId : this.getNextId();
|
|
148
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
149
|
-
className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : isReadOnly ? _FieldsModule["default"].readonly : ''),
|
|
150
|
-
"data-title": isDisabled ? title : null,
|
|
151
|
-
"data-selector-id": dataSelectorId
|
|
152
|
-
}, labelName && /*#__PURE__*/_react["default"].createElement(_FieldContainer["default"], {
|
|
153
|
-
infoText: infoText,
|
|
154
|
-
isLocked: isLocked,
|
|
155
|
-
lockedInfoText: lockedInfoText,
|
|
156
|
-
renderProps: renderLabelProps
|
|
157
|
-
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
|
|
158
|
-
text: labelName,
|
|
159
|
-
id: id,
|
|
160
|
-
size: fieldSize === 'small' ? 'small' : 'medium',
|
|
161
|
-
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
|
|
162
|
-
customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
|
|
163
|
-
htmlFor: uniqueId,
|
|
164
|
-
dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
|
|
165
|
-
}, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
166
|
-
className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
|
|
167
|
-
}, /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
|
|
168
|
-
onChange: this.handleChange,
|
|
169
|
-
animated: animated,
|
|
170
|
-
size: fieldSize === 'medium' ? textBoxSize : 'xmedium',
|
|
171
|
-
variant: textBoxVariant,
|
|
172
|
-
isReadOnly: isReadOnly,
|
|
173
|
-
isDisabled: isDisabled,
|
|
174
|
-
getRef: this.handleGetRef,
|
|
175
|
-
maxLength: maxLength,
|
|
176
|
-
text: value,
|
|
177
|
-
placeHolder: placeHolder,
|
|
178
|
-
dataId: "property(".concat(dataId, ")"),
|
|
179
|
-
onBlur: this.handleBlur,
|
|
180
|
-
borderColor: borderColor,
|
|
181
|
-
needEffect: isReadOnly || isDisabled ? false : true,
|
|
182
|
-
resize: "vertical" // onKeyDown={onKeyDown}
|
|
183
|
-
,
|
|
184
|
-
htmlId: uniqueId
|
|
185
|
-
}, TextareaProps, {
|
|
186
|
-
a11y: {
|
|
187
|
-
ariaLabelledby: labelName
|
|
188
|
-
}
|
|
189
|
-
})), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
190
|
-
text: validationMessage,
|
|
191
|
-
palette: validationPalette,
|
|
192
|
-
type: errorType,
|
|
193
|
-
htmlFor: uniqueId,
|
|
194
|
-
dataId: "".concat(dataId, "_ValidationMessage")
|
|
195
|
-
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
196
|
-
text: validationRuleMessage,
|
|
197
|
-
palette: validationRulePalette,
|
|
198
|
-
type: errorType,
|
|
199
|
-
htmlFor: uniqueId,
|
|
200
|
-
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
201
|
-
}, ValidationMessageProps2))));
|
|
202
|
-
}
|
|
203
|
-
}]);
|
|
204
|
-
|
|
205
|
-
return TextareaField;
|
|
206
|
-
}(_react.PureComponent);
|
|
133
|
+
})), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
134
|
+
text: validationMessage,
|
|
135
|
+
palette: validationPalette,
|
|
136
|
+
type: errorType,
|
|
137
|
+
htmlFor: uniqueId,
|
|
138
|
+
dataId: "".concat(dataId, "_ValidationMessage")
|
|
139
|
+
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
140
|
+
text: validationRuleMessage,
|
|
141
|
+
palette: validationRulePalette,
|
|
142
|
+
type: errorType,
|
|
143
|
+
htmlFor: uniqueId,
|
|
144
|
+
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
145
|
+
}, ValidationMessageProps2))));
|
|
146
|
+
};
|
|
207
147
|
|
|
208
|
-
exports["default"] = TextareaField;
|
|
209
148
|
TextareaField.propTypes = _propTypes.propTypes;
|
|
210
|
-
TextareaField.defaultProps = _defaultProps.defaultProps;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
149
|
+
TextareaField.defaultProps = _defaultProps.defaultProps;
|
|
150
|
+
var MemoizedTextareaField = /*#__PURE__*/(0, _react.memo)(TextareaField);
|
|
151
|
+
MemoizedTextareaField.propTypes = _propTypes.propTypes;
|
|
152
|
+
MemoizedTextareaField.defaultProps = _defaultProps.defaultProps;
|
|
153
|
+
MemoizedTextareaField.displayName = 'TextareaField';
|
|
154
|
+
var _default = TextareaField;
|
|
155
|
+
exports["default"] = _default;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -23,84 +21,47 @@ var _icons = require("@zohodesk/icons");
|
|
|
23
21
|
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
dataId = _this$props.dataId,
|
|
68
|
-
clipped = _this$props.clipped,
|
|
69
|
-
a11y = _this$props.a11y,
|
|
70
|
-
tooltip = _this$props.tooltip,
|
|
71
|
-
dataSelectorId = _this$props.dataSelectorId;
|
|
72
|
-
var _a11y$role = a11y.role,
|
|
73
|
-
role = _a11y$role === void 0 ? 'alert' : _a11y$role;
|
|
74
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
-
role: role,
|
|
76
|
-
onClick: onClick,
|
|
77
|
-
className: "".concat(type === 'primary' ? _ValidationMessageModule["default"].primary : _ValidationMessageModule["default"].secondary),
|
|
78
|
-
"data-id": "errorMsgContainer",
|
|
79
|
-
"data-test-id": "errorMsgContainer",
|
|
80
|
-
"data-selector-id": dataSelectorId
|
|
81
|
-
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], {
|
|
82
|
-
text: text,
|
|
83
|
-
htmlFor: htmlFor,
|
|
84
|
-
palette: palette,
|
|
85
|
-
size: size,
|
|
86
|
-
dataId: dataId,
|
|
87
|
-
clipped: clipped,
|
|
88
|
-
title: clipped ? text : '',
|
|
89
|
-
customClass: _ValidationMessageModule["default"].lable
|
|
90
|
-
}), tooltip ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
91
|
-
className: "".concat(_ValidationMessageModule["default"].icon, " ").concat(_LabelColorsModule["default"][palette]),
|
|
92
|
-
"data-title": tooltip
|
|
93
|
-
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
94
|
-
name: "ZD-information57",
|
|
95
|
-
size: "14"
|
|
96
|
-
})) : null);
|
|
97
|
-
}
|
|
98
|
-
}]);
|
|
99
|
-
|
|
100
|
-
return ValidationMessage;
|
|
101
|
-
}(_react["default"].Component);
|
|
102
|
-
|
|
103
|
-
exports["default"] = ValidationMessage;
|
|
24
|
+
var ValidationMessage = function ValidationMessage(props) {
|
|
25
|
+
var palette = props.palette,
|
|
26
|
+
text = props.text,
|
|
27
|
+
htmlFor = props.htmlFor,
|
|
28
|
+
onClick = props.onClick,
|
|
29
|
+
type = props.type,
|
|
30
|
+
size = props.size,
|
|
31
|
+
dataId = props.dataId,
|
|
32
|
+
clipped = props.clipped,
|
|
33
|
+
a11y = props.a11y,
|
|
34
|
+
tooltip = props.tooltip,
|
|
35
|
+
dataSelectorId = props.dataSelectorId;
|
|
36
|
+
var _a11y$role = a11y.role,
|
|
37
|
+
role = _a11y$role === void 0 ? 'alert' : _a11y$role;
|
|
38
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
39
|
+
role: role,
|
|
40
|
+
onClick: onClick,
|
|
41
|
+
className: "".concat(type === 'primary' ? _ValidationMessageModule["default"].primary : _ValidationMessageModule["default"].secondary),
|
|
42
|
+
"data-id": "errorMsgContainer",
|
|
43
|
+
"data-test-id": "errorMsgContainer",
|
|
44
|
+
"data-selector-id": dataSelectorId
|
|
45
|
+
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], {
|
|
46
|
+
text: text,
|
|
47
|
+
htmlFor: htmlFor,
|
|
48
|
+
palette: palette,
|
|
49
|
+
size: size,
|
|
50
|
+
dataId: dataId,
|
|
51
|
+
clipped: clipped,
|
|
52
|
+
title: clipped ? text : '',
|
|
53
|
+
customClass: _ValidationMessageModule["default"].lable
|
|
54
|
+
}), tooltip ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
55
|
+
className: "".concat(_ValidationMessageModule["default"].icon, " ").concat(_LabelColorsModule["default"][palette]),
|
|
56
|
+
"data-title": tooltip
|
|
57
|
+
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
58
|
+
name: "ZD-information57",
|
|
59
|
+
size: "14"
|
|
60
|
+
})) : null);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var _default = ValidationMessage;
|
|
64
|
+
exports["default"] = _default;
|
|
104
65
|
ValidationMessage.propTypes = _propTypes.propTypes;
|
|
105
66
|
ValidationMessage.defaultProps = _defaultProps.defaultProps; // if (__DOCS__) {
|
|
106
67
|
// ValidationMessage.docs = {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
10
|
var _defaultProps = require("./props/defaultProps");
|
|
13
11
|
|
|
@@ -17,71 +15,26 @@ var _FieldModule = _interopRequireDefault(require("../../../../form/layout/Field
|
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
|
-
|
|
40
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
|
-
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
|
-
|
|
44
|
-
var Field = /*#__PURE__*/function (_Component) {
|
|
45
|
-
_inherits(Field, _Component);
|
|
46
|
-
|
|
47
|
-
var _super = _createSuper(Field);
|
|
48
|
-
|
|
49
|
-
function Field() {
|
|
50
|
-
_classCallCheck(this, Field);
|
|
51
|
-
|
|
52
|
-
return _super.apply(this, arguments);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
_createClass(Field, [{
|
|
56
|
-
key: "render",
|
|
57
|
-
value: function render() {
|
|
58
|
-
var _this$props = this.props,
|
|
59
|
-
width = _this$props.width,
|
|
60
|
-
children = _this$props.children,
|
|
61
|
-
rowBreak = _this$props.rowBreak,
|
|
62
|
-
column = _this$props.column,
|
|
63
|
-
className = _this$props.className,
|
|
64
|
-
containerClass = _this$props.containerClass,
|
|
65
|
-
dataId = _this$props.dataId;
|
|
66
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
67
|
-
className: "".concat(containerClass ? containerClass : '', " ").concat(column == 'single' ? "".concat(_FieldModule["default"].singleColumn) : "".concat(_FieldModule["default"][width], " ")),
|
|
68
|
-
"data-id": dataId,
|
|
69
|
-
"data-test-id": dataId
|
|
70
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
|
-
className: "".concat(className ? className : '', " ", "fieldWidth_".concat(width))
|
|
72
|
-
}, children)), rowBreak && /*#__PURE__*/_react["default"].createElement("div", {
|
|
73
|
-
className: _FieldModule["default"].rowBreak
|
|
74
|
-
}));
|
|
75
|
-
}
|
|
76
|
-
}]);
|
|
77
|
-
|
|
78
|
-
return Field;
|
|
79
|
-
}(_react.Component);
|
|
18
|
+
var Field = function Field(props) {
|
|
19
|
+
var width = props.width,
|
|
20
|
+
children = props.children,
|
|
21
|
+
rowBreak = props.rowBreak,
|
|
22
|
+
column = props.column,
|
|
23
|
+
className = props.className,
|
|
24
|
+
containerClass = props.containerClass,
|
|
25
|
+
dataId = props.dataId;
|
|
26
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
27
|
+
className: "".concat(containerClass ? containerClass : '', " ").concat(column == 'single' ? "".concat(_FieldModule["default"].singleColumn) : "".concat(_FieldModule["default"][width], " ")),
|
|
28
|
+
"data-id": dataId,
|
|
29
|
+
"data-test-id": dataId
|
|
30
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
|
+
className: "".concat(className ? className : '', " ", "fieldWidth_".concat(width))
|
|
32
|
+
}, children)), rowBreak && /*#__PURE__*/_react["default"].createElement("div", {
|
|
33
|
+
className: _FieldModule["default"].rowBreak
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
80
36
|
|
|
81
|
-
exports["default"] = Field;
|
|
82
37
|
Field.propTypes = _propTypes.propTypes;
|
|
83
|
-
Field.defaultProps = _defaultProps.defaultProps;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// };
|
|
87
|
-
// }
|
|
38
|
+
Field.defaultProps = _defaultProps.defaultProps;
|
|
39
|
+
var _default = Field;
|
|
40
|
+
exports["default"] = _default;
|