@devtron-labs/devtron-fe-common-lib 1.15.1-beta-1 → 1.15.1-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.
- package/dist/{@code-editor-C_u3nWGd.js → @code-editor-DEi6pfDo.js} +5463 -5534
- package/dist/{@common-rjsf-7Qd6WdWi.js → @common-rjsf-D247IIXC.js} +222 -230
- package/dist/{@framer-motion-Dchiw-Rb.js → @framer-motion-C5Xvz7Lq.js} +1 -1
- package/dist/{@react-dates-D5kydtW-.js → @react-dates-B6q1sdbJ.js} +14 -14
- package/dist/{@react-select-Cmser7OI.js → @react-select-LSvqtVJj.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-DMnFy9PE.js → @react-virtualized-sticky-tree-BpJty95h.js} +1 -1
- package/dist/{@vendor-STJ9h0oI.js → @vendor-DC3JvJ9U.js} +9667 -9657
- 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/ResourceBrowser.Types.d.ts +2 -46
- package/dist/Pages/ResourceBrowser/constants.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 -4
- 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/Helpers.d.ts +1 -2
- package/dist/Shared/Providers/types.d.ts +28 -10
- package/dist/Shared/types.d.ts +1 -2
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-asterisk.ab224e72.svg +3 -0
- package/dist/assets/ic-world-globe.877fa6a0.svg +3 -0
- package/dist/index.js +773 -781
- 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-container.92a4c33a.svg +0 -3
- package/dist/assets/ic-gavel.a3b064b5.svg +0 -3
- package/dist/assets/ic-minus.aac464f7.svg +0 -3
- package/dist/assets/ic-speedometer.3ecaae3b.svg +0 -3
- /package/dist/assets/{ic-container-registry.4e1e6455.svg → ic-container.4e1e6455.svg} +0 -0
@@ -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';
|
@@ -1,7 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { GroupBase } from 'react-select';
|
3
|
-
import { ServerErrors } from '../../Common/ServerError';
|
4
|
-
import { SelectPickerOptionType } from '../../Shared/Components';
|
1
|
+
import { RefObject } from 'react';
|
5
2
|
import { Nodes, NodeType } from '../../Shared/types';
|
6
3
|
export interface GVKType {
|
7
4
|
Group: string;
|
@@ -37,37 +34,14 @@ export interface K8sResourceListPayloadType {
|
|
37
34
|
filter?: string;
|
38
35
|
k8sRequest: ResourceListPayloadK8sRequestType;
|
39
36
|
}
|
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>;
|
53
37
|
export type K8sResourceDetailDataType = {
|
54
38
|
[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
|
-
}>>;
|
64
39
|
};
|
65
40
|
export interface K8sResourceDetailType {
|
66
41
|
headers: string[];
|
67
42
|
data: K8sResourceDetailDataType[];
|
68
43
|
}
|
69
44
|
export interface BulkSelectionActionWidgetProps {
|
70
|
-
isResourceRecommendationView: boolean;
|
71
45
|
count: number;
|
72
46
|
handleOpenBulkDeleteModal: () => void;
|
73
47
|
handleClearBulkSelection: () => void;
|
@@ -75,12 +49,11 @@ export interface BulkSelectionActionWidgetProps {
|
|
75
49
|
handleOpenUncordonNodeModal: () => void;
|
76
50
|
handleOpenDrainNodeModal: () => void;
|
77
51
|
handleOpenRestartWorkloadModal: () => void;
|
78
|
-
handleOpenApplyResourceRecommendationModal: () => void;
|
79
52
|
parentRef: RefObject<HTMLDivElement>;
|
80
53
|
showBulkRestartOption: boolean;
|
81
54
|
showNodeListingOptions: boolean;
|
82
55
|
}
|
83
|
-
export type RBBulkOperationType = 'restart' | 'delete' | 'cordon' | 'uncordon' | 'drain'
|
56
|
+
export type RBBulkOperationType = 'restart' | 'delete' | 'cordon' | 'uncordon' | 'drain';
|
84
57
|
export interface CreateResourceRequestBodyType {
|
85
58
|
appId: string;
|
86
59
|
clusterId: number;
|
@@ -92,7 +65,6 @@ export interface CreateResourceRequestBodyType {
|
|
92
65
|
export interface ResourceManifestDTO {
|
93
66
|
manifestResponse: {
|
94
67
|
manifest: Record<string, unknown>;
|
95
|
-
recommendedManifest?: Record<string, unknown>;
|
96
68
|
};
|
97
69
|
secretViewAccess: boolean;
|
98
70
|
}
|
@@ -136,20 +108,4 @@ export interface NodeActionRequest {
|
|
136
108
|
version: string;
|
137
109
|
kind: string;
|
138
110
|
}
|
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
|
-
}
|
155
111
|
export {};
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { SelectPickerOptionType } from '../../Shared/Components';
|
2
|
-
import { ResourceRecommenderHeaderType } from './ResourceBrowser.Types';
|
3
2
|
import { NodeDrainRequest } from './types';
|
4
3
|
export declare const ALL_NAMESPACE_OPTION: Readonly<Pick<SelectPickerOptionType<string>, 'value' | 'label'>>;
|
5
4
|
export declare const DRAIN_NODE_MODAL_MESSAGING: {
|
@@ -51,7 +50,3 @@ export declare const NODE_DRAIN_OPTIONS_CHECKBOX_CONFIG: {
|
|
51
50
|
infoText: string;
|
52
51
|
label: string;
|
53
52
|
}[];
|
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,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>>;
|
@@ -41,7 +42,6 @@ export declare const iconMap: {
|
|
41
42
|
'ic-cloud-vms': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
42
43
|
'ic-cluster': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
43
44
|
'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>>;
|
@@ -78,7 +78,6 @@ export declare const iconMap: {
|
|
78
78
|
'ic-filter': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
79
79
|
'ic-flask': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
80
80
|
'ic-folder-user': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
81
|
-
'ic-gavel': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
82
81
|
'ic-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
83
82
|
'ic-gift-gradient': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
84
83
|
'ic-gift': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -124,7 +123,6 @@ export declare const iconMap: {
|
|
124
123
|
'ic-memory': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
125
124
|
'ic-microsoft': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
126
125
|
'ic-minikube': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
127
|
-
'ic-minus': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
128
126
|
'ic-missing': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
129
127
|
'ic-mobile': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
130
128
|
'ic-monitoring': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -151,7 +149,6 @@ export declare const iconMap: {
|
|
151
149
|
'ic-sort-descending': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
152
150
|
'ic-sortable': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
153
151
|
'ic-sparkle-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
154
|
-
'ic-speedometer': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
155
152
|
'ic-spinny': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
156
153
|
'ic-spray-can': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
157
154
|
'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -182,8 +179,10 @@ export declare const iconMap: {
|
|
182
179
|
'ic-user-circle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
183
180
|
'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
184
181
|
'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
182
|
+
'ic-view-variable-toggle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
185
183
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
186
184
|
'ic-wifi-slash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
185
|
+
'ic-world-globe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
187
186
|
};
|
188
187
|
export type IconName = keyof typeof iconMap;
|
189
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';
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -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,
|
8
|
+
import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
9
9
|
interface HighlightSearchTextProps {
|
10
10
|
/**
|
11
11
|
* The text to be highlighted
|
@@ -102,5 +102,4 @@ 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">;
|
106
105
|
export {};
|
@@ -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
@@ -97,8 +97,7 @@ export declare enum Nodes {
|
|
97
97
|
Node = "Node",
|
98
98
|
Overview = "Overview",
|
99
99
|
MonitoringDashboard = "MonitoringDashboard",
|
100
|
-
UpgradeCluster = "UpgradeCluster"
|
101
|
-
ResourceRecommender = "ResourceRecommender"
|
100
|
+
UpgradeCluster = "UpgradeCluster"
|
102
101
|
}
|
103
102
|
export type NodeType = keyof typeof Nodes;
|
104
103
|
export interface Node {
|