@devtron-labs/devtron-fe-common-lib 0.0.6-beta-20 → 0.0.6-beta-22
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/Checkbox.d.ts +18 -0
- package/dist/Common/Constants.d.ts +16 -0
- package/dist/Common/CustomTagSelector/PropagateTagInfo.d.ts +3 -1
- package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +3 -0
- package/dist/Common/CustomTagSelector/TagDetails.d.ts +1 -1
- package/dist/Common/CustomTagSelector/TagLabelSelect.d.ts +1 -1
- package/dist/Common/CustomTagSelector/TagLabelValueSelector.d.ts +1 -1
- package/dist/Common/Error.d.ts +5 -3
- package/dist/Common/Helper.d.ts +2 -0
- package/dist/Common/Modals/Modal.d.ts +2 -1
- package/dist/Common/PopupMenu.d.ts +5 -3
- package/dist/Common/Types.d.ts +33 -8
- package/dist/Common/index.d.ts +1 -0
- package/dist/index.js +224 -70
- package/package.json +1 -1
- package/src/Assets/Icon/ic-cross.svg +3 -0
- package/src/Common/Checkbox.tsx +49 -0
- package/src/Common/Constants.ts +14 -1
- package/src/Common/CustomTagSelector/PropagateTagInfo.tsx +16 -7
- package/src/Common/CustomTagSelector/ResizableTagTextArea.tsx +74 -0
- package/src/Common/CustomTagSelector/TagDetails.tsx +19 -7
- package/src/Common/CustomTagSelector/TagLabelSelect.tsx +5 -3
- package/src/Common/CustomTagSelector/TagLabelValueSelector.tsx +49 -30
- package/src/Common/Error.tsx +12 -4
- package/src/Common/Helper.tsx +23 -0
- package/src/Common/Modals/Modal.tsx +39 -30
- package/src/Common/PopupMenu.tsx +114 -63
- package/src/Common/TippyCustomized.tsx +2 -2
- package/src/Common/Types.ts +42 -18
- package/src/Common/index.ts +2 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
export declare enum CHECKBOX_VALUE {
|
|
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
|
+
}
|
|
16
|
+
export declare class Checkbox extends Component<CheckboxProps> {
|
|
17
|
+
render(): JSX.Element;
|
|
18
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export declare const RequestTimeout = 60000;
|
|
2
2
|
export declare const Host: string;
|
|
3
|
+
export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
|
|
4
|
+
export declare const DOCUMENTATION: {
|
|
5
|
+
APP_TAGS: string;
|
|
6
|
+
APP_OVERVIEW_TAGS: string;
|
|
7
|
+
};
|
|
3
8
|
export declare const PATTERNS: {
|
|
4
9
|
KUBERNETES_KEY_PREFIX: RegExp;
|
|
5
10
|
KUBERNETES_KEY_NAME: RegExp;
|
|
@@ -9,3 +14,14 @@ export declare const PATTERNS: {
|
|
|
9
14
|
export declare const ROUTES: {
|
|
10
15
|
PROJECT_LIST_MIN: string;
|
|
11
16
|
};
|
|
17
|
+
export declare enum KEY_VALUE {
|
|
18
|
+
KEY = "key",
|
|
19
|
+
VALUE = "value"
|
|
20
|
+
}
|
|
21
|
+
export declare const DEFAULT_TAG_DATA: {
|
|
22
|
+
key: string;
|
|
23
|
+
value: string;
|
|
24
|
+
propagate: boolean;
|
|
25
|
+
isInvalidKey: boolean;
|
|
26
|
+
isInvalidValue: boolean;
|
|
27
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ResizableTagTextAreaProps } from '../Types';
|
|
3
|
+
export declare function ResizableTagTextArea({ className, minHeight, maxHeight, value, onChange, onBlur, onFocus, placeholder, tabIndex, refVar, dependentRef, }: ResizableTagTextAreaProps): JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TagDetailType } from '../Types';
|
|
3
|
-
export default function TagDetails({ index, tagData, setTagData, removeTag }: TagDetailType): JSX.Element;
|
|
3
|
+
export default function TagDetails({ index, tagData, setTagData, removeTag, tabIndex }: TagDetailType): JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TagLabelSelectType } from '../Types';
|
|
3
|
-
export declare const TagLabelSelect: ({ labelTags, setLabelTags }: TagLabelSelectType) => JSX.Element;
|
|
3
|
+
export declare const TagLabelSelect: ({ isCreateApp, labelTags, setLabelTags, tabIndex }: TagLabelSelectType) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TagLabelValueSelectorType } from '../Types';
|
|
3
|
-
export declare const TagLabelValueSelector: ({ selectedTagIndex, tagData, setTagData, tagOptions, isRequired,
|
|
3
|
+
export declare const TagLabelValueSelector: ({ selectedTagIndex, tagData, setTagData, tagOptions, isRequired, tagInputType, placeholder, tabIndex, refVar, dependentRef, }: TagLabelValueSelectorType) => JSX.Element;
|
package/dist/Common/Error.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
export declare class ErrorScreenManager extends Component<{
|
|
3
3
|
code?: number;
|
|
4
4
|
reload?: (...args: any[]) => any;
|
|
5
|
-
subtitle?:
|
|
5
|
+
subtitle?: React.ReactChild;
|
|
6
|
+
subtitleClass?: string;
|
|
6
7
|
reloadClass?: string;
|
|
7
8
|
}> {
|
|
8
9
|
getMessage(): JSX.Element | "Bad Request" | "Unauthorized" | "Not Found" | "Internal Server Error" | "Bad Gateway" | "Service Temporarily Unavailable";
|
|
9
10
|
render(): JSX.Element;
|
|
10
11
|
}
|
|
11
12
|
export declare class ErrorScreenNotAuthorized extends Component<{
|
|
12
|
-
subtitle:
|
|
13
|
+
subtitle: React.ReactChild;
|
|
14
|
+
subtitleClass?: string;
|
|
13
15
|
}> {
|
|
14
16
|
render(): JSX.Element;
|
|
15
17
|
}
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -7,4 +7,6 @@ interface ConditionalWrapper<T> {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
|
|
9
9
|
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 1 | -1 | 0;
|
|
10
|
+
export declare const stopPropagation: (event: any) => void;
|
|
11
|
+
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
|
10
12
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const Modal: ({ style, children, modal, rootClassName, onClick, callbackRef }: {
|
|
2
|
+
export declare const Modal: ({ style, children, modal, rootClassName, onClick, callbackRef, preventWheelDisable, }: {
|
|
3
3
|
style?: {};
|
|
4
4
|
children: any;
|
|
5
5
|
modal?: boolean;
|
|
6
6
|
rootClassName?: string;
|
|
7
7
|
onClick?: any;
|
|
8
8
|
callbackRef?: any;
|
|
9
|
+
preventWheelDisable?: boolean;
|
|
9
10
|
}) => React.ReactPortal;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare function PopupMenu({ children, onToggleCallback, autoClose }: {
|
|
2
|
+
declare function PopupMenu({ children, onToggleCallback, autoClose, autoPosition }: {
|
|
3
3
|
children?: any;
|
|
4
4
|
onToggleCallback?: any;
|
|
5
5
|
autoClose?: boolean;
|
|
6
|
+
autoPosition?: boolean;
|
|
6
7
|
}): any;
|
|
7
8
|
declare namespace PopupMenu {
|
|
8
|
-
var Button: ({ children, disabled, rootClassName, tabIndex, onHover, isKebab }: {
|
|
9
|
+
var Button: ({ children, disabled, rootClassName, tabIndex, onHover, isKebab, }: {
|
|
9
10
|
children?: any;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
rootClassName?: string;
|
|
@@ -13,11 +14,12 @@ declare namespace PopupMenu {
|
|
|
13
14
|
onHover?: boolean;
|
|
14
15
|
isKebab?: boolean;
|
|
15
16
|
}) => JSX.Element;
|
|
16
|
-
var Body: ({ children, rootClassName, style, autoWidth }: {
|
|
17
|
+
var Body: ({ children, rootClassName, style, autoWidth, preventWheelDisable }: {
|
|
17
18
|
children?: any;
|
|
18
19
|
rootClassName?: string;
|
|
19
20
|
style?: {};
|
|
20
21
|
autoWidth?: boolean;
|
|
22
|
+
preventWheelDisable?: boolean;
|
|
21
23
|
}) => JSX.Element;
|
|
22
24
|
}
|
|
23
25
|
export default PopupMenu;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { KEY_VALUE } from './Constants';
|
|
1
3
|
export interface ResponseType {
|
|
2
4
|
code: number;
|
|
3
5
|
status: string;
|
|
@@ -9,6 +11,14 @@ export interface APIOptions {
|
|
|
9
11
|
signal?: AbortSignal;
|
|
10
12
|
preventAutoLogout?: boolean;
|
|
11
13
|
}
|
|
14
|
+
export interface OptionType {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
export declare enum TippyTheme {
|
|
19
|
+
black = "black",
|
|
20
|
+
white = "white"
|
|
21
|
+
}
|
|
12
22
|
export interface TagType {
|
|
13
23
|
key: string;
|
|
14
24
|
value?: string;
|
|
@@ -18,23 +28,22 @@ export interface TagType {
|
|
|
18
28
|
isInvalidKey?: boolean;
|
|
19
29
|
isInvalidValue?: boolean;
|
|
20
30
|
}
|
|
21
|
-
export interface
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
export declare enum TippyTheme {
|
|
26
|
-
black = "black",
|
|
27
|
-
white = "white"
|
|
31
|
+
export interface TagErrorType {
|
|
32
|
+
isValid: boolean;
|
|
33
|
+
messages: string[];
|
|
28
34
|
}
|
|
29
35
|
export interface TagLabelSelectType {
|
|
36
|
+
isCreateApp?: boolean;
|
|
30
37
|
labelTags: TagType[];
|
|
31
38
|
setLabelTags: (tagList: TagType[]) => void;
|
|
39
|
+
tabIndex?: number;
|
|
32
40
|
}
|
|
33
41
|
export interface TagDetailType {
|
|
34
42
|
index: number;
|
|
35
43
|
tagData: TagType;
|
|
36
44
|
setTagData: (index: number, tagData: TagType) => void;
|
|
37
45
|
removeTag: (index: number) => void;
|
|
46
|
+
tabIndex?: number;
|
|
38
47
|
}
|
|
39
48
|
export interface TagLabelValueSelectorType {
|
|
40
49
|
selectedTagIndex: number;
|
|
@@ -42,8 +51,24 @@ export interface TagLabelValueSelectorType {
|
|
|
42
51
|
setTagData: (index: number, tagData: TagType) => void;
|
|
43
52
|
tagOptions?: OptionType[];
|
|
44
53
|
isRequired?: boolean;
|
|
45
|
-
|
|
54
|
+
tagInputType?: KEY_VALUE;
|
|
55
|
+
placeholder?: string;
|
|
56
|
+
tabIndex?: number;
|
|
57
|
+
refVar?: React.MutableRefObject<HTMLTextAreaElement>;
|
|
58
|
+
dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
|
|
59
|
+
}
|
|
60
|
+
export interface ResizableTagTextAreaProps {
|
|
61
|
+
className?: string;
|
|
62
|
+
minHeight?: number;
|
|
63
|
+
maxHeight?: number;
|
|
64
|
+
value?: string;
|
|
65
|
+
onChange?: (e: any) => void;
|
|
66
|
+
onBlur?: (e: any) => void;
|
|
67
|
+
onFocus?: (e: any) => void;
|
|
46
68
|
placeholder?: string;
|
|
69
|
+
tabIndex?: number;
|
|
70
|
+
refVar?: React.MutableRefObject<HTMLTextAreaElement>;
|
|
71
|
+
dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
|
|
47
72
|
}
|
|
48
73
|
export interface TeamList extends ResponseType {
|
|
49
74
|
result: Teams[];
|
package/dist/Common/index.d.ts
CHANGED