@devtron-labs/devtron-fe-common-lib 0.0.7-beta-8 → 0.0.7-beta-10

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; }
@@ -8677,11 +8687,12 @@ var TagLabelValueSelector = function (_a) {
8677
8687
  }
8678
8688
  return renderValidationsSuggestions();
8679
8689
  };
8690
+ var popupMenuBody = activeElement === "tag-".concat(tagInputType, "-").concat(selectedTagIndex) ? renderSuggestions() : null;
8680
8691
  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
8681
8692
  ? "dc__no-right-radius"
8682
8693
  : "dc__no-border-radius dc__no-right-border dc__no-left-border", " ").concat(tagData[tagInputType === exports.KEY_VALUE.KEY ? 'isInvalidKey' : 'isInvalidValue']
8683
8694
  ? '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: "mxh-210 dc__overflow-auto tag-".concat(selectedTagIndex, "-class"), autoWidth: true, preventWheelDisable: true }, { children: activeElement === "tag-".concat(tagInputType, "-").concat(selectedTagIndex) && renderSuggestions() }))] })));
8695
+ : ''), value: selectedValue, onChange: handleInputChange, onBlur: handleOnBlur, onFocus: handleOnFocus, placeholder: placeholder, tabIndex: tabIndex, refVar: refVar, dependentRef: dependentRef }) })), popupMenuBody && (jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "mxh-210 dc__overflow-auto tag-".concat(selectedTagIndex, "-class"), autoWidth: true, preventWheelDisable: true }, { children: popupMenuBody })))] })));
8685
8696
  };
8686
8697
 
8687
8698
  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-8",
3
+ "version": "0.0.7-beta-10",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -125,6 +125,7 @@ export const TagLabelValueSelector = ({
125
125
  return renderValidationsSuggestions()
126
126
  }
127
127
 
128
+ const popupMenuBody = activeElement === `tag-${tagInputType}-${selectedTagIndex}` ? renderSuggestions() : null
128
129
  return (
129
130
  <PopupMenu autoClose autoPosition>
130
131
  <PopupMenu.Button rootClassName="dc__bg-n50 flex top dc__no-border-imp">
@@ -150,13 +151,15 @@ export const TagLabelValueSelector = ({
150
151
  dependentRef={dependentRef}
151
152
  />
152
153
  </PopupMenu.Button>
153
- <PopupMenu.Body
154
- rootClassName={`mxh-210 dc__overflow-auto tag-${selectedTagIndex}-class`}
155
- autoWidth={true}
156
- preventWheelDisable={true}
157
- >
158
- {activeElement === `tag-${tagInputType}-${selectedTagIndex}` && renderSuggestions()}
159
- </PopupMenu.Body>
154
+ {popupMenuBody && (
155
+ <PopupMenu.Body
156
+ rootClassName={`mxh-210 dc__overflow-auto tag-${selectedTagIndex}-class`}
157
+ autoWidth={true}
158
+ preventWheelDisable={true}
159
+ >
160
+ {popupMenuBody}
161
+ </PopupMenu.Body>
162
+ )}
160
163
  </PopupMenu>
161
164
  )
162
165
  }
@@ -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 }) => {