@devtron-labs/devtron-fe-common-lib 0.2.2-beta-3 → 0.2.2-beta-5
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 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +1 -3
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +1 -24
- package/dist/Shared/Components/SelectPicker/FilterSelectPicker.d.ts +4 -0
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +47 -1
- package/dist/Shared/Components/SelectPicker/common.d.ts +11 -8
- package/dist/Shared/Components/SelectPicker/index.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +62 -6
- package/dist/Shared/Components/SelectPicker/utils.d.ts +5 -3
- package/dist/Shared/Components/index.d.ts +0 -3
- package/dist/Shared/Helpers.d.ts +0 -2
- package/dist/Shared/Services/app.service.d.ts +1 -3
- package/dist/Shared/Services/app.types.d.ts +0 -116
- package/dist/assets/editor.worker-60ba9509.js +12 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/yaml.worker-3bbe780a.js +472 -0
- package/dist/{cssMode-be050934.js → cssMode-7a11f14f.js} +1 -1
- package/dist/{freemarker2-9fccce23.js → freemarker2-fe4c122d.js} +1 -1
- package/dist/{handlebars-df33a856.js → handlebars-4cae7840.js} +1 -1
- package/dist/{html-b76cbb26.js → html-1b05a962.js} +1 -1
- package/dist/{htmlMode-18063eff.js → htmlMode-f54b659a.js} +1 -1
- package/dist/{index-cc9a47f4.js → index-81cf06c0.js} +43403 -39667
- package/dist/index.js +481 -495
- package/dist/{javascript-228444f1.js → javascript-fe15df03.js} +1 -1
- package/dist/{jsonMode-57ae28a7.js → jsonMode-a81527dc.js} +1 -1
- package/dist/{liquid-2c6214b8.js → liquid-700ad8fb.js} +1 -1
- package/dist/{mdx-028b98f9.js → mdx-408160b5.js} +1 -1
- package/dist/{python-b15c4827.js → python-66fc11ea.js} +1 -1
- package/dist/{razor-fcf80b3e.js → razor-c532073e.js} +1 -1
- package/dist/{tsMode-05880789.js → tsMode-5fde5ad9.js} +1 -1
- package/dist/{typescript-7ce10b0c.js → typescript-df31141d.js} +1 -1
- package/dist/{xml-4522b384.js → xml-73cc6763.js} +1 -1
- package/dist/{yaml-46005b96.js → yaml-17a9774f.js} +1 -1
- package/package.json +5 -5
- package/dist/Shared/Components/Collapse/Collapse.d.ts +0 -3
- package/dist/Shared/Components/Collapse/index.d.ts +0 -2
- package/dist/Shared/Components/Collapse/types.d.ts +0 -7
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +0 -3
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +0 -96
- package/dist/Shared/Components/CollapsibleList/index.d.ts +0 -2
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +0 -3
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +0 -38
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +0 -3
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +0 -3
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +0 -3
- package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +0 -3
- package/dist/Shared/Components/DeploymentConfigDiff/types.d.ts +0 -69
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,
|
|
3
|
+
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, }: 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
|
|
2
|
+
import { OptionType, UserApprovalMetadataType, ReleaseTag, ImageComment, PromotionApprovalMetadataType, FilterConditionsListType, DeploymentAppTypes, ResponseType, PaginationProps } from '../../../Common';
|
|
3
3
|
import { DeploymentStageType } from '../../constants';
|
|
4
4
|
import { AggregationKeys, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType } from '../../types';
|
|
5
5
|
|
|
@@ -368,8 +368,6 @@ export interface DeploymentTemplateHistoryType {
|
|
|
368
368
|
isUnpublished?: boolean;
|
|
369
369
|
isDeleteDraft?: boolean;
|
|
370
370
|
rootClassName?: string;
|
|
371
|
-
comparisonBodyClassName?: string;
|
|
372
|
-
sortOrder?: SortingOrder;
|
|
373
371
|
}
|
|
374
372
|
export interface DeploymentHistoryDetailRes extends ResponseType {
|
|
375
373
|
result?: DeploymentHistoryDetail;
|
|
@@ -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,
|
|
3
|
+
export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, }: KeyValueTableProps<K>) => JSX.Element;
|
|
@@ -60,10 +60,8 @@ 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;
|
|
67
65
|
/**
|
|
68
66
|
* An optional function to handle changes in the table rows.
|
|
69
67
|
* @param rowId - The id of the row that changed.
|
|
@@ -76,25 +74,4 @@ export interface KeyValueTableProps<K extends string> {
|
|
|
76
74
|
* @param deletedRowIndex - The index of the row that was deleted.
|
|
77
75
|
*/
|
|
78
76
|
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
|
-
* @param key - The row key of the value.
|
|
87
|
-
* @returns Return true if the value is valid, otherwise false
|
|
88
|
-
* and set `showError` to `true` and provide errorMessages array to show error message.
|
|
89
|
-
*/
|
|
90
|
-
validationSchema?: (value: string, key: K) => boolean;
|
|
91
|
-
/**
|
|
92
|
-
* An array of error messages to be displayed in the cell error tooltip.
|
|
93
|
-
*/
|
|
94
|
-
errorMessages?: string[];
|
|
95
|
-
/**
|
|
96
|
-
* A callback function called when an error occurs.
|
|
97
|
-
* @param errorState - The error state, true when any cell has error, otherwise false.
|
|
98
|
-
*/
|
|
99
|
-
onError?: (errorState: boolean) => void;
|
|
100
77
|
}
|
|
@@ -80,6 +80,52 @@ import { SelectPickerProps } from './type';
|
|
|
80
80
|
* ```tsx
|
|
81
81
|
* <SelectPicker ... showSelectedOptionsCount />
|
|
82
82
|
* ```
|
|
83
|
+
* @example Multi Select
|
|
84
|
+
* ```tsx
|
|
85
|
+
* <SelectPicker ... isMulti />
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @example Creatable Multi Select
|
|
89
|
+
* ```tsx
|
|
90
|
+
* <SelectPicker
|
|
91
|
+
* ...
|
|
92
|
+
* isMulti
|
|
93
|
+
* multiSelectProps={{
|
|
94
|
+
* isCreatable: true
|
|
95
|
+
* }}
|
|
96
|
+
* />
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* @example Multi Select with group heading selectable
|
|
100
|
+
* ```tsx
|
|
101
|
+
* <SelectPicker
|
|
102
|
+
* ...
|
|
103
|
+
* isMulti
|
|
104
|
+
* multiSelectProps={{
|
|
105
|
+
* isGroupHeadingSelectable: true
|
|
106
|
+
* }}
|
|
107
|
+
* />
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* @example Multi Select with selected option validator
|
|
111
|
+
* ```tsx
|
|
112
|
+
* <SelectPicker
|
|
113
|
+
* ...
|
|
114
|
+
* isMulti
|
|
115
|
+
* multiSelectProps={{
|
|
116
|
+
* getIsOptionValid: (option) => boolean
|
|
117
|
+
* }}
|
|
118
|
+
* />
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @example Custom options rendering support (menuIsOpen needs to be handled by consumer)
|
|
122
|
+
* ```tsx
|
|
123
|
+
* <SelectPicker
|
|
124
|
+
* ...
|
|
125
|
+
* shouldRenderCustomOptions
|
|
126
|
+
* renderCustomOptions={() => <div />}
|
|
127
|
+
* />
|
|
128
|
+
* ```
|
|
83
129
|
*/
|
|
84
|
-
declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, variant, ...props }: SelectPickerProps) => JSX.Element;
|
|
130
|
+
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, renderCustomOptions, shouldRenderCustomOptions, isSearchable, selectRef, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
|
85
131
|
export default SelectPicker;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps, ValueContainerProps, MenuListProps } from 'react-select';
|
|
2
|
-
import { SelectPickerOptionType, SelectPickerProps } from './type';
|
|
1
|
+
import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps, ValueContainerProps, MenuListProps, MultiValueRemoveProps, MultiValueProps } from 'react-select';
|
|
2
|
+
import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
|
|
3
3
|
|
|
4
|
-
export declare const SelectPickerDropdownIndicator: (props: DropdownIndicatorProps<SelectPickerOptionType
|
|
5
|
-
export declare const SelectPickerClearIndicator: (props: ClearIndicatorProps<SelectPickerOptionType
|
|
6
|
-
export declare const SelectPickerControl: ({ icon, showSelectedOptionIcon, ...props }: ControlProps<SelectPickerOptionType
|
|
7
|
-
export declare const SelectPickerValueContainer: ({ showSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType
|
|
4
|
+
export declare const SelectPickerDropdownIndicator: <OptionValue>(props: DropdownIndicatorProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>>) => JSX.Element;
|
|
5
|
+
export declare const SelectPickerClearIndicator: <OptionValue>(props: ClearIndicatorProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>>) => JSX.Element;
|
|
6
|
+
export declare const SelectPickerControl: <OptionValue, IsMulti extends boolean>({ icon, showSelectedOptionIcon, ...props }: ControlProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "icon" | "showSelectedOptionIcon">) => JSX.Element;
|
|
7
|
+
export declare const SelectPickerValueContainer: <OptionValue, IsMulti extends boolean>({ showSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "showSelectedOptionsCount">) => JSX.Element;
|
|
8
8
|
export declare const SelectPickerLoadingIndicator: () => JSX.Element;
|
|
9
|
-
export declare const SelectPickerOption: ({ disableDescriptionEllipsis }:
|
|
10
|
-
export declare const SelectPickerMenuList: ({ renderMenuListFooter, ...props }: MenuListProps<SelectPickerOptionType
|
|
9
|
+
export declare const SelectPickerOption: <OptionValue, IsMulti extends boolean>({ disableDescriptionEllipsis, ...props }: OptionProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "disableDescriptionEllipsis">) => JSX.Element;
|
|
10
|
+
export declare const SelectPickerMenuList: <OptionValue, IsMulti extends boolean>({ renderMenuListFooter, shouldRenderCustomOptions, renderCustomOptions, ...props }: MenuListProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "renderMenuListFooter" | "shouldRenderCustomOptions" | "renderCustomOptions">) => JSX.Element;
|
|
11
|
+
export declare const SelectPickerMultiValueLabel: <OptionValue, IsMulti extends boolean>({ getIsOptionValid, ...props }: MultiValueProps<SelectPickerOptionType<OptionValue>, true, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>["multiSelectProps"], "getIsOptionValid">) => JSX.Element;
|
|
12
|
+
export declare const SelectPickerMultiValueRemove: (props: MultiValueRemoveProps) => JSX.Element;
|
|
13
|
+
export declare const SelectPickerGroupHeading: <OptionValue>({ isGroupHeadingSelectable, ...props }: SelectPickerGroupHeadingProps<OptionValue>) => JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { OptionType } from '../../../Common/Types';
|
|
2
2
|
import { ComponentSizeType } from '../../constants';
|
|
3
|
-
import { ReactElement, ReactNode } from 'react';
|
|
4
|
-
import { Props as ReactSelectProps } from 'react-select';
|
|
3
|
+
import { MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
4
|
+
import { GroupBase, GroupHeadingProps, Props as ReactSelectProps, SelectInstance } from 'react-select';
|
|
5
|
+
import { CreatableProps } from 'react-select/creatable';
|
|
5
6
|
|
|
6
|
-
export interface SelectPickerOptionType extends OptionType<
|
|
7
|
+
export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
|
|
7
8
|
/**
|
|
8
9
|
* Description to be displayed for the option
|
|
9
10
|
*/
|
|
@@ -19,10 +20,10 @@ export interface SelectPickerOptionType extends OptionType<number | string, Reac
|
|
|
19
20
|
}
|
|
20
21
|
export declare enum SelectPickerVariantType {
|
|
21
22
|
DEFAULT = "default",
|
|
22
|
-
|
|
23
|
+
BORDER_LESS = "border-less"
|
|
23
24
|
}
|
|
24
|
-
type SelectProps = ReactSelectProps<SelectPickerOptionType
|
|
25
|
-
export
|
|
25
|
+
type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
|
|
26
|
+
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'isLoading' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus'> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & {
|
|
26
27
|
/**
|
|
27
28
|
* Icon to be rendered in the control
|
|
28
29
|
*/
|
|
@@ -86,5 +87,60 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
|
|
|
86
87
|
* @default false
|
|
87
88
|
*/
|
|
88
89
|
disableDescriptionEllipsis?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Ref for the select picker
|
|
92
|
+
*/
|
|
93
|
+
selectRef?: IsMulti extends true ? MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>, true>> : MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>>>;
|
|
94
|
+
} & (IsMulti extends true ? {
|
|
95
|
+
isMulti: IsMulti | boolean;
|
|
96
|
+
multiSelectProps?: Pick<CreatableProps<SelectPickerOptionType<OptionValue>, true, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'> & {
|
|
97
|
+
/**
|
|
98
|
+
* If true, the select picker creates the new option
|
|
99
|
+
* Only applicable for IsMulti: true
|
|
100
|
+
*
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
isCreatable?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* If true, the group heading can be selected
|
|
106
|
+
*
|
|
107
|
+
* Only applicable for IsMulti: true
|
|
108
|
+
*
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
isGroupHeadingSelectable?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Callback handler to check if the given selection is valid or not
|
|
114
|
+
*/
|
|
115
|
+
getIsOptionValid?: (option: SelectPickerOptionType<OptionValue>) => boolean;
|
|
116
|
+
};
|
|
117
|
+
} : {
|
|
118
|
+
isMulti?: never;
|
|
119
|
+
multiSelectProps?: never;
|
|
120
|
+
}) & ({
|
|
121
|
+
/**
|
|
122
|
+
* If true, custom options are rendered in the menuList component of react select
|
|
123
|
+
*
|
|
124
|
+
* Note: renderCustomOptions is required to be passed; renderMenuListFooter is also not called
|
|
125
|
+
*
|
|
126
|
+
* @default false
|
|
127
|
+
*/
|
|
128
|
+
shouldRenderCustomOptions: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Callback handler for custom options
|
|
131
|
+
*
|
|
132
|
+
* Imp Note: The menu open/close needs to handled by the consumer in this case
|
|
133
|
+
*/
|
|
134
|
+
renderCustomOptions: () => ReactElement;
|
|
135
|
+
} | {
|
|
136
|
+
shouldRenderCustomOptions?: never;
|
|
137
|
+
renderCustomOptions?: never;
|
|
138
|
+
});
|
|
139
|
+
export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
|
|
140
|
+
isGroupHeadingSelectable: boolean;
|
|
141
|
+
};
|
|
142
|
+
export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus'> {
|
|
143
|
+
appliedFilterOptions: SelectPickerProps<number | string, true>['options'];
|
|
144
|
+
handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
|
|
89
145
|
}
|
|
90
146
|
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CHECKBOX_VALUE } from '../../../Common/Types';
|
|
2
|
+
import { GroupBase, MultiValue, OptionsOrGroups, StylesConfig } from 'react-select';
|
|
2
3
|
import { SelectPickerOptionType, SelectPickerProps } from './type';
|
|
3
4
|
|
|
4
|
-
export declare const getCommonSelectStyle: ({ error, size, menuSize, variant, }: Pick<SelectPickerProps,
|
|
5
|
+
export declare const getCommonSelectStyle: <OptionValue, IsMulti extends boolean>({ error, size, menuSize, variant, getIsOptionValid, isGroupHeadingSelectable, }: Pick<SelectPickerProps<OptionValue, IsMulti>, "error" | "size" | "menuSize" | "variant"> & Pick<SelectPickerProps<OptionValue, IsMulti>["multiSelectProps"], "getIsOptionValid" | "isGroupHeadingSelectable">) => StylesConfig<SelectPickerOptionType<OptionValue>, boolean, GroupBase<SelectPickerOptionType<OptionValue>>>;
|
|
6
|
+
export declare const getGroupCheckboxValue: <OptionValue>(groupHeadingOptions: readonly SelectPickerOptionType<OptionValue>[], selectedOptions: MultiValue<SelectPickerOptionType<OptionValue>>, getOptionValue: (option: SelectPickerOptionType<OptionValue>) => string) => CHECKBOX_VALUE.CHECKED | CHECKBOX_VALUE.INTERMEDIATE;
|
|
5
7
|
/**
|
|
6
8
|
* Retrieves an option from the options list based on the provided value.
|
|
7
9
|
*
|
|
@@ -10,4 +12,4 @@ export declare const getCommonSelectStyle: ({ error, size, menuSize, variant, }:
|
|
|
10
12
|
* @param defaultOption - The default option to return if no match is found.
|
|
11
13
|
* @returns The matched option or the default option if no match is found.
|
|
12
14
|
*/
|
|
13
|
-
export declare const getSelectPickerOptionByValue: (optionsList: OptionsOrGroups<SelectPickerOptionType
|
|
15
|
+
export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: string | number, defaultOption?: SelectPickerOptionType<OptionValue>) => SelectPickerOptionType<OptionValue>;
|
|
@@ -33,7 +33,4 @@ 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';
|
|
38
36
|
export * from './DetectBottom';
|
|
39
|
-
export * from './Collapse';
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { Pair } from 'yaml';
|
|
3
2
|
import { MaterialInfo, SortingOrder } from '../Common';
|
|
4
3
|
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
|
|
5
4
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
|
@@ -26,7 +25,6 @@ export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTrigge
|
|
|
26
25
|
export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
|
|
27
26
|
export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrder?: SortingOrder) => number;
|
|
28
27
|
export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
|
|
29
|
-
export declare const yamlComparatorBySortOrder: (a: Pair, b: Pair, sortOrder?: SortingOrder) => number;
|
|
30
28
|
export declare const useIntersection: (target: React.RefObject<Element> | Element | null, options?: IntersectionOptions, callback?: IntersectionChangeHandler) => boolean;
|
|
31
29
|
export declare const isNullOrUndefined: (value: unknown) => boolean;
|
|
32
30
|
export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CIMaterialInfoType, GetCITriggerInfoParamsType, AppEnvDeploymentConfigDTO, AppEnvDeploymentConfigPayloadType } from './app.types';
|
|
1
|
+
import { CIMaterialInfoType, GetCITriggerInfoParamsType } from './app.types';
|
|
3
2
|
|
|
4
3
|
export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => Promise<CIMaterialInfoType>;
|
|
5
4
|
/**
|
|
6
5
|
* The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
|
|
7
6
|
*/
|
|
8
7
|
export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, 'ciArtifactId'>) => Promise<CIMaterialInfoType>;
|
|
9
|
-
export declare const getAppEnvDeploymentConfig: (params: AppEnvDeploymentConfigPayloadType, signal?: AbortSignal) => Promise<ResponseType<AppEnvDeploymentConfigDTO>>;
|
|
@@ -93,120 +93,4 @@ export interface GetCITriggerInfoParamsType {
|
|
|
93
93
|
envId: number | string;
|
|
94
94
|
ciArtifactId: number | string;
|
|
95
95
|
}
|
|
96
|
-
export declare enum AppEnvDeploymentConfigType {
|
|
97
|
-
PUBLISHED_ONLY = "PublishedOnly",
|
|
98
|
-
DRAFT_ONLY = "DraftOnly",
|
|
99
|
-
PUBLISHED_WITH_DRAFT = "PublishedWithDraft",
|
|
100
|
-
PREVIOUS_DEPLOYMENTS = "PreviousDeployments",
|
|
101
|
-
DEFAULT_VERSION = "DefaultVersion"
|
|
102
|
-
}
|
|
103
|
-
export interface DraftMetadataDTO {
|
|
104
|
-
appId: number;
|
|
105
|
-
envId: number;
|
|
106
|
-
resource: number;
|
|
107
|
-
resourceName: string;
|
|
108
|
-
action: number;
|
|
109
|
-
data: string;
|
|
110
|
-
userComment: string;
|
|
111
|
-
changeProposed: boolean;
|
|
112
|
-
protectNotificationConfig: {
|
|
113
|
-
[key: string]: null;
|
|
114
|
-
};
|
|
115
|
-
draftId: number;
|
|
116
|
-
draftVersionId: number;
|
|
117
|
-
draftState: number;
|
|
118
|
-
approvers: string[];
|
|
119
|
-
canApprove: boolean;
|
|
120
|
-
commentsCount: number;
|
|
121
|
-
dataEncrypted: boolean;
|
|
122
|
-
isAppAdmin: boolean;
|
|
123
|
-
}
|
|
124
|
-
export interface ConfigDatum {
|
|
125
|
-
name: string;
|
|
126
|
-
type: string;
|
|
127
|
-
external: boolean;
|
|
128
|
-
data: Record<string, string>;
|
|
129
|
-
defaultData: Record<string, string>;
|
|
130
|
-
global: boolean;
|
|
131
|
-
externalType: string;
|
|
132
|
-
esoSecretData: {};
|
|
133
|
-
defaultESOSecretData: {};
|
|
134
|
-
secretData: Record<string, string>;
|
|
135
|
-
defaultSecretData: Record<string, string>;
|
|
136
|
-
roleARN: string;
|
|
137
|
-
subPath: boolean;
|
|
138
|
-
filePermission: string;
|
|
139
|
-
overridden: boolean;
|
|
140
|
-
mountPath?: string;
|
|
141
|
-
defaultMountPath?: string;
|
|
142
|
-
}
|
|
143
|
-
export interface ConfigMapSecretDataConfigDatumDTO extends ConfigDatum {
|
|
144
|
-
draftMetadata: DraftMetadataDTO;
|
|
145
|
-
}
|
|
146
|
-
export interface ConfigMapSecretDataType {
|
|
147
|
-
id: number;
|
|
148
|
-
appId: number;
|
|
149
|
-
configData: ConfigMapSecretDataConfigDatumDTO[];
|
|
150
|
-
}
|
|
151
|
-
export declare enum ConfigResourceType {
|
|
152
|
-
ConfigMap = "ConfigMap",
|
|
153
|
-
Secret = "Secret",
|
|
154
|
-
DeploymentTemplate = "Deployment Template"
|
|
155
|
-
}
|
|
156
|
-
export interface DeploymentTemplateDTO {
|
|
157
|
-
resourceType: ConfigResourceType.DeploymentTemplate;
|
|
158
|
-
data: {
|
|
159
|
-
[key: string]: any;
|
|
160
|
-
};
|
|
161
|
-
deploymentDraftData: ConfigMapSecretDataType | null;
|
|
162
|
-
}
|
|
163
|
-
export interface ConfigMapSecretDataDTO {
|
|
164
|
-
resourceType: Extract<ConfigResourceType, ConfigResourceType.ConfigMap | ConfigResourceType.Secret>;
|
|
165
|
-
data: ConfigMapSecretDataType;
|
|
166
|
-
}
|
|
167
|
-
export interface AppEnvDeploymentConfigDTO {
|
|
168
|
-
deploymentTemplate: DeploymentTemplateDTO | null;
|
|
169
|
-
configMapData: ConfigMapSecretDataDTO | null;
|
|
170
|
-
secretsData: ConfigMapSecretDataDTO | null;
|
|
171
|
-
isAppAdmin: boolean;
|
|
172
|
-
}
|
|
173
|
-
export interface AppEnvDeploymentConfigPayloadType {
|
|
174
|
-
appName: string;
|
|
175
|
-
envName: string;
|
|
176
|
-
configType: AppEnvDeploymentConfigType;
|
|
177
|
-
identifierId?: number;
|
|
178
|
-
pipelineId?: number;
|
|
179
|
-
resourceType?: ConfigResourceType;
|
|
180
|
-
resourceId?: number;
|
|
181
|
-
resourceName?: string;
|
|
182
|
-
}
|
|
183
|
-
export declare enum TemplateListType {
|
|
184
|
-
DefaultVersions = 1,
|
|
185
|
-
PublishedOnEnvironments = 2,
|
|
186
|
-
DeployedOnSelfEnvironment = 3,
|
|
187
|
-
DeployedOnOtherEnvironment = 4
|
|
188
|
-
}
|
|
189
|
-
export interface TemplateListDTO {
|
|
190
|
-
chartRefId: number;
|
|
191
|
-
chartVersion?: string;
|
|
192
|
-
chartType?: string;
|
|
193
|
-
type: TemplateListType;
|
|
194
|
-
environmentId?: number;
|
|
195
|
-
environmentName?: string;
|
|
196
|
-
deploymentTemplateHistoryId?: number;
|
|
197
|
-
finishedOn?: string;
|
|
198
|
-
status?: string;
|
|
199
|
-
pipelineId?: number;
|
|
200
|
-
}
|
|
201
|
-
export declare enum DraftState {
|
|
202
|
-
Init = 1,
|
|
203
|
-
Discarded = 2,
|
|
204
|
-
Published = 3,
|
|
205
|
-
AwaitApproval = 4
|
|
206
|
-
}
|
|
207
|
-
export declare enum EnvResourceType {
|
|
208
|
-
ConfigMap = "configmap",
|
|
209
|
-
Secret = "secrets",
|
|
210
|
-
DeploymentTemplate = "deployment-template"
|
|
211
|
-
}
|
|
212
96
|
export {};
|