@devtron-labs/devtron-fe-common-lib 1.5.12 → 1.5.13
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-DpYDAAJZ.js +23000 -0
- package/dist/{@common-rjsf-BMS8FlyD.js → @common-rjsf-CCiAa1v9.js} +82 -78
- package/dist/{@framer-motion-CpA7HTl-.js → @framer-motion-CbfcgbXI.js} +70 -70
- package/dist/@monaco-editor-CVagbUeH.js +138960 -0
- package/dist/{@react-dates-CaRoxjcN.js → @react-dates-CHLhA4kl.js} +14 -14
- package/dist/{@react-select-D4CIuOAx.js → @react-select-CgLj7C5f.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-CZZtnJ_O.js → @react-virtualized-sticky-tree-Cj8etBAu.js} +1 -1
- package/dist/@vendor-ROKJESOw.js +22734 -0
- package/dist/Common/CodeEditor/CodeEditor.d.ts +3 -13
- package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +47 -3
- package/dist/Common/CodeEditor/index.d.ts +1 -1
- package/dist/Common/CodeEditor/types.d.ts +76 -83
- package/dist/Common/CodeEditor/utils.d.ts +3 -13
- package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +1 -1
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +1 -0
- package/dist/Shared/Components/Collapse/Collapse.d.ts +1 -0
- package/dist/Shared/constants.d.ts +0 -1
- package/dist/Shared/types.d.ts +0 -8
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/@monaco-editor.css +1 -0
- package/dist/assets/codicon.ecfbfe4b.ttf +0 -0
- package/dist/index.js +646 -644
- package/package.json +7 -14
- package/dist/@code-editor-CjWBvOC7.js +0 -41786
- package/dist/@vendor-CKSERKp7.js +0 -42519
- package/dist/Common/ClipboardButton/index.d.ts +0 -1
- package/dist/Common/CodeEditor/CodeEditor.components.d.ts +0 -11
- package/dist/Common/CodeEditor/CodeEditor.constants.d.ts +0 -7
- package/dist/Common/CodeEditor/CodeEditor.context.d.ts +0 -3
- package/dist/Common/CodeEditor/CodeEditor.theme.d.ts +0 -1
- package/dist/Common/CodeEditor/CodeEditorRenderer.d.ts +0 -2
- package/dist/Common/CodeEditor/Extensions/findAndReplace.d.ts +0 -2
- package/dist/Common/CodeEditor/Extensions/index.d.ts +0 -3
- package/dist/Common/CodeEditor/Extensions/readOnlyTooltip.d.ts +0 -6
- package/dist/Common/CodeEditor/Extensions/yamlParseLinter.d.ts +0 -3
- package/dist/assets/ic-match-case.702186fe.svg +0 -3
- package/dist/assets/ic-match-word.991dea5a.svg +0 -3
- package/dist/assets/ic-replace-all-text.7ebbab01.svg +0 -3
- package/dist/assets/ic-replace-text.5de817d2.svg +0 -3
@@ -1,14 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
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
|
-
};
|
1
|
+
import { default as React } from 'react';
|
2
|
+
import { CodeEditorComposition, CodeEditorInterface } from './types';
|
3
|
+
declare const CodeEditor: React.FC<CodeEditorInterface> & CodeEditorComposition;
|
14
4
|
export default CodeEditor;
|
@@ -1,4 +1,48 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import { MODES } from '../Constants';
|
2
|
+
import { Action, CodeEditorInitialValueType, CodeEditorState } from './types';
|
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
|
+
};
|
3
47
|
export declare const parseValueToCode: (value: string, mode: string, tabSize: number) => string;
|
4
|
-
export declare const initialState: ({ mode, value,
|
48
|
+
export declare const initialState: ({ mode, theme, value, defaultValue, diffView, noParsing, tabSize, appTheme, }: CodeEditorInitialValueType) => CodeEditorState;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { default as CodeEditor } from './CodeEditor';
|
2
|
-
export
|
2
|
+
export * from './types';
|
@@ -1,107 +1,100 @@
|
|
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';
|
5
|
-
import { MODES } from '../Constants';
|
6
|
-
import { Never } from '../../Shared/types';
|
7
1
|
import { AppThemeType } from '../../Shared/Providers';
|
8
|
-
|
2
|
+
import { MODES } from '../Constants';
|
3
|
+
export interface InformationBarProps {
|
9
4
|
text: string;
|
10
5
|
className?: string;
|
11
|
-
children?: ReactNode;
|
6
|
+
children?: React.ReactNode;
|
12
7
|
}
|
13
|
-
export
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
export declare enum CodeEditorThemesKeys {
|
9
|
+
vsDarkDT = "vs-dark--dt",
|
10
|
+
vs = "vs",
|
11
|
+
networkStatusInterface = "network-status-interface"
|
17
12
|
}
|
18
|
-
|
19
|
-
value?:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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;
|
13
|
+
interface CodeEditorBaseInterface {
|
14
|
+
value?: string;
|
15
|
+
lineDecorationsWidth?: number;
|
16
|
+
responseType?: string;
|
17
|
+
onChange?: (value: string, defaultValue: string) => void;
|
18
|
+
onBlur?: () => void;
|
19
|
+
onFocus?: () => void;
|
20
|
+
children?: any;
|
21
|
+
defaultValue?: string;
|
22
|
+
mode?: MODES | string;
|
40
23
|
tabSize?: number;
|
41
24
|
readOnly?: boolean;
|
42
|
-
placeholder?: string;
|
43
25
|
noParsing?: boolean;
|
26
|
+
inline?: boolean;
|
27
|
+
shebang?: string | JSX.Element;
|
28
|
+
diffView?: boolean;
|
44
29
|
loading?: boolean;
|
45
30
|
customLoader?: JSX.Element;
|
31
|
+
theme?: CodeEditorThemesKeys;
|
32
|
+
original?: string;
|
33
|
+
focus?: boolean;
|
34
|
+
validatorSchema?: any;
|
35
|
+
isKubernetes?: boolean;
|
46
36
|
cleanData?: boolean;
|
37
|
+
schemaURI?: string;
|
47
38
|
/**
|
48
|
-
* If true,
|
39
|
+
* If true, disable the in-built search of monaco editor
|
49
40
|
* @default false
|
50
41
|
*/
|
51
42
|
disableSearch?: boolean;
|
52
|
-
diffView?: DiffView;
|
53
|
-
theme?: AppThemeType;
|
54
|
-
} & CodeEditorPropsBasedOnDiffView<DiffView>;
|
55
|
-
export interface GetCodeEditorHeightReturnType {
|
56
|
-
codeEditorParentClassName: string;
|
57
|
-
codeEditorClassName: string;
|
58
|
-
codeEditorHeight: string;
|
59
43
|
}
|
60
|
-
export type
|
61
|
-
|
62
|
-
|
63
|
-
}
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
44
|
+
export type CodeEditorInterface = CodeEditorBaseInterface & ({
|
45
|
+
adjustEditorHeightToContent?: boolean;
|
46
|
+
height?: never;
|
47
|
+
} | {
|
48
|
+
adjustEditorHeightToContent?: never;
|
49
|
+
height?: number | string;
|
50
|
+
});
|
51
|
+
export interface CodeEditorHeaderInterface {
|
52
|
+
children?: any;
|
53
|
+
className?: string;
|
54
|
+
hideDefaultSplitHeader?: boolean;
|
55
|
+
}
|
56
|
+
export interface CodeEditorComposition {
|
57
|
+
Header?: React.FC<any>;
|
58
|
+
LanguageChanger?: React.FC<any>;
|
59
|
+
ThemeChanger?: React.FC<any>;
|
60
|
+
ValidationError?: React.FC<any>;
|
61
|
+
Clipboard?: React.FC<any>;
|
62
|
+
Warning?: React.FC<InformationBarProps>;
|
63
|
+
ErrorBar?: React.FC<InformationBarProps>;
|
64
|
+
Information?: React.FC<InformationBarProps>;
|
65
|
+
}
|
66
|
+
export interface CodeEditorHeaderComposition {
|
67
|
+
LanguageChanger?: React.FC<any>;
|
68
|
+
ThemeChanger?: React.FC<any>;
|
69
|
+
ValidationError?: React.FC<any>;
|
70
|
+
Clipboard?: React.FC<any>;
|
68
71
|
}
|
69
|
-
export type
|
70
|
-
export interface
|
71
|
-
type:
|
72
|
+
export type ActionTypes = 'changeLanguage' | 'setDiff' | 'setTheme' | 'setCode' | 'setDefaultCode' | 'setHeight';
|
73
|
+
export interface Action {
|
74
|
+
type: ActionTypes;
|
72
75
|
value: any;
|
73
76
|
}
|
74
|
-
export interface CodeEditorInitialValueType extends Pick<
|
75
|
-
|
77
|
+
export interface CodeEditorInitialValueType extends Pick<CodeEditorBaseInterface, 'theme'> {
|
78
|
+
mode: string;
|
76
79
|
diffView: boolean;
|
80
|
+
value: string;
|
81
|
+
defaultValue: string;
|
82
|
+
noParsing?: boolean;
|
83
|
+
tabSize: number;
|
84
|
+
appTheme: AppThemeType;
|
77
85
|
}
|
78
|
-
export interface CodeEditorState
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
hasCodeEditorContainer: boolean;
|
86
|
-
dispatch: Dispatch<CodeEditorPayloadType>;
|
86
|
+
export interface CodeEditorState {
|
87
|
+
mode: MODES;
|
88
|
+
diffMode: boolean;
|
89
|
+
theme: CodeEditorThemesKeys;
|
90
|
+
code: string;
|
91
|
+
defaultCode: string;
|
92
|
+
noParsing: boolean;
|
87
93
|
}
|
88
|
-
export
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
tooltipText: string;
|
94
|
+
export declare enum CodeEditorActionTypes {
|
95
|
+
reInit = "reInit",
|
96
|
+
submitLoading = "submitLoading",
|
97
|
+
overrideLoading = "overrideLoading",
|
98
|
+
success = "success"
|
94
99
|
}
|
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
|
-
};
|
107
100
|
export {};
|
@@ -1,13 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
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
|
+
import { AppThemeType } from '../../Shared/Providers';
|
2
|
+
import { CodeEditorInterface } from './types';
|
3
|
+
export declare const getCodeEditorThemeFromAppTheme: (editorTheme: CodeEditorInterface["theme"], appTheme: AppThemeType) => CodeEditorInterface["theme"];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ShortcutType } from './types';
|
2
2
|
export declare const preprocessKeys: (keys: ShortcutType["keys"]) => {
|
3
|
-
keys: ("Alt" | "F" | "E" | "R" | "K" | "
|
3
|
+
keys: ("Alt" | "F" | "E" | "R" | "K" | "Escape" | "Control" | "Shift" | "Meta" | "Enter")[];
|
4
4
|
id: string;
|
5
5
|
};
|
6
6
|
export declare const verifyCallbackStack: (stack: ShortcutType["callbackStack"]) => void;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DeploymentTemplateHistoryType } from '../types';
|
2
|
-
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, rootClassName, }: DeploymentTemplateHistoryType) => JSX.Element;
|
2
|
+
declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, rootClassName, codeEditorKey, }: DeploymentTemplateHistoryType) => JSX.Element;
|
3
3
|
export default DeploymentHistoryDiffView;
|
@@ -423,6 +423,7 @@ export interface DeploymentTemplateHistoryType {
|
|
423
423
|
baseTemplateConfiguration: DeploymentHistoryDetail;
|
424
424
|
previousConfigAvailable: boolean;
|
425
425
|
rootClassName?: string;
|
426
|
+
codeEditorKey?: React.Key;
|
426
427
|
}
|
427
428
|
export interface DeploymentHistoryDetailRes extends ResponseType {
|
428
429
|
result?: DeploymentHistoryDetail;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { CollapseProps } from './types';
|
2
2
|
/**
|
3
3
|
* Collapse component for smoothly expanding or collapsing its content.
|
4
|
+
* Dynamically calculates the content height and applies smooth transitions.
|
4
5
|
* It also supports a callback when the transition ends.
|
5
6
|
*/
|
6
7
|
export declare const Collapse: ({ expand, onTransitionEnd, children }: CollapseProps) => JSX.Element;
|
package/dist/Shared/types.d.ts
CHANGED
@@ -782,14 +782,6 @@ export interface UploadFileProps {
|
|
782
782
|
allowedExtensions?: string[];
|
783
783
|
maxUploadSize?: number;
|
784
784
|
}
|
785
|
-
/**
|
786
|
-
* A utility type that transforms all properties of a given type `T` to be optional and of type `never`. \
|
787
|
-
* This can be useful for scenarios where you want to explicitly mark that certain properties should not exist.
|
788
|
-
* @template T - The type whose properties will be transformed.
|
789
|
-
*/
|
790
|
-
export type Never<T> = {
|
791
|
-
[K in keyof T]?: never;
|
792
|
-
};
|
793
785
|
export interface TargetPlatformItemDTO {
|
794
786
|
name: string;
|
795
787
|
}
|