@devtron-labs/devtron-fe-common-lib 0.2.5 → 0.2.6-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 (79) hide show
  1. package/dist/Common/CodeEditor/types.d.ts +2 -2
  2. package/dist/Common/Constants.d.ts +2 -12
  3. package/dist/Common/RJSF/constants.d.ts +5 -0
  4. package/dist/Common/RJSF/index.d.ts +1 -0
  5. package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +1 -1
  6. package/dist/Common/Types.d.ts +2 -2
  7. package/dist/Pages/GlobalConfigurations/Authorization/index.d.ts +1 -1
  8. package/dist/Pages/GlobalConfigurations/Authorization/types.d.ts +18 -0
  9. package/dist/Pages/GlobalConfigurations/DeploymentCharts/basicViewSchema.json.d.ts +273 -0
  10. package/dist/Pages/GlobalConfigurations/DeploymentCharts/fallbackJobsNCronJobGuiSchema.json.d.ts +157 -0
  11. package/dist/Pages/GlobalConfigurations/DeploymentCharts/index.d.ts +2 -0
  12. package/dist/Pages/GlobalConfigurations/DeploymentCharts/types.d.ts +24 -0
  13. package/dist/Pages/GlobalConfigurations/DeploymentCharts/utils.d.ts +4 -0
  14. package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
  15. package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts +1 -1
  16. package/dist/Shared/Components/CICDHistory/types.d.ts +1 -3
  17. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  18. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +1 -24
  19. package/dist/Shared/Components/ScannedObjectBar/ScannedObjectBar.d.ts +4 -0
  20. package/dist/Shared/Components/ScannedObjectBar/index.d.ts +1 -0
  21. package/dist/Shared/Components/ScannedObjectBar/types.d.ts +7 -0
  22. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  23. package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
  24. package/dist/Shared/Components/SelectPicker/index.d.ts +0 -1
  25. package/dist/Shared/Components/SelectPicker/type.d.ts +0 -16
  26. package/dist/Shared/Components/SelectPicker/utils.d.ts +2 -11
  27. package/dist/Shared/Components/SelectPickerCustom/FilterSelectPicker.d.ts +4 -0
  28. package/dist/Shared/Components/SelectPickerCustom/SelectPicker.component.d.ts +139 -0
  29. package/dist/Shared/Components/SelectPickerCustom/common.d.ts +13 -0
  30. package/dist/Shared/Components/SelectPickerCustom/index.d.ts +3 -0
  31. package/dist/Shared/Components/SelectPickerCustom/type.d.ts +163 -0
  32. package/dist/Shared/Components/SelectPickerCustom/utils.d.ts +15 -0
  33. package/dist/Shared/Components/Vulnerabilities/utils.d.ts +0 -1
  34. package/dist/Shared/Components/index.d.ts +2 -4
  35. package/dist/Shared/Helpers.d.ts +1 -2
  36. package/dist/Shared/Services/app.service.d.ts +1 -3
  37. package/dist/Shared/Services/app.types.d.ts +0 -116
  38. package/dist/Shared/types.d.ts +7 -19
  39. package/dist/Shared/validations.d.ts +1 -3
  40. package/dist/assets/editor.worker-60ba9509.js +12 -0
  41. package/dist/assets/index.css +1 -1
  42. package/dist/assets/yaml.worker-3bbe780a.js +472 -0
  43. package/dist/{cssMode-8fed7bef.js → cssMode-a92794b5.js} +1 -1
  44. package/dist/{freemarker2-fc075df3.js → freemarker2-e5ee51c9.js} +1 -1
  45. package/dist/{handlebars-93ff95f9.js → handlebars-9153151b.js} +1 -1
  46. package/dist/{html-3066ce46.js → html-011bc885.js} +1 -1
  47. package/dist/{htmlMode-56510e8d.js → htmlMode-4885a742.js} +1 -1
  48. package/dist/{index-7540b433.js → index-a419ec38.js} +45173 -40798
  49. package/dist/index.d.ts +0 -2
  50. package/dist/index.js +486 -498
  51. package/dist/{javascript-e1b26116.js → javascript-9b5d9b49.js} +1 -1
  52. package/dist/{jsonMode-8ec4966b.js → jsonMode-fa67bdba.js} +1 -1
  53. package/dist/{liquid-48a55e03.js → liquid-a2b3aabb.js} +1 -1
  54. package/dist/{mdx-239191d8.js → mdx-96b66709.js} +1 -1
  55. package/dist/{python-9d05a2ee.js → python-93cea446.js} +1 -1
  56. package/dist/{razor-026b9b6f.js → razor-a13e6ece.js} +1 -1
  57. package/dist/{tsMode-da8ca338.js → tsMode-fa82c200.js} +1 -1
  58. package/dist/{typescript-38649d81.js → typescript-9835808a.js} +1 -1
  59. package/dist/{xml-41381217.js → xml-f03d7ed4.js} +1 -1
  60. package/dist/{yaml-5e3f3a59.js → yaml-82f4884e.js} +1 -1
  61. package/package.json +5 -5
  62. package/dist/Common/Security/types.d.ts +0 -4
  63. package/dist/Shared/Components/Collapse/Collapse.d.ts +0 -3
  64. package/dist/Shared/Components/Collapse/index.d.ts +0 -2
  65. package/dist/Shared/Components/Collapse/types.d.ts +0 -7
  66. package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +0 -3
  67. package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +0 -96
  68. package/dist/Shared/Components/CollapsibleList/index.d.ts +0 -2
  69. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +0 -3
  70. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +0 -38
  71. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +0 -3
  72. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +0 -3
  73. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +0 -3
  74. package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +0 -3
  75. package/dist/Shared/Components/DeploymentConfigDiff/types.d.ts +0 -69
  76. package/dist/Shared/Components/FilterButton/FilterButton.d.ts +0 -5
  77. package/dist/Shared/Components/FilterButton/index.d.ts +0 -1
  78. package/dist/Shared/Components/FilterButton/types.d.ts +0 -12
  79. package/dist/Shared/Components/FilterButton/utils.d.ts +0 -15
@@ -0,0 +1,7 @@
1
+ export interface ScannedObjectBarProps {
2
+ criticalVulnerabilitiesCount: number;
3
+ moderateVulnerabilitiesCount: number;
4
+ lowVulnerabilitiesCount: number;
5
+ objectBarClassName?: string;
6
+ removeObjectCountMargin?: boolean;
7
+ }
@@ -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, variant, ...props }: SelectPickerProps) => JSX.Element;
84
+ declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, ...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: ({ disableDescriptionEllipsis }: SelectPickerProps) => (props: OptionProps<SelectPickerOptionType>) => JSX.Element;
9
+ export declare const SelectPickerOption: (props: OptionProps<SelectPickerOptionType>) => JSX.Element;
10
10
  export declare const SelectPickerMenuList: ({ renderMenuListFooter, ...props }: MenuListProps<SelectPickerOptionType> & Pick<SelectPickerProps, 'renderMenuListFooter'>) => JSX.Element;
@@ -1,3 +1,2 @@
1
1
  export { default as SelectPicker } from './SelectPicker.component';
2
2
  export * from './type';
3
- export { getSelectPickerOptionByValue } from './utils';
@@ -17,10 +17,6 @@ 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
- }
24
20
  type SelectProps = ReactSelectProps<SelectPickerOptionType>;
25
21
  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'>> {
26
22
  /**
@@ -74,17 +70,5 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
74
70
  * @default 'ComponentSizeType.small'
75
71
  */
76
72
  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;
89
73
  }
90
74
  export {};
@@ -1,13 +1,4 @@
1
- import { GroupBase, OptionsOrGroups, StylesConfig } from 'react-select';
1
+ import { StylesConfig } from 'react-select';
2
2
  import { SelectPickerOptionType, SelectPickerProps } from './type';
3
3
 
4
- export declare const getCommonSelectStyle: ({ error, size, menuSize, variant, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize' | 'variant'>) => StylesConfig<SelectPickerOptionType>;
5
- /**
6
- * Retrieves an option from the options list based on the provided value.
7
- *
8
- * @param optionsList - The list of options or groups of options.
9
- * @param value - The value to compare against the options' values.
10
- * @param defaultOption - The default option to return if no match is found.
11
- * @returns The matched option or the default option if no match is found.
12
- */
13
- export declare const getSelectPickerOptionByValue: (optionsList: OptionsOrGroups<SelectPickerOptionType, GroupBase<SelectPickerOptionType>>, value: string | number, defaultOption?: SelectPickerOptionType) => SelectPickerOptionType;
4
+ export declare const getCommonSelectStyle: ({ error, size, menuSize, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize'>) => StylesConfig<SelectPickerOptionType>;
@@ -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;
@@ -0,0 +1,139 @@
1
+ import { SelectPickerProps } from './type';
2
+
3
+ /**
4
+ * Generic component for select picker
5
+ *
6
+ * @example With icon in control
7
+ * ```tsx
8
+ * <SelectPicker ... icon={<CustomIcon />} />
9
+ * ```
10
+ *
11
+ * @example Medium menu list width
12
+ * ```tsx
13
+ * <SelectPicker ... menuSize={ComponentSizeType.medium} />
14
+ * ```
15
+ *
16
+ * @example Large menu list width
17
+ * ```tsx
18
+ * <SelectPicker ... menuSize={ComponentSizeType.large} />
19
+ * ```
20
+ *
21
+ * @example Required label
22
+ * ```tsx
23
+ * <SelectPicker ... required label="Label" />
24
+ * ```
25
+ *
26
+ * @example Custom label
27
+ * ```tsx
28
+ * <SelectPicker ... label={<div>Label</div>} />
29
+ * ```
30
+ *
31
+ * @example Error state
32
+ * ```tsx
33
+ * <SelectPicker ... error="Something went wrong" />
34
+ * ```
35
+ *
36
+ * @example Helper text
37
+ * ```tsx
38
+ * <SelectPicker ... helperText="Help information" />
39
+ * ```
40
+ *
41
+ * @example Menu list footer
42
+ * The footer is sticky by default
43
+ * ```tsx
44
+ * <SelectPicker
45
+ * ...
46
+ * renderMenuListFooter={() => (
47
+ * <div className="px-8 py-6 dc__border-top bcn-50 cn-6">
48
+ * <div>Foot note</div>
49
+ * </div>
50
+ * )}
51
+ * />
52
+ * ```
53
+ *
54
+ * @example Loading state
55
+ * ```tsx
56
+ * <SelectPicker ... isLoading />
57
+ * ```
58
+ *
59
+ * @example Disabled state
60
+ * ```tsx
61
+ * <SelectPicker ... isDisabled />
62
+ * ```
63
+ *
64
+ * @example Loading & disabled state
65
+ * ```tsx
66
+ * <SelectPicker ... isLoading isDisabled />
67
+ * ```
68
+ *
69
+ * @example Hide selected option icon in control
70
+ * ```tsx
71
+ * <SelectPicker ... showSelectedOptionIcon={false} />
72
+ * ```
73
+ *
74
+ * @example Selected option clearable
75
+ * ```tsx
76
+ * <SelectPicker ... isClearable />
77
+ * ```
78
+ *
79
+ * @example Selected option clearable
80
+ * ```tsx
81
+ * <SelectPicker ... showSelectedOptionsCount />
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
+ * ```
137
+ */
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;
139
+ export default SelectPicker;
@@ -0,0 +1,13 @@
1
+ import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps, ValueContainerProps, MenuListProps, MultiValueRemoveProps, MultiValueProps } from 'react-select';
2
+ import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
3
+
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>, "showSelectedOptionsCount" | "customSelectedOptionsCount">) => JSX.Element;
8
+ export declare const SelectPickerLoadingIndicator: () => 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;
@@ -0,0 +1,3 @@
1
+ export { default as SelectPickerCustom } from './SelectPicker.component';
2
+ export { default as FilterSelectPickerCustom } from './FilterSelectPicker';
3
+ export type { SelectPickerOptionType as SelectPickerCustomOptionType, SelectPickerVariantType as SelectPickerCustomVariantType, SelectPickerProps as SelectPickerCustomProps, FilterSelectPickerProps as FilterSelectPickerCustomProps, } from './type';
@@ -0,0 +1,163 @@
1
+ import { OptionType } from '../../../Common/Types';
2
+ import { ComponentSizeType } from '../../constants';
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';
6
+
7
+ export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
8
+ /**
9
+ * Description to be displayed for the option
10
+ */
11
+ description?: string;
12
+ /**
13
+ * Icon at the start of the option
14
+ */
15
+ startIcon?: ReactElement;
16
+ /**
17
+ * Icon at the end of the option
18
+ */
19
+ endIcon?: ReactElement;
20
+ }
21
+ export declare enum SelectPickerVariantType {
22
+ DEFAULT = "default",
23
+ BORDER_LESS = "border-less"
24
+ }
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'>> & {
27
+ /**
28
+ * Icon to be rendered in the control
29
+ */
30
+ icon?: ReactElement;
31
+ /**
32
+ * Error message for the select
33
+ */
34
+ error?: ReactNode;
35
+ /**
36
+ * Render function for the footer at the bottom of menu list. It is sticky by default
37
+ */
38
+ renderMenuListFooter?: (selectedOptions: SelectProps<OptionValue, IsMulti>['value']) => ReactNode;
39
+ /**
40
+ * Info text for the select, if any
41
+ */
42
+ helperText?: ReactNode;
43
+ /**
44
+ * Label for the select. if required is added, the corresponding * is also added
45
+ */
46
+ label?: ReactNode;
47
+ /**
48
+ * If true, the selected option icon is shown in the container.
49
+ * startIcon has higher priority than endIcon.
50
+ *
51
+ * @default 'true'
52
+ */
53
+ showSelectedOptionIcon?: boolean;
54
+ /**
55
+ * Custom selected options count for use cases like filters
56
+ */
57
+ customSelectedOptionsCount?: number;
58
+ /**
59
+ * Height of the dropdown
60
+ *
61
+ * @default 'ComponentSizeType.medium'
62
+ */
63
+ size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
64
+ /**
65
+ * Content to be shown in a tippy when disabled
66
+ */
67
+ disabledTippyContent?: ReactNode;
68
+ /**
69
+ * If true, the selected options count is shown in a chip inside ValueContainer
70
+ *
71
+ * @default 'false'
72
+ */
73
+ showSelectedOptionsCount?: boolean;
74
+ /**
75
+ * Width of the menu list
76
+ *
77
+ * Note: the overflow needs to be handled explicitly for non-small variants
78
+ *
79
+ * @default 'ComponentSizeType.small'
80
+ */
81
+ menuSize?: ComponentSizeType;
82
+ /**
83
+ * Variant of the select.
84
+ *
85
+ * @default SelectPickerVariantType.DEFAULT
86
+ */
87
+ variant?: SelectPickerVariantType;
88
+ /**
89
+ * Disables the ellipsis on description, it will be shown in full width, wrapped if required.
90
+ *
91
+ * @default false
92
+ */
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>>>;
98
+ /**
99
+ * If true, the menu is aligned at the right end to prevent going outside of viewport
100
+ * in case of menu being larger than the control
101
+ *
102
+ * @default false
103
+ */
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: SelectPickerOptionType[];
161
+ handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
162
+ }
163
+ export {};
@@ -0,0 +1,15 @@
1
+ import { CHECKBOX_VALUE } from '../../../Common/Types';
2
+ import { GroupBase, MultiValue, OptionsOrGroups, StylesConfig } from 'react-select';
3
+ import { SelectPickerOptionType, SelectPickerProps } from './type';
4
+
5
+ export declare const getCommonSelectStyle: <OptionValue, IsMulti extends boolean>({ error, size, menuSize, variant, getIsOptionValid, isGroupHeadingSelectable, shouldMenuAlignRight, }: Pick<SelectPickerProps<OptionValue, IsMulti>, "error" | "size" | "menuSize" | "shouldMenuAlignRight" | "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;
7
+ /**
8
+ * Retrieves an option from the options list based on the provided value.
9
+ *
10
+ * @param optionsList - The list of options or groups of options.
11
+ * @param value - The value to compare against the options' values.
12
+ * @param defaultOption - The default option to return if no match is found.
13
+ * @returns The matched option or the default option if no match is found.
14
+ */
15
+ export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: string | number, defaultOption?: SelectPickerOptionType<OptionValue>) => SelectPickerOptionType<OptionValue>;
@@ -1,5 +1,4 @@
1
1
  import { LastExecutionResponseType, LastExecutionResultType } from '../../types';
2
2
 
3
- export declare const getSortedVulnerabilities: (vulnerabilities: any) => any;
4
3
  export declare const getParsedScanResult: (scanResult: any) => LastExecutionResultType;
5
4
  export declare const parseLastExecutionResponse: (response: any) => LastExecutionResponseType;
@@ -10,6 +10,7 @@ export * from './FilterChips';
10
10
  export * from './ActivityIndicator';
11
11
  export * from './GenericSectionErrorState';
12
12
  export * from './KeyValueList';
13
+ export * from './ScannedObjectBar';
13
14
  export * from './InfoIconTippy';
14
15
  export * from './EditableTextArea';
15
16
  export * from './Header';
@@ -32,8 +33,5 @@ export * from './IframeContainer';
32
33
  export * from './Plugin';
33
34
  export * from './KeyValueTable';
34
35
  export * from './SelectPicker';
35
- export * from './CollapsibleList';
36
- export * from './DeploymentConfigDiff';
37
36
  export * from './DetectBottom';
38
- export * from './Collapse';
39
- export * from './FilterButton';
37
+ export * from './SelectPickerCustom';
@@ -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';
@@ -25,8 +24,8 @@ export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[])
25
24
  export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
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;
27
+ export declare function versionComparatorBySortOrder(a: Record<string, any>, b: Record<string, any>, compareKey: string, orderBy: SortingOrder): any;
28
28
  export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
29
- export declare const yamlComparatorBySortOrder: (a: Pair, b: Pair, sortOrder?: SortingOrder) => number;
30
29
  export declare const useIntersection: (target: React.RefObject<Element> | Element | null, options?: IntersectionOptions, callback?: IntersectionChangeHandler) => boolean;
31
30
  export declare const isNullOrUndefined: (value: unknown) => boolean;
32
31
  export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
@@ -1,9 +1,7 @@
1
- import { ResponseType } from '../../Common';
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 {};
@@ -210,10 +210,8 @@ export declare enum DefaultUserKey {
210
210
  }
211
211
  export declare enum Severity {
212
212
  CRITICAL = "critical",
213
- HIGH = "high",
214
- MEDIUM = "medium",
215
- LOW = "low",
216
- UNKNOWN = "unknown"
213
+ MODERATE = "moderate",
214
+ LOW = "low"
217
215
  }
218
216
  export declare enum ImagePromotionTabs {
219
217
  REQUEST = "request",
@@ -382,19 +380,16 @@ export declare enum ResourceVersionType {
382
380
  v1 = "v1",
383
381
  alpha1 = "alpha1"
384
382
  }
385
- export interface SeverityCount {
386
- critical: number;
387
- high: number;
388
- medium: number;
389
- low: number;
390
- unknown: number;
391
- }
392
383
  export declare enum PolicyKindType {
393
384
  lockConfiguration = "lock-configuration"
394
385
  }
395
386
  export interface LastExecutionResultType {
396
387
  lastExecution: string;
397
- severityCount: SeverityCount;
388
+ severityCount: {
389
+ critical: number;
390
+ moderate: number;
391
+ low: number;
392
+ };
398
393
  vulnerabilities: VulnerabilityType[];
399
394
  scanExecutionId?: number;
400
395
  appId?: number;
@@ -541,13 +536,6 @@ export interface BatchConfigType {
541
536
  export interface scrollableInterface {
542
537
  autoBottomScroll: boolean;
543
538
  }
544
- export declare enum URLProtocolType {
545
- HTTP = "http:",
546
- HTTPS = "https:",
547
- SSH = "ssh:",
548
- SMTP = "smtp:",
549
- S3 = "s3:"
550
- }
551
539
  export type BaseFilterQueryParams<T> = {
552
540
  /**
553
541
  * Offset for the list result