@devtron-labs/devtron-fe-common-lib 1.5.13 → 1.5.14

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.
Files changed (60) hide show
  1. package/dist/@code-editor-DPKpPiDK.js +41877 -0
  2. package/dist/{@common-rjsf-CCiAa1v9.js → @common-rjsf-D0VNXpZS.js} +79 -83
  3. package/dist/{@framer-motion-CbfcgbXI.js → @framer-motion-CpA7HTl-.js} +70 -70
  4. package/dist/{@react-dates-CHLhA4kl.js → @react-dates-CaRoxjcN.js} +14 -14
  5. package/dist/{@react-select-CgLj7C5f.js → @react-select-D4CIuOAx.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-Cj8etBAu.js → @react-virtualized-sticky-tree-CZZtnJ_O.js} +1 -1
  7. package/dist/@vendor-CKSERKp7.js +42519 -0
  8. package/dist/Common/ClipboardButton/index.d.ts +1 -0
  9. package/dist/Common/CodeEditor/CodeEditor.components.d.ts +11 -0
  10. package/dist/Common/CodeEditor/CodeEditor.constants.d.ts +7 -0
  11. package/dist/Common/CodeEditor/CodeEditor.context.d.ts +3 -0
  12. package/dist/Common/CodeEditor/CodeEditor.d.ts +13 -3
  13. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +3 -47
  14. package/dist/Common/CodeEditor/CodeEditor.theme.d.ts +1 -0
  15. package/dist/Common/CodeEditor/CodeEditorRenderer.d.ts +2 -0
  16. package/dist/Common/CodeEditor/Extensions/findAndReplace.d.ts +2 -0
  17. package/dist/Common/CodeEditor/Extensions/index.d.ts +3 -0
  18. package/dist/Common/CodeEditor/Extensions/readOnlyTooltip.d.ts +6 -0
  19. package/dist/Common/CodeEditor/Extensions/yamlParseLinter.d.ts +3 -0
  20. package/dist/Common/CodeEditor/index.d.ts +1 -1
  21. package/dist/Common/CodeEditor/types.d.ts +83 -76
  22. package/dist/Common/CodeEditor/utils.d.ts +13 -3
  23. package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +1 -1
  24. package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
  25. package/dist/Common/Types.d.ts +0 -13
  26. package/dist/Common/index.d.ts +0 -1
  27. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.d.ts +1 -1
  28. package/dist/Shared/Components/CICDHistory/types.d.ts +0 -1
  29. package/dist/Shared/Components/Collapse/Collapse.d.ts +0 -1
  30. package/dist/Shared/Components/EditableTextArea/types.d.ts +0 -1
  31. package/dist/Shared/Components/FormFieldWrapper/FormFieldInfo.d.ts +3 -0
  32. package/dist/Shared/Components/FormFieldWrapper/FormFieldLabel.d.ts +3 -0
  33. package/dist/Shared/Components/FormFieldWrapper/FormFieldWrapper.d.ts +3 -0
  34. package/dist/Shared/Components/FormFieldWrapper/index.d.ts +3 -0
  35. package/dist/Shared/Components/FormFieldWrapper/types.d.ts +75 -0
  36. package/dist/Shared/Components/FormFieldWrapper/utils.d.ts +18 -0
  37. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  38. package/dist/Shared/Components/SelectPicker/type.d.ts +2 -13
  39. package/dist/Shared/Components/Textarea/Textarea.component.d.ts +3 -0
  40. package/dist/Shared/Components/Textarea/constants.d.ts +4 -0
  41. package/dist/Shared/Components/Textarea/index.d.ts +2 -0
  42. package/dist/Shared/Components/Textarea/types.d.ts +17 -0
  43. package/dist/Shared/Components/ThemeSwitcher/index.d.ts +1 -0
  44. package/dist/Shared/Components/index.d.ts +2 -0
  45. package/dist/Shared/constants.d.ts +4 -0
  46. package/dist/Shared/types.d.ts +8 -0
  47. package/dist/assets/@code-editor.css +1 -1
  48. package/dist/assets/ic-match-case.702186fe.svg +3 -0
  49. package/dist/assets/ic-match-word.991dea5a.svg +3 -0
  50. package/dist/assets/ic-replace-all-text.7ebbab01.svg +3 -0
  51. package/dist/assets/ic-replace-text.5de817d2.svg +3 -0
  52. package/dist/assets/{ic-warning.10bcf8bd.svg → ic-warning.a842ba2a.svg} +1 -1
  53. package/dist/index.js +601 -599
  54. package/package.json +14 -7
  55. package/dist/@code-editor-DpYDAAJZ.js +0 -23000
  56. package/dist/@monaco-editor-CVagbUeH.js +0 -138960
  57. package/dist/@vendor-ROKJESOw.js +0 -22734
  58. package/dist/Common/ResizableTextarea.d.ts +0 -3
  59. package/dist/assets/@monaco-editor.css +0 -1
  60. 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[];
@@ -0,0 +1,3 @@
1
+ import { CodeEditorContextProps } from './types';
2
+ export declare const CodeEditorContext: import('react').Context<CodeEditorContextProps>;
3
+ export declare const useCodeEditorContext: () => CodeEditorContextProps;
@@ -1,4 +1,14 @@
1
- import { default as React } from 'react';
2
- import { CodeEditorComposition, CodeEditorInterface } from './types';
3
- declare const CodeEditor: React.FC<CodeEditorInterface> & CodeEditorComposition;
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 { 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
- };
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, theme, value, defaultValue, diffView, noParsing, tabSize, appTheme, }: CodeEditorInitialValueType) => CodeEditorState;
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;
@@ -0,0 +1,2 @@
1
+ import { EditorView, Panel } from '@uiw/react-codemirror';
2
+ export declare const codeEditorFindReplace: (view: EditorView) => Panel;
@@ -0,0 +1,3 @@
1
+ export * from './yamlParseLinter';
2
+ export * from './readOnlyTooltip';
3
+ export * from './findAndReplace';
@@ -0,0 +1,6 @@
1
+ import { Extension } from '@uiw/react-codemirror';
2
+ /**
3
+ * The read-only tooltip extension for CodeMirror. \
4
+ * Displays a tooltip at the cursor position when the editor is read-only and focused.
5
+ */
6
+ export declare const readOnlyTooltip: Extension;
@@ -0,0 +1,3 @@
1
+ import { EditorView } from '@uiw/react-codemirror';
2
+ import { Diagnostic } from '@codemirror/lint';
3
+ export declare const yamlParseLinter: () => (view: EditorView) => Diagnostic[];
@@ -1,2 +1,2 @@
1
1
  export { default as CodeEditor } from './CodeEditor';
2
- export * from './types';
2
+ export type { CodeEditorProps } from './types';
@@ -1,100 +1,107 @@
1
- import { AppThemeType } from '../../Shared/Providers';
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
- export interface InformationBarProps {
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?: React.ReactNode;
11
+ children?: ReactNode;
7
12
  }
8
- export declare enum CodeEditorThemesKeys {
9
- vsDarkDT = "vs-dark--dt",
10
- vs = "vs",
11
- networkStatusInterface = "network-status-interface"
13
+ export interface CodeEditorHeaderProps {
14
+ className?: string;
15
+ hideDefaultSplitHeader?: boolean;
16
+ children?: ReactNode;
12
17
  }
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;
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, disable the in-built search of monaco editor
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 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>;
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 ActionTypes = 'changeLanguage' | 'setDiff' | 'setTheme' | 'setCode' | 'setDefaultCode' | 'setHeight';
73
- export interface Action {
74
- type: ActionTypes;
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<CodeEditorBaseInterface, 'theme'> {
78
- mode: string;
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
- mode: MODES;
88
- diffMode: boolean;
89
- theme: CodeEditorThemesKeys;
90
- code: string;
91
- defaultCode: string;
92
- noParsing: boolean;
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 declare enum CodeEditorActionTypes {
95
- reInit = "reInit",
96
- submitLoading = "submitLoading",
97
- overrideLoading = "overrideLoading",
98
- success = "success"
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 { AppThemeType } from '../../Shared/Providers';
2
- import { CodeEditorInterface } from './types';
3
- export declare const getCodeEditorThemeFromAppTheme: (editorTheme: CodeEditorInterface["theme"], appTheme: AppThemeType) => CodeEditorInterface["theme"];
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[];
@@ -7,7 +7,7 @@ export declare const KEYBOARD_KEYS_MAP: {
7
7
  readonly E: "E";
8
8
  readonly R: "R";
9
9
  readonly K: "K";
10
- readonly Escape: "Escape";
10
+ readonly Escape: "Esc";
11
11
  readonly Enter: "↩";
12
12
  };
13
13
  export type SupportedKeyboardKeysType = keyof typeof KEYBOARD_KEYS_MAP;
@@ -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" | "Escape" | "Control" | "Shift" | "Meta" | "Enter")[];
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;
@@ -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;
@@ -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';
@@ -1,3 +1,3 @@
1
1
  import { DeploymentTemplateHistoryType } from '../types';
2
- declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, rootClassName, codeEditorKey, }: DeploymentTemplateHistoryType) => JSX.Element;
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;
@@ -10,7 +10,6 @@ interface ValidationRule<T> {
10
10
  }
11
11
  export interface EditableTextAreaProps {
12
12
  placeholder?: string;
13
- rows: number;
14
13
  updateContent: (value: string) => Promise<void>;
15
14
  initialText?: string;
16
15
  validations?: {
@@ -0,0 +1,3 @@
1
+ import { FormFieldInfoProps } from './types';
2
+ declare const FormFieldInfo: ({ error, helperText, warningText, inputId }: FormFieldInfoProps) => JSX.Element;
3
+ export default FormFieldInfo;
@@ -0,0 +1,3 @@
1
+ import { FormFieldLabelProps } from './types';
2
+ declare const FormFieldLabel: ({ label, inputId, required, layout }: FormFieldLabelProps) => JSX.Element;
3
+ export default FormFieldLabel;
@@ -0,0 +1,3 @@
1
+ import { FormFieldWrapperProps } from './types';
2
+ declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, }: Required<FormFieldWrapperProps>) => JSX.Element;
3
+ export default FormFieldWrapper;
@@ -0,0 +1,3 @@
1
+ export { default as FormFieldWrapper } from './FormFieldWrapper';
2
+ export type { FormFieldWrapperProps } from './types';
3
+ export { getFormFieldAriaAttributes } from './utils';
@@ -0,0 +1,75 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ export type LabelOrAriaLabelType = {
3
+ label: ReactNode;
4
+ ariaLabel?: never;
5
+ } | {
6
+ label?: never;
7
+ ariaLabel: string;
8
+ };
9
+ export type FormFieldLabelProps = LabelOrAriaLabelType & {
10
+ /**
11
+ * If true, the field is required and * is shown with the label
12
+ */
13
+ required?: boolean;
14
+ /**
15
+ * Id of the input element
16
+ */
17
+ inputId: string;
18
+ /**
19
+ * Layout of the field
20
+ */
21
+ layout?: 'row' | 'column';
22
+ };
23
+ export interface FormFieldInfoProps extends Pick<FormFieldLabelProps, 'inputId'> {
24
+ /**
25
+ * Error message for the field
26
+ */
27
+ error?: ReactNode;
28
+ /**
29
+ * Helper text for the field
30
+ */
31
+ helperText?: ReactNode;
32
+ /**
33
+ * Warning message for the field
34
+ */
35
+ warningText?: ReactNode;
36
+ }
37
+ export interface FormInfoItemProps {
38
+ id: FormFieldLabelProps['inputId'];
39
+ text: FormFieldInfoProps['error'];
40
+ textClass: string;
41
+ icon: ReactElement;
42
+ }
43
+ export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label' | 'required' | 'ariaLabel' | 'layout'>, FormFieldInfoProps {
44
+ /**
45
+ * If true, the field takes the full width of the parent
46
+ */
47
+ fullWidth?: boolean;
48
+ children: ReactElement;
49
+ borderRadiusConfig?: {
50
+ /**
51
+ * If false, the top border radius is not applied
52
+ *
53
+ * @default true
54
+ */
55
+ top?: boolean;
56
+ /**
57
+ * If false, the right border radius is not applied
58
+ *
59
+ * @default true
60
+ */
61
+ right?: boolean;
62
+ /**
63
+ * If false, the bottom border radius is not applied
64
+ *
65
+ * @default true
66
+ */
67
+ bottom?: boolean;
68
+ /**
69
+ * If false, the left border radius is not applied
70
+ *
71
+ * @default true
72
+ */
73
+ left?: boolean;
74
+ };
75
+ }
@@ -0,0 +1,18 @@
1
+ import { FormFieldInfoProps, FormFieldLabelProps, FormFieldWrapperProps } from './types';
2
+ export declare const getFormErrorElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
3
+ export declare const getFormLabelElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
4
+ export declare const getFormHelperTextElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
5
+ export declare const getFormFieldAriaAttributes: ({ inputId, label, ariaLabel, required, error, helperText, }: Required<Pick<FormFieldLabelProps, "label" | "ariaLabel" | "required" | "inputId"> & Pick<FormFieldInfoProps, "error" | "helperText">>) => {
6
+ 'aria-labelledby': string;
7
+ 'aria-errormessage'?: string;
8
+ 'aria-invalid'?: boolean;
9
+ 'aria-describedby'?: string;
10
+ 'aria-required': boolean;
11
+ } | {
12
+ 'aria-label': string;
13
+ 'aria-errormessage'?: string;
14
+ 'aria-invalid'?: boolean;
15
+ 'aria-describedby'?: string;
16
+ 'aria-required': boolean;
17
+ };
18
+ export declare const getFormFieldBorderClassName: (borderRadiusConfig?: FormFieldWrapperProps["borderRadiusConfig"]) => string;
@@ -134,5 +134,5 @@ import { SelectPickerProps } from './type';
134
134
  * />
135
135
  * ```
136
136
  */
137
- declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
137
+ declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderRadiusConfig, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
138
138
  export default SelectPicker;
@@ -6,6 +6,7 @@ import { GroupBase, GroupHeadingProps, Props as ReactSelectProps, SelectInstance
6
6
  import { CreatableProps } from 'react-select/creatable';
7
7
  import { TooltipProps } from '@Common/Tooltip/types';
8
8
  import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
9
+ import { FormFieldWrapperProps } from '../FormFieldWrapper/types';
9
10
  export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
10
11
  /**
11
12
  * Description to be displayed for the option
@@ -79,19 +80,7 @@ export declare enum SelectPickerVariantType {
79
80
  DEFAULT = "default",
80
81
  BORDER_LESS = "border-less"
81
82
  }
82
- export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue' | 'filterOption'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon' | 'renderOptionsFooter' | 'shouldRenderTextArea'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption' | 'formatCreateLabel' | 'menuPortalTarget'>> & {
83
- /**
84
- * Error message for the select
85
- */
86
- error?: ReactNode;
87
- /**
88
- * Info text for the select, if any
89
- */
90
- helperText?: ReactNode;
91
- /**
92
- * Label for the select. if required is added, the corresponding * is also added
93
- */
94
- label?: ReactNode;
83
+ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue' | 'filterOption'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon' | 'renderOptionsFooter' | 'shouldRenderTextArea'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption' | 'formatCreateLabel' | 'menuPortalTarget'>> & Omit<FormFieldWrapperProps, 'children'> & {
95
84
  /**
96
85
  * Custom selected options count for use cases like filters
97
86
  */
@@ -0,0 +1,3 @@
1
+ import { TextareaProps } from './types';
2
+ declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, ...props }: TextareaProps) => JSX.Element;
3
+ export default Textarea;
@@ -0,0 +1,4 @@
1
+ export declare const TEXTAREA_CONSTRAINTS: {
2
+ MIN_HEIGHT: number;
3
+ AUTO_EXPANSION_MAX_HEIGHT: number;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Textarea } from './Textarea.component';
2
+ export type { TextareaProps } from './types';
@@ -0,0 +1,17 @@
1
+ import { TextareaHTMLAttributes } from 'react';
2
+ import { ComponentSizeType } from '../../constants';
3
+ import { FormFieldWrapperProps } from '../FormFieldWrapper';
4
+ export interface TextareaProps extends Omit<FormFieldWrapperProps, 'children' | 'inputId'>, Pick<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onBlur' | 'disabled' | 'autoFocus' | 'onFocus'>, Required<Pick<TextareaHTMLAttributes<HTMLTextAreaElement>, 'placeholder' | 'onChange' | 'value' | 'name'>> {
5
+ /**
6
+ * If false, the input is not trimmed on blur
7
+ *
8
+ * @default true
9
+ */
10
+ shouldTrim?: boolean;
11
+ /**
12
+ * Size of the textarea
13
+ *
14
+ * @default ComponentSizeType.large
15
+ */
16
+ size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
17
+ }
@@ -1 +1,2 @@
1
1
  export { default as ThemeSwitcher } from './ThemeSwitcher.component';
2
+ export type { ThemeSwitcherProps } from './types';
@@ -55,6 +55,8 @@ export * from './ToggleResolveScopedVariables';
55
55
  export * from './BulkOperations';
56
56
  export * from './WorkflowOptionsModal';
57
57
  export * from './VirtualizedList';
58
+ export * from './Textarea';
59
+ export * from './ThemeSwitcher';
58
60
  export * from './TargetPlatforms';
59
61
  export * from './UnsavedChanges';
60
62
  export * from './UnsavedChangesDialog';