@devtron-labs/devtron-fe-common-lib 0.2.12 → 0.2.13-beta-1

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.
Files changed (32) hide show
  1. package/dist/Common/Common.service.d.ts +2 -0
  2. package/dist/Common/Types.d.ts +2 -1
  3. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  4. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +28 -7
  5. package/dist/Shared/Components/KeyValueTable/constants.d.ts +2 -0
  6. package/dist/Shared/Components/SelectPicker/FilterSelectPicker.d.ts +4 -0
  7. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +55 -1
  8. package/dist/Shared/Components/SelectPicker/common.d.ts +11 -8
  9. package/dist/Shared/Components/SelectPicker/index.d.ts +1 -0
  10. package/dist/Shared/Components/SelectPicker/type.d.ts +73 -7
  11. package/dist/Shared/Components/SelectPicker/utils.d.ts +5 -3
  12. package/dist/Shared/constants.d.ts +4 -0
  13. package/dist/Shared/types.d.ts +12 -0
  14. package/dist/assets/index.css +1 -1
  15. package/dist/{cssMode-14cad9f0.js → cssMode-20f84167.js} +1 -1
  16. package/dist/{freemarker2-772b4500.js → freemarker2-2d114906.js} +1 -1
  17. package/dist/{handlebars-178d367f.js → handlebars-07b0b489.js} +1 -1
  18. package/dist/{html-b690a3db.js → html-03ea3283.js} +1 -1
  19. package/dist/{htmlMode-7022dce4.js → htmlMode-f4192bc0.js} +1 -1
  20. package/dist/{index-65257094.js → index-aa5201a2.js} +43320 -38775
  21. package/dist/index.js +484 -479
  22. package/dist/{javascript-ed8f9d3e.js → javascript-323e6897.js} +1 -1
  23. package/dist/{jsonMode-fda4233b.js → jsonMode-9754d94b.js} +1 -1
  24. package/dist/{liquid-009af8bd.js → liquid-733ceed9.js} +1 -1
  25. package/dist/{mdx-dd307e97.js → mdx-3cc6ca12.js} +1 -1
  26. package/dist/{python-afbaaea3.js → python-dbb9ceb8.js} +1 -1
  27. package/dist/{razor-a6f72ffc.js → razor-3b7fe009.js} +1 -1
  28. package/dist/{tsMode-8f530645.js → tsMode-27a7d5b0.js} +1 -1
  29. package/dist/{typescript-af145fcf.js → typescript-376b90a7.js} +1 -1
  30. package/dist/{xml-c852d532.js → xml-57a34b15.js} +1 -1
  31. package/dist/{yaml-1ec8b4bf.js → yaml-ed883a3f.js} +1 -1
  32. package/package.json +5 -5
@@ -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;
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties } from 'react';
2
2
  import { Placement } from 'tippy.js';
3
3
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
4
4
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
5
- import { RegistryType, Severity } from '../Shared';
5
+ import { RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
6
6
 
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
@@ -546,6 +546,7 @@ export interface CDMaterialsMetaInfo {
546
546
  * This is the ID of user that has request the material
547
547
  */
548
548
  requestedUserId: number;
549
+ runtimeParams: RuntimeParamsListItemType[];
549
550
  }
550
551
  export interface ImagePromotionMaterialInfo {
551
552
  isApprovalPendingForPromotion: 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 interface KeyValueTableProps<K extends string> {
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 {};
@@ -0,0 +1,2 @@
1
+ export declare const DUPLICATE_KEYS_VALIDATION_MESSAGE = "Keys must be unique";
2
+ export declare const EMPTY_KEY_VALIDATION_MESSAGE = "Key cannot be empty";
@@ -0,0 +1,4 @@
1
+ import { FilterSelectPickerProps } from './type';
2
+
3
+ declare const FilterSelectPicker: ({ appliedFilterOptions, handleApplyFilter, options, ...props }: FilterSelectPickerProps) => JSX.Element;
4
+ export default FilterSelectPicker;
@@ -80,6 +80,60 @@ 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
+ * ```
129
+ *
130
+ * @example Align the menu at the right most end
131
+ * ```tsx
132
+ * <SelectPicker
133
+ * ...
134
+ * shouldMenuAlignRight
135
+ * />
136
+ * ```
83
137
  */
84
- declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, variant, shouldMenuAlignRight, ...props }: SelectPickerProps) => JSX.Element;
138
+ 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, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
85
139
  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>) => JSX.Element;
5
- export declare const SelectPickerClearIndicator: (props: ClearIndicatorProps<SelectPickerOptionType>) => JSX.Element;
6
- export declare const SelectPickerControl: ({ icon, showSelectedOptionIcon, ...props }: ControlProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'icon' | 'showSelectedOptionIcon'>) => JSX.Element;
7
- export declare const SelectPickerValueContainer: ({ showSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'showSelectedOptionsCount'>) => JSX.Element;
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, customSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "customSelectedOptionsCount" | "showSelectedOptionsCount">) => JSX.Element;
8
8
  export declare const SelectPickerLoadingIndicator: () => JSX.Element;
9
- export declare const SelectPickerOption: ({ disableDescriptionEllipsis }: SelectPickerProps) => (props: OptionProps<SelectPickerOptionType>) => JSX.Element;
10
- export declare const SelectPickerMenuList: ({ renderMenuListFooter, ...props }: MenuListProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'renderMenuListFooter'>) => JSX.Element;
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,3 +1,4 @@
1
1
  export { default as SelectPicker } from './SelectPicker.component';
2
+ export { default as FilterSelectPicker } from './FilterSelectPicker';
2
3
  export * from './type';
3
4
  export { getSelectPickerOptionByValue } from './utils';
@@ -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<number | string, ReactNode> {
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
- BORDERLESS = "borderless"
23
+ BORDER_LESS = "border-less"
23
24
  }
24
- type SelectProps = ReactSelectProps<SelectPickerOptionType>;
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'>> {
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' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur'> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & {
26
27
  /**
27
28
  * Icon to be rendered in the control
28
29
  */
@@ -34,7 +35,7 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
34
35
  /**
35
36
  * Render function for the footer at the bottom of menu list. It is sticky by default
36
37
  */
37
- renderMenuListFooter?: () => ReactNode;
38
+ renderMenuListFooter?: (selectedOptions: SelectProps<OptionValue, IsMulti>['value']) => ReactNode;
38
39
  /**
39
40
  * Info text for the select, if any
40
41
  */
@@ -50,6 +51,10 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
50
51
  * @default 'true'
51
52
  */
52
53
  showSelectedOptionIcon?: boolean;
54
+ /**
55
+ * Custom selected options count for use cases like filters
56
+ */
57
+ customSelectedOptionsCount?: number;
53
58
  /**
54
59
  * Height of the dropdown
55
60
  *
@@ -86,6 +91,10 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
86
91
  * @default false
87
92
  */
88
93
  disableDescriptionEllipsis?: boolean;
94
+ /**
95
+ * Ref for the select picker
96
+ */
97
+ selectRef?: IsMulti extends true ? MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>, true>> : MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>>>;
89
98
  /**
90
99
  * If true, the menu is aligned at the right end to prevent going outside of viewport
91
100
  * in case of menu being larger than the control
@@ -93,5 +102,62 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
93
102
  * @default false
94
103
  */
95
104
  shouldMenuAlignRight?: boolean;
105
+ /**
106
+ * If true, the select spans to the max available width
107
+ *
108
+ * @default false
109
+ */
110
+ fullWidth?: boolean;
111
+ } & (IsMulti extends true ? {
112
+ isMulti: IsMulti | boolean;
113
+ multiSelectProps?: Pick<CreatableProps<SelectPickerOptionType<OptionValue>, true, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'> & {
114
+ /**
115
+ * If true, the select picker creates the new option
116
+ * Only applicable for IsMulti: true
117
+ *
118
+ * @default false
119
+ */
120
+ isCreatable?: boolean;
121
+ /**
122
+ * If true, the group heading can be selected
123
+ *
124
+ * Only applicable for IsMulti: true
125
+ *
126
+ * @default false
127
+ */
128
+ isGroupHeadingSelectable?: boolean;
129
+ /**
130
+ * Callback handler to check if the given selection is valid or not
131
+ */
132
+ getIsOptionValid?: (option: SelectPickerOptionType<OptionValue>) => boolean;
133
+ };
134
+ } : {
135
+ isMulti?: never;
136
+ multiSelectProps?: never;
137
+ }) & ({
138
+ /**
139
+ * If true, custom options are rendered in the menuList component of react select
140
+ *
141
+ * Note: renderCustomOptions is required to be passed; renderMenuListFooter is also not called
142
+ *
143
+ * @default false
144
+ */
145
+ shouldRenderCustomOptions: boolean;
146
+ /**
147
+ * Callback handler for custom options
148
+ *
149
+ * Imp Note: The menu open/close needs to handled by the consumer in this case
150
+ */
151
+ renderCustomOptions: () => ReactElement;
152
+ } | {
153
+ shouldRenderCustomOptions?: never;
154
+ renderCustomOptions?: never;
155
+ });
156
+ export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
157
+ isGroupHeadingSelectable: boolean;
158
+ };
159
+ export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight'> {
160
+ appliedFilterOptions: SelectPickerProps<number | string, true>['options'];
161
+ handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
96
162
  }
97
163
  export {};
@@ -1,7 +1,9 @@
1
- import { GroupBase, OptionsOrGroups, StylesConfig } from 'react-select';
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, shouldMenuAlignRight, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize' | 'variant' | 'shouldMenuAlignRight'>) => StylesConfig<SelectPickerOptionType>;
5
+ export declare const getCommonSelectStyle: <OptionValue, IsMulti extends boolean>({ error, size, menuSize, variant, getIsOptionValid, isGroupHeadingSelectable, shouldMenuAlignRight, }: Pick<SelectPickerProps<OptionValue, IsMulti>, "error" | "size" | "shouldMenuAlignRight" | "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, sh
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, GroupBase<SelectPickerOptionType>>, value: string | number, defaultOption?: SelectPickerOptionType) => SelectPickerOptionType;
15
+ export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: OptionValue, defaultOption?: SelectPickerOptionType<OptionValue>) => SelectPickerOptionType<OptionValue>;
@@ -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;
@@ -400,3 +403,4 @@ export declare enum SelectAllGroupedResourceIdentifiers {
400
403
  allExistingAndFutureProdEnvironments = "-2",
401
404
  allExistingAndFutureEnvironments = "-3"
402
405
  }
406
+ export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
@@ -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 {};