@devtron-labs/devtron-fe-common-lib 1.6.0 → 1.6.1-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.
- package/dist/@code-editor-Bbs0NH9g.js +41984 -0
- package/dist/{@common-rjsf-CCiAa1v9.js → @common-rjsf-D15keJJ7.js} +3 -3
- package/dist/{@framer-motion-CbfcgbXI.js → @framer-motion-CpA7HTl-.js} +70 -70
- package/dist/{@react-dates-CHLhA4kl.js → @react-dates-CaRoxjcN.js} +14 -14
- package/dist/{@react-select-CgLj7C5f.js → @react-select-D4CIuOAx.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-Cj8etBAu.js → @react-virtualized-sticky-tree-CZZtnJ_O.js} +1 -1
- package/dist/@vendor-CKSERKp7.js +42519 -0
- package/dist/Common/ClipboardButton/index.d.ts +1 -0
- package/dist/Common/CodeEditor/CodeEditor.components.d.ts +11 -0
- package/dist/Common/CodeEditor/CodeEditor.constants.d.ts +7 -0
- package/dist/Common/CodeEditor/CodeEditor.context.d.ts +3 -0
- package/dist/Common/CodeEditor/CodeEditor.d.ts +13 -3
- package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +3 -47
- package/dist/Common/CodeEditor/CodeEditor.theme.d.ts +1 -0
- package/dist/Common/CodeEditor/CodeEditorRenderer.d.ts +2 -0
- package/dist/Common/CodeEditor/Extensions/findAndReplace.d.ts +2 -0
- package/dist/Common/CodeEditor/Extensions/index.d.ts +3 -0
- package/dist/Common/CodeEditor/Extensions/readOnlyTooltip.d.ts +6 -0
- package/dist/Common/CodeEditor/Extensions/yamlParseLinter.d.ts +3 -0
- package/dist/Common/CodeEditor/index.d.ts +1 -1
- package/dist/Common/CodeEditor/types.d.ts +83 -76
- package/dist/Common/CodeEditor/utils.d.ts +13 -3
- package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +1 -1
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/Hooks/useUrlFilters/types.d.ts +11 -1
- package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +1 -1
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/Tooltip/index.d.ts +1 -0
- package/dist/Common/Types.d.ts +0 -13
- package/dist/Common/index.d.ts +0 -2
- package/dist/Shared/Components/Button/Button.component.d.ts +2 -2
- package/dist/Shared/Components/Button/types.d.ts +14 -10
- package/dist/Shared/Components/Button/utils.d.ts +3 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +0 -1
- package/dist/Shared/Components/Collapse/Collapse.d.ts +0 -1
- package/dist/Shared/Components/CustomInput/CustomInput.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/PasswordField.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/constants.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/index.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/types.d.ts +36 -0
- package/dist/Shared/Components/EditableTextArea/types.d.ts +0 -1
- package/dist/Shared/Components/FormFieldWrapper/FormFieldInfo.d.ts +3 -0
- package/dist/Shared/Components/FormFieldWrapper/FormFieldLabel.d.ts +3 -0
- package/dist/Shared/Components/FormFieldWrapper/FormFieldWrapper.d.ts +3 -0
- package/dist/Shared/Components/FormFieldWrapper/index.d.ts +3 -0
- package/dist/Shared/Components/FormFieldWrapper/types.d.ts +91 -0
- package/dist/Shared/Components/FormFieldWrapper/utils.d.ts +18 -0
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +2 -13
- package/dist/Shared/Components/Textarea/Textarea.component.d.ts +3 -0
- package/dist/Shared/Components/Textarea/constants.d.ts +4 -0
- package/dist/Shared/Components/Textarea/index.d.ts +2 -0
- package/dist/Shared/Components/Textarea/types.d.ts +17 -0
- package/dist/Shared/Components/ThemeSwitcher/index.d.ts +1 -0
- package/dist/Shared/Components/index.d.ts +3 -0
- package/dist/Shared/Services/ToastManager/types.d.ts +3 -3
- package/dist/Shared/constants.d.ts +4 -0
- package/dist/Shared/types.d.ts +8 -0
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-match-case.702186fe.svg +3 -0
- package/dist/assets/ic-match-word.991dea5a.svg +3 -0
- package/dist/assets/ic-replace-all-text.7ebbab01.svg +3 -0
- package/dist/assets/ic-replace-text.5de817d2.svg +3 -0
- package/dist/assets/ic-visibility-off.d91d3844.svg +19 -0
- package/dist/assets/ic-visibility-on.7505dd12.svg +20 -0
- package/dist/assets/{ic-warning.10bcf8bd.svg → ic-warning.a842ba2a.svg} +1 -1
- package/dist/index.js +666 -663
- package/package.json +16 -9
- package/dist/@code-editor-DpYDAAJZ.js +0 -23000
- package/dist/@monaco-editor-CVagbUeH.js +0 -138960
- package/dist/@vendor-ROKJESOw.js +0 -22734
- package/dist/Common/CustomInput/CustomInput.d.ts +0 -2
- package/dist/Common/CustomInput/Types.d.ts +0 -30
- package/dist/Common/CustomInput/index.d.ts +0 -2
- package/dist/Common/ResizableTextarea.d.ts +0 -3
- package/dist/assets/@monaco-editor.css +0 -1
- package/dist/assets/codicon.ecfbfe4b.ttf +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
export * from './ClipboardButton';
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { CodeEditorHeaderProps, CodeEditorStatusBarProps } from './types';
|
3
|
+
export declare const Header: ({ children, className, hideDefaultSplitHeader }: CodeEditorHeaderProps) => JSX.Element;
|
4
|
+
export declare const Warning: ({ className, text, children }: CodeEditorStatusBarProps) => JSX.Element;
|
5
|
+
export declare const ErrorBar: ({ className, text, children }: CodeEditorStatusBarProps) => JSX.Element;
|
6
|
+
export declare const Information: ({ className, children, text }: CodeEditorStatusBarProps) => JSX.Element;
|
7
|
+
export declare const Clipboard: () => JSX.Element;
|
8
|
+
export declare const Container: ({ children, flexExpand }: {
|
9
|
+
children: ReactNode;
|
10
|
+
flexExpand?: boolean;
|
11
|
+
}) => JSX.Element;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { SupportedKeyboardKeysType } from '@Common/Hooks/UseRegisterShortcut/types';
|
2
|
+
export declare const PREVIOUS_MATCH_SHORTCUT_KEYS: SupportedKeyboardKeysType[];
|
3
|
+
export declare const NEXT_MATCH_SHORTCUT_KEYS: SupportedKeyboardKeysType[];
|
4
|
+
export declare const REPLACE_SHORTCUT_KEYS: SupportedKeyboardKeysType[];
|
5
|
+
export declare const REPLACE_ALL_SHORTCUT_KEYS: SupportedKeyboardKeysType[];
|
6
|
+
export declare const SELECT_ALL_SHORTCUT_KEYS: SupportedKeyboardKeysType[];
|
7
|
+
export declare const CLOSE_SEARCH_SHORTCUT_KEYS: SupportedKeyboardKeysType[];
|
@@ -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;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const getCodeEditorTheme: (isDark: boolean) => import('@codemirror/state').Extension;
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import { CodeEditorRendererProps } from './types';
|
2
|
+
export declare const CodeEditorRenderer: ({ loading, customLoader, height, state, codeEditorTheme, codemirrorMergeKey, isDarkTheme, readOnly, isOriginalModifiable, handleLhsOnChange, originalViewExtensions, handleOnChange, modifiedViewExtensions, codeMirrorParentDivRef, shebang, placeholder, onFocus, onBlur, extensions, autoFocus, }: CodeEditorRendererProps) => JSX.Element;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { default as CodeEditor } from './CodeEditor';
|
2
|
-
export
|
2
|
+
export type { CodeEditorProps } from './types';
|
@@ -1,100 +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;
|
52
|
+
diffView?: DiffView;
|
53
|
+
theme?: AppThemeType;
|
54
|
+
} & CodeEditorPropsBasedOnDiffView<DiffView>;
|
55
|
+
export interface GetCodeEditorHeightReturnType {
|
56
|
+
codeEditorParentClassName: string;
|
57
|
+
codeEditorClassName: string;
|
58
|
+
codeEditorHeight: string;
|
43
59
|
}
|
44
|
-
export type
|
45
|
-
|
46
|
-
|
47
|
-
}
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
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>;
|
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;
|
71
68
|
}
|
72
|
-
export type
|
73
|
-
export interface
|
74
|
-
type:
|
69
|
+
export type CodeEditorActionTypes = 'setDiff' | 'setCode' | 'setLhsCode';
|
70
|
+
export interface CodeEditorPayloadType {
|
71
|
+
type: CodeEditorActionTypes;
|
75
72
|
value: any;
|
76
73
|
}
|
77
|
-
export interface CodeEditorInitialValueType extends Pick<
|
78
|
-
|
74
|
+
export interface CodeEditorInitialValueType extends Pick<CodeEditorProps, 'value' | 'noParsing' | 'tabSize' | 'mode'> {
|
75
|
+
lhsValue: ReactCodeMirrorProps['value'];
|
79
76
|
diffView: boolean;
|
80
|
-
value: string;
|
81
|
-
defaultValue: string;
|
82
|
-
noParsing?: boolean;
|
83
|
-
tabSize: number;
|
84
|
-
appTheme: AppThemeType;
|
85
77
|
}
|
86
|
-
export interface CodeEditorState {
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
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>;
|
93
87
|
}
|
94
|
-
export
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
88
|
+
export interface FindReplaceToggleButtonProps {
|
89
|
+
isChecked: boolean;
|
90
|
+
Icon: FunctionComponent<SVGProps<SVGSVGElement>>;
|
91
|
+
onChange: (isChecked: boolean) => void;
|
92
|
+
iconType?: 'stroke' | 'fill';
|
93
|
+
tooltipText: string;
|
99
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
|
+
};
|
100
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,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" | "Control" | "Shift" | "Meta" | "Escape" | "Enter")[];
|
4
4
|
id: string;
|
5
5
|
};
|
6
6
|
export declare const verifyCallbackStack: (stack: ShortcutType["callbackStack"]) => void;
|
@@ -8,8 +8,18 @@ export interface UseUrlFiltersProps<T, K> {
|
|
8
8
|
* Callback function for parsing the search params
|
9
9
|
*/
|
10
10
|
parseSearchParams?: (searchParams: URLSearchParams) => K;
|
11
|
+
/**
|
12
|
+
* Local storage key to store the filters
|
13
|
+
*/
|
11
14
|
localStorageKey?: `${string}__${string}`;
|
15
|
+
/**
|
16
|
+
* Method to be used for redirection in case of filter update
|
17
|
+
*
|
18
|
+
* @default 'replace'
|
19
|
+
*/
|
20
|
+
redirectionMethod?: 'replace' | 'push';
|
12
21
|
}
|
22
|
+
export type UpdateSearchParamsOptionsType<T, K = unknown> = Partial<Pick<UseUrlFiltersProps<T, K>, 'redirectionMethod'>>;
|
13
23
|
export type UseUrlFiltersReturnType<T, K = unknown> = K & {
|
14
24
|
/**
|
15
25
|
* Currently applied page size
|
@@ -56,5 +66,5 @@ export type UseUrlFiltersReturnType<T, K = unknown> = K & {
|
|
56
66
|
/**
|
57
67
|
* Update the search params with the passed object
|
58
68
|
*/
|
59
|
-
updateSearchParams: (paramsToSerialize: Partial<K>) => void;
|
69
|
+
updateSearchParams: (paramsToSerialize: Partial<K>, options?: UpdateSearchParamsOptionsType<T, K>) => void;
|
60
70
|
};
|
@@ -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, localStorageKey, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
|
19
|
+
declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, localStorageKey, redirectionMethod, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
|
20
20
|
export default useUrlFilters;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { default as RJSF } from '@rjsf/core';
|
2
2
|
import { FormProps } from './types';
|
3
|
-
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "autoComplete" | "tagName" | "method" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -673,19 +673,6 @@ export interface UseSearchString {
|
|
673
673
|
[key: string]: string;
|
674
674
|
};
|
675
675
|
}
|
676
|
-
export interface ResizableTextareaProps {
|
677
|
-
minHeight?: number;
|
678
|
-
maxHeight?: number;
|
679
|
-
value?: string;
|
680
|
-
onChange?: (e: any) => void;
|
681
|
-
onBlur?: (e: any) => void;
|
682
|
-
onFocus?: (e: any) => void;
|
683
|
-
className?: string;
|
684
|
-
placeholder?: string;
|
685
|
-
disabled?: boolean;
|
686
|
-
name?: string;
|
687
|
-
dataTestId?: string;
|
688
|
-
}
|
689
676
|
export interface AsyncState<T> {
|
690
677
|
loading: boolean;
|
691
678
|
result: T;
|
package/dist/Common/index.d.ts
CHANGED
@@ -34,7 +34,6 @@ export * from './Policy.Types';
|
|
34
34
|
export { default as DeleteComponent } from './DeleteComponentModal/DeleteComponent';
|
35
35
|
export * from './ImageTags';
|
36
36
|
export * from './ImageTags.Types';
|
37
|
-
export * from './ResizableTextarea';
|
38
37
|
export { default as DebouncedSearch } from './DebouncedSearch/DebouncedSearch';
|
39
38
|
export { default as Grid } from './Grid/Grid';
|
40
39
|
export { default as Select } from './Select/Select';
|
@@ -44,7 +43,6 @@ export * from './RJSF';
|
|
44
43
|
export * from './DevtronProgressing';
|
45
44
|
export { default as ChartVersionAndTypeSelector } from './ChartVersionAndTypeSelector';
|
46
45
|
export * from './AddCDButton';
|
47
|
-
export * from './CustomInput';
|
48
46
|
export * from './DraggableWrapper';
|
49
47
|
export * from './Pagination';
|
50
48
|
export * from './Markdown';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ButtonProps } from './types';
|
1
|
+
import { ButtonComponentType, ButtonProps } from './types';
|
2
2
|
/**
|
3
3
|
* Generic component for Button.
|
4
4
|
* Should be used in combination of variant, size and style.
|
@@ -63,5 +63,5 @@ import { ButtonProps } from './types';
|
|
63
63
|
* <Button icon={<ICCube />} ariaLabel="Label" />
|
64
64
|
* ```
|
65
65
|
*/
|
66
|
-
declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, ...props }: ButtonProps) => JSX.Element;
|
66
|
+
declare const Button: <ComponentType extends ButtonComponentType>({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, triggerAutoClickTimestamp, ...props }: ButtonProps<ComponentType>) => JSX.Element;
|
67
67
|
export default Button;
|
@@ -20,27 +20,27 @@ export declare enum ButtonComponentType {
|
|
20
20
|
button = "button",
|
21
21
|
link = "link"
|
22
22
|
}
|
23
|
-
export type ButtonProps = ({
|
23
|
+
export type ButtonProps<ComponentType extends ButtonComponentType = ButtonComponentType.button> = (ComponentType extends ButtonComponentType.link ? {
|
24
|
+
component: ButtonComponentType.link;
|
25
|
+
/**
|
26
|
+
* Props for the link component
|
27
|
+
*/
|
28
|
+
linkProps: Omit<LinkProps, 'children' | 'styles' | 'className' | 'onClick'>;
|
29
|
+
buttonProps?: never;
|
30
|
+
onClick?: LinkProps['onClick'];
|
31
|
+
} : {
|
24
32
|
/**
|
25
33
|
* Component to be rendered from the available options
|
26
34
|
*
|
27
35
|
* @default ButtonComponentType.button
|
28
36
|
*/
|
29
|
-
component?:
|
37
|
+
component?: ComponentType | never;
|
30
38
|
/**
|
31
39
|
* Props for the button component
|
32
40
|
*/
|
33
41
|
buttonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'styles' | 'className' | 'disabled' | 'onClick'>;
|
34
42
|
linkProps?: never;
|
35
43
|
onClick?: ButtonHTMLAttributes<HTMLButtonElement>['onClick'];
|
36
|
-
} | {
|
37
|
-
component: ButtonComponentType.link;
|
38
|
-
/**
|
39
|
-
* Props for the link component
|
40
|
-
*/
|
41
|
-
linkProps: Omit<LinkProps, 'children' | 'styles' | 'className' | 'onClick'>;
|
42
|
-
buttonProps?: never;
|
43
|
-
onClick?: LinkProps['onClick'];
|
44
44
|
}) & {
|
45
45
|
/**
|
46
46
|
* Variant of the button
|
@@ -86,6 +86,10 @@ export type ButtonProps = ({
|
|
86
86
|
* @default false
|
87
87
|
*/
|
88
88
|
isOpacityHoverChild?: boolean;
|
89
|
+
/**
|
90
|
+
* If provided, the button is clicked automatically after the pre-defined time
|
91
|
+
*/
|
92
|
+
triggerAutoClickTimestamp?: number | null;
|
89
93
|
} & ({
|
90
94
|
/**
|
91
95
|
* If true, the tooltip is shown for the button
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { ButtonProps } from './types';
|
2
2
|
export declare const getButtonIconClassName: ({ size, icon }: Pick<ButtonProps, "size" | "icon">) => string;
|
3
3
|
export declare const getButtonLoaderSize: ({ size, icon }: Pick<ButtonProps, "size" | "icon">) => number;
|
4
|
-
export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, icon, }: Pick<ButtonProps, "variant" | "size" | "style" | "isLoading" | "icon">
|
4
|
+
export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, icon, isAutoTriggerActive, }: Required<Pick<ButtonProps, "variant" | "size" | "style" | "isLoading" | "icon"> & {
|
5
|
+
isAutoTriggerActive: boolean;
|
6
|
+
}>) => string;
|
@@ -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;
|
@@ -423,7 +423,6 @@ export interface DeploymentTemplateHistoryType {
|
|
423
423
|
baseTemplateConfiguration: DeploymentHistoryDetail;
|
424
424
|
previousConfigAvailable: boolean;
|
425
425
|
rootClassName?: string;
|
426
|
-
codeEditorKey?: React.Key;
|
427
426
|
}
|
428
427
|
export interface DeploymentHistoryDetailRes extends ResponseType {
|
429
428
|
result?: DeploymentHistoryDetail;
|
@@ -1,7 +1,6 @@
|
|
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.
|
5
4
|
* It also supports a callback when the transition ends.
|
6
5
|
*/
|
7
6
|
export declare const Collapse: ({ expand, onTransitionEnd, children }: CollapseProps) => JSX.Element;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { CustomInputProps } from './types';
|
2
|
+
declare const CustomInput: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, type, autoFocus, endIconButtonConfig, labelTippyCustomizedConfig, labelTooltipConfig, ...props }: CustomInputProps) => JSX.Element;
|
3
|
+
export default CustomInput;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
2
|
+
import { ComponentSizeType } from '../../constants';
|
3
|
+
import { FormFieldWrapperProps } from '../FormFieldWrapper';
|
4
|
+
import { ButtonComponentType, ButtonProps } from '../Button';
|
5
|
+
export interface CustomInputProps extends Omit<FormFieldWrapperProps, 'children' | 'inputId'>, Pick<InputHTMLAttributes<HTMLInputElement>, 'onBlur' | 'disabled' | 'autoFocus' | 'onFocus' | 'onKeyDown'>, Required<Pick<InputHTMLAttributes<HTMLInputElement>, 'placeholder' | 'onChange' | 'value' | 'name'>> {
|
6
|
+
/**
|
7
|
+
* If false, the input is not trimmed on blur
|
8
|
+
*
|
9
|
+
* @default true
|
10
|
+
*/
|
11
|
+
shouldTrim?: boolean;
|
12
|
+
/**
|
13
|
+
* Size of the textarea
|
14
|
+
*
|
15
|
+
* @default ComponentSizeType.large
|
16
|
+
*/
|
17
|
+
size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
|
18
|
+
/**
|
19
|
+
* Type for the input
|
20
|
+
*
|
21
|
+
* Note: For password field, use PasswordField component
|
22
|
+
*
|
23
|
+
* @default 'text'
|
24
|
+
*/
|
25
|
+
type?: Exclude<InputHTMLAttributes<HTMLInputElement>['type'], 'password'>;
|
26
|
+
/**
|
27
|
+
* End icon button configuration
|
28
|
+
*/
|
29
|
+
endIconButtonConfig?: Required<Pick<ButtonProps<ButtonComponentType.button>, 'icon' | 'onClick' | 'ariaLabel'>> & Pick<ButtonProps<ButtonComponentType.button>, 'disabled' | 'showAriaLabelInTippy' | 'style'>;
|
30
|
+
}
|
31
|
+
export interface PasswordFieldProps extends Omit<CustomInputProps, 'endIconButtonConfig' | 'type'> {
|
32
|
+
/**
|
33
|
+
* If true, the value is cleared & default placeholder is shown on blur
|
34
|
+
*/
|
35
|
+
shouldShowDefaultPlaceholderOnBlur: boolean;
|
36
|
+
}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { FormFieldWrapperProps } from './types';
|
2
|
+
declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, labelTippyCustomizedConfig, labelTooltipConfig, }: Required<FormFieldWrapperProps>) => JSX.Element;
|
3
|
+
export default FormFieldWrapper;
|