@devtron-labs/devtron-fe-common-lib 0.0.7-beta-7 → 0.0.7-beta-9

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
@@ -3904,6 +3904,16 @@ function captureException(exception, captureContext) {
3904
3904
  return getCurrentHub().captureException(exception, { captureContext });
3905
3905
  }
3906
3906
 
3907
+ toast.configure({
3908
+ autoClose: 3000,
3909
+ hideProgressBar: true,
3910
+ pauseOnHover: true,
3911
+ pauseOnFocusLoss: true,
3912
+ closeOnClick: false,
3913
+ newestOnTop: true,
3914
+ toastClassName: 'devtron-toast',
3915
+ bodyClassName: 'devtron-toast__body',
3916
+ });
3907
3917
  function showError(serverError, showToastOnUnknownError, hideAccessError) {
3908
3918
  if (showToastOnUnknownError === void 0) { showToastOnUnknownError = true; }
3909
3919
  if (hideAccessError === void 0) { hideAccessError = false; }
@@ -8670,7 +8680,7 @@ var TagLabelValueSelector = function (_a) {
8670
8680
  };
8671
8681
  var renderSuggestions = function () {
8672
8682
  if (tagOptions === null || tagOptions === void 0 ? void 0 : tagOptions.length) {
8673
- var filteredTags = tagOptions.filter(function (tag) { return tag.value.indexOf(selectedValue) >= 0; });
8683
+ var filteredTags = tagOptions.filter(function (tag) { return tag.label.indexOf(selectedValue) >= 0; });
8674
8684
  if (filteredTags.length) {
8675
8685
  return (jsxRuntime.jsx("div", { children: filteredTags.map(function (tag, index) { return (jsxRuntime.jsx("div", __assign({ "data-key": tag.label, className: "dc__hover-n50 lh-20 fs-13 fw-4 pt-6 pr-8 pb-6 pl-8 cursor", onClick: onSelectValue }, { children: tag.label }), "".concat(tag.value, "-").concat(index))); }) }));
8676
8686
  }
@@ -8681,7 +8691,7 @@ var TagLabelValueSelector = function (_a) {
8681
8691
  ? "dc__no-right-radius"
8682
8692
  : "dc__no-border-radius dc__no-right-border dc__no-left-border", " ").concat(tagData[tagInputType === exports.KEY_VALUE.KEY ? 'isInvalidKey' : 'isInvalidValue']
8683
8693
  ? 'form__input--error'
8684
- : ''), value: selectedValue, onChange: handleInputChange, onBlur: handleOnBlur, onFocus: handleOnFocus, placeholder: placeholder, tabIndex: tabIndex, refVar: refVar, dependentRef: dependentRef }) })), jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "tag-".concat(selectedTagIndex, "-class"), autoWidth: true, preventWheelDisable: true }, { children: activeElement === "tag-".concat(tagInputType, "-").concat(selectedTagIndex) && renderSuggestions() }))] })));
8694
+ : ''), value: selectedValue, onChange: handleInputChange, onBlur: handleOnBlur, onFocus: handleOnFocus, placeholder: placeholder, tabIndex: tabIndex, refVar: refVar, dependentRef: dependentRef }) })), jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "mxh-210 dc__overflow-auto tag-".concat(selectedTagIndex, "-class"), autoWidth: true, preventWheelDisable: true }, { children: activeElement === "tag-".concat(tagInputType, "-").concat(selectedTagIndex) && renderSuggestions() }))] })));
8685
8695
  };
8686
8696
 
8687
8697
  var TagDetails = function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.7-beta-7",
3
+ "version": "0.0.7-beta-9",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -104,7 +104,7 @@ export const TagLabelValueSelector = ({
104
104
 
105
105
  const renderSuggestions = (): JSX.Element => {
106
106
  if (tagOptions?.length) {
107
- const filteredTags = tagOptions.filter((tag) => tag.value.indexOf(selectedValue) >= 0)
107
+ const filteredTags = tagOptions.filter((tag) => tag.label.indexOf(selectedValue) >= 0)
108
108
  if (filteredTags.length) {
109
109
  return (
110
110
  <div>
@@ -150,7 +150,11 @@ export const TagLabelValueSelector = ({
150
150
  dependentRef={dependentRef}
151
151
  />
152
152
  </PopupMenu.Button>
153
- <PopupMenu.Body rootClassName={`tag-${selectedTagIndex}-class`} autoWidth={true} preventWheelDisable={true}>
153
+ <PopupMenu.Body
154
+ rootClassName={`mxh-210 dc__overflow-auto tag-${selectedTagIndex}-class`}
155
+ autoWidth={true}
156
+ preventWheelDisable={true}
157
+ >
154
158
  {activeElement === `tag-${tagInputType}-${selectedTagIndex}` && renderSuggestions()}
155
159
  </PopupMenu.Body>
156
160
  </PopupMenu>
@@ -5,6 +5,17 @@ import { toastAccessDenied } from './ToastBody'
5
5
  import { useEffect, useRef } from 'react'
6
6
  import { ERROR_EMPTY_SCREEN } from './Constants'
7
7
 
8
+ toast.configure({
9
+ autoClose: 3000,
10
+ hideProgressBar: true,
11
+ pauseOnHover: true,
12
+ pauseOnFocusLoss: true,
13
+ closeOnClick: false,
14
+ newestOnTop: true,
15
+ toastClassName: 'devtron-toast',
16
+ bodyClassName: 'devtron-toast__body',
17
+ })
18
+
8
19
  export function showError(serverError, showToastOnUnknownError = true, hideAccessError = false) {
9
20
  if (serverError instanceof ServerErrors && Array.isArray(serverError.errors)) {
10
21
  serverError.errors.map(({ userMessage, internalMessage }) => {