@devtron-labs/devtron-fe-common-lib 1.15.0-pre-4-beta-1 → 1.15.1-beta-1

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 (42) hide show
  1. package/dist/{@code-editor-Czag4IbD.js → @code-editor-C_u3nWGd.js} +6082 -6015
  2. package/dist/{@common-rjsf-C8Io8Ugi.js → @common-rjsf-7Qd6WdWi.js} +230 -222
  3. package/dist/Common/Dialogs/ConfirmationDialog.d.ts +11 -0
  4. package/dist/Common/Dialogs/Types.d.ts +17 -0
  5. package/dist/Common/Dialogs/index.d.ts +1 -0
  6. package/dist/Common/InfoColorBar/InfoColourbar.d.ts +6 -0
  7. package/dist/Common/RJSF/widgets/Checkbox.d.ts +1 -1
  8. package/dist/Common/Toggle/Toggle.d.ts +18 -0
  9. package/dist/Common/Types.d.ts +43 -1
  10. package/dist/Common/index.d.ts +2 -0
  11. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +46 -2
  12. package/dist/Pages/ResourceBrowser/constants.d.ts +5 -0
  13. package/dist/Shared/Components/DocLink/types.d.ts +0 -1
  14. package/dist/Shared/Components/DocLink/utils.d.ts +1 -1
  15. package/dist/Shared/Components/Icon/Icon.d.ts +3 -4
  16. package/dist/Shared/Components/Switch/Switch.component.d.ts +1 -1
  17. package/dist/Shared/Components/Switch/types.d.ts +2 -11
  18. package/dist/Shared/Components/Switch/utils.d.ts +2 -2
  19. package/dist/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.d.ts +1 -1
  20. package/dist/Shared/Components/ToggleResolveScopedVariables/types.d.ts +1 -1
  21. package/dist/Shared/Components/index.d.ts +0 -1
  22. package/dist/Shared/Helpers.d.ts +2 -1
  23. package/dist/Shared/Providers/types.d.ts +10 -28
  24. package/dist/Shared/types.d.ts +2 -1
  25. package/dist/assets/@code-editor.css +1 -1
  26. package/dist/assets/ic-add.18a93616.svg +19 -0
  27. package/dist/assets/ic-container.92a4c33a.svg +3 -0
  28. package/dist/assets/ic-gavel.a3b064b5.svg +3 -0
  29. package/dist/assets/ic-minus.aac464f7.svg +3 -0
  30. package/dist/assets/ic-speedometer.3ecaae3b.svg +3 -0
  31. package/dist/index.d.ts +1 -0
  32. package/dist/index.js +781 -773
  33. package/package.json +3 -3
  34. package/dist/Shared/Components/SwitchThemeDialog/SwitchThemeDialog.component.d.ts +0 -3
  35. package/dist/Shared/Components/SwitchThemeDialog/index.d.ts +0 -2
  36. package/dist/Shared/Components/SwitchThemeDialog/types.d.ts +0 -35
  37. package/dist/assets/ic-add.31531526.svg +0 -3
  38. package/dist/assets/ic-asterisk.ab224e72.svg +0 -3
  39. package/dist/assets/ic-folder-color.7cf84356.svg +0 -6
  40. package/dist/assets/ic-minus.27e3c9bc.svg +0 -5
  41. package/dist/assets/ic-world-globe.877fa6a0.svg +0 -3
  42. /package/dist/assets/{ic-container.4e1e6455.svg → ic-container-registry.4e1e6455.svg} +0 -0
@@ -0,0 +1,11 @@
1
+ import { ConfirmationDialogBodyType, ConfirmationDialogButtonGroupType, ConfirmationDialogIconType, ConfirmationDialogType } from './Types';
2
+ /**
3
+ * @deprecated use confirmation modal instead
4
+ */
5
+ declare const ConfirmationDialog: {
6
+ ({ className, children, close }: ConfirmationDialogType): JSX.Element;
7
+ Icon: ({ src, className }: ConfirmationDialogIconType) => JSX.Element;
8
+ Body: ({ title, subtitle, children }: ConfirmationDialogBodyType) => JSX.Element;
9
+ ButtonGroup: ({ children }: ConfirmationDialogButtonGroupType) => JSX.Element;
10
+ };
11
+ export default ConfirmationDialog;
@@ -32,6 +32,23 @@ export interface ForceDeleteDialogType {
32
32
  forceDeleteDialogTitle: string;
33
33
  forceDeleteDialogMessage: string;
34
34
  }
35
+ export interface ConfirmationDialogType {
36
+ className?: string;
37
+ children: any;
38
+ close?: (e: any) => void;
39
+ }
40
+ export interface ConfirmationDialogIconType {
41
+ src: string;
42
+ className?: string;
43
+ }
44
+ export interface ConfirmationDialogBodyType {
45
+ title: string;
46
+ subtitle?: ReactNode;
47
+ children?: any;
48
+ }
49
+ export interface ConfirmationDialogButtonGroupType {
50
+ children: any;
51
+ }
35
52
  export interface DialogFormProps {
36
53
  className: string;
37
54
  title: string;
@@ -1 +1,2 @@
1
+ export { default as ConfirmationDialog } from './ConfirmationDialog';
1
2
  export * from './DialogForm';
@@ -0,0 +1,6 @@
1
+ import { InfoColourBarType } from '../Types';
2
+ /**
3
+ * @deprecated Use InfoBlock instead
4
+ */
5
+ declare const InfoColourBar: ({ message, classname, Icon, iconClass, iconSize, renderActionButton, linkText, redirectLink, linkOnClick, linkClass, internalLink, styles, hideIcon, textConfig, }: InfoColourBarType) => JSX.Element;
6
+ export default InfoColourBar;
@@ -1,2 +1,2 @@
1
1
  import { WidgetProps } from '@rjsf/utils';
2
- export declare const Checkbox: ({ id, onChange, value, disabled, readonly, autofocus, }: WidgetProps) => JSX.Element;
2
+ export declare const Checkbox: ({ id, onChange, value, required, disabled, readonly, autofocus, onBlur, onFocus, }: WidgetProps) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { CHECKBOX_VALUE } from '../Types';
2
+ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, isLoading, value, isControlled, ...props }: {
3
+ [x: string]: any;
4
+ selected?: boolean;
5
+ onSelect?: any;
6
+ color?: string;
7
+ rootClassName?: string;
8
+ disabled?: boolean;
9
+ dataTestId?: string;
10
+ Icon?: any;
11
+ iconClass?: string;
12
+ throttleOnChange?: boolean;
13
+ shouldToggleValueOnLabelClick?: boolean;
14
+ isLoading?: boolean;
15
+ value?: CHECKBOX_VALUE;
16
+ isControlled?: boolean;
17
+ }) => JSX.Element;
18
+ export default Toggle;
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObj
2
2
  import { TippyProps } from '@tippyjs/react';
3
3
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
5
- import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ComponentLayoutType, StatusType, DocLinkProps, DeploymentStrategyType } from '../Shared';
5
+ import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ButtonProps, ComponentLayoutType, StatusType, DocLinkProps, DeploymentStrategyType } from '../Shared';
6
6
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
@@ -162,6 +162,48 @@ export declare enum ImageType {
162
162
  Medium = "medium",
163
163
  SMALL = "small"
164
164
  }
165
+ interface InfoColourBarTextConfigType {
166
+ /**
167
+ * If given would be shown above the description, in bold
168
+ */
169
+ heading?: string;
170
+ /**
171
+ * If given would be shown below the heading (if given)
172
+ */
173
+ description: string;
174
+ actionButtonConfig?: ButtonProps;
175
+ }
176
+ type InfoColourBarMessageProp = {
177
+ message: ReactNode;
178
+ linkText?: ReactNode;
179
+ redirectLink?: string;
180
+ linkOnClick?: () => void;
181
+ linkClass?: string;
182
+ internalLink?: boolean;
183
+ textConfig?: never;
184
+ } | {
185
+ textConfig: InfoColourBarTextConfigType;
186
+ message?: never;
187
+ linkText?: never;
188
+ redirectLink?: never;
189
+ linkOnClick?: () => never;
190
+ linkClass?: never;
191
+ internalLink?: never;
192
+ };
193
+ export type InfoColourBarType = InfoColourBarMessageProp & {
194
+ classname: string;
195
+ Icon: any;
196
+ iconClass?: string;
197
+ iconSize?: number;
198
+ renderActionButton?: () => JSX.Element;
199
+ styles?: CSSProperties;
200
+ /**
201
+ * If true, the icon is not shown
202
+ *
203
+ * @default false
204
+ */
205
+ hideIcon?: boolean;
206
+ };
165
207
  export interface ReloadType {
166
208
  reload?: (event?: any) => void;
167
209
  className?: string;
@@ -25,6 +25,7 @@ export * from './Helper';
25
25
  export * from './Hooks';
26
26
  export * from './ImageTags';
27
27
  export * from './ImageTags.Types';
28
+ export { default as InfoColourBar } from './InfoColorBar/InfoColourbar';
28
29
  export * from './Markdown';
29
30
  export * from './Modals/Modal';
30
31
  export * from './Modals/VisibleModal';
@@ -46,5 +47,6 @@ export { default as Select } from './Select/Select';
46
47
  export * from './ServerError';
47
48
  export * from './SortableTableHeaderCell';
48
49
  export * from './TippyCustomized';
50
+ export { default as Toggle } from './Toggle/Toggle';
49
51
  export * from './Tooltip';
50
52
  export * from './Types';
@@ -1,4 +1,7 @@
1
- import { RefObject } from 'react';
1
+ import { Dispatch, RefObject, SetStateAction } from 'react';
2
+ import { GroupBase } from 'react-select';
3
+ import { ServerErrors } from '../../Common/ServerError';
4
+ import { SelectPickerOptionType } from '../../Shared/Components';
2
5
  import { Nodes, NodeType } from '../../Shared/types';
3
6
  export interface GVKType {
4
7
  Group: string;
@@ -34,14 +37,37 @@ export interface K8sResourceListPayloadType {
34
37
  filter?: string;
35
38
  k8sRequest: ResourceListPayloadK8sRequestType;
36
39
  }
40
+ export declare enum ResourceRecommenderHeaderType {
41
+ NAME = "name",
42
+ NAMESPACE = "namespace",
43
+ KIND = "kind",
44
+ API_VERSION = "apiVersion",
45
+ CONTAINER_NAME = "containerName",
46
+ CPU_REQUEST = "cpuRequest",
47
+ CPU_LIMIT = "cpuLimit",
48
+ MEMORY_REQUEST = "memoryRequest",
49
+ MEMORY_LIMIT = "memoryLimit"
50
+ }
51
+ export type ResourceRecommenderHeaderWithStringValue = Extract<ResourceRecommenderHeaderType, ResourceRecommenderHeaderType.NAME | ResourceRecommenderHeaderType.NAMESPACE | ResourceRecommenderHeaderType.KIND | ResourceRecommenderHeaderType.API_VERSION | ResourceRecommenderHeaderType.CONTAINER_NAME>;
52
+ export type ResourceRecommenderHeaderWithRecommendation = Extract<ResourceRecommenderHeaderType, ResourceRecommenderHeaderType.CPU_REQUEST | ResourceRecommenderHeaderType.CPU_LIMIT | ResourceRecommenderHeaderType.MEMORY_REQUEST | ResourceRecommenderHeaderType.MEMORY_LIMIT>;
37
53
  export type K8sResourceDetailDataType = {
38
54
  [key: string]: string | number | object | boolean;
55
+ additionalMetadata?: Partial<Record<ResourceRecommenderHeaderWithRecommendation, {
56
+ current: {
57
+ value: string | 'none';
58
+ } | null;
59
+ recommended: {
60
+ value: string | 'none';
61
+ } | null;
62
+ delta: number | null;
63
+ }>>;
39
64
  };
40
65
  export interface K8sResourceDetailType {
41
66
  headers: string[];
42
67
  data: K8sResourceDetailDataType[];
43
68
  }
44
69
  export interface BulkSelectionActionWidgetProps {
70
+ isResourceRecommendationView: boolean;
45
71
  count: number;
46
72
  handleOpenBulkDeleteModal: () => void;
47
73
  handleClearBulkSelection: () => void;
@@ -49,11 +75,12 @@ export interface BulkSelectionActionWidgetProps {
49
75
  handleOpenUncordonNodeModal: () => void;
50
76
  handleOpenDrainNodeModal: () => void;
51
77
  handleOpenRestartWorkloadModal: () => void;
78
+ handleOpenApplyResourceRecommendationModal: () => void;
52
79
  parentRef: RefObject<HTMLDivElement>;
53
80
  showBulkRestartOption: boolean;
54
81
  showNodeListingOptions: boolean;
55
82
  }
56
- export type RBBulkOperationType = 'restart' | 'delete' | 'cordon' | 'uncordon' | 'drain';
83
+ export type RBBulkOperationType = 'restart' | 'delete' | 'cordon' | 'uncordon' | 'drain' | 'applyResourceRecommendation';
57
84
  export interface CreateResourceRequestBodyType {
58
85
  appId: string;
59
86
  clusterId: number;
@@ -65,6 +92,7 @@ export interface CreateResourceRequestBodyType {
65
92
  export interface ResourceManifestDTO {
66
93
  manifestResponse: {
67
94
  manifest: Record<string, unknown>;
95
+ recommendedManifest?: Record<string, unknown>;
68
96
  };
69
97
  secretViewAccess: boolean;
70
98
  }
@@ -108,4 +136,20 @@ export interface NodeActionRequest {
108
136
  version: string;
109
137
  kind: string;
110
138
  }
139
+ export interface GVKOptionValueType {
140
+ kind: string;
141
+ apiVersion: string;
142
+ }
143
+ export interface GetResourceRecommenderResourceListPropsType {
144
+ resourceList: K8sResourceDetailType;
145
+ reloadResourceListData: () => void;
146
+ setShowAbsoluteValuesInResourceRecommender: Dispatch<SetStateAction<boolean>>;
147
+ showAbsoluteValuesInResourceRecommender: boolean;
148
+ gvkOptions: GroupBase<SelectPickerOptionType<GVKOptionValueType>>[];
149
+ areGVKOptionsLoading: boolean;
150
+ reloadGVKOptions: () => void;
151
+ gvkOptionsError: ServerErrors;
152
+ isResourceListLoading: boolean;
153
+ resourceListError: ServerErrors;
154
+ }
111
155
  export {};
@@ -1,4 +1,5 @@
1
1
  import { SelectPickerOptionType } from '../../Shared/Components';
2
+ import { ResourceRecommenderHeaderType } from './ResourceBrowser.Types';
2
3
  import { NodeDrainRequest } from './types';
3
4
  export declare const ALL_NAMESPACE_OPTION: Readonly<Pick<SelectPickerOptionType<string>, 'value' | 'label'>>;
4
5
  export declare const DRAIN_NODE_MODAL_MESSAGING: {
@@ -50,3 +51,7 @@ export declare const NODE_DRAIN_OPTIONS_CHECKBOX_CONFIG: {
50
51
  infoText: string;
51
52
  label: string;
52
53
  }[];
54
+ export declare const RESOURCE_RECOMMENDER_HEADER_TO_TITLE_MAP: Record<ResourceRecommenderHeaderType, string>;
55
+ export declare const RESOURCE_RECOMMENDER_HEADER_TO_WIDTH_MAP: Record<ResourceRecommenderHeaderType, number>;
56
+ export declare const GVK_FILTER_KIND_QUERY_PARAM_KEY = "gvkFilterKind";
57
+ export declare const GVK_FILTER_API_VERSION_QUERY_PARAM_KEY = "gvkFilterApiVersion";
@@ -4,7 +4,6 @@ import { DOCUMENTATION } from './constants';
4
4
  export type BaseDocLink<T extends boolean> = {
5
5
  isExternalLink?: T;
6
6
  isEnterprise?: boolean;
7
- isLicenseDashboard?: boolean;
8
7
  docLinkKey: T extends true ? string : keyof typeof DOCUMENTATION;
9
8
  };
10
9
  export type DocLinkProps<T extends boolean = false> = Pick<ButtonProps<ButtonComponentType.anchor>, 'dataTestId' | 'size' | 'variant' | 'fullWidth' | 'fontWeight' | 'startIcon'> & Omit<BaseDocLink<T>, 'isEnterprise'> & {
@@ -1,2 +1,2 @@
1
1
  import { BaseDocLink } from './types';
2
- export declare const getDocumentationUrl: <T extends boolean = false>({ docLinkKey, isEnterprise, isExternalLink, isLicenseDashboard, }: BaseDocLink<T>) => string;
2
+ export declare const getDocumentationUrl: <T extends boolean = false>({ docLinkKey, isEnterprise, isExternalLink, }: BaseDocLink<T>) => string;
@@ -12,7 +12,6 @@ export declare const iconMap: {
12
12
  'ic-arrow-square-out': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
13
13
  'ic-arrows-clockwise': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
14
14
  'ic-arrows-left-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
15
- 'ic-asterisk': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
16
15
  'ic-ather': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
17
16
  'ic-azure-aks': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
18
17
  'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -42,6 +41,7 @@ export declare const iconMap: {
42
41
  'ic-cloud-vms': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
43
42
  'ic-cluster': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
44
43
  'ic-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
44
+ 'ic-container-registry': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
45
45
  'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
46
46
  'ic-cookr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
47
47
  'ic-copy': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -77,8 +77,8 @@ export declare const iconMap: {
77
77
  'ic-filter-applied': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
78
78
  'ic-filter': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
79
79
  'ic-flask': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
80
- 'ic-folder-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
81
80
  'ic-folder-user': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
81
+ 'ic-gavel': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
82
82
  'ic-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
83
83
  'ic-gift-gradient': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
84
84
  'ic-gift': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -151,6 +151,7 @@ export declare const iconMap: {
151
151
  'ic-sort-descending': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
152
152
  'ic-sortable': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
153
153
  'ic-sparkle-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
154
+ 'ic-speedometer': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
154
155
  'ic-spinny': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
155
156
  'ic-spray-can': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
156
157
  'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -181,10 +182,8 @@ export declare const iconMap: {
181
182
  'ic-user-circle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
182
183
  'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
183
184
  'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
184
- 'ic-view-variable-toggle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
185
185
  'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
186
186
  'ic-wifi-slash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
187
- 'ic-world-globe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
188
187
  };
189
188
  export type IconName = keyof typeof iconMap;
190
189
  export interface IconsProps extends Omit<IconBaseProps, 'name' | 'iconMap'> {
@@ -1,3 +1,3 @@
1
1
  import { DTSwitchProps } from './types';
2
- declare const Switch: ({ ariaLabel, isDisabled, isLoading, isChecked, tooltipContent, shape, variant, iconColor, iconName, indeterminate, size, name, dataTestId, onChange, autoFocus, }: DTSwitchProps) => JSX.Element;
2
+ declare const Switch: ({ ariaLabel, isDisabled, isLoading, isChecked, tooltipContent, shape, variant, iconColor, iconName, indeterminate, size, name, onChange, }: DTSwitchProps) => JSX.Element;
3
3
  export default Switch;
@@ -1,4 +1,4 @@
1
- import { ButtonHTMLAttributes, ReactNode } from 'react';
1
+ import { ButtonHTMLAttributes } from 'react';
2
2
  import { ComponentSizeType } from '../../constants';
3
3
  import { IconBaseColorType } from '../../types';
4
4
  import { IconName } from '../Icon';
@@ -64,10 +64,6 @@ export type DTSwitchProps = {
64
64
  * Used in forms to identify the switch.
65
65
  */
66
66
  name: string;
67
- /**
68
- * Provide if name generated through `getUniqueId`.
69
- */
70
- dataTestId?: string;
71
67
  /**
72
68
  * The visual variant of the switch.
73
69
  *
@@ -101,11 +97,6 @@ export type DTSwitchProps = {
101
97
  *
102
98
  * @default undefined
103
99
  */
104
- tooltipContent?: ReactNode;
105
- /**
106
- * Indicates whether the switch should be focused automatically when rendered.
107
- * @default false
108
- */
109
- autoFocus?: boolean;
100
+ tooltipContent?: string;
110
101
  } & SwitchShapeProps;
111
102
  export {};
@@ -3,10 +3,10 @@ import { ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP } from './constants';
3
3
  import { DTSwitchProps } from './types';
4
4
  export declare const getSwitchContainerClass: ({ shape, size }: Required<Pick<DTSwitchProps, "shape" | "size">>) => string;
5
5
  export declare const getSwitchTrackColor: ({ shape, variant, isChecked, isLoading, }: Required<Pick<DTSwitchProps, "shape" | "variant" | "isChecked" | "isLoading">>) => string;
6
- export declare const getSwitchTrackHoverColor: ({ shape, variant, isChecked, isLoading, }: Required<Pick<DTSwitchProps, "shape" | "variant" | "isChecked" | "isLoading">>) => (typeof ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP)[DTSwitchProps["variant"]] | "transparent";
6
+ export declare const getSwitchTrackHoverColor: ({ shape, variant, isChecked, }: Required<Pick<DTSwitchProps, "shape" | "variant" | "isChecked">>) => (typeof ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP)[DTSwitchProps["variant"]];
7
7
  export declare const getSwitchThumbClass: ({ shape, size, showIndeterminateIcon, }: Pick<DTSwitchProps, "shape" | "size"> & {
8
8
  showIndeterminateIcon: boolean;
9
9
  }) => string;
10
10
  export declare const getSwitchIconColor: ({ iconColor, isChecked, variant, }: Pick<DTSwitchProps, "iconColor" | "isChecked" | "variant">) => IconBaseColorType;
11
- export declare const getThumbPosition: ({ isChecked, size, shape, indeterminate, isLoading, }: Required<Pick<DTSwitchProps, "isChecked" | "size" | "shape" | "indeterminate" | "isLoading">>) => number;
11
+ export declare const getThumbPosition: ({ isLoading, isChecked, }: Pick<DTSwitchProps, "isLoading" | "isChecked">) => "left" | "right" | "center";
12
12
  export declare const getThumbPadding: ({ shape, isLoading }: Pick<DTSwitchProps, "shape" | "isLoading">) => string;
@@ -1,3 +1,3 @@
1
1
  import { ToggleResolveScopedVariablesProps } from './types';
2
- declare const ToggleResolveScopedVariables: ({ name, resolveScopedVariables, handleToggleScopedVariablesView, isDisabled, showTooltip, }: ToggleResolveScopedVariablesProps) => JSX.Element;
2
+ declare const ToggleResolveScopedVariables: ({ resolveScopedVariables, handleToggleScopedVariablesView, isDisabled, showTooltip, throttleOnChange, }: ToggleResolveScopedVariablesProps) => JSX.Element;
3
3
  export default ToggleResolveScopedVariables;
@@ -1,5 +1,4 @@
1
1
  export interface ToggleResolveScopedVariablesProps {
2
- name: string;
3
2
  resolveScopedVariables: boolean;
4
3
  handleToggleScopedVariablesView: () => void;
5
4
  isDisabled?: boolean;
@@ -7,4 +6,5 @@ export interface ToggleResolveScopedVariablesProps {
7
6
  * @default true
8
7
  */
9
8
  showTooltip?: boolean;
9
+ throttleOnChange?: boolean;
10
10
  }
@@ -73,7 +73,6 @@ export * from './ShowMoreText';
73
73
  export * from './SSOProviderIcon';
74
74
  export * from './StatusComponent';
75
75
  export * from './Switch';
76
- export * from './SwitchThemeDialog';
77
76
  export * from './TabGroup';
78
77
  export * from './Table';
79
78
  export * from './TagsKeyValueTable';
@@ -5,7 +5,7 @@ import { Pair } from 'yaml';
5
5
  import { MaterialHistoryType } from '@Shared/Services/app.types';
6
6
  import { ApprovalConfigDataType, MaterialInfo, SortingOrder, UserApprovalConfigType, UserApprovalInfo } from '../Common';
7
7
  import { AggregatedNodes, PodMetadatum } from './Components';
8
- import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
8
+ import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, Node, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
9
9
  interface HighlightSearchTextProps {
10
10
  /**
11
11
  * The text to be highlighted
@@ -102,4 +102,5 @@ export declare const getClassNameForStickyHeaderWithShadow: (isStuck: boolean, t
102
102
  export declare const clearCookieOnLogout: () => void;
103
103
  export declare const getAppDetailsURL: (appId: number | string, envId?: number | string) => string;
104
104
  export declare const smoothScrollToTop: (scrollContainer: HTMLElement, targetPosition: number) => import('framer-motion').AnimationPlaybackControls;
105
+ export declare const getGroupVersionFromApiVersion: (apiVersion: string) => Pick<Node, "group" | "version">;
105
106
  export {};
@@ -19,10 +19,12 @@ export interface SidePanelConfig {
19
19
  /** URL to documentation that should be displayed in the panel */
20
20
  docLink: string | null;
21
21
  }
22
- type CommonMainContextProps = {
22
+ export interface MainContext {
23
+ serverMode: SERVER_MODE;
23
24
  setServerMode: (serverMode: SERVER_MODE) => void;
24
25
  isHelpGettingStartedClicked: boolean;
25
26
  showCloseButtonAfterGettingStartedClicked: () => void;
27
+ loginCount: number;
26
28
  setLoginCount: (loginCount: number) => void;
27
29
  showGettingStartedCard: boolean;
28
30
  setShowGettingStartedCard: (showGettingStartedCard: boolean) => void;
@@ -30,8 +32,9 @@ type CommonMainContextProps = {
30
32
  setGettingStartedClicked: (isGettingStartedClicked: boolean) => void;
31
33
  moduleInInstallingState: string;
32
34
  setModuleInInstallingState: (moduleInInstallingState: string) => void;
35
+ installedModuleMap: MutableRefObject<Record<string, boolean>>;
33
36
  currentServerInfo: {
34
- serverInfo: ServerInfo | null;
37
+ serverInfo: ServerInfo;
35
38
  fetchingServerInfo: boolean;
36
39
  };
37
40
  isAirgapped: boolean;
@@ -54,23 +57,17 @@ type CommonMainContextProps = {
54
57
  canOnlyViewPermittedEnvOrgLevel: boolean;
55
58
  viewIsPipelineRBACConfiguredNode: ReactNode;
56
59
  handleOpenLicenseInfoDialog: (initialDialogType?: LicenseInfoDialogType.ABOUT | LicenseInfoDialogType.LICENSE) => void;
57
- setLicenseData: Dispatch<SetStateAction<DevtronLicenseInfo>>;
58
- canFetchHelmAppStatus: boolean;
59
- setIntelligenceConfig: Dispatch<SetStateAction<IntelligenceConfig>>;
60
- setSidePanelConfig: Dispatch<SetStateAction<SidePanelConfig>>;
61
- };
62
- export type MainContext = CommonMainContextProps & ({
63
- isLicenseDashboard?: never;
64
- serverMode: SERVER_MODE;
65
- loginCount: number | null;
66
- installedModuleMap: MutableRefObject<Record<string, boolean>>;
67
60
  /**
68
61
  * Data is set only if showLicenseData is received as true
69
62
  */
70
63
  licenseData: DevtronLicenseInfo;
64
+ setLicenseData: Dispatch<SetStateAction<DevtronLicenseInfo>>;
65
+ canFetchHelmAppStatus: boolean;
71
66
  reloadVersionConfig: ReloadVersionConfigTypes;
72
67
  intelligenceConfig: IntelligenceConfig;
68
+ setIntelligenceConfig: Dispatch<SetStateAction<IntelligenceConfig>>;
73
69
  sidePanelConfig: SidePanelConfig;
70
+ setSidePanelConfig: Dispatch<SetStateAction<SidePanelConfig>>;
74
71
  /**
75
72
  * Indicates whether the current Devtron instance is running as an Enterprise edition. \
76
73
  * This flag is determined based on server-side configuration.
@@ -81,23 +78,8 @@ export type MainContext = CommonMainContextProps & ({
81
78
  * Used to conditionally render or enable features that depend on fe-lib
82
79
  */
83
80
  isFELibAvailable: boolean;
84
- } | {
85
- isLicenseDashboard: true;
86
- serverMode: null;
87
- loginCount: null;
88
- installedModuleMap: null;
89
- /**
90
- * Data is set only if showLicenseData is received as true
91
- */
92
- licenseData: null;
93
- reloadVersionConfig: null;
94
- intelligenceConfig: null;
95
- sidePanelConfig: null;
96
- isEnterprise: false;
97
- isFELibAvailable: false;
98
- });
81
+ }
99
82
  export interface MainContextProviderProps {
100
83
  children: ReactNode;
101
84
  value: MainContext;
102
85
  }
103
- export {};
@@ -97,7 +97,8 @@ export declare enum Nodes {
97
97
  Node = "Node",
98
98
  Overview = "Overview",
99
99
  MonitoringDashboard = "MonitoringDashboard",
100
- UpgradeCluster = "UpgradeCluster"
100
+ UpgradeCluster = "UpgradeCluster",
101
+ ResourceRecommender = "ResourceRecommender"
101
102
  }
102
103
  export type NodeType = keyof typeof Nodes;
103
104
  export interface Node {