@devtron-labs/devtron-fe-common-lib 0.2.11 → 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 (45) 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/CICDHistory/Artifacts.d.ts +1 -1
  4. package/dist/Shared/Components/CICDHistory/LogStageAccordion.d.ts +1 -1
  5. package/dist/Shared/Components/CICDHistory/LogsRenderer.d.ts +1 -1
  6. package/dist/Shared/Components/CICDHistory/TriggerOutput.d.ts +1 -1
  7. package/dist/Shared/Components/CICDHistory/types.d.ts +18 -17
  8. package/dist/Shared/Components/CICDHistory/utils.d.ts +1 -0
  9. package/dist/Shared/Components/CommitChipCell/types.d.ts +1 -1
  10. package/dist/Shared/Components/ImageChipCell/ImageChipCell.component.d.ts +1 -1
  11. package/dist/Shared/Components/ImageChipCell/types.d.ts +13 -5
  12. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  13. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +28 -7
  14. package/dist/Shared/Components/KeyValueTable/constants.d.ts +2 -0
  15. package/dist/Shared/Components/SelectPicker/FilterSelectPicker.d.ts +4 -0
  16. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +55 -1
  17. package/dist/Shared/Components/SelectPicker/common.d.ts +11 -8
  18. package/dist/Shared/Components/SelectPicker/index.d.ts +1 -0
  19. package/dist/Shared/Components/SelectPicker/type.d.ts +73 -7
  20. package/dist/Shared/Components/SelectPicker/utils.d.ts +5 -3
  21. package/dist/Shared/Components/ShowMoreText/ShowMoreText.d.ts +3 -2
  22. package/dist/Shared/Components/ShowMoreText/index.d.ts +1 -0
  23. package/dist/Shared/Components/index.d.ts +1 -0
  24. package/dist/Shared/Helpers.d.ts +5 -0
  25. package/dist/Shared/constants.d.ts +7 -0
  26. package/dist/Shared/types.d.ts +12 -0
  27. package/dist/assets/index.css +1 -1
  28. package/dist/{cssMode-825d0d6c.js → cssMode-20f84167.js} +1 -1
  29. package/dist/{freemarker2-4d20123a.js → freemarker2-2d114906.js} +1 -1
  30. package/dist/{handlebars-8b1a2674.js → handlebars-07b0b489.js} +1 -1
  31. package/dist/{html-04e78d7b.js → html-03ea3283.js} +1 -1
  32. package/dist/{htmlMode-2a825b1d.js → htmlMode-f4192bc0.js} +1 -1
  33. package/dist/{index-168d5ec6.js → index-aa5201a2.js} +43627 -39033
  34. package/dist/index.js +489 -480
  35. package/dist/{javascript-cdb7f676.js → javascript-323e6897.js} +1 -1
  36. package/dist/{jsonMode-706ed6be.js → jsonMode-9754d94b.js} +1 -1
  37. package/dist/{liquid-dabc8c62.js → liquid-733ceed9.js} +1 -1
  38. package/dist/{mdx-b58edbab.js → mdx-3cc6ca12.js} +1 -1
  39. package/dist/{python-ce5766f7.js → python-dbb9ceb8.js} +1 -1
  40. package/dist/{razor-722f740f.js → razor-3b7fe009.js} +1 -1
  41. package/dist/{tsMode-b7667d3d.js → tsMode-27a7d5b0.js} +1 -1
  42. package/dist/{typescript-46e39a82.js → typescript-376b90a7.js} +1 -1
  43. package/dist/{xml-8819d07a.js → xml-57a34b15.js} +1 -1
  44. package/dist/{yaml-4f34c71a.js → yaml-ed883a3f.js} +1 -1
  45. 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,5 +1,5 @@
1
1
  import { ArtifactType, CIListItemType } from './types';
2
2
 
3
3
  export declare const CIListItem: ({ type, userApprovalMetadata, triggeredBy, children, ciPipelineId, artifactId, imageComment, imageReleaseTags, appReleaseTagNames, tagsEditable, hideImageTaggingHardDelete, appliedFilters, isSuperAdmin, promotionApprovalMetadata, appliedFiltersTimestamp, selectedEnvironmentName, renderCIListHeader, }: CIListItemType) => JSX.Element;
4
- declare const Artifacts: ({ status, artifact, blobStorageEnabled, isArtifactUploaded, downloadArtifactUrl, ciPipelineId, artifactId, isJobView, isJobCI, imageComment, imageReleaseTags, type, appReleaseTagNames, tagsEditable, hideImageTaggingHardDelete, jobCIClass, renderCIListHeader, }: ArtifactType) => JSX.Element;
4
+ declare const Artifacts: ({ status, artifact, blobStorageEnabled, isArtifactUploaded, downloadArtifactUrl, ciPipelineId, artifactId, isJobView, isJobCI, imageComment, imageReleaseTags, type, appReleaseTagNames, tagsEditable, hideImageTaggingHardDelete, rootClassName, renderCIListHeader, }: ArtifactType) => JSX.Element;
5
5
  export default Artifacts;
@@ -1,4 +1,4 @@
1
1
  import { LogStageAccordionProps } from './types';
2
2
 
3
- declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, }: LogStageAccordionProps) => JSX.Element;
3
+ declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, fullScreenView, }: LogStageAccordionProps) => JSX.Element;
4
4
  export default LogStageAccordion;
@@ -1,4 +1,4 @@
1
1
  import { LogsRendererType } from './types';
2
2
 
3
- export declare const LogsRenderer: ({ triggerDetails, isBlobStorageConfigured, parentType, }: LogsRendererType) => JSX.Element;
3
+ export declare const LogsRenderer: ({ triggerDetails, isBlobStorageConfigured, parentType, fullScreenView, }: LogsRendererType) => JSX.Element;
4
4
  export default LogsRenderer;
@@ -2,5 +2,5 @@ import { default as React } from 'react';
2
2
  import { TriggerDetailsType, TriggerOutputProps } from './types';
3
3
 
4
4
  export declare const TriggerDetails: React.MemoExoticComponent<({ status, startedOn, finishedOn, triggeredBy, triggeredByEmail, ciMaterials, gitTriggers, message, podStatus, type, stage, artifact, environmentName, isJobView, workerPodName, triggerMetadata, renderDeploymentHistoryTriggerMetaText, }: TriggerDetailsType) => JSX.Element>;
5
- declare const TriggerOutput: ({ fullScreenView, triggerHistory, setTriggerHistory, setFullScreenView, setDeploymentHistoryList, deploymentHistoryList, deploymentAppType, isBlobStorageConfigured, appReleaseTags, tagsEditable, hideImageTaggingHardDelete, fetchIdData, setFetchTriggerIdData, selectedEnvironmentName, deploymentHistoryResult, renderRunSource, renderCIListHeader, renderDeploymentApprovalInfo, processVirtualEnvironmentDeploymentData, renderVirtualHistoryArtifacts, renderDeploymentHistoryTriggerMetaText, resourceId, }: TriggerOutputProps) => JSX.Element;
5
+ declare const TriggerOutput: ({ fullScreenView, triggerHistory, setTriggerHistory, setFullScreenView, setDeploymentHistoryList, deploymentHistoryList, deploymentAppType, isBlobStorageConfigured, appReleaseTags, tagsEditable, hideImageTaggingHardDelete, fetchIdData, setFetchTriggerIdData, selectedEnvironmentName, deploymentHistoryResult, renderRunSource, renderCIListHeader, renderDeploymentApprovalInfo, processVirtualEnvironmentDeploymentData, renderVirtualHistoryArtifacts, renderDeploymentHistoryTriggerMetaText, resourceId, scrollToTop, scrollToBottom, }: TriggerOutputProps) => JSX.Element;
6
6
  export default TriggerOutput;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties } from 'react';
2
- import { OptionType, UserApprovalMetadataType, ReleaseTag, ImageComment, PromotionApprovalMetadataType, FilterConditionsListType, DeploymentAppTypes, ResponseType, PaginationProps, SortingOrder } from '../../../Common';
2
+ import { OptionType, UserApprovalMetadataType, ReleaseTag, ImageComment, PromotionApprovalMetadataType, FilterConditionsListType, DeploymentAppTypes, ResponseType, PaginationProps, useScrollable, SortingOrder } from '../../../Common';
3
3
  import { DeploymentStageType } from '../../constants';
4
4
  import { AggregationKeys, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType } from '../../types';
5
5
 
@@ -143,12 +143,8 @@ export interface CurrentStatusType {
143
143
  status: string;
144
144
  finishedOn: string;
145
145
  artifact: string;
146
- message: string;
147
- podStatus: string;
148
146
  stage: DeploymentStageType;
149
147
  type: HistoryComponentType;
150
- isJobView?: boolean;
151
- workerPodName?: string;
152
148
  }
153
149
  export interface StartDetailsType {
154
150
  startedOn: string;
@@ -184,12 +180,8 @@ export interface TriggerDetailsType {
184
180
  }
185
181
  export interface ProgressingStatusType {
186
182
  status: string;
187
- message: string;
188
- podStatus: string;
189
183
  stage: DeploymentStageType;
190
184
  type: HistoryComponentType;
191
- finishedOn?: string;
192
- workerPodName?: string;
193
185
  }
194
186
  export interface WorkerStatusType {
195
187
  message: string;
@@ -206,12 +198,6 @@ export interface FinishedType {
206
198
  }
207
199
  export interface TriggerDetailsStatusIconType {
208
200
  status: string;
209
- isDeploymentWindowInfo?: boolean;
210
- }
211
- export interface LogsRendererType {
212
- triggerDetails: History;
213
- isBlobStorageConfigured: boolean;
214
- parentType: HistoryComponentType;
215
201
  }
216
202
  export interface SyncStageResourceDetail {
217
203
  id: number;
@@ -330,6 +316,21 @@ export interface TriggerOutputProps extends RenderRunSourceType {
330
316
  deploymentHistoryResult: Pick<DeploymentHistoryResult, 'result'>;
331
317
  setFetchTriggerIdData: React.Dispatch<React.SetStateAction<FetchIdDataStatus>>;
332
318
  setTriggerHistory: React.Dispatch<React.SetStateAction<Map<Number, History>>>;
319
+ scrollToTop: ReturnType<typeof useScrollable>[1];
320
+ scrollToBottom: ReturnType<typeof useScrollable>[2];
321
+ }
322
+ export interface HistoryLogsProps extends Pick<TriggerOutputProps, 'scrollToTop' | 'scrollToBottom' | 'setFullScreenView' | 'deploymentHistoryList' | 'setDeploymentHistoryList' | 'deploymentAppType' | 'isBlobStorageConfigured' | 'appReleaseTags' | 'tagsEditable' | 'hideImageTaggingHardDelete' | 'selectedEnvironmentName' | 'processVirtualEnvironmentDeploymentData' | 'renderDeploymentApprovalInfo' | 'renderCIListHeader' | 'renderVirtualHistoryArtifacts' | 'fullScreenView'> {
323
+ triggerDetails: History;
324
+ loading: boolean;
325
+ userApprovalMetadata: UserApprovalMetadataType;
326
+ triggeredByEmail: string;
327
+ artifactId: number;
328
+ ciPipelineId: number;
329
+ resourceId?: number;
330
+ renderRunSource: (runSource: RunSourceType, isDeployedInThisResource: boolean) => JSX.Element;
331
+ }
332
+ export interface LogsRendererType extends Pick<HistoryLogsProps, 'fullScreenView' | 'triggerDetails' | 'isBlobStorageConfigured'> {
333
+ parentType: HistoryComponentType;
333
334
  }
334
335
  export interface DeploymentStatusDetailBreakdownType {
335
336
  deploymentStatusDetailsBreakdownData: DeploymentStatusDetailsBreakdownDataType;
@@ -482,7 +483,7 @@ export interface ArtifactType {
482
483
  appReleaseTagNames?: string[];
483
484
  tagsEditable?: boolean;
484
485
  hideImageTaggingHardDelete?: boolean;
485
- jobCIClass?: string;
486
+ rootClassName?: string;
486
487
  renderCIListHeader: (renderCIListHeaderProps: RenderCIListHeaderProps) => JSX.Element;
487
488
  }
488
489
  export interface CIListItemType extends Pick<GitChangesType, 'promotionApprovalMetadata' | 'selectedEnvironmentName'> {
@@ -604,7 +605,7 @@ export interface StageDetailType extends Pick<StageInfoDTO, 'stage' | 'startTime
604
605
  logs: string[];
605
606
  isOpen: boolean;
606
607
  }
607
- export interface LogStageAccordionProps extends StageDetailType {
608
+ export interface LogStageAccordionProps extends StageDetailType, Pick<LogsRendererType, 'fullScreenView'> {
608
609
  handleStageClose: (index: number) => void;
609
610
  handleStageOpen: (index: number) => void;
610
611
  stageIndex: number;
@@ -5,3 +5,4 @@ export declare const getParsedTriggerHistory: (result: any) => DeploymentHistory
5
5
  export declare const buildHoverHtmlForWebhook: (eventName: any, condition: any, selectors: any) => JSX.Element;
6
6
  export declare const renderIcon: (iconState: string) => JSX.Element;
7
7
  export declare const getStageStatusIcon: (status: StageStatusType) => JSX.Element;
8
+ export declare const getTriggerStatusIcon: (triggerDetailStatus: string) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { SyntheticEvent } from 'react';
2
2
 
3
3
  export interface CommitChipCellProps {
4
- handleClick: (e: SyntheticEvent) => void;
4
+ handleClick?: (e: SyntheticEvent) => void;
5
5
  commits?: string[];
6
6
  }
@@ -1,4 +1,4 @@
1
1
  import { ImageChipCellProps } from './types';
2
2
 
3
- declare const ImageChipCell: ({ handleClick, imagePath, isExpanded, registryType }: ImageChipCellProps) => JSX.Element;
3
+ declare const ImageChipCell: ({ imagePath, registryType, handleClick, isExpanded: isExpandedProp, placement, }: ImageChipCellProps) => JSX.Element;
4
4
  export default ImageChipCell;
@@ -1,9 +1,17 @@
1
- import { SyntheticEvent } from 'react';
1
+ import { default as Tippy } from '@tippyjs/react';
2
+ import { ComponentProps, SyntheticEvent } from 'react';
2
3
  import { RegistryType } from '../../types';
3
4
 
4
- export interface ImageChipCellProps {
5
+ type ImageChipCellButtonActionProps = {
5
6
  handleClick: (e: SyntheticEvent) => void;
6
- imagePath: string;
7
7
  isExpanded: boolean;
8
- registryType: RegistryType;
9
- }
8
+ } | {
9
+ handleClick?: never;
10
+ isExpanded?: never;
11
+ };
12
+ export type ImageChipCellProps = {
13
+ imagePath: string;
14
+ registryType?: RegistryType;
15
+ placement?: ComponentProps<typeof Tippy>['placement'];
16
+ } & ImageChipCellButtonActionProps;
17
+ export {};
@@ -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,5 +1,6 @@
1
1
  interface ShowMoreTextProps {
2
2
  text: string;
3
+ textClass?: string;
3
4
  }
4
- export declare const ShowMoreText: ({ text }: ShowMoreTextProps) => JSX.Element;
5
- export {};
5
+ declare const ShowMoreText: ({ text, textClass }: ShowMoreTextProps) => JSX.Element;
6
+ export default ShowMoreText;
@@ -0,0 +1 @@
1
+ export { default as ShowMoreText } from './ShowMoreText';
@@ -32,6 +32,7 @@ export * from './IframeContainer';
32
32
  export * from './Plugin';
33
33
  export * from './KeyValueTable';
34
34
  export * from './SelectPicker';
35
+ export * from './ShowMoreText';
35
36
  export * from './CollapsibleList';
36
37
  export * from './DeploymentConfigDiff';
37
38
  export * from './DetectBottom';
@@ -39,4 +39,9 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
39
39
  export declare const isTimeStringAvailable: (time: string) => boolean;
40
40
  export declare const getTimeDifference: (startTime: string, endTime: string) => string;
41
41
  export declare const getFileNameFromHeaders: (headers: Headers) => string;
42
+ /**
43
+ * @description - Function to open a new tab with the given url
44
+ * @param url - url to be opened in new tab
45
+ */
46
+ export declare const getHandleOpenURL: (url: string) => () => void;
42
47
  export {};
@@ -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;
@@ -347,6 +350,9 @@ export declare const statusColor: {
347
350
  unabletofetch: string;
348
351
  hibernating: string;
349
352
  };
353
+ export declare const PULSATING_STATUS_MAP: {
354
+ [key in keyof typeof statusColor]?: boolean;
355
+ };
350
356
  export declare const APP_STATUS_HEADERS: string[];
351
357
  export declare const MATERIAL_EXCLUDE_TIPPY_TEXT = "Not available for build as this commit contains changes in excluded files or folders";
352
358
  export declare const AppListConstants: {
@@ -397,3 +403,4 @@ export declare enum SelectAllGroupedResourceIdentifiers {
397
403
  allExistingAndFutureProdEnvironments = "-2",
398
404
  allExistingAndFutureEnvironments = "-3"
399
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 {};