@devtron-labs/devtron-fe-common-lib 0.0.40-beta-9 → 0.0.40-beta-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.
@@ -12,4 +12,4 @@ import { DebouncedSearchProps } from './Types';
12
12
  * @param clearSearch - (Optional) To clear the search text
13
13
  * @param showClearIcon - (Optional) To show the clear icon default value is true
14
14
  */
15
- export default function DebouncedSearch({ onSearch, Icon, children, placeholder, containerClass, iconClass, inputClass, debounceTimeout, clearSearch, showClearIcon, }: DebouncedSearchProps): JSX.Element;
15
+ export default function DebouncedSearch({ onSearch, Icon, children, placeholder, containerClass, iconClass, inputClass, debounceTimeout, clearSearch, showClearIcon, autoFocus, }: DebouncedSearchProps): JSX.Element;
@@ -10,4 +10,5 @@ export interface DebouncedSearchProps {
10
10
  debounceTimeout?: number;
11
11
  clearSearch?: boolean;
12
12
  showClearIcon?: boolean;
13
+ autoFocus?: boolean;
13
14
  }
@@ -231,9 +231,6 @@ export interface CDMaterialType {
231
231
  imageReleaseTags?: ReleaseTag[];
232
232
  artifactStatus?: string;
233
233
  filterState: FilterStates;
234
- registryType?: string;
235
- imagePath?: string;
236
- registryName?: string;
237
234
  scanToolId?: number;
238
235
  appliedFiltersTimestamp?: string;
239
236
  appliedFilters?: FilterConditionsListType[];
@@ -284,6 +281,7 @@ export interface CommonNodeAttr {
284
281
  colorCode?: string;
285
282
  isExternalCI?: boolean;
286
283
  isLinkedCI?: boolean;
284
+ isLinkedCD?: boolean;
287
285
  isJobCI?: boolean;
288
286
  environmentName?: string;
289
287
  environmentId?: number;
package/dist/index.js CHANGED
@@ -23635,8 +23635,8 @@ var SvgIcErrorCross = function SvgIcErrorCross(props) {
23635
23635
  * @param showClearIcon - (Optional) To show the clear icon default value is true
23636
23636
  */
23637
23637
  function DebouncedSearch(_a) {
23638
- var onSearch = _a.onSearch, Icon = _a.Icon, children = _a.children, placeholder = _a.placeholder, _b = _a.containerClass, containerClass = _b === void 0 ? '' : _b, _c = _a.iconClass, iconClass = _c === void 0 ? '' : _c, _d = _a.inputClass, inputClass = _d === void 0 ? '' : _d, _e = _a.debounceTimeout, debounceTimeout = _e === void 0 ? 500 : _e, clearSearch = _a.clearSearch, _f = _a.showClearIcon, showClearIcon = _f === void 0 ? true : _f;
23639
- var _g = __read(React.useState(''), 2), searchText = _g[0], setSearchText = _g[1];
23638
+ var onSearch = _a.onSearch, Icon = _a.Icon, children = _a.children, placeholder = _a.placeholder, _b = _a.containerClass, containerClass = _b === void 0 ? '' : _b, _c = _a.iconClass, iconClass = _c === void 0 ? '' : _c, _d = _a.inputClass, inputClass = _d === void 0 ? '' : _d, _e = _a.debounceTimeout, debounceTimeout = _e === void 0 ? 500 : _e, clearSearch = _a.clearSearch, _f = _a.showClearIcon, showClearIcon = _f === void 0 ? true : _f, _g = _a.autoFocus, autoFocus = _g === void 0 ? true : _g;
23639
+ var _h = __read(React.useState(''), 2), searchText = _h[0], setSearchText = _h[1];
23640
23640
  React.useEffect(function () {
23641
23641
  setSearchText('');
23642
23642
  }, [clearSearch]);
@@ -23646,8 +23646,8 @@ function DebouncedSearch(_a) {
23646
23646
  var handleClearSearch = function () {
23647
23647
  setSearchText('');
23648
23648
  };
23649
- useDebouncedEffect(function () { return onSearch(searchText); }, debounceTimeout, [searchText, onSearch]);
23650
- return (jsxRuntime.jsxs("div", __assign({ className: containerClass }, { children: [Icon && jsxRuntime.jsx(Icon, { className: iconClass }), jsxRuntime.jsx("input", { type: "text", className: inputClass, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : 'Search', value: searchText, onChange: handleSearchTextChange, autoFocus: true, "data-testid": "debounced-search" }), showClearIcon && !!searchText && (jsxRuntime.jsx("button", __assign({ type: "button", className: "dc__outline-none-imp dc__no-border p-0 bc-n50 flex", onClick: handleClearSearch, "data-testid": "clear-search" }, { children: jsxRuntime.jsx(SvgIcErrorCross, { className: "icon-dim-20 icon-n6" }) }))), children] })));
23649
+ useDebouncedEffect(function () { return onSearch(searchText); }, debounceTimeout, [searchText]);
23650
+ return (jsxRuntime.jsxs("div", __assign({ className: containerClass }, { children: [Icon && jsxRuntime.jsx(Icon, { className: iconClass }), jsxRuntime.jsx("input", { type: "text", className: inputClass, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : 'Search', value: searchText, onChange: handleSearchTextChange, autoFocus: autoFocus, "data-testid": "debounced-search" }), showClearIcon && !!searchText && (jsxRuntime.jsx("button", __assign({ type: "button", className: "dc__outline-none-imp dc__no-border p-0 bc-n50 flex", onClick: handleClearSearch, "data-testid": "clear-search" }, { children: jsxRuntime.jsx(SvgIcErrorCross, { className: "icon-dim-20 icon-n6" }) }))), children] })));
23651
23651
  }
23652
23652
 
23653
23653
  // This is meant to be a reusable component that will provide a grid like dynamic layout where xs is the number of columns out of 12 that the item will take up
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.40-beta-9",
3
+ "version": "0.0.40-beta-11",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -26,6 +26,7 @@ export default function DebouncedSearch({
26
26
  debounceTimeout = 500,
27
27
  clearSearch,
28
28
  showClearIcon = true,
29
+ autoFocus = true,
29
30
  }: DebouncedSearchProps) {
30
31
  const [searchText, setSearchText] = useState<string>('')
31
32
 
@@ -41,7 +42,7 @@ export default function DebouncedSearch({
41
42
  setSearchText('')
42
43
  }
43
44
 
44
- useDebouncedEffect(() => onSearch(searchText), debounceTimeout, [searchText, onSearch])
45
+ useDebouncedEffect(() => onSearch(searchText), debounceTimeout, [searchText])
45
46
 
46
47
  return (
47
48
  <div className={containerClass}>
@@ -53,7 +54,7 @@ export default function DebouncedSearch({
53
54
  placeholder={placeholder ?? 'Search'}
54
55
  value={searchText}
55
56
  onChange={handleSearchTextChange}
56
- autoFocus
57
+ autoFocus={autoFocus}
57
58
  data-testid="debounced-search"
58
59
  />
59
60
 
@@ -9,4 +9,5 @@ export interface DebouncedSearchProps {
9
9
  debounceTimeout?: number
10
10
  clearSearch?: boolean
11
11
  showClearIcon?: boolean
12
+ autoFocus?: boolean
12
13
  }
@@ -256,9 +256,6 @@ export interface CDMaterialType {
256
256
  imageReleaseTags?: ReleaseTag[]
257
257
  artifactStatus?: string
258
258
  filterState: FilterStates
259
- registryType?: string;
260
- imagePath?: string
261
- registryName?: string
262
259
  // Not even coming from API but required in CDMaterials for Security which makes its own api call but stores data in CDMaterials
263
260
  scanToolId?: number
264
261
  appliedFiltersTimestamp?: string
@@ -315,6 +312,7 @@ export interface CommonNodeAttr {
315
312
  colorCode?: string
316
313
  isExternalCI?: boolean
317
314
  isLinkedCI?: boolean
315
+ isLinkedCD?: boolean
318
316
  isJobCI?: boolean // used for Job type CI in Devtron Apps
319
317
  environmentName?: string //used for CDs
320
318
  environmentId?: number