@devtron-labs/devtron-fe-common-lib 1.4.0-beta-7 → 1.4.0-beta-8

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.
Files changed (56) hide show
  1. package/dist/{@code-editor-r8mIxPmX.js → @code-editor-CJzLZbk_.js} +7580 -7578
  2. package/dist/{@common-rjsf-Pzf33XFr.js → @common-rjsf-C-eNkDr9.js} +14 -26
  3. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +6 -6
  4. package/dist/Common/CodeEditor/types.d.ts +10 -9
  5. package/dist/Common/MultiSelectCustomization.d.ts +0 -2
  6. package/dist/Common/RJSF/utils.d.ts +0 -3
  7. package/dist/Common/SegmentedBarChart/types.d.ts +1 -0
  8. package/dist/Common/SegmentedControl/SegmentedControl.component.d.ts +1 -1
  9. package/dist/Common/SegmentedControl/types.d.ts +1 -7
  10. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.d.ts +1 -1
  11. package/dist/Shared/Components/CICDHistory/constants.d.ts +0 -2
  12. package/dist/Shared/Components/CICDHistory/types.d.ts +2 -0
  13. package/dist/Shared/Components/Plugin/PluginTagSelect.d.ts +1 -1
  14. package/dist/Shared/Components/Plugin/types.d.ts +2 -2
  15. package/dist/Shared/Components/Plugin/utils.d.ts +16 -0
  16. package/dist/Shared/Components/ReactSelect/constants.d.ts +0 -1
  17. package/dist/Shared/Components/ReactSelect/utils.d.ts +0 -6
  18. package/dist/Shared/Components/Security/SecurityDetailsCards/SecurityCard.d.ts +3 -0
  19. package/dist/Shared/Components/Security/SecurityDetailsCards/SecurityDetailsCards.d.ts +3 -0
  20. package/dist/Shared/Components/Security/SecurityDetailsCards/index.d.ts +2 -0
  21. package/dist/Shared/Components/Security/SecurityDetailsCards/types.d.ts +11 -0
  22. package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +13 -8
  23. package/dist/Shared/Components/Security/SecurityModal/index.d.ts +1 -0
  24. package/dist/Shared/Components/Security/SecurityModal/types.d.ts +1 -0
  25. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
  26. package/dist/Shared/Components/Security/constants.d.ts +2 -0
  27. package/dist/Shared/Components/Security/index.d.ts +1 -1
  28. package/dist/Shared/Components/Security/types.d.ts +18 -0
  29. package/dist/Shared/Components/Security/utils.d.ts +5 -7
  30. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  31. package/dist/Shared/Providers/index.d.ts +0 -1
  32. package/dist/assets/@code-editor.css +1 -1
  33. package/dist/assets/{ic-nav-rocket.433c9706.svg → ic-nav-rocket.9e50bb61.svg} +1 -1
  34. package/dist/assets/{ic-rotate-devtron.5a8363d8.svg → ic-rotate-devtron.200e165b.svg} +86 -87
  35. package/dist/assets/ic-shield-check.7f018238.svg +3 -0
  36. package/dist/assets/ic-shield-warning-outline.70fea3e8.svg +3 -0
  37. package/dist/index.d.ts +0 -6
  38. package/dist/index.js +624 -621
  39. package/package.json +1 -1
  40. package/dist/Common/CodeEditor/utils.d.ts +0 -3
  41. package/dist/Common/SegmentedControl/constants.d.ts +0 -2
  42. package/dist/Shared/Components/Security/SecuritySummaryCard/SecuritySummaryCard.d.ts +0 -3
  43. package/dist/Shared/Components/Security/SecuritySummaryCard/index.d.ts +0 -1
  44. package/dist/Shared/Components/Security/SecuritySummaryCard/types.d.ts +0 -10
  45. package/dist/Shared/Components/ThemeSwitcher/ThemeSwitcher.component.d.ts +0 -3
  46. package/dist/Shared/Components/ThemeSwitcher/constants.d.ts +0 -6
  47. package/dist/Shared/Components/ThemeSwitcher/index.d.ts +0 -1
  48. package/dist/Shared/Components/ThemeSwitcher/types.d.ts +0 -3
  49. package/dist/Shared/Providers/ThemeProvider/ThemeProvider.d.ts +0 -3
  50. package/dist/Shared/Providers/ThemeProvider/constants.d.ts +0 -2
  51. package/dist/Shared/Providers/ThemeProvider/index.d.ts +0 -2
  52. package/dist/Shared/Providers/ThemeProvider/types.d.ts +0 -33
  53. package/dist/Shared/Providers/ThemeProvider/utils.d.ts +0 -4
  54. package/dist/assets/ic-laptop.485e21b4.svg +0 -3
  55. package/dist/assets/ic-moon.17d37c40.svg +0 -3
  56. package/dist/assets/ic-sun.33e8214b.svg +0 -3
@@ -2,9 +2,9 @@ import { j as n, J as A } from "./@vendor-QI4m26H1.js";
2
2
  import E, { forwardRef as $ } from "react";
3
3
  import L, { getDefaultRegistry as k } from "@rjsf/core";
4
4
  import D from "@rjsf/validator-ajv8";
5
- import { T as y, c as H, a as U, i as J, d as w } from "./@code-editor-r8mIxPmX.js";
5
+ import { T as y, c as H, a as U, i as J, d as w } from "./@code-editor-CJzLZbk_.js";
6
6
  import M, { components as O } from "react-select";
7
- import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as V, ADDITIONAL_PROPERTY_FLAG as P, errorId as W, englishStringTranslator as q, TranslatableString as K, titleId as Y, canExpand as z, deepEquals as G } from "@rjsf/utils";
7
+ import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as P, errorId as V, englishStringTranslator as q, TranslatableString as K, titleId as Y, canExpand as z, deepEquals as G } from "@rjsf/utils";
8
8
  import { ReactComponent as Q } from "./assets/ic-chevron-down.fc70d7a7.svg";
9
9
  import { ReactComponent as X } from "./assets/ic-add.cfaa779b.svg";
10
10
  import { ReactComponent as Z } from "./assets/ic-cross.01e03666.svg";
@@ -155,7 +155,7 @@ import './assets/@common-rjsf.css';const N = {
155
155
  }
156
156
  ) });
157
157
  }, ae = ({ icon: t, iconType: e, registry: s, uiSchema: o, ...r }) => /* @__PURE__ */ n.jsx("button", { ...r, type: "button", className: "dc__outline-none-imp p-0 dc__transparent flex cursor", title: "Remove", children: /* @__PURE__ */ n.jsx(Z, { className: "icon-dim-16 fcn-6" }) }), ie = ({ uiSchema: t }) => {
158
- const { submitText: e, norender: s, props: o = {} } = V(t);
158
+ const { submitText: e, norender: s, props: o = {} } = W(t);
159
159
  return s ? null : /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-end", children: /* @__PURE__ */ n.jsx("button", { type: "submit", ...o, className: `cta ${o.className || ""}`, children: e }) });
160
160
  }, T = ({
161
161
  id: t,
@@ -214,7 +214,7 @@ import './assets/@common-rjsf.css';const N = {
214
214
  ] })
215
215
  );
216
216
  }, ce = ({ errors: t = [], idSchema: e }) => {
217
- const s = W(e);
217
+ const s = V(e);
218
218
  return t.length > 0 && /* @__PURE__ */ n.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: s, children: t.filter((o) => !!o).map((o, r) => /* @__PURE__ */ n.jsxs(E.Fragment, { children: [
219
219
  /* @__PURE__ */ n.jsx("span", {}),
220
220
  /* @__PURE__ */ n.jsxs("span", { className: "form__error", children: [
@@ -240,14 +240,14 @@ import './assets/@common-rjsf.css';const N = {
240
240
  ...e,
241
241
  minHeight: "32px",
242
242
  boxShadow: "none",
243
- backgroundColor: "var(--bg-secondary)",
243
+ backgroundColor: "var(--N50)",
244
244
  border: s.isFocused ? "1px solid var(--B500)" : "1px solid var(--N200)",
245
245
  cursor: "pointer"
246
246
  }),
247
247
  option: (e, s) => ({
248
248
  ...e,
249
249
  color: "var(--N900)",
250
- backgroundColor: s.isFocused ? "var(--N100)" : "var(--bg-primary)",
250
+ backgroundColor: s.isFocused ? "var(--N100)" : "white",
251
251
  padding: "10px 12px",
252
252
  cursor: "pointer"
253
253
  }),
@@ -276,24 +276,12 @@ import './assets/@common-rjsf.css';const N = {
276
276
  ...e,
277
277
  border: "1px solid var(--N200)",
278
278
  borderRadius: "4px",
279
- background: "var(--bg-primary)",
279
+ background: "white",
280
280
  height: "28px",
281
281
  marginRight: "8px",
282
282
  padding: "2px",
283
283
  fontSize: "12px"
284
284
  }),
285
- singleValue: (e) => ({
286
- ...e,
287
- color: "var(--N900)"
288
- }),
289
- input: (e) => ({
290
- ...e,
291
- color: "var(--N900)"
292
- }),
293
- menu: (e) => ({
294
- ...e,
295
- backgroundColor: "var(--bg-menu)"
296
- }),
297
285
  ...t
298
286
  }), Le = (t) => {
299
287
  try {
@@ -328,7 +316,7 @@ import './assets/@common-rjsf.css';const N = {
328
316
  return "";
329
317
  const e = t.trim();
330
318
  return e.match(/^\w+(\/\w+)*$/g) ? `/${e}` : e.match(/^\w+(\.\w+)*$/g) ? `/${e.replaceAll(/\./g, "/")}` : e;
331
- }, C = {
319
+ }, F = {
332
320
  value: !1,
333
321
  path: ""
334
322
  }, me = (t) => {
@@ -338,13 +326,13 @@ import './assets/@common-rjsf.css';const N = {
338
326
  return typeof e == "string" ? {
339
327
  value: !0,
340
328
  path: v(e)
341
- } : typeof e != "object" ? structuredClone(C) : Object.hasOwn(e, "condition") && "condition" in e && Object.hasOwn(e, "value") && "value" in e ? {
329
+ } : typeof e != "object" ? structuredClone(F) : Object.hasOwn(e, "condition") && "condition" in e && Object.hasOwn(e, "value") && "value" in e ? {
342
330
  value: e.condition,
343
331
  path: v(e.value)
344
332
  } : Object.hasOwn(e, "value") && "value" in e && Object.hasOwn(e, "path") && "path" in e ? {
345
333
  value: e.value,
346
334
  path: v(e.path)
347
- } : structuredClone(C);
335
+ } : structuredClone(F);
348
336
  }, ue = ({
349
337
  disabled: t,
350
338
  formData: e,
@@ -497,7 +485,7 @@ import './assets/@common-rjsf.css';const N = {
497
485
  ),
498
486
  /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize ml-8", children: f.toString() })
499
487
  ] });
500
- }, F = pe(), ge = ({ children: t, ...e }) => /* @__PURE__ */ n.jsx(O.MenuList, { ...e, children: Array.isArray(t) ? t.slice(0, 20) : t }), je = (t) => /* @__PURE__ */ n.jsx(O.DropdownIndicator, { ...t, children: /* @__PURE__ */ n.jsx(Q, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), _e = (t) => {
488
+ }, C = pe(), ge = ({ children: t, ...e }) => /* @__PURE__ */ n.jsx(O.MenuList, { ...e, children: Array.isArray(t) ? t.slice(0, 20) : t }), je = (t) => /* @__PURE__ */ n.jsx(O.DropdownIndicator, { ...t, children: /* @__PURE__ */ n.jsx(Q, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), _e = (t) => {
501
489
  const {
502
490
  id: e,
503
491
  multiple: s = !1,
@@ -528,11 +516,11 @@ import './assets/@common-rjsf.css';const N = {
528
516
  placeholder: p || N.SELECT,
529
517
  isDisabled: a || i,
530
518
  styles: {
531
- ...F,
519
+ ...C,
532
520
  control: (g) => ({
533
521
  ...g,
534
- ...F.control,
535
- backgroundColor: "var(--bg-secondary)"
522
+ ...C.control,
523
+ backgroundColor: "var(--N50)"
536
524
  })
537
525
  },
538
526
  components: {
@@ -1,15 +1,15 @@
1
1
  import { MODES } from '../Constants';
2
- import { Action, CodeEditorInitialValueType, CodeEditorState } from './types';
2
+ import { Action, CodeEditorInitialValueType, CodeEditorState, CodeEditorThemesKeys } from './types';
3
3
  export declare const CodeEditorReducer: (state: CodeEditorState, action: Action) => {
4
4
  mode: any;
5
5
  diffMode: boolean;
6
- theme: import('./types').CodeEditorThemesKeys;
6
+ theme: CodeEditorThemesKeys;
7
7
  code: string;
8
8
  noParsing: boolean;
9
9
  } | {
10
10
  diffMode: any;
11
11
  mode: MODES;
12
- theme: import('./types').CodeEditorThemesKeys;
12
+ theme: CodeEditorThemesKeys;
13
13
  code: string;
14
14
  noParsing: boolean;
15
15
  } | {
@@ -22,15 +22,15 @@ export declare const CodeEditorReducer: (state: CodeEditorState, action: Action)
22
22
  code: any;
23
23
  mode: MODES;
24
24
  diffMode: boolean;
25
- theme: import('./types').CodeEditorThemesKeys;
25
+ theme: CodeEditorThemesKeys;
26
26
  noParsing: boolean;
27
27
  } | {
28
28
  height: any;
29
29
  mode: MODES;
30
30
  diffMode: boolean;
31
- theme: import('./types').CodeEditorThemesKeys;
31
+ theme: CodeEditorThemesKeys;
32
32
  code: string;
33
33
  noParsing: boolean;
34
34
  };
35
35
  export declare const parseValueToCode: (value: string, mode: string, tabSize: number) => string;
36
- export declare const initialState: ({ mode, theme, value, diffView, noParsing, tabSize, appTheme, }: CodeEditorInitialValueType) => CodeEditorState;
36
+ export declare const initialState: ({ mode, theme, value, diffView, noParsing, tabSize, }: CodeEditorInitialValueType) => CodeEditorState;
@@ -1,15 +1,9 @@
1
- import { AppThemeType } from '../../Shared/Providers';
2
1
  import { MODES } from '../Constants';
3
2
  export interface InformationBarProps {
4
3
  text: string;
5
4
  className?: string;
6
5
  children?: React.ReactNode;
7
6
  }
8
- export declare enum CodeEditorThemesKeys {
9
- vsDarkDT = "vs-dark--dt",
10
- vs = "vs",
11
- networkStatusInterface = "network-status-interface"
12
- }
13
7
  interface CodeEditorBaseInterface {
14
8
  value?: string;
15
9
  lineDecorationsWidth?: number;
@@ -28,7 +22,7 @@ interface CodeEditorBaseInterface {
28
22
  diffView?: boolean;
29
23
  loading?: boolean;
30
24
  customLoader?: JSX.Element;
31
- theme?: CodeEditorThemesKeys;
25
+ theme?: string;
32
26
  original?: string;
33
27
  focus?: boolean;
34
28
  validatorSchema?: any;
@@ -74,13 +68,20 @@ export interface Action {
74
68
  type: ActionTypes;
75
69
  value: any;
76
70
  }
77
- export interface CodeEditorInitialValueType extends Pick<CodeEditorBaseInterface, 'theme'> {
71
+ export declare enum CodeEditorThemesKeys {
72
+ vsDarkDT = "vs-dark--dt",
73
+ deleteDraft = "delete-draft",
74
+ unpublished = "unpublished",
75
+ vs = "vs",
76
+ networkStatusInterface = "network-status-interface"
77
+ }
78
+ export interface CodeEditorInitialValueType {
78
79
  mode: string;
79
80
  diffView: boolean;
81
+ theme?: string;
80
82
  value: string;
81
83
  noParsing?: boolean;
82
84
  tabSize: number;
83
- appTheme: AppThemeType;
84
85
  }
85
86
  export interface CodeEditorState {
86
87
  mode: MODES;
@@ -23,8 +23,6 @@ export declare const multiSelectStyles: {
23
23
  option: (base: any, state: any) => any;
24
24
  container: (base: any, state: any) => any;
25
25
  valueContainer: (base: any, state: any) => any;
26
- singleValue: (base: any) => any;
27
- input: (base: any) => any;
28
26
  };
29
27
  export interface CustomSelect {
30
28
  sortSelected?: boolean;
@@ -13,9 +13,6 @@ export declare const getCommonSelectStyle: (styleOverrides?: {}) => {
13
13
  loadingMessage: (base: any) => any;
14
14
  noOptionsMessage: (base: any) => any;
15
15
  multiValue: (base: any) => any;
16
- singleValue: (base: any) => any;
17
- input: (base: any) => any;
18
- menu: (base: any) => any;
19
16
  };
20
17
  /**
21
18
  * Returns the redirection props for a url
@@ -9,4 +9,5 @@ export interface SegmentedBarChartProps {
9
9
  countClassName?: string;
10
10
  labelClassName?: string;
11
11
  isProportional?: boolean;
12
+ swapLegendAndBar?: boolean;
12
13
  }
@@ -1,3 +1,3 @@
1
1
  import { SegmentedControlProps } from './types';
2
- declare const SegmentedControl: ({ tabs, initialTab, onChange, tooltips, disabled, rootClassName, name, variant, size, }: SegmentedControlProps) => JSX.Element;
2
+ declare const SegmentedControl: ({ tabs, initialTab, onChange, tooltips, disabled, rootClassName, name, variant, }: SegmentedControlProps) => JSX.Element;
3
3
  export default SegmentedControl;
@@ -1,12 +1,10 @@
1
1
  import { OptionType } from '../Types';
2
- import { ComponentSizeType } from '../../Shared/constants';
3
- import { ReactNode } from 'react';
4
2
  export declare enum SegmentedControlVariant {
5
3
  GRAY_ON_WHITE = "gui-yaml-switch",
6
4
  WHITE_ON_GRAY = "gui-yaml-switch-window-bg"
7
5
  }
8
6
  export interface SegmentedControlProps {
9
- tabs: OptionType<string, ReactNode>[];
7
+ tabs: OptionType[];
10
8
  initialTab: string;
11
9
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
12
10
  name: string;
@@ -14,8 +12,4 @@ export interface SegmentedControlProps {
14
12
  disabled?: boolean;
15
13
  rootClassName?: string;
16
14
  variant?: SegmentedControlVariant;
17
- /**
18
- * @default ComponentSizeType.medium
19
- */
20
- size?: ComponentSizeType.medium | ComponentSizeType.large;
21
15
  }
@@ -1,3 +1,3 @@
1
1
  import { DeploymentTemplateHistoryType } from '../types';
2
- declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, rootClassName, sortingConfig, codeEditorKey, }: DeploymentTemplateHistoryType) => JSX.Element;
2
+ declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, sortingConfig, codeEditorKey, }: DeploymentTemplateHistoryType) => JSX.Element;
3
3
  export default DeploymentHistoryDiffView;
@@ -11,8 +11,6 @@ export declare const FILTER_STYLE: {
11
11
  option: (base: any, state: any) => any;
12
12
  container: (base: any, state: any) => any;
13
13
  valueContainer: (base: any, state: any) => any;
14
- singleValue: (base: any) => any;
15
- input: (base: any) => any;
16
14
  };
17
15
  export declare const GIT_BRANCH_NOT_CONFIGURED = "Not Configured";
18
16
  export declare const DEFAULT_GIT_BRANCH_VALUE = "--";
@@ -390,6 +390,8 @@ export interface DeploymentTemplateHistoryType {
390
390
  currentConfiguration: DeploymentHistoryDetail;
391
391
  baseTemplateConfiguration: DeploymentHistoryDetail;
392
392
  previousConfigAvailable: boolean;
393
+ isUnpublished?: boolean;
394
+ isDeleteDraft?: boolean;
393
395
  rootClassName?: string;
394
396
  codeEditorKey?: React.Key;
395
397
  sortingConfig?: {
@@ -1,3 +1,3 @@
1
1
  import { PluginTagSelectProps } from './types';
2
- declare const PluginTagSelect: ({ availableTags, handleUpdateSelectedTags, selectedTags, isLoading, tagsError, reloadTags, }: PluginTagSelectProps) => JSX.Element;
2
+ declare const PluginTagSelect: ({ availableTags, handleUpdateSelectedTags, selectedTags, isLoading, hasError, reloadTags, }: PluginTagSelectProps) => JSX.Element;
3
3
  export default PluginTagSelect;
@@ -1,5 +1,5 @@
1
1
  import { MutableRefObject } from 'react';
2
- import { ConsequenceType, ServerErrors, VariableType } from '../../../Common';
2
+ import { ConsequenceType, VariableType } from '../../../Common';
3
3
  import { BaseFilterQueryParams } from '../../types';
4
4
  import { ImageWithFallbackProps } from '../ImageWithFallback';
5
5
  import { getPluginStoreData } from './service';
@@ -149,7 +149,7 @@ export interface PluginListParamsType {
149
149
  export interface PluginTagSelectProps extends Pick<BasePluginListContainerProps, 'availableTags'> {
150
150
  selectedTags: PluginListContainerProps['parentFilters']['selectedTags'];
151
151
  isLoading: boolean;
152
- tagsError: ServerErrors;
152
+ hasError: boolean;
153
153
  reloadTags: () => void;
154
154
  handleUpdateSelectedTags: (tags: string[]) => void;
155
155
  }
@@ -1,5 +1,21 @@
1
+ import { OptionProps } from 'react-select';
2
+ import { OptionType } from '../../../Common/Types';
1
3
  import { ParentPluginDTO, PluginDataStoreType } from './types';
2
4
  export declare const parsePluginDetailsDTOIntoPluginStore: (pluginData: ParentPluginDTO[]) => PluginDataStoreType;
5
+ export declare const pluginTagSelectStyles: {
6
+ option: (base: any, state: any) => any;
7
+ container: (base: any, state: any) => any;
8
+ menuList: (base: any) => any;
9
+ control: (base: any, state: any) => any;
10
+ dropdownIndicator: (base: any, state: any) => any;
11
+ valueContainer: (base: any) => any;
12
+ loadingMessage: (base: any) => any;
13
+ noOptionsMessage: (base: any) => any;
14
+ placeholder: (base: any) => any;
15
+ group: (base: any) => any;
16
+ groupHeading: (base: any) => any;
17
+ };
18
+ export declare const PluginTagOption: (props: OptionProps<OptionType, true>) => JSX.Element;
3
19
  /**
4
20
  * @description This method takes the initial plugin data store and updates the keys with the target parent plugin store and plugin version store
5
21
  */
@@ -11,5 +11,4 @@ export declare const CommonGroupedDropdownStyles: {
11
11
  multiValue: (base: any) => any;
12
12
  multiValueLabel: (base: any) => any;
13
13
  placeholder: (base: any) => any;
14
- menu: (base: any) => any;
15
14
  };
@@ -12,9 +12,6 @@ export declare const getCommonSelectStyle: (styleOverrides?: {}) => {
12
12
  placeholder: (base: any) => any;
13
13
  group: (base: any) => any;
14
14
  groupHeading: (base: any) => any;
15
- singleValue: (base: any) => any;
16
- input: (base: any) => any;
17
- menu: (base: any) => any;
18
15
  };
19
16
  export declare const getCustomOptionSelectionStyle: (styleOverrides?: {}) => (base: any, state: any) => any;
20
17
  export declare const SelectOption: (props: any) => JSX.Element;
@@ -32,9 +29,6 @@ export declare const commonSelectStyles: {
32
29
  placeholder: (base: any) => any;
33
30
  group: (base: any) => any;
34
31
  groupHeading: (base: any) => any;
35
- singleValue: (base: any) => any;
36
- input: (base: any) => any;
37
- menu: (base: any) => any;
38
32
  };
39
33
  export declare const MenuListWithApplyButton: ({ handleApplyFilter, ...props }: MenuListProps & {
40
34
  handleApplyFilter: () => void;
@@ -0,0 +1,3 @@
1
+ import { SecurityCardProps } from './types';
2
+ declare const SecurityCard: ({ category, subCategory, severityCount, handleCardClick }: SecurityCardProps) => JSX.Element;
3
+ export default SecurityCard;
@@ -0,0 +1,3 @@
1
+ import { SecurityDetailsCardsProps } from './types';
2
+ declare const SecurityDetailsCards: ({ scanResult, Sidebar }: SecurityDetailsCardsProps) => JSX.Element;
3
+ export default SecurityDetailsCards;
@@ -0,0 +1,2 @@
1
+ export { default as SecurityCard } from './SecurityCard';
2
+ export { default as SecurityDetailsCards } from './SecurityDetailsCards';
@@ -0,0 +1,11 @@
1
+ import { ScanResultDTO, SecurityModalPropsType, SeveritiesDTO } from '../SecurityModal/types';
2
+ import { ScanCategories, ScanSubCategories } from '../types';
3
+ export interface SecurityCardProps {
4
+ category: ScanCategories;
5
+ subCategory: ScanSubCategories;
6
+ severityCount: Partial<Record<SeveritiesDTO, number>>;
7
+ handleCardClick: () => void;
8
+ }
9
+ export interface SecurityDetailsCardsProps extends Pick<SecurityModalPropsType, 'Sidebar'> {
10
+ scanResult: ScanResultDTO;
11
+ }
@@ -1,4 +1,9 @@
1
1
  import { SeveritiesDTO, SortOrderEnum, EmptyStateType, StatusType, SidebarPropsType, SecurityModalStateType } from './types';
2
+ export declare const DEFAULT_SECURITY_MODAL_IMAGE_STATE: {
3
+ category: "imageScan";
4
+ subCategory: "vulnerability";
5
+ detailViewData: any;
6
+ };
2
7
  export declare const getDefaultSecurityModalState: (categoriesConfig: SidebarPropsType["categoriesConfig"]) => SecurityModalStateType;
3
8
  export declare const CATEGORY_LABELS: {
4
9
  readonly IMAGE_SCAN: "Image Scan";
@@ -14,35 +19,35 @@ export declare const SUB_CATEGORY_LABELS: {
14
19
  export declare const SEVERITIES: {
15
20
  readonly critical: {
16
21
  readonly label: "Critical";
17
- readonly color: "var(--R700)";
22
+ readonly color: "#B21212";
18
23
  };
19
24
  readonly high: {
20
25
  readonly label: "High";
21
- readonly color: "var(--R500)";
26
+ readonly color: "#F33E3E";
22
27
  };
23
28
  readonly medium: {
24
29
  readonly label: "Medium";
25
- readonly color: "var(--O500)";
30
+ readonly color: "#FF7E5B";
26
31
  };
27
32
  readonly low: {
28
33
  readonly label: "Low";
29
- readonly color: "var(--Y500)";
34
+ readonly color: "#FFB549";
30
35
  };
31
36
  readonly unknown: {
32
37
  readonly label: "Unknown";
33
- readonly color: "var(--N300)";
38
+ readonly color: "#B1B7BC";
34
39
  };
35
40
  readonly fail: {
36
41
  readonly label: "Failures";
37
- readonly color: "var(--R500)";
42
+ readonly color: "#F33E3E";
38
43
  };
39
44
  readonly success: {
40
45
  readonly label: "Successes";
41
- readonly color: "var(--G500)";
46
+ readonly color: "#1DAD70";
42
47
  };
43
48
  readonly exceptions: {
44
49
  readonly label: "Exceptions";
45
- readonly color: "var(--N300)";
50
+ readonly color: "#B1B7BC";
46
51
  };
47
52
  };
48
53
  export declare const ORDERED_SEVERITY_KEYS: readonly [SeveritiesDTO.CRITICAL, SeveritiesDTO.HIGH, SeveritiesDTO.MEDIUM, SeveritiesDTO.LOW, SeveritiesDTO.UNKNOWN, SeveritiesDTO.FAILURES, SeveritiesDTO.EXCEPTIONS, SeveritiesDTO.SUCCESSES];
@@ -1,6 +1,7 @@
1
1
  export { default as SecurityModal } from './SecurityModal';
2
2
  export { getSecurityScanSeveritiesCount, getTotalVulnerabilityCount, parseGetResourceScanDetailsResponse, } from './utils';
3
3
  export type { ScanResultDTO, SidebarPropsType, SidebarDataChildType, SidebarDataType, GetResourceScanDetailsPayloadType, GetResourceScanDetailsResponseType, } from './types';
4
+ export { SeveritiesDTO } from './types';
4
5
  export { getSidebarData, getProgressingStateForStatus } from './config';
5
6
  export { CATEGORY_LABELS } from './constants';
6
7
  export { getSecurityScan } from './service';
@@ -208,6 +208,7 @@ interface SecurityModalBaseProps {
208
208
  handleModalClose: (event?: React.MouseEvent<HTMLElement>) => void;
209
209
  Sidebar?: React.FC<SidebarPropsType>;
210
210
  hidePolicy?: boolean;
211
+ defaultState?: SecurityModalStateType;
211
212
  }
212
213
  export type SecurityModalPropsType = SecurityModalBaseProps;
213
214
  export interface IndexedTextDisplayPropsType {
@@ -1,7 +1,7 @@
1
1
  import { ScanResultDTO, SeveritiesDTO, GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, VulnerabilityCountType } from './types';
2
2
  import { SEVERITIES } from './constants';
3
3
  export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
4
- color: "var(--Y500)" | "var(--R500)" | "var(--G500)" | "var(--O500)" | "var(--N300)" | "var(--R700)";
4
+ color: "#B1B7BC" | "#B21212" | "#F33E3E" | "#FF7E5B" | "#FFB549" | "#1DAD70";
5
5
  label: "Critical" | "High" | "Medium" | "Low" | "Unknown" | "Failures" | "Successes" | "Exceptions";
6
6
  value: number;
7
7
  }[];
@@ -0,0 +1,2 @@
1
+ import { SecurityConfigType } from './types';
2
+ export declare const SECURITY_CONFIG: SecurityConfigType;
@@ -1,4 +1,4 @@
1
- export * from './SecuritySummaryCard';
2
1
  export * from './Vulnerabilities';
3
2
  export * from './SecurityModal';
4
3
  export * from './utils';
4
+ export * from './SecurityDetailsCards';
@@ -0,0 +1,18 @@
1
+ import { CATEGORIES, SUB_CATEGORIES } from './SecurityModal/types';
2
+ export type ScanCategories = (typeof CATEGORIES)[keyof typeof CATEGORIES];
3
+ export type ScanSubCategories = (typeof SUB_CATEGORIES)[keyof typeof SUB_CATEGORIES];
4
+ export type CategoriesConfig = {
5
+ imageScan: boolean;
6
+ codeScan: boolean;
7
+ kubernetesManifest: boolean;
8
+ };
9
+ interface SecurityConfigCategoryType {
10
+ label: string;
11
+ subCategories: ScanSubCategories[];
12
+ }
13
+ export interface SecurityConfigType {
14
+ imageScan?: SecurityConfigCategoryType;
15
+ codeScan?: SecurityConfigCategoryType;
16
+ kubernetesManifest?: SecurityConfigCategoryType;
17
+ }
18
+ export {};
@@ -1,8 +1,6 @@
1
- import { SeverityCount } from '../../types';
2
- import { ScanResultDTO } from './SecurityModal/types';
1
+ import { ScanResultDTO, SeveritiesDTO } from './SecurityModal';
2
+ import { CategoriesConfig, SecurityConfigType } from './types';
3
3
  export declare const getCVEUrlFromCVEName: (cveName: string) => string;
4
- export declare const getScanToolAndSeverityCount: (scanResult: ScanResultDTO) => {
5
- scanToolId: number;
6
- severityCount: SeverityCount;
7
- totalCount: number;
8
- };
4
+ export declare const getTotalSeverities: (severityCount: Partial<Record<SeveritiesDTO, number>>) => number;
5
+ export declare const getSecurityConfig: ({ imageScan, codeScan, kubernetesManifest, }: CategoriesConfig) => SecurityConfigType;
6
+ export declare const getCompiledSecurityThreats: (scanResult: ScanResultDTO) => Partial<Record<SeveritiesDTO, number>>;
@@ -43,7 +43,7 @@ import { SelectPickerProps } from './type';
43
43
  * <SelectPicker
44
44
  * ...
45
45
  * renderMenuListFooter={() => (
46
- * <div className="px-8 py-6 dc__border-top bg__secondary cn-6">
46
+ * <div className="px-8 py-6 dc__border-top bcn-50 cn-6">
47
47
  * <div>Foot note</div>
48
48
  * </div>
49
49
  * )}
@@ -1,5 +1,4 @@
1
1
  export * from './MainContextProvider';
2
2
  export * from './ImageSelectionUtility';
3
- export * from './ThemeProvider';
4
3
  export * from './UserEmailProvider';
5
4
  export type { MainContext } from './types';