@devtron-labs/devtron-fe-common-lib 0.1.8-beta-12 → 0.1.8-beta-14
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/CIPipeline.Types.d.ts +0 -10
- package/dist/Common/Constants.d.ts +3 -0
- package/dist/Common/Policy.Types.d.ts +8 -0
- package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
- package/dist/Common/SearchBar/types.d.ts +1 -8
- package/dist/Pages/GlobalConfigurations/Authorization/index.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/Authorization/types.d.ts +1 -19
- package/dist/Shared/Components/CICDHistory/constants.d.ts +0 -2
- package/dist/Shared/Components/CICDHistory/types.d.ts +0 -28
- package/dist/Shared/Components/CICDHistory/utils.d.ts +1 -2
- package/dist/Shared/Components/DetectBottom/DetectBottom.component.d.ts +5 -0
- package/dist/Shared/Components/DetectBottom/index.d.ts +1 -0
- package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +1 -1
- package/dist/Shared/Components/FilterChips/types.d.ts +7 -2
- package/dist/Shared/Components/Plugin/PluginCard.d.ts +4 -0
- package/dist/Shared/Components/Plugin/PluginCardSkeletonList.d.ts +4 -0
- package/dist/Shared/Components/Plugin/PluginImageContainer.d.ts +4 -0
- package/dist/Shared/Components/Plugin/PluginList.d.ts +4 -0
- package/dist/Shared/Components/Plugin/PluginListContainer.d.ts +4 -0
- package/dist/Shared/Components/Plugin/PluginTagSelect.d.ts +4 -0
- package/dist/Shared/Components/Plugin/PluginTagsContainer.d.ts +4 -0
- package/dist/Shared/Components/Plugin/constants.d.ts +5 -0
- package/dist/Shared/Components/Plugin/index.d.ts +7 -0
- package/dist/Shared/Components/Plugin/service.d.ts +5 -0
- package/dist/Shared/Components/Plugin/types.d.ts +180 -0
- package/dist/Shared/Components/Plugin/utils.d.ts +20 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +5 -1
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/Helpers.d.ts +0 -2
- package/dist/Shared/constants.d.ts +0 -1
- package/dist/Shared/types.d.ts +19 -1
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-8e9bbdc1.js → cssMode-5e319086.js} +1 -1
- package/dist/{freemarker2-ab4f42de.js → freemarker2-92022030.js} +1 -1
- package/dist/{handlebars-b51546cb.js → handlebars-35a51957.js} +1 -1
- package/dist/{html-a01b5755.js → html-6b7533b7.js} +1 -1
- package/dist/{htmlMode-f310ae59.js → htmlMode-a63be26a.js} +1 -1
- package/dist/{index-7907d64f.js → index-3bb1890e.js} +23619 -23301
- package/dist/index.js +467 -458
- package/dist/{javascript-f0950177.js → javascript-5f79dc40.js} +1 -1
- package/dist/{jsonMode-a13ad392.js → jsonMode-c536f4ce.js} +1 -1
- package/dist/{liquid-e100bc34.js → liquid-a4021708.js} +1 -1
- package/dist/{mdx-d9548f52.js → mdx-6df80b46.js} +1 -1
- package/dist/{python-cd7cff1a.js → python-e22d2854.js} +1 -1
- package/dist/{razor-689e2183.js → razor-c8bac49d.js} +1 -1
- package/dist/{tsMode-9370bcdf.js → tsMode-18b333e7.js} +1 -1
- package/dist/{typescript-d3f53ff1.js → typescript-954800a0.js} +1 -1
- package/dist/{xml-81b8ab35.js → xml-5bc887b0.js} +1 -1
- package/dist/{yaml-627bb151.js → yaml-a97153fc.js} +1 -1
- package/package.json +1 -1
- package/dist/Common/SearchBar/utils.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DetectBottom.d.ts +0 -4
- package/dist/Shared/Components/CICDHistory/LogStageAccordion.d.ts +0 -4
|
@@ -252,14 +252,4 @@ export interface FormErrorObjectType {
|
|
|
252
252
|
steps: TaskErrorObj[];
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
export interface PluginDetailType {
|
|
256
|
-
id: number;
|
|
257
|
-
name: string;
|
|
258
|
-
type: string;
|
|
259
|
-
description: string;
|
|
260
|
-
icon: string;
|
|
261
|
-
tags: string[];
|
|
262
|
-
inputVariables?: VariableType[];
|
|
263
|
-
outputVariables?: VariableType[];
|
|
264
|
-
}
|
|
265
255
|
export {};
|
|
@@ -74,6 +74,9 @@ export declare const ROUTES: {
|
|
|
74
74
|
CONFIG_CD_PIPELINE: string;
|
|
75
75
|
MODULE_CONFIGURED: string;
|
|
76
76
|
RESOURCE_HISTORY_DEPLOYMENT: string;
|
|
77
|
+
PLUGIN_GLOBAL_LIST_DETAIL_V2: string;
|
|
78
|
+
PLUGIN_GLOBAL_LIST_V2: string;
|
|
79
|
+
PLUGIN_GLOBAL_LIST_TAGS: string;
|
|
77
80
|
};
|
|
78
81
|
export declare enum KEY_VALUE {
|
|
79
82
|
KEY = "key",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { PluginDataStoreType } from '../Shared';
|
|
1
2
|
import { VariableType } from './CIPipeline.Types';
|
|
3
|
+
import { ServerErrors } from './ServerError';
|
|
2
4
|
import { ResponseType } from './Types';
|
|
3
5
|
|
|
4
6
|
export declare enum ApplyPolicyToStage {
|
|
@@ -24,6 +26,7 @@ export interface DefinitionSourceType {
|
|
|
24
26
|
}
|
|
25
27
|
export interface MandatoryPluginDetailType {
|
|
26
28
|
id: number;
|
|
29
|
+
parentPluginId: number;
|
|
27
30
|
icon: string;
|
|
28
31
|
name: string;
|
|
29
32
|
description?: string;
|
|
@@ -38,6 +41,11 @@ export interface MandatoryPluginDataType {
|
|
|
38
41
|
isValidPre: boolean;
|
|
39
42
|
isValidPost: boolean;
|
|
40
43
|
}
|
|
44
|
+
export interface ProcessPluginDataReturnType {
|
|
45
|
+
mandatoryPluginData: MandatoryPluginDataType;
|
|
46
|
+
pluginDataStore: PluginDataStoreType;
|
|
47
|
+
mandatoryPluginsError?: ServerErrors;
|
|
48
|
+
}
|
|
41
49
|
export declare enum ConsequenceAction {
|
|
42
50
|
BLOCK = "BLOCK",
|
|
43
51
|
ALLOW_UNTIL_TIME = "ALLOW_UNTIL_TIME",
|
|
@@ -34,5 +34,5 @@ import { SearchBarProps } from './types';
|
|
|
34
34
|
* <SearchBar inputProps={{ placeholder: 'Enter search text' }} />
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder,
|
|
37
|
+
declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, }: SearchBarProps) => JSX.Element;
|
|
38
38
|
export default SearchBar;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
3
2
|
export interface SearchBarProps {
|
|
4
3
|
/**
|
|
5
4
|
* Initial search text
|
|
@@ -41,10 +40,4 @@ export interface SearchBarProps {
|
|
|
41
40
|
* Hide the background and border of the search
|
|
42
41
|
*/
|
|
43
42
|
noBackgroundAndBorder?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Height of the searchbar
|
|
46
|
-
*
|
|
47
|
-
* @default 'ComponentSizeType.medium'
|
|
48
|
-
*/
|
|
49
|
-
size?: ComponentSizeType.medium | ComponentSizeType.large;
|
|
50
43
|
}
|
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseFilterQueryParams } from '../../../Shared';
|
|
2
2
|
import { UserListSortableKeys, UserStatus } from './constants';
|
|
3
3
|
|
|
4
|
-
export type BaseFilterQueryParams<T> = {
|
|
5
|
-
/**
|
|
6
|
-
* Offset for the list result
|
|
7
|
-
*/
|
|
8
|
-
offset?: number;
|
|
9
|
-
/**
|
|
10
|
-
* Number of items required in the list
|
|
11
|
-
*/
|
|
12
|
-
size?: number;
|
|
13
|
-
/**
|
|
14
|
-
* Search string (if any)
|
|
15
|
-
*/
|
|
16
|
-
searchKey?: string;
|
|
17
|
-
/**
|
|
18
|
-
* If true, all items are returned with any search / filtering applied without pagination
|
|
19
|
-
*/
|
|
20
|
-
showAll?: boolean;
|
|
21
|
-
} & SortingParams<T>;
|
|
22
4
|
export type UserListFilterParams = BaseFilterQueryParams<UserListSortableKeys> & {
|
|
23
5
|
/**
|
|
24
6
|
* Selected statuses (if any)
|
|
@@ -43,5 +43,3 @@ export declare const DEFAULT_ENV = "devtron-ci";
|
|
|
43
43
|
export declare const LOGS_RETRY_COUNT = 3;
|
|
44
44
|
export declare const DEPLOYMENT_STATUS_QUERY_PARAM = "deployment-status";
|
|
45
45
|
export declare const MANIFEST_STATUS_HEADERS: string[];
|
|
46
|
-
export declare const LOGS_STAGE_IDENTIFIER = "STAGE_INFO";
|
|
47
|
-
export declare const LOGS_STAGE_STREAM_SEPARATOR = "|";
|
|
@@ -584,34 +584,6 @@ export interface TriggerHistoryFilterCriteriaProps {
|
|
|
584
584
|
releaseId: number;
|
|
585
585
|
showCurrentReleaseDeployments: boolean;
|
|
586
586
|
}
|
|
587
|
-
export declare enum StageStatusType {
|
|
588
|
-
SUCCESS = "Success",
|
|
589
|
-
FAILURE = "Failure",
|
|
590
|
-
/**
|
|
591
|
-
* Not given in API response
|
|
592
|
-
*/
|
|
593
|
-
PROGRESSING = "Progressing"
|
|
594
|
-
}
|
|
595
|
-
export interface StageInfoDTO {
|
|
596
|
-
stage: string;
|
|
597
|
-
startTime: string;
|
|
598
|
-
endTime?: string;
|
|
599
|
-
status?: StageStatusType;
|
|
600
|
-
}
|
|
601
|
-
export interface StageDetailType extends Pick<StageInfoDTO, 'stage' | 'startTime' | 'endTime' | 'status'> {
|
|
602
|
-
logs: string[];
|
|
603
|
-
isOpen: boolean;
|
|
604
|
-
}
|
|
605
|
-
export interface LogStageAccordionProps extends StageDetailType {
|
|
606
|
-
handleStageClose: (index: number) => void;
|
|
607
|
-
handleStageOpen: (index: number) => void;
|
|
608
|
-
accordionIndex: number;
|
|
609
|
-
areEventsProgressing: boolean;
|
|
610
|
-
}
|
|
611
|
-
export interface CreateMarkupReturnType {
|
|
612
|
-
__html: string;
|
|
613
|
-
isSearchKeyPresent: boolean;
|
|
614
|
-
}
|
|
615
587
|
export type TriggerHistoryFilterCriteriaType = `${string}|${string}|${string}`[];
|
|
616
588
|
export declare const terminalStatus: Set<string>;
|
|
617
589
|
export declare const statusSet: Set<string>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { TriggerHistoryFilterCriteriaProps, DeploymentHistoryResultObject, TriggerHistoryFilterCriteriaType
|
|
1
|
+
import { TriggerHistoryFilterCriteriaProps, DeploymentHistoryResultObject, TriggerHistoryFilterCriteriaType } from './types';
|
|
2
2
|
|
|
3
3
|
export declare const getTriggerHistoryFilterCriteria: ({ appId, envId, releaseId, showCurrentReleaseDeployments, }: TriggerHistoryFilterCriteriaProps) => TriggerHistoryFilterCriteriaType;
|
|
4
4
|
export declare const getParsedTriggerHistory: (result: any) => DeploymentHistoryResultObject;
|
|
5
5
|
export declare const buildHoverHtmlForWebhook: (eventName: any, condition: any, selectors: any) => JSX.Element;
|
|
6
6
|
export declare const renderIcon: (iconState: string) => JSX.Element;
|
|
7
|
-
export declare const getStageStatusIcon: (status: StageStatusType) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DetectBottom } from './DetectBottom.component';
|
|
@@ -3,5 +3,5 @@ import { FilterChipsProps } from './types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Component for rendering the applied filter chips
|
|
5
5
|
*/
|
|
6
|
-
declare const FilterChips: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName, }: FilterChipsProps<T>) => JSX.Element;
|
|
6
|
+
declare const FilterChips: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName, shouldHideLabel, }: FilterChipsProps<T>) => JSX.Element;
|
|
7
7
|
export default FilterChips;
|
|
@@ -4,7 +4,7 @@ export interface FilterChipProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* Filter label
|
|
6
6
|
*/
|
|
7
|
-
label
|
|
7
|
+
label?: string;
|
|
8
8
|
/**
|
|
9
9
|
* Corresponding value of the filter
|
|
10
10
|
*/
|
|
@@ -21,8 +21,13 @@ export interface FilterChipProps {
|
|
|
21
21
|
* If passed, the label will be formatted accordingly
|
|
22
22
|
*/
|
|
23
23
|
getFormattedValue?: (filterKey: string, filterValue: unknown) => ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* If true, would hide the label
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
shouldHideLabel?: boolean;
|
|
24
29
|
}
|
|
25
|
-
export interface FilterChipsProps<T = Record<string, unknown>> extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue'> {
|
|
30
|
+
export interface FilterChipsProps<T = Record<string, unknown>> extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue' | 'shouldHideLabel'> {
|
|
26
31
|
/**
|
|
27
32
|
* Current filter configuration
|
|
28
33
|
*/
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PluginListProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const PluginList: ({ pluginDataStore, pluginList, totalCount, handleDataUpdateForPluginResponse, filters: { selectedTags, searchKey }, handlePluginSelection, selectedPluginsMap, isSelectable, handleClearFilters, showCardBorder, getPluginStoreRef, }: PluginListProps) => JSX.Element;
|
|
4
|
+
export default PluginList;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PluginListContainerProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const PluginListContainer: ({ availableTags, handleUpdateAvailableTags, pluginDataStore, handlePluginDataStoreUpdate, handlePluginSelection, isSelectable, selectedPluginsMap, persistFilters, parentPluginList, handleParentPluginListUpdate, parentTotalCount, handleParentTotalCount, parentFilters, handleUpdateParentFilters, rootClassName, showCardBorder, }: Readonly<PluginListContainerProps>) => JSX.Element;
|
|
4
|
+
export default PluginListContainer;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PluginDataStoreType, PluginListFiltersType } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const DEFAULT_PLUGIN_DATA_STORE: PluginDataStoreType;
|
|
4
|
+
export declare const DEFAULT_PLUGIN_LIST_FILTERS: PluginListFiltersType;
|
|
5
|
+
export declare const DEFAULT_PLUGIN_CREATED_BY = "Devtron";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './service';
|
|
3
|
+
export * from './utils';
|
|
4
|
+
export * from './constants';
|
|
5
|
+
export { default as PluginListContainer } from './PluginListContainer';
|
|
6
|
+
export { default as PluginTagsContainer } from './PluginTagsContainer';
|
|
7
|
+
export { default as PluginImageContainer } from './PluginImageContainer';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, PluginDetailServiceParamsType } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, shouldShowError, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, 'pluginStore'>>;
|
|
4
|
+
export declare const getPluginStoreData: ({ searchKey, selectedTags, appId, offset, signal, }: GetPluginStoreDataServiceParamsType) => Promise<GetPluginStoreDataReturnType>;
|
|
5
|
+
export declare const getAvailablePluginTags: (appId: number) => Promise<string[]>;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { VariableType } from '../../../Common';
|
|
3
|
+
import { BaseFilterQueryParams } from '../../types';
|
|
4
|
+
import { ImageWithFallbackProps } from '../ImageWithFallback';
|
|
5
|
+
import { getPluginStoreData } from './service';
|
|
6
|
+
|
|
7
|
+
export declare enum PluginCreationType {
|
|
8
|
+
SHARED = "SHARED",
|
|
9
|
+
PRESET = "PRESET"
|
|
10
|
+
}
|
|
11
|
+
export interface GetPluginTagsPayloadType {
|
|
12
|
+
appId: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PluginTagNamesDTO {
|
|
15
|
+
tagNames: string[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Minimal data of child plugins
|
|
19
|
+
*/
|
|
20
|
+
interface MinimalPluginVersionDataDTO {
|
|
21
|
+
id: number;
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
pluginVersion: string;
|
|
25
|
+
isLatest: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface DetailedPluginVersionDTO extends MinimalPluginVersionDataDTO {
|
|
28
|
+
tags: string[];
|
|
29
|
+
inputVariables: VariableType[];
|
|
30
|
+
outputVariables: VariableType[];
|
|
31
|
+
/**
|
|
32
|
+
* Present in case of shared plugin
|
|
33
|
+
*/
|
|
34
|
+
updatedBy?: string;
|
|
35
|
+
docLink?: string;
|
|
36
|
+
}
|
|
37
|
+
interface PluginVersionsDTO {
|
|
38
|
+
detailedPluginVersionData: DetailedPluginVersionDTO[];
|
|
39
|
+
minimalPluginVersionData: MinimalPluginVersionDataDTO[];
|
|
40
|
+
}
|
|
41
|
+
export interface ParentPluginDTO {
|
|
42
|
+
id: number;
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
type: PluginCreationType;
|
|
46
|
+
icon: string;
|
|
47
|
+
pluginVersions: PluginVersionsDTO;
|
|
48
|
+
}
|
|
49
|
+
export interface PluginDetailDTO {
|
|
50
|
+
parentPlugins: ParentPluginDTO[];
|
|
51
|
+
totalCount: number;
|
|
52
|
+
}
|
|
53
|
+
export interface PluginDetailServiceParamsType {
|
|
54
|
+
appId: number;
|
|
55
|
+
pluginIds?: number[];
|
|
56
|
+
parentPluginIds?: number[];
|
|
57
|
+
/**
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
shouldShowError?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsType, 'appId'> {
|
|
63
|
+
pluginId?: PluginDetailServiceParamsType['pluginIds'];
|
|
64
|
+
parentPluginId?: PluginDetailServiceParamsType['parentPluginIds'];
|
|
65
|
+
}
|
|
66
|
+
export interface PluginListFiltersType extends Pick<BaseFilterQueryParams<unknown>, 'searchKey'> {
|
|
67
|
+
selectedTags: string[];
|
|
68
|
+
}
|
|
69
|
+
interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon'> {
|
|
70
|
+
latestVersionId: MinimalPluginVersionDataDTO['id'];
|
|
71
|
+
pluginVersions: MinimalPluginVersionDataDTO[];
|
|
72
|
+
}
|
|
73
|
+
interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type'> {
|
|
74
|
+
parentPluginId: ParentPluginType['id'];
|
|
75
|
+
}
|
|
76
|
+
export interface PluginDataStoreType {
|
|
77
|
+
parentPluginStore: Record<number, ParentPluginType>;
|
|
78
|
+
pluginVersionStore: Record<number, DetailedPluginVersionType>;
|
|
79
|
+
}
|
|
80
|
+
export interface PluginDetailType extends DetailedPluginVersionType {
|
|
81
|
+
}
|
|
82
|
+
export type PluginListItemType = Pick<PluginDetailType, 'parentPluginId'>;
|
|
83
|
+
interface BasePluginListContainerProps {
|
|
84
|
+
availableTags: string[];
|
|
85
|
+
handleUpdateAvailableTags: (tags: string[]) => void;
|
|
86
|
+
handlePluginSelection: (parentPluginId: PluginDetailType['parentPluginId']) => void;
|
|
87
|
+
pluginDataStore: PluginDataStoreType;
|
|
88
|
+
handlePluginDataStoreUpdate: (pluginStore: PluginDataStoreType) => void;
|
|
89
|
+
rootClassName?: string;
|
|
90
|
+
showCardBorder?: boolean;
|
|
91
|
+
}
|
|
92
|
+
type PluginListType = {
|
|
93
|
+
persistFilters: true;
|
|
94
|
+
parentPluginList: PluginListItemType[];
|
|
95
|
+
handleParentPluginListUpdate: (pluginList: PluginListItemType[]) => void;
|
|
96
|
+
parentTotalCount: number;
|
|
97
|
+
handleParentTotalCount: (totalCount: number) => void;
|
|
98
|
+
parentFilters: PluginListFiltersType;
|
|
99
|
+
handleUpdateParentFilters: (filters: PluginListFiltersType) => void;
|
|
100
|
+
} | {
|
|
101
|
+
persistFilters: false;
|
|
102
|
+
parentPluginList?: never;
|
|
103
|
+
handleParentPluginListUpdate?: never;
|
|
104
|
+
parentTotalCount?: never;
|
|
105
|
+
handleParentTotalCount?: never;
|
|
106
|
+
parentFilters?: never;
|
|
107
|
+
handleUpdateParentFilters?: never;
|
|
108
|
+
};
|
|
109
|
+
export type PluginListContainerProps = BasePluginListContainerProps & PluginListType & ({
|
|
110
|
+
/**
|
|
111
|
+
* Would be used to identify the case where we are selecting plugins like mandatory plugin list
|
|
112
|
+
*/
|
|
113
|
+
isSelectable: false;
|
|
114
|
+
selectedPluginsMap?: never;
|
|
115
|
+
} | {
|
|
116
|
+
isSelectable: true;
|
|
117
|
+
/**
|
|
118
|
+
* Map of parentId to boolean
|
|
119
|
+
*/
|
|
120
|
+
selectedPluginsMap: Record<number, true>;
|
|
121
|
+
});
|
|
122
|
+
export interface GetPluginStoreDataServiceParamsType extends Pick<PluginListFiltersType, 'searchKey' | 'selectedTags'> {
|
|
123
|
+
signal: AbortSignal;
|
|
124
|
+
appId: number;
|
|
125
|
+
offset?: number;
|
|
126
|
+
}
|
|
127
|
+
export interface GetPluginListPayloadType extends Pick<GetPluginStoreDataServiceParamsType, 'searchKey' | 'offset' | 'appId'> {
|
|
128
|
+
tag: PluginListFiltersType['selectedTags'];
|
|
129
|
+
size: number;
|
|
130
|
+
}
|
|
131
|
+
export interface GetPluginStoreDataReturnType {
|
|
132
|
+
totalCount: number;
|
|
133
|
+
pluginStore: PluginDataStoreType;
|
|
134
|
+
/**
|
|
135
|
+
* Sorted on the basis of name of latest version of parent plugin
|
|
136
|
+
*/
|
|
137
|
+
parentPluginIdList: number[];
|
|
138
|
+
}
|
|
139
|
+
export interface PluginListParamsType {
|
|
140
|
+
appId?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface PluginTagSelectProps extends Pick<BasePluginListContainerProps, 'availableTags'> {
|
|
143
|
+
selectedTags: PluginListContainerProps['parentFilters']['selectedTags'];
|
|
144
|
+
isLoading: boolean;
|
|
145
|
+
hasError: boolean;
|
|
146
|
+
reloadTags: () => void;
|
|
147
|
+
handleUpdateSelectedTags: (tags: string[]) => void;
|
|
148
|
+
}
|
|
149
|
+
export interface PluginListProps extends Pick<PluginListContainerProps, 'pluginDataStore' | 'handlePluginSelection' | 'selectedPluginsMap' | 'isSelectable' | 'showCardBorder'> {
|
|
150
|
+
handleDataUpdateForPluginResponse: (pluginResponse: Awaited<ReturnType<typeof getPluginStoreData>>,
|
|
151
|
+
/**
|
|
152
|
+
* If true, the response would be appended to the existing data
|
|
153
|
+
* if false, the existing data would be replaced with the new data
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
appendResponse?: boolean) => void;
|
|
157
|
+
handleClearFilters: () => void;
|
|
158
|
+
pluginList: PluginListContainerProps['parentPluginList'];
|
|
159
|
+
totalCount: PluginListContainerProps['parentTotalCount'];
|
|
160
|
+
filters: PluginListContainerProps['parentFilters'];
|
|
161
|
+
getPluginStoreRef: MutableRefObject<AbortController>;
|
|
162
|
+
}
|
|
163
|
+
export interface PluginCardProps extends Pick<PluginListProps, 'isSelectable' | 'pluginDataStore' | 'handlePluginSelection' | 'showCardBorder'> {
|
|
164
|
+
parentPluginId: PluginDetailType['parentPluginId'];
|
|
165
|
+
isSelected: boolean;
|
|
166
|
+
}
|
|
167
|
+
export interface PluginCardSkeletonListProps {
|
|
168
|
+
/**
|
|
169
|
+
* @default 3
|
|
170
|
+
*/
|
|
171
|
+
count?: number;
|
|
172
|
+
}
|
|
173
|
+
export interface PluginTagsContainerProps {
|
|
174
|
+
tags: string[];
|
|
175
|
+
rootClassName?: string;
|
|
176
|
+
}
|
|
177
|
+
export interface PluginImageContainerProps extends Pick<ImageWithFallbackProps, 'imageProps'> {
|
|
178
|
+
fallbackImageClassName?: string;
|
|
179
|
+
}
|
|
180
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ParentPluginDTO, PluginDataStoreType } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const parsePluginDetailsDTOIntoPluginStore: (pluginData: ParentPluginDTO[]) => PluginDataStoreType;
|
|
4
|
+
export declare const pluginTagSelectStyles: {
|
|
5
|
+
option: (base: any, state: any) => any;
|
|
6
|
+
container: (base: any, state: any) => any;
|
|
7
|
+
menuList: (base: any) => any;
|
|
8
|
+
control: (base: any, state: any) => any;
|
|
9
|
+
dropdownIndicator: (base: any, state: any) => any;
|
|
10
|
+
valueContainer: (base: any) => any;
|
|
11
|
+
loadingMessage: (base: any) => any;
|
|
12
|
+
noOptionsMessage: (base: any) => any;
|
|
13
|
+
placeholder: (base: any) => any;
|
|
14
|
+
group: (base: any) => any;
|
|
15
|
+
groupHeading: (base: any) => any;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @description This method takes the initial plugin data store and updates the keys with the target parent plugin store and plugin version store
|
|
19
|
+
*/
|
|
20
|
+
export declare const getUpdatedPluginStore: (initialPluginDataStore: PluginDataStoreType, targetParentPluginStore: PluginDataStoreType['parentPluginStore'], targetPluginVersionStore: PluginDataStoreType['pluginVersionStore']) => PluginDataStoreType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { MenuListProps } from 'react-select';
|
|
1
|
+
import { MenuListProps, ValueContainerProps } from 'react-select';
|
|
2
|
+
import { OptionType } from '../../../Common';
|
|
2
3
|
|
|
3
4
|
export declare const getCommonSelectStyle: (styleOverrides?: {}) => {
|
|
4
5
|
container: (base: any, state: any) => any;
|
|
@@ -33,3 +34,6 @@ export declare const commonSelectStyles: {
|
|
|
33
34
|
export declare const MenuListWithApplyButton: ({ handleApplyFilter, ...props }: MenuListProps<unknown, boolean, import('react-select').GroupBase<unknown>> & {
|
|
34
35
|
handleApplyFilter: () => void;
|
|
35
36
|
}) => JSX.Element;
|
|
37
|
+
export declare const MultiSelectValueContainer: ({ title, ...props }: ValueContainerProps<OptionType<string, string>, true, import('react-select').GroupBase<OptionType<string, string>>> & {
|
|
38
|
+
title: string;
|
|
39
|
+
}) => JSX.Element;
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -32,6 +32,4 @@ export declare const renderValidInputButtonTippy: (children: ReactElement) => JS
|
|
|
32
32
|
export declare const processDeploymentStatusDetailsData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
|
|
33
33
|
export declare function aggregateNodes(nodes: any[], podMetadata: PodMetadatum[]): AggregatedNodes;
|
|
34
34
|
export declare const decode: (data: any, isEncoded?: boolean) => {};
|
|
35
|
-
export declare const isTimeStringAvailable: (time: string) => boolean;
|
|
36
|
-
export declare const getTimeDifference: (startTime: string, endTime: string) => string;
|
|
37
35
|
export {};
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors } from '../Common';
|
|
1
|
+
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
2
2
|
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
3
3
|
|
|
4
4
|
export declare enum EnvType {
|
|
@@ -516,4 +516,22 @@ export interface BatchConfigType {
|
|
|
516
516
|
export interface scrollableInterface {
|
|
517
517
|
autoBottomScroll: boolean;
|
|
518
518
|
}
|
|
519
|
+
export type BaseFilterQueryParams<T> = {
|
|
520
|
+
/**
|
|
521
|
+
* Offset for the list result
|
|
522
|
+
*/
|
|
523
|
+
offset?: number;
|
|
524
|
+
/**
|
|
525
|
+
* Number of items required in the list
|
|
526
|
+
*/
|
|
527
|
+
size?: number;
|
|
528
|
+
/**
|
|
529
|
+
* Search string (if any)
|
|
530
|
+
*/
|
|
531
|
+
searchKey?: string;
|
|
532
|
+
/**
|
|
533
|
+
* If true, all items are returned with any search / filtering applied without pagination
|
|
534
|
+
*/
|
|
535
|
+
showAll?: boolean;
|
|
536
|
+
} & SortingParams<T>;
|
|
519
537
|
export {};
|