@devtron-labs/devtron-fe-common-lib 1.15.0-beta-5 → 1.15.0-beta-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{@code-editor-B7lvJw7e.js → @code-editor-Dl9tRpgZ.js} +5686 -5727
- package/dist/{@common-rjsf-CO4Ot-Iz.js → @common-rjsf-JKKuV1A0.js} +222 -230
- package/dist/Common/Dialogs/Types.d.ts +0 -17
- package/dist/Common/Dialogs/index.d.ts +0 -1
- package/dist/Common/RJSF/widgets/Checkbox.d.ts +1 -1
- package/dist/Common/Types.d.ts +1 -43
- package/dist/Common/index.d.ts +0 -2
- package/dist/Pages/ResourceBrowser/types.d.ts +0 -5
- package/dist/Shared/Components/DocLink/types.d.ts +1 -0
- package/dist/Shared/Components/DocLink/utils.d.ts +1 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +3 -5
- package/dist/Shared/Components/Switch/Switch.component.d.ts +1 -1
- package/dist/Shared/Components/Switch/types.d.ts +11 -2
- package/dist/Shared/Components/Switch/utils.d.ts +2 -2
- package/dist/Shared/Components/SwitchThemeDialog/SwitchThemeDialog.component.d.ts +3 -0
- package/dist/Shared/Components/SwitchThemeDialog/index.d.ts +2 -0
- package/dist/Shared/Components/SwitchThemeDialog/types.d.ts +35 -0
- package/dist/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.d.ts +1 -1
- package/dist/Shared/Components/ToggleResolveScopedVariables/types.d.ts +1 -1
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/Providers/types.d.ts +28 -10
- package/dist/Shared/types.d.ts +0 -1
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-asterisk.ab224e72.svg +3 -0
- package/dist/assets/ic-memory.82ba7e9b.svg +3 -0
- package/dist/assets/ic-world-globe.877fa6a0.svg +3 -0
- package/dist/index.js +763 -765
- package/package.json +3 -3
- package/dist/Common/Dialogs/ConfirmationDialog.d.ts +0 -11
- package/dist/Common/InfoColorBar/InfoColourbar.d.ts +0 -6
- package/dist/Common/Toggle/Toggle.d.ts +0 -18
- package/dist/assets/ic-cloud-upload.6f45f51c.svg +0 -3
- package/dist/assets/ic-link-broken.555fa4e1.svg +0 -3
- package/dist/assets/ic-link.52effffd.svg +0 -3
- package/dist/assets/ic-memory.bf999de5.svg +0 -3
- package/dist/assets/ic-minus.aac464f7.svg +0 -3
- package/dist/assets/ic-swap.38b2ac9e.svg +0 -3
@@ -32,23 +32,6 @@ 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
|
-
}
|
52
35
|
export interface DialogFormProps {
|
53
36
|
className: string;
|
54
37
|
title: string;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { WidgetProps } from '@rjsf/utils';
|
2
|
-
export declare const Checkbox: ({ id, onChange, value,
|
2
|
+
export declare const Checkbox: ({ id, onChange, value, disabled, readonly, autofocus, }: WidgetProps) => JSX.Element;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -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,
|
5
|
+
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, 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,48 +162,6 @@ 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
|
-
};
|
207
165
|
export interface ReloadType {
|
208
166
|
reload?: (event?: any) => void;
|
209
167
|
className?: string;
|
package/dist/Common/index.d.ts
CHANGED
@@ -25,7 +25,6 @@ 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';
|
29
28
|
export * from './Markdown';
|
30
29
|
export * from './Modals/Modal';
|
31
30
|
export * from './Modals/VisibleModal';
|
@@ -47,6 +46,5 @@ export { default as Select } from './Select/Select';
|
|
47
46
|
export * from './ServerError';
|
48
47
|
export * from './SortableTableHeaderCell';
|
49
48
|
export * from './TippyCustomized';
|
50
|
-
export { default as Toggle } from './Toggle/Toggle';
|
51
49
|
export * from './Tooltip';
|
52
50
|
export * from './Types';
|
@@ -31,11 +31,6 @@ export interface ResourceDetail {
|
|
31
31
|
usagePercentage: string;
|
32
32
|
requestPercentage: string;
|
33
33
|
limitPercentage: string;
|
34
|
-
prevUsagePercentage?: string | null;
|
35
|
-
threshold?: {
|
36
|
-
operator: 'greaterThan' | 'lessThan' | 'equalTo';
|
37
|
-
value: number;
|
38
|
-
} | null;
|
39
34
|
}
|
40
35
|
export interface NodeTaintType {
|
41
36
|
effect: string;
|
@@ -4,6 +4,7 @@ import { DOCUMENTATION } from './constants';
|
|
4
4
|
export type BaseDocLink<T extends boolean> = {
|
5
5
|
isExternalLink?: T;
|
6
6
|
isEnterprise?: boolean;
|
7
|
+
isLicenseDashboard?: boolean;
|
7
8
|
docLinkKey: T extends true ? string : keyof typeof DOCUMENTATION;
|
8
9
|
};
|
9
10
|
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, }: BaseDocLink<T>) => string;
|
2
|
+
export declare const getDocumentationUrl: <T extends boolean = false>({ docLinkKey, isEnterprise, isExternalLink, isLicenseDashboard, }: BaseDocLink<T>) => string;
|
@@ -12,6 +12,7 @@ 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>>;
|
15
16
|
'ic-ather': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
16
17
|
'ic-azure-aks': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
17
18
|
'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -38,7 +39,6 @@ export declare const iconMap: {
|
|
38
39
|
'ic-clock': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
39
40
|
'ic-close-large': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
40
41
|
'ic-close-small': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
41
|
-
'ic-cloud-upload': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
42
42
|
'ic-cloud-vms': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
43
43
|
'ic-cluster': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
44
44
|
'ic-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -113,8 +113,6 @@ export declare const iconMap: {
|
|
113
113
|
'ic-lego': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
114
114
|
'ic-lightning-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
115
115
|
'ic-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
116
|
-
'ic-link-broken': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
117
|
-
'ic-link': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
118
116
|
'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
119
117
|
'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
120
118
|
'ic-magnifying-glass': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -125,7 +123,6 @@ export declare const iconMap: {
|
|
125
123
|
'ic-memory': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
126
124
|
'ic-microsoft': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
127
125
|
'ic-minikube': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
128
|
-
'ic-minus': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
129
126
|
'ic-missing': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
130
127
|
'ic-mobile': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
131
128
|
'ic-monitoring': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -167,7 +164,6 @@ export declare const iconMap: {
|
|
167
164
|
'ic-success': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
168
165
|
'ic-sun': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
169
166
|
'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
170
|
-
'ic-swap': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
171
167
|
'ic-tata1mg': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
172
168
|
'ic-terminal-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
173
169
|
'ic-terminal': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -183,8 +179,10 @@ export declare const iconMap: {
|
|
183
179
|
'ic-user-circle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
184
180
|
'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
185
181
|
'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
182
|
+
'ic-view-variable-toggle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
186
183
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
187
184
|
'ic-wifi-slash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
185
|
+
'ic-world-globe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
188
186
|
};
|
189
187
|
export type IconName = keyof typeof iconMap;
|
190
188
|
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, onChange, }: DTSwitchProps) => JSX.Element;
|
2
|
+
declare const Switch: ({ ariaLabel, isDisabled, isLoading, isChecked, tooltipContent, shape, variant, iconColor, iconName, indeterminate, size, name, dataTestId, onChange, autoFocus, }: DTSwitchProps) => JSX.Element;
|
3
3
|
export default Switch;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
2
2
|
import { ComponentSizeType } from '../../constants';
|
3
3
|
import { IconBaseColorType } from '../../types';
|
4
4
|
import { IconName } from '../Icon';
|
@@ -64,6 +64,10 @@ 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;
|
67
71
|
/**
|
68
72
|
* The visual variant of the switch.
|
69
73
|
*
|
@@ -97,6 +101,11 @@ export type DTSwitchProps = {
|
|
97
101
|
*
|
98
102
|
* @default undefined
|
99
103
|
*/
|
100
|
-
tooltipContent?:
|
104
|
+
tooltipContent?: ReactNode;
|
105
|
+
/**
|
106
|
+
* Indicates whether the switch should be focused automatically when rendered.
|
107
|
+
* @default false
|
108
|
+
*/
|
109
|
+
autoFocus?: boolean;
|
101
110
|
} & SwitchShapeProps;
|
102
111
|
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, }: Required<Pick<DTSwitchProps, "shape" | "variant" | "isChecked">>) => (typeof ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP)[DTSwitchProps["variant"]];
|
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";
|
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: ({
|
11
|
+
export declare const getThumbPosition: ({ isChecked, size, shape, indeterminate, isLoading, }: Required<Pick<DTSwitchProps, "isChecked" | "size" | "shape" | "indeterminate" | "isLoading">>) => number;
|
12
12
|
export declare const getThumbPadding: ({ shape, isLoading }: Pick<DTSwitchProps, "shape" | "isLoading">) => string;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { AppThemeType, useTheme } from '../../Providers';
|
2
|
+
type ThemePreferenceType = ReturnType<typeof useTheme>['themePreference'];
|
3
|
+
export type SwitchThemeDialogProps = {
|
4
|
+
/**
|
5
|
+
* @description The initial theme preference of the user fetched from api, in case of error would be null
|
6
|
+
*/
|
7
|
+
initialThemePreference: ThemePreferenceType;
|
8
|
+
handleUpdateUserThemePreference: (themePreference: ThemePreferenceType) => void;
|
9
|
+
handleClose: () => void;
|
10
|
+
} & ({
|
11
|
+
/**
|
12
|
+
* @default false
|
13
|
+
* @description Required for storybook
|
14
|
+
*/
|
15
|
+
disableAPICalls?: false;
|
16
|
+
} | {
|
17
|
+
currentUserPreferences?: never;
|
18
|
+
disableAPICalls: true;
|
19
|
+
});
|
20
|
+
export interface ThemePreferenceOptionProps {
|
21
|
+
selectedThemePreference: SwitchThemeDialogProps['initialThemePreference'];
|
22
|
+
value: SwitchThemeDialogProps['initialThemePreference'];
|
23
|
+
handleChangedThemePreference: (themePreference: SwitchThemeDialogProps['initialThemePreference']) => void;
|
24
|
+
}
|
25
|
+
export interface ThemePreferenceLabelFigureProps extends Pick<ThemePreferenceOptionProps, 'value'> {
|
26
|
+
isSelected: boolean;
|
27
|
+
}
|
28
|
+
export interface BaseLabelFigureProps extends Pick<ThemePreferenceLabelFigureProps, 'isSelected'> {
|
29
|
+
value: AppThemeType;
|
30
|
+
/**
|
31
|
+
* @default false
|
32
|
+
*/
|
33
|
+
noLeftRadius?: boolean;
|
34
|
+
}
|
35
|
+
export {};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { ToggleResolveScopedVariablesProps } from './types';
|
2
|
-
declare const ToggleResolveScopedVariables: ({ resolveScopedVariables, handleToggleScopedVariablesView, isDisabled, showTooltip,
|
2
|
+
declare const ToggleResolveScopedVariables: ({ name, resolveScopedVariables, handleToggleScopedVariablesView, isDisabled, showTooltip, }: ToggleResolveScopedVariablesProps) => JSX.Element;
|
3
3
|
export default ToggleResolveScopedVariables;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export interface ToggleResolveScopedVariablesProps {
|
2
|
+
name: string;
|
2
3
|
resolveScopedVariables: boolean;
|
3
4
|
handleToggleScopedVariablesView: () => void;
|
4
5
|
isDisabled?: boolean;
|
@@ -6,5 +7,4 @@ export interface ToggleResolveScopedVariablesProps {
|
|
6
7
|
* @default true
|
7
8
|
*/
|
8
9
|
showTooltip?: boolean;
|
9
|
-
throttleOnChange?: boolean;
|
10
10
|
}
|
@@ -73,6 +73,7 @@ export * from './ShowMoreText';
|
|
73
73
|
export * from './SSOProviderIcon';
|
74
74
|
export * from './StatusComponent';
|
75
75
|
export * from './Switch';
|
76
|
+
export * from './SwitchThemeDialog';
|
76
77
|
export * from './TabGroup';
|
77
78
|
export * from './Table';
|
78
79
|
export * from './TagsKeyValueTable';
|
@@ -19,12 +19,10 @@ export interface SidePanelConfig {
|
|
19
19
|
/** URL to documentation that should be displayed in the panel */
|
20
20
|
docLink: string | null;
|
21
21
|
}
|
22
|
-
|
23
|
-
serverMode: SERVER_MODE;
|
22
|
+
type CommonMainContextProps = {
|
24
23
|
setServerMode: (serverMode: SERVER_MODE) => void;
|
25
24
|
isHelpGettingStartedClicked: boolean;
|
26
25
|
showCloseButtonAfterGettingStartedClicked: () => void;
|
27
|
-
loginCount: number;
|
28
26
|
setLoginCount: (loginCount: number) => void;
|
29
27
|
showGettingStartedCard: boolean;
|
30
28
|
setShowGettingStartedCard: (showGettingStartedCard: boolean) => void;
|
@@ -32,9 +30,8 @@ export interface MainContext {
|
|
32
30
|
setGettingStartedClicked: (isGettingStartedClicked: boolean) => void;
|
33
31
|
moduleInInstallingState: string;
|
34
32
|
setModuleInInstallingState: (moduleInInstallingState: string) => void;
|
35
|
-
installedModuleMap: MutableRefObject<Record<string, boolean>>;
|
36
33
|
currentServerInfo: {
|
37
|
-
serverInfo: ServerInfo;
|
34
|
+
serverInfo: ServerInfo | null;
|
38
35
|
fetchingServerInfo: boolean;
|
39
36
|
};
|
40
37
|
isAirgapped: boolean;
|
@@ -57,17 +54,23 @@ export interface MainContext {
|
|
57
54
|
canOnlyViewPermittedEnvOrgLevel: boolean;
|
58
55
|
viewIsPipelineRBACConfiguredNode: ReactNode;
|
59
56
|
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>>;
|
60
67
|
/**
|
61
68
|
* Data is set only if showLicenseData is received as true
|
62
69
|
*/
|
63
70
|
licenseData: DevtronLicenseInfo;
|
64
|
-
setLicenseData: Dispatch<SetStateAction<DevtronLicenseInfo>>;
|
65
|
-
canFetchHelmAppStatus: boolean;
|
66
71
|
reloadVersionConfig: ReloadVersionConfigTypes;
|
67
72
|
intelligenceConfig: IntelligenceConfig;
|
68
|
-
setIntelligenceConfig: Dispatch<SetStateAction<IntelligenceConfig>>;
|
69
73
|
sidePanelConfig: SidePanelConfig;
|
70
|
-
setSidePanelConfig: Dispatch<SetStateAction<SidePanelConfig>>;
|
71
74
|
/**
|
72
75
|
* Indicates whether the current Devtron instance is running as an Enterprise edition. \
|
73
76
|
* This flag is determined based on server-side configuration.
|
@@ -78,8 +81,23 @@ export interface MainContext {
|
|
78
81
|
* Used to conditionally render or enable features that depend on fe-lib
|
79
82
|
*/
|
80
83
|
isFELibAvailable: boolean;
|
81
|
-
}
|
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
|
+
});
|
82
99
|
export interface MainContextProviderProps {
|
83
100
|
children: ReactNode;
|
84
101
|
value: MainContext;
|
85
102
|
}
|
103
|
+
export {};
|
package/dist/Shared/types.d.ts
CHANGED