@devtron-labs/devtron-fe-common-lib 1.5.0 → 1.5.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-BhKgnbkm.js → @code-editor-B0vme9Gy.js} +8159 -6869
- package/dist/{@common-rjsf-DIkXvOXb.js → @common-rjsf-D8vkvmqW.js} +102 -90
- package/dist/{@framer-motion-CdgdF0KV.js → @framer-motion-CtC3e2uC.js} +1 -1
- package/dist/{@react-dates-CtQV2TLr.js → @react-dates-BlBjJ115.js} +31 -31
- package/dist/{@react-select-Cn3OpC9h.js → @react-select-CjYy5-X-.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-CVJYfMx0.js → @react-virtualized-sticky-tree-DCAYOwGQ.js} +1 -1
- package/dist/{@vendor-CwAQS8iU.js → @vendor-CB7cq1II.js} +10317 -9365
- package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +7 -7
- package/dist/Common/CodeEditor/types.d.ts +9 -10
- package/dist/Common/CodeEditor/utils.d.ts +3 -0
- package/dist/Common/Constants.d.ts +6 -0
- package/dist/Common/MultiSelectCustomization.d.ts +2 -0
- package/dist/Common/RJSF/utils.d.ts +3 -0
- package/dist/Common/SegmentedControl/SegmentedControl.component.d.ts +1 -1
- package/dist/Common/SegmentedControl/constants.d.ts +2 -0
- package/dist/Common/SegmentedControl/types.d.ts +7 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraUtilityContext.d.ts +3 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +7 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/index.d.ts +1 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +2 -0
- package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +120 -51
- package/dist/Pages/GlobalConfigurations/BuildInfra/utils.d.ts +5 -2
- package/dist/Pages/GlobalConfigurations/BuildInfra/validations.d.ts +11 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/constants.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/types.d.ts +0 -2
- package/dist/Shared/Components/CMCS/ConfigMapSecretReadyOnly.d.ts +3 -0
- package/dist/Shared/Components/CMCS/constants.d.ts +23 -0
- package/dist/Shared/Components/CMCS/helpers.d.ts +1 -0
- package/dist/Shared/Components/CMCS/index.d.ts +6 -0
- package/dist/Shared/Components/CMCS/types.d.ts +24 -0
- package/dist/Shared/Components/CMCS/utils.d.ts +17 -0
- package/dist/Shared/Components/CMCS/validations.d.ts +3 -0
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +5 -0
- package/dist/Shared/Components/ConfirmationModal/types.d.ts +4 -0
- package/dist/Shared/Components/FloatingVariablesSuggestions/FloatingVariablesSuggestions.d.ts +4 -0
- package/dist/Shared/Components/FloatingVariablesSuggestions/SuggestionItem.d.ts +3 -0
- package/dist/Shared/Components/FloatingVariablesSuggestions/Suggestions.d.ts +3 -0
- package/dist/Shared/Components/FloatingVariablesSuggestions/SuggestionsInfo.d.ts +2 -0
- package/dist/Shared/Components/FloatingVariablesSuggestions/constants.d.ts +7 -0
- package/dist/Shared/Components/FloatingVariablesSuggestions/index.d.ts +1 -0
- package/dist/Shared/Components/FloatingVariablesSuggestions/service.d.ts +2 -0
- package/dist/Shared/Components/FloatingVariablesSuggestions/types.d.ts +39 -0
- package/dist/Shared/Components/Plugin/PluginTagSelect.d.ts +1 -1
- package/dist/Shared/Components/Plugin/types.d.ts +2 -2
- package/dist/Shared/Components/Plugin/utils.d.ts +0 -16
- package/dist/Shared/Components/ReactSelect/constants.d.ts +1 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +6 -0
- package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +8 -8
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/ThemeSwitcher/ThemeSwitcher.component.d.ts +3 -0
- package/dist/Shared/Components/ThemeSwitcher/constants.d.ts +6 -0
- package/dist/Shared/Components/ThemeSwitcher/index.d.ts +1 -0
- package/dist/Shared/Components/ThemeSwitcher/types.d.ts +3 -0
- package/dist/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.d.ts +3 -0
- package/dist/Shared/Components/ToggleResolveScopedVariables/index.d.ts +1 -0
- package/dist/Shared/Components/ToggleResolveScopedVariables/types.d.ts +10 -0
- package/dist/Shared/Components/UnsavedChanges/UnsavedChanges.component.d.ts +2 -0
- package/dist/Shared/Components/UnsavedChanges/index.d.ts +1 -0
- package/dist/Shared/Components/UnsavedChangesDialog/UnsavedChangesDialog.component.d.ts +3 -0
- package/dist/Shared/Components/UnsavedChangesDialog/index.d.ts +1 -0
- package/dist/Shared/Components/UnsavedChangesDialog/types.d.ts +5 -0
- package/dist/Shared/Components/index.d.ts +5 -0
- package/dist/Shared/Hooks/useForm/useForm.d.ts +7 -2
- package/dist/Shared/Providers/ThemeProvider/ThemeProvider.d.ts +3 -0
- package/dist/Shared/Providers/ThemeProvider/constants.d.ts +2 -0
- package/dist/Shared/Providers/ThemeProvider/index.d.ts +2 -0
- package/dist/Shared/Providers/ThemeProvider/types.d.ts +33 -0
- package/dist/Shared/Providers/ThemeProvider/utils.d.ts +4 -0
- package/dist/Shared/Providers/index.d.ts +1 -0
- package/dist/Shared/Services/app.types.d.ts +72 -1
- package/dist/Shared/Services/index.d.ts +1 -0
- package/dist/Shared/validations.d.ts +4 -0
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-laptop.485e21b4.svg +3 -0
- package/dist/assets/ic-moon.17d37c40.svg +3 -0
- package/dist/assets/{ic-nav-rocket.9e50bb61.svg → ic-nav-rocket.433c9706.svg} +1 -1
- package/dist/assets/{ic-rotate-devtron.200e165b.svg → ic-rotate-devtron.5a8363d8.svg} +87 -86
- package/dist/assets/ic-sun.33e8214b.svg +3 -0
- package/dist/assets/ic-view-variable-toggle.93c3599f.svg +19 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +723 -688
- package/package.json +3 -3
- package/dist/assets/ic-view-variable-toggle.c335dfa0.svg +0 -24
@@ -0,0 +1,24 @@
|
|
1
|
+
import { OverrideMergeStrategyType } from '../../../Pages/index';
|
2
|
+
import { CM_SECRET_STATE, CMSecretComponentType, CMSecretConfigData } from '../../Services';
|
3
|
+
import { SelectPickerOptionType } from '../SelectPicker';
|
4
|
+
export interface ConfigMapSecretReadyOnlyProps {
|
5
|
+
configMapSecretData: CMSecretConfigData;
|
6
|
+
componentType: CMSecretComponentType;
|
7
|
+
cmSecretStateLabel: CM_SECRET_STATE;
|
8
|
+
isJob: boolean;
|
9
|
+
areScopeVariablesResolving: boolean;
|
10
|
+
fallbackMergeStrategy: OverrideMergeStrategyType;
|
11
|
+
hideCodeEditor?: boolean;
|
12
|
+
containerClassName?: string;
|
13
|
+
/**
|
14
|
+
* @default false
|
15
|
+
*/
|
16
|
+
displayKeys?: boolean;
|
17
|
+
/**
|
18
|
+
* @default false
|
19
|
+
*/
|
20
|
+
isBorderLess?: boolean;
|
21
|
+
}
|
22
|
+
export interface GetConfigMapSecretReadOnlyValuesParamsType extends Pick<ConfigMapSecretReadyOnlyProps, 'componentType' | 'configMapSecretData' | 'cmSecretStateLabel' | 'isJob' | 'fallbackMergeStrategy' | 'displayKeys'> {
|
23
|
+
}
|
24
|
+
export type ConfigMapSecretDataTypeOptionType = SelectPickerOptionType<string>;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { GroupBase, OptionsOrGroups } from 'react-select';
|
2
|
+
import { CMSecretPayloadType, CMSecretYamlData, ConfigMapSecretUseFormProps, ESOSecretData, GetConfigMapSecretFormInitialValuesParamsType } from '../../Services';
|
3
|
+
import { ConfigMapSecretDataTypeOptionType, GetConfigMapSecretReadOnlyValuesParamsType } from './types';
|
4
|
+
export declare const getSecretDataTypeOptions: (isJob: boolean, isHashiOrAWS: boolean) => ConfigMapSecretDataTypeOptionType[] | OptionsOrGroups<ConfigMapSecretDataTypeOptionType, GroupBase<ConfigMapSecretDataTypeOptionType>>;
|
5
|
+
export declare const convertKeyValuePairToYAML: (currentData: CMSecretYamlData[]) => string;
|
6
|
+
export declare const getConfigMapSecretFormInitialValues: ({ isJob, configMapSecretData, cmSecretStateLabel, componentType, skipValidation, fallbackMergeStrategy, }: GetConfigMapSecretFormInitialValuesParamsType) => ConfigMapSecretUseFormProps;
|
7
|
+
export declare const getConfigMapSecretReadOnlyValues: ({ configMapSecretData, cmSecretStateLabel, componentType, isJob, fallbackMergeStrategy, displayKeys, }: GetConfigMapSecretReadOnlyValuesParamsType) => {
|
8
|
+
configData: {
|
9
|
+
displayName: string;
|
10
|
+
value: any;
|
11
|
+
key: string;
|
12
|
+
}[];
|
13
|
+
data: string;
|
14
|
+
};
|
15
|
+
export declare const convertYAMLToKeyValuePair: (yaml: string) => CMSecretYamlData[];
|
16
|
+
export declare const getESOSecretDataFromYAML: (yaml: string) => ESOSecretData;
|
17
|
+
export declare const getConfigMapSecretPayload: ({ isSecret, external, externalType, externalSubpathValues, yaml, yamlMode, currentData, esoSecretYaml, filePermission, name, selectedType, isFilePermissionChecked, roleARN, volumeMountPath, isSubPathChecked, mergeStrategy, }: ConfigMapSecretUseFormProps) => CMSecretPayloadType;
|
@@ -37,6 +37,11 @@ export type CollapsibleListItem<TabType extends TabOptions = 'navLink'> = Condit
|
|
37
37
|
* If true, the title will be rendered with line-through.
|
38
38
|
*/
|
39
39
|
strikeThrough?: boolean;
|
40
|
+
/**
|
41
|
+
* To be used as key for the list item.
|
42
|
+
* If not given title will be used as key.
|
43
|
+
*/
|
44
|
+
id?: string | number;
|
40
45
|
/**
|
41
46
|
* Configuration for the icon.
|
42
47
|
*/
|
@@ -45,6 +45,10 @@ type ButtonConfigAndVariantType<isConfig extends boolean> = {
|
|
45
45
|
export type ConfirmationModalProps<isConfig extends boolean = false> = {
|
46
46
|
title: string;
|
47
47
|
subtitle: ReactNode;
|
48
|
+
/**
|
49
|
+
* @default true
|
50
|
+
*/
|
51
|
+
shouldCloseOnEscape?: boolean;
|
48
52
|
} & ButtonConfigAndVariantType<isConfig> & CustomInputConfigOrChildrenType & (isConfig extends false ? {
|
49
53
|
handleClose: (e?: SyntheticEvent) => void;
|
50
54
|
showConfirmationModal: boolean;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
import { FloatingVariablesSuggestionsProps } from './types';
|
3
|
+
declare const _default: React.MemoExoticComponent<({ zIndex, appId, envId, clusterId, bounds, hideObjectVariables, showValueOnHover, }: FloatingVariablesSuggestionsProps) => JSX.Element>;
|
4
|
+
export default _default;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare const SUGGESTIONS_SIZE: {
|
2
|
+
width: number;
|
3
|
+
height: number;
|
4
|
+
};
|
5
|
+
export declare const NO_DEFINED_DESCRIPTION = "No Defined Description";
|
6
|
+
export declare const NO_DEFINED_VALUE = "No Defined Value";
|
7
|
+
export declare const SUGGESTIONS_INFO_TITLE = "What is scoped variable?";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as FloatingVariablesSuggestions } from './FloatingVariablesSuggestions';
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import { FloatingVariablesSuggestionsProps, ScopedVariableType } from './types';
|
2
|
+
export declare const getScopedVariables: (appId: FloatingVariablesSuggestionsProps["appId"], envId: FloatingVariablesSuggestionsProps["envId"], clusterId: FloatingVariablesSuggestionsProps["clusterId"], hideObjectVariables?: boolean) => Promise<ScopedVariableType[]>;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { DraggableBounds } from 'react-draggable';
|
2
|
+
export interface ScopedVariableType {
|
3
|
+
variableName: string;
|
4
|
+
shortDescription: string | null;
|
5
|
+
variableValue?: {
|
6
|
+
value: string | number | boolean | Record<string | number, unknown>;
|
7
|
+
} | null;
|
8
|
+
isRedacted: boolean;
|
9
|
+
}
|
10
|
+
export interface FloatingVariablesSuggestionsProps {
|
11
|
+
zIndex: number;
|
12
|
+
appId?: string;
|
13
|
+
envId?: string;
|
14
|
+
clusterId?: string;
|
15
|
+
bounds?: DraggableBounds | string | false;
|
16
|
+
/**
|
17
|
+
* This will hide the variables with object/array values if set to true
|
18
|
+
* @default true
|
19
|
+
*/
|
20
|
+
hideObjectVariables?: boolean;
|
21
|
+
/**
|
22
|
+
* @default true
|
23
|
+
*/
|
24
|
+
showValueOnHover?: boolean;
|
25
|
+
}
|
26
|
+
export interface SuggestionsProps extends Required<Pick<FloatingVariablesSuggestionsProps, 'showValueOnHover'>> {
|
27
|
+
handleDeActivation: (e: React.MouseEvent<HTMLOrSVGElement>) => void;
|
28
|
+
loading: boolean;
|
29
|
+
variables: ScopedVariableType[];
|
30
|
+
reloadVariables: () => void;
|
31
|
+
error: boolean;
|
32
|
+
}
|
33
|
+
export interface SuggestionsItemProps extends Pick<SuggestionsProps, 'showValueOnHover'> {
|
34
|
+
variableName: string;
|
35
|
+
description: string;
|
36
|
+
variableValue: Required<ScopedVariableType['variableValue']['value']>;
|
37
|
+
isRedacted: boolean;
|
38
|
+
highlightText: string;
|
39
|
+
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { PluginTagSelectProps } from './types';
|
2
|
-
declare const PluginTagSelect: ({ availableTags, handleUpdateSelectedTags, selectedTags, isLoading,
|
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
|
-
|
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
|
*/
|
@@ -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: "
|
22
|
+
readonly color: "var(--R700)";
|
23
23
|
};
|
24
24
|
readonly high: {
|
25
25
|
readonly label: "High";
|
26
|
-
readonly color: "
|
26
|
+
readonly color: "var(--R500)";
|
27
27
|
};
|
28
28
|
readonly medium: {
|
29
29
|
readonly label: "Medium";
|
30
|
-
readonly color: "
|
30
|
+
readonly color: "var(--O500)";
|
31
31
|
};
|
32
32
|
readonly low: {
|
33
33
|
readonly label: "Low";
|
34
|
-
readonly color: "
|
34
|
+
readonly color: "var(--Y500)";
|
35
35
|
};
|
36
36
|
readonly unknown: {
|
37
37
|
readonly label: "Unknown";
|
38
|
-
readonly color: "
|
38
|
+
readonly color: "var(--N300)";
|
39
39
|
};
|
40
40
|
readonly fail: {
|
41
41
|
readonly label: "Failures";
|
42
|
-
readonly color: "
|
42
|
+
readonly color: "var(--R500)";
|
43
43
|
};
|
44
44
|
readonly success: {
|
45
45
|
readonly label: "Successes";
|
46
|
-
readonly color: "
|
46
|
+
readonly color: "var(--G500)";
|
47
47
|
};
|
48
48
|
readonly exceptions: {
|
49
49
|
readonly label: "Exceptions";
|
50
|
-
readonly color: "
|
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: "
|
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
|
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 @@
|
|
1
|
+
export { default as ThemeSwitcher } from './ThemeSwitcher.component';
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { ToggleResolveScopedVariablesProps } from './types';
|
2
|
+
declare const ToggleResolveScopedVariables: ({ resolveScopedVariables, handleToggleScopedVariablesView, isDisabled, showTooltip, throttleOnChange, }: ToggleResolveScopedVariablesProps) => JSX.Element;
|
3
|
+
export default ToggleResolveScopedVariables;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as ToggleResolveScopedVariables } from './ToggleResolveScopedVariables.component';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as UnsavedChanges } from './UnsavedChanges.component';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as UnsavedChangesDialog } from './UnsavedChangesDialog.component';
|
@@ -49,5 +49,10 @@ export * from './DynamicDataTable';
|
|
49
49
|
export * from './TagsKeyValueTable';
|
50
50
|
export * from './FileUpload';
|
51
51
|
export * from './AnimatedDeployButton';
|
52
|
+
export * from './CMCS';
|
53
|
+
export * from './FloatingVariablesSuggestions';
|
54
|
+
export * from './ToggleResolveScopedVariables';
|
52
55
|
export * from './BulkOperations';
|
53
56
|
export * from './VirtualizedList';
|
57
|
+
export * from './UnsavedChanges';
|
58
|
+
export * from './UnsavedChangesDialog';
|
@@ -14,9 +14,13 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
|
|
14
14
|
/** Defines when validation should occur:
|
15
15
|
* - 'onChange': Validation occurs when the user modifies the input
|
16
16
|
* - 'onBlur': Validation occurs when the input loses focus.
|
17
|
-
* @default 'onChange'
|
17
|
+
* @default ['onChange']
|
18
18
|
*/
|
19
|
-
validationMode?: "onChange" | "onBlur" | "onSubmit";
|
19
|
+
validationMode?: "onChange" | "onBlur" | "onSubmit" | "all";
|
20
|
+
/**
|
21
|
+
* @default false - A boolean indicating whether to trigger validation on mount.
|
22
|
+
*/
|
23
|
+
shouldValidateOnMount?: boolean;
|
20
24
|
}) => {
|
21
25
|
/** The current form data. */
|
22
26
|
data: T;
|
@@ -75,4 +79,5 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
|
|
75
79
|
/** A boolean indicating if any field has been modified. */
|
76
80
|
isDirty: boolean;
|
77
81
|
};
|
82
|
+
getErrorsFromFormData: (formData: T) => Partial<Record<keyof T, string[]>>;
|
78
83
|
};
|
@@ -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;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { OverrideMergeStrategyType } from '../../Pages/Applications';
|
2
|
-
import { ReleaseTag, UserApprovalMetadataType } from '../../Common';
|
2
|
+
import { ReleaseTag, UserApprovalMetadataType, ResponseType } from '../../Common';
|
3
3
|
interface WebhookDataType {
|
4
4
|
id: number;
|
5
5
|
eventActionType: string;
|
@@ -184,6 +184,33 @@ export interface ConfigMapSecretDataType {
|
|
184
184
|
configData: ConfigMapSecretDataConfigDatumDTO[];
|
185
185
|
isDeletable: boolean;
|
186
186
|
}
|
187
|
+
export interface CMSecretYamlData {
|
188
|
+
k: string;
|
189
|
+
v: string;
|
190
|
+
id: string | number;
|
191
|
+
}
|
192
|
+
export interface ConfigMapSecretUseFormProps {
|
193
|
+
name: string;
|
194
|
+
isSecret: boolean;
|
195
|
+
external: boolean;
|
196
|
+
externalType: CMSecretExternalType;
|
197
|
+
selectedType: string;
|
198
|
+
isFilePermissionChecked: boolean;
|
199
|
+
isSubPathChecked: boolean;
|
200
|
+
externalSubpathValues: string;
|
201
|
+
filePermission: string;
|
202
|
+
volumeMountPath: string;
|
203
|
+
roleARN: string;
|
204
|
+
yamlMode: boolean;
|
205
|
+
yaml: string;
|
206
|
+
currentData: CMSecretYamlData[];
|
207
|
+
secretDataYaml: string;
|
208
|
+
esoSecretYaml: string;
|
209
|
+
hasCurrentDataErr: boolean;
|
210
|
+
isResolvedData: boolean;
|
211
|
+
mergeStrategy: OverrideMergeStrategyType;
|
212
|
+
skipValidation: boolean;
|
213
|
+
}
|
187
214
|
export declare enum ConfigResourceType {
|
188
215
|
ConfigMap = "ConfigMap",
|
189
216
|
Secret = "Secret",
|
@@ -207,6 +234,7 @@ export interface ConfigMapSecretDataDTO {
|
|
207
234
|
variableSnapshot: Record<string, Record<string, string>>;
|
208
235
|
resolvedValue: string;
|
209
236
|
}
|
237
|
+
export type JobCMSecretDataDTO = ResponseType<Omit<ConfigMapSecretDataDTO['data'], 'isDeletable'>>;
|
210
238
|
export interface PipelineConfigDataDTO {
|
211
239
|
resourceType: ConfigResourceType.PipelineStrategy;
|
212
240
|
data: Record<string, any>;
|
@@ -263,4 +291,47 @@ export declare enum EnvResourceType {
|
|
263
291
|
Manifest = "manifest",
|
264
292
|
PipelineStrategy = "pipeline-strategy"
|
265
293
|
}
|
294
|
+
export declare enum CMSecretComponentType {
|
295
|
+
ConfigMap = 1,
|
296
|
+
Secret = 2
|
297
|
+
}
|
298
|
+
export declare enum CM_SECRET_STATE {
|
299
|
+
BASE = "",
|
300
|
+
INHERITED = "INHERITING",
|
301
|
+
OVERRIDDEN = "OVERRIDDEN",
|
302
|
+
ENV = "ENV",
|
303
|
+
UNPUBLISHED = "UNPUBLISHED"
|
304
|
+
}
|
305
|
+
export interface CMSecretConfigData extends ConfigDatum {
|
306
|
+
unAuthorized: boolean;
|
307
|
+
}
|
308
|
+
export interface ProcessCMCSCurrentDataParamsType {
|
309
|
+
configMapSecretData: CMSecretConfigData;
|
310
|
+
cmSecretStateLabel: CM_SECRET_STATE;
|
311
|
+
isSecret: boolean;
|
312
|
+
}
|
313
|
+
export interface GetConfigMapSecretFormInitialValuesParamsType {
|
314
|
+
cmSecretStateLabel: CM_SECRET_STATE;
|
315
|
+
configMapSecretData: CMSecretConfigData;
|
316
|
+
fallbackMergeStrategy: OverrideMergeStrategyType;
|
317
|
+
/**
|
318
|
+
* Leveraging the same in build infra as well
|
319
|
+
*/
|
320
|
+
isJob?: boolean;
|
321
|
+
componentType?: CMSecretComponentType;
|
322
|
+
skipValidation?: boolean;
|
323
|
+
}
|
324
|
+
export interface ESOSecretData {
|
325
|
+
secretStore: Record<string, any>;
|
326
|
+
secretStoreRef: Record<string, any>;
|
327
|
+
refreshInterval: string;
|
328
|
+
esoData: Record<string, any>[];
|
329
|
+
esoDataFrom: Record<string, any>[];
|
330
|
+
template: Record<string, any>;
|
331
|
+
}
|
332
|
+
export declare enum CODE_EDITOR_RADIO_STATE {
|
333
|
+
DATA = "data",
|
334
|
+
SAMPLE = "sample"
|
335
|
+
}
|
336
|
+
export type CMSecretPayloadType = Pick<CMSecretConfigData, 'data' | 'name' | 'type' | 'externalType' | 'external' | 'roleARN' | 'mountPath' | 'subPath' | 'esoSecretData' | 'filePermission' | 'esoSubPath' | 'mergeStrategy'>;
|
266
337
|
export {};
|
@@ -51,3 +51,7 @@ export declare const validateDisplayName: (name: string) => ValidationResponseTy
|
|
51
51
|
export declare const validateJSON: (json: string) => ValidationResponseType;
|
52
52
|
export declare const validateDateAndTime: (date: Date) => ValidationResponseType;
|
53
53
|
export declare const validateIframe: (input: string) => ValidationResponseType;
|
54
|
+
export declare const validateCMVolumeMountPath: (value: string) => {
|
55
|
+
isValid: boolean;
|
56
|
+
message: string;
|
57
|
+
};
|