@devtron-labs/devtron-fe-common-lib 0.2.2-beta-2 → 0.2.2-beta-3
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 +1 -0
- package/dist/Pages/index.d.ts +0 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +4 -2
- package/dist/Shared/Components/Collapse/Collapse.d.ts +3 -0
- package/dist/Shared/Components/Collapse/index.d.ts +2 -0
- package/dist/Shared/Components/Collapse/types.d.ts +7 -0
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +3 -0
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +96 -0
- package/dist/Shared/Components/CollapsibleList/index.d.ts +2 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +3 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +38 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +3 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +3 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +3 -0
- package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +3 -0
- package/dist/Shared/Components/DeploymentConfigDiff/types.d.ts +69 -0
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +24 -1
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/index.d.ts +1 -0
- package/dist/Shared/Components/SelectPicker/type.d.ts +16 -0
- package/dist/Shared/Components/SelectPicker/utils.d.ts +11 -2
- package/dist/Shared/Components/index.d.ts +3 -0
- package/dist/Shared/Helpers.d.ts +2 -0
- package/dist/Shared/Services/app.service.d.ts +3 -1
- package/dist/Shared/Services/app.types.d.ts +116 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-784b426d.js → cssMode-be050934.js} +1 -1
- package/dist/{freemarker2-30b71b0b.js → freemarker2-9fccce23.js} +1 -1
- package/dist/{handlebars-679ff64f.js → handlebars-df33a856.js} +1 -1
- package/dist/{html-fb589f7b.js → html-b76cbb26.js} +1 -1
- package/dist/{htmlMode-0a3d36ae.js → htmlMode-18063eff.js} +1 -1
- package/dist/{index-3953e517.js → index-cc9a47f4.js} +28001 -27247
- package/dist/index.js +493 -478
- package/dist/{javascript-f12f4be1.js → javascript-228444f1.js} +1 -1
- package/dist/{jsonMode-6bff94b2.js → jsonMode-57ae28a7.js} +1 -1
- package/dist/{liquid-269872ca.js → liquid-2c6214b8.js} +1 -1
- package/dist/{mdx-e6f539cd.js → mdx-028b98f9.js} +1 -1
- package/dist/{python-f1f3764d.js → python-b15c4827.js} +1 -1
- package/dist/{razor-08dbba6a.js → razor-fcf80b3e.js} +1 -1
- package/dist/{tsMode-2d68acb6.js → tsMode-05880789.js} +1 -1
- package/dist/{typescript-2f6e0956.js → typescript-7ce10b0c.js} +1 -1
- package/dist/{xml-376b21d1.js → xml-4522b384.js} +1 -1
- package/dist/{yaml-5fb2e0b2.js → yaml-46005b96.js} +1 -1
- package/package.json +1 -1
- package/dist/Pages/CDPipeline/index.d.ts +0 -1
- package/dist/Pages/CDPipeline/types.d.ts +0 -84
- package/dist/assets/editor.worker-60ba9509.js +0 -12
- package/dist/assets/yaml.worker-3bbe780a.js +0 -472
package/dist/Pages/index.d.ts
CHANGED
package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DeploymentTemplateHistoryType } from '../types';
|
|
2
2
|
|
|
3
|
-
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, }: DeploymentTemplateHistoryType) => JSX.Element;
|
|
3
|
+
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, comparisonBodyClassName, sortOrder, }: DeploymentTemplateHistoryType) => JSX.Element;
|
|
4
4
|
export default DeploymentHistoryDiffView;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
import { OptionType, UserApprovalMetadataType, ReleaseTag, ImageComment, PromotionApprovalMetadataType, FilterConditionsListType, DeploymentAppTypes, ResponseType, PaginationProps } from '../../../Common';
|
|
2
|
+
import { OptionType, UserApprovalMetadataType, ReleaseTag, ImageComment, PromotionApprovalMetadataType, FilterConditionsListType, DeploymentAppTypes, ResponseType, PaginationProps, SortingOrder } from '../../../Common';
|
|
3
3
|
import { DeploymentStageType } from '../../constants';
|
|
4
4
|
import { AggregationKeys, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType } from '../../types';
|
|
5
5
|
|
|
@@ -368,6 +368,8 @@ export interface DeploymentTemplateHistoryType {
|
|
|
368
368
|
isUnpublished?: boolean;
|
|
369
369
|
isDeleteDraft?: boolean;
|
|
370
370
|
rootClassName?: string;
|
|
371
|
+
comparisonBodyClassName?: string;
|
|
372
|
+
sortOrder?: SortingOrder;
|
|
371
373
|
}
|
|
372
374
|
export interface DeploymentHistoryDetailRes extends ResponseType {
|
|
373
375
|
result?: DeploymentHistoryDetail;
|
|
@@ -522,7 +524,7 @@ export interface DeploymentHistory {
|
|
|
522
524
|
runSource?: RunSourceType;
|
|
523
525
|
}
|
|
524
526
|
type DeploymentStrategyType = 'CANARY' | 'ROLLING' | 'RECREATE' | 'BLUE_GREEN';
|
|
525
|
-
|
|
527
|
+
interface DeploymentStrategy {
|
|
526
528
|
deploymentTemplate: DeploymentStrategyType;
|
|
527
529
|
config: any;
|
|
528
530
|
default: boolean;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TippyProps } from '@tippyjs/react';
|
|
3
|
+
|
|
4
|
+
export interface CollapsibleListItem {
|
|
5
|
+
/**
|
|
6
|
+
* The title of the list item.
|
|
7
|
+
*/
|
|
8
|
+
title: string;
|
|
9
|
+
/**
|
|
10
|
+
* The subtitle of the list item.
|
|
11
|
+
*/
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Configuration for the icon.
|
|
15
|
+
*/
|
|
16
|
+
iconConfig?: {
|
|
17
|
+
/**
|
|
18
|
+
* A React component representing an icon to be displayed with the list item.
|
|
19
|
+
*/
|
|
20
|
+
Icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
21
|
+
/**
|
|
22
|
+
* Properties for the icon component.
|
|
23
|
+
*/
|
|
24
|
+
props?: React.SVGProps<SVGSVGElement>;
|
|
25
|
+
/**
|
|
26
|
+
* Properties for the tooltip component of the icon.
|
|
27
|
+
*/
|
|
28
|
+
tooltipProps?: TippyProps;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The URL of the nav link.
|
|
32
|
+
*/
|
|
33
|
+
href?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The callback function to handle click events on the nav link.
|
|
36
|
+
*/
|
|
37
|
+
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface CollapsibleListConfig {
|
|
40
|
+
/**
|
|
41
|
+
* The unique identifier for the collapsible list.
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
/**
|
|
45
|
+
* The header text for the collapsible list.
|
|
46
|
+
*/
|
|
47
|
+
header: string;
|
|
48
|
+
/**
|
|
49
|
+
* Configuration for the header icon.
|
|
50
|
+
*/
|
|
51
|
+
headerIconConfig?: {
|
|
52
|
+
/**
|
|
53
|
+
* A React component representing an icon button to be displayed with the header.
|
|
54
|
+
*/
|
|
55
|
+
Icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
56
|
+
/**
|
|
57
|
+
* Properties for the header icon component.
|
|
58
|
+
*/
|
|
59
|
+
props?: React.SVGProps<SVGSVGElement>;
|
|
60
|
+
/**
|
|
61
|
+
* Properties for the header icon button component.
|
|
62
|
+
*/
|
|
63
|
+
btnProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
64
|
+
/**
|
|
65
|
+
* Properties for the tooltip component of the icon.
|
|
66
|
+
*/
|
|
67
|
+
tooltipProps?: TippyProps;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Text to display when there are no items in the list.
|
|
71
|
+
* @default 'No items found.'
|
|
72
|
+
*/
|
|
73
|
+
noItemsText?: string;
|
|
74
|
+
/**
|
|
75
|
+
* An array of items to be displayed in the collapsible list.
|
|
76
|
+
*/
|
|
77
|
+
items: CollapsibleListItem[];
|
|
78
|
+
/**
|
|
79
|
+
* Boolean indicating whether the list is expanded or not.
|
|
80
|
+
*/
|
|
81
|
+
isExpanded?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface CollapsibleListProps {
|
|
84
|
+
/**
|
|
85
|
+
* An array of collapsible list configurations.
|
|
86
|
+
*/
|
|
87
|
+
config: CollapsibleListConfig[];
|
|
88
|
+
/**
|
|
89
|
+
* Function to handle the collapse button click event.
|
|
90
|
+
*
|
|
91
|
+
* @param id - The unique identifier for the item to collapse.
|
|
92
|
+
* @param e - The mouse event triggered by the button click.
|
|
93
|
+
*
|
|
94
|
+
*/
|
|
95
|
+
onCollapseBtnClick?: (id: string, e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
96
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SortingOrder } from '../../../Common/Constants';
|
|
2
|
+
import { DeploymentConfigDiffProps } from '..';
|
|
3
|
+
import { AppEnvDeploymentConfigDTO, ConfigMapSecretDataConfigDatumDTO, EnvResourceType, TemplateListDTO } from '../../Services/app.types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves the draft data from the given configuration data object.
|
|
7
|
+
*
|
|
8
|
+
* @param configData - The configuration data object.
|
|
9
|
+
* @returns The draft data if available, otherwise the original data.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getDraftData: (configData: ConfigMapSecretDataConfigDatumDTO) => ConfigMapSecretDataConfigDatumDTO;
|
|
12
|
+
/**
|
|
13
|
+
* Combines two arrays of configuration data objects based on a 'name' key.
|
|
14
|
+
*
|
|
15
|
+
* @param primaryArray - The first array of configuration data objects.
|
|
16
|
+
* @param secondaryArray - The second array of configuration data objects.
|
|
17
|
+
* @returns The combined array of configuration data objects.
|
|
18
|
+
*/
|
|
19
|
+
export declare const mergeConfigDataArraysByName: (primaryArray: ConfigMapSecretDataConfigDatumDTO[], secondaryArray: ConfigMapSecretDataConfigDatumDTO[]) => ConfigMapSecretDataConfigDatumDTO[][];
|
|
20
|
+
/**
|
|
21
|
+
* Generates a list of deployment configurations for application environments and identifies changes between the current and compare lists.
|
|
22
|
+
*
|
|
23
|
+
* @param currentList - The current deployment configuration list.
|
|
24
|
+
* @param compareList - The deployment configuration list to compare against.
|
|
25
|
+
* @param getNavItemHref - A function to generate navigation item URLs based on the resource type and resource name.
|
|
26
|
+
* @param sortOrder - (Optional) The order in which to sort the deployment templates.
|
|
27
|
+
*
|
|
28
|
+
* @returns An object containing the combined deployment configuration list, a collapsible navigation list, and a navigation list.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getAppEnvDeploymentConfigList: (currentList: AppEnvDeploymentConfigDTO, compareList: AppEnvDeploymentConfigDTO, getNavItemHref: (resourceType: EnvResourceType, resourceName: string) => string, sortOrder?: SortingOrder) => {
|
|
31
|
+
configList: DeploymentConfigDiffProps['configList'];
|
|
32
|
+
navList: DeploymentConfigDiffProps['navList'];
|
|
33
|
+
collapsibleNavList: DeploymentConfigDiffProps['collapsibleNavList'];
|
|
34
|
+
};
|
|
35
|
+
export declare const getDefaultVersionAndPreviousDeploymentOptions: (data: TemplateListDTO[]) => {
|
|
36
|
+
previousDeployments: TemplateListDTO[];
|
|
37
|
+
defaultVersions: TemplateListDTO[];
|
|
38
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { SortingOrder } from '../../../Common/Constants';
|
|
2
|
+
import { ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO } from '../../Services';
|
|
3
|
+
import { DeploymentHistoryDetail } from '../CICDHistory';
|
|
4
|
+
import { CollapsibleListConfig, CollapsibleListItem } from '../CollapsibleList';
|
|
5
|
+
import { SelectPickerProps } from '../SelectPicker';
|
|
6
|
+
import { CollapseProps } from '../Collapse';
|
|
7
|
+
|
|
8
|
+
export interface DeploymentConfigType {
|
|
9
|
+
list: DeploymentHistoryDetail;
|
|
10
|
+
heading: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface DeploymentConfigListItem {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
primaryConfig: DeploymentConfigType;
|
|
16
|
+
secondaryConfig: DeploymentConfigType;
|
|
17
|
+
hasDiff?: boolean;
|
|
18
|
+
isDeploymentTemplate?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export type DeploymentConfigDiffSelectPickerProps = {
|
|
21
|
+
type: 'string';
|
|
22
|
+
id: string;
|
|
23
|
+
text: string | React.ReactNode;
|
|
24
|
+
selectPickerProps?: never;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'selectPicker';
|
|
27
|
+
id: string;
|
|
28
|
+
text?: never;
|
|
29
|
+
selectPickerProps: SelectPickerProps;
|
|
30
|
+
};
|
|
31
|
+
export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem, 'href' | 'title' | 'onClick'> {
|
|
32
|
+
hasDiff?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig, 'id' | 'header' | 'noItemsText'> {
|
|
35
|
+
items: DeploymentConfigDiffNavigationItem[];
|
|
36
|
+
}
|
|
37
|
+
export interface DeploymentConfigDiffProps {
|
|
38
|
+
isLoading?: boolean;
|
|
39
|
+
configList: DeploymentConfigListItem[];
|
|
40
|
+
headerText?: string;
|
|
41
|
+
scrollIntoViewId?: string;
|
|
42
|
+
selectorsConfig: {
|
|
43
|
+
primaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
44
|
+
secondaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
45
|
+
};
|
|
46
|
+
sortingConfig?: {
|
|
47
|
+
sortBy: string;
|
|
48
|
+
sortOrder: SortingOrder;
|
|
49
|
+
handleSorting: () => void;
|
|
50
|
+
};
|
|
51
|
+
navList: DeploymentConfigDiffNavigationItem[];
|
|
52
|
+
collapsibleNavList: DeploymentConfigDiffNavigationCollapsibleItem[];
|
|
53
|
+
goBackURL?: string;
|
|
54
|
+
navHeading: string;
|
|
55
|
+
navHelpText?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText'> {
|
|
58
|
+
}
|
|
59
|
+
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'> {
|
|
60
|
+
}
|
|
61
|
+
export interface DeploymentConfigDiffAccordionProps extends Pick<CollapseProps, 'onTransitionEnd'> {
|
|
62
|
+
id: string;
|
|
63
|
+
title: string;
|
|
64
|
+
children: React.ReactNode;
|
|
65
|
+
hasDiff?: boolean;
|
|
66
|
+
isExpanded?: boolean;
|
|
67
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
68
|
+
}
|
|
69
|
+
export type DiffHeadingDataType<DeploymentTemplate> = DeploymentTemplate extends true ? DeploymentTemplateDTO : ConfigMapSecretDataConfigDatumDTO;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { KeyValueTableProps } from './KeyValueTable.types';
|
|
2
2
|
|
|
3
|
-
export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, }: KeyValueTableProps<K>) => JSX.Element;
|
|
3
|
+
export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, showError, validationSchema, errorMessages, onError, }: KeyValueTableProps<K>) => JSX.Element;
|
|
@@ -60,8 +60,10 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
60
60
|
isSortable?: boolean;
|
|
61
61
|
/** An optional React node for a custom header component. */
|
|
62
62
|
headerComponent?: ReactNode;
|
|
63
|
-
/** When true, data addition field will not be shown */
|
|
63
|
+
/** When true, data addition field will not be shown. */
|
|
64
64
|
isAdditionNotAllowed?: boolean;
|
|
65
|
+
/** When true, data add or update is disabled. */
|
|
66
|
+
readOnly?: boolean;
|
|
65
67
|
/**
|
|
66
68
|
* An optional function to handle changes in the table rows.
|
|
67
69
|
* @param rowId - The id of the row that changed.
|
|
@@ -74,4 +76,25 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
74
76
|
* @param deletedRowIndex - The index of the row that was deleted.
|
|
75
77
|
*/
|
|
76
78
|
onDelete?: (deletedRowId: string | number) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Indicates whether to show errors.
|
|
81
|
+
*/
|
|
82
|
+
showError?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* The function to use to validate the value of the cell.
|
|
85
|
+
* @param value - The value to validate.
|
|
86
|
+
* @param key - The row key of the value.
|
|
87
|
+
* @returns Return true if the value is valid, otherwise false
|
|
88
|
+
* and set `showError` to `true` and provide errorMessages array to show error message.
|
|
89
|
+
*/
|
|
90
|
+
validationSchema?: (value: string, key: K) => boolean;
|
|
91
|
+
/**
|
|
92
|
+
* An array of error messages to be displayed in the cell error tooltip.
|
|
93
|
+
*/
|
|
94
|
+
errorMessages?: string[];
|
|
95
|
+
/**
|
|
96
|
+
* A callback function called when an error occurs.
|
|
97
|
+
* @param errorState - The error state, true when any cell has error, otherwise false.
|
|
98
|
+
*/
|
|
99
|
+
onError?: (errorState: boolean) => void;
|
|
77
100
|
}
|
|
@@ -81,5 +81,5 @@ import { SelectPickerProps } from './type';
|
|
|
81
81
|
* <SelectPicker ... showSelectedOptionsCount />
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
|
84
|
-
declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, ...props }: SelectPickerProps) => JSX.Element;
|
|
84
|
+
declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, variant, ...props }: SelectPickerProps) => JSX.Element;
|
|
85
85
|
export default SelectPicker;
|
|
@@ -6,5 +6,5 @@ export declare const SelectPickerClearIndicator: (props: ClearIndicatorProps<Sel
|
|
|
6
6
|
export declare const SelectPickerControl: ({ icon, showSelectedOptionIcon, ...props }: ControlProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'icon' | 'showSelectedOptionIcon'>) => JSX.Element;
|
|
7
7
|
export declare const SelectPickerValueContainer: ({ showSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'showSelectedOptionsCount'>) => JSX.Element;
|
|
8
8
|
export declare const SelectPickerLoadingIndicator: () => JSX.Element;
|
|
9
|
-
export declare const SelectPickerOption: (props: OptionProps<SelectPickerOptionType>) => JSX.Element;
|
|
9
|
+
export declare const SelectPickerOption: ({ disableDescriptionEllipsis }: SelectPickerProps) => (props: OptionProps<SelectPickerOptionType>) => JSX.Element;
|
|
10
10
|
export declare const SelectPickerMenuList: ({ renderMenuListFooter, ...props }: MenuListProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'renderMenuListFooter'>) => JSX.Element;
|
|
@@ -17,6 +17,10 @@ export interface SelectPickerOptionType extends OptionType<number | string, Reac
|
|
|
17
17
|
*/
|
|
18
18
|
endIcon?: ReactElement;
|
|
19
19
|
}
|
|
20
|
+
export declare enum SelectPickerVariantType {
|
|
21
|
+
DEFAULT = "default",
|
|
22
|
+
BORDERLESS = "borderless"
|
|
23
|
+
}
|
|
20
24
|
type SelectProps = ReactSelectProps<SelectPickerOptionType>;
|
|
21
25
|
export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'isLoading' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder'>, Required<Pick<SelectProps, 'classNamePrefix' | 'inputId' | 'name'>> {
|
|
22
26
|
/**
|
|
@@ -70,5 +74,17 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
|
|
|
70
74
|
* @default 'ComponentSizeType.small'
|
|
71
75
|
*/
|
|
72
76
|
menuSize?: ComponentSizeType;
|
|
77
|
+
/**
|
|
78
|
+
* Variant of the select.
|
|
79
|
+
*
|
|
80
|
+
* @default SelectPickerVariantType.DEFAULT
|
|
81
|
+
*/
|
|
82
|
+
variant?: SelectPickerVariantType;
|
|
83
|
+
/**
|
|
84
|
+
* Disables the ellipsis on description, it will be shown in full width, wrapped if required.
|
|
85
|
+
*
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
disableDescriptionEllipsis?: boolean;
|
|
73
89
|
}
|
|
74
90
|
export {};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import { StylesConfig } from 'react-select';
|
|
1
|
+
import { GroupBase, OptionsOrGroups, StylesConfig } from 'react-select';
|
|
2
2
|
import { SelectPickerOptionType, SelectPickerProps } from './type';
|
|
3
3
|
|
|
4
|
-
export declare const getCommonSelectStyle: ({ error, size, menuSize, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize'>) => StylesConfig<SelectPickerOptionType>;
|
|
4
|
+
export declare const getCommonSelectStyle: ({ error, size, menuSize, variant, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize' | 'variant'>) => StylesConfig<SelectPickerOptionType>;
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves an option from the options list based on the provided value.
|
|
7
|
+
*
|
|
8
|
+
* @param optionsList - The list of options or groups of options.
|
|
9
|
+
* @param value - The value to compare against the options' values.
|
|
10
|
+
* @param defaultOption - The default option to return if no match is found.
|
|
11
|
+
* @returns The matched option or the default option if no match is found.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getSelectPickerOptionByValue: (optionsList: OptionsOrGroups<SelectPickerOptionType, GroupBase<SelectPickerOptionType>>, value: string | number, defaultOption?: SelectPickerOptionType) => SelectPickerOptionType;
|
|
@@ -33,4 +33,7 @@ export * from './IframeContainer';
|
|
|
33
33
|
export * from './Plugin';
|
|
34
34
|
export * from './KeyValueTable';
|
|
35
35
|
export * from './SelectPicker';
|
|
36
|
+
export * from './CollapsibleList';
|
|
37
|
+
export * from './DeploymentConfigDiff';
|
|
36
38
|
export * from './DetectBottom';
|
|
39
|
+
export * from './Collapse';
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
+
import { Pair } from 'yaml';
|
|
2
3
|
import { MaterialInfo, SortingOrder } from '../Common';
|
|
3
4
|
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
|
|
4
5
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
|
@@ -25,6 +26,7 @@ export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTrigge
|
|
|
25
26
|
export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
|
|
26
27
|
export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrder?: SortingOrder) => number;
|
|
27
28
|
export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
|
|
29
|
+
export declare const yamlComparatorBySortOrder: (a: Pair, b: Pair, sortOrder?: SortingOrder) => number;
|
|
28
30
|
export declare const useIntersection: (target: React.RefObject<Element> | Element | null, options?: IntersectionOptions, callback?: IntersectionChangeHandler) => boolean;
|
|
29
31
|
export declare const isNullOrUndefined: (value: unknown) => boolean;
|
|
30
32
|
export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResponseType } from '../../Common';
|
|
2
|
+
import { CIMaterialInfoType, GetCITriggerInfoParamsType, AppEnvDeploymentConfigDTO, AppEnvDeploymentConfigPayloadType } from './app.types';
|
|
2
3
|
|
|
3
4
|
export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => Promise<CIMaterialInfoType>;
|
|
4
5
|
/**
|
|
5
6
|
* The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
|
|
6
7
|
*/
|
|
7
8
|
export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, 'ciArtifactId'>) => Promise<CIMaterialInfoType>;
|
|
9
|
+
export declare const getAppEnvDeploymentConfig: (params: AppEnvDeploymentConfigPayloadType, signal?: AbortSignal) => Promise<ResponseType<AppEnvDeploymentConfigDTO>>;
|
|
@@ -93,4 +93,120 @@ export interface GetCITriggerInfoParamsType {
|
|
|
93
93
|
envId: number | string;
|
|
94
94
|
ciArtifactId: number | string;
|
|
95
95
|
}
|
|
96
|
+
export declare enum AppEnvDeploymentConfigType {
|
|
97
|
+
PUBLISHED_ONLY = "PublishedOnly",
|
|
98
|
+
DRAFT_ONLY = "DraftOnly",
|
|
99
|
+
PUBLISHED_WITH_DRAFT = "PublishedWithDraft",
|
|
100
|
+
PREVIOUS_DEPLOYMENTS = "PreviousDeployments",
|
|
101
|
+
DEFAULT_VERSION = "DefaultVersion"
|
|
102
|
+
}
|
|
103
|
+
export interface DraftMetadataDTO {
|
|
104
|
+
appId: number;
|
|
105
|
+
envId: number;
|
|
106
|
+
resource: number;
|
|
107
|
+
resourceName: string;
|
|
108
|
+
action: number;
|
|
109
|
+
data: string;
|
|
110
|
+
userComment: string;
|
|
111
|
+
changeProposed: boolean;
|
|
112
|
+
protectNotificationConfig: {
|
|
113
|
+
[key: string]: null;
|
|
114
|
+
};
|
|
115
|
+
draftId: number;
|
|
116
|
+
draftVersionId: number;
|
|
117
|
+
draftState: number;
|
|
118
|
+
approvers: string[];
|
|
119
|
+
canApprove: boolean;
|
|
120
|
+
commentsCount: number;
|
|
121
|
+
dataEncrypted: boolean;
|
|
122
|
+
isAppAdmin: boolean;
|
|
123
|
+
}
|
|
124
|
+
export interface ConfigDatum {
|
|
125
|
+
name: string;
|
|
126
|
+
type: string;
|
|
127
|
+
external: boolean;
|
|
128
|
+
data: Record<string, string>;
|
|
129
|
+
defaultData: Record<string, string>;
|
|
130
|
+
global: boolean;
|
|
131
|
+
externalType: string;
|
|
132
|
+
esoSecretData: {};
|
|
133
|
+
defaultESOSecretData: {};
|
|
134
|
+
secretData: Record<string, string>;
|
|
135
|
+
defaultSecretData: Record<string, string>;
|
|
136
|
+
roleARN: string;
|
|
137
|
+
subPath: boolean;
|
|
138
|
+
filePermission: string;
|
|
139
|
+
overridden: boolean;
|
|
140
|
+
mountPath?: string;
|
|
141
|
+
defaultMountPath?: string;
|
|
142
|
+
}
|
|
143
|
+
export interface ConfigMapSecretDataConfigDatumDTO extends ConfigDatum {
|
|
144
|
+
draftMetadata: DraftMetadataDTO;
|
|
145
|
+
}
|
|
146
|
+
export interface ConfigMapSecretDataType {
|
|
147
|
+
id: number;
|
|
148
|
+
appId: number;
|
|
149
|
+
configData: ConfigMapSecretDataConfigDatumDTO[];
|
|
150
|
+
}
|
|
151
|
+
export declare enum ConfigResourceType {
|
|
152
|
+
ConfigMap = "ConfigMap",
|
|
153
|
+
Secret = "Secret",
|
|
154
|
+
DeploymentTemplate = "Deployment Template"
|
|
155
|
+
}
|
|
156
|
+
export interface DeploymentTemplateDTO {
|
|
157
|
+
resourceType: ConfigResourceType.DeploymentTemplate;
|
|
158
|
+
data: {
|
|
159
|
+
[key: string]: any;
|
|
160
|
+
};
|
|
161
|
+
deploymentDraftData: ConfigMapSecretDataType | null;
|
|
162
|
+
}
|
|
163
|
+
export interface ConfigMapSecretDataDTO {
|
|
164
|
+
resourceType: Extract<ConfigResourceType, ConfigResourceType.ConfigMap | ConfigResourceType.Secret>;
|
|
165
|
+
data: ConfigMapSecretDataType;
|
|
166
|
+
}
|
|
167
|
+
export interface AppEnvDeploymentConfigDTO {
|
|
168
|
+
deploymentTemplate: DeploymentTemplateDTO | null;
|
|
169
|
+
configMapData: ConfigMapSecretDataDTO | null;
|
|
170
|
+
secretsData: ConfigMapSecretDataDTO | null;
|
|
171
|
+
isAppAdmin: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface AppEnvDeploymentConfigPayloadType {
|
|
174
|
+
appName: string;
|
|
175
|
+
envName: string;
|
|
176
|
+
configType: AppEnvDeploymentConfigType;
|
|
177
|
+
identifierId?: number;
|
|
178
|
+
pipelineId?: number;
|
|
179
|
+
resourceType?: ConfigResourceType;
|
|
180
|
+
resourceId?: number;
|
|
181
|
+
resourceName?: string;
|
|
182
|
+
}
|
|
183
|
+
export declare enum TemplateListType {
|
|
184
|
+
DefaultVersions = 1,
|
|
185
|
+
PublishedOnEnvironments = 2,
|
|
186
|
+
DeployedOnSelfEnvironment = 3,
|
|
187
|
+
DeployedOnOtherEnvironment = 4
|
|
188
|
+
}
|
|
189
|
+
export interface TemplateListDTO {
|
|
190
|
+
chartRefId: number;
|
|
191
|
+
chartVersion?: string;
|
|
192
|
+
chartType?: string;
|
|
193
|
+
type: TemplateListType;
|
|
194
|
+
environmentId?: number;
|
|
195
|
+
environmentName?: string;
|
|
196
|
+
deploymentTemplateHistoryId?: number;
|
|
197
|
+
finishedOn?: string;
|
|
198
|
+
status?: string;
|
|
199
|
+
pipelineId?: number;
|
|
200
|
+
}
|
|
201
|
+
export declare enum DraftState {
|
|
202
|
+
Init = 1,
|
|
203
|
+
Discarded = 2,
|
|
204
|
+
Published = 3,
|
|
205
|
+
AwaitApproval = 4
|
|
206
|
+
}
|
|
207
|
+
export declare enum EnvResourceType {
|
|
208
|
+
ConfigMap = "configmap",
|
|
209
|
+
Secret = "secrets",
|
|
210
|
+
DeploymentTemplate = "deployment-template"
|
|
211
|
+
}
|
|
96
212
|
export {};
|