@devtron-labs/devtron-fe-common-lib 0.2.20-beta-3 → 0.2.20-beta-6
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/Api.d.ts +5 -5
- package/dist/Common/CIPipeline.Types.d.ts +4 -1
- package/dist/Common/Common.service.d.ts +0 -2
- package/dist/Common/Constants.d.ts +2 -0
- package/dist/Common/CustomInput/Types.d.ts +2 -2
- package/dist/Common/Modals/VisibleModal.d.ts +1 -1
- package/dist/Common/Modals/VisibleModal2.d.ts +1 -1
- package/dist/Common/Types.d.ts +4 -5
- package/dist/Shared/Components/DetectBottom/DetectBottom.component.d.ts +2 -1
- package/dist/Shared/Components/EditImageFormField/EditImageFormField.d.ts +19 -0
- package/dist/Shared/Components/EditImageFormField/constants.d.ts +7 -0
- package/dist/Shared/Components/EditImageFormField/index.d.ts +2 -0
- package/dist/Shared/Components/EditImageFormField/types.d.ts +41 -0
- package/dist/Shared/Components/Header/types.d.ts +1 -12
- 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/Plugin/service.d.ts +4 -2
- package/dist/Shared/Components/Plugin/types.d.ts +11 -3
- package/dist/Shared/Components/Plugin/utils.d.ts +3 -0
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +10 -1
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/constants.d.ts +1 -4
- package/dist/Shared/types.d.ts +0 -12
- package/dist/Shared/validations.d.ts +11 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-1dd94185.js → cssMode-abdcccf5.js} +1 -1
- package/dist/{freemarker2-bb644967.js → freemarker2-bf4be552.js} +1 -1
- package/dist/{handlebars-e373f536.js → handlebars-94f1621b.js} +1 -1
- package/dist/{html-9bda5693.js → html-4e056f6c.js} +1 -1
- package/dist/{htmlMode-cf63acf9.js → htmlMode-68b378dd.js} +1 -1
- package/dist/{index-65359b3e.js → index-e0311de1.js} +23805 -23681
- package/dist/index.js +468 -465
- package/dist/{javascript-25356a92.js → javascript-cc367927.js} +1 -1
- package/dist/{jsonMode-48aa45a3.js → jsonMode-56dd7bb3.js} +1 -1
- package/dist/{liquid-b31592cc.js → liquid-209b9b91.js} +1 -1
- package/dist/{mdx-735fc5c2.js → mdx-dafa02d0.js} +1 -1
- package/dist/{python-e1a114b4.js → python-12777efa.js} +1 -1
- package/dist/{razor-bf5217e7.js → razor-6139cfce.js} +1 -1
- package/dist/{tsMode-f2ae6c6f.js → tsMode-ba35da23.js} +1 -1
- package/dist/{typescript-275d8677.js → typescript-6933c4df.js} +1 -1
- package/dist/{xml-e46d3508.js → xml-37129651.js} +1 -1
- package/dist/{yaml-27e8c621.js → yaml-a068b958.js} +1 -1
- package/package.json +1 -1
- package/dist/Shared/Components/KeyValueTable/constants.d.ts +0 -2
package/dist/Common/Api.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
2
|
import { ResponseType, APIOptions } from './Types';
|
|
3
3
|
|
|
4
|
-
export declare const post: (url: string, data:
|
|
5
|
-
export declare const put: (url: string, data:
|
|
6
|
-
export declare const patch: (url: string, data:
|
|
7
|
-
export declare const get: (url: string, options?: APIOptions) => Promise<ResponseType
|
|
8
|
-
export declare const trash: (url: string, data?:
|
|
4
|
+
export declare const post: <T = any, K = object>(url: string, data: K, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType<T>>;
|
|
5
|
+
export declare const put: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
|
|
6
|
+
export declare const patch: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
|
|
7
|
+
export declare const get: <T = any>(url: string, options?: APIOptions) => Promise<ResponseType<T>>;
|
|
8
|
+
export declare const trash: <T = any, K = object>(url: string, data?: K, options?: APIOptions) => Promise<ResponseType<T>>;
|
|
9
9
|
/**
|
|
10
10
|
* Aborts the previous request before triggering next request
|
|
11
11
|
*/
|
|
@@ -77,6 +77,7 @@ export interface VariableType {
|
|
|
77
77
|
format: string;
|
|
78
78
|
description: string;
|
|
79
79
|
defaultValue: string;
|
|
80
|
+
allowEmptyValue: boolean;
|
|
80
81
|
variableType: RefVariableType;
|
|
81
82
|
refVariableStepIndex: number;
|
|
82
83
|
refVariableName: string;
|
|
@@ -98,7 +99,7 @@ interface ConditionDetails {
|
|
|
98
99
|
conditionType: ConditionType;
|
|
99
100
|
conditionalValue: string;
|
|
100
101
|
}
|
|
101
|
-
interface InlineStepDetailType {
|
|
102
|
+
export interface InlineStepDetailType {
|
|
102
103
|
scriptType: ScriptType;
|
|
103
104
|
isMountCustomScript?: boolean;
|
|
104
105
|
script?: string;
|
|
@@ -117,6 +118,8 @@ interface InlineStepDetailType {
|
|
|
117
118
|
inputVariables?: VariableType[];
|
|
118
119
|
outputVariables?: VariableType[];
|
|
119
120
|
conditionDetails: ConditionDetails[];
|
|
121
|
+
storeScriptAt?: string;
|
|
122
|
+
mountCodeToContainerPath?: string;
|
|
120
123
|
}
|
|
121
124
|
interface PluginRefStepDetailType {
|
|
122
125
|
id: number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } 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,7 +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) => RuntimeParamsListItemType[];
|
|
20
18
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
|
21
19
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
|
22
20
|
export declare function extractImage(image: string): string;
|
|
@@ -86,6 +86,7 @@ export declare const ROUTES: {
|
|
|
86
86
|
PLUGIN_GLOBAL_LIST_DETAIL_V2: string;
|
|
87
87
|
PLUGIN_GLOBAL_LIST_V2: string;
|
|
88
88
|
PLUGIN_GLOBAL_LIST_TAGS: string;
|
|
89
|
+
PLUGIN_LIST_MIN: string;
|
|
89
90
|
DEPLOYMENT_CHARTS_LIST: string;
|
|
90
91
|
USER_LIST_MIN: string;
|
|
91
92
|
CONFIG_DATA: string;
|
|
@@ -278,6 +279,7 @@ export declare const DATE_TIME_FORMATS: {
|
|
|
278
279
|
DD_MMM_YYYY_HH_MM: string;
|
|
279
280
|
DD_MMM_YYYY: string;
|
|
280
281
|
};
|
|
282
|
+
export declare const SEMANTIC_VERSION_DOCUMENTATION_LINK = "https://semver.org/";
|
|
281
283
|
export declare const VULNERABILITIES_SORT_PRIORITY: {
|
|
282
284
|
critical: number;
|
|
283
285
|
high: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React, HTMLInputTypeAttribute, InputHTMLAttributes } from 'react';
|
|
1
|
+
import { default as React, HTMLInputTypeAttribute, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface CustomInputProps {
|
|
4
4
|
name: string;
|
|
@@ -17,7 +17,7 @@ export interface CustomInputProps {
|
|
|
17
17
|
autoFocus?: boolean;
|
|
18
18
|
rootClassName?: string;
|
|
19
19
|
error?: string[] | string;
|
|
20
|
-
helperText?:
|
|
20
|
+
helperText?: ReactNode;
|
|
21
21
|
handleOnBlur?: (e: any) => void;
|
|
22
22
|
readOnly?: boolean;
|
|
23
23
|
noTrim?: boolean;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React, ReactNode, CSSProperties } from 'react';
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
|
-
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
|
4
3
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
5
4
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
|
|
6
|
-
import {
|
|
5
|
+
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
|
6
|
+
import { RegistryType, Severity } from '../Shared';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Generic response type object with support for overriding the result type
|
|
@@ -178,10 +178,10 @@ export interface RadioGroupItemProps {
|
|
|
178
178
|
export interface RadioGroupInterface {
|
|
179
179
|
name: string;
|
|
180
180
|
onChange: any;
|
|
181
|
-
className?: string;
|
|
182
181
|
initialTab: string;
|
|
183
|
-
disabled: boolean;
|
|
184
182
|
children: ReactNode;
|
|
183
|
+
disabled?: boolean;
|
|
184
|
+
className?: string;
|
|
185
185
|
}
|
|
186
186
|
export interface RadioInterface {
|
|
187
187
|
children: ReactNode;
|
|
@@ -597,7 +597,6 @@ export interface CDMaterialsMetaInfo {
|
|
|
597
597
|
* This is the ID of user that has request the material
|
|
598
598
|
*/
|
|
599
599
|
requestedUserId: number;
|
|
600
|
-
runtimeParams: RuntimeParamsListItemType[];
|
|
601
600
|
}
|
|
602
601
|
export interface ImagePromotionMaterialInfo {
|
|
603
602
|
isApprovalPendingForPromotion: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface DetectBottomProps {
|
|
2
2
|
callback: () => void;
|
|
3
|
+
hasError?: boolean;
|
|
3
4
|
}
|
|
4
|
-
declare const DetectBottom: ({ callback }: DetectBottomProps) => JSX.Element;
|
|
5
|
+
declare const DetectBottom: ({ callback, hasError }: DetectBottomProps) => JSX.Element;
|
|
5
6
|
export default DetectBottom;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EditImageFormFieldProps } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* <EditImageFormField
|
|
7
|
+
* url={icon}
|
|
8
|
+
* defaultIcon={<ICSampleIcon className="w-100 h-100 dc__opacity-1 p-5" />}
|
|
9
|
+
* errorMessage={formError.icon}
|
|
10
|
+
* handleError={handleError}
|
|
11
|
+
* handleURLChange={handleURLChange}
|
|
12
|
+
* ariaLabelPrefix="Edit icon url"
|
|
13
|
+
* dataTestIdPrefix="edit-icon-url"
|
|
14
|
+
* altText="Form icon"
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare const EditImageFormField: ({ defaultIcon, errorMessage, handleError, url, handleURLChange, ariaLabelPrefix, dataTestIdPrefix, altText, }: EditImageFormFieldProps) => JSX.Element;
|
|
19
|
+
export default EditImageFormField;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const DEFAULT_MAX_IMAGE_SIZE: number;
|
|
2
|
+
export declare const DEFAULT_IMAGE_DIMENSIONS: {
|
|
3
|
+
readonly width: 72;
|
|
4
|
+
readonly height: 72;
|
|
5
|
+
};
|
|
6
|
+
export declare const EMPTY_PREVIEW_URL_ERROR_MESSAGE = "Please provide image URL to preview";
|
|
7
|
+
export declare const BASE_IMAGE_CLASS = "edit-image-form-field__figure-container--base-image";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface EditImageFormFieldProps {
|
|
4
|
+
/**
|
|
5
|
+
* Fallback icon to be shown when image is not available
|
|
6
|
+
*/
|
|
7
|
+
defaultIcon: ReactElement;
|
|
8
|
+
/**
|
|
9
|
+
* Would be shown below input, there are two types of error messages:
|
|
10
|
+
* External - Error message handled from state above and would propagate to parent through handleError
|
|
11
|
+
* Internal - Error message handled internally and would not propagate to parent, like empty preview URL
|
|
12
|
+
*/
|
|
13
|
+
errorMessage: string;
|
|
14
|
+
/**
|
|
15
|
+
* Would be called when there is an error in the image URL during handleChange or handlePreviewImage
|
|
16
|
+
*/
|
|
17
|
+
handleError: (error: string) => void;
|
|
18
|
+
/**
|
|
19
|
+
* The current value of input field
|
|
20
|
+
*/
|
|
21
|
+
url: string;
|
|
22
|
+
/**
|
|
23
|
+
* Would be called when the URL is changed in the input field
|
|
24
|
+
*/
|
|
25
|
+
handleURLChange: (url: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* The alt text for the image
|
|
28
|
+
*/
|
|
29
|
+
altText: string;
|
|
30
|
+
/**
|
|
31
|
+
* Prefix for aria-label
|
|
32
|
+
*/
|
|
33
|
+
ariaLabelPrefix: string;
|
|
34
|
+
/**
|
|
35
|
+
* Prefix for data-testid
|
|
36
|
+
*/
|
|
37
|
+
dataTestIdPrefix: string;
|
|
38
|
+
}
|
|
39
|
+
export interface FallbackImageProps extends Pick<EditImageFormFieldProps, 'defaultIcon'> {
|
|
40
|
+
showEditIcon: boolean;
|
|
41
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ModuleStatus } from '../../types';
|
|
1
2
|
import { ResponseType, TippyCustomizedProps } from '../../../Common';
|
|
2
3
|
|
|
3
4
|
export declare enum InstallationType {
|
|
@@ -5,18 +6,6 @@ export declare enum InstallationType {
|
|
|
5
6
|
OSS_HELM = "oss_helm",
|
|
6
7
|
ENTERPRISE = "enterprise"
|
|
7
8
|
}
|
|
8
|
-
export declare enum ModuleStatus {
|
|
9
|
-
HEALTHY = "healthy",
|
|
10
|
-
NONE = "none",
|
|
11
|
-
UNKNOWN = "unknown",
|
|
12
|
-
UPGRADING = "upgrading",
|
|
13
|
-
UPGRADE_FAILED = "upgradeFailed",
|
|
14
|
-
INSTALLED = "installed",
|
|
15
|
-
INSTALLING = "installing",
|
|
16
|
-
INSTALL_FAILED = "installFailed",
|
|
17
|
-
NOT_INSTALLED = "notInstalled",
|
|
18
|
-
TIMEOUT = "timeout"
|
|
19
|
-
}
|
|
20
9
|
export interface PageHeaderType {
|
|
21
10
|
headerName?: string;
|
|
22
11
|
showTabs?: boolean;
|
|
@@ -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
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResponseType } from '../../../Common';
|
|
2
|
+
import { GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, MinParentPluginDTO, PluginDetailServiceParamsType } from './types';
|
|
2
3
|
|
|
3
|
-
export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, shouldShowError, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, 'pluginStore'>>;
|
|
4
|
+
export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, signal, shouldShowError, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, 'pluginStore'>>;
|
|
4
5
|
export declare const getPluginStoreData: ({ searchKey, selectedTags, appId, offset, signal, }: GetPluginStoreDataServiceParamsType) => Promise<GetPluginStoreDataReturnType>;
|
|
5
6
|
export declare const getAvailablePluginTags: (appId: number) => Promise<string[]>;
|
|
7
|
+
export declare const getParentPluginList: (appId?: number) => Promise<ResponseType<MinParentPluginDTO[]>>;
|
|
@@ -8,9 +8,13 @@ export declare enum PluginCreationType {
|
|
|
8
8
|
SHARED = "SHARED",
|
|
9
9
|
PRESET = "PRESET"
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface PluginAPIBaseQueryParamsType {
|
|
12
12
|
appId: number;
|
|
13
13
|
}
|
|
14
|
+
export interface GetPluginTagsPayloadType extends PluginAPIBaseQueryParamsType {
|
|
15
|
+
}
|
|
16
|
+
export interface GetParentPluginListPayloadType extends PluginAPIBaseQueryParamsType {
|
|
17
|
+
}
|
|
14
18
|
export interface PluginTagNamesDTO {
|
|
15
19
|
tagNames: string[];
|
|
16
20
|
}
|
|
@@ -45,6 +49,9 @@ export interface ParentPluginDTO {
|
|
|
45
49
|
type: PluginCreationType;
|
|
46
50
|
icon: string;
|
|
47
51
|
pluginVersions: PluginVersionsDTO;
|
|
52
|
+
pluginIdentifier: string;
|
|
53
|
+
}
|
|
54
|
+
export interface MinParentPluginDTO extends Pick<ParentPluginDTO, 'id' | 'name' | 'icon'> {
|
|
48
55
|
}
|
|
49
56
|
export interface PluginDetailDTO {
|
|
50
57
|
parentPlugins: ParentPluginDTO[];
|
|
@@ -58,6 +65,7 @@ export interface PluginDetailServiceParamsType {
|
|
|
58
65
|
* @default true
|
|
59
66
|
*/
|
|
60
67
|
shouldShowError?: boolean;
|
|
68
|
+
signal?: AbortSignal;
|
|
61
69
|
}
|
|
62
70
|
export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsType, 'appId'> {
|
|
63
71
|
pluginId?: PluginDetailServiceParamsType['pluginIds'];
|
|
@@ -66,11 +74,11 @@ export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsT
|
|
|
66
74
|
export interface PluginListFiltersType extends Pick<BaseFilterQueryParams<unknown>, 'searchKey'> {
|
|
67
75
|
selectedTags: string[];
|
|
68
76
|
}
|
|
69
|
-
interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon'> {
|
|
77
|
+
interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon' | 'pluginIdentifier'> {
|
|
70
78
|
latestVersionId: MinimalPluginVersionDataDTO['id'];
|
|
71
79
|
pluginVersions: MinimalPluginVersionDataDTO[];
|
|
72
80
|
}
|
|
73
|
-
interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type'> {
|
|
81
|
+
interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type' | 'pluginIdentifier'> {
|
|
74
82
|
parentPluginId: ParentPluginType['id'];
|
|
75
83
|
}
|
|
76
84
|
export interface PluginDataStoreType {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { OptionProps } from 'react-select';
|
|
2
|
+
import { OptionType } from '../../../Common/Types';
|
|
1
3
|
import { ParentPluginDTO, PluginDataStoreType } from './types';
|
|
2
4
|
|
|
3
5
|
export declare const parsePluginDetailsDTOIntoPluginStore: (pluginData: ParentPluginDTO[]) => PluginDataStoreType;
|
|
@@ -14,6 +16,7 @@ export declare const pluginTagSelectStyles: {
|
|
|
14
16
|
group: (base: any) => any;
|
|
15
17
|
groupHeading: (base: any) => any;
|
|
16
18
|
};
|
|
19
|
+
export declare const PluginTagOption: (props: OptionProps<OptionType, true>) => JSX.Element;
|
|
17
20
|
/**
|
|
18
21
|
* @description This method takes the initial plugin data store and updates the keys with the target parent plugin store and plugin version store
|
|
19
22
|
*/
|
|
@@ -135,5 +135,5 @@ import { SelectPickerProps } from './type';
|
|
|
135
135
|
* />
|
|
136
136
|
* ```
|
|
137
137
|
*/
|
|
138
|
-
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
|
138
|
+
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
|
139
139
|
export default SelectPicker;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ServerErrors } from '../../../Common/ServerError';
|
|
1
2
|
import { OptionType } from '../../../Common/Types';
|
|
2
3
|
import { ComponentSizeType } from '../../constants';
|
|
3
4
|
import { MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
@@ -45,7 +46,7 @@ export declare enum SelectPickerVariantType {
|
|
|
45
46
|
DEFAULT = "default",
|
|
46
47
|
BORDER_LESS = "border-less"
|
|
47
48
|
}
|
|
48
|
-
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & {
|
|
49
|
+
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & {
|
|
49
50
|
/**
|
|
50
51
|
* Icon to be rendered in the control
|
|
51
52
|
*/
|
|
@@ -126,6 +127,14 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
|
|
|
126
127
|
* @default false
|
|
127
128
|
*/
|
|
128
129
|
fullWidth?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* If truthy, would show generic section error state as no options message
|
|
132
|
+
*/
|
|
133
|
+
optionListError?: ServerErrors;
|
|
134
|
+
/**
|
|
135
|
+
* Would reload the option list when called in case optionListError is present
|
|
136
|
+
*/
|
|
137
|
+
reloadOptionList?: () => void;
|
|
129
138
|
} & (IsMulti extends true ? {
|
|
130
139
|
isMulti: IsMulti | boolean;
|
|
131
140
|
multiSelectProps?: Pick<CreatableProps<SelectPickerOptionType<OptionValue>, true, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'> & {
|
|
@@ -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;
|
|
@@ -394,6 +391,7 @@ export declare enum ComponentSizeType {
|
|
|
394
391
|
medium = "medium",
|
|
395
392
|
large = "large"
|
|
396
393
|
}
|
|
394
|
+
export declare const POP_UP_MENU_MODAL_ID = "popup";
|
|
397
395
|
/**
|
|
398
396
|
* Identifiers for grouped / all resources
|
|
399
397
|
*/
|
|
@@ -403,5 +401,4 @@ export declare enum SelectAllGroupedResourceIdentifiers {
|
|
|
403
401
|
allExistingAndFutureProdEnvironments = "-2",
|
|
404
402
|
allExistingAndFutureEnvironments = "-3"
|
|
405
403
|
}
|
|
406
|
-
export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
|
|
407
404
|
export declare const TRIGGER_STATUS_PROGRESSING: string[];
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
2
|
-
import { KeyValueListType } from './Components';
|
|
3
2
|
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
4
3
|
|
|
5
4
|
export declare enum EnvType {
|
|
@@ -288,10 +287,6 @@ export declare enum CIMaterialSidebarType {
|
|
|
288
287
|
CODE_SOURCE = "Code Source",
|
|
289
288
|
PARAMETERS = "Parameters"
|
|
290
289
|
}
|
|
291
|
-
export declare enum CDMaterialSidebarType {
|
|
292
|
-
IMAGE = "Image",
|
|
293
|
-
PARAMETERS = "Parameters"
|
|
294
|
-
}
|
|
295
290
|
/**
|
|
296
291
|
* @example Usage with specific enum for path & `unknown` type for value
|
|
297
292
|
* ```ts
|
|
@@ -571,11 +566,4 @@ export type BaseFilterQueryParams<T> = {
|
|
|
571
566
|
*/
|
|
572
567
|
showAll?: boolean;
|
|
573
568
|
} & SortingParams<T>;
|
|
574
|
-
export interface RuntimeParamsListItemType extends KeyValueListType {
|
|
575
|
-
id: number;
|
|
576
|
-
}
|
|
577
|
-
export declare enum RuntimeParamsHeadingType {
|
|
578
|
-
KEY = "key",
|
|
579
|
-
VALUE = "value"
|
|
580
|
-
}
|
|
581
569
|
export {};
|
|
@@ -14,6 +14,7 @@ export declare const MESSAGES: {
|
|
|
14
14
|
VALID_POSITIVE_NUMBER: string;
|
|
15
15
|
VALID_POSITIVE_INTEGER: string;
|
|
16
16
|
MAX_SAFE_INTEGER: string;
|
|
17
|
+
INVALID_SEMANTIC_VERSION: string;
|
|
17
18
|
};
|
|
18
19
|
export declare const requiredField: (value: string) => ValidationResponseType;
|
|
19
20
|
export declare const validateName: (name: string) => ValidationResponseType;
|
|
@@ -31,4 +32,14 @@ export declare const validateUniqueKeys: (keys: string[]) => {
|
|
|
31
32
|
isValid: boolean;
|
|
32
33
|
message: string;
|
|
33
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Rules for valid semantic version:
|
|
37
|
+
* 1. version.length < 128 and not empty
|
|
38
|
+
* 2. version should follow semantic versioning regex from https://semver.org/
|
|
39
|
+
*/
|
|
40
|
+
export declare const validateSemanticVersioning: (version: string) => ValidationResponseType;
|
|
41
|
+
/**
|
|
42
|
+
* A valid display name should be between 3 and 50 characters
|
|
43
|
+
*/
|
|
44
|
+
export declare const validateDisplayName: (name: string) => ValidationResponseType;
|
|
34
45
|
export declare const validateJSON: (json: string) => ValidationResponseType;
|