@devtron-labs/devtron-fe-common-lib 0.0.7-beta-21 → 0.0.7-beta-22
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/dist/index.js
CHANGED
|
@@ -8703,7 +8703,7 @@ var TagLabelValueSelector = function (_a) {
|
|
|
8703
8703
|
return renderValidationsSuggestions();
|
|
8704
8704
|
};
|
|
8705
8705
|
var popupMenuBody = activeElement === "tag-".concat(tagInputType, "-").concat(selectedTagIndex) ? renderSuggestions() : null;
|
|
8706
|
-
return (jsxRuntime.jsxs(PopupMenu, __assign({ autoClose: true, autoPosition: true }, { children: [jsxRuntime.jsx(PopupMenu.Button, __assign({ rootClassName: "dc__bg-n50 flex top dc__no-border-imp" }, { children: jsxRuntime.jsx(ResizableTagTextArea, { minHeight: 30, maxHeight: 80, className: "form__input pt-4-imp pb-4-imp fs-13 ".concat(tagInputType === exports.KEY_VALUE.KEY
|
|
8706
|
+
return (jsxRuntime.jsxs(PopupMenu, __assign({ autoClose: true, autoPosition: true }, { children: [jsxRuntime.jsx(PopupMenu.Button, __assign({ rootClassName: "dc__bg-n50 flex top dc__no-border-imp" }, { children: jsxRuntime.jsx(ResizableTagTextArea, { minHeight: 30, maxHeight: 80, className: "form__input tag-input pt-4-imp pb-4-imp fs-13 ".concat(tagInputType === exports.KEY_VALUE.KEY
|
|
8707
8707
|
? "dc__no-right-radius"
|
|
8708
8708
|
: "dc__no-border-radius dc__no-right-border dc__no-left-border", " ").concat(tagData[tagInputType === exports.KEY_VALUE.KEY ? 'isInvalidKey' : 'isInvalidValue']
|
|
8709
8709
|
? 'form__input--error'
|
|
@@ -8723,13 +8723,15 @@ var TagDetails = function (_a) {
|
|
|
8723
8723
|
var _tagData = __assign({}, tagData);
|
|
8724
8724
|
_tagData.propagate = !_tagData.propagate;
|
|
8725
8725
|
if (_tagData.propagate) {
|
|
8726
|
-
_tagData.isInvalidKey =
|
|
8727
|
-
_tagData.isInvalidValue =
|
|
8726
|
+
_tagData.isInvalidKey = _tagData.isInvalidKey || !_tagData.key;
|
|
8727
|
+
_tagData.isInvalidValue = _tagData.isInvalidValue || !_tagData.value;
|
|
8728
8728
|
}
|
|
8729
8729
|
else {
|
|
8730
8730
|
_tagData.isInvalidKey =
|
|
8731
|
-
_tagData.key || _tagData.value ? validationRules.propagateTagKey(_tagData.key).isValid : false;
|
|
8732
|
-
_tagData.isInvalidValue = _tagData.value
|
|
8731
|
+
_tagData.key || _tagData.value ? !validationRules.propagateTagKey(_tagData.key).isValid : false;
|
|
8732
|
+
_tagData.isInvalidValue = _tagData.value
|
|
8733
|
+
? !validationRules.propagateTagValue(_tagData.value).isValid
|
|
8734
|
+
: false;
|
|
8733
8735
|
}
|
|
8734
8736
|
setTagData(index, _tagData);
|
|
8735
8737
|
};
|
package/package.json
CHANGED
|
@@ -27,12 +27,14 @@ export const TagDetails = ({
|
|
|
27
27
|
const _tagData = { ...tagData }
|
|
28
28
|
_tagData.propagate = !_tagData.propagate
|
|
29
29
|
if (_tagData.propagate) {
|
|
30
|
-
_tagData.isInvalidKey =
|
|
31
|
-
_tagData.isInvalidValue =
|
|
30
|
+
_tagData.isInvalidKey = _tagData.isInvalidKey || !_tagData.key
|
|
31
|
+
_tagData.isInvalidValue = _tagData.isInvalidValue || !_tagData.value
|
|
32
32
|
} else {
|
|
33
33
|
_tagData.isInvalidKey =
|
|
34
|
-
_tagData.key || _tagData.value ? validationRules.propagateTagKey(_tagData.key).isValid : false
|
|
35
|
-
_tagData.isInvalidValue = _tagData.value
|
|
34
|
+
_tagData.key || _tagData.value ? !validationRules.propagateTagKey(_tagData.key).isValid : false
|
|
35
|
+
_tagData.isInvalidValue = _tagData.value
|
|
36
|
+
? !validationRules.propagateTagValue(_tagData.value).isValid
|
|
37
|
+
: false
|
|
36
38
|
}
|
|
37
39
|
setTagData(index, _tagData)
|
|
38
40
|
}
|
|
@@ -162,7 +162,7 @@ export const TagLabelValueSelector = ({
|
|
|
162
162
|
<ResizableTagTextArea
|
|
163
163
|
minHeight={30}
|
|
164
164
|
maxHeight={80}
|
|
165
|
-
className={`form__input pt-4-imp pb-4-imp fs-13 ${
|
|
165
|
+
className={`form__input tag-input pt-4-imp pb-4-imp fs-13 ${
|
|
166
166
|
tagInputType === KEY_VALUE.KEY
|
|
167
167
|
? `dc__no-right-radius`
|
|
168
168
|
: `dc__no-border-radius dc__no-right-border dc__no-left-border`
|