@devtron-labs/devtron-fe-common-lib 0.0.7-beta-3 → 0.0.7-beta-5
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/Common/BreadCrumb/BreadCrumb.d.ts +1 -29
- package/dist/Common/BreadCrumb/Types.d.ts +28 -0
- package/dist/Common/Checkbox.d.ts +1 -14
- package/dist/Common/Dialogs/ConfirmationDialog.d.ts +5 -16
- package/dist/Common/Dialogs/Types.d.ts +17 -0
- package/dist/Common/EmptyState/GenericEmptyState.d.ts +2 -15
- package/dist/Common/InfoColorBar/InfoColourbar.d.ts +2 -15
- package/dist/Common/Modals/Modal.d.ts +2 -9
- package/dist/Common/MultiSelectCustomization.d.ts +1 -2
- package/dist/Common/PopupMenu.d.ts +4 -21
- package/dist/Common/Progressing.d.ts +2 -11
- package/dist/Common/RadioGroup.d.ts +1 -10
- package/dist/Common/Reload.d.ts +2 -4
- package/dist/Common/TippyCustomized.d.ts +2 -30
- package/dist/Common/Types.d.ts +127 -0
- package/dist/index.js +15 -15
- package/package.json +1 -1
- package/src/Common/BreadCrumb/BreadCrumb.tsx +1 -30
- package/src/Common/BreadCrumb/Types.ts +30 -0
- package/src/Common/Checkbox.tsx +1 -15
- package/src/Common/Dialogs/ConfirmationDialog.tsx +6 -4
- package/src/Common/Dialogs/Types.ts +18 -0
- package/src/Common/EmptyState/GenericEmptyState.tsx +3 -22
- package/src/Common/EmptyState/emptyState.scss +2 -2
- package/src/Common/Error.tsx +1 -1
- package/src/Common/InfoColorBar/InfoColourbar.tsx +2 -16
- package/src/Common/Modals/Modal.tsx +3 -1
- package/src/Common/MultiSelectCustomization.tsx +1 -1
- package/src/Common/PopupMenu.tsx +19 -6
- package/src/Common/Progressing.tsx +1 -10
- package/src/Common/RadioGroup.tsx +1 -12
- package/src/Common/Reload.tsx +15 -10
- package/src/Common/TippyCustomized.tsx +2 -30
- package/src/Common/Types.ts +139 -0
|
@@ -1,33 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Breadcrumbs, UseBreadcrumbOptionalProps, UseBreadcrumbState } from './Types';
|
|
2
3
|
export declare const BreadcrumbContext: React.Context<any>;
|
|
3
|
-
interface Breadcrumb {
|
|
4
|
-
to: string;
|
|
5
|
-
name: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
interface UseBreadcrumbState {
|
|
9
|
-
breadcrumbs: Breadcrumb[];
|
|
10
|
-
setCrumb: (props: {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}) => void;
|
|
13
|
-
resetCrumb: (props: string[]) => void;
|
|
14
|
-
}
|
|
15
|
-
interface AdvancedAlias {
|
|
16
|
-
component: any;
|
|
17
|
-
linked: boolean;
|
|
18
|
-
}
|
|
19
|
-
interface UseBreadcrumbProps {
|
|
20
|
-
sep?: string;
|
|
21
|
-
alias?: {
|
|
22
|
-
[key: string]: AdvancedAlias | any;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
type UseBreadcrumbOptionalProps = UseBreadcrumbProps | null;
|
|
26
4
|
export declare function useBreadcrumb(props?: UseBreadcrumbOptionalProps, deps?: any[]): UseBreadcrumbState;
|
|
27
|
-
interface Breadcrumbs {
|
|
28
|
-
breadcrumbs: Breadcrumb[];
|
|
29
|
-
sep?: string;
|
|
30
|
-
className?: string;
|
|
31
|
-
}
|
|
32
5
|
export declare const BreadCrumb: React.FC<Breadcrumbs>;
|
|
33
|
-
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface Breadcrumb {
|
|
2
|
+
to: string;
|
|
3
|
+
name: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UseBreadcrumbState {
|
|
7
|
+
breadcrumbs: Breadcrumb[];
|
|
8
|
+
setCrumb: (props: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}) => void;
|
|
11
|
+
resetCrumb: (props: string[]) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface AdvancedAlias {
|
|
14
|
+
component: any;
|
|
15
|
+
linked: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface UseBreadcrumbProps {
|
|
18
|
+
sep?: string;
|
|
19
|
+
alias?: {
|
|
20
|
+
[key: string]: AdvancedAlias | any;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface Breadcrumbs {
|
|
24
|
+
breadcrumbs: Breadcrumb[];
|
|
25
|
+
sep?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export type UseBreadcrumbOptionalProps = UseBreadcrumbProps | null;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
|
|
3
|
-
CHECKED = "CHECKED",
|
|
4
|
-
INTERMEDIATE = "INTERMEDIATE"
|
|
5
|
-
}
|
|
6
|
-
export interface CheckboxProps {
|
|
7
|
-
onChange: (event: any) => void;
|
|
8
|
-
isChecked: boolean;
|
|
9
|
-
value: 'CHECKED' | 'INTERMEDIATE';
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
tabIndex?: number;
|
|
12
|
-
rootClassName?: string;
|
|
13
|
-
onClick?: (event: any) => void;
|
|
14
|
-
id?: string;
|
|
15
|
-
}
|
|
2
|
+
import { CheckboxProps } from './Types';
|
|
16
3
|
export declare class Checkbox extends Component<CheckboxProps> {
|
|
17
4
|
render(): JSX.Element;
|
|
18
5
|
}
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
children: any;
|
|
5
|
-
}): JSX.Element;
|
|
2
|
+
import { ConfirmationDialogBodyType, ConfirmationDialogButtonGroupType, ConfirmationDialogIconType, ConfirmationDialogType } from './Types';
|
|
3
|
+
declare function ConfirmationDialog({ className, children }: ConfirmationDialogType): JSX.Element;
|
|
6
4
|
declare namespace ConfirmationDialog {
|
|
7
|
-
var Icon: ({ src, className }:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}) => JSX.Element;
|
|
11
|
-
var Body: ({ title, subtitle, children }: {
|
|
12
|
-
title: any;
|
|
13
|
-
subtitle?: any;
|
|
14
|
-
children?: any;
|
|
15
|
-
}) => JSX.Element;
|
|
16
|
-
var ButtonGroup: ({ children }: {
|
|
17
|
-
children: any;
|
|
18
|
-
}) => JSX.Element;
|
|
5
|
+
var Icon: ({ src, className }: ConfirmationDialogIconType) => JSX.Element;
|
|
6
|
+
var Body: ({ title, subtitle, children }: ConfirmationDialogBodyType) => JSX.Element;
|
|
7
|
+
var ButtonGroup: ({ children }: ConfirmationDialogButtonGroupType) => JSX.Element;
|
|
19
8
|
}
|
|
20
9
|
export default ConfirmationDialog;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
export interface DeleteDialogProps {
|
|
2
3
|
title: string;
|
|
3
4
|
description?: string;
|
|
@@ -13,3 +14,19 @@ export interface ForceDeleteDialogType {
|
|
|
13
14
|
forceDeleteDialogTitle: string;
|
|
14
15
|
forceDeleteDialogMessage: string;
|
|
15
16
|
}
|
|
17
|
+
export interface ConfirmationDialogType {
|
|
18
|
+
className?: string;
|
|
19
|
+
children: any;
|
|
20
|
+
}
|
|
21
|
+
export interface ConfirmationDialogIconType {
|
|
22
|
+
src: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ConfirmationDialogBodyType {
|
|
26
|
+
title: string;
|
|
27
|
+
subtitle?: ReactNode;
|
|
28
|
+
children?: any;
|
|
29
|
+
}
|
|
30
|
+
export interface ConfirmationDialogButtonGroupType {
|
|
31
|
+
children: any;
|
|
32
|
+
}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GenericEmptyStateType } from '../Types';
|
|
2
3
|
import './emptyState.scss';
|
|
3
|
-
interface GenericEmptyStateType {
|
|
4
|
-
title: ReactNode;
|
|
5
|
-
image?: any;
|
|
6
|
-
classname?: string;
|
|
7
|
-
subTitle?: ReactNode;
|
|
8
|
-
isButtonAvailable?: boolean;
|
|
9
|
-
styles?: CSSProperties;
|
|
10
|
-
heightToDeduct?: number;
|
|
11
|
-
imageType?: string;
|
|
12
|
-
renderButton?: () => JSX.Element;
|
|
13
|
-
imageClassName?: string;
|
|
14
|
-
children?: ReactNode;
|
|
15
|
-
noImage?: boolean;
|
|
16
|
-
}
|
|
17
4
|
declare function GenericEmptyState({ title, image, subTitle, isButtonAvailable, classname, styles, heightToDeduct, imageType, renderButton, imageClassName, children, noImage }: GenericEmptyStateType): JSX.Element;
|
|
18
5
|
export default GenericEmptyState;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InfoColourBarType } from '../Types';
|
|
2
3
|
import './infoColourBar.scss';
|
|
3
|
-
interface InfoColourBarType {
|
|
4
|
-
message: React.ReactNode;
|
|
5
|
-
classname: string;
|
|
6
|
-
Icon: any;
|
|
7
|
-
iconClass?: string;
|
|
8
|
-
iconSize?: number;
|
|
9
|
-
renderActionButton?: () => JSX.Element;
|
|
10
|
-
linkText?: React.ReactNode;
|
|
11
|
-
redirectLink?: string;
|
|
12
|
-
linkOnClick?: () => void;
|
|
13
|
-
linkClass?: string;
|
|
14
|
-
internalLink?: boolean;
|
|
15
|
-
styles?: CSSProperties;
|
|
16
|
-
}
|
|
17
4
|
declare function InfoColourBar({ message, classname, Icon, iconClass, iconSize, renderActionButton, linkText, redirectLink, linkOnClick, linkClass, internalLink, styles, }: InfoColourBarType): JSX.Element;
|
|
18
5
|
export default InfoColourBar;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
children: any;
|
|
5
|
-
modal?: boolean;
|
|
6
|
-
rootClassName?: string;
|
|
7
|
-
onClick?: any;
|
|
8
|
-
callbackRef?: any;
|
|
9
|
-
preventWheelDisable?: boolean;
|
|
10
|
-
}) => React.ReactPortal;
|
|
2
|
+
import { ModalType } from '../Types';
|
|
3
|
+
export declare const Modal: ({ style, children, modal, rootClassName, onClick, callbackRef, preventWheelDisable, }: ModalType) => React.ReactPortal;
|
|
@@ -16,7 +16,7 @@ export declare const multiSelectStyles: {
|
|
|
16
16
|
container: (base: any, state: any) => any;
|
|
17
17
|
valueContainer: (base: any, state: any) => any;
|
|
18
18
|
};
|
|
19
|
-
interface CustomSelect {
|
|
19
|
+
export interface CustomSelect {
|
|
20
20
|
sortSelected?: boolean;
|
|
21
21
|
options: any[];
|
|
22
22
|
onChange: (...args: any[]) => void;
|
|
@@ -35,4 +35,3 @@ interface CustomSelect {
|
|
|
35
35
|
formatOptionLabel?: (...args: any[]) => any;
|
|
36
36
|
}
|
|
37
37
|
export declare const CustomSelect: React.FC<CustomSelect>;
|
|
38
|
-
export {};
|
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
onToggleCallback?: any;
|
|
5
|
-
autoClose?: boolean;
|
|
6
|
-
autoPosition?: boolean;
|
|
7
|
-
}): any;
|
|
2
|
+
import { PopupMenuBodyType, PopupMenuButtonType, PopupMenuType } from './Types';
|
|
3
|
+
declare function PopupMenu({ children, onToggleCallback, autoClose, autoPosition, }: PopupMenuType): any;
|
|
8
4
|
declare namespace PopupMenu {
|
|
9
|
-
var Button: ({ children, disabled, rootClassName, tabIndex, onHover, isKebab, }:
|
|
10
|
-
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
rootClassName?: string;
|
|
13
|
-
tabIndex?: number;
|
|
14
|
-
onHover?: boolean;
|
|
15
|
-
isKebab?: boolean;
|
|
16
|
-
}) => JSX.Element;
|
|
17
|
-
var Body: ({ children, rootClassName, style, autoWidth, preventWheelDisable }: {
|
|
18
|
-
children?: any;
|
|
19
|
-
rootClassName?: string;
|
|
20
|
-
style?: {};
|
|
21
|
-
autoWidth?: boolean;
|
|
22
|
-
preventWheelDisable?: boolean;
|
|
23
|
-
}) => JSX.Element;
|
|
5
|
+
var Button: ({ children, disabled, rootClassName, tabIndex, onHover, isKebab, }: PopupMenuButtonType) => JSX.Element;
|
|
6
|
+
var Body: ({ children, rootClassName, style, autoWidth, preventWheelDisable, }: PopupMenuBodyType) => JSX.Element;
|
|
24
7
|
}
|
|
25
8
|
export default PopupMenu;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
pageLoader?: boolean;
|
|
4
|
-
loadingText?: string;
|
|
5
|
-
size?: number;
|
|
6
|
-
fullHeight?: boolean;
|
|
7
|
-
theme?: 'white' | 'default';
|
|
8
|
-
styles?: React.CSSProperties;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProgressingProps } from './Types';
|
|
11
3
|
export declare function Progressing({ pageLoader, size, theme, styles }: ProgressingProps): JSX.Element;
|
|
12
4
|
export declare function DetailsProgressing({ loadingText, size, fullHeight, children, styles, }: ProgressingProps): JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
|
|
3
|
-
value: string;
|
|
4
|
-
}
|
|
2
|
+
import { RadioGroupItemProps, RadioGroupProps } from './Types';
|
|
5
3
|
export declare class RadioGroupItem extends Component<RadioGroupItemProps> {
|
|
6
4
|
render(): JSX.Element;
|
|
7
5
|
}
|
|
8
|
-
export interface RadioGroupProps {
|
|
9
|
-
value: string;
|
|
10
|
-
name: string;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
onChange: (event: any) => void;
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
6
|
export declare class RadioGroup extends Component<RadioGroupProps> {
|
|
16
7
|
render(): JSX.Element;
|
|
17
8
|
}
|
package/dist/Common/Reload.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
className?: string;
|
|
5
|
-
}): JSX.Element;
|
|
2
|
+
import { ReloadType } from './Types';
|
|
3
|
+
export default function Reload({ reload, className }: ReloadType): JSX.Element;
|
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { Placement } from 'tippy.js';
|
|
1
|
+
/// <reference types="react" />
|
|
3
2
|
import 'tippy.js/animations/shift-toward-subtle.css';
|
|
4
|
-
import {
|
|
5
|
-
interface TippyCustomizedProps {
|
|
6
|
-
theme: TippyTheme;
|
|
7
|
-
visible?: boolean;
|
|
8
|
-
heading?: string;
|
|
9
|
-
infoTextHeading?: string;
|
|
10
|
-
placement: Placement;
|
|
11
|
-
className?: string;
|
|
12
|
-
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
13
|
-
iconPath?: string;
|
|
14
|
-
iconClass?: string;
|
|
15
|
-
iconSize?: number;
|
|
16
|
-
onImageLoadError?: (e: any) => void;
|
|
17
|
-
onClose?: () => void;
|
|
18
|
-
infoText?: string;
|
|
19
|
-
showCloseButton?: boolean;
|
|
20
|
-
arrow?: boolean;
|
|
21
|
-
interactive?: boolean;
|
|
22
|
-
showOnCreate?: boolean;
|
|
23
|
-
trigger?: string;
|
|
24
|
-
animation?: string;
|
|
25
|
-
duration?: number;
|
|
26
|
-
additionalContent?: ReactNode;
|
|
27
|
-
documentationLink?: string;
|
|
28
|
-
documentationLinkText?: string;
|
|
29
|
-
children: React.ReactElement<any>;
|
|
30
|
-
}
|
|
3
|
+
import { TippyCustomizedProps } from './Types';
|
|
31
4
|
export declare function TippyCustomized(props: TippyCustomizedProps): JSX.Element;
|
|
32
|
-
export {};
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import { Placement } from 'tippy.js';
|
|
1
3
|
export interface ResponseType {
|
|
2
4
|
code: number;
|
|
3
5
|
status: string;
|
|
@@ -25,3 +27,128 @@ export interface Teams {
|
|
|
25
27
|
name: string;
|
|
26
28
|
active: boolean;
|
|
27
29
|
}
|
|
30
|
+
export declare enum CHECKBOX_VALUE {
|
|
31
|
+
CHECKED = "CHECKED",
|
|
32
|
+
INTERMEDIATE = "INTERMEDIATE"
|
|
33
|
+
}
|
|
34
|
+
export interface CheckboxProps {
|
|
35
|
+
onChange: (event: any) => void;
|
|
36
|
+
isChecked: boolean;
|
|
37
|
+
value: 'CHECKED' | 'INTERMEDIATE';
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
tabIndex?: number;
|
|
40
|
+
rootClassName?: string;
|
|
41
|
+
onClick?: (event: any) => void;
|
|
42
|
+
id?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface TippyCustomizedProps {
|
|
45
|
+
theme: TippyTheme;
|
|
46
|
+
visible?: boolean;
|
|
47
|
+
heading?: string;
|
|
48
|
+
infoTextHeading?: string;
|
|
49
|
+
placement: Placement;
|
|
50
|
+
className?: string;
|
|
51
|
+
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
52
|
+
iconPath?: string;
|
|
53
|
+
iconClass?: string;
|
|
54
|
+
iconSize?: number;
|
|
55
|
+
onImageLoadError?: (e: any) => void;
|
|
56
|
+
onClose?: () => void;
|
|
57
|
+
infoText?: string;
|
|
58
|
+
showCloseButton?: boolean;
|
|
59
|
+
arrow?: boolean;
|
|
60
|
+
interactive?: boolean;
|
|
61
|
+
showOnCreate?: boolean;
|
|
62
|
+
trigger?: string;
|
|
63
|
+
animation?: string;
|
|
64
|
+
duration?: number;
|
|
65
|
+
additionalContent?: ReactNode;
|
|
66
|
+
documentationLink?: string;
|
|
67
|
+
documentationLinkText?: string;
|
|
68
|
+
children: React.ReactElement<any>;
|
|
69
|
+
}
|
|
70
|
+
export interface GenericEmptyStateType {
|
|
71
|
+
title: ReactNode;
|
|
72
|
+
image?: any;
|
|
73
|
+
classname?: string;
|
|
74
|
+
subTitle?: ReactNode;
|
|
75
|
+
isButtonAvailable?: boolean;
|
|
76
|
+
styles?: CSSProperties;
|
|
77
|
+
heightToDeduct?: number;
|
|
78
|
+
imageType?: string;
|
|
79
|
+
renderButton?: () => JSX.Element;
|
|
80
|
+
imageClassName?: string;
|
|
81
|
+
children?: ReactNode;
|
|
82
|
+
noImage?: boolean;
|
|
83
|
+
}
|
|
84
|
+
export declare enum ImageType {
|
|
85
|
+
Large = "large",
|
|
86
|
+
Medium = "medium"
|
|
87
|
+
}
|
|
88
|
+
export interface InfoColourBarType {
|
|
89
|
+
message: React.ReactNode;
|
|
90
|
+
classname: string;
|
|
91
|
+
Icon: any;
|
|
92
|
+
iconClass?: string;
|
|
93
|
+
iconSize?: number;
|
|
94
|
+
renderActionButton?: () => JSX.Element;
|
|
95
|
+
linkText?: React.ReactNode;
|
|
96
|
+
redirectLink?: string;
|
|
97
|
+
linkOnClick?: () => void;
|
|
98
|
+
linkClass?: string;
|
|
99
|
+
internalLink?: boolean;
|
|
100
|
+
styles?: CSSProperties;
|
|
101
|
+
}
|
|
102
|
+
export interface ReloadType {
|
|
103
|
+
reload?: (event?: any) => void;
|
|
104
|
+
className?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface RadioGroupItemProps {
|
|
107
|
+
value: string;
|
|
108
|
+
}
|
|
109
|
+
export interface RadioGroupProps {
|
|
110
|
+
value: string;
|
|
111
|
+
name: string;
|
|
112
|
+
disabled?: boolean;
|
|
113
|
+
onChange: (event: any) => void;
|
|
114
|
+
className?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface ProgressingProps {
|
|
117
|
+
pageLoader?: boolean;
|
|
118
|
+
loadingText?: string;
|
|
119
|
+
size?: number;
|
|
120
|
+
fullHeight?: boolean;
|
|
121
|
+
theme?: 'white' | 'default';
|
|
122
|
+
styles?: React.CSSProperties;
|
|
123
|
+
children?: React.ReactNode;
|
|
124
|
+
}
|
|
125
|
+
export interface PopupMenuType {
|
|
126
|
+
children?: any;
|
|
127
|
+
onToggleCallback?: (isOpen: boolean) => void;
|
|
128
|
+
autoClose?: boolean;
|
|
129
|
+
autoPosition?: boolean;
|
|
130
|
+
}
|
|
131
|
+
export interface PopupMenuButtonType {
|
|
132
|
+
children?: ReactNode;
|
|
133
|
+
disabled?: boolean;
|
|
134
|
+
rootClassName?: string;
|
|
135
|
+
tabIndex?: number;
|
|
136
|
+
onHover?: boolean;
|
|
137
|
+
isKebab?: boolean;
|
|
138
|
+
}
|
|
139
|
+
export interface PopupMenuBodyType {
|
|
140
|
+
children?: ReactNode;
|
|
141
|
+
rootClassName?: string;
|
|
142
|
+
style?: React.CSSProperties;
|
|
143
|
+
autoWidth?: boolean;
|
|
144
|
+
preventWheelDisable?: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface ModalType {
|
|
147
|
+
style?: React.CSSProperties;
|
|
148
|
+
children?: ReactNode;
|
|
149
|
+
modal?: boolean;
|
|
150
|
+
rootClassName?: string;
|
|
151
|
+
onClick?: any;
|
|
152
|
+
callbackRef?: (element?: any) => any;
|
|
153
|
+
preventWheelDisable?: boolean;
|
|
154
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -220,7 +220,17 @@ exports.TippyTheme = void 0;
|
|
|
220
220
|
(function (TippyTheme) {
|
|
221
221
|
TippyTheme["black"] = "black";
|
|
222
222
|
TippyTheme["white"] = "white";
|
|
223
|
-
})(exports.TippyTheme || (exports.TippyTheme = {}));
|
|
223
|
+
})(exports.TippyTheme || (exports.TippyTheme = {}));
|
|
224
|
+
exports.CHECKBOX_VALUE = void 0;
|
|
225
|
+
(function (CHECKBOX_VALUE) {
|
|
226
|
+
CHECKBOX_VALUE["CHECKED"] = "CHECKED";
|
|
227
|
+
CHECKBOX_VALUE["INTERMEDIATE"] = "INTERMEDIATE";
|
|
228
|
+
})(exports.CHECKBOX_VALUE || (exports.CHECKBOX_VALUE = {}));
|
|
229
|
+
exports.ImageType = void 0;
|
|
230
|
+
(function (ImageType) {
|
|
231
|
+
ImageType["Large"] = "large";
|
|
232
|
+
ImageType["Medium"] = "medium";
|
|
233
|
+
})(exports.ImageType || (exports.ImageType = {}));
|
|
224
234
|
|
|
225
235
|
var responseMessages = {
|
|
226
236
|
100: 'Continue',
|
|
@@ -467,7 +477,7 @@ function styleInject(css, ref) {
|
|
|
467
477
|
}
|
|
468
478
|
}
|
|
469
479
|
|
|
470
|
-
var css_248z$3 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n height: 40%;\n max-height: 200px;\n width: auto;\n max-width: 250px;\n}\n.empty-state svg {\n height: 40%;\n max-height: 200px;\n width: auto;\n}\n.empty-state h1,\n.empty-state h2,\n.empty-state h3,\n.empty-state h4,\n.empty-state h5,\n.empty-state h6 {\n color: var(--N900);\n}\n.empty-state .subtitle {\n font-size: 13px;\n width:
|
|
480
|
+
var css_248z$3 = ".empty-state {\n height: 100%;\n}\n.empty-state img {\n height: 40%;\n max-height: 200px;\n width: auto;\n max-width: 250px;\n}\n.empty-state svg {\n height: 40%;\n max-height: 200px;\n width: auto;\n}\n.empty-state h1,\n.empty-state h2,\n.empty-state h3,\n.empty-state h4,\n.empty-state h5,\n.empty-state h6 {\n color: var(--N900);\n}\n.empty-state .subtitle {\n font-size: 13px;\n width: 300px;\n font-weight: 400;\n text-align: center;\n line-height: 1.5;\n margin-bottom: 20px;\n}\n.empty-state .cta {\n height: 36px;\n}\n.empty-state p {\n width: 300px;\n text-align: center;\n font-size: 13px;\n color: var(--N700);\n}\n.empty-state strong {\n font-size: 16px;\n margin-bottom: 4px;\n color: var(--N900);\n font-weight: normal;\n}\n.empty-state .select-popup {\n height: min-content;\n max-height: 250px;\n overflow: auto;\n padding: 8px 0;\n}\n.empty-state .empty-state__loader {\n width: 34px;\n height: 34px;\n margin-bottom: 16px;\n}\n.empty-state .empty-state__loading-text {\n font-size: 12px;\n width: 200px;\n font-weight: normal;\n font-stretch: normal;\n font-style: normal;\n line-height: 1.5;\n letter-spacing: normal;\n text-align: center;\n color: var(--N900);\n}\n.empty-state .button__icon {\n width: 16px;\n height: 16px;\n margin-left: 8px;\n}";
|
|
471
481
|
styleInject(css_248z$3);
|
|
472
482
|
|
|
473
483
|
var _g$2;
|
|
@@ -1937,11 +1947,11 @@ var toastAccessDenied = function (title, subtitle) {
|
|
|
1937
1947
|
var loadingFailure = "b5d52f036bdcd3ed.png";
|
|
1938
1948
|
|
|
1939
1949
|
function Reload(_a) {
|
|
1940
|
-
var
|
|
1950
|
+
var reload = _a.reload, _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
1941
1951
|
function refresh(e) {
|
|
1942
1952
|
window.location.reload();
|
|
1943
1953
|
}
|
|
1944
|
-
return (jsxRuntime.jsx("article", __assign({ className: "flex ".concat(className)
|
|
1954
|
+
return (jsxRuntime.jsx("article", __assign({ className: "flex w-100 h-100 ".concat(className) }, { children: jsxRuntime.jsxs("div", __assign({ className: "flex column w-250 dc__align-center" }, { children: [jsxRuntime.jsx("img", { src: loadingFailure, style: { height: 'auto' }, className: "w-100 mb-12", alt: "load-error" }), jsxRuntime.jsx("h3", __assign({ className: "title dc__bold" }, { children: "Failed to load" })), jsxRuntime.jsx("div", __assign({ className: "dc__empty__subtitle mb-20" }, { children: "We could not load this page. Please give us another try." })), jsxRuntime.jsx("button", __assign({ type: "button", className: "cta ghosted", onClick: typeof reload === 'function' ? reload : refresh }, { children: "Retry" }))] })) })));
|
|
1945
1955
|
}
|
|
1946
1956
|
|
|
1947
1957
|
var notAuthorized = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22250%22%20height%3D%22200%22%20viewBox%3D%220%200%20250%20200%22%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3ClinearGradient%20id%3D%22ho9etwod5c%22%20x1%3D%2255.01%25%22%20x2%3D%2240.976%25%22%20y1%3D%220%25%22%20y2%3D%22100%25%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%232A318C%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%231D225F%22%2F%3E%20%20%20%20%20%20%20%20%3C%2FlinearGradient%3E%20%20%20%20%20%20%20%20%3ClinearGradient%20id%3D%22mdhg2gjypd%22%20x1%3D%2250%25%22%20x2%3D%2250%25%22%20y1%3D%220%25%22%20y2%3D%22100%25%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23EEE%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23D6D7D8%22%2F%3E%20%20%20%20%20%20%20%20%3C%2FlinearGradient%3E%20%20%20%20%20%20%20%20%3ClinearGradient%20id%3D%22xe2mx0bk0e%22%20x1%3D%220%25%22%20x2%3D%22100%25%22%20y1%3D%2218%25%22%20y2%3D%2282%25%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23E8B73F%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23CF9F36%22%2F%3E%20%20%20%20%20%20%20%20%3C%2FlinearGradient%3E%20%20%20%20%20%20%20%20%3Cpath%20id%3D%2288gkjk6cca%22%20d%3D%22M0%200H250V200H0z%22%2F%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20transform%3D%22translate%28-590%20-308%29%20translate%28590%20308%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cmask%20id%3D%22pitr2853ub%22%20fill%3D%22%23fff%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%2388gkjk6cca%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fmask%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20mask%3D%22url%28%23pitr2853ub%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M47.646%200c2.598%200%205.717%201.017%207.994%202.74%202.276%201.722%203.845%203.02%204.55%205.097.465%201.372.252%203.282-.641%205.728l.008-.072c-.013.145-.039.269-.071.387.574-1.048%201.638-1.624%202.576-1.283%201.07.39%201.5%201.803%201.013%203.14-.487%201.337-1.723%202.144-2.794%201.754-.536-.195-.91-.646-1.09-1.216.023.975.09%202.117.203%203.427l-2.317.161c-2.223%202.412-4.574%203.48-7.055%203.207-.6-.067-1.158-.18-1.675-.339-.588%201.007-1.177%202.688-1.766%205.043l-.064.031.005-.043c-.585%205.627-1.014%2011.07-1.287%2016.327l.001-.108c-.013.958-.003%201.853.028%202.684l.109-1.533c2.141%201.735%204.344%202.776%206.608%203.123%202.263.348%205.76-.128%2010.49-1.426%202.808-.962%205.555-2.299%208.243-4.011H63.94l16.84-20.83h2.756c0-1.439%201.165-2.604%202.604-2.604%201.378%200%202.506%201.07%202.597%202.425l.006.178h1.736c0-1.438%201.166-2.603%202.604-2.603%201.378%200%202.506%201.07%202.598%202.425l.006.178h5.284L89.832%2035.292c.097-.07.17-.106.212-.106.692%200%20.692%205.306-.057%207.152-.289.865-4.73%205.71-9.864%2010.844-2.78%202.78-6.605%206.366-11.477%2010.759l2.511%2011.858c-.568%201.157-2.01%201.928-4.324%202.314-5.208.579-10.415-1.736-16.78-1.736-1.852%200-3.142.343-4.269.744.841%208.545%202.264%2016.398%204.269%2023.558-1.157%201.157-1.946%201.682-2.808%202.052-1.015.394-2.305.789-3.009.86.776%202.429%201.318%204.584%201.627%206.464.38%202.322%202.518%2022.156%206.411%2059.5h-.044l2.037%201.697c2.308%201.962%2012.796%207.547%2014.132%208.307.891.506%202.067%201.794%203.526%203.864-16.575-.025-27.78-.05-33.613-.075l.053.075C12.788%20183.385%200%20183.346%200%20183.308c0-.116%201.154-3.288%202.538-7.095l2.44-6.658H1.761c-.4-1.385-.792-3.254-1.175-5.606-.75-4.788-.18-7.96%203.05-14.536%203.23-6.518%204.866-10.072%204.866-13.764.058-5.768%201.222-11.316%204.28-17.315%202.364-4.73%203.495-5.086%203.725-7.97l.367-5.421c-2.382-.231-5.928-.988-8.045-1.693l-4.21-1.385-.116-4.326C4.214%2085.6%205.08%2076.89%207.79%2065.757%2011.482%2050.47%2022.096%2034.84%2034.959%2025.668c3.055-2.203%204.272-3.049%205.093-2.807.79-.548%201.483-1.096%202.077-1.645-1.685-.52-3.275-1.222-4.77-2.105-2.311-1.366-4.444-3.194-6.398-5.483.397-.834.904-1.524%201.522-2.07.671-.592%201.935-1.108%203.169-1.822l-.065.021-1.204.401c-1.26.424-1.956.713-2.396%201.032-.829.601-1.259%201.275-1.312%202.032l-.005.191-.579.007c-.012-1.039.516-1.943%201.557-2.699.427-.31%201.013-.573%201.983-.916l1.755-.59.612-.213c.593-.213%201.063-.401%201.438-.584%201.296-1.399%202.17-3.971%204.089-5.678C43.642.855%2045.048%200%2047.646%200zM27.999%20144.476l-.189.512c-2.603%207.055-5.679%2015.219-9.228%2024.493l2.126%201.771c2.307%201.962%2012.795%207.547%2014.132%208.307l.035.021c.364-1.006.782-2.154%201.223-3.367l2.44-6.658h-4.242c-1.444-2.617-2.166-4.456-2.166-5.517%200-1.59.913-3.77.913-6.068%200-1.393-1.68-5.89-5.044-13.494zM78.827%2042.819l-1.242-.001c-2.375%202.17-3.972%203.706-4.791%204.61-.72.793-2.112%202.23-4.176%204.309%203.033-1.194%205.06-2.078%206.083-2.65%201.5-.865%202.077-1.673%203.807-5.307.082-.163.192-.506.319-.961zm7.313-22.857c-1.119%200-2.026.907-2.026%202.025h4.05c0-1.118-.906-2.025-2.024-2.025zm6.943%200c-1.119%200-2.025.907-2.025%202.025h4.05c0-1.118-.907-2.025-2.025-2.025zm-33.27-5.413c-.388%201.066-.065%202.132.666%202.398.73.266%201.664-.343%202.052-1.408.388-1.065.064-2.132-.667-2.398-.73-.266-1.664.343-2.052%201.408z%22%20transform%3D%22translate%2829%208%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%2380AEF2%22%20fill-rule%3D%22nonzero%22%20d%3D%22M36.56%20183.308c0-.116%201.153-3.288%202.538-7.095l2.538-6.922%206.46-.173%206.403-.173%202.768%202.307c2.308%201.962%2012.796%207.547%2014.132%208.307.891.506%202.067%201.794%203.526%203.864-25.577-.038-38.365-.077-38.365-.115z%22%20transform%3D%22translate%2829%208%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%2394BBF8%22%20fill-rule%3D%22nonzero%22%20d%3D%22M3%20183.308c0-.116%201.154-3.288%202.538-7.095l2.538-6.922%206.46-.173%206.403-.173%202.769%202.307c2.307%201.962%2012.795%207.547%2014.132%208.307.89.506%202.066%201.794%203.525%203.864C15.788%20183.385%203%20183.346%203%20183.308z%22%20transform%3D%22translate%2829%208%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%231D225F%22%20fill-rule%3D%22nonzero%22%20d%3D%22M46.655%20101.836c1.09%203.158%201.826%205.898%202.208%208.22.38%202.321%202.518%2022.155%206.411%2059.5H37.296c-1.444-2.618-2.166-4.457-2.166-5.518%200-1.59.913-3.77.913-6.068%200-1.532-2.034-6.823-6.104-15.871l3.931-39.349%2012.785-.914z%22%20transform%3D%22translate%2829%208%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22url%28%23ho9etwod5c%29%22%20d%3D%22M21.554%20169.555H4.76c-.4-1.385-.792-3.254-1.175-5.606-.75-4.788-.18-7.96%203.05-14.536%203.23-6.518%204.866-10.072%204.866-13.764.058-5.768%201.222-11.316%204.28-17.315%202.364-4.73%203.495-5.086%203.725-7.97l.42-6.202h21.078c.512%201.433.696%204.075.55%207.925-.145%203.85-6.812%2023.006-20.001%2057.468z%22%20transform%3D%22translate%2829%208%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%2398BDF9%22%20d%3D%22M0%2024.302L16.84%203.472%2037.031%203.472%2019.592%2024.302z%22%20transform%3D%22translate%2829%208%29%20translate%2866.94%2018.516%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%232174DB%22%20d%3D%22M22.2.868c1.378%200%202.506%201.07%202.597%202.425l.006.179h-.578c0-1.119-.907-2.025-2.025-2.025-1.119%200-2.025.906-2.025%202.025%200%201.062.818%201.934%201.859%202.018l.166.007v.578c-1.438%200-2.604-1.165-2.604-2.603%200-1.438%201.166-2.604%202.604-2.604zM29.143.868c1.378%200%202.506%201.07%202.598%202.425l.006.179h-.579c0-1.119-.906-2.025-2.025-2.025-1.118%200-2.025.906-2.025%202.025%200%201.062.818%201.934%201.859%202.018l.166.007v.578c-1.438%200-2.604-1.165-2.604-2.603%200-1.438%201.166-2.604%202.604-2.604z%22%20transform%3D%22translate%2829%208%29%20translate%2866.94%2018.516%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23F3A29D%22%20fill-rule%3D%22nonzero%22%20d%3D%22M65.472%2046.829c2.807-.962%205.554-2.299%208.242-4.011h6.871c-2.375%202.17-3.972%203.706-4.791%204.61-.82.903-2.509%202.638-5.068%205.205-1.091%205.781-2.254%208.21-3.487%207.285-1.85-1.386-7.939-10.897-1.767-13.09z%22%20transform%3D%22translate%2829%208%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23FAB6AF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M69.254%2052.654c4.363-1.668%207.179-2.857%208.447-3.567%201.5-.865%202.077-1.673%203.807-5.307.23-.461.692-2.365%201.096-4.153.923-4.557%202.423-4.326%202.538.346.058%201.27.346%202.423.692%202.538.288.116%201.961-1.5%203.634-3.576%201.673-2.077%203.288-3.75%203.576-3.75.692%200%20.692%205.307-.057%207.153-.289.865-4.73%205.71-9.864%2010.844-3.422%203.423-8.431%208.068-15.026%2013.937l1.157-14.465z%22%20transform%3D%22translate%2829%208%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23F3A29D%22%20fill-rule%3D%22nonzero%22%20d%3D%22M49.581%2027.774c.772-3.086%201.543-5.015%202.315-5.787-1.157-1.157-2.315-2.314-4.63-3.471-.77%201.543-2.314%203.086-4.628%204.629%200%202.314.771%203.857%202.314%204.629%201.543.771%203.086.771%204.63%200z%22%20transform%3D%22translate%2829%208%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22url%28%23mdhg2gjypd%29%22%20fill-rule%3D%22nonzero%22%20d%3D%22M12.858%2082.16c-2.365-.174-6.23-.981-8.48-1.731l-4.21-1.385-.115-4.326c-.289-11.94.577-20.65%203.288-31.782C7.032%2027.65%2017.646%2012.019%2030.509%202.847c4.96-3.576%205.076-3.576%206.518-1.153.634%201.153%201.96%202.307%202.884%202.653l2.161.594c-3.046%2029.324-1.87%2053.63%203.531%2072.917-1.157%201.158-1.946%201.682-2.808%202.052-1.039.403-2.365.807-3.057.865-.693.058-3%20.519-5.25%201.038-4.21.923-13.382%201.096-21.63.346z%22%20transform%3D%22translate%2829%208%29%20translate%287.45%2022.82%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23D6D7D8%22%20d%3D%22M58.022%2024.008l1.767%2011.311-19.972%202.645%201.106-15.653c2.141%201.735%204.344%202.776%206.608%203.123%202.263.348%205.76-.128%2010.49-1.426z%22%20transform%3D%22translate%2829%208%29%20translate%287.45%2022.82%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23E9E9E9%22%20fill-rule%3D%22nonzero%22%20d%3D%22M61.804%2029.833l4.903%2023.145c-.568%201.157-2.01%201.929-4.324%202.314-5.208.579-10.415-1.736-16.78-1.736-6.365%200-6.09%204.05-15.348.58-6.172-2.315-8.68-12.73-7.523-31.246l18.054-1.73c-.078%205.782.655%209.252%202.198%2010.409%201.512%201.134%207.569.601%2018.17-1.6l.65-.136z%22%20transform%3D%22translate%2829%208%29%20translate%287.45%2022.82%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23FAB6AF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M29.082%207.444c1.07%201.52%201.488%203.536%201.253%206.049-.062.656-.376.883-.376%202.052%200%201.12.07%202.506.212%204.157l-2.317.161c-2.222%202.412-4.574%203.48-7.055%203.207-2.48-.275-4.251-1.343-5.31-3.207-2.18-4.023-1.621-7.444%201.675-10.262%203.296-2.818%207.269-3.537%2011.918-2.157z%22%20transform%3D%22translate%2829%208%29%20translate%2832.223%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23E94A47%22%20d%3D%22M18.423%200c2.598%200%205.717%201.017%207.994%202.74%202.277%201.722%203.845%203.02%204.55%205.097.47%201.384.248%203.314-.664%205.791.13-2.345-.048-3.647-.533-3.906-.67%201.653-1.595%201.987-2.703%202.787-.62.448-2.791.518-4.917.897-2.628%201.722-4.303%203.33-4.867%204.86-.448%201.218-.402%202.608.148%204.177l.126.339-.54.21c-.714-1.833-.81-3.478-.277-4.925.522-1.417%201.85-2.838%203.894-4.321-1.09.307-2.051.754-2.634%201.449-1.279%201.526-2.028%203.765-2.246%206.716-2.766-.5-5.305-1.433-7.617-2.8-2.312-1.366-4.445-3.194-6.398-5.483.396-.834.904-1.524%201.521-2.07.671-.592%201.935-1.108%203.169-1.822l-.065.021-1.204.401c-1.26.424-1.956.713-2.395%201.032-.83.601-1.26%201.275-1.313%202.032l-.005.191-.579.007c-.012-1.039.516-1.943%201.557-2.699.427-.31%201.013-.573%201.983-.916l1.756-.59.61-.213c.594-.213%201.064-.401%201.439-.584%201.296-1.399%202.17-3.971%204.09-5.678C14.418.855%2015.825%200%2018.422%200z%22%20transform%3D%22translate%2829%208%29%20translate%2832.223%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20fill%3D%22%23222768%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.025%203.16C1.622%201.52%203.194.563%204.56%201.06c1.061.386%201.653%201.524%201.586%202.781.36-.092.688-.137.988-.137l.208.008c.254.02.466.056.636.114.511-1.271%201.708-2.023%202.749-1.644%201.07.39%201.5%201.802%201.013%203.14-.487%201.337-1.723%202.143-2.794%201.754-.953-.347-1.397-1.504-1.14-2.697-.103-.038-.274-.072-.508-.09-.334-.025-.737.029-1.209.165l-.03.01c-.036.159-.083.318-.14.477-.597%201.64-2.17%202.597-3.536%202.1C1.017%206.543.428%204.8%201.025%203.16zm9.504-.434c-.73-.266-1.664.343-2.052%201.408-.388%201.065-.064%202.132.667%202.398.73.266%201.664-.343%202.052-1.408.387-1.066.064-2.132-.667-2.398zM4.362%201.604c-1.036-.378-2.297.39-2.793%201.754-.496%201.363-.024%202.762%201.012%203.14%201.036.376%202.298-.392%202.794-1.755s.023-2.762-1.013-3.14z%22%20transform%3D%22translate%2829%208%29%20translate%2832.223%29%20translate%2822.112%2010.415%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20mask%3D%22url%28%23pitr2853ub%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M30%200c12.15%200%2022%209.85%2022%2022v11h8v48H0V33h8V22C8%209.973%2017.654.198%2029.637.004zm0%207.934c-7.755%200-14.067%206.309-14.067%2014.067V33h28.133V22c0-7.652-6.14-13.896-13.752-14.063z%22%20transform%3D%22translate%28134%2061%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23D6D7D8%22%20d%3D%22M55%2034.3V22C55%209.85%2045.15%200%2033%200S11%209.85%2011%2022v12.3m7.933%200V22c0-7.757%206.312-14.066%2014.068-14.066%207.756%200%2014.065%206.31%2014.065%2014.067v12.298%22%20transform%3D%22translate%28134%2061%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22url%28%23xe2mx0bk0e%29%22%20d%3D%22M3%2033H63V81H3z%22%20transform%3D%22translate%28134%2061%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%233E3D4C%22%20fill-rule%3D%22nonzero%22%20d%3D%22M39%2056c0-3.314-2.686-6-6-6s-6%202.686-6%206c0%202.282%201.275%204.267%203.15%205.281l-.965%207.386h7.63l-.965-7.386C37.726%2060.267%2039%2058.282%2039%2056z%22%20transform%3D%22translate%28134%2061%29%22%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
@@ -1950,14 +1960,9 @@ var notFound = "27bfa7a87d0b7039.png";
|
|
|
1950
1960
|
|
|
1951
1961
|
var AppNotDeployed = "64232fbb58cec80f.png";
|
|
1952
1962
|
|
|
1953
|
-
var ImageType;
|
|
1954
|
-
(function (ImageType) {
|
|
1955
|
-
ImageType["Large"] = "large";
|
|
1956
|
-
ImageType["Medium"] = "medium";
|
|
1957
|
-
})(ImageType || (ImageType = {}));
|
|
1958
1963
|
function GenericEmptyState(_a) {
|
|
1959
1964
|
var title = _a.title, image = _a.image, subTitle = _a.subTitle, isButtonAvailable = _a.isButtonAvailable, classname = _a.classname, styles = _a.styles, heightToDeduct = _a.heightToDeduct, imageType = _a.imageType, renderButton = _a.renderButton, imageClassName = _a.imageClassName, children = _a.children, noImage = _a.noImage;
|
|
1960
|
-
return (jsxRuntime.jsxs("div", __assign({ className: "flex column empty-state ".concat(classname ? classname : ''), style: styles }, (heightToDeduct >= 0 && { style: __assign(__assign({}, styles), { height: "calc(100vh - ".concat(heightToDeduct, "px)") }) }), { children: [!noImage && jsxRuntime.jsx("img", { className: imageClassName ? imageClassName : '', src: image || AppNotDeployed, width: imageType === ImageType.Medium ? '200' : '250', height: imageType === ImageType.Medium ? '160' : '200', alt: "empty-state" }), jsxRuntime.jsx("h4", __assign({ className: "title fw-6 cn-9 mb-8" }, { children: title })), subTitle && jsxRuntime.jsx("p", __assign({ className: "subtitle" }, { children: subTitle })), isButtonAvailable && renderButton(), children] })));
|
|
1965
|
+
return (jsxRuntime.jsxs("div", __assign({ className: "flex column empty-state ".concat(classname ? classname : ''), style: styles }, (heightToDeduct >= 0 && { style: __assign(__assign({}, styles), { height: "calc(100vh - ".concat(heightToDeduct, "px)") }) }), { children: [!noImage && jsxRuntime.jsx("img", { className: imageClassName ? imageClassName : '', src: image || AppNotDeployed, width: imageType === exports.ImageType.Medium ? '200' : '250', height: imageType === exports.ImageType.Medium ? '160' : '200', alt: "empty-state" }), jsxRuntime.jsx("h4", __assign({ className: "title fw-6 cn-9 mb-8" }, { children: title })), subTitle && jsxRuntime.jsx("p", __assign({ className: "subtitle" }, { children: subTitle })), isButtonAvailable && renderButton(), children] })));
|
|
1961
1966
|
}
|
|
1962
1967
|
|
|
1963
1968
|
function ErrorScreenNotFound() {
|
|
@@ -16340,11 +16345,6 @@ var getTeamListMin = function () {
|
|
|
16340
16345
|
});
|
|
16341
16346
|
};
|
|
16342
16347
|
|
|
16343
|
-
exports.CHECKBOX_VALUE = void 0;
|
|
16344
|
-
(function (CHECKBOX_VALUE) {
|
|
16345
|
-
CHECKBOX_VALUE["CHECKED"] = "CHECKED";
|
|
16346
|
-
CHECKBOX_VALUE["INTERMEDIATE"] = "INTERMEDIATE";
|
|
16347
|
-
})(exports.CHECKBOX_VALUE || (exports.CHECKBOX_VALUE = {}));
|
|
16348
16348
|
/*
|
|
16349
16349
|
Valid States of Checkbox:
|
|
16350
16350
|
1. disabled: true, checked: false, value: XXX
|
package/package.json
CHANGED
|
@@ -2,32 +2,9 @@ import React, { useMemo, useEffect } from 'react'
|
|
|
2
2
|
import { Link, useRouteMatch, useParams } from 'react-router-dom'
|
|
3
3
|
import { useBreadcrumbContext } from './BreadcrumbStore'
|
|
4
4
|
import { ConditionalWrap } from '../Helper'
|
|
5
|
+
import { Breadcrumb, Breadcrumbs, UseBreadcrumbOptionalProps, UseBreadcrumbState } from './Types'
|
|
5
6
|
export const BreadcrumbContext = React.createContext(null)
|
|
6
7
|
|
|
7
|
-
interface Breadcrumb {
|
|
8
|
-
to: string
|
|
9
|
-
name: string
|
|
10
|
-
className?: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface UseBreadcrumbState {
|
|
14
|
-
breadcrumbs: Breadcrumb[]
|
|
15
|
-
setCrumb: (props: { [key: string]: any }) => void
|
|
16
|
-
resetCrumb: (props: string[]) => void
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface AdvancedAlias {
|
|
20
|
-
component: any
|
|
21
|
-
linked: boolean
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface UseBreadcrumbProps {
|
|
25
|
-
sep?: string
|
|
26
|
-
alias?: { [key: string]: AdvancedAlias | any }
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type UseBreadcrumbOptionalProps = UseBreadcrumbProps | null
|
|
30
|
-
|
|
31
8
|
export function useBreadcrumb(props?: UseBreadcrumbOptionalProps, deps?: any[]): UseBreadcrumbState {
|
|
32
9
|
let sep = props?.sep || '/'
|
|
33
10
|
deps = deps || []
|
|
@@ -91,12 +68,6 @@ export function useBreadcrumb(props?: UseBreadcrumbOptionalProps, deps?: any[]):
|
|
|
91
68
|
return { breadcrumbs, setCrumb, resetCrumb }
|
|
92
69
|
}
|
|
93
70
|
|
|
94
|
-
interface Breadcrumbs {
|
|
95
|
-
breadcrumbs: Breadcrumb[]
|
|
96
|
-
sep?: string
|
|
97
|
-
className?: string
|
|
98
|
-
}
|
|
99
|
-
|
|
100
71
|
export const BreadCrumb: React.FC<Breadcrumbs> = ({
|
|
101
72
|
breadcrumbs,
|
|
102
73
|
sep = '/',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
export interface Breadcrumb {
|
|
3
|
+
to: string
|
|
4
|
+
name: string
|
|
5
|
+
className?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface UseBreadcrumbState {
|
|
9
|
+
breadcrumbs: Breadcrumb[]
|
|
10
|
+
setCrumb: (props: { [key: string]: any }) => void
|
|
11
|
+
resetCrumb: (props: string[]) => void
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface AdvancedAlias {
|
|
15
|
+
component: any
|
|
16
|
+
linked: boolean
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UseBreadcrumbProps {
|
|
20
|
+
sep?: string
|
|
21
|
+
alias?: { [key: string]: AdvancedAlias | any }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Breadcrumbs {
|
|
25
|
+
breadcrumbs: Breadcrumb[]
|
|
26
|
+
sep?: string
|
|
27
|
+
className?: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type UseBreadcrumbOptionalProps = UseBreadcrumbProps | null
|
package/src/Common/Checkbox.tsx
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react'
|
|
2
|
-
|
|
3
|
-
export enum CHECKBOX_VALUE {
|
|
4
|
-
CHECKED = 'CHECKED',
|
|
5
|
-
INTERMEDIATE = 'INTERMEDIATE',
|
|
6
|
-
}
|
|
7
|
-
export interface CheckboxProps {
|
|
8
|
-
onChange: (event) => void
|
|
9
|
-
isChecked: boolean
|
|
10
|
-
value: 'CHECKED' | 'INTERMEDIATE'
|
|
11
|
-
disabled?: boolean
|
|
12
|
-
tabIndex?: number
|
|
13
|
-
rootClassName?: string
|
|
14
|
-
onClick?: (event) => void
|
|
15
|
-
id?: string
|
|
16
|
-
}
|
|
2
|
+
import { CheckboxProps } from './Types'
|
|
17
3
|
|
|
18
4
|
/*
|
|
19
5
|
Valid States of Checkbox:
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { VisibleModal2 } from '../Modals/VisibleModal2'
|
|
3
|
-
|
|
3
|
+
import { ConfirmationDialogBodyType, ConfirmationDialogButtonGroupType, ConfirmationDialogIconType, ConfirmationDialogType } from './Types'
|
|
4
|
+
|
|
5
|
+
function ConfirmationDialog({ className = '', children }: ConfirmationDialogType) {
|
|
4
6
|
return (
|
|
5
7
|
<VisibleModal2 className="confirmation-dialog">
|
|
6
8
|
<div className={`confirmation-dialog__body ${className}`}>{children}</div>
|
|
@@ -8,11 +10,11 @@ function ConfirmationDialog({ className = '', children }) {
|
|
|
8
10
|
)
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
function Icon({ src, className = '' }) {
|
|
13
|
+
function Icon({ src, className = '' }: ConfirmationDialogIconType) {
|
|
12
14
|
return <img src={src} className={`confirmation-dialog__icon ${className}`} alt="" />
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
function Body({ title, subtitle = null, children = null }) {
|
|
17
|
+
function Body({ title, subtitle = null, children = null }: ConfirmationDialogBodyType) {
|
|
16
18
|
return (
|
|
17
19
|
<div className="flex left column ">
|
|
18
20
|
<h3 className="confirmation-dialog__title lh-1-25 dc__break-word w-100">{title}</h3>
|
|
@@ -22,7 +24,7 @@ function Body({ title, subtitle = null, children = null }) {
|
|
|
22
24
|
)
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
function ButtonGroup({ children }) {
|
|
27
|
+
function ButtonGroup({ children }: ConfirmationDialogButtonGroupType) {
|
|
26
28
|
return <div className="flex right confirmation-dialog__button-group">{children}</div>
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ReactNode } from "react"
|
|
2
|
+
|
|
1
3
|
export interface DeleteDialogProps {
|
|
2
4
|
title: string
|
|
3
5
|
description?: string
|
|
@@ -14,3 +16,19 @@ export interface ForceDeleteDialogType {
|
|
|
14
16
|
forceDeleteDialogTitle: string
|
|
15
17
|
forceDeleteDialogMessage: string
|
|
16
18
|
}
|
|
19
|
+
export interface ConfirmationDialogType {
|
|
20
|
+
className?: string
|
|
21
|
+
children: any
|
|
22
|
+
}
|
|
23
|
+
export interface ConfirmationDialogIconType {
|
|
24
|
+
src: string
|
|
25
|
+
className?: string
|
|
26
|
+
}
|
|
27
|
+
export interface ConfirmationDialogBodyType {
|
|
28
|
+
title: string
|
|
29
|
+
subtitle?: ReactNode
|
|
30
|
+
children?: any
|
|
31
|
+
}
|
|
32
|
+
export interface ConfirmationDialogButtonGroupType {
|
|
33
|
+
children: any
|
|
34
|
+
}
|
|
@@ -1,26 +1,7 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import './emptyState.scss'
|
|
1
|
+
import React from 'react'
|
|
3
2
|
import AppNotDeployed from '../../Assets/Img/app-not-deployed.png'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
title: ReactNode
|
|
7
|
-
image?
|
|
8
|
-
classname?: string
|
|
9
|
-
subTitle?: ReactNode
|
|
10
|
-
isButtonAvailable?: boolean
|
|
11
|
-
styles?: CSSProperties
|
|
12
|
-
heightToDeduct?: number
|
|
13
|
-
imageType?: string
|
|
14
|
-
renderButton?: () => JSX.Element
|
|
15
|
-
imageClassName?: string
|
|
16
|
-
children?: ReactNode
|
|
17
|
-
noImage?: boolean
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
enum ImageType {
|
|
21
|
-
Large = 'large',
|
|
22
|
-
Medium = 'medium',
|
|
23
|
-
}
|
|
3
|
+
import { GenericEmptyStateType, ImageType } from '../Types'
|
|
4
|
+
import './emptyState.scss'
|
|
24
5
|
|
|
25
6
|
function GenericEmptyState({
|
|
26
7
|
title,
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
.subtitle {
|
|
23
23
|
font-size: 13px;
|
|
24
|
-
width:
|
|
24
|
+
width: 300px;
|
|
25
25
|
font-weight: 400;
|
|
26
26
|
text-align: center;
|
|
27
27
|
line-height: 1.5;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
height: 36px;
|
|
32
32
|
}
|
|
33
33
|
p {
|
|
34
|
-
width:
|
|
34
|
+
width: 300px;
|
|
35
35
|
text-align: center;
|
|
36
36
|
font-size: 13px;
|
|
37
37
|
color: var(--N700);
|
package/src/Common/Error.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react'
|
|
2
2
|
import EmptyState from './EmptyState/EmptyState'
|
|
3
3
|
import notAuthorized from '../Assets/Img/ic-not-authorized.svg'
|
|
4
|
-
import Reload from './Reload'
|
|
5
4
|
import ErrorScreenNotFound from './ErrorScreenNotFound'
|
|
6
5
|
import { ERROR_EMPTY_SCREEN } from './Constants'
|
|
7
6
|
import GenericEmptyState from './EmptyState/GenericEmptyState'
|
|
7
|
+
import Reload from './Reload'
|
|
8
8
|
|
|
9
9
|
export class ErrorScreenManager extends Component<{
|
|
10
10
|
code?: number
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react'
|
|
2
2
|
import { Link } from 'react-router-dom'
|
|
3
|
+
import { InfoColourBarType } from '../Types'
|
|
3
4
|
import './infoColourBar.scss'
|
|
4
5
|
|
|
5
|
-
interface InfoColourBarType {
|
|
6
|
-
message: React.ReactNode
|
|
7
|
-
classname: string
|
|
8
|
-
Icon
|
|
9
|
-
iconClass?: string
|
|
10
|
-
iconSize?: number // E.g. 16, 20, etc.. Currently, there are around 12 sizes supported. Check `icons.css` or `base.scss` for supported sizes or add new size (class names starts with `icon-dim-`).
|
|
11
|
-
renderActionButton?: () => JSX.Element
|
|
12
|
-
linkText?: React.ReactNode
|
|
13
|
-
redirectLink?: string
|
|
14
|
-
linkOnClick?: () => void
|
|
15
|
-
linkClass?: string
|
|
16
|
-
internalLink?: boolean
|
|
17
|
-
styles?: CSSProperties
|
|
18
|
-
}
|
|
19
|
-
|
|
20
6
|
function InfoColourBar({
|
|
21
7
|
message,
|
|
22
8
|
classname,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react'
|
|
2
2
|
import ReactDOM from 'react-dom'
|
|
3
|
+
import { ModalType } from '../Types'
|
|
4
|
+
|
|
3
5
|
export const Modal = ({
|
|
4
6
|
style = {},
|
|
5
7
|
children,
|
|
@@ -8,7 +10,7 @@ export const Modal = ({
|
|
|
8
10
|
onClick = null,
|
|
9
11
|
callbackRef = null,
|
|
10
12
|
preventWheelDisable = false,
|
|
11
|
-
}) => {
|
|
13
|
+
}: ModalType) => {
|
|
12
14
|
const innerRef = React.useRef(null)
|
|
13
15
|
function handleClick(e) {
|
|
14
16
|
if (typeof onClick !== 'function') return
|
package/src/Common/PopupMenu.tsx
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import React, { useEffect } from 'react'
|
|
2
|
-
import {Modal} from './Modals/Modal'
|
|
3
|
-
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
|
+
import { Modal } from './Modals/Modal'
|
|
3
|
+
import { PopupMenuBodyType, PopupMenuButtonType, PopupMenuType } from './Types'
|
|
4
|
+
|
|
5
|
+
const PopupContext = React.createContext(null)
|
|
4
6
|
|
|
5
7
|
function usePopupContext() {
|
|
6
8
|
const context = React.useContext(PopupContext)
|
|
@@ -10,7 +12,12 @@ function usePopupContext() {
|
|
|
10
12
|
return context
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
function PopupMenu({
|
|
15
|
+
function PopupMenu({
|
|
16
|
+
children = null,
|
|
17
|
+
onToggleCallback = null,
|
|
18
|
+
autoClose = false,
|
|
19
|
+
autoPosition = false,
|
|
20
|
+
}: PopupMenuType) {
|
|
14
21
|
const [popupPosition, setPopupPosition] = React.useState(null)
|
|
15
22
|
const [opacity, setOpacity] = React.useState(0)
|
|
16
23
|
const observer = React.useRef<IntersectionObserver | null>(null)
|
|
@@ -135,7 +142,7 @@ function Button({
|
|
|
135
142
|
tabIndex = 0,
|
|
136
143
|
onHover = false,
|
|
137
144
|
isKebab = false,
|
|
138
|
-
}) {
|
|
145
|
+
}: PopupMenuButtonType) {
|
|
139
146
|
const { handleOpen, popupPosition, buttonRef, initialiseButtonWidth } = usePopupContext()
|
|
140
147
|
return (
|
|
141
148
|
<button
|
|
@@ -154,7 +161,13 @@ function Button({
|
|
|
154
161
|
)
|
|
155
162
|
}
|
|
156
163
|
|
|
157
|
-
function Body({
|
|
164
|
+
function Body({
|
|
165
|
+
children = null,
|
|
166
|
+
rootClassName = '',
|
|
167
|
+
style = {},
|
|
168
|
+
autoWidth = false,
|
|
169
|
+
preventWheelDisable = false,
|
|
170
|
+
}: PopupMenuBodyType) {
|
|
158
171
|
const { handleClose, popupPosition, opacity, callbackRef, buttonWidth } = usePopupContext()
|
|
159
172
|
return popupPosition ? (
|
|
160
173
|
<Modal
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
|
|
3
|
-
interface ProgressingProps {
|
|
4
|
-
pageLoader?: boolean
|
|
5
|
-
loadingText?: string
|
|
6
|
-
size?: number
|
|
7
|
-
fullHeight?: boolean
|
|
8
|
-
theme?: 'white' | 'default'
|
|
9
|
-
styles?: React.CSSProperties
|
|
10
|
-
children?: React.ReactNode
|
|
11
|
-
}
|
|
2
|
+
import { ProgressingProps } from './Types'
|
|
12
3
|
|
|
13
4
|
export function Progressing({ pageLoader, size, theme, styles }: ProgressingProps): JSX.Element {
|
|
14
5
|
const loaderSize = size ? `${size}px` : pageLoader ? '48px' : '20px'
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React, { Component, createContext } from 'react'
|
|
2
|
+
import { RadioGroupItemProps, RadioGroupProps } from './Types'
|
|
2
3
|
const RadioGroupContext = createContext({ name: '', value: '', disabled: false, onChange: (event) => {} })
|
|
3
4
|
|
|
4
|
-
export interface RadioGroupItemProps {
|
|
5
|
-
value: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
5
|
export class RadioGroupItem extends Component<RadioGroupItemProps> {
|
|
9
6
|
render() {
|
|
10
7
|
return (
|
|
@@ -35,14 +32,6 @@ export class RadioGroupItem extends Component<RadioGroupItemProps> {
|
|
|
35
32
|
}
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
export interface RadioGroupProps {
|
|
39
|
-
value: string
|
|
40
|
-
name: string
|
|
41
|
-
disabled?: boolean
|
|
42
|
-
onChange: (event) => void
|
|
43
|
-
className?: string
|
|
44
|
-
}
|
|
45
|
-
|
|
46
35
|
export class RadioGroup extends Component<RadioGroupProps> {
|
|
47
36
|
render() {
|
|
48
37
|
return (
|
package/src/Common/Reload.tsx
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import loadingFailure from '../Assets/Img/ic-loading-failure.png'
|
|
2
|
+
import loadingFailure from '../Assets/Img/ic-loading-failure.png'
|
|
3
|
+
import { ReloadType } from './Types'
|
|
3
4
|
|
|
4
|
-
export default function Reload({ reload
|
|
5
|
-
function refresh(e){
|
|
6
|
-
window.location.reload()
|
|
5
|
+
export default function Reload({ reload, className = '' }: ReloadType) {
|
|
6
|
+
function refresh(e) {
|
|
7
|
+
window.location.reload()
|
|
7
8
|
}
|
|
8
9
|
return (
|
|
9
|
-
<article className={`flex ${className}`}
|
|
10
|
-
<div className="flex column
|
|
11
|
-
<img src={loadingFailure} style={{
|
|
10
|
+
<article className={`flex w-100 h-100 ${className}`}>
|
|
11
|
+
<div className="flex column w-250 dc__align-center">
|
|
12
|
+
<img src={loadingFailure} style={{ height: 'auto' }} className="w-100 mb-12" alt="load-error" />
|
|
12
13
|
<h3 className="title dc__bold">Failed to load</h3>
|
|
13
|
-
<div className="dc__empty__subtitle"
|
|
14
|
-
|
|
14
|
+
<div className="dc__empty__subtitle mb-20">
|
|
15
|
+
We could not load this page. Please give us another try.
|
|
16
|
+
</div>
|
|
17
|
+
<button type="button" className="cta ghosted" onClick={typeof reload === 'function' ? reload : refresh}>
|
|
18
|
+
Retry
|
|
19
|
+
</button>
|
|
15
20
|
</div>
|
|
16
21
|
</article>
|
|
17
22
|
)
|
|
18
|
-
}
|
|
23
|
+
}
|
|
@@ -1,36 +1,8 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useRef } from 'react'
|
|
2
2
|
import Tippy from '@tippyjs/react'
|
|
3
|
-
import { Placement } from 'tippy.js'
|
|
4
3
|
import { ReactComponent as CloseIcon } from '../Assets/Icon/ic-cross.svg'
|
|
5
4
|
import 'tippy.js/animations/shift-toward-subtle.css'
|
|
6
|
-
import { TippyTheme } from './Types'
|
|
7
|
-
|
|
8
|
-
interface TippyCustomizedProps {
|
|
9
|
-
theme: TippyTheme
|
|
10
|
-
visible?: boolean
|
|
11
|
-
heading?: string
|
|
12
|
-
infoTextHeading?: string
|
|
13
|
-
placement: Placement
|
|
14
|
-
className?: string
|
|
15
|
-
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>
|
|
16
|
-
iconPath?: string
|
|
17
|
-
iconClass?: string
|
|
18
|
-
iconSize?: number // E.g. 16, 20, etc.. Currently, there are around 12 sizes supported. Check `icons.css` or `base.scss` for supported sizes or add new size (class names starts with `icon-dim-`).
|
|
19
|
-
onImageLoadError?: (e) => void
|
|
20
|
-
onClose?: () => void
|
|
21
|
-
infoText?: string
|
|
22
|
-
showCloseButton?: boolean
|
|
23
|
-
arrow?: boolean
|
|
24
|
-
interactive?: boolean
|
|
25
|
-
showOnCreate?: boolean
|
|
26
|
-
trigger?: string
|
|
27
|
-
animation?: string
|
|
28
|
-
duration?: number
|
|
29
|
-
additionalContent?: ReactNode
|
|
30
|
-
documentationLink?: string
|
|
31
|
-
documentationLinkText?: string
|
|
32
|
-
children: React.ReactElement<any>
|
|
33
|
-
}
|
|
5
|
+
import { TippyCustomizedProps, TippyTheme } from './Types'
|
|
34
6
|
|
|
35
7
|
// This component will handle some of the new tippy designs and interactions
|
|
36
8
|
// So this can be updated to support further for new features or interactions
|
package/src/Common/Types.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react'
|
|
2
|
+
import { Placement } from 'tippy.js'
|
|
1
3
|
export interface ResponseType {
|
|
2
4
|
code: number
|
|
3
5
|
status: string
|
|
@@ -29,3 +31,140 @@ export interface Teams {
|
|
|
29
31
|
name: string
|
|
30
32
|
active: boolean
|
|
31
33
|
}
|
|
34
|
+
|
|
35
|
+
export enum CHECKBOX_VALUE {
|
|
36
|
+
CHECKED = 'CHECKED',
|
|
37
|
+
INTERMEDIATE = 'INTERMEDIATE',
|
|
38
|
+
}
|
|
39
|
+
export interface CheckboxProps {
|
|
40
|
+
onChange: (event) => void
|
|
41
|
+
isChecked: boolean
|
|
42
|
+
value: 'CHECKED' | 'INTERMEDIATE'
|
|
43
|
+
disabled?: boolean
|
|
44
|
+
tabIndex?: number
|
|
45
|
+
rootClassName?: string
|
|
46
|
+
onClick?: (event) => void
|
|
47
|
+
id?: string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface TippyCustomizedProps {
|
|
51
|
+
theme: TippyTheme
|
|
52
|
+
visible?: boolean
|
|
53
|
+
heading?: string
|
|
54
|
+
infoTextHeading?: string
|
|
55
|
+
placement: Placement
|
|
56
|
+
className?: string
|
|
57
|
+
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>
|
|
58
|
+
iconPath?: string
|
|
59
|
+
iconClass?: string
|
|
60
|
+
iconSize?: number // E.g. 16, 20, etc.. Currently, there are around 12 sizes supported. Check `icons.css` or `base.scss` for supported sizes or add new size (class names starts with `icon-dim-`).
|
|
61
|
+
onImageLoadError?: (e) => void
|
|
62
|
+
onClose?: () => void
|
|
63
|
+
infoText?: string
|
|
64
|
+
showCloseButton?: boolean
|
|
65
|
+
arrow?: boolean
|
|
66
|
+
interactive?: boolean
|
|
67
|
+
showOnCreate?: boolean
|
|
68
|
+
trigger?: string
|
|
69
|
+
animation?: string
|
|
70
|
+
duration?: number
|
|
71
|
+
additionalContent?: ReactNode
|
|
72
|
+
documentationLink?: string
|
|
73
|
+
documentationLinkText?: string
|
|
74
|
+
children: React.ReactElement<any>
|
|
75
|
+
}
|
|
76
|
+
export interface GenericEmptyStateType {
|
|
77
|
+
title: ReactNode
|
|
78
|
+
image?
|
|
79
|
+
classname?: string
|
|
80
|
+
subTitle?: ReactNode
|
|
81
|
+
isButtonAvailable?: boolean
|
|
82
|
+
styles?: CSSProperties
|
|
83
|
+
heightToDeduct?: number
|
|
84
|
+
imageType?: string
|
|
85
|
+
renderButton?: () => JSX.Element
|
|
86
|
+
imageClassName?: string
|
|
87
|
+
children?: ReactNode
|
|
88
|
+
noImage?: boolean
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export enum ImageType {
|
|
92
|
+
Large = 'large',
|
|
93
|
+
Medium = 'medium',
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface InfoColourBarType {
|
|
97
|
+
message: React.ReactNode
|
|
98
|
+
classname: string
|
|
99
|
+
Icon
|
|
100
|
+
iconClass?: string
|
|
101
|
+
iconSize?: number // E.g. 16, 20, etc.. Currently, there are around 12 sizes supported. Check `icons.css` or `base.scss` for supported sizes or add new size (class names starts with `icon-dim-`).
|
|
102
|
+
renderActionButton?: () => JSX.Element
|
|
103
|
+
linkText?: React.ReactNode
|
|
104
|
+
redirectLink?: string
|
|
105
|
+
linkOnClick?: () => void
|
|
106
|
+
linkClass?: string
|
|
107
|
+
internalLink?: boolean
|
|
108
|
+
styles?: CSSProperties
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface ReloadType {
|
|
112
|
+
reload?: (event?: any) => void
|
|
113
|
+
className?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface RadioGroupItemProps {
|
|
117
|
+
value: string
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface RadioGroupProps {
|
|
121
|
+
value: string
|
|
122
|
+
name: string
|
|
123
|
+
disabled?: boolean
|
|
124
|
+
onChange: (event) => void
|
|
125
|
+
className?: string
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface ProgressingProps {
|
|
129
|
+
pageLoader?: boolean
|
|
130
|
+
loadingText?: string
|
|
131
|
+
size?: number
|
|
132
|
+
fullHeight?: boolean
|
|
133
|
+
theme?: 'white' | 'default'
|
|
134
|
+
styles?: React.CSSProperties
|
|
135
|
+
children?: React.ReactNode
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface PopupMenuType {
|
|
139
|
+
children?: any
|
|
140
|
+
onToggleCallback?: (isOpen: boolean) => void
|
|
141
|
+
autoClose?: boolean
|
|
142
|
+
autoPosition?: boolean
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface PopupMenuButtonType {
|
|
146
|
+
children?: ReactNode
|
|
147
|
+
disabled?: boolean
|
|
148
|
+
rootClassName?: string
|
|
149
|
+
tabIndex?: number
|
|
150
|
+
onHover?: boolean
|
|
151
|
+
isKebab?: boolean
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface PopupMenuBodyType {
|
|
155
|
+
children?: ReactNode
|
|
156
|
+
rootClassName?: string
|
|
157
|
+
style?: React.CSSProperties
|
|
158
|
+
autoWidth?: boolean
|
|
159
|
+
preventWheelDisable?: boolean
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface ModalType {
|
|
163
|
+
style?: React.CSSProperties
|
|
164
|
+
children?: ReactNode
|
|
165
|
+
modal?: boolean
|
|
166
|
+
rootClassName?: string
|
|
167
|
+
onClick?: any
|
|
168
|
+
callbackRef?: (element?: any) => any
|
|
169
|
+
preventWheelDisable?: boolean
|
|
170
|
+
}
|