@devtron-labs/devtron-fe-common-lib 0.2.6-patch-1 → 0.2.6-patch-2

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/Constants.d.ts +1 -0
  2. package/dist/Common/Types.d.ts +52 -1
  3. package/dist/Pages/GlobalConfigurations/Authorization/index.d.ts +3 -1
  4. package/dist/Pages/GlobalConfigurations/Authorization/service.d.ts +4 -0
  5. package/dist/Pages/GlobalConfigurations/Authorization/types.d.ts +36 -0
  6. package/dist/Pages/GlobalConfigurations/Authorization/utils.d.ts +3 -0
  7. package/dist/Shared/Components/SelectPickerCustom/FilterSelectPicker.d.ts +4 -0
  8. package/dist/Shared/Components/SelectPickerCustom/SelectPicker.component.d.ts +139 -0
  9. package/dist/Shared/Components/SelectPickerCustom/common.d.ts +13 -0
  10. package/dist/Shared/Components/SelectPickerCustom/index.d.ts +4 -0
  11. package/dist/Shared/Components/SelectPickerCustom/type.d.ts +163 -0
  12. package/dist/Shared/Components/SelectPickerCustom/utils.d.ts +15 -0
  13. package/dist/Shared/Components/index.d.ts +1 -0
  14. package/dist/Shared/Helpers.d.ts +7 -1
  15. package/dist/{cssMode-a521822e.js → cssMode-02017153.js} +1 -1
  16. package/dist/{freemarker2-d1630d73.js → freemarker2-d76f306d.js} +1 -1
  17. package/dist/{handlebars-be00e6fd.js → handlebars-f80bccc5.js} +1 -1
  18. package/dist/{html-ba55d91c.js → html-45cb14fe.js} +1 -1
  19. package/dist/{htmlMode-2f0cd720.js → htmlMode-b3c1d123.js} +1 -1
  20. package/dist/{index-2aade56e.js → index-20cfbf94.js} +43276 -38383
  21. package/dist/index.js +396 -387
  22. package/dist/{javascript-59181612.js → javascript-482e393b.js} +1 -1
  23. package/dist/{jsonMode-ee504621.js → jsonMode-e1b4b84b.js} +1 -1
  24. package/dist/{liquid-8c7c2432.js → liquid-0d918dfe.js} +1 -1
  25. package/dist/{mdx-8f6f9100.js → mdx-b05e46b1.js} +1 -1
  26. package/dist/{python-23ec6612.js → python-da69ea65.js} +1 -1
  27. package/dist/{razor-59e0c039.js → razor-9174b1ef.js} +1 -1
  28. package/dist/{tsMode-3dee8d82.js → tsMode-5b141575.js} +1 -1
  29. package/dist/{typescript-f103ce1a.js → typescript-1db8ea9a.js} +1 -1
  30. package/dist/{xml-12a700e7.js → xml-95564082.js} +1 -1
  31. package/dist/{yaml-45f0016a.js → yaml-5ef1e37c.js} +1 -1
  32. package/package.json +5 -5
@@ -83,6 +83,7 @@ export declare const ROUTES: {
83
83
  PLUGIN_GLOBAL_LIST_V2: string;
84
84
  PLUGIN_GLOBAL_LIST_TAGS: string;
85
85
  DEPLOYMENT_CHARTS_LIST: string;
86
+ USER_LIST_MIN: string;
86
87
  };
87
88
  export declare enum KEY_VALUE {
88
89
  KEY = "key",
@@ -3,6 +3,7 @@ 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
5
  import { RegistryType } from '../Shared';
6
+ import { UserGroupDTO } from '../Pages/GlobalConfigurations';
6
7
 
7
8
  /**
8
9
  * Generic response type object with support for overriding the result type
@@ -263,9 +264,45 @@ export declare enum DeploymentNodeType {
263
264
  POSTCD = "POSTCD",
264
265
  APPROVAL = "APPROVAL"
265
266
  }
266
- export interface UserApprovalConfigType {
267
+ export declare enum ManualApprovalType {
268
+ specific = "SPECIFIC",
269
+ any = "ANY",
270
+ notConfigured = "NOT_CONFIGURED"
271
+ }
272
+ export interface UserGroupApproverType {
273
+ email: string;
274
+ hasAccess: boolean;
275
+ }
276
+ export interface ImageApprovalPolicyUserGroupDataType {
277
+ dataStore: Record<string, UserGroupApproverType>;
267
278
  requiredCount: number;
279
+ emails: string[];
280
+ }
281
+ export interface ImageApprovalPolicyType {
282
+ isPolicyConfigured: boolean;
283
+ specificUsersData: ImageApprovalPolicyUserGroupDataType;
284
+ userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
285
+ validGroups: string[];
268
286
  }
287
+ export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
288
+ export interface UserApprovalConfigType {
289
+ type: ManualApprovalType;
290
+ requiredCount: number;
291
+ specificUsers: {
292
+ identifiers: string[];
293
+ requiredCount?: number;
294
+ };
295
+ userGroups: (Pick<UserGroupDTO, 'identifier'> & {
296
+ requiredCount: number;
297
+ })[];
298
+ }
299
+ export type UserApprovalConfigPayloadType = ({
300
+ type: ManualApprovalType.any;
301
+ } & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
302
+ type: ManualApprovalType.specific;
303
+ } & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
304
+ type: ManualApprovalType.notConfigured;
305
+ };
269
306
  interface ApprovalUserDataType {
270
307
  dataId: number;
271
308
  userActionTime: string;
@@ -273,12 +310,14 @@ interface ApprovalUserDataType {
273
310
  userEmail: string;
274
311
  userId: number;
275
312
  userResponse: number;
313
+ userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
276
314
  }
277
315
  export interface UserApprovalMetadataType {
278
316
  approvalRequestId: number;
279
317
  approvalRuntimeState: number;
280
318
  approvedUsersData: ApprovalUserDataType[];
281
319
  requestedUserData: ApprovalUserDataType;
320
+ approvalConfig?: UserApprovalConfigType;
282
321
  }
283
322
  export declare enum FilterStates {
284
323
  ALLOWED = 0,
@@ -329,6 +368,14 @@ export interface ArtifactReleaseMappingType {
329
368
  kind: string;
330
369
  version: string;
331
370
  }
371
+ export interface CDMaterialListModalServiceUtilProps {
372
+ artifacts: any[];
373
+ offset: number;
374
+ artifactId?: number;
375
+ artifactStatus?: string;
376
+ disableDefaultSelection?: boolean;
377
+ userApprovalConfig?: UserApprovalConfigType;
378
+ }
332
379
  export interface CDMaterialType {
333
380
  index: number;
334
381
  id: string;
@@ -535,6 +582,10 @@ export interface CDMaterialsApprovalInfo {
535
582
  approvalUsers: string[];
536
583
  userApprovalConfig: UserApprovalConfigType;
537
584
  canApproverDeploy: boolean;
585
+ /**
586
+ * Only available incase of approvals do'nt use in cd materials or any other flow since approvalUsers are not present there
587
+ */
588
+ imageApprovalPolicyDetails: ImageApprovalPolicyType;
538
589
  }
539
590
  export interface CDMaterialsMetaInfo {
540
591
  tagsEditable: boolean;
@@ -1,3 +1,5 @@
1
1
  export * from './constants';
2
- export type { UserListFilterParams, UserRoleGroup } from './types';
2
+ export type { UserListFilterParams, UserRoleGroup, UserGroupDTO, UserGroupType } from './types';
3
3
  export * from './shared';
4
+ export * from './service';
5
+ export { getUserAndApiTokenOption } from './utils';
@@ -0,0 +1,4 @@
1
+ import { SelectPickerCustomOptionType } from '../../../Shared/Components';
2
+ import { GroupBase } from 'react-select';
3
+
4
+ export declare const getUserAndApiTokenOptions: () => Promise<GroupBase<SelectPickerCustomOptionType<string>>[]>;
@@ -7,6 +7,10 @@ export type UserListFilterParams = BaseFilterQueryParams<UserListSortableKeys> &
7
7
  */
8
8
  status: UserStatus[];
9
9
  };
10
+ export interface UserMinType {
11
+ id: number;
12
+ emailId: string;
13
+ }
10
14
  export interface UserRoleGroup {
11
15
  /**
12
16
  * Id of the permission group
@@ -31,3 +35,35 @@ export interface UserRoleGroup {
31
35
  */
32
36
  timeToLive: string;
33
37
  }
38
+ export interface UserGroupDTO {
39
+ /**
40
+ * Unique display name of the user group
41
+ */
42
+ name: string;
43
+ /**
44
+ * Unique id of the user group
45
+ *
46
+ * Follows the validation for app name
47
+ */
48
+ identifier: string;
49
+ /**
50
+ * Associated description
51
+ *
52
+ * @default ''
53
+ */
54
+ description?: string;
55
+ /**
56
+ * Number of users assigned to the group
57
+ *
58
+ * @default 0
59
+ */
60
+ usersCount?: number;
61
+ }
62
+ export interface UserGroupType extends Required<Pick<UserGroupDTO, 'description' | 'name' | 'usersCount' | 'identifier'>> {
63
+ /**
64
+ * Unique id of the user group
65
+ *
66
+ * Follows the validation for app name
67
+ */
68
+ userGroupId: string;
69
+ }
@@ -0,0 +1,3 @@
1
+ import { SelectPickerCustomOptionType } from '../../../Shared/Components';
2
+
3
+ export declare const getUserAndApiTokenOption: (emailId: string) => SelectPickerCustomOptionType<string>;
@@ -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,4 @@
1
+ export { default as SelectPickerCustom } from './SelectPicker.component';
2
+ export { default as FilterSelectPickerCustom } from './FilterSelectPicker';
3
+ export type { SelectPickerOptionType as SelectPickerCustomOptionType, SelectPickerProps as SelectPickerCustomProps, FilterSelectPickerProps as FilterSelectPickerCustomProps, } from './type';
4
+ export { SelectPickerVariantType as SelectPickerCustomVariantType } 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>;
@@ -34,3 +34,4 @@ export * from './Plugin';
34
34
  export * from './KeyValueTable';
35
35
  export * from './SelectPicker';
36
36
  export * from './DetectBottom';
37
+ export * from './SelectPickerCustom';
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { MaterialInfo, SortingOrder } from '../Common';
2
+ import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
3
3
  import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
4
4
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
5
5
 
@@ -37,4 +37,10 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
37
37
  export declare const isTimeStringAvailable: (time: string) => boolean;
38
38
  export declare const getTimeDifference: (startTime: string, endTime: string) => string;
39
39
  export declare const getFileNameFromHeaders: (headers: Headers) => string;
40
+ export declare const sanitizeUserApprovalConfig: (userApprovalConfig: UserApprovalConfigType) => UserApprovalConfigType;
41
+ /**
42
+ * Manual approval is considered configured only if the type is not notConfigured
43
+ */
44
+ export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, 'type'>) => boolean;
45
+ export declare const getIsManualApprovalSpecific: (userApprovalConfig?: Pick<UserApprovalConfigType, 'type'>) => boolean;
40
46
  export {};
@@ -1,7 +1,7 @@
1
1
  var Le = Object.defineProperty;
2
2
  var je = (e, n, i) => n in e ? Le(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => (je(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Ne } from "./index-2aade56e.js";
4
+ import { m as Ne } from "./index-20cfbf94.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as F } from "./index-2aade56e.js";
1
+ import { m as F } from "./index-20cfbf94.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as i } from "./index-2aade56e.js";
1
+ import { m as i } from "./index-20cfbf94.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as d } from "./index-2aade56e.js";
1
+ import { m as d } from "./index-20cfbf94.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,7 +1,7 @@
1
1
  var $e = Object.defineProperty;
2
2
  var qe = (e, n, i) => n in e ? $e(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => (qe(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Qe } from "./index-2aade56e.js";
4
+ import { m as Qe } from "./index-20cfbf94.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)