@devtron-labs/devtron-fe-common-lib 0.0.45-beta-24 → 0.0.45-beta-27

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { AddCDButtonProps } from './types';
3
+ export default function AddCDButton({ position, addCDButtons, endNode, startNode, handleAddCD, tooltipContent, }: Readonly<AddCDButtonProps>): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default as AddCDButton } from './AddCDButton';
2
+ export { handleAddCD } from './utils';
@@ -0,0 +1,26 @@
1
+ import { AddCDPositions, AddPipelineType, EdgeEndNodeType, EdgeNodeType, Point } from '../Types';
2
+ export interface AddCDButtonProps {
3
+ position: AddCDPositions;
4
+ addCDButtons: AddCDPositions[];
5
+ endNode: Point & EdgeEndNodeType;
6
+ startNode: Point & EdgeNodeType;
7
+ handleAddCD: (position: AddCDPositions) => void;
8
+ tooltipContent?: string;
9
+ }
10
+ export interface HandleAddCD {
11
+ position: AddCDPositions;
12
+ handleCDSelect: (workflowId: number | string, ciPipelineId: number | string, parentPipelineType: string, parentPipelineId: number | string, isWebhookCD?: boolean, childPipelineId?: number | string, addType?: AddPipelineType) => void;
13
+ startNode: EdgeNodeType;
14
+ endNode: EdgeEndNodeType;
15
+ workflowId: number | string;
16
+ ciPipelineId: number | string;
17
+ isWebhookCD: boolean;
18
+ isParallelEdge: boolean;
19
+ }
20
+ export interface GetPipelineType {
21
+ isWebhookCD: boolean;
22
+ startNode: EdgeNodeType;
23
+ }
24
+ export interface TooltipContentProps {
25
+ tooltipContent?: string;
26
+ }
@@ -0,0 +1,2 @@
1
+ import { HandleAddCD } from './types';
2
+ export declare const handleAddCD: ({ position, handleCDSelect, startNode, endNode, workflowId, ciPipelineId, isWebhookCD, isParallelEdge, }: HandleAddCD) => void;
@@ -10,6 +10,7 @@ export interface DeleteDialogProps {
10
10
  dataTestId?: string;
11
11
  buttonPrimaryText?: string;
12
12
  shouldStopPropagation?: boolean;
13
+ disabled?: boolean;
13
14
  }
14
15
  export interface ForceDeleteDialogType {
15
16
  onClickDelete: () => void;
@@ -25,6 +25,22 @@ export declare function useForm(stateSchema: any, validationSchema: {}, callback
25
25
  handleOnChange: (event: any) => void;
26
26
  handleOnSubmit: (event: any) => void;
27
27
  };
28
+ export declare function CustomInput({ name, value, error, onChange, onBlur, onFocus, label, type, disabled, autoComplete, labelClassName, placeholder, tabIndex, dataTestid, }: {
29
+ name: any;
30
+ value: any;
31
+ error: any;
32
+ onChange: any;
33
+ onBlur?: (e: any) => void;
34
+ onFocus?: (e: any) => void;
35
+ label: any;
36
+ type?: string;
37
+ disabled?: boolean;
38
+ autoComplete?: string;
39
+ labelClassName?: string;
40
+ placeholder?: string;
41
+ tabIndex?: number;
42
+ dataTestid?: string;
43
+ }): JSX.Element;
28
44
  export declare function handleUTCTime(ts: string, isRelativeTime?: boolean): string;
29
45
  export declare function useSearchString(): UseSearchString;
30
46
  export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) => void;
@@ -261,6 +261,10 @@ export interface CDMaterialServiceQueryParams {
261
261
  resource?: CDMaterialResourceQuery;
262
262
  filter?: CDMaterialFilterQuery;
263
263
  }
264
+ export interface DownstreamNodesEnvironmentsType {
265
+ environmentId: number;
266
+ environmentName: string;
267
+ }
264
268
  export interface CommonNodeAttr {
265
269
  connectingCiPipelineId?: number;
266
270
  parents: string | number[] | string[];
@@ -322,6 +326,9 @@ export interface CommonNodeAttr {
322
326
  };
323
327
  appReleaseTagNames?: string[];
324
328
  tagsEditable?: boolean;
329
+ deploymentAppCreated?: boolean;
330
+ isLast?: boolean;
331
+ downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
325
332
  }
326
333
  export declare enum DeploymentAppTypes {
327
334
  HELM = "helm",
@@ -563,4 +570,44 @@ export interface CiPipeline {
563
570
  isOffendingMandatoryPlugin?: boolean;
564
571
  pipelineType?: string;
565
572
  }
573
+ export declare enum PipelineType {
574
+ CI_PIPELINE = "CI_PIPELINE",
575
+ CD_PIPELINE = "CD_PIPELINE",
576
+ WEBHOOK = "WEBHOOK",
577
+ LINKED_CD = "LINKED_CD"
578
+ }
579
+ export declare enum WorkflowNodeType {
580
+ GIT = "GIT",
581
+ CI = "CI",
582
+ WEBHOOK = "WEBHOOK",
583
+ PRE_CD = "PRECD",
584
+ CD = "CD",
585
+ POST_CD = "POSTCD"
586
+ }
587
+ export declare enum AddCDPositions {
588
+ LEFT = "left",
589
+ RIGHT = "right"
590
+ }
591
+ export interface SelectedNode {
592
+ nodeType: WorkflowNodeType;
593
+ id: string;
594
+ }
595
+ export declare enum AddPipelineType {
596
+ SEQUENTIAL = "SEQUENTIAL",
597
+ PARALLEL = "PARALLEL"
598
+ }
599
+ export interface Point {
600
+ x: number;
601
+ y: number;
602
+ }
603
+ export interface EdgeNodeType {
604
+ height: number;
605
+ width: number;
606
+ userApprovalConfig?: UserApprovalConfigType;
607
+ type?: any;
608
+ id?: number | string;
609
+ }
610
+ export interface EdgeEndNodeType extends EdgeNodeType {
611
+ userApprovalConfig?: UserApprovalConfigType;
612
+ }
566
613
  export {};
@@ -42,4 +42,4 @@ export * from './Hooks';
42
42
  export { AppStatus } from './AppStatus';
43
43
  export * from './RJSF';
44
44
  export * from './DevtronProgressing';
45
- export * from './CustomInput';
45
+ export * from './AddCDButton';