@devtron-labs/devtron-fe-common-lib 0.2.20-beta-2 → 0.2.20-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/Api.d.ts +5 -5
- package/dist/Common/CIPipeline.Types.d.ts +1 -4
- package/dist/Common/Common.service.d.ts +2 -0
- package/dist/Common/Constants.d.ts +0 -2
- 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 +5 -4
- package/dist/Shared/Components/DetectBottom/DetectBottom.component.d.ts +1 -2
- package/dist/Shared/Components/Header/types.d.ts +12 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +28 -7
- package/dist/Shared/Components/KeyValueTable/constants.d.ts +2 -0
- package/dist/Shared/Components/Plugin/service.d.ts +2 -4
- package/dist/Shared/Components/Plugin/types.d.ts +3 -11
- package/dist/Shared/Components/Plugin/utils.d.ts +0 -3
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +1 -10
- package/dist/Shared/Components/index.d.ts +0 -1
- package/dist/Shared/constants.d.ts +4 -1
- package/dist/Shared/types.d.ts +12 -0
- package/dist/Shared/validations.d.ts +0 -11
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-33be5a2a.js → cssMode-1dd94185.js} +1 -1
- package/dist/{freemarker2-4e0b149a.js → freemarker2-bb644967.js} +1 -1
- package/dist/{handlebars-f0116745.js → handlebars-e373f536.js} +1 -1
- package/dist/{html-c8986f46.js → html-9bda5693.js} +1 -1
- package/dist/{htmlMode-37fc8743.js → htmlMode-cf63acf9.js} +1 -1
- package/dist/{index-ec54a660.js → index-65359b3e.js} +23680 -23804
- package/dist/index.js +465 -468
- package/dist/{javascript-84cc2c0f.js → javascript-25356a92.js} +1 -1
- package/dist/{jsonMode-954b9cca.js → jsonMode-48aa45a3.js} +1 -1
- package/dist/{liquid-385cda64.js → liquid-b31592cc.js} +1 -1
- package/dist/{mdx-2d9e27d3.js → mdx-735fc5c2.js} +1 -1
- package/dist/{python-346ffcdd.js → python-e1a114b4.js} +1 -1
- package/dist/{razor-2fcc6e4e.js → razor-bf5217e7.js} +1 -1
- package/dist/{tsMode-ed5780da.js → tsMode-f2ae6c6f.js} +1 -1
- package/dist/{typescript-78320c90.js → typescript-275d8677.js} +1 -1
- package/dist/{xml-e181a50a.js → xml-e46d3508.js} +1 -1
- package/dist/{yaml-79b8de1e.js → yaml-27e8c621.js} +1 -1
- package/package.json +1 -1
- package/dist/Shared/Components/EditImageFormField/EditImageFormField.d.ts +0 -19
- package/dist/Shared/Components/EditImageFormField/constants.d.ts +0 -7
- package/dist/Shared/Components/EditImageFormField/index.d.ts +0 -2
- package/dist/Shared/Components/EditImageFormField/types.d.ts +0 -41
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:
|
|
5
|
-
export declare const put:
|
|
6
|
-
export declare const patch:
|
|
7
|
-
export declare const get:
|
|
8
|
-
export declare const trash:
|
|
4
|
+
export declare const post: (url: string, data: object, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType>;
|
|
5
|
+
export declare const put: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
|
|
6
|
+
export declare const patch: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
|
|
7
|
+
export declare const get: (url: string, options?: APIOptions) => Promise<ResponseType>;
|
|
8
|
+
export declare const trash: (url: string, data?: object, options?: APIOptions) => Promise<ResponseType>;
|
|
9
9
|
/**
|
|
10
10
|
* Aborts the previous request before triggering next request
|
|
11
11
|
*/
|
|
@@ -77,7 +77,6 @@ export interface VariableType {
|
|
|
77
77
|
format: string;
|
|
78
78
|
description: string;
|
|
79
79
|
defaultValue: string;
|
|
80
|
-
allowEmptyValue: boolean;
|
|
81
80
|
variableType: RefVariableType;
|
|
82
81
|
refVariableStepIndex: number;
|
|
83
82
|
refVariableName: string;
|
|
@@ -99,7 +98,7 @@ interface ConditionDetails {
|
|
|
99
98
|
conditionType: ConditionType;
|
|
100
99
|
conditionalValue: string;
|
|
101
100
|
}
|
|
102
|
-
|
|
101
|
+
interface InlineStepDetailType {
|
|
103
102
|
scriptType: ScriptType;
|
|
104
103
|
isMountCustomScript?: boolean;
|
|
105
104
|
script?: string;
|
|
@@ -118,8 +117,6 @@ export interface InlineStepDetailType {
|
|
|
118
117
|
inputVariables?: VariableType[];
|
|
119
118
|
outputVariables?: VariableType[];
|
|
120
119
|
conditionDetails: ConditionDetails[];
|
|
121
|
-
storeScriptAt?: string;
|
|
122
|
-
mountCodeToContainerPath?: string;
|
|
123
120
|
}
|
|
124
121
|
interface PluginRefStepDetailType {
|
|
125
122
|
id: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
|
|
1
2
|
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
|
|
2
3
|
import { ApiResourceType } from '../Pages';
|
|
3
4
|
|
|
@@ -15,6 +16,7 @@ export declare const SourceTypeMap: {
|
|
|
15
16
|
};
|
|
16
17
|
export declare function getUserRole(appName?: string): Promise<UserRole>;
|
|
17
18
|
export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
|
|
19
|
+
export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimeParamsListItemType[];
|
|
18
20
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
|
19
21
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
|
20
22
|
export declare function extractImage(image: string): string;
|
|
@@ -86,7 +86,6 @@ 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;
|
|
90
89
|
DEPLOYMENT_CHARTS_LIST: string;
|
|
91
90
|
USER_LIST_MIN: string;
|
|
92
91
|
CONFIG_DATA: string;
|
|
@@ -279,7 +278,6 @@ export declare const DATE_TIME_FORMATS: {
|
|
|
279
278
|
DD_MMM_YYYY_HH_MM: string;
|
|
280
279
|
DD_MMM_YYYY: string;
|
|
281
280
|
};
|
|
282
|
-
export declare const SEMANTIC_VERSION_DOCUMENTATION_LINK = "https://semver.org/";
|
|
283
281
|
export declare const VULNERABILITIES_SORT_PRIORITY: {
|
|
284
282
|
critical: number;
|
|
285
283
|
high: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React, HTMLInputTypeAttribute, InputHTMLAttributes
|
|
1
|
+
import { default as React, HTMLInputTypeAttribute, InputHTMLAttributes } 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?: string;
|
|
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';
|
|
3
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
4
5
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
|
|
5
|
-
import {
|
|
6
|
-
import { RegistryType, Severity } from '../Shared';
|
|
6
|
+
import { RegistryType, RuntimeParamsListItemType, 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;
|
|
181
182
|
initialTab: string;
|
|
183
|
+
disabled: boolean;
|
|
182
184
|
children: ReactNode;
|
|
183
|
-
disabled?: boolean;
|
|
184
|
-
className?: string;
|
|
185
185
|
}
|
|
186
186
|
export interface RadioInterface {
|
|
187
187
|
children: ReactNode;
|
|
@@ -597,6 +597,7 @@ 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[];
|
|
600
601
|
}
|
|
601
602
|
export interface ImagePromotionMaterialInfo {
|
|
602
603
|
isApprovalPendingForPromotion: boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
interface DetectBottomProps {
|
|
2
2
|
callback: () => void;
|
|
3
|
-
hasError?: boolean;
|
|
4
3
|
}
|
|
5
|
-
declare const DetectBottom: ({ callback
|
|
4
|
+
declare const DetectBottom: ({ callback }: DetectBottomProps) => JSX.Element;
|
|
6
5
|
export default DetectBottom;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ModuleStatus } from '../../types';
|
|
2
1
|
import { ResponseType, TippyCustomizedProps } from '../../../Common';
|
|
3
2
|
|
|
4
3
|
export declare enum InstallationType {
|
|
@@ -6,6 +5,18 @@ export declare enum InstallationType {
|
|
|
6
5
|
OSS_HELM = "oss_helm",
|
|
7
6
|
ENTERPRISE = "enterprise"
|
|
8
7
|
}
|
|
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
|
+
}
|
|
9
20
|
export interface PageHeaderType {
|
|
10
21
|
headerName?: string;
|
|
11
22
|
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, errorMessages, onError, }: KeyValueTableProps<K>) => JSX.Element;
|
|
3
|
+
export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, showError, validationSchema: parentValidationSchema, errorMessages: parentErrorMessages, onError, validateDuplicateKeys, validateEmptyKeys, }: KeyValueTableProps<K>) => JSX.Element;
|
|
@@ -36,6 +36,29 @@ 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
|
+
};
|
|
39
62
|
/**
|
|
40
63
|
* Type representing a mask for key-value pairs.
|
|
41
64
|
* @template K - A string representing the key type.
|
|
@@ -50,7 +73,7 @@ export type KeyValuePlaceholder<K extends string> = {
|
|
|
50
73
|
* Interface representing the properties for a key-value table component.
|
|
51
74
|
* @template K - A string representing the key type.
|
|
52
75
|
*/
|
|
53
|
-
export
|
|
76
|
+
export type KeyValueTableProps<K extends string> = {
|
|
54
77
|
/** The configuration for the key-value table. */
|
|
55
78
|
config: KeyValueConfig<K>;
|
|
56
79
|
/** An optional mask for the key-value pairs. */
|
|
@@ -76,18 +99,15 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
76
99
|
* @param deletedRowIndex - The index of the row that was deleted.
|
|
77
100
|
*/
|
|
78
101
|
onDelete?: (deletedRowId: string | number) => void;
|
|
79
|
-
/**
|
|
80
|
-
* Indicates whether to show errors.
|
|
81
|
-
*/
|
|
82
|
-
showError?: boolean;
|
|
83
102
|
/**
|
|
84
103
|
* The function to use to validate the value of the cell.
|
|
85
104
|
* @param value - The value to validate.
|
|
86
105
|
* @param key - The row key of the value.
|
|
106
|
+
* @param rowId - The id of the row.
|
|
87
107
|
* @returns Return true if the value is valid, otherwise false
|
|
88
108
|
* and set `showError` to `true` and provide errorMessages array to show error message.
|
|
89
109
|
*/
|
|
90
|
-
validationSchema?: (value: string, key: K) => boolean;
|
|
110
|
+
validationSchema?: (value: string, key: K, rowId: string | number) => boolean;
|
|
91
111
|
/**
|
|
92
112
|
* An array of error messages to be displayed in the cell error tooltip.
|
|
93
113
|
*/
|
|
@@ -97,4 +117,5 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
97
117
|
* @param errorState - The error state, true when any cell has error, otherwise false.
|
|
98
118
|
*/
|
|
99
119
|
onError?: (errorState: boolean) => void;
|
|
100
|
-
}
|
|
120
|
+
} & ErrorUIProps;
|
|
121
|
+
export {};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, MinParentPluginDTO, PluginDetailServiceParamsType } from './types';
|
|
1
|
+
import { GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, PluginDetailServiceParamsType } from './types';
|
|
3
2
|
|
|
4
|
-
export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds,
|
|
3
|
+
export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, shouldShowError, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, 'pluginStore'>>;
|
|
5
4
|
export declare const getPluginStoreData: ({ searchKey, selectedTags, appId, offset, signal, }: GetPluginStoreDataServiceParamsType) => Promise<GetPluginStoreDataReturnType>;
|
|
6
5
|
export declare const getAvailablePluginTags: (appId: number) => Promise<string[]>;
|
|
7
|
-
export declare const getParentPluginList: (appId?: number) => Promise<ResponseType<MinParentPluginDTO[]>>;
|
|
@@ -8,13 +8,9 @@ export declare enum PluginCreationType {
|
|
|
8
8
|
SHARED = "SHARED",
|
|
9
9
|
PRESET = "PRESET"
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface GetPluginTagsPayloadType {
|
|
12
12
|
appId: number;
|
|
13
13
|
}
|
|
14
|
-
export interface GetPluginTagsPayloadType extends PluginAPIBaseQueryParamsType {
|
|
15
|
-
}
|
|
16
|
-
export interface GetParentPluginListPayloadType extends PluginAPIBaseQueryParamsType {
|
|
17
|
-
}
|
|
18
14
|
export interface PluginTagNamesDTO {
|
|
19
15
|
tagNames: string[];
|
|
20
16
|
}
|
|
@@ -49,9 +45,6 @@ export interface ParentPluginDTO {
|
|
|
49
45
|
type: PluginCreationType;
|
|
50
46
|
icon: string;
|
|
51
47
|
pluginVersions: PluginVersionsDTO;
|
|
52
|
-
pluginIdentifier: string;
|
|
53
|
-
}
|
|
54
|
-
export interface MinParentPluginDTO extends Pick<ParentPluginDTO, 'id' | 'name' | 'icon'> {
|
|
55
48
|
}
|
|
56
49
|
export interface PluginDetailDTO {
|
|
57
50
|
parentPlugins: ParentPluginDTO[];
|
|
@@ -65,7 +58,6 @@ export interface PluginDetailServiceParamsType {
|
|
|
65
58
|
* @default true
|
|
66
59
|
*/
|
|
67
60
|
shouldShowError?: boolean;
|
|
68
|
-
signal?: AbortSignal;
|
|
69
61
|
}
|
|
70
62
|
export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsType, 'appId'> {
|
|
71
63
|
pluginId?: PluginDetailServiceParamsType['pluginIds'];
|
|
@@ -74,11 +66,11 @@ export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsT
|
|
|
74
66
|
export interface PluginListFiltersType extends Pick<BaseFilterQueryParams<unknown>, 'searchKey'> {
|
|
75
67
|
selectedTags: string[];
|
|
76
68
|
}
|
|
77
|
-
interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon'
|
|
69
|
+
interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon'> {
|
|
78
70
|
latestVersionId: MinimalPluginVersionDataDTO['id'];
|
|
79
71
|
pluginVersions: MinimalPluginVersionDataDTO[];
|
|
80
72
|
}
|
|
81
|
-
interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type'
|
|
73
|
+
interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type'> {
|
|
82
74
|
parentPluginId: ParentPluginType['id'];
|
|
83
75
|
}
|
|
84
76
|
export interface PluginDataStoreType {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { OptionProps } from 'react-select';
|
|
2
|
-
import { OptionType } from '../../../Common/Types';
|
|
3
1
|
import { ParentPluginDTO, PluginDataStoreType } from './types';
|
|
4
2
|
|
|
5
3
|
export declare const parsePluginDetailsDTOIntoPluginStore: (pluginData: ParentPluginDTO[]) => PluginDataStoreType;
|
|
@@ -16,7 +14,6 @@ export declare const pluginTagSelectStyles: {
|
|
|
16
14
|
group: (base: any) => any;
|
|
17
15
|
groupHeading: (base: any) => any;
|
|
18
16
|
};
|
|
19
|
-
export declare const PluginTagOption: (props: OptionProps<OptionType, true>) => JSX.Element;
|
|
20
17
|
/**
|
|
21
18
|
* @description This method takes the initial plugin data store and updates the keys with the target parent plugin store and plugin version store
|
|
22
19
|
*/
|
|
@@ -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,
|
|
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;
|
|
139
139
|
export default SelectPicker;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ServerErrors } from '../../../Common/ServerError';
|
|
2
1
|
import { OptionType } from '../../../Common/Types';
|
|
3
2
|
import { ComponentSizeType } from '../../constants';
|
|
4
3
|
import { MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
@@ -46,7 +45,7 @@ export declare enum SelectPickerVariantType {
|
|
|
46
45
|
DEFAULT = "default",
|
|
47
46
|
BORDER_LESS = "border-less"
|
|
48
47
|
}
|
|
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'
|
|
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'>> & {
|
|
50
49
|
/**
|
|
51
50
|
* Icon to be rendered in the control
|
|
52
51
|
*/
|
|
@@ -127,14 +126,6 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
|
|
|
127
126
|
* @default false
|
|
128
127
|
*/
|
|
129
128
|
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;
|
|
138
129
|
} & (IsMulti extends true ? {
|
|
139
130
|
isMulti: IsMulti | boolean;
|
|
140
131
|
multiSelectProps?: Pick<CreatableProps<SelectPickerOptionType<OptionValue>, true, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'> & {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { OptionType } from '../Common/Types';
|
|
2
|
+
import { CDMaterialSidebarType } from './types';
|
|
3
|
+
|
|
1
4
|
export declare const ARTIFACT_STATUS: {
|
|
2
5
|
PROGRESSING: string;
|
|
3
6
|
DEGRADED: string;
|
|
@@ -391,7 +394,6 @@ export declare enum ComponentSizeType {
|
|
|
391
394
|
medium = "medium",
|
|
392
395
|
large = "large"
|
|
393
396
|
}
|
|
394
|
-
export declare const POP_UP_MENU_MODAL_ID = "popup";
|
|
395
397
|
/**
|
|
396
398
|
* Identifiers for grouped / all resources
|
|
397
399
|
*/
|
|
@@ -401,4 +403,5 @@ export declare enum SelectAllGroupedResourceIdentifiers {
|
|
|
401
403
|
allExistingAndFutureProdEnvironments = "-2",
|
|
402
404
|
allExistingAndFutureEnvironments = "-3"
|
|
403
405
|
}
|
|
406
|
+
export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
|
|
404
407
|
export declare const TRIGGER_STATUS_PROGRESSING: string[];
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
2
|
+
import { KeyValueListType } from './Components';
|
|
2
3
|
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
3
4
|
|
|
4
5
|
export declare enum EnvType {
|
|
@@ -287,6 +288,10 @@ export declare enum CIMaterialSidebarType {
|
|
|
287
288
|
CODE_SOURCE = "Code Source",
|
|
288
289
|
PARAMETERS = "Parameters"
|
|
289
290
|
}
|
|
291
|
+
export declare enum CDMaterialSidebarType {
|
|
292
|
+
IMAGE = "Image",
|
|
293
|
+
PARAMETERS = "Parameters"
|
|
294
|
+
}
|
|
290
295
|
/**
|
|
291
296
|
* @example Usage with specific enum for path & `unknown` type for value
|
|
292
297
|
* ```ts
|
|
@@ -566,4 +571,11 @@ export type BaseFilterQueryParams<T> = {
|
|
|
566
571
|
*/
|
|
567
572
|
showAll?: boolean;
|
|
568
573
|
} & SortingParams<T>;
|
|
574
|
+
export interface RuntimeParamsListItemType extends KeyValueListType {
|
|
575
|
+
id: number;
|
|
576
|
+
}
|
|
577
|
+
export declare enum RuntimeParamsHeadingType {
|
|
578
|
+
KEY = "key",
|
|
579
|
+
VALUE = "value"
|
|
580
|
+
}
|
|
569
581
|
export {};
|
|
@@ -14,7 +14,6 @@ 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;
|
|
18
17
|
};
|
|
19
18
|
export declare const requiredField: (value: string) => ValidationResponseType;
|
|
20
19
|
export declare const validateName: (name: string) => ValidationResponseType;
|
|
@@ -32,14 +31,4 @@ export declare const validateUniqueKeys: (keys: string[]) => {
|
|
|
32
31
|
isValid: boolean;
|
|
33
32
|
message: string;
|
|
34
33
|
};
|
|
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;
|
|
45
34
|
export declare const validateJSON: (json: string) => ValidationResponseType;
|