@devtron-labs/devtron-fe-common-lib 0.6.3-beta-1 → 0.6.4-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 (47) hide show
  1. package/dist/Common/CIPipeline.Types.d.ts +1 -0
  2. package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -0
  3. package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +1 -1
  4. package/dist/Common/Hooks/useUrlFilters/utils.d.ts +1 -0
  5. package/dist/Common/Policy.Types.d.ts +22 -58
  6. package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +18 -1
  7. package/dist/Common/SortableTableHeaderCell/constants.d.ts +2 -0
  8. package/dist/Common/SortableTableHeaderCell/index.d.ts +1 -0
  9. package/dist/Common/SortableTableHeaderCell/types.d.ts +49 -16
  10. package/dist/Common/SortableTableHeaderCell/useResizableTableConfig.d.ts +6 -0
  11. package/dist/Common/Types.d.ts +9 -6
  12. package/dist/Pages/GlobalConfigurations/BuildInfra/Descriptor.d.ts +2 -2
  13. package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +1 -1
  14. package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +1 -1
  15. package/dist/Shared/Components/FeatureDescription/index.d.ts +0 -1
  16. package/dist/Shared/Components/FeatureDescription/types.d.ts +0 -6
  17. package/dist/Shared/Components/InfoIconTippy/InfoIconTippy.d.ts +1 -1
  18. package/dist/Shared/Components/Plugin/service.d.ts +3 -3
  19. package/dist/Shared/Components/Plugin/types.d.ts +4 -21
  20. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  21. package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
  22. package/dist/Shared/Components/SelectPicker/type.d.ts +13 -21
  23. package/dist/Shared/Components/SelectPicker/utils.d.ts +1 -2
  24. package/dist/Shared/Hooks/useGetResourceKindsOptions/service.d.ts +3 -2
  25. package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +3 -7
  26. package/dist/Shared/types.d.ts +1 -4
  27. package/dist/Shared/validations.d.ts +0 -3
  28. package/dist/assets/index.css +1 -1
  29. package/dist/{cssMode-O8DV-L6L.js → cssMode-BZmMhZO4.js} +1 -1
  30. package/dist/{freemarker2-DXcMDryC.js → freemarker2-Dg4LON6e.js} +1 -1
  31. package/dist/{handlebars-CibKVVBd.js → handlebars-C02i9dqm.js} +1 -1
  32. package/dist/{html-DMITqQQl.js → html-BXqpJgiX.js} +1 -1
  33. package/dist/{htmlMode-Bl9jqzhs.js → htmlMode-S00XxqHa.js} +1 -1
  34. package/dist/{index-jBRHKOLW.js → index-Dgi-Oljz.js} +12675 -12647
  35. package/dist/index.d.ts +0 -1
  36. package/dist/index.js +346 -347
  37. package/dist/{javascript-BKcWD9Xo.js → javascript-CC9AXXzB.js} +1 -1
  38. package/dist/{jsonMode-D_Kqr2nn.js → jsonMode-DyjnH0Nq.js} +1 -1
  39. package/dist/{liquid-ChEmHBud.js → liquid-BWyc-pKR.js} +1 -1
  40. package/dist/{mdx-CLRsu9h9.js → mdx-CC_Wk6C8.js} +1 -1
  41. package/dist/{python-BYXGtjGN.js → python-DAEiqIkD.js} +1 -1
  42. package/dist/{razor-BD9coaJ7.js → razor-BZ3YRVOO.js} +1 -1
  43. package/dist/{tsMode-CcEtrxJ-.js → tsMode-3p--9U7n.js} +1 -1
  44. package/dist/{typescript-DUl5HSvE.js → typescript-BnRXR0Wa.js} +1 -1
  45. package/dist/{xml-d4qBB6eD.js → xml-ihdlUEvC.js} +1 -1
  46. package/dist/{yaml-BLc9fnUi.js → yaml-PrSP5enT.js} +1 -1
  47. package/package.json +1 -1
@@ -138,6 +138,7 @@ export interface StepType {
138
138
  inlineStepDetail?: InlineStepDetailType;
139
139
  pluginRefStepDetail?: PluginRefStepDetailType;
140
140
  triggerIfParentStageFail: boolean;
141
+ isMandatory?: boolean;
141
142
  }
142
143
  export interface BuildStageType {
143
144
  id: number;
@@ -8,6 +8,7 @@ export interface UseUrlFiltersProps<T, K> {
8
8
  * Callback function for parsing the search params
9
9
  */
10
10
  parseSearchParams?: (searchParams: URLSearchParams) => K;
11
+ localStorageKey?: `${string}__${string}`;
11
12
  }
12
13
  export type UseUrlFiltersReturnType<T, K = unknown> = K & {
13
14
  /**
@@ -16,5 +16,5 @@ import { UseUrlFiltersProps, UseUrlFiltersReturnType } from './types';
16
16
  * ```
17
17
  *
18
18
  */
19
- declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
19
+ declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, localStorageKey, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
20
20
  export default useUrlFilters;
@@ -0,0 +1 @@
1
+ export declare const setItemInLocalStorageIfKeyExists: (localStorageKey: string, value: string) => void;
@@ -1,25 +1,27 @@
1
- import { PipelineFormType } from '../Pages/Applications';
2
- import { PluginDataStoreType, PluginDetailPayloadType, ResourceKindType } from '../Shared';
1
+ import { PluginDataStoreType } from '../Shared';
3
2
  import { VariableType } from './CIPipeline.Types';
4
3
  import { ServerErrors } from './ServerError';
4
+ import { ResponseType } from './Types';
5
5
  export declare enum ApplyPolicyToStage {
6
6
  PRE_CI = "PRE_CI",
7
7
  POST_CI = "POST_CI",
8
- /**
9
- * @deprecated in mandatory plugin policy v2
10
- */
11
- PRE_OR_POST_CI = "PRE_OR_POST_CI",
12
- PRE_CD = "PRE_CD",
13
- POST_CD = "POST_CD"
8
+ PRE_OR_POST_CI = "PRE_OR_POST_CI"
14
9
  }
15
10
  export declare enum PluginRequiredStage {
16
- PRE_STAGE = "preBuildStage",
17
- POST_STAGE = "postBuildStage",
18
- PRE_OR_POST_STAGE = "PRE_OR_POST_CI"
11
+ PRE_CI = "preBuildStage",
12
+ POST_CI = "postBuildStage",
13
+ PRE_OR_POST_CI = "PRE_OR_POST_CI"
19
14
  }
20
15
  export interface DefinitionSourceType {
21
- policyNames: string[];
22
- linkedCIPipelineNames?: string[];
16
+ projectName: string;
17
+ isDueToProductionEnvironment: boolean;
18
+ isDueToLinkedPipeline: boolean;
19
+ policyName: string;
20
+ appName?: string;
21
+ clusterName?: string;
22
+ environmentName?: string;
23
+ branchNames?: string[];
24
+ ciPipelineName?: string;
23
25
  }
24
26
  export interface MandatoryPluginDetailType {
25
27
  id: number;
@@ -31,7 +33,7 @@ export interface MandatoryPluginDetailType {
31
33
  applied?: boolean;
32
34
  inputVariables?: VariableType[];
33
35
  outputVariables?: VariableType[];
34
- definitionSources?: DefinitionSourceType;
36
+ definitionSources?: DefinitionSourceType[];
35
37
  }
36
38
  export interface MandatoryPluginDataType {
37
39
  pluginData: MandatoryPluginDetailType[];
@@ -43,58 +45,20 @@ export interface ProcessPluginDataReturnType {
43
45
  pluginDataStore: PluginDataStoreType;
44
46
  mandatoryPluginsError?: ServerErrors;
45
47
  }
46
- export type ProcessPluginDataCIParamsType = {
47
- resourceKind: ResourceKindType.ciPipeline;
48
- ciPipelineId: number;
49
- /**
50
- * Comma separated branch names used for v1 api
51
- * For v2 format is [branchName1],[branchName2]
52
- */
53
- branchName?: string;
54
- envName?: never;
55
- };
56
- export type ProcessPluginDataCDParamsType = {
57
- resourceKind: ResourceKindType.cdPipeline;
58
- envName?: string;
59
- ciPipelineId?: never;
60
- branchName?: never;
61
- };
62
- export type ProcessPluginDataParamsType = {
63
- formData: PipelineFormType;
64
- pluginDataStoreState: PluginDataStoreType;
65
- appId: number;
66
- appName: string;
67
- /**
68
- * Would be sent in case we have to get data for steps
69
- */
70
- requiredPluginIds?: PluginDetailPayloadType['pluginId'];
71
- } & (ProcessPluginDataCIParamsType | ProcessPluginDataCDParamsType);
72
48
  export declare enum ConsequenceAction {
73
- /**
74
- * This is used if the policy is enforced immediately.
75
- */
76
49
  BLOCK = "BLOCK",
77
- /**
78
- * This is used if the policy will be enforced after a certain timestamp.
79
- */
80
50
  ALLOW_UNTIL_TIME = "ALLOW_UNTIL_TIME",
81
- /**
82
- * This is used if the policy is not enforced yet (just to show waring).
83
- */
84
51
  ALLOW_FOREVER = "ALLOW_FOREVER"
85
52
  }
86
- export type ConsequenceType = {
87
- action: Exclude<ConsequenceAction, ConsequenceAction.ALLOW_UNTIL_TIME>;
88
- metadataField?: never | null;
89
- } | {
90
- action: ConsequenceAction.ALLOW_UNTIL_TIME;
91
- /**
92
- * Denotes the time till which the policy enforcement is relaxed
93
- */
53
+ export interface ConsequenceType {
54
+ action: ConsequenceAction;
94
55
  metadataField: string;
95
- };
56
+ }
96
57
  export interface BlockedStateData {
97
58
  isOffendingMandatoryPlugin: boolean;
98
59
  isCITriggerBlocked: boolean;
99
60
  ciBlockState: ConsequenceType;
100
61
  }
62
+ export interface GetBlockedStateResponse extends ResponseType {
63
+ result?: BlockedStateData;
64
+ }
@@ -12,6 +12,23 @@ import { SortableTableHeaderCellProps } from './types';
12
12
  * disabled={isDisabled}
13
13
  * />
14
14
  * ```
15
+ *
16
+ * @example Non-sortable cell
17
+ * ```tsx
18
+ * <SortableTableHeaderCell
19
+ * isSortable={false}
20
+ * title="Header Cell"
21
+ * />
22
+ * ```
23
+ *
24
+ * * @example Resizable cell (Layout to be controlled externally using useResizableTableConfig)
25
+ * ```tsx
26
+ * <SortableTableHeaderCell
27
+ * isSortable={false}
28
+ * isResizable
29
+ * title="Header Cell"
30
+ * />
31
+ * ```
15
32
  */
16
- declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, }: SortableTableHeaderCellProps) => JSX.Element;
33
+ declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, id, handleResize, isResizable, }: SortableTableHeaderCellProps) => JSX.Element;
17
34
  export default SortableTableHeaderCell;
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_MINIMUM_HEADER_WIDTH = 70;
2
+ export declare const DEFAULT_MAXIMUM_HEADER_WIDTH = 600;
@@ -1,2 +1,3 @@
1
1
  export { default as SortableTableHeaderCell } from './SortableTableHeaderCell';
2
+ export { default as useResizableTableConfig } from './useResizableTableConfig';
2
3
  export type { SortableTableHeaderCellProps } from './types';
@@ -1,35 +1,68 @@
1
1
  import { SortingOrder } from '../Constants';
2
- export interface SortableTableHeaderCellProps {
2
+ export type SortableTableHeaderCellProps = {
3
3
  /**
4
- * If true, the cell is sorted
4
+ * Label for the cell
5
5
  */
6
- isSorted: boolean;
6
+ title: string;
7
7
  /**
8
- * Callback for handling the sorting of the cell
8
+ * If true, the tippy is shown on Sortable header if text is truncated
9
+ * @default false
9
10
  */
10
- triggerSorting: () => void;
11
+ showTippyOnTruncate?: boolean;
12
+ } & ({
11
13
  /**
12
- * Current sort order
14
+ * Unique identifier for the column
15
+ */
16
+ id: string | number;
17
+ /**
18
+ * If true, the cell is resizable
13
19
  *
14
- * Note: On click, the sort order should be updated as required
20
+ * @default false
15
21
  */
16
- sortOrder: SortingOrder;
22
+ isResizable: true | boolean;
17
23
  /**
18
- * Label for the cell
24
+ * Resize handler for the table
19
25
  */
20
- title: string;
26
+ handleResize: (id: string | number, deltaChange: number) => void;
27
+ } | {
28
+ id?: never;
29
+ isResizable?: false | undefined;
30
+ handleResize?: never;
31
+ }) & ({
32
+ /**
33
+ * If false, the cell acts like normal table header cell
34
+ * @default true
35
+ */
36
+ isSortable?: boolean | undefined;
21
37
  /**
22
38
  * If true, the cell is disabled
23
39
  */
24
40
  disabled: boolean;
25
41
  /**
26
- * If false, the cell acts like normal table header cell
27
- * @default true
42
+ * If true, the cell is sorted
28
43
  */
29
- isSortable?: boolean;
44
+ isSorted: boolean;
30
45
  /**
31
- * If true, the tippy is shown on Sortable header if text is truncated
32
- * @default false
46
+ * Callback for handling the sorting of the cell
33
47
  */
34
- showTippyOnTruncate?: boolean;
48
+ triggerSorting: () => void;
49
+ /**
50
+ * Current sort order
51
+ *
52
+ * Note: On click, the sort order should be updated as required
53
+ */
54
+ sortOrder: SortingOrder;
55
+ } | {
56
+ isSortable: false;
57
+ disabled?: never;
58
+ isSorted?: never;
59
+ triggerSorting?: never;
60
+ sortOrder?: never;
61
+ });
62
+ export interface UseResizableTableConfigProps {
63
+ headersConfig: (Pick<SortableTableHeaderCellProps, 'id'> & {
64
+ width: number | string;
65
+ maxWidth?: number;
66
+ minWidth?: number;
67
+ })[];
35
68
  }
@@ -0,0 +1,6 @@
1
+ import { UseResizableTableConfigProps } from './types';
2
+ declare const useResizableTableConfig: ({ headersConfig }: UseResizableTableConfigProps) => {
3
+ gridTemplateColumns: string;
4
+ handleResize: (headerCellId: UseResizableTableConfigProps["headersConfig"][number]["id"], deltaChange: number) => void;
5
+ };
6
+ export default useResizableTableConfig;
@@ -2,8 +2,8 @@ import { default as React, ReactNode, CSSProperties, ReactElement } from 'react'
2
2
  import { Placement } from 'tippy.js';
3
3
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
5
- import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
6
5
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
6
+ import { RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
9
9
  *
@@ -462,7 +462,7 @@ export interface DownstreamNodesEnvironmentsType {
462
462
  environmentId: number;
463
463
  environmentName: string;
464
464
  }
465
- export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTriggerBlocked' | 'pluginBlockState'> {
465
+ export interface CommonNodeAttr {
466
466
  connectingCiPipelineId?: number;
467
467
  parents: string | number[] | string[];
468
468
  x: number;
@@ -512,10 +512,15 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
512
512
  approvalUsers?: string[];
513
513
  userApprovalConfig?: UserApprovalConfigType;
514
514
  requestedUserId?: number;
515
- showPluginWarning: boolean;
515
+ showPluginWarning?: boolean;
516
516
  helmPackageName?: string;
517
517
  isVirtualEnvironment?: boolean;
518
518
  deploymentAppType?: DeploymentAppTypes;
519
+ isCITriggerBlocked?: boolean;
520
+ ciBlockState?: {
521
+ action: any;
522
+ metadataField: string;
523
+ };
519
524
  appReleaseTagNames?: string[];
520
525
  tagsEditable?: boolean;
521
526
  isGitOpsRepoNotConfigured?: boolean;
@@ -674,7 +679,7 @@ export interface CDStageConfigMapSecretNames {
674
679
  configMaps: any[];
675
680
  secrets: any[];
676
681
  }
677
- export interface PrePostDeployStageType extends MandatoryPluginBaseStateType {
682
+ export interface PrePostDeployStageType {
678
683
  isValid: boolean;
679
684
  steps: TaskErrorObj[];
680
685
  triggerType: string;
@@ -711,8 +716,6 @@ export interface CdPipeline {
711
716
  preDeployStage?: PrePostDeployStageType;
712
717
  postDeployStage?: PrePostDeployStageType;
713
718
  isProdEnv?: boolean;
714
- isGitOpsRepoNotConfigured?: boolean;
715
- isDeploymentBlocked?: boolean;
716
719
  }
717
720
  export interface ExternalCiConfig {
718
721
  id: number;
@@ -1,3 +1,3 @@
1
- import { BuildInfraDescriptorProps } from './types';
2
- declare const Descriptor: ({ additionalContainerClasses, breadCrumbs, children, tippyInfoText, tippyAdditionalContent, }: BuildInfraDescriptorProps) => JSX.Element;
1
+ import { DescriptorProps } from './types';
2
+ declare const Descriptor: ({ additionalContainerClasses, breadCrumbs, children, tippyInfoText, tippyAdditionalContent, }: DescriptorProps) => JSX.Element;
3
3
  export default Descriptor;
@@ -48,7 +48,7 @@ export declare enum BuildInfraProfileVariants {
48
48
  NORMAL = "NORMAL",
49
49
  CUSTOM = "CUSTOM"
50
50
  }
51
- export interface BuildInfraDescriptorProps {
51
+ export interface DescriptorProps {
52
52
  /**
53
53
  * In case we want to restrict the max-width
54
54
  */
@@ -1,3 +1,3 @@
1
1
  import { DescriptorProps } from './types';
2
- declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, }: DescriptorProps) => JSX.Element;
2
+ declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, }: DescriptorProps) => JSX.Element;
3
3
  export default FeatureTitleWithInfo;
@@ -1,3 +1,2 @@
1
1
  export * from './FeatureDescriptionModal';
2
2
  export { default as FeatureTitleWithInfo } from './FeatureTitleWithInfo';
3
- export * from './types';
@@ -20,10 +20,4 @@ export interface DescriptorProps extends FeatureDescriptionModalProps {
20
20
  docLinkText?: string;
21
21
  dataTestId?: string;
22
22
  additionalContent?: ReactNode;
23
- /**
24
- * If true, the info icon is displayed which when clicked shows the feature description modal
25
- *
26
- * @default false
27
- */
28
- showInfoIcon?: boolean;
29
23
  }
@@ -1,3 +1,3 @@
1
1
  import { InfoIconTippyProps } from '../../../Common/Types';
2
- declare const InfoIconTippy: ({ heading, infoText, iconClass, documentationLink, documentationLinkText, additionalContent, iconClassName, placement, dataTestid, children, headingInfo, }: InfoIconTippyProps) => JSX.Element;
2
+ declare const InfoIconTippy: ({ heading, infoText, iconClass, documentationLink, documentationLinkText, additionalContent, iconClassName, placement, dataTestid, children, }: InfoIconTippyProps) => JSX.Element;
3
3
  export default InfoIconTippy;
@@ -1,6 +1,6 @@
1
1
  import { ResponseType } from '../../../Common';
2
- import { GetParentPluginListPayloadType, GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, MinParentPluginDTO, PluginDetailServiceParamsType } from './types';
3
- export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, signal, shouldShowError, parentPluginIdentifiers, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, "pluginStore">>;
2
+ import { GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, MinParentPluginDTO, PluginDetailServiceParamsType } from './types';
3
+ export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, signal, shouldShowError, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, "pluginStore">>;
4
4
  export declare const getPluginStoreData: ({ searchKey, selectedTags, appId, offset, signal, }: GetPluginStoreDataServiceParamsType) => Promise<GetPluginStoreDataReturnType>;
5
5
  export declare const getAvailablePluginTags: (appId: number) => Promise<string[]>;
6
- export declare const getParentPluginList: (params?: Partial<GetParentPluginListPayloadType>) => Promise<ResponseType<MinParentPluginDTO[]>>;
6
+ export declare const getParentPluginList: (appId?: number) => Promise<ResponseType<MinParentPluginDTO[]>>;
@@ -1,5 +1,5 @@
1
1
  import { MutableRefObject } from 'react';
2
- import { ConsequenceType, VariableType } from '../../../Common';
2
+ import { VariableType } from '../../../Common';
3
3
  import { BaseFilterQueryParams } from '../../types';
4
4
  import { ImageWithFallbackProps } from '../ImageWithFallback';
5
5
  import { getPluginStoreData } from './service';
@@ -13,7 +13,6 @@ export interface PluginAPIBaseQueryParamsType {
13
13
  export interface GetPluginTagsPayloadType extends PluginAPIBaseQueryParamsType {
14
14
  }
15
15
  export interface GetParentPluginListPayloadType extends PluginAPIBaseQueryParamsType {
16
- type?: 'ALL';
17
16
  }
18
17
  export interface PluginTagNamesDTO {
19
18
  tagNames: string[];
@@ -51,7 +50,7 @@ export interface ParentPluginDTO {
51
50
  pluginVersions: PluginVersionsDTO;
52
51
  pluginIdentifier: string;
53
52
  }
54
- export interface MinParentPluginDTO extends Pick<ParentPluginDTO, 'id' | 'name' | 'icon' | 'pluginIdentifier'> {
53
+ export interface MinParentPluginDTO extends Pick<ParentPluginDTO, 'id' | 'name' | 'icon'> {
55
54
  }
56
55
  export interface PluginDetailDTO {
57
56
  parentPlugins: ParentPluginDTO[];
@@ -61,7 +60,6 @@ export interface PluginDetailServiceParamsType {
61
60
  appId: number;
62
61
  pluginIds?: number[];
63
62
  parentPluginIds?: number[];
64
- parentPluginIdentifiers?: string[];
65
63
  /**
66
64
  * @default true
67
65
  */
@@ -71,16 +69,15 @@ export interface PluginDetailServiceParamsType {
71
69
  export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsType, 'appId'> {
72
70
  pluginId?: PluginDetailServiceParamsType['pluginIds'];
73
71
  parentPluginId?: PluginDetailServiceParamsType['parentPluginIds'];
74
- parentPluginIdentifier?: PluginDetailServiceParamsType['parentPluginIdentifiers'][number];
75
72
  }
76
73
  export interface PluginListFiltersType extends Pick<BaseFilterQueryParams<unknown>, 'searchKey'> {
77
74
  selectedTags: string[];
78
75
  }
79
- export interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon' | 'pluginIdentifier'> {
76
+ interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon' | 'pluginIdentifier'> {
80
77
  latestVersionId: MinimalPluginVersionDataDTO['id'];
81
78
  pluginVersions: MinimalPluginVersionDataDTO[];
82
79
  }
83
- interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type' | 'pluginIdentifier'> {
80
+ interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type' | 'pluginIdentifier'> {
84
81
  parentPluginId: ParentPluginType['id'];
85
82
  }
86
83
  export interface PluginDataStoreType {
@@ -187,18 +184,4 @@ export interface PluginTagsContainerProps {
187
184
  export interface PluginImageContainerProps extends Pick<ImageWithFallbackProps, 'imageProps'> {
188
185
  fallbackImageClassName?: string;
189
186
  }
190
- export declare enum PipelineStageTaskActionModalType {
191
- DELETE = "DELETE",
192
- MOVE_PLUGIN = "MOVE_PLUGIN"
193
- }
194
- export interface PipelineStageTaskActionModalStateType {
195
- type: PipelineStageTaskActionModalType;
196
- pluginId: PluginDetailType['id'];
197
- taskIndex: number;
198
- }
199
- export interface MandatoryPluginBaseStateType {
200
- isOffendingMandatoryPlugin: boolean;
201
- isTriggerBlocked: boolean;
202
- pluginBlockState: ConsequenceType;
203
- }
204
187
  export {};
@@ -134,5 +134,5 @@ import { SelectPickerProps } from './type';
134
134
  * />
135
135
  * ```
136
136
  */
137
- declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, inputValue, onInputChange, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
137
+ declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, inputValue, onInputChange, isCreatable, onCreateOption, closeMenuOnSelect, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
138
138
  export default SelectPicker;
@@ -2,7 +2,7 @@ import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps,
2
2
  import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
3
3
  export declare const SelectPickerDropdownIndicator: <OptionValue>(props: DropdownIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
4
4
  export declare const SelectPickerClearIndicator: <OptionValue>(props: ClearIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
5
- export declare const SelectPickerControl: <OptionValue>(props: ControlProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
5
+ export declare const SelectPickerControl: <OptionValue, IsMulti extends boolean>({ icon, showSelectedOptionIcon, ...props }: ControlProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "icon" | "showSelectedOptionIcon">) => JSX.Element;
6
6
  export declare const SelectPickerValueContainer: <OptionValue, IsMulti extends boolean>({ showSelectedOptionsCount, customSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "showSelectedOptionsCount" | "customSelectedOptionsCount">) => JSX.Element;
7
7
  export declare const SelectPickerLoadingIndicator: () => JSX.Element;
8
8
  export declare const SelectPickerOption: <OptionValue, IsMulti extends boolean>({ disableDescriptionEllipsis, ...props }: OptionProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "disableDescriptionEllipsis">) => JSX.Element;
@@ -44,24 +44,17 @@ declare module 'react-select/base' {
44
44
  * Imp Note: The menu open/close needs to handled by the consumer in this case
45
45
  */
46
46
  renderCustomOptions?: () => ReactElement;
47
- /**
48
- * Icon to be rendered in the control
49
- */
50
- icon?: ReactElement;
51
- /**
52
- * If true, the selected option icon is shown in the container.
53
- * startIcon has higher priority than endIcon.
54
- *
55
- * @default 'true'
56
- */
57
- showSelectedOptionIcon?: boolean;
58
47
  }
59
48
  }
60
49
  export declare enum SelectPickerVariantType {
61
50
  DEFAULT = "default",
62
51
  BORDER_LESS = "border-less"
63
52
  }
64
- 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' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'>> & {
53
+ 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' | 'onKeyDown' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'>> & {
54
+ /**
55
+ * Icon to be rendered in the control
56
+ */
57
+ icon?: ReactElement;
65
58
  /**
66
59
  * Error message for the select
67
60
  */
@@ -74,6 +67,13 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
74
67
  * Label for the select. if required is added, the corresponding * is also added
75
68
  */
76
69
  label?: ReactNode;
70
+ /**
71
+ * If true, the selected option icon is shown in the container.
72
+ * startIcon has higher priority than endIcon.
73
+ *
74
+ * @default 'true'
75
+ */
76
+ showSelectedOptionIcon?: boolean;
77
77
  /**
78
78
  * Custom selected options count for use cases like filters
79
79
  */
@@ -145,14 +145,6 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
145
145
  * @default false
146
146
  */
147
147
  isCreatable?: boolean;
148
- /**
149
- * If false, the no options message is not shown
150
- *
151
- * Note: Handling for the menu distortion needs to be handled explicitly in this case
152
- *
153
- * @default true
154
- */
155
- shouldShowNoOptionsMessage?: boolean;
156
148
  } & (IsMulti extends true ? {
157
149
  isMulti: IsMulti | boolean;
158
150
  multiSelectProps?: {
@@ -176,7 +168,7 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
176
168
  export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
177
169
  isGroupHeadingSelectable: boolean;
178
170
  };
179
- export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight' | 'optionListError' | 'reloadOptionList' | 'getOptionValue'> {
171
+ export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight' | 'optionListError' | 'reloadOptionList' | 'isOptionDisabled'> {
180
172
  appliedFilterOptions: SelectPickerOptionType[];
181
173
  handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
182
174
  }
@@ -9,7 +9,6 @@ export declare const getGroupCheckboxValue: <OptionValue>(groupHeadingOptions: r
9
9
  * @param optionsList - The list of options or groups of options.
10
10
  * @param value - The value to compare against the options' values.
11
11
  * @param defaultOption - The default option to return if no match is found.
12
- * @param getOptionValue - Override the default value for the option
13
12
  * @returns The matched option or the default option if no match is found.
14
13
  */
15
- export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: OptionValue, defaultOption?: SelectPickerOptionType<OptionValue>, getOptionValue?: SelectPickerProps<OptionValue>["getOptionValue"]) => SelectPickerOptionType<OptionValue>;
14
+ export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: OptionValue, defaultOption?: SelectPickerOptionType<OptionValue>) => SelectPickerOptionType<OptionValue>;
@@ -1,7 +1,8 @@
1
1
  import { Teams } from '../../../Common/Types';
2
2
  import { ClusterType } from '../../Services';
3
- import { AppsGroupedByProjectsType, EnvironmentsGroupedByClustersType } from './types';
3
+ import { EnvironmentType } from '../../types';
4
+ import { AppsGroupedByProjectsType } from './types';
4
5
  export declare const getAppOptionsGroupedByProjects: () => Promise<AppsGroupedByProjectsType>;
5
6
  export declare const getProjectOptions: () => Promise<Pick<Teams, "id" | "name">[]>;
6
7
  export declare const getClusterOptions: () => Promise<ClusterType[]>;
7
- export declare const getEnvironmentOptionsGroupedByClusters: () => Promise<EnvironmentsGroupedByClustersType>;
8
+ export declare const getEnvironmentOptions: () => Promise<EnvironmentType[]>;
@@ -1,6 +1,6 @@
1
- import { EnvironmentType, ResourceKindType } from '../../types';
1
+ import { ResourceKindType } from '../../types';
2
2
  import { ServerErrors } from '../../../Common/ServerError';
3
- import { getAppOptionsGroupedByProjects, getClusterOptions, getProjectOptions } from './service';
3
+ import { getAppOptionsGroupedByProjects, getClusterOptions, getEnvironmentOptions, getProjectOptions } from './service';
4
4
  export interface AppType {
5
5
  name: string;
6
6
  }
@@ -9,10 +9,6 @@ export type AppsGroupedByProjectsType = {
9
9
  projectName: string;
10
10
  appList: AppType[];
11
11
  }[];
12
- export type EnvironmentsGroupedByClustersType = {
13
- clusterName: EnvironmentType['cluster'];
14
- envList: EnvironmentType[];
15
- }[];
16
12
  export interface ClusterDTO {
17
13
  id: number;
18
14
  cluster_name: string;
@@ -27,7 +23,7 @@ export interface UseGetResourceKindOptionsReturnType {
27
23
  [ResourceKindType.devtronApplication]: Awaited<ReturnType<typeof getAppOptionsGroupedByProjects>>;
28
24
  [ResourceKindType.project]: Awaited<ReturnType<typeof getProjectOptions>>;
29
25
  [ResourceKindType.cluster]: Awaited<ReturnType<typeof getClusterOptions>>;
30
- [ResourceKindType.environment]: EnvironmentsGroupedByClustersType;
26
+ [ResourceKindType.environment]: Awaited<ReturnType<typeof getEnvironmentOptions>>;
31
27
  };
32
28
  resourcesOptionsError: ServerErrors;
33
29
  refetchResourcesOptions: () => void;
@@ -377,7 +377,6 @@ export declare enum ResourceKindType {
377
377
  installation = "installation",
378
378
  environment = "environment",
379
379
  cdPipeline = "cd-pipeline",
380
- ciPipeline = "ci-pipeline",
381
380
  project = "project"
382
381
  }
383
382
  /**
@@ -397,9 +396,7 @@ export interface SeverityCount {
397
396
  unknown: number;
398
397
  }
399
398
  export declare enum PolicyKindType {
400
- lockConfiguration = "lock-configuration",
401
- imagePromotion = "image-promotion",
402
- plugins = "plugin"
399
+ lockConfiguration = "lock-configuration"
403
400
  }
404
401
  export interface LastExecutionResultType {
405
402
  lastExecution: string;
@@ -14,8 +14,6 @@ export declare const MESSAGES: {
14
14
  VALID_POSITIVE_INTEGER: string;
15
15
  MAX_SAFE_INTEGER: string;
16
16
  INVALID_SEMANTIC_VERSION: string;
17
- INVALID_DATE: string;
18
- DATE_BEFORE_CURRENT_TIME: string;
19
17
  };
20
18
  export declare const requiredField: (value: string) => ValidationResponseType;
21
19
  export declare const validateName: (name: string) => ValidationResponseType;
@@ -44,4 +42,3 @@ export declare const validateSemanticVersioning: (version: string) => Validation
44
42
  */
45
43
  export declare const validateDisplayName: (name: string) => ValidationResponseType;
46
44
  export declare const validateJSON: (json: string) => ValidationResponseType;
47
- export declare const validateDateAndTime: (date: Date) => ValidationResponseType;