@devtron-labs/devtron-fe-common-lib 0.0.68-beta-7 → 0.0.68-beta-9

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,3 +1,3 @@
1
1
  import { APIResponseHandlerProps } from './types';
2
- declare const APIResponseHandler: ({ isLoading, progressingProps, error, notAuthorized, notFoundText, reloadProps, children, }: APIResponseHandlerProps) => JSX.Element;
2
+ declare const APIResponseHandler: ({ isLoading, progressingProps, customLoader, error, notAuthorized, notFoundText, reloadProps, genericSectionErrorProps, children, }: APIResponseHandlerProps) => JSX.Element;
3
3
  export default APIResponseHandler;
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { GenericEmptyStateType, ProgressingProps, ReloadType, ServerErrors } from '../../../Common';
3
+ import { GenericSectionErrorStateProps } from '../GenericSectionErrorState/types';
3
4
  export interface EmptyPageTextType {
4
5
  title?: GenericEmptyStateType['title'];
5
6
  subTitle?: GenericEmptyStateType['subTitle'];
@@ -13,6 +14,10 @@ export interface APIResponseHandlerProps {
13
14
  * If loading is true, would load send these props to Progressing component
14
15
  */
15
16
  progressingProps?: ProgressingProps;
17
+ /**
18
+ * If given, would show this component instead of default Progressing component
19
+ */
20
+ customLoader?: ReactNode;
16
21
  /**
17
22
  * If true and isLoading is false would show default Reload component
18
23
  * In case error code is 404 show default 404 page using GenericEmptyState
@@ -30,6 +35,10 @@ export interface APIResponseHandlerProps {
30
35
  * If given, on Error, would load these props
31
36
  */
32
37
  reloadProps?: ReloadType;
38
+ /**
39
+ * If given, would show this component instead of default Error component
40
+ */
41
+ genericSectionErrorProps?: GenericSectionErrorStateProps;
33
42
  /**
34
43
  * If no Error and no Loading, would load this component
35
44
  */
@@ -1,3 +1,3 @@
1
1
  import { GenericSectionErrorStateProps } from './types';
2
- declare const GenericSectionErrorState: ({ reload, withBorder }: GenericSectionErrorStateProps) => JSX.Element;
2
+ declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, }: GenericSectionErrorStateProps) => JSX.Element;
3
3
  export default GenericSectionErrorState;
@@ -2,11 +2,31 @@ export interface GenericSectionErrorStateProps {
2
2
  /**
3
3
  * Handler for reloading the section
4
4
  */
5
- reload: () => void;
5
+ reload?: () => void;
6
6
  /**
7
7
  * If true, border is added to the section
8
8
  *
9
9
  * @default false
10
10
  */
11
11
  withBorder?: boolean;
12
+ /**
13
+ * @default 'Failed to load'
14
+ */
15
+ title?: string;
16
+ /**
17
+ * @default 'We could not load the information on this page.'
18
+ */
19
+ subTitle?: string;
20
+ /**
21
+ * @default 'Please reload or try again later'
22
+ */
23
+ description?: string;
24
+ /**
25
+ * @default 'Reload'
26
+ */
27
+ buttonText?: string;
28
+ /**
29
+ * to be applied on parent div
30
+ */
31
+ rootClassName?: string;
12
32
  }
@@ -18,4 +18,5 @@ export declare const highlightSearchText: ({ searchText, text, highlightClasses
18
18
  export declare const preventBodyScroll: (lock: boolean) => void;
19
19
  export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[]) => boolean;
20
20
  export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
21
+ export declare const caseInsensitiveStringComparator: (a: string, b: string) => number;
21
22
  export {};