@devtron-labs/devtron-fe-common-lib 1.14.1-pre-5 → 1.14.1-pre-6

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.
@@ -1,6 +1,6 @@
1
1
  import { CodeEditorProps } from './types';
2
2
  declare const CodeEditor: {
3
- <DiffView extends boolean = false>({ theme, value: propValue, originalValue, modifiedValue, isOriginalModifiable, mode, noParsing, children, tabSize, height, shebang, onChange, onOriginalValueChange, onModifiedValueChange, placeholder, diffView, loading, customLoader, validatorSchema, schemaURI, cleanData, onBlur, onFocus, autoFocus, collapseUnchangedDiffView, ...resProps }: CodeEditorProps<DiffView>): JSX.Element;
3
+ <DiffView extends boolean = false>({ theme, value: propValue, originalValue, modifiedValue, isOriginalModifiable, mode, noParsing, children, tabSize, height, shebang, onChange, onOriginalValueChange, onModifiedValueChange, placeholder, diffView, loading, customLoader, validatorSchema, schemaURI, cleanData, onBlur, onFocus, autoFocus, onSearchPanelOpen, onSearchBarAction, collapseUnchangedDiffView, ...resProps }: CodeEditorProps<DiffView>): JSX.Element;
4
4
  Clipboard: () => JSX.Element;
5
5
  Header: ({ children, className, hideDefaultSplitHeader }: import('./types').CodeEditorHeaderProps) => JSX.Element;
6
6
  Warning: ({ className, text, children }: import('./types').CodeEditorStatusBarProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import { EditorView, Panel } from '@uiw/react-codemirror';
2
- export declare const codeEditorFindReplace: (view: EditorView) => Panel;
2
+ import { CodeEditorProps } from '../types';
3
+ export declare const getCodeEditorFindReplace: (onSearchBarAction: CodeEditorProps["onSearchBarAction"]) => (view: EditorView) => Panel;
@@ -58,6 +58,11 @@ export type CodeEditorProps<DiffView extends boolean = false> = {
58
58
  disableSearch?: boolean;
59
59
  diffView?: DiffView;
60
60
  theme?: AppThemeType;
61
+ onSearchPanelOpen?: () => void;
62
+ /**
63
+ * This method is triggered when user types something in the search/replace bar or applies a search or replace action.
64
+ */
65
+ onSearchBarAction?: () => void;
61
66
  } & CodeEditorPropsBasedOnDiffView<DiffView>;
62
67
  export interface GetCodeEditorHeightReturnType {
63
68
  codeEditorParentClassName: string;
@@ -69,7 +74,7 @@ export type HoverTexts = {
69
74
  typeInfo: string;
70
75
  };
71
76
  export type FindReplaceQuery = Partial<Pick<SearchQuery, 'search' | 'wholeWord' | 'regexp' | 'replace' | 'caseSensitive'>>;
72
- export interface FindReplaceProps {
77
+ export interface FindReplaceProps extends Pick<CodeEditorProps, 'onSearchBarAction'> {
73
78
  view: EditorView;
74
79
  /** Default value for Search Query state. */
75
80
  defaultQuery: SearchQuery;
@@ -97,6 +97,7 @@ export declare const iconMap: {
97
97
  'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
98
98
  'ic-k3s': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
99
99
  'ic-k8s-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
100
+ 'ic-key-enter': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
100
101
  'ic-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
101
102
  'ic-kind': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
102
103
  'ic-laptop': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -101,4 +101,5 @@ export declare const deriveBorderRadiusAndBorderClassFromConfig: ({ borderConfig
101
101
  export declare const getClassNameForStickyHeaderWithShadow: (isStuck: boolean, topClassName?: string) => string;
102
102
  export declare const clearCookieOnLogout: () => void;
103
103
  export declare const getAppDetailsURL: (appId: number | string, envId?: number | string) => string;
104
+ export declare const smoothScrollToTop: (scrollContainer: HTMLElement, targetPosition: number) => import('framer-motion').AnimationPlaybackControls;
104
105
  export {};
@@ -429,3 +429,4 @@ export declare const VARIANT_TO_BORDER_MAP: Record<InfoBlockProps['variant'], st
429
429
  export declare const DEPLOYMENT_STAGE_TO_NODE_MAP: Readonly<Record<DeploymentStageType, DeploymentNodeType>>;
430
430
  export declare const APP_DETAILS_FALLBACK_POLLING_INTERVAL = 30000;
431
431
  export declare const PROGRESSING_DEPLOYMENT_STATUS_POLLING_INTERVAL = 10000;
432
+ export declare const CUBIC_BEZIER_CURVE: [number, number, number, number];
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
2
+ <path stroke="#3B444C" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M8.643 9.714 3.5 14.857m0 0L8.643 20M3.5 14.857h10.857a4.571 4.571 0 0 0 4.572-4.571V4" vector-effect="non-scaling-stroke"/>
3
+ </svg>