@devtron-labs/devtron-fe-common-lib 0.2.2-beta-18 → 0.2.2-beta-19
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/Common.service.d.ts +0 -6
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/Types.d.ts +1 -2
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +3 -1
- 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 +7 -28
- 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/Shared/constants.d.ts +0 -4
- package/dist/Shared/types.d.ts +0 -12
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-f6fa999d.js → cssMode-6a8b9290.js} +1 -1
- package/dist/{freemarker2-3203ec71.js → freemarker2-8e09728a.js} +1 -1
- package/dist/{handlebars-eadd4a6d.js → handlebars-ef2bcd2b.js} +1 -1
- package/dist/{html-67a5c0bb.js → html-ac547ea8.js} +1 -1
- package/dist/{htmlMode-8f976129.js → htmlMode-c5c2449d.js} +1 -1
- package/dist/{index-39461e67.js → index-cf607945.js} +28707 -28139
- package/dist/index.js +489 -477
- package/dist/{javascript-a9273fd9.js → javascript-29e0db7f.js} +1 -1
- package/dist/{jsonMode-126fbf89.js → jsonMode-e7628888.js} +1 -1
- package/dist/{liquid-c25ab708.js → liquid-1b0faea4.js} +1 -1
- package/dist/{mdx-f6c6e820.js → mdx-98617059.js} +1 -1
- package/dist/{python-7669ec41.js → python-9545a33d.js} +1 -1
- package/dist/{razor-42f2a5ac.js → razor-1d8c016a.js} +1 -1
- package/dist/{tsMode-a8fecce9.js → tsMode-d7ee203e.js} +1 -1
- package/dist/{typescript-67a132cc.js → typescript-7771c39f.js} +1 -1
- package/dist/{xml-3ff482a1.js → xml-31f475ae.js} +1 -1
- package/dist/{yaml-da2b5f23.js → yaml-f6000d2b.js} +1 -1
- package/package.json +1 -1
- package/dist/Shared/Components/KeyValueTable/constants.d.ts +0 -2
- package/dist/assets/editor.worker-60ba9509.js +0 -12
- package/dist/assets/yaml.worker-3bbe780a.js +0 -472
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RuntimeParamsAPIResponseType } from '../Shared/types';
|
|
2
1
|
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
|
|
3
2
|
import { ApiResourceType } from '../Pages';
|
|
4
3
|
|
|
@@ -16,11 +15,6 @@ export declare const SourceTypeMap: {
|
|
|
16
15
|
};
|
|
17
16
|
export declare function getUserRole(appName?: string): Promise<UserRole>;
|
|
18
17
|
export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
|
|
19
|
-
export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => {
|
|
20
|
-
key: string;
|
|
21
|
-
value: string;
|
|
22
|
-
id: number;
|
|
23
|
-
}[];
|
|
24
18
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
|
25
19
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
|
26
20
|
export declare function extractImage(image: string): string;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties } from 'react';
|
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
3
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
4
4
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
|
|
5
|
-
import { RegistryType
|
|
5
|
+
import { RegistryType } from '../Shared';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Generic response type object with support for overriding the result type
|
|
@@ -546,7 +546,6 @@ export interface CDMaterialsMetaInfo {
|
|
|
546
546
|
* This is the ID of user that has request the material
|
|
547
547
|
*/
|
|
548
548
|
requestedUserId: number;
|
|
549
|
-
runtimeParams: RuntimeParamsListItemType[];
|
|
550
549
|
}
|
|
551
550
|
export interface ImagePromotionMaterialInfo {
|
|
552
551
|
isApprovalPendingForPromotion: boolean;
|
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;
|
|
@@ -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, readOnly, showError, validationSchema
|
|
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;
|
|
@@ -36,29 +36,6 @@ export interface KeyValueConfig<K extends string> {
|
|
|
36
36
|
/** An array of key-value rows. */
|
|
37
37
|
rows: KeyValueRow<K>[];
|
|
38
38
|
}
|
|
39
|
-
type ErrorUIProps = {
|
|
40
|
-
/**
|
|
41
|
-
* Indicates whether to show errors.
|
|
42
|
-
*/
|
|
43
|
-
showError: true;
|
|
44
|
-
/**
|
|
45
|
-
* @default - false
|
|
46
|
-
* If true, would validate for duplicate keys and if present would show error tooltip on the cell.
|
|
47
|
-
*/
|
|
48
|
-
validateDuplicateKeys?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* @default - false
|
|
51
|
-
* If true, would validate for rows having values but no key and if error would show error tooltip on the cell.
|
|
52
|
-
*/
|
|
53
|
-
validateEmptyKeys?: boolean;
|
|
54
|
-
} | {
|
|
55
|
-
/**
|
|
56
|
-
* Indicates whether to show errors.
|
|
57
|
-
*/
|
|
58
|
-
showError?: false;
|
|
59
|
-
validateDuplicateKeys?: never;
|
|
60
|
-
validateEmptyKeys?: never;
|
|
61
|
-
};
|
|
62
39
|
/**
|
|
63
40
|
* Type representing a mask for key-value pairs.
|
|
64
41
|
* @template K - A string representing the key type.
|
|
@@ -73,7 +50,7 @@ export type KeyValuePlaceholder<K extends string> = {
|
|
|
73
50
|
* Interface representing the properties for a key-value table component.
|
|
74
51
|
* @template K - A string representing the key type.
|
|
75
52
|
*/
|
|
76
|
-
export
|
|
53
|
+
export interface KeyValueTableProps<K extends string> {
|
|
77
54
|
/** The configuration for the key-value table. */
|
|
78
55
|
config: KeyValueConfig<K>;
|
|
79
56
|
/** An optional mask for the key-value pairs. */
|
|
@@ -99,15 +76,18 @@ export type KeyValueTableProps<K extends string> = {
|
|
|
99
76
|
* @param deletedRowIndex - The index of the row that was deleted.
|
|
100
77
|
*/
|
|
101
78
|
onDelete?: (deletedRowId: string | number) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Indicates whether to show errors.
|
|
81
|
+
*/
|
|
82
|
+
showError?: boolean;
|
|
102
83
|
/**
|
|
103
84
|
* The function to use to validate the value of the cell.
|
|
104
85
|
* @param value - The value to validate.
|
|
105
86
|
* @param key - The row key of the value.
|
|
106
|
-
* @param rowId - The id of the row.
|
|
107
87
|
* @returns Return true if the value is valid, otherwise false
|
|
108
88
|
* and set `showError` to `true` and provide errorMessages array to show error message.
|
|
109
89
|
*/
|
|
110
|
-
validationSchema?: (value: string, key: K
|
|
90
|
+
validationSchema?: (value: string, key: K) => boolean;
|
|
111
91
|
/**
|
|
112
92
|
* An array of error messages to be displayed in the cell error tooltip.
|
|
113
93
|
*/
|
|
@@ -117,5 +97,4 @@ export type KeyValueTableProps<K extends string> = {
|
|
|
117
97
|
* @param errorState - The error state, true when any cell has error, otherwise false.
|
|
118
98
|
*/
|
|
119
99
|
onError?: (errorState: boolean) => void;
|
|
120
|
-
}
|
|
121
|
-
export {};
|
|
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 {};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { OptionType } from '../Common/Types';
|
|
2
|
-
import { CDMaterialSidebarType } from './types';
|
|
3
|
-
|
|
4
1
|
export declare const ARTIFACT_STATUS: {
|
|
5
2
|
PROGRESSING: string;
|
|
6
3
|
DEGRADED: string;
|
|
@@ -400,4 +397,3 @@ export declare enum SelectAllGroupedResourceIdentifiers {
|
|
|
400
397
|
allExistingAndFutureProdEnvironments = "-2",
|
|
401
398
|
allExistingAndFutureEnvironments = "-3"
|
|
402
399
|
}
|
|
403
|
-
export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
|