@devtron-labs/devtron-fe-common-lib 0.1.15-beta-5 → 0.1.15-beta-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/Constants.d.ts +0 -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 +1 -0
- package/dist/Shared/Components/Collapse/types.d.ts +6 -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/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 +2 -0
- package/dist/Shared/Components/DeploymentConfigDiff/types.d.ts +66 -0
- package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +1 -1
- package/dist/Shared/Components/FilterChips/types.d.ts +6 -18
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +23 -1
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +16 -0
- package/dist/Shared/Components/SelectPicker/utils.d.ts +1 -1
- package/dist/Shared/Components/index.d.ts +3 -0
- package/dist/Shared/Helpers.d.ts +2 -0
- package/dist/Shared/Hooks/index.d.ts +0 -1
- package/dist/Shared/Services/common.service.d.ts +2 -3
- package/dist/Shared/Services/types.d.ts +4 -15
- package/dist/Shared/types.d.ts +1 -7
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-a297ca6e.js → cssMode-6ac58878.js} +1 -1
- package/dist/{freemarker2-05744383.js → freemarker2-54dda21c.js} +1 -1
- package/dist/{handlebars-ab9e5510.js → handlebars-4ad18101.js} +1 -1
- package/dist/{html-fb5fd277.js → html-90c2d427.js} +1 -1
- package/dist/{htmlMode-7431ae7d.js → htmlMode-0a22bb49.js} +1 -1
- package/dist/{index-487cba05.js → index-abd1c136.js} +27001 -26570
- package/dist/index.js +425 -423
- package/dist/{javascript-097af821.js → javascript-d01c5309.js} +1 -1
- package/dist/{jsonMode-d511a4fb.js → jsonMode-976a74c4.js} +1 -1
- package/dist/{liquid-e8a241ee.js → liquid-d3993aa9.js} +1 -1
- package/dist/{mdx-1d38e886.js → mdx-6d892f4a.js} +1 -1
- package/dist/{python-6001c39d.js → python-ee674106.js} +1 -1
- package/dist/{razor-122e5840.js → razor-35fa07b5.js} +1 -1
- package/dist/{tsMode-c0596bae.js → tsMode-14f3680e.js} +1 -1
- package/dist/{typescript-12536e6a.js → typescript-66137eae.js} +1 -1
- package/dist/{xml-d09d26cb.js → xml-c97ffa9c.js} +1 -1
- package/dist/{yaml-bf1a774e.js → yaml-e9c87bdb.js} +1 -1
- package/package.json +1 -1
- package/dist/Shared/Hooks/useGetResourceKindsOptions/index.d.ts +0 -2
- package/dist/Shared/Hooks/useGetResourceKindsOptions/service.d.ts +0 -9
- package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +0 -31
- package/dist/Shared/Hooks/useGetResourceKindsOptions/useGetResourceKindsOptions.d.ts +0 -16
- package/dist/Shared/Hooks/useGetResourceKindsOptions/utils.d.ts +0 -4
|
@@ -75,8 +75,6 @@ export declare const ROUTES: {
|
|
|
75
75
|
CONFIG_CD_PIPELINE: string;
|
|
76
76
|
MODULE_CONFIGURED: string;
|
|
77
77
|
RESOURCE_HISTORY_DEPLOYMENT: string;
|
|
78
|
-
APP_LIST_MIN: string;
|
|
79
|
-
CLUSTER_LIST_MIN: string;
|
|
80
78
|
PLUGIN_GLOBAL_LIST_DETAIL_V2: string;
|
|
81
79
|
PLUGIN_GLOBAL_LIST_V2: string;
|
|
82
80
|
PLUGIN_GLOBAL_LIST_TAGS: string;
|
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 @@
|
|
|
1
|
+
export * from './Collapse';
|
|
@@ -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,66 @@
|
|
|
1
|
+
import { SortingOrder } from '../../../Common/Constants';
|
|
2
|
+
import { DeploymentHistoryDetail } from '../CICDHistory';
|
|
3
|
+
import { CollapsibleListConfig, CollapsibleListItem } from '../CollapsibleList';
|
|
4
|
+
import { SelectPickerProps } from '../SelectPicker';
|
|
5
|
+
|
|
6
|
+
export interface DeploymentConfigType {
|
|
7
|
+
list: DeploymentHistoryDetail;
|
|
8
|
+
heading: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface DeploymentConfigListItem {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
primaryConfig: DeploymentConfigType;
|
|
14
|
+
secondaryConfig: DeploymentConfigType;
|
|
15
|
+
hasDiff?: boolean;
|
|
16
|
+
isDeploymentTemplate?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type DeploymentConfigDiffSelectPickerProps = {
|
|
19
|
+
type: 'string';
|
|
20
|
+
id: string;
|
|
21
|
+
text: string | React.ReactNode;
|
|
22
|
+
selectPickerProps?: never;
|
|
23
|
+
} | {
|
|
24
|
+
type: 'selectPicker';
|
|
25
|
+
id: string;
|
|
26
|
+
text?: never;
|
|
27
|
+
selectPickerProps: SelectPickerProps;
|
|
28
|
+
};
|
|
29
|
+
export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem, 'href' | 'title' | 'onClick'> {
|
|
30
|
+
hasDiff?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig, 'id' | 'header' | 'noItemsText'> {
|
|
33
|
+
items: DeploymentConfigDiffNavigationItem[];
|
|
34
|
+
}
|
|
35
|
+
export interface DeploymentConfigDiffProps {
|
|
36
|
+
isLoading?: boolean;
|
|
37
|
+
configList: DeploymentConfigListItem[];
|
|
38
|
+
headerText?: string;
|
|
39
|
+
scrollIntoViewId?: string;
|
|
40
|
+
selectorsConfig: {
|
|
41
|
+
primaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
42
|
+
secondaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
43
|
+
};
|
|
44
|
+
sortingConfig?: {
|
|
45
|
+
sortBy: string;
|
|
46
|
+
sortOrder: SortingOrder;
|
|
47
|
+
handleSorting: () => void;
|
|
48
|
+
};
|
|
49
|
+
navList: DeploymentConfigDiffNavigationItem[];
|
|
50
|
+
collapsibleNavList: DeploymentConfigDiffNavigationCollapsibleItem[];
|
|
51
|
+
goBackURL?: string;
|
|
52
|
+
navHeading: string;
|
|
53
|
+
navHelpText?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText'> {
|
|
56
|
+
}
|
|
57
|
+
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'> {
|
|
58
|
+
}
|
|
59
|
+
export interface DeploymentConfigDiffAccordionProps {
|
|
60
|
+
id: string;
|
|
61
|
+
title: string;
|
|
62
|
+
children: React.ReactNode;
|
|
63
|
+
hasDiff?: boolean;
|
|
64
|
+
isExpanded?: boolean;
|
|
65
|
+
handleOnClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
66
|
+
}
|
|
@@ -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,
|
|
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;
|
|
@@ -21,33 +21,17 @@ export interface FilterChipProps {
|
|
|
21
21
|
* If passed, the label will be formatted accordingly
|
|
22
22
|
*/
|
|
23
23
|
getFormattedValue?: (filterKey: string, filterValue: unknown) => ReactNode;
|
|
24
|
-
showRemoveIcon: boolean;
|
|
25
24
|
/**
|
|
26
25
|
* If true, would hide the label
|
|
27
26
|
* @default false
|
|
28
27
|
*/
|
|
29
28
|
shouldHideLabel?: boolean;
|
|
30
29
|
}
|
|
31
|
-
export
|
|
30
|
+
export interface FilterChipsProps<T = Record<string, unknown>> extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue' | 'shouldHideLabel'> {
|
|
32
31
|
/**
|
|
33
32
|
* Current filter configuration
|
|
34
33
|
*/
|
|
35
34
|
filterConfig: T;
|
|
36
|
-
/**
|
|
37
|
-
* Class name for the container
|
|
38
|
-
*/
|
|
39
|
-
className?: string;
|
|
40
|
-
} & ({
|
|
41
|
-
/**
|
|
42
|
-
* If false, anything related to removing filters is not shown
|
|
43
|
-
* @default 'true'
|
|
44
|
-
*/
|
|
45
|
-
showClearAndRemove: false;
|
|
46
|
-
clearFilters?: never;
|
|
47
|
-
onRemoveFilter?: never;
|
|
48
|
-
clearButtonClassName?: never;
|
|
49
|
-
} | {
|
|
50
|
-
showClearAndRemove?: true;
|
|
51
35
|
/**
|
|
52
36
|
* Callback handler for removing the filters
|
|
53
37
|
*/
|
|
@@ -56,8 +40,12 @@ export type FilterChipsProps<T = Record<string, unknown>> = Pick<FilterChipProps
|
|
|
56
40
|
* Handler for removing a applied filter
|
|
57
41
|
*/
|
|
58
42
|
onRemoveFilter: (filterConfig: T) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Class name for the container
|
|
45
|
+
*/
|
|
46
|
+
className?: string;
|
|
59
47
|
/**
|
|
60
48
|
* Class name for the clear filter button
|
|
61
49
|
*/
|
|
62
50
|
clearButtonClassName?: string;
|
|
63
|
-
}
|
|
51
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { KeyValueTableProps } from './KeyValueTable.types';
|
|
2
2
|
|
|
3
|
-
export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, }: KeyValueTableProps<K>) => JSX.Element;
|
|
3
|
+
export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, showError, validationSchema, errorMessages, onError, }: KeyValueTableProps<K>) => JSX.Element;
|
|
@@ -60,8 +60,10 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
60
60
|
isSortable?: boolean;
|
|
61
61
|
/** An optional React node for a custom header component. */
|
|
62
62
|
headerComponent?: ReactNode;
|
|
63
|
-
/** When true, data addition field will not be shown */
|
|
63
|
+
/** When true, data addition field will not be shown. */
|
|
64
64
|
isAdditionNotAllowed?: boolean;
|
|
65
|
+
/** When true, data add or update is disabled. */
|
|
66
|
+
readOnly?: boolean;
|
|
65
67
|
/**
|
|
66
68
|
* An optional function to handle changes in the table rows.
|
|
67
69
|
* @param rowId - The id of the row that changed.
|
|
@@ -74,4 +76,24 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
74
76
|
* @param deletedRowIndex - The index of the row that was deleted.
|
|
75
77
|
*/
|
|
76
78
|
onDelete?: (deletedRowId: string | number) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Indicates whether to show errors.
|
|
81
|
+
*/
|
|
82
|
+
showError?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* The function to use to validate the value of the cell.
|
|
85
|
+
* @param value - The value to validate.
|
|
86
|
+
* @returns Return true if the value is valid, otherwise false
|
|
87
|
+
* and set `showError` to `true` and provide errorMessages array to show error message.
|
|
88
|
+
*/
|
|
89
|
+
validationSchema?: (value: string) => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* An array of error messages to be displayed in the cell error tooltip.
|
|
92
|
+
*/
|
|
93
|
+
errorMessages?: string[];
|
|
94
|
+
/**
|
|
95
|
+
* A callback function called when an error occurs.
|
|
96
|
+
* @param errorState - The error state, true when any cell has error, otherwise false.
|
|
97
|
+
*/
|
|
98
|
+
onError?: (errorState: boolean) => void;
|
|
77
99
|
}
|
|
@@ -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,4 @@
|
|
|
1
1
|
import { 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>;
|
|
@@ -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';
|
|
@@ -24,6 +25,7 @@ export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTrigge
|
|
|
24
25
|
export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
|
|
25
26
|
export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrder?: SortingOrder) => number;
|
|
26
27
|
export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
|
|
28
|
+
export declare const yamlComparatorBySortOrder: (a: Pair, b: Pair, sortOrder?: SortingOrder) => number;
|
|
27
29
|
export declare const useIntersection: (target: React.RefObject<Element> | Element | null, options?: IntersectionOptions, callback?: IntersectionChangeHandler) => boolean;
|
|
28
30
|
export declare const isNullOrUndefined: (value: unknown) => boolean;
|
|
29
31
|
export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetResourceApiUrlProps } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const getResourceApiUrl: <T>({ baseUrl, kind, version,
|
|
4
|
-
export declare const getPolicyApiUrl: <T>({ kind, version, queryParams, suffix }: GetPolicyApiUrlProps<T>) => string;
|
|
3
|
+
export declare const getResourceApiUrl: <T>({ baseUrl, kind, version, queryParams }: GetResourceApiUrlProps<T>) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUrlWithSearchParams } from '../../Common';
|
|
2
|
-
import {
|
|
2
|
+
import { ResourceKindType, ResourceVersionType } from '../types';
|
|
3
3
|
|
|
4
4
|
export interface ClusterType {
|
|
5
5
|
id: number;
|
|
@@ -9,20 +9,9 @@ export interface ClusterType {
|
|
|
9
9
|
*/
|
|
10
10
|
isVirtual: boolean;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
* T => Type of query params
|
|
14
|
-
* K => Type of kind
|
|
15
|
-
* P => Type of version
|
|
16
|
-
*/
|
|
17
|
-
interface BaseGetApiUrlProps<T, K extends ResourceKindType | PolicyKindType, P extends ResourceVersionType> {
|
|
12
|
+
export interface GetResourceApiUrlProps<T> {
|
|
18
13
|
baseUrl: string;
|
|
19
|
-
kind:
|
|
20
|
-
version:
|
|
21
|
-
suffix?: string;
|
|
14
|
+
kind: ResourceKindType;
|
|
15
|
+
version: ResourceVersionType;
|
|
22
16
|
queryParams?: T extends Parameters<typeof getUrlWithSearchParams>[1] ? T : never;
|
|
23
17
|
}
|
|
24
|
-
export interface GetResourceApiUrlProps<T> extends BaseGetApiUrlProps<T, ResourceKindType, ResourceVersionType> {
|
|
25
|
-
}
|
|
26
|
-
export interface GetPolicyApiUrlProps<T> extends Omit<BaseGetApiUrlProps<T, PolicyKindType, ResourceVersionType>, 'baseUrl'> {
|
|
27
|
-
}
|
|
28
|
-
export {};
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -360,21 +360,15 @@ export declare enum ResourceKindType {
|
|
|
360
360
|
tenant = "tenant",
|
|
361
361
|
installation = "installation",
|
|
362
362
|
environment = "environment",
|
|
363
|
-
cdPipeline = "cd-pipeline"
|
|
364
|
-
project = "project"
|
|
363
|
+
cdPipeline = "cd-pipeline"
|
|
365
364
|
}
|
|
366
365
|
/**
|
|
367
366
|
* Versions support for the resources on BE
|
|
368
|
-
*
|
|
369
|
-
* TODO: Rename to ApiVersionType
|
|
370
367
|
*/
|
|
371
368
|
export declare enum ResourceVersionType {
|
|
372
369
|
v1 = "v1",
|
|
373
370
|
alpha1 = "alpha1"
|
|
374
371
|
}
|
|
375
|
-
export declare enum PolicyKindType {
|
|
376
|
-
lockConfiguration = "lock-configuration"
|
|
377
|
-
}
|
|
378
372
|
export interface LastExecutionResultType {
|
|
379
373
|
lastExecution: string;
|
|
380
374
|
severityCount: {
|