@devtron-labs/devtron-fe-common-lib 1.4.8 → 1.4.9-beta-2

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 (55) hide show
  1. package/dist/{@code-editor-Ch3gMDzD.js → @code-editor-yThkReqW.js} +7373 -6958
  2. package/dist/{@common-rjsf-RJZ7deME.js → @common-rjsf-CewCWcY8.js} +26 -14
  3. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +7 -7
  4. package/dist/Common/CodeEditor/types.d.ts +9 -10
  5. package/dist/Common/CodeEditor/utils.d.ts +3 -0
  6. package/dist/Common/MultiSelectCustomization.d.ts +2 -0
  7. package/dist/Common/RJSF/utils.d.ts +3 -0
  8. package/dist/Common/SegmentedControl/SegmentedControl.component.d.ts +1 -1
  9. package/dist/Common/SegmentedControl/constants.d.ts +2 -0
  10. package/dist/Common/SegmentedControl/types.d.ts +7 -1
  11. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.d.ts +1 -1
  12. package/dist/Shared/Components/CICDHistory/constants.d.ts +2 -0
  13. package/dist/Shared/Components/CICDHistory/types.d.ts +0 -2
  14. package/dist/Shared/Components/Plugin/PluginTagSelect.d.ts +1 -1
  15. package/dist/Shared/Components/Plugin/types.d.ts +2 -2
  16. package/dist/Shared/Components/Plugin/utils.d.ts +0 -16
  17. package/dist/Shared/Components/ReactSelect/constants.d.ts +1 -0
  18. package/dist/Shared/Components/ReactSelect/utils.d.ts +6 -0
  19. package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +8 -8
  20. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
  21. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  22. package/dist/Shared/Components/ThemeSwitcher/ThemeSwitcher.component.d.ts +3 -0
  23. package/dist/Shared/Components/ThemeSwitcher/constants.d.ts +6 -0
  24. package/dist/Shared/Components/ThemeSwitcher/index.d.ts +1 -0
  25. package/dist/Shared/Components/ThemeSwitcher/types.d.ts +3 -0
  26. package/dist/Shared/Components/WorkflowOptionsModal/SourceTypeCard.d.ts +3 -0
  27. package/dist/Shared/Components/WorkflowOptionsModal/WorkflowOptionsModal.d.ts +3 -0
  28. package/dist/Shared/Components/WorkflowOptionsModal/constants.d.ts +54 -0
  29. package/dist/Shared/Components/WorkflowOptionsModal/index.d.ts +1 -0
  30. package/dist/Shared/Components/WorkflowOptionsModal/types.d.ts +28 -0
  31. package/dist/Shared/Components/WorkflowOptionsModal/utils.d.ts +14 -0
  32. package/dist/Shared/Components/index.d.ts +1 -0
  33. package/dist/Shared/Providers/ThemeProvider/ThemeProvider.d.ts +3 -0
  34. package/dist/Shared/Providers/ThemeProvider/constants.d.ts +2 -0
  35. package/dist/Shared/Providers/ThemeProvider/index.d.ts +2 -0
  36. package/dist/Shared/Providers/ThemeProvider/types.d.ts +33 -0
  37. package/dist/Shared/Providers/ThemeProvider/utils.d.ts +4 -0
  38. package/dist/Shared/Providers/index.d.ts +1 -0
  39. package/dist/Shared/Services/common.service.d.ts +1 -0
  40. package/dist/Shared/types.d.ts +17 -0
  41. package/dist/assets/@code-editor.css +1 -1
  42. package/dist/assets/change-source.abc9d12f.png +0 -0
  43. package/dist/assets/ic-laptop.485e21b4.svg +3 -0
  44. package/dist/assets/ic-moon.17d37c40.svg +3 -0
  45. package/dist/assets/{ic-nav-rocket.9e50bb61.svg → ic-nav-rocket.433c9706.svg} +1 -1
  46. package/dist/assets/{ic-rotate-devtron.200e165b.svg → ic-rotate-devtron.5a8363d8.svg} +87 -86
  47. package/dist/assets/ic-source-build.7d776b10.svg +22 -0
  48. package/dist/assets/ic-source-job.a40f06cf.svg +26 -0
  49. package/dist/assets/ic-source-linked-build.f24ecbed.svg +24 -0
  50. package/dist/assets/ic-source-webhook.ee64a29a.svg +22 -0
  51. package/dist/assets/ic-sun.33e8214b.svg +3 -0
  52. package/dist/assets/select-image-source.fb911f42.png +0 -0
  53. package/dist/index.d.ts +6 -0
  54. package/dist/index.js +685 -680
  55. package/package.json +1 -1
@@ -2,9 +2,9 @@ import { j as n, J as A } from "./@vendor-CwAQS8iU.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-Ch3gMDzD.js";
5
+ import { T as y, c as H, a as U, i as J, d as w } from "./@code-editor-yThkReqW.js";
6
6
  import M, { components as O } from "react-select";
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";
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";
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 = {} } = W(t);
158
+ const { submitText: e, norender: s, props: o = {} } = V(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 = V(e);
217
+ const s = W(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(--N50)",
243
+ backgroundColor: "var(--bg-secondary)",
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)" : "white",
250
+ backgroundColor: s.isFocused ? "var(--N100)" : "var(--bg-primary)",
251
251
  padding: "10px 12px",
252
252
  cursor: "pointer"
253
253
  }),
@@ -276,12 +276,24 @@ import './assets/@common-rjsf.css';const N = {
276
276
  ...e,
277
277
  border: "1px solid var(--N200)",
278
278
  borderRadius: "4px",
279
- background: "white",
279
+ background: "var(--bg-primary)",
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
+ }),
285
297
  ...t
286
298
  }), Le = (t) => {
287
299
  try {
@@ -316,7 +328,7 @@ import './assets/@common-rjsf.css';const N = {
316
328
  return "";
317
329
  const e = t.trim();
318
330
  return e.match(/^\w+(\/\w+)*$/g) ? `/${e}` : e.match(/^\w+(\.\w+)*$/g) ? `/${e.replaceAll(/\./g, "/")}` : e;
319
- }, F = {
331
+ }, C = {
320
332
  value: !1,
321
333
  path: ""
322
334
  }, me = (t) => {
@@ -326,13 +338,13 @@ import './assets/@common-rjsf.css';const N = {
326
338
  return typeof e == "string" ? {
327
339
  value: !0,
328
340
  path: v(e)
329
- } : typeof e != "object" ? structuredClone(F) : Object.hasOwn(e, "condition") && "condition" in e && Object.hasOwn(e, "value") && "value" in e ? {
341
+ } : typeof e != "object" ? structuredClone(C) : Object.hasOwn(e, "condition") && "condition" in e && Object.hasOwn(e, "value") && "value" in e ? {
330
342
  value: e.condition,
331
343
  path: v(e.value)
332
344
  } : Object.hasOwn(e, "value") && "value" in e && Object.hasOwn(e, "path") && "path" in e ? {
333
345
  value: e.value,
334
346
  path: v(e.path)
335
- } : structuredClone(F);
347
+ } : structuredClone(C);
336
348
  }, ue = ({
337
349
  disabled: t,
338
350
  formData: e,
@@ -485,7 +497,7 @@ import './assets/@common-rjsf.css';const N = {
485
497
  ),
486
498
  /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize ml-8", children: f.toString() })
487
499
  ] });
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) => {
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) => {
489
501
  const {
490
502
  id: e,
491
503
  multiple: s = !1,
@@ -516,11 +528,11 @@ import './assets/@common-rjsf.css';const N = {
516
528
  placeholder: p || N.SELECT,
517
529
  isDisabled: a || i,
518
530
  styles: {
519
- ...C,
531
+ ...F,
520
532
  control: (g) => ({
521
533
  ...g,
522
- ...C.control,
523
- backgroundColor: "var(--N50)"
534
+ ...F.control,
535
+ backgroundColor: "var(--bg-secondary)"
524
536
  })
525
537
  },
526
538
  components: {
@@ -1,16 +1,16 @@
1
1
  import { MODES } from '../Constants';
2
- import { Action, CodeEditorInitialValueType, CodeEditorState, CodeEditorThemesKeys } from './types';
2
+ import { Action, CodeEditorInitialValueType, CodeEditorState } from './types';
3
3
  export declare const CodeEditorReducer: (state: CodeEditorState, action: Action) => {
4
4
  mode: any;
5
5
  diffMode: boolean;
6
- theme: CodeEditorThemesKeys;
6
+ theme: import('./types').CodeEditorThemesKeys;
7
7
  code: string;
8
8
  defaultCode: string;
9
9
  noParsing: boolean;
10
10
  } | {
11
11
  diffMode: any;
12
12
  mode: MODES;
13
- theme: CodeEditorThemesKeys;
13
+ theme: import('./types').CodeEditorThemesKeys;
14
14
  code: string;
15
15
  defaultCode: string;
16
16
  noParsing: boolean;
@@ -25,24 +25,24 @@ export declare const CodeEditorReducer: (state: CodeEditorState, action: Action)
25
25
  code: any;
26
26
  mode: MODES;
27
27
  diffMode: boolean;
28
- theme: CodeEditorThemesKeys;
28
+ theme: import('./types').CodeEditorThemesKeys;
29
29
  defaultCode: string;
30
30
  noParsing: boolean;
31
31
  } | {
32
32
  defaultCode: any;
33
33
  mode: MODES;
34
34
  diffMode: boolean;
35
- theme: CodeEditorThemesKeys;
35
+ theme: import('./types').CodeEditorThemesKeys;
36
36
  code: string;
37
37
  noParsing: boolean;
38
38
  } | {
39
39
  height: any;
40
40
  mode: MODES;
41
41
  diffMode: boolean;
42
- theme: CodeEditorThemesKeys;
42
+ theme: import('./types').CodeEditorThemesKeys;
43
43
  code: string;
44
44
  defaultCode: string;
45
45
  noParsing: boolean;
46
46
  };
47
47
  export declare const parseValueToCode: (value: string, mode: string, tabSize: number) => string;
48
- export declare const initialState: ({ mode, theme, value, defaultValue, diffView, noParsing, tabSize, }: CodeEditorInitialValueType) => CodeEditorState;
48
+ export declare const initialState: ({ mode, theme, value, defaultValue, diffView, noParsing, tabSize, appTheme, }: CodeEditorInitialValueType) => CodeEditorState;
@@ -1,9 +1,15 @@
1
+ import { AppThemeType } from '../../Shared/Providers';
1
2
  import { MODES } from '../Constants';
2
3
  export interface InformationBarProps {
3
4
  text: string;
4
5
  className?: string;
5
6
  children?: React.ReactNode;
6
7
  }
8
+ export declare enum CodeEditorThemesKeys {
9
+ vsDarkDT = "vs-dark--dt",
10
+ vs = "vs",
11
+ networkStatusInterface = "network-status-interface"
12
+ }
7
13
  interface CodeEditorBaseInterface {
8
14
  value?: string;
9
15
  lineDecorationsWidth?: number;
@@ -22,7 +28,7 @@ interface CodeEditorBaseInterface {
22
28
  diffView?: boolean;
23
29
  loading?: boolean;
24
30
  customLoader?: JSX.Element;
25
- theme?: string;
31
+ theme?: CodeEditorThemesKeys;
26
32
  original?: string;
27
33
  focus?: boolean;
28
34
  validatorSchema?: any;
@@ -68,21 +74,14 @@ export interface Action {
68
74
  type: ActionTypes;
69
75
  value: any;
70
76
  }
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 {
77
+ export interface CodeEditorInitialValueType extends Pick<CodeEditorBaseInterface, 'theme'> {
79
78
  mode: string;
80
79
  diffView: boolean;
81
- theme?: string;
82
80
  value: string;
83
81
  defaultValue: string;
84
82
  noParsing?: boolean;
85
83
  tabSize: number;
84
+ appTheme: AppThemeType;
86
85
  }
87
86
  export interface CodeEditorState {
88
87
  mode: MODES;
@@ -0,0 +1,3 @@
1
+ import { AppThemeType } from '../../Shared/Providers';
2
+ import { CodeEditorInterface } from './types';
3
+ export declare const getCodeEditorThemeFromAppTheme: (editorTheme: CodeEditorInterface["theme"], appTheme: AppThemeType) => CodeEditorInterface["theme"];
@@ -23,6 +23,8 @@ 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;
26
28
  };
27
29
  export interface CustomSelect {
28
30
  sortSelected?: boolean;
@@ -13,6 +13,9 @@ 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;
16
19
  };
17
20
  /**
18
21
  * Returns the redirection props for a url
@@ -1,3 +1,3 @@
1
1
  import { SegmentedControlProps } from './types';
2
- declare const SegmentedControl: ({ tabs, initialTab, onChange, tooltips, disabled, rootClassName, name, variant, }: SegmentedControlProps) => JSX.Element;
2
+ declare const SegmentedControl: ({ tabs, initialTab, onChange, tooltips, disabled, rootClassName, name, variant, size, }: SegmentedControlProps) => JSX.Element;
3
3
  export default SegmentedControl;
@@ -0,0 +1,2 @@
1
+ import { SegmentedControlProps } from './types';
2
+ export declare const SEGMENTED_CONTROL_SIZE_TO_CLASS_MAP: Record<SegmentedControlProps['size'], string>;
@@ -1,10 +1,12 @@
1
1
  import { OptionType } from '../Types';
2
+ import { ComponentSizeType } from '../../Shared/constants';
3
+ import { ReactNode } from 'react';
2
4
  export declare enum SegmentedControlVariant {
3
5
  GRAY_ON_WHITE = "gui-yaml-switch",
4
6
  WHITE_ON_GRAY = "gui-yaml-switch-window-bg"
5
7
  }
6
8
  export interface SegmentedControlProps {
7
- tabs: OptionType[];
9
+ tabs: OptionType<string, ReactNode>[];
8
10
  initialTab: string;
9
11
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
10
12
  name: string;
@@ -12,4 +14,8 @@ export interface SegmentedControlProps {
12
14
  disabled?: boolean;
13
15
  rootClassName?: string;
14
16
  variant?: SegmentedControlVariant;
17
+ /**
18
+ * @default ComponentSizeType.medium
19
+ */
20
+ size?: ComponentSizeType.medium | ComponentSizeType.large;
15
21
  }
@@ -1,3 +1,3 @@
1
1
  import { DeploymentTemplateHistoryType } from '../types';
2
- declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, sortingConfig, codeEditorKey, }: DeploymentTemplateHistoryType) => JSX.Element;
2
+ declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, rootClassName, sortingConfig, codeEditorKey, }: DeploymentTemplateHistoryType) => JSX.Element;
3
3
  export default DeploymentHistoryDiffView;
@@ -11,6 +11,8 @@ 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;
14
16
  };
15
17
  export declare const GIT_BRANCH_NOT_CONFIGURED = "Not Configured";
16
18
  export declare const DEFAULT_GIT_BRANCH_VALUE = "--";
@@ -390,8 +390,6 @@ export interface DeploymentTemplateHistoryType {
390
390
  currentConfiguration: DeploymentHistoryDetail;
391
391
  baseTemplateConfiguration: DeploymentHistoryDetail;
392
392
  previousConfigAvailable: boolean;
393
- isUnpublished?: boolean;
394
- isDeleteDraft?: boolean;
395
393
  rootClassName?: string;
396
394
  codeEditorKey?: React.Key;
397
395
  sortingConfig?: {
@@ -1,3 +1,3 @@
1
1
  import { PluginTagSelectProps } from './types';
2
- declare const PluginTagSelect: ({ availableTags, handleUpdateSelectedTags, selectedTags, isLoading, hasError, reloadTags, }: PluginTagSelectProps) => JSX.Element;
2
+ declare const PluginTagSelect: ({ availableTags, handleUpdateSelectedTags, selectedTags, isLoading, tagsError, reloadTags, }: PluginTagSelectProps) => JSX.Element;
3
3
  export default PluginTagSelect;
@@ -1,5 +1,5 @@
1
1
  import { MutableRefObject } from 'react';
2
- import { ConsequenceType, VariableType } from '../../../Common';
2
+ import { ConsequenceType, ServerErrors, 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
- hasError: boolean;
152
+ tagsError: ServerErrors;
153
153
  reloadTags: () => void;
154
154
  handleUpdateSelectedTags: (tags: string[]) => void;
155
155
  }
@@ -1,21 +1,5 @@
1
- import { OptionProps } from 'react-select';
2
- import { OptionType } from '../../../Common/Types';
3
1
  import { ParentPluginDTO, PluginDataStoreType } from './types';
4
2
  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;
19
3
  /**
20
4
  * @description This method takes the initial plugin data store and updates the keys with the target parent plugin store and plugin version store
21
5
  */
@@ -11,4 +11,5 @@ 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;
14
15
  };
@@ -12,6 +12,9 @@ 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;
15
18
  };
16
19
  export declare const getCustomOptionSelectionStyle: (styleOverrides?: {}) => (base: any, state: any) => any;
17
20
  export declare const SelectOption: (props: any) => JSX.Element;
@@ -29,6 +32,9 @@ export declare const commonSelectStyles: {
29
32
  placeholder: (base: any) => any;
30
33
  group: (base: any) => any;
31
34
  groupHeading: (base: any) => any;
35
+ singleValue: (base: any) => any;
36
+ input: (base: any) => any;
37
+ menu: (base: any) => any;
32
38
  };
33
39
  export declare const MenuListWithApplyButton: ({ handleApplyFilter, ...props }: MenuListProps & {
34
40
  handleApplyFilter: () => void;
@@ -19,35 +19,35 @@ export declare const SUB_CATEGORY_LABELS: {
19
19
  export declare const SEVERITIES: {
20
20
  readonly critical: {
21
21
  readonly label: "Critical";
22
- readonly color: "#B21212";
22
+ readonly color: "var(--R700)";
23
23
  };
24
24
  readonly high: {
25
25
  readonly label: "High";
26
- readonly color: "#F33E3E";
26
+ readonly color: "var(--R500)";
27
27
  };
28
28
  readonly medium: {
29
29
  readonly label: "Medium";
30
- readonly color: "#FF7E5B";
30
+ readonly color: "var(--O500)";
31
31
  };
32
32
  readonly low: {
33
33
  readonly label: "Low";
34
- readonly color: "#FFB549";
34
+ readonly color: "var(--Y500)";
35
35
  };
36
36
  readonly unknown: {
37
37
  readonly label: "Unknown";
38
- readonly color: "#B1B7BC";
38
+ readonly color: "var(--N300)";
39
39
  };
40
40
  readonly fail: {
41
41
  readonly label: "Failures";
42
- readonly color: "#F33E3E";
42
+ readonly color: "var(--R500)";
43
43
  };
44
44
  readonly success: {
45
45
  readonly label: "Successes";
46
- readonly color: "#1DAD70";
46
+ readonly color: "var(--G500)";
47
47
  };
48
48
  readonly exceptions: {
49
49
  readonly label: "Exceptions";
50
- readonly color: "#B1B7BC";
50
+ readonly color: "var(--N300)";
51
51
  };
52
52
  };
53
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,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: "#B1B7BC" | "#B21212" | "#F33E3E" | "#FF7E5B" | "#FFB549" | "#1DAD70";
4
+ color: "var(--Y500)" | "var(--R500)" | "var(--G500)" | "var(--O500)" | "var(--N300)" | "var(--R700)";
5
5
  label: "Critical" | "High" | "Medium" | "Low" | "Unknown" | "Failures" | "Successes" | "Exceptions";
6
6
  value: number;
7
7
  }[];
@@ -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 bcn-50 cn-6">
46
+ * <div className="px-8 py-6 dc__border-top bg__secondary cn-6">
47
47
  * <div>Foot note</div>
48
48
  * </div>
49
49
  * )}
@@ -0,0 +1,3 @@
1
+ import { ThemeSwitcherProps } from './types';
2
+ declare const ThemeSwitcher: ({ onChange }: ThemeSwitcherProps) => JSX.Element;
3
+ export default ThemeSwitcher;
@@ -0,0 +1,6 @@
1
+ import { ReactElement } from 'react';
2
+ import { ThemePreferenceType } from '@Shared/Providers/ThemeProvider/types';
3
+ export declare const THEME_PREFERENCE_TO_ICON_MAP: Record<ThemePreferenceType, {
4
+ tippyContent: string;
5
+ icon: ReactElement;
6
+ }>;
@@ -0,0 +1 @@
1
+ export { default as ThemeSwitcher } from './ThemeSwitcher.component';
@@ -0,0 +1,3 @@
1
+ export interface ThemeSwitcherProps {
2
+ onChange: () => void;
3
+ }
@@ -0,0 +1,3 @@
1
+ import { SourceTypeCardProps } from './types';
2
+ declare const SourceTypeCard: ({ title, subtitle, image, alt, dataTestId, type, handleCardAction, disableInfo, isDisabled, }: Readonly<SourceTypeCardProps>) => JSX.Element;
3
+ export default SourceTypeCard;
@@ -0,0 +1,3 @@
1
+ import { WorkflowOptionsModalProps } from './types';
2
+ declare const WorkflowOptionsModal: ({ handleCloseWorkflowOptionsModal, addCIPipeline, addWebhookCD, addLinkedCD, showLinkedCDSource, changeCIPayload, workflows, getWorkflows, resetChangeCIPayload, linkedCDSourceVariant, isAppGroup, }: Readonly<WorkflowOptionsModalProps>) => JSX.Element;
3
+ export default WorkflowOptionsModal;
@@ -0,0 +1,54 @@
1
+ import { CIPipelineNodeType } from '../../types';
2
+ import { PipelineType } from '../../../Common/Types';
3
+ export declare const WORKFLOW_OPTIONS_MODAL: {
4
+ ACTION_TEXT: string;
5
+ ACTION_NOTE: string;
6
+ CHANGE_CI_TEXT: string;
7
+ CHANGE_CI_NOTE: string;
8
+ };
9
+ export declare const WORKFLOW_OPTIONS_MODAL_TYPES: {
10
+ DEFAULT: string;
11
+ RECIEVE: string;
12
+ JOB: string;
13
+ };
14
+ export declare const SOURCE_TYPE_CARD_VARIANTS: {
15
+ SOURCE_CODE: {
16
+ title: string;
17
+ subtitle: string;
18
+ image: string;
19
+ alt: string;
20
+ dataTestId: string;
21
+ type: CIPipelineNodeType;
22
+ };
23
+ LINKED_PIPELINE: {
24
+ title: string;
25
+ subtitle: string;
26
+ image: string;
27
+ alt: string;
28
+ dataTestId: string;
29
+ type: CIPipelineNodeType;
30
+ };
31
+ EXTERNAL_SERVICE: {
32
+ title: string;
33
+ subtitle: string;
34
+ image: string;
35
+ alt: string;
36
+ dataTestId: string;
37
+ type: PipelineType;
38
+ };
39
+ JOB: {
40
+ title: string;
41
+ subtitle: string;
42
+ image: string;
43
+ alt: string;
44
+ dataTestId: string;
45
+ type: CIPipelineNodeType;
46
+ };
47
+ };
48
+ export declare const NO_ENV_FOUND = "No environment found. Please create a CD Pipeline first.";
49
+ export declare const CHANGE_SAME_CI = "Cannot change to same source type";
50
+ export declare const REQUEST_IN_PROGRESS = "Request in progress";
51
+ export declare const TOAST_MESSAGES: {
52
+ SUCCESS_CHANGE_TO_WEBHOOK: string;
53
+ WORKFLOW_NOT_AVAILABLE: string;
54
+ };
@@ -0,0 +1 @@
1
+ export { default as WorkflowOptionsModal } from './WorkflowOptionsModal';
@@ -0,0 +1,28 @@
1
+ import { ChangeCIPayloadType, CIPipelineNodeType, WorkflowType } from '../../types';
2
+ interface LinkedCDSourceVariant {
3
+ title: string;
4
+ subtitle: string;
5
+ image: string;
6
+ alt: string;
7
+ dataTestId: string;
8
+ type: string;
9
+ }
10
+ export interface SourceTypeCardProps extends LinkedCDSourceVariant {
11
+ handleCardAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
12
+ disableInfo: string;
13
+ isDisabled?: boolean;
14
+ }
15
+ export interface WorkflowOptionsModalProps {
16
+ handleCloseWorkflowOptionsModal: () => void;
17
+ addCIPipeline: (type: CIPipelineNodeType, workflowId?: number | string) => void;
18
+ addWebhookCD: (workflowId?: number | string) => void;
19
+ addLinkedCD: (changeCIPayload?: ChangeCIPayloadType) => void;
20
+ showLinkedCDSource: boolean;
21
+ resetChangeCIPayload: () => void;
22
+ changeCIPayload?: ChangeCIPayloadType;
23
+ workflows?: WorkflowType[];
24
+ getWorkflows?: () => void;
25
+ linkedCDSourceVariant?: LinkedCDSourceVariant;
26
+ isAppGroup?: boolean;
27
+ }
28
+ export {};
@@ -0,0 +1,14 @@
1
+ import { PipelineType } from '../../../Common/Types';
2
+ import { ChangeCIPayloadType } from '../../types';
3
+ export declare const getSwitchToWebhookPayload: (changeCIPayload: ChangeCIPayloadType) => {
4
+ appId: number;
5
+ pipelines: {
6
+ name: string;
7
+ triggertype: "MANUAL";
8
+ appWorkflowId: number;
9
+ environmentId: number;
10
+ id: number;
11
+ parentPipelineType: PipelineType;
12
+ switchFromCiPipelineId: number;
13
+ }[];
14
+ };
@@ -50,4 +50,5 @@ export * from './TagsKeyValueTable';
50
50
  export * from './FileUpload';
51
51
  export * from './AnimatedDeployButton';
52
52
  export * from './BulkOperations';
53
+ export * from './WorkflowOptionsModal';
53
54
  export * from './VirtualizedList';
@@ -0,0 +1,3 @@
1
+ import { ThemeContextType, ThemeProviderProps } from './types';
2
+ export declare const ThemeProvider: ({ children }: ThemeProviderProps) => JSX.Element;
3
+ export declare const useTheme: () => ThemeContextType;
@@ -0,0 +1,2 @@
1
+ export declare const THEME_PREFERENCE_STORAGE_KEY = "themePreference";
2
+ export declare const DARK_COLOR_SCHEME_MATCH_QUERY = "(prefers-color-scheme: dark)";
@@ -0,0 +1,2 @@
1
+ export * from './ThemeProvider';
2
+ export { AppThemeType } from './types';
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ export declare enum AppThemeType {
3
+ light = "light",
4
+ dark = "dark"
5
+ }
6
+ export declare const THEME_PREFERENCE_MAP: {
7
+ readonly auto: "auto";
8
+ readonly light: AppThemeType.light;
9
+ readonly dark: AppThemeType.dark;
10
+ };
11
+ export type ThemePreferenceType = (typeof THEME_PREFERENCE_MAP)[keyof typeof THEME_PREFERENCE_MAP];
12
+ export interface ThemeConfigType {
13
+ /**
14
+ * Current application theme
15
+ *
16
+ * @default AppThemeType.light
17
+ */
18
+ appTheme: AppThemeType;
19
+ /**
20
+ * Preferred theme for the user (if any)
21
+ *
22
+ * @default THEME_PREFERENCE_MAP.auto
23
+ *
24
+ * Note: This shouldn't be consumed other than in ThemeSwitcher component
25
+ */
26
+ themePreference: ThemePreferenceType;
27
+ }
28
+ export interface ThemeContextType extends ThemeConfigType {
29
+ handleSelectedThemeChange: (updatedThemePreference: ThemePreferenceType) => void;
30
+ }
31
+ export interface ThemeProviderProps {
32
+ children: ReactNode;
33
+ }
@@ -0,0 +1,4 @@
1
+ import { AppThemeType, ThemePreferenceType, ThemeConfigType } from './types';
2
+ export declare const getAppThemeForAutoPreference: () => AppThemeType;
3
+ export declare const getThemeConfigFromLocalStorage: () => ThemeConfigType;
4
+ export declare const setThemePreferenceInLocalStorage: (themePreference: ThemePreferenceType) => void;