@devtron-labs/devtron-fe-common-lib 1.7.0-patch-1 → 1.7.0
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.
- package/dist/@code-editor-B5-sv4g7.js +42310 -0
- package/dist/{@common-rjsf-CaHc69mf.js → @common-rjsf-DMhXJRTx.js} +11 -11
- package/dist/{@framer-motion-C88ROIS4.js → @framer-motion-BFqoU0Z7.js} +70 -70
- package/dist/{@react-dates-Ct1VA7V6.js → @react-dates-Dx7AjKDr.js} +14 -14
- package/dist/{@react-select-qU4oRypC.js → @react-select-BfYm_1lF.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-DmvoaDNw.js → @react-virtualized-sticky-tree-BNk-_Tvs.js} +1 -1
- package/dist/@vendor-CWh7bjwl.js +42519 -0
- package/dist/Common/CodeEditor/CodeEditor.d.ts +13 -3
- package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +3 -47
- package/dist/Common/CodeEditor/index.d.ts +1 -1
- package/dist/Common/CodeEditor/types.d.ts +83 -81
- package/dist/Common/CodeEditor/utils.d.ts +13 -3
- package/dist/Common/Constants.d.ts +0 -1
- package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +1 -2
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-match-case.13b7a2fa.svg +19 -0
- package/dist/assets/ic-match-word.d92addc3.svg +19 -0
- package/dist/assets/ic-replace-all-text.a87fd342.svg +19 -0
- package/dist/assets/ic-replace-text.cc5433be.svg +19 -0
- package/dist/index.js +665 -667
- package/package.json +1 -7
- package/dist/@code-editor-tea3spVD.js +0 -23496
- package/dist/@monaco-editor-CVagbUeH.js +0 -138960
- package/dist/@vendor-C6rSXA7p.js +0 -22734
- package/dist/Common/CodeMirror/CodeEditor.d.ts +0 -14
- package/dist/Common/CodeMirror/CodeEditor.reducer.d.ts +0 -4
- package/dist/Common/CodeMirror/index.d.ts +0 -2
- package/dist/Common/CodeMirror/types.d.ts +0 -107
- package/dist/Common/CodeMirror/utils.d.ts +0 -13
- package/dist/assets/@monaco-editor.css +0 -1
- package/dist/assets/codicon.ecfbfe4b.ttf +0 -0
- /package/dist/Common/{CodeMirror → CodeEditor}/CodeEditor.components.d.ts +0 -0
- /package/dist/Common/{CodeMirror → CodeEditor}/CodeEditor.constants.d.ts +0 -0
- /package/dist/Common/{CodeMirror → CodeEditor}/CodeEditor.context.d.ts +0 -0
- /package/dist/Common/{CodeMirror → CodeEditor}/CodeEditor.theme.d.ts +0 -0
- /package/dist/Common/{CodeMirror → CodeEditor}/CodeEditorRenderer.d.ts +0 -0
- /package/dist/Common/{CodeMirror → CodeEditor}/Extensions/findAndReplace.d.ts +0 -0
- /package/dist/Common/{CodeMirror → CodeEditor}/Extensions/index.d.ts +0 -0
- /package/dist/Common/{CodeMirror → CodeEditor}/Extensions/readOnlyTooltip.d.ts +0 -0
- /package/dist/Common/{CodeMirror → CodeEditor}/Extensions/yamlParseLinter.d.ts +0 -0
@@ -1,4 +1,14 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
1
|
+
import { CodeEditorProps } from './types';
|
2
|
+
declare const CodeEditor: {
|
3
|
+
<DiffView extends boolean = false>({ theme, value: propValue, originalValue, modifiedValue, isOriginalModifiable, mode, noParsing, children, tabSize, height, shebang, onChange, onOriginalValueChange, onModifiedValueChange, readOnly, placeholder, diffView, loading, customLoader, validatorSchema, schemaURI, cleanData, onBlur, onFocus, autoFocus, disableSearch, }: CodeEditorProps<DiffView>): JSX.Element;
|
4
|
+
Clipboard: () => JSX.Element;
|
5
|
+
Header: ({ children, className, hideDefaultSplitHeader }: import('./types').CodeEditorHeaderProps) => JSX.Element;
|
6
|
+
Warning: ({ className, text, children }: import('./types').CodeEditorStatusBarProps) => JSX.Element;
|
7
|
+
ErrorBar: ({ className, text, children }: import('./types').CodeEditorStatusBarProps) => JSX.Element;
|
8
|
+
Information: ({ className, children, text }: import('./types').CodeEditorStatusBarProps) => JSX.Element;
|
9
|
+
Container: ({ children, flexExpand }: {
|
10
|
+
children: import('react').ReactNode;
|
11
|
+
flexExpand?: boolean;
|
12
|
+
}) => JSX.Element;
|
13
|
+
};
|
4
14
|
export default CodeEditor;
|
@@ -1,48 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
export declare const CodeEditorReducer: (state: CodeEditorState, action: Action) => {
|
4
|
-
mode: any;
|
5
|
-
diffMode: boolean;
|
6
|
-
theme: import('./types').CodeEditorThemesKeys;
|
7
|
-
code: string;
|
8
|
-
defaultCode: string;
|
9
|
-
noParsing: boolean;
|
10
|
-
} | {
|
11
|
-
diffMode: any;
|
12
|
-
mode: MODES;
|
13
|
-
theme: import('./types').CodeEditorThemesKeys;
|
14
|
-
code: string;
|
15
|
-
defaultCode: string;
|
16
|
-
noParsing: boolean;
|
17
|
-
} | {
|
18
|
-
theme: any;
|
19
|
-
mode: MODES;
|
20
|
-
diffMode: boolean;
|
21
|
-
code: string;
|
22
|
-
defaultCode: string;
|
23
|
-
noParsing: boolean;
|
24
|
-
} | {
|
25
|
-
code: any;
|
26
|
-
mode: MODES;
|
27
|
-
diffMode: boolean;
|
28
|
-
theme: import('./types').CodeEditorThemesKeys;
|
29
|
-
defaultCode: string;
|
30
|
-
noParsing: boolean;
|
31
|
-
} | {
|
32
|
-
defaultCode: any;
|
33
|
-
mode: MODES;
|
34
|
-
diffMode: boolean;
|
35
|
-
theme: import('./types').CodeEditorThemesKeys;
|
36
|
-
code: string;
|
37
|
-
noParsing: boolean;
|
38
|
-
} | {
|
39
|
-
height: any;
|
40
|
-
mode: MODES;
|
41
|
-
diffMode: boolean;
|
42
|
-
theme: import('./types').CodeEditorThemesKeys;
|
43
|
-
code: string;
|
44
|
-
defaultCode: string;
|
45
|
-
noParsing: boolean;
|
46
|
-
};
|
1
|
+
import { CodeEditorPayloadType, CodeEditorInitialValueType, CodeEditorState } from './types';
|
2
|
+
export declare const CodeEditorReducer: (state: CodeEditorState, action: CodeEditorPayloadType) => CodeEditorState;
|
47
3
|
export declare const parseValueToCode: (value: string, mode: string, tabSize: number) => string;
|
48
|
-
export declare const initialState: ({ mode,
|
4
|
+
export declare const initialState: ({ mode, value, lhsValue, diffView, noParsing, tabSize, }: CodeEditorInitialValueType) => CodeEditorState;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { default as CodeEditor } from './CodeEditor';
|
2
|
-
export
|
2
|
+
export type { CodeEditorProps } from './types';
|
@@ -1,105 +1,107 @@
|
|
1
|
-
import {
|
1
|
+
import { Dispatch, FunctionComponent, Key, MutableRefObject, ReactNode, SVGProps } from 'react';
|
2
|
+
import { JSONSchema7 } from 'json-schema';
|
3
|
+
import { EditorView, ReactCodeMirrorProps } from '@uiw/react-codemirror';
|
4
|
+
import { SearchQuery } from '@codemirror/search';
|
2
5
|
import { MODES } from '../Constants';
|
3
|
-
|
6
|
+
import { Never } from '../../Shared/types';
|
7
|
+
import { AppThemeType } from '../../Shared/Providers';
|
8
|
+
export interface CodeEditorStatusBarProps {
|
4
9
|
text: string;
|
5
10
|
className?: string;
|
6
|
-
children?:
|
11
|
+
children?: ReactNode;
|
7
12
|
}
|
8
|
-
export
|
9
|
-
|
10
|
-
|
11
|
-
|
13
|
+
export interface CodeEditorHeaderProps {
|
14
|
+
className?: string;
|
15
|
+
hideDefaultSplitHeader?: boolean;
|
16
|
+
children?: ReactNode;
|
12
17
|
}
|
13
|
-
|
14
|
-
value?:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
type CodeEditorBaseProps = Partial<Pick<ReactCodeMirrorProps, 'onBlur' | 'onFocus' | 'autoFocus'>> & {
|
19
|
+
value?: ReactCodeMirrorProps['value'];
|
20
|
+
onChange?: (value: string) => void;
|
21
|
+
shebang?: string | JSX.Element;
|
22
|
+
validatorSchema?: JSONSchema7;
|
23
|
+
schemaURI?: string;
|
24
|
+
};
|
25
|
+
type CodeEditorDiffBaseProps = {
|
26
|
+
onOriginalValueChange?: (originalValue: string) => void;
|
27
|
+
onModifiedValueChange?: (modifiedValue: string) => void;
|
28
|
+
originalValue?: ReactCodeMirrorProps['value'];
|
29
|
+
modifiedValue?: ReactCodeMirrorProps['value'];
|
30
|
+
isOriginalModifiable?: boolean;
|
31
|
+
};
|
32
|
+
type CodeEditorPropsBasedOnDiffView<DiffView extends boolean> = DiffView extends true ? CodeEditorDiffBaseProps & Never<CodeEditorBaseProps> : CodeEditorBaseProps & Never<CodeEditorDiffBaseProps>;
|
33
|
+
export type CodeEditorProps<DiffView extends boolean = false> = {
|
34
|
+
/**
|
35
|
+
* @default 450
|
36
|
+
*/
|
37
|
+
height?: 'auto' | '100%' | 'fitToParent' | number;
|
38
|
+
children?: ReactNode;
|
39
|
+
mode?: MODES;
|
23
40
|
tabSize?: number;
|
24
41
|
readOnly?: boolean;
|
42
|
+
placeholder?: string;
|
25
43
|
noParsing?: boolean;
|
26
|
-
inline?: boolean;
|
27
|
-
shebang?: string | JSX.Element;
|
28
|
-
diffView?: boolean;
|
29
44
|
loading?: boolean;
|
30
45
|
customLoader?: JSX.Element;
|
31
|
-
theme?: CodeEditorThemesKeys;
|
32
|
-
original?: string;
|
33
|
-
focus?: boolean;
|
34
|
-
validatorSchema?: any;
|
35
|
-
isKubernetes?: boolean;
|
36
46
|
cleanData?: boolean;
|
37
|
-
schemaURI?: string;
|
38
47
|
/**
|
39
|
-
* If true,
|
48
|
+
* If true, disables the in-built search
|
40
49
|
* @default false
|
41
50
|
*/
|
42
51
|
disableSearch?: boolean;
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
52
|
+
diffView?: DiffView;
|
53
|
+
theme?: AppThemeType;
|
54
|
+
} & CodeEditorPropsBasedOnDiffView<DiffView>;
|
55
|
+
export interface GetCodeEditorHeightReturnType {
|
56
|
+
codeEditorParentClassName: string;
|
57
|
+
codeEditorClassName: string;
|
58
|
+
codeEditorHeight: string;
|
48
59
|
}
|
49
|
-
export type
|
50
|
-
|
51
|
-
|
52
|
-
}
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
children?: any;
|
58
|
-
className?: string;
|
59
|
-
hideDefaultSplitHeader?: boolean;
|
60
|
+
export type HoverTexts = {
|
61
|
+
message: string;
|
62
|
+
typeInfo: string;
|
63
|
+
};
|
64
|
+
export type FindReplaceQuery = Partial<Pick<SearchQuery, 'search' | 'wholeWord' | 'regexp' | 'replace' | 'caseSensitive'>>;
|
65
|
+
export interface FindReplaceProps {
|
66
|
+
view: EditorView;
|
67
|
+
defaultQuery: SearchQuery;
|
60
68
|
}
|
61
|
-
export
|
62
|
-
|
63
|
-
|
64
|
-
ThemeChanger?: React.FC<any>;
|
65
|
-
ValidationError?: React.FC<any>;
|
66
|
-
Clipboard?: React.FC<any>;
|
67
|
-
Warning?: React.FC<InformationBarProps>;
|
68
|
-
ErrorBar?: React.FC<InformationBarProps>;
|
69
|
-
Information?: React.FC<InformationBarProps>;
|
70
|
-
}
|
71
|
-
export interface CodeEditorHeaderComposition {
|
72
|
-
LanguageChanger?: React.FC<any>;
|
73
|
-
ThemeChanger?: React.FC<any>;
|
74
|
-
ValidationError?: React.FC<any>;
|
75
|
-
Clipboard?: React.FC<any>;
|
76
|
-
}
|
77
|
-
export type ActionTypes = 'changeLanguage' | 'setDiff' | 'setTheme' | 'setCode' | 'setDefaultCode' | 'setHeight';
|
78
|
-
export interface Action {
|
79
|
-
type: ActionTypes;
|
69
|
+
export type CodeEditorActionTypes = 'setDiff' | 'setCode' | 'setLhsCode';
|
70
|
+
export interface CodeEditorPayloadType {
|
71
|
+
type: CodeEditorActionTypes;
|
80
72
|
value: any;
|
81
73
|
}
|
82
|
-
export interface CodeEditorInitialValueType extends Pick<
|
83
|
-
|
74
|
+
export interface CodeEditorInitialValueType extends Pick<CodeEditorProps, 'value' | 'noParsing' | 'tabSize' | 'mode'> {
|
75
|
+
lhsValue: ReactCodeMirrorProps['value'];
|
84
76
|
diffView: boolean;
|
85
|
-
value: string;
|
86
|
-
defaultValue: string;
|
87
|
-
noParsing?: boolean;
|
88
|
-
tabSize: number;
|
89
|
-
appTheme: AppThemeType;
|
90
77
|
}
|
91
|
-
export interface CodeEditorState {
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
78
|
+
export interface CodeEditorState extends Pick<CodeEditorProps, 'noParsing'> {
|
79
|
+
code: CodeEditorProps['value'];
|
80
|
+
lhsCode: CodeEditorProps<true>['originalValue'];
|
81
|
+
diffMode: CodeEditorProps<boolean>['diffView'];
|
82
|
+
}
|
83
|
+
export interface CodeEditorContextProps extends Pick<CodeEditorProps, 'readOnly' | 'height'> {
|
84
|
+
state: CodeEditorState;
|
85
|
+
hasCodeEditorContainer: boolean;
|
86
|
+
dispatch: Dispatch<CodeEditorPayloadType>;
|
98
87
|
}
|
99
|
-
export
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
88
|
+
export interface FindReplaceToggleButtonProps {
|
89
|
+
isChecked: boolean;
|
90
|
+
Icon: FunctionComponent<SVGProps<SVGSVGElement>>;
|
91
|
+
onChange: (isChecked: boolean) => void;
|
92
|
+
iconType?: 'stroke' | 'fill';
|
93
|
+
tooltipText: string;
|
104
94
|
}
|
95
|
+
export type CodeEditorRendererProps = Required<Pick<CodeEditorProps, 'loading' | 'customLoader' | 'height' | 'readOnly' | 'shebang' | 'placeholder' | 'onBlur' | 'onFocus' | 'autoFocus'>> & Required<Pick<CodeEditorDiffBaseProps, 'isOriginalModifiable'>> & {
|
96
|
+
codemirrorMergeKey: Key;
|
97
|
+
codeMirrorParentDivRef: MutableRefObject<HTMLDivElement>;
|
98
|
+
codeEditorTheme: ReactCodeMirrorProps['theme'];
|
99
|
+
isDarkTheme: boolean;
|
100
|
+
state: CodeEditorState;
|
101
|
+
handleOnChange: ReactCodeMirrorProps['onChange'];
|
102
|
+
handleLhsOnChange: ReactCodeMirrorProps['onChange'];
|
103
|
+
originalViewExtensions: ReactCodeMirrorProps['extensions'];
|
104
|
+
modifiedViewExtensions: ReactCodeMirrorProps['extensions'];
|
105
|
+
extensions: ReactCodeMirrorProps['extensions'];
|
106
|
+
};
|
105
107
|
export {};
|
@@ -1,3 +1,13 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
1
|
+
import { SearchQuery } from '@codemirror/search';
|
2
|
+
import { EditorView, Extension } from '@uiw/react-codemirror';
|
3
|
+
import { CodeEditorProps, FindReplaceToggleButtonProps, GetCodeEditorHeightReturnType } from './types';
|
4
|
+
export declare const getCodeEditorHeight: (height: CodeEditorProps["height"]) => GetCodeEditorHeightReturnType;
|
5
|
+
export declare const getFindReplaceToggleButtonIconClass: ({ iconType, isChecked, }: Pick<FindReplaceToggleButtonProps, "iconType" | "isChecked">) => "scb-5" | "scn-7" | "fcb-5" | "fcn-7";
|
6
|
+
export declare const getUpdatedSearchMatchesCount: (newQuery: SearchQuery, view: EditorView) => {
|
7
|
+
count: number;
|
8
|
+
current: number;
|
9
|
+
};
|
10
|
+
export declare const getFoldGutterElement: (open: boolean) => HTMLSpanElement;
|
11
|
+
export declare const getReadOnlyElement: () => HTMLDivElement;
|
12
|
+
export declare const getLanguageExtension: (mode: CodeEditorProps["mode"]) => Extension;
|
13
|
+
export declare const getValidationSchema: ({ mode, validatorSchema, schemaURI, }: Pick<CodeEditorProps, "schemaURI" | "validatorSchema" | "mode">) => Extension[];
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { AppStatusDetailsChartType } from './types';
|
2
|
-
declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter,
|
2
|
+
declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter, handleOpenConfigDriftModal, onClose, }: AppStatusDetailsChartType) => JSX.Element;
|
3
3
|
export default AppStatusDetailsChart;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DeploymentTemplateHistoryType } from '../types';
|
2
|
-
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, rootClassName,
|
2
|
+
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, rootClassName, }: DeploymentTemplateHistoryType) => JSX.Element;
|
3
3
|
export default DeploymentHistoryDiffView;
|
@@ -487,7 +487,6 @@ export interface DeploymentTemplateHistoryType {
|
|
487
487
|
baseTemplateConfiguration: DeploymentHistoryDetail;
|
488
488
|
previousConfigAvailable: boolean;
|
489
489
|
rootClassName?: string;
|
490
|
-
codeEditorKey?: string;
|
491
490
|
}
|
492
491
|
export interface DeploymentHistoryDetailRes extends ResponseType {
|
493
492
|
result?: DeploymentHistoryDetail;
|
@@ -510,7 +509,7 @@ export interface DeploymentHistorySidebarType {
|
|
510
509
|
export interface AppStatusDetailsChartType {
|
511
510
|
filterRemoveHealth?: boolean;
|
512
511
|
showFooter: boolean;
|
513
|
-
|
512
|
+
handleOpenConfigDriftModal?: () => void;
|
514
513
|
onClose?: () => void;
|
515
514
|
}
|
516
515
|
export interface StatusFilterButtonType {
|