@devtron-labs/devtron-fe-common-lib 0.0.45 → 0.0.47-beta-3

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,4 @@
1
+ /// <reference types="react" />
2
+ import { ChartVersionAndTypeSelectorProps } from './Types';
3
+ declare const ChartVersionAndTypeSelector: ({ setSelectedChartRefId }: ChartVersionAndTypeSelectorProps) => JSX.Element;
4
+ export default ChartVersionAndTypeSelector;
@@ -16,4 +16,5 @@ export declare function setImageTags(request: any, pipelineId: number, artifactI
16
16
  export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
17
17
  export declare function extractImage(image: string): string;
18
18
  export declare function createGitCommitUrl(url: string, revision: string): string;
19
+ export declare function fetchChartTemplateVersions(): Promise<ResponseType>;
19
20
  export {};
@@ -20,6 +20,7 @@ export declare const ROUTES: {
20
20
  USER_CHECK_ROLE: string;
21
21
  IMAGE_TAGGING: string;
22
22
  CD_MATERIAL_GET: string;
23
+ DEPLOYMENT_TEMPLATE_LIST: string;
23
24
  };
24
25
  export declare enum KEY_VALUE {
25
26
  KEY = "key",
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { CustomInputProps } from './Types';
3
+ export declare function CustomInput({ name, value, error, onChange, onFocus, label, type, disabled, labelClassName, placeholder, tabIndex, dataTestid, isRequiredField, autoFocus, rootClassName, autoComplete, helperText, handleOnBlur, readOnly, noTrim, ref, onKeyPress, defaultValue, onKeyDown, required, additionalErrorInfo }: CustomInputProps): JSX.Element;
@@ -0,0 +1,29 @@
1
+ import React, { HTMLInputTypeAttribute } from 'react';
2
+ export interface CustomInputProps {
3
+ name: string;
4
+ value: string | number;
5
+ onChange: (e: any) => void;
6
+ onFocus?: (e: any) => void;
7
+ autoComplete?: string;
8
+ label?: string | (() => React.ReactNode);
9
+ labelClassName?: string;
10
+ type?: HTMLInputTypeAttribute;
11
+ disabled?: boolean;
12
+ placeholder?: string;
13
+ tabIndex?: number;
14
+ dataTestid?: string;
15
+ isRequiredField?: boolean;
16
+ autoFocus?: boolean;
17
+ rootClassName?: string;
18
+ error?: string[] | string;
19
+ helperText?: string;
20
+ handleOnBlur?: (e: any) => void;
21
+ readOnly?: boolean;
22
+ noTrim?: boolean;
23
+ ref?: React.LegacyRef<HTMLInputElement>;
24
+ onKeyPress?: (e: any) => void;
25
+ defaultValue?: string | number | ReadonlyArray<string> | undefined;
26
+ onKeyDown?: (e: any) => void;
27
+ required?: boolean;
28
+ additionalErrorInfo?: React.ReactNode;
29
+ }
@@ -0,0 +1,2 @@
1
+ export * from './CustomInput';
2
+ export * from './Types';
@@ -12,7 +12,7 @@ export declare function sortCallback(key: string, a: any, b: any, isCaseSensitiv
12
12
  export declare const stopPropagation: (event: any) => void;
13
13
  export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
14
14
  export declare function getRandomColor(email: string): string;
15
- export declare const getAlphabetIcon: (str: string, intialAlphabetClassName?: string) => JSX.Element;
15
+ export declare const getAlphabetIcon: (str: string, rootClassName?: string) => JSX.Element;
16
16
  export declare const getEmptyArrayOfLength: (length: number) => unknown[];
17
17
  export declare function noop(...args: any[]): any;
18
18
  export declare function not(e: any): boolean;
@@ -25,22 +25,6 @@ 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;
44
28
  export declare function handleUTCTime(ts: string, isRelativeTime?: boolean): string;
45
29
  export declare function useSearchString(): UseSearchString;
46
30
  export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) => void;
@@ -64,4 +48,13 @@ export declare const getUrlWithSearchParams: (url: string, params: Record<string
64
48
  * Custom exception logger function for logging errors to sentry
65
49
  */
66
50
  export declare const logExceptionToSentry: typeof Sentry.captureException;
51
+ export declare const customStyles: {
52
+ control: (base: any, state: any) => any;
53
+ indicatorSeparator: (base: any, state: any) => any;
54
+ valueContainer: (base: any, state: any) => any;
55
+ dropdownIndicator: (base: any, state: any) => any;
56
+ };
57
+ export declare const getFilteredChartVersions: (charts: any, selectedChartType: any) => any;
58
+ export declare function getUnlockedJSON(json: any, jsonPathArray: any): any;
59
+ export declare function getLockedJSON(json: any, jsonPathArray: string[]): any;
67
60
  export {};
@@ -72,7 +72,6 @@ export interface TippyCustomizedProps {
72
72
  documentationLink?: string;
73
73
  documentationLinkText?: string;
74
74
  children: React.ReactElement<any>;
75
- followCursor?: boolean;
76
75
  }
77
76
  export interface GenericEmptyStateType {
78
77
  title: ReactNode;
@@ -564,4 +563,68 @@ export interface CiPipeline {
564
563
  isOffendingMandatoryPlugin?: boolean;
565
564
  pipelineType?: string;
566
565
  }
566
+ export interface DeploymentChartVersionType {
567
+ chartRefId: number;
568
+ chartVersion: string;
569
+ chartType: string;
570
+ type: number;
571
+ }
572
+ export interface ChartVersionAndTypeSelectorProps {
573
+ setSelectedChartRefId: React.Dispatch<React.SetStateAction<number>>;
574
+ }
575
+ export interface InformationBarProps {
576
+ text: string;
577
+ className?: string;
578
+ children?: React.ReactNode;
579
+ }
580
+ export interface CodeEditorInterface {
581
+ value?: string;
582
+ lineDecorationsWidth?: number;
583
+ responseType?: string;
584
+ onChange?: (string: any) => void;
585
+ onBlur?: () => void;
586
+ onFocus?: () => void;
587
+ children?: any;
588
+ defaultValue?: string;
589
+ mode?: 'json' | 'yaml' | 'shell' | 'dockerfile' | 'plaintext';
590
+ tabSize?: number;
591
+ readOnly?: boolean;
592
+ noParsing?: boolean;
593
+ minHeight?: number;
594
+ maxHeight?: number;
595
+ inline?: boolean;
596
+ height?: number | string;
597
+ shebang?: string | JSX.Element;
598
+ diffView?: boolean;
599
+ loading?: boolean;
600
+ customLoader?: JSX.Element;
601
+ theme?: string;
602
+ original?: string;
603
+ focus?: boolean;
604
+ validatorSchema?: any;
605
+ isKubernetes?: boolean;
606
+ cleanData?: boolean;
607
+ chartVersion?: any;
608
+ }
609
+ export interface CodeEditorComposition {
610
+ Header?: React.FC<any>;
611
+ LanguageChanger?: React.FC<any>;
612
+ ThemeChanger?: React.FC<any>;
613
+ ValidationError?: React.FC<any>;
614
+ Clipboard?: React.FC<any>;
615
+ Warning?: React.FC<InformationBarProps>;
616
+ ErrorBar?: React.FC<InformationBarProps>;
617
+ Information?: React.FC<InformationBarProps>;
618
+ }
619
+ export interface CodeEditorHeaderComposition {
620
+ LanguageChanger?: React.FC<any>;
621
+ ThemeChanger?: React.FC<any>;
622
+ ValidationError?: React.FC<any>;
623
+ Clipboard?: React.FC<any>;
624
+ }
625
+ export interface CodeEditorHeaderInterface {
626
+ children?: any;
627
+ className?: string;
628
+ hideDefaultSplitHeader?: boolean;
629
+ }
567
630
  export {};
@@ -42,3 +42,5 @@ export * from './Hooks';
42
42
  export { AppStatus } from './AppStatus';
43
43
  export * from './RJSF';
44
44
  export * from './DevtronProgressing';
45
+ export { default as ChartVersionAndTypeSelector } from './ChartVersionAndTypeSelector';
46
+ export * from './CustomInput';