@devtron-labs/devtron-fe-common-lib 0.5.1 → 0.5.2-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.
- package/dist/Common/Constants.d.ts +3 -0
- package/dist/Common/Helper.d.ts +1 -0
- package/dist/Common/Toggle/Toggle.d.ts +2 -1
- package/dist/Common/Types.d.ts +2 -6
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/DTApplicationMetricsFormField.d.ts +3 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/constants.d.ts +2 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/index.d.ts +4 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/service.d.ts +4 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +171 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/OverrideStrategyTippyContent.d.ts +2 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/constants.d.ts +5 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/index.d.ts +5 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/types.d.ts +27 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +2 -0
- package/dist/Pages/{CDPipeline → Applications/DevtronApps/Details/CDPipeline}/types.d.ts +4 -4
- package/dist/Pages/{App → Applications/DevtronApps/Details}/index.d.ts +1 -0
- package/dist/Pages/Applications/DevtronApps/index.d.ts +1 -0
- package/dist/Pages/Applications/index.d.ts +1 -0
- package/dist/Pages/index.d.ts +1 -2
- package/dist/Shared/Components/Button/Button.component.d.ts +1 -1
- package/dist/Shared/Components/Button/types.d.ts +6 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiff.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiffCompare.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/{DeploymentHistoryDiff → DeploymentHistoryConfigDiff}/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.d.ts +6 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/index.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/types.d.ts +36 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +22 -0
- package/dist/Shared/Components/CICDHistory/TriggerOutput.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/index.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +7 -5
- package/dist/Shared/Components/Collapse/Collapse.d.ts +6 -1
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +4 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.constants.d.ts +6 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +32 -11
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +3 -2
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +1 -0
- package/dist/Shared/Components/InvalidYAMLTippy/InvalidYAMLTippyWrapper.d.ts +3 -0
- package/dist/Shared/Components/InvalidYAMLTippy/constants.d.ts +1 -0
- package/dist/Shared/Components/InvalidYAMLTippy/index.d.ts +2 -0
- package/dist/Shared/Components/InvalidYAMLTippy/types.d.ts +6 -0
- package/dist/Shared/Components/InvalidYAMLTippy/utils.d.ts +2 -0
- package/dist/Shared/Components/SelectPicker/constants.d.ts +5 -0
- package/dist/Shared/Components/SelectPicker/type.d.ts +8 -3
- package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +9 -1
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/Helpers.d.ts +13 -0
- package/dist/Shared/Hooks/useForm/useForm.d.ts +29 -26
- package/dist/Shared/Hooks/useForm/useForm.types.d.ts +15 -8
- package/dist/Shared/Hooks/useForm/useForm.utils.d.ts +1 -1
- package/dist/Shared/Services/app.service.d.ts +4 -1
- package/dist/Shared/Services/app.types.d.ts +66 -29
- package/dist/Shared/constants.d.ts +3 -1
- package/dist/Shared/types.d.ts +12 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-CUNEXhu5.js → cssMode-C1J_MgKp.js} +1 -1
- package/dist/{freemarker2-DV7POtuF.js → freemarker2-DT_J_FKd.js} +1 -1
- package/dist/{handlebars-CNDtQMEk.js → handlebars-wAgu6jG3.js} +1 -1
- package/dist/{html-J67-LThI.js → html-CKH2Ofr8.js} +1 -1
- package/dist/{htmlMode-C08l0cVM.js → htmlMode-DR1Hd1NY.js} +1 -1
- package/dist/{index-C4yFLnbQ.js → index-fxrsvINy.js} +32132 -31657
- package/dist/index.js +550 -523
- package/dist/{javascript-DhDpkmSb.js → javascript-DEZfPpDG.js} +1 -1
- package/dist/{jsonMode-B9M2gunx.js → jsonMode-BPP14l3S.js} +1 -1
- package/dist/{liquid-AWI3tjqW.js → liquid-DzKGpZ_1.js} +1 -1
- package/dist/{mdx-B4YZV7v2.js → mdx-CXwgAbOa.js} +1 -1
- package/dist/{python-DlT9zfRV.js → python-PA7Qs7tp.js} +1 -1
- package/dist/{razor-DGhiFsZg.js → razor-BKiT4imG.js} +1 -1
- package/dist/{tsMode-CzwEiyV0.js → tsMode-DMeqzHkT.js} +1 -1
- package/dist/{typescript-BXxjU9IA.js → typescript-C6q-lYiG.js} +1 -1
- package/dist/{xml-Cru83Tz2.js → xml-D75Y4liE.js} +1 -1
- package/dist/{yaml-CYKBclGP.js → yaml--CruCt9K.js} +1 -1
- package/package.json +1 -1
- package/dist/Pages/App/AppConfigurations/index.d.ts +0 -1
- package/dist/Pages/App/AppConfigurations/utils.d.ts +0 -2
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryConfigList.component.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDetailedView.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryHeader.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistorySidebar.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/index.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/types.d.ts +0 -35
- /package/dist/Pages/{CDPipeline → Applications/DevtronApps/Details/CDPipeline}/index.d.ts +0 -0
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { SortingOrder } from '../../../Common/Constants';
|
|
2
|
-
import { AppEnvDeploymentConfigDTO, ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO, EnvResourceType
|
|
2
|
+
import { AppEnvDeploymentConfigDTO, ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO, EnvResourceType } from '../../Services';
|
|
3
|
+
import { ManifestTemplateDTO } from '../../../Pages/Applications';
|
|
3
4
|
import { DeploymentHistoryDetail } from '../CICDHistory';
|
|
4
5
|
import { CollapsibleListConfig, CollapsibleListItem } from '../CollapsibleList';
|
|
5
6
|
import { SelectPickerProps } from '../SelectPicker';
|
|
6
7
|
import { CollapseProps } from '../Collapse';
|
|
8
|
+
export declare enum DeploymentConfigDiffState {
|
|
9
|
+
NO_DIFF = "noDiff",
|
|
10
|
+
HAS_DIFF = "hasDiff",
|
|
11
|
+
ADDED = "added",
|
|
12
|
+
DELETED = "deleted"
|
|
13
|
+
}
|
|
7
14
|
export interface DeploymentConfigType {
|
|
8
15
|
list: DeploymentHistoryDetail;
|
|
9
16
|
heading: React.ReactNode;
|
|
@@ -11,10 +18,13 @@ export interface DeploymentConfigType {
|
|
|
11
18
|
export interface DeploymentConfigListItem {
|
|
12
19
|
id: string;
|
|
13
20
|
title: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
pathType: EnvResourceType;
|
|
14
23
|
primaryConfig: DeploymentConfigType;
|
|
15
24
|
secondaryConfig: DeploymentConfigType;
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
diffState: DeploymentConfigDiffState;
|
|
26
|
+
singleView?: boolean;
|
|
27
|
+
groupHeader?: string;
|
|
18
28
|
}
|
|
19
29
|
export type DeploymentConfigDiffSelectPickerProps = {
|
|
20
30
|
type: 'string';
|
|
@@ -28,7 +38,8 @@ export type DeploymentConfigDiffSelectPickerProps = {
|
|
|
28
38
|
selectPickerProps: SelectPickerProps;
|
|
29
39
|
};
|
|
30
40
|
export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem, 'href' | 'title' | 'onClick'> {
|
|
31
|
-
|
|
41
|
+
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
42
|
+
diffState: DeploymentConfigListItem['diffState'];
|
|
32
43
|
}
|
|
33
44
|
export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig, 'id' | 'header' | 'noItemsText'> {
|
|
34
45
|
items: DeploymentConfigDiffNavigationItem[];
|
|
@@ -38,14 +49,19 @@ export interface DeploymentConfigDiffProps {
|
|
|
38
49
|
errorConfig?: {
|
|
39
50
|
error: boolean;
|
|
40
51
|
code: number;
|
|
52
|
+
message?: string;
|
|
53
|
+
redirectURL?: string;
|
|
41
54
|
reload: () => void;
|
|
42
55
|
};
|
|
43
56
|
configList: DeploymentConfigListItem[];
|
|
57
|
+
showDetailedDiffState?: boolean;
|
|
58
|
+
hideDiffState?: boolean;
|
|
44
59
|
headerText?: string;
|
|
45
60
|
scrollIntoViewId?: string;
|
|
46
61
|
selectorsConfig: {
|
|
47
62
|
primaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
48
63
|
secondaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
64
|
+
hideDivider?: boolean;
|
|
49
65
|
};
|
|
50
66
|
sortingConfig?: {
|
|
51
67
|
sortBy: string;
|
|
@@ -57,34 +73,39 @@ export interface DeploymentConfigDiffProps {
|
|
|
57
73
|
goBackURL?: string;
|
|
58
74
|
navHeading: string;
|
|
59
75
|
navHelpText?: string;
|
|
76
|
+
isNavHelpTextShowingError?: boolean;
|
|
60
77
|
tabConfig?: {
|
|
61
78
|
tabs: string[];
|
|
62
79
|
activeTab: string;
|
|
63
80
|
onClick: (tab: string) => void;
|
|
64
81
|
};
|
|
82
|
+
scopeVariablesConfig?: {
|
|
83
|
+
convertVariables: boolean;
|
|
84
|
+
onConvertVariablesClick: () => void;
|
|
85
|
+
};
|
|
86
|
+
renderedInDrawer?: boolean;
|
|
65
87
|
}
|
|
66
|
-
export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig'> {
|
|
88
|
+
export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig' | 'errorConfig' | 'isNavHelpTextShowingError' | 'showDetailedDiffState' | 'hideDiffState'> {
|
|
67
89
|
}
|
|
68
|
-
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'errorConfig' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'> {
|
|
90
|
+
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'errorConfig' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig' | 'scopeVariablesConfig' | 'showDetailedDiffState' | 'hideDiffState'> {
|
|
69
91
|
}
|
|
70
|
-
export
|
|
92
|
+
export type DeploymentConfigDiffAccordionProps = Pick<CollapseProps, 'onTransitionEnd'> & Pick<DeploymentConfigDiffProps, 'showDetailedDiffState' | 'hideDiffState'> & {
|
|
71
93
|
id: string;
|
|
72
94
|
title: string;
|
|
73
95
|
children: React.ReactNode;
|
|
74
|
-
|
|
96
|
+
diffState: DeploymentConfigDiffState;
|
|
75
97
|
isExpanded?: boolean;
|
|
76
98
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
77
|
-
}
|
|
99
|
+
};
|
|
78
100
|
export type DiffHeadingDataType<DeploymentTemplate> = DeploymentTemplate extends true ? DeploymentTemplateDTO : ConfigMapSecretDataConfigDatumDTO;
|
|
79
101
|
export type AppEnvDeploymentConfigListParams<IsManifestView> = (IsManifestView extends true ? {
|
|
80
102
|
currentList: ManifestTemplateDTO;
|
|
81
103
|
compareList: ManifestTemplateDTO;
|
|
82
|
-
sortOrder?: never;
|
|
83
104
|
} : {
|
|
84
105
|
currentList: AppEnvDeploymentConfigDTO;
|
|
85
106
|
compareList: AppEnvDeploymentConfigDTO;
|
|
86
|
-
sortOrder?: SortingOrder;
|
|
87
107
|
}) & {
|
|
88
108
|
getNavItemHref: (resourceType: EnvResourceType, resourceName: string) => string;
|
|
89
109
|
isManifestView?: IsManifestView;
|
|
110
|
+
convertVariables?: boolean;
|
|
90
111
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DeploymentConfigDiffProps, AppEnvDeploymentConfigListParams } from '..';
|
|
2
|
-
import { ConfigMapSecretDataConfigDatumDTO, TemplateListDTO } from '../../Services/app.types';
|
|
2
|
+
import { ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO, TemplateListDTO } from '../../Services/app.types';
|
|
3
|
+
export declare const getDeploymentTemplateData: (data: DeploymentTemplateDTO) => any;
|
|
3
4
|
/**
|
|
4
5
|
* Retrieves the draft data from the given configuration data object.
|
|
5
6
|
*
|
|
@@ -27,7 +28,7 @@ export declare const mergeConfigDataArraysByName: (primaryArray: ConfigMapSecret
|
|
|
27
28
|
*
|
|
28
29
|
* @returns An object containing the combined deployment configuration list, a collapsible navigation list, and a navigation list.
|
|
29
30
|
*/
|
|
30
|
-
export declare const getAppEnvDeploymentConfigList: <ManifestView extends boolean = false>({ currentList, compareList, getNavItemHref, isManifestView,
|
|
31
|
+
export declare const getAppEnvDeploymentConfigList: <ManifestView extends boolean = false>({ currentList, compareList, getNavItemHref, isManifestView, convertVariables, }: AppEnvDeploymentConfigListParams<ManifestView>) => {
|
|
31
32
|
configList: DeploymentConfigDiffProps["configList"];
|
|
32
33
|
navList: DeploymentConfigDiffProps["navList"];
|
|
33
34
|
collapsibleNavList: DeploymentConfigDiffProps["collapsibleNavList"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentConfigDiffAccordionProps } from './DeploymentConfigDiff.types';
|
|
2
|
-
export declare const DeploymentConfigDiffAccordion:
|
|
2
|
+
export declare const DeploymentConfigDiffAccordion: ({ diffState, showDetailedDiffState, hideDiffState, children, title, id, isExpanded, onClick, onTransitionEnd, }: DeploymentConfigDiffAccordionProps) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentConfigDiffMainProps } from './DeploymentConfigDiff.types';
|
|
2
|
-
export declare const DeploymentConfigDiffMain: ({ isLoading, errorConfig, headerText, configList, selectorsConfig, sortingConfig, scrollIntoViewId, }: DeploymentConfigDiffMainProps) => JSX.Element;
|
|
2
|
+
export declare const DeploymentConfigDiffMain: ({ isLoading, errorConfig, headerText, configList, selectorsConfig, sortingConfig, scrollIntoViewId, scopeVariablesConfig, showDetailedDiffState, hideDiffState, }: DeploymentConfigDiffMainProps) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentConfigDiffNavigationProps } from './DeploymentConfigDiff.types';
|
|
2
|
-
export declare const DeploymentConfigDiffNavigation: ({ isLoading, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, tabConfig, }: DeploymentConfigDiffNavigationProps) => JSX.Element;
|
|
2
|
+
export declare const DeploymentConfigDiffNavigation: ({ isLoading, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, isNavHelpTextShowingError, tabConfig, errorConfig, showDetailedDiffState, hideDiffState, }: DeploymentConfigDiffNavigationProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_INVALID_YAML_ERROR = "The provided YAML is invalid. Please provide valid YAML.";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { SelectPickerProps } from './type';
|
|
3
|
+
export declare const SELECT_PICKER_FONT_SIZE_MAP: Record<SelectPickerProps['size'], CSSProperties['fontSize']>;
|
|
4
|
+
export declare const SELECT_PICKER_ICON_SIZE_MAP: Record<SelectPickerProps['size'], Pick<CSSProperties, 'width' | 'height'>>;
|
|
5
|
+
export declare const SELECT_PICKER_CONTROL_SIZE_MAP: Record<SelectPickerProps['size'], CSSProperties['minHeight']>;
|
|
@@ -4,11 +4,12 @@ import { ComponentSizeType } from '../../constants';
|
|
|
4
4
|
import { MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
5
5
|
import { GroupBase, GroupHeadingProps, Props as ReactSelectProps, SelectInstance } from 'react-select';
|
|
6
6
|
import { CreatableProps } from 'react-select/creatable';
|
|
7
|
+
import { TooltipProps } from '@Common/Tooltip/types';
|
|
7
8
|
export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
|
|
8
9
|
/**
|
|
9
10
|
* Description to be displayed for the option
|
|
10
11
|
*/
|
|
11
|
-
description?:
|
|
12
|
+
description?: ReactNode;
|
|
12
13
|
/**
|
|
13
14
|
* Icon at the start of the option
|
|
14
15
|
*/
|
|
@@ -17,6 +18,10 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
|
|
|
17
18
|
* Icon at the end of the option
|
|
18
19
|
*/
|
|
19
20
|
endIcon?: ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* Props passed to show the tippy on option
|
|
23
|
+
*/
|
|
24
|
+
tooltipProps?: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'> | (Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'content'> & Required<Pick<TooltipProps, 'shortcutKeyCombo'>>);
|
|
20
25
|
}
|
|
21
26
|
type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
|
|
22
27
|
declare module 'react-select/base' {
|
|
@@ -74,11 +79,11 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
|
|
|
74
79
|
*/
|
|
75
80
|
customSelectedOptionsCount?: number;
|
|
76
81
|
/**
|
|
77
|
-
*
|
|
82
|
+
* Size of select
|
|
78
83
|
*
|
|
79
84
|
* @default 'ComponentSizeType.medium'
|
|
80
85
|
*/
|
|
81
|
-
size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
|
|
86
|
+
size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large | ComponentSizeType.small>;
|
|
82
87
|
/**
|
|
83
88
|
* Content to be shown in a tippy when disabled
|
|
84
89
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LinkProps, NavLinkProps } from 'react-router-dom';
|
|
2
2
|
import { ComponentSizeType } from '../../constants';
|
|
3
3
|
import { DataAttributes } from '../../types';
|
|
4
|
+
import { TooltipProps } from '@Common/Tooltip/types';
|
|
4
5
|
type TabComponentProps<TabTypeProps> = TabTypeProps & DataAttributes;
|
|
5
6
|
type ConditionalTabType = {
|
|
6
7
|
/**
|
|
@@ -56,6 +57,13 @@ type ConditionalTabType = {
|
|
|
56
57
|
*/
|
|
57
58
|
active?: never | false;
|
|
58
59
|
};
|
|
60
|
+
type TabTooltipProps = {
|
|
61
|
+
shouldWrapTooltip: boolean;
|
|
62
|
+
tooltipProps: TooltipProps;
|
|
63
|
+
} | {
|
|
64
|
+
shouldWrapTooltip?: never;
|
|
65
|
+
tooltipProps?: never;
|
|
66
|
+
};
|
|
59
67
|
export type TabProps = {
|
|
60
68
|
/**
|
|
61
69
|
* Unique identifier for the tab.
|
|
@@ -97,7 +105,7 @@ export type TabProps = {
|
|
|
97
105
|
* Disables the tab, preventing interaction and indicating an inactive state.
|
|
98
106
|
*/
|
|
99
107
|
disabled?: boolean;
|
|
100
|
-
} & ConditionalTabType;
|
|
108
|
+
} & ConditionalTabType & TabTooltipProps;
|
|
101
109
|
export interface TabGroupProps {
|
|
102
110
|
/**
|
|
103
111
|
* Array of tabs to be rendered.
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -50,4 +50,17 @@ export declare const getIsManualApprovalSpecific: (userApprovalConfig?: Pick<Use
|
|
|
50
50
|
*/
|
|
51
51
|
export declare const getHandleOpenURL: (url: string) => () => void;
|
|
52
52
|
export declare const getDefaultValueFromType: (value: unknown) => {};
|
|
53
|
+
/**
|
|
54
|
+
* Groups an array of objects by a specified key.
|
|
55
|
+
*
|
|
56
|
+
* This function takes an array of objects and a key, and groups the objects in the array
|
|
57
|
+
* based on the value of the specified key. If an object does not have the specified key,
|
|
58
|
+
* it will be grouped under the `'UNGROUPED'` key.
|
|
59
|
+
*
|
|
60
|
+
* @param array - The array of objects to be grouped.
|
|
61
|
+
* @param key - The key of the object used to group the array.
|
|
62
|
+
* @returns An object where the keys are the unique values of the specified key in the array,
|
|
63
|
+
* and the values are arrays of objects that share the same key value.
|
|
64
|
+
*/
|
|
65
|
+
export declare const groupArrayByObjectKey: <T extends Record<string, any>, K extends keyof T>(array: T[], key: K) => Record<string, T[]>;
|
|
53
66
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UseFormSubmitHandler, UseFormValidations } from './useForm.types';
|
|
1
|
+
import { BaseSyntheticEvent, ChangeEvent } from 'react';
|
|
2
|
+
import { UseFormSubmitHandler, UseFormValidations, UseFormErrorHandler } from './useForm.types';
|
|
3
3
|
/**
|
|
4
4
|
* A custom hook to manage form state, validation, and submission handling.
|
|
5
5
|
*
|
|
@@ -16,20 +16,19 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
|
|
|
16
16
|
* - 'onBlur': Validation occurs when the input loses focus.
|
|
17
17
|
* @default 'onChange'
|
|
18
18
|
*/
|
|
19
|
-
validationMode?: "onChange" | "onBlur";
|
|
19
|
+
validationMode?: "onChange" | "onBlur" | "onSubmit";
|
|
20
20
|
}) => {
|
|
21
21
|
/** The current form data. */
|
|
22
22
|
data: T;
|
|
23
23
|
/** An object containing validation errors for each form field. */
|
|
24
|
-
errors: Partial<Record<keyof T, string
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
register: <V extends unknown = string, S extends unknown = unknown>(name: keyof T, sanitizeFn?: (value: V) => S, registerOptions?: {
|
|
24
|
+
errors: Partial<Record<keyof T, string[]>>;
|
|
25
|
+
register: <Value extends unknown, SFnReturnType extends unknown, CustomComponent extends boolean>(name: keyof T, registerOptions?: {
|
|
26
|
+
/**
|
|
27
|
+
* A function to sanitize the input value.
|
|
28
|
+
* @param value The input value.
|
|
29
|
+
* @returns The sanitized value.
|
|
30
|
+
*/
|
|
31
|
+
sanitizeFn?: (value: CustomComponent extends true ? Value : string) => SFnReturnType;
|
|
33
32
|
/**
|
|
34
33
|
* Prevents the input value from being trimmed.
|
|
35
34
|
*
|
|
@@ -39,26 +38,30 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
|
|
|
39
38
|
* @default false - By default, the input will be trimmed.
|
|
40
39
|
*/
|
|
41
40
|
noTrim?: boolean;
|
|
41
|
+
/** A boolean flag indicating if the input is a custom component. */
|
|
42
|
+
isCustomComponent?: CustomComponent;
|
|
42
43
|
}) => {
|
|
43
|
-
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
44
|
+
onChange: (e: CustomComponent extends true ? Value : ChangeEvent<HTMLInputElement>) => void;
|
|
44
45
|
onBlur: () => void;
|
|
45
46
|
onFocus: () => void;
|
|
46
47
|
name: keyof T;
|
|
47
48
|
};
|
|
48
|
-
|
|
49
|
-
* Handles form submission, validates all form fields, and calls the provided `onValid` function if valid.
|
|
50
|
-
*
|
|
51
|
-
* @param onValid - A function to handle valid form data on submission.
|
|
52
|
-
* @returns The event handler for form submission.
|
|
53
|
-
*/
|
|
54
|
-
handleSubmit: (onValid: UseFormSubmitHandler<T>) => (e: FormEvent<HTMLFormElement>) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Manually triggers validation for specific form fields.
|
|
57
|
-
*
|
|
58
|
-
* @param name - The key(s) of the form field(s) to validate.
|
|
59
|
-
* @returns The validation error(s), if any.
|
|
60
|
-
*/
|
|
49
|
+
handleSubmit: (onValid: UseFormSubmitHandler<T>, onError?: UseFormErrorHandler<T>) => (e?: BaseSyntheticEvent) => Promise<void>;
|
|
61
50
|
trigger: (name: keyof T | (keyof T)[]) => (string | string[]) | (string | string[])[];
|
|
51
|
+
setValue: (name: keyof T, value: T[keyof T], valueOptions?: {
|
|
52
|
+
/** A boolean indicating whether to mark the field as dirty after setting the value. */
|
|
53
|
+
shouldDirty?: boolean;
|
|
54
|
+
/** A boolean indicating whether to mark the field as touched after setting the value. */
|
|
55
|
+
shouldTouch?: boolean;
|
|
56
|
+
}) => void;
|
|
57
|
+
reset: (formData: T, resetOptions?: {
|
|
58
|
+
/** A boolean indicating whether to retain the current dirty state of the form fields. */
|
|
59
|
+
keepDirty?: boolean;
|
|
60
|
+
/** A boolean indicating whether to retain the current touched state of the form fields. */
|
|
61
|
+
keepTouched?: boolean;
|
|
62
|
+
/** A boolean indicating whether to retain the current error state of the form fields. */
|
|
63
|
+
keepErrors?: boolean;
|
|
64
|
+
}) => void;
|
|
62
65
|
/** An object representing additional form state. */
|
|
63
66
|
formState: {
|
|
64
67
|
/** An object indicating which fields have been touched (interacted with). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseSyntheticEvent } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Describes the "required" validation rule.
|
|
4
4
|
* It can be a simple boolean or an object containing a boolean value and an error message.
|
|
@@ -24,10 +24,10 @@ type ValidationPattern = {
|
|
|
24
24
|
* If validation fails, an error message is provided.
|
|
25
25
|
*/
|
|
26
26
|
type ValidationCustom = {
|
|
27
|
-
isValid: (value:
|
|
27
|
+
isValid: (value: any) => boolean;
|
|
28
28
|
message: string;
|
|
29
29
|
} | {
|
|
30
|
-
isValid: (value:
|
|
30
|
+
isValid: (value: any) => boolean;
|
|
31
31
|
message: string;
|
|
32
32
|
}[];
|
|
33
33
|
/**
|
|
@@ -41,9 +41,9 @@ export interface UseFormValidation {
|
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Represents the structure for form validation errors.
|
|
44
|
-
* Maps each field to an
|
|
44
|
+
* Maps each field to an array of error messages.
|
|
45
45
|
*/
|
|
46
|
-
export type UseFormErrors<T> = Partial<Record<keyof T, string
|
|
46
|
+
export type UseFormErrors<T> = Partial<Record<keyof T, string[]>>;
|
|
47
47
|
/**
|
|
48
48
|
* Represents the fields that have been modified ("dirty") in the form.
|
|
49
49
|
* Maps each field to a boolean value indicating whether it has been changed.
|
|
@@ -58,12 +58,19 @@ export type TouchedFields<T> = Partial<Record<keyof T, boolean>>;
|
|
|
58
58
|
* Defines the structure for form validations.
|
|
59
59
|
* Maps each form field to its corresponding validation rules.
|
|
60
60
|
*/
|
|
61
|
-
export type UseFormValidations<T extends {}> = Partial<Record<keyof T, UseFormValidation>>;
|
|
61
|
+
export type UseFormValidations<T extends {}> = ((formData: T) => Partial<Record<keyof T, UseFormValidation>>) | Partial<Record<keyof T, UseFormValidation>>;
|
|
62
62
|
/**
|
|
63
63
|
* Describes the function signature for handling form submission.
|
|
64
64
|
*
|
|
65
65
|
* @param data - The form data collected during submission.
|
|
66
|
-
* @param e - The
|
|
66
|
+
* @param e - The event, optionally passed when `handleSubmit` is called.
|
|
67
67
|
*/
|
|
68
|
-
export type UseFormSubmitHandler<T extends {}> = (data: T, e?:
|
|
68
|
+
export type UseFormSubmitHandler<T extends {}> = (data: T, e?: BaseSyntheticEvent) => void;
|
|
69
|
+
/**
|
|
70
|
+
* A type defining the function signature for handling form validation errors.
|
|
71
|
+
*
|
|
72
|
+
* @param errors - An object containing the validation errors for form fields.
|
|
73
|
+
* @param e - The event, optionally passed when `handleSubmit` is called.
|
|
74
|
+
*/
|
|
75
|
+
export type UseFormErrorHandler<T extends {}> = (errors: UseFormErrors<T>, e?: BaseSyntheticEvent) => void;
|
|
69
76
|
export {};
|
|
@@ -7,4 +7,4 @@ import { UseFormValidation } from './useForm.types';
|
|
|
7
7
|
* @param validation - The validation rules for the form field.
|
|
8
8
|
* @returns Returns error message(s) or null if valid.
|
|
9
9
|
*/
|
|
10
|
-
export declare const checkValidation: <T extends Record<keyof T, any> = {}>(value: T[keyof T], validation: UseFormValidation) => string
|
|
10
|
+
export declare const checkValidation: <T extends Record<keyof T, any> = {}>(value: T[keyof T], validation: UseFormValidation) => string[] | null;
|
|
@@ -5,4 +5,7 @@ export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => P
|
|
|
5
5
|
* The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
|
|
6
6
|
*/
|
|
7
7
|
export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, "ciArtifactId">) => Promise<CIMaterialInfoType>;
|
|
8
|
-
export declare const getAppEnvDeploymentConfig: (params
|
|
8
|
+
export declare const getAppEnvDeploymentConfig: ({ params, signal, }: {
|
|
9
|
+
params: AppEnvDeploymentConfigPayloadType;
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}) => Promise<ResponseType<AppEnvDeploymentConfigDTO>>;
|
|
@@ -99,12 +99,23 @@ export declare enum AppEnvDeploymentConfigType {
|
|
|
99
99
|
PREVIOUS_DEPLOYMENTS = "PreviousDeployments",
|
|
100
100
|
DEFAULT_VERSION = "DefaultVersion"
|
|
101
101
|
}
|
|
102
|
+
export declare enum DraftState {
|
|
103
|
+
Init = 1,
|
|
104
|
+
Discarded = 2,
|
|
105
|
+
Published = 3,
|
|
106
|
+
AwaitApproval = 4
|
|
107
|
+
}
|
|
108
|
+
export declare enum DraftAction {
|
|
109
|
+
Add = 1,
|
|
110
|
+
Update = 2,
|
|
111
|
+
Delete = 3
|
|
112
|
+
}
|
|
102
113
|
export interface DraftMetadataDTO {
|
|
103
114
|
appId: number;
|
|
104
115
|
envId: number;
|
|
105
116
|
resource: number;
|
|
106
117
|
resourceName: string;
|
|
107
|
-
action:
|
|
118
|
+
action: DraftAction;
|
|
108
119
|
data: string;
|
|
109
120
|
userComment: string;
|
|
110
121
|
changeProposed: boolean;
|
|
@@ -113,31 +124,45 @@ export interface DraftMetadataDTO {
|
|
|
113
124
|
};
|
|
114
125
|
draftId: number;
|
|
115
126
|
draftVersionId: number;
|
|
116
|
-
draftState:
|
|
127
|
+
draftState: DraftState;
|
|
128
|
+
draftResolvedValue: string;
|
|
117
129
|
approvers: string[];
|
|
118
130
|
canApprove: boolean;
|
|
119
131
|
commentsCount: number;
|
|
120
132
|
dataEncrypted: boolean;
|
|
121
133
|
isAppAdmin: boolean;
|
|
122
134
|
}
|
|
135
|
+
export declare enum CMSecretExternalType {
|
|
136
|
+
Internal = "",
|
|
137
|
+
KubernetesConfigMap = "KubernetesConfigMap",
|
|
138
|
+
KubernetesSecret = "KubernetesSecret",
|
|
139
|
+
AWSSecretsManager = "AWSSecretsManager",
|
|
140
|
+
AWSSystemManager = "AWSSystemManager",
|
|
141
|
+
HashiCorpVault = "HashiCorpVault",
|
|
142
|
+
ESO_GoogleSecretsManager = "ESO_GoogleSecretsManager",
|
|
143
|
+
ESO_AWSSecretsManager = "ESO_AWSSecretsManager",
|
|
144
|
+
ESO_AzureSecretsManager = "ESO_AzureSecretsManager",
|
|
145
|
+
ESO_HashiCorpVault = "ESO_HashiCorpVault"
|
|
146
|
+
}
|
|
123
147
|
export interface ConfigDatum {
|
|
124
148
|
name: string;
|
|
125
149
|
type: string;
|
|
126
150
|
external: boolean;
|
|
127
|
-
data: Record<string,
|
|
128
|
-
defaultData: Record<string,
|
|
151
|
+
data: Record<string, any>;
|
|
152
|
+
defaultData: Record<string, any>;
|
|
129
153
|
global: boolean;
|
|
130
|
-
externalType:
|
|
131
|
-
esoSecretData:
|
|
132
|
-
defaultESOSecretData:
|
|
133
|
-
secretData: Record<string,
|
|
134
|
-
defaultSecretData: Record<string,
|
|
154
|
+
externalType: CMSecretExternalType;
|
|
155
|
+
esoSecretData: Record<string, any>;
|
|
156
|
+
defaultESOSecretData: Record<string, any>;
|
|
157
|
+
secretData: Record<string, any>[];
|
|
158
|
+
defaultSecretData: Record<string, any>[];
|
|
135
159
|
roleARN: string;
|
|
136
160
|
subPath: boolean;
|
|
137
161
|
filePermission: string;
|
|
138
162
|
overridden: boolean;
|
|
139
|
-
mountPath
|
|
140
|
-
defaultMountPath
|
|
163
|
+
mountPath: string;
|
|
164
|
+
defaultMountPath: string;
|
|
165
|
+
esoSubPath: string[];
|
|
141
166
|
}
|
|
142
167
|
export interface ConfigMapSecretDataConfigDatumDTO extends ConfigDatum {
|
|
143
168
|
draftMetadata: DraftMetadataDTO;
|
|
@@ -150,26 +175,40 @@ export interface ConfigMapSecretDataType {
|
|
|
150
175
|
export declare enum ConfigResourceType {
|
|
151
176
|
ConfigMap = "ConfigMap",
|
|
152
177
|
Secret = "Secret",
|
|
153
|
-
DeploymentTemplate = "Deployment Template"
|
|
178
|
+
DeploymentTemplate = "Deployment Template",
|
|
179
|
+
PipelineStrategy = "Pipeline Strategy"
|
|
154
180
|
}
|
|
155
181
|
export interface DeploymentTemplateDTO {
|
|
156
182
|
resourceType: ConfigResourceType.DeploymentTemplate;
|
|
157
|
-
data:
|
|
158
|
-
[key: string]: any;
|
|
159
|
-
};
|
|
183
|
+
data: Record<string, any>;
|
|
160
184
|
deploymentDraftData: ConfigMapSecretDataType | null;
|
|
185
|
+
variableSnapshot: {
|
|
186
|
+
'Deployment Template': Record<string, string>;
|
|
187
|
+
};
|
|
188
|
+
templateVersion: string;
|
|
189
|
+
isAppMetricsEnabled?: true;
|
|
190
|
+
resolvedValue: Record<string, any>;
|
|
161
191
|
}
|
|
162
192
|
export interface ConfigMapSecretDataDTO {
|
|
163
193
|
resourceType: Extract<ConfigResourceType, ConfigResourceType.ConfigMap | ConfigResourceType.Secret>;
|
|
164
194
|
data: ConfigMapSecretDataType;
|
|
195
|
+
variableSnapshot: Record<string, Record<string, string>>;
|
|
196
|
+
resolvedValue: string;
|
|
197
|
+
}
|
|
198
|
+
export interface PipelineConfigDataDTO {
|
|
199
|
+
resourceType: ConfigResourceType.PipelineStrategy;
|
|
200
|
+
data: Record<string, any>;
|
|
201
|
+
pipelineTriggerType: string;
|
|
202
|
+
Strategy: string;
|
|
165
203
|
}
|
|
166
204
|
export interface AppEnvDeploymentConfigDTO {
|
|
167
205
|
deploymentTemplate: DeploymentTemplateDTO | null;
|
|
168
206
|
configMapData: ConfigMapSecretDataDTO | null;
|
|
169
207
|
secretsData: ConfigMapSecretDataDTO | null;
|
|
208
|
+
pipelineConfigData?: PipelineConfigDataDTO;
|
|
170
209
|
isAppAdmin: boolean;
|
|
171
210
|
}
|
|
172
|
-
export
|
|
211
|
+
export type AppEnvDeploymentConfigPayloadType = {
|
|
173
212
|
appName: string;
|
|
174
213
|
envName: string;
|
|
175
214
|
configType: AppEnvDeploymentConfigType;
|
|
@@ -178,7 +217,14 @@ export interface AppEnvDeploymentConfigPayloadType {
|
|
|
178
217
|
resourceType?: ConfigResourceType;
|
|
179
218
|
resourceId?: number;
|
|
180
219
|
resourceName?: string;
|
|
181
|
-
|
|
220
|
+
configArea?: 'AppConfiguration';
|
|
221
|
+
} | {
|
|
222
|
+
appName: string;
|
|
223
|
+
envName: string;
|
|
224
|
+
pipelineId: number;
|
|
225
|
+
configArea: 'CdRollback' | 'DeploymentHistory';
|
|
226
|
+
wfrId: number;
|
|
227
|
+
};
|
|
182
228
|
export declare enum TemplateListType {
|
|
183
229
|
DefaultVersions = 1,
|
|
184
230
|
PublishedOnEnvironments = 2,
|
|
@@ -196,22 +242,13 @@ export interface TemplateListDTO {
|
|
|
196
242
|
finishedOn?: string;
|
|
197
243
|
status?: string;
|
|
198
244
|
pipelineId?: number;
|
|
199
|
-
|
|
200
|
-
export interface ManifestTemplateDTO {
|
|
201
|
-
data: string;
|
|
202
|
-
resolvedData: string;
|
|
203
|
-
variableSnapshot: null;
|
|
204
|
-
}
|
|
205
|
-
export declare enum DraftState {
|
|
206
|
-
Init = 1,
|
|
207
|
-
Discarded = 2,
|
|
208
|
-
Published = 3,
|
|
209
|
-
AwaitApproval = 4
|
|
245
|
+
wfrId?: number;
|
|
210
246
|
}
|
|
211
247
|
export declare enum EnvResourceType {
|
|
212
248
|
ConfigMap = "configmap",
|
|
213
249
|
Secret = "secrets",
|
|
214
250
|
DeploymentTemplate = "deployment-template",
|
|
215
|
-
Manifest = "manifest"
|
|
251
|
+
Manifest = "manifest",
|
|
252
|
+
PipelineStrategy = "pipeline-strategy"
|
|
216
253
|
}
|
|
217
254
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OptionType } from '../Common/Types';
|
|
2
|
-
import { CDMaterialSidebarType } from './types';
|
|
2
|
+
import { CDMaterialSidebarType, ConfigKeysWithLockType, ConfigurationType } from './types';
|
|
3
3
|
export declare const ARTIFACT_STATUS: {
|
|
4
4
|
PROGRESSING: string;
|
|
5
5
|
DEGRADED: string;
|
|
@@ -411,3 +411,5 @@ export declare enum SelectAllGroupedResourceIdentifiers {
|
|
|
411
411
|
}
|
|
412
412
|
export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
|
|
413
413
|
export declare const TRIGGER_STATUS_PROGRESSING: string[];
|
|
414
|
+
export declare const CONFIGURATION_TYPE_VALUES: ConfigurationType[];
|
|
415
|
+
export declare const DEFAULT_LOCKED_KEYS_CONFIG: Readonly<ConfigKeysWithLockType>;
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -572,6 +572,18 @@ export type BaseFilterQueryParams<T> = {
|
|
|
572
572
|
*/
|
|
573
573
|
showAll?: boolean;
|
|
574
574
|
} & SortingParams<T>;
|
|
575
|
+
export declare enum ConfigurationType {
|
|
576
|
+
GUI = "GUI",
|
|
577
|
+
YAML = "YAML"
|
|
578
|
+
}
|
|
579
|
+
export interface BaseURLParams {
|
|
580
|
+
appId: string;
|
|
581
|
+
envId: string;
|
|
582
|
+
}
|
|
583
|
+
export interface ConfigKeysWithLockType {
|
|
584
|
+
config: string[];
|
|
585
|
+
allowed: boolean;
|
|
586
|
+
}
|
|
575
587
|
export type DataAttributes = Record<`data-${string}`, unknown>;
|
|
576
588
|
export interface RuntimeParamsListItemType extends KeyValueListType {
|
|
577
589
|
id: number;
|