@devtron-labs/devtron-fe-common-lib 1.10.0-patch-1 → 1.10.0-patch-1-beta-1
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/{@code-editor-BuBwMXLu.js → @code-editor-DnkPfEkH.js} +8373 -7674
- package/dist/{@common-rjsf-DNb5M_NL.js → @common-rjsf-EEUy706E.js} +2 -2
- package/dist/{@framer-motion--UCnj55s.js → @framer-motion-DMD7dX-G.js} +972 -893
- package/dist/{@react-dates-B3_Y9Kyv.js → @react-dates-DxmDHBUI.js} +1 -1
- package/dist/{@react-select-DMzK6fkF.js → @react-select-BR4eLpVa.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-Ck5oyLp9.js → @react-virtualized-sticky-tree-Ca-pl6uN.js} +1 -1
- package/dist/{@vendor-DXbFZ041.js → @vendor-DZHtXPTX.js} +14866 -14544
- package/dist/Common/API/CoreAPI.d.ts +17 -0
- package/dist/Common/API/constants.d.ts +70 -0
- package/dist/Common/API/index.d.ts +3 -0
- package/dist/Common/API/types.d.ts +23 -0
- package/dist/Common/API/utils.d.ts +12 -0
- package/dist/Common/ClipboardButton/ClipboardButton.d.ts +1 -1
- package/dist/Common/ClipboardButton/types.d.ts +11 -0
- package/dist/Common/Constants.d.ts +5 -0
- package/dist/Common/DevtronCopyright.d.ts +2 -0
- package/dist/Common/Helper.d.ts +1 -0
- package/dist/Common/Types.d.ts +11 -0
- package/dist/Common/index.d.ts +2 -1
- package/dist/Shared/Analytics/analytics.d.ts +2 -0
- package/dist/Shared/Analytics/index.d.ts +2 -0
- package/dist/Shared/Analytics/types.d.ts +3 -0
- package/dist/Shared/Components/CountrySelect/CountrySelect.component.d.ts +3 -0
- package/dist/Shared/Components/CountrySelect/index.d.ts +1 -0
- package/dist/Shared/Components/CountrySelect/types.d.ts +7 -0
- package/dist/Shared/Components/CountrySelect/utils.d.ts +4 -0
- package/dist/Shared/Components/CustomInput/CustomInput.d.ts +1 -1
- package/dist/Shared/Components/CustomInput/types.d.ts +5 -1
- package/dist/Shared/Components/DevtronLicenseCard/DevtronLicenseCard.d.ts +3 -0
- package/dist/Shared/Components/DevtronLicenseCard/InstallationFingerprintInfo.d.ts +3 -0
- package/dist/Shared/Components/DevtronLicenseCard/index.d.ts +4 -0
- package/dist/Shared/Components/DevtronLicenseCard/types.d.ts +26 -0
- package/dist/Shared/Components/DevtronLicenseCard/utils.d.ts +6 -0
- package/dist/Shared/Components/FlagImage/FlagImage.component.d.ts +3 -0
- package/dist/Shared/Components/FlagImage/index.d.ts +1 -0
- package/dist/Shared/Components/FlagImage/types.d.ts +5 -0
- package/dist/Shared/Components/FormFieldWrapper/FormFieldWrapper.d.ts +1 -1
- package/dist/Shared/Components/FormFieldWrapper/index.d.ts +1 -0
- package/dist/Shared/Components/FormFieldWrapper/types.d.ts +4 -0
- package/dist/Shared/Components/Header/types.d.ts +0 -1
- package/dist/Shared/Components/Header/utils.d.ts +2 -0
- package/dist/Shared/Components/Icon/Icon.d.ts +18 -0
- package/dist/Shared/Components/LoginBanner/LoginBanner.d.ts +2 -0
- package/dist/Shared/Components/LoginBanner/constants.d.ts +4 -0
- package/dist/Shared/Components/LoginBanner/index.d.ts +1 -0
- package/dist/Shared/Components/LoginBanner/types.d.ts +7 -0
- package/dist/Shared/Components/PhoneInput/PhoneInput.component.d.ts +3 -0
- package/dist/Shared/Components/PhoneInput/index.d.ts +1 -0
- package/dist/Shared/Components/PhoneInput/types.d.ts +11 -0
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/Textarea/Textarea.component.d.ts +1 -1
- package/dist/Shared/Components/index.d.ts +6 -0
- package/dist/Shared/Helpers.d.ts +8 -1
- package/dist/Shared/Providers/ThemeProvider/utils.d.ts +1 -0
- package/dist/Shared/Providers/types.d.ts +8 -2
- package/dist/Shared/constants.d.ts +5 -0
- package/dist/Shared/index.d.ts +1 -0
- package/dist/Shared/types.d.ts +64 -0
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-73strings.ed7da294.svg +5 -0
- package/dist/assets/ic-apica.5a540546.svg +15 -0
- package/dist/assets/ic-ather.39aed36c.svg +11 -0
- package/dist/assets/ic-bharatpe.fc52fe6d.svg +15 -0
- package/dist/assets/ic-book-open.e839bbda.svg +3 -0
- package/dist/assets/ic-caret-left.3df25a7c.svg +3 -0
- package/dist/assets/ic-chat-circle-dots.b5afd171.svg +3 -0
- package/dist/assets/ic-cookr.d1510986.svg +26 -0
- package/dist/assets/ic-delhivery.7b49a398.svg +15 -0
- package/dist/assets/ic-devtron-header-logo.265be507.svg +4 -0
- package/dist/assets/ic-devtron.aca6cbaa.svg +3 -0
- package/dist/assets/ic-livspace.fc75c45f.svg +13 -0
- package/dist/assets/ic-quote.68f093fe.svg +3 -0
- package/dist/assets/ic-spinny.3884a5fb.svg +14 -0
- package/dist/assets/ic-tata1mg.75b97a64.svg +13 -0
- package/dist/assets/ic-timer.ae5f10fa.svg +19 -0
- package/dist/assets/ic-travclan.29b9f4c3.svg +13 -0
- package/dist/assets/login-screen-ui.a33a6496.webp +0 -0
- package/dist/index.d.ts +0 -3
- package/dist/index.js +807 -779
- package/package.json +2 -1
- package/dist/Common/Api.d.ts +0 -15
@@ -0,0 +1,17 @@
|
|
1
|
+
import { APIOptions, ResponseType } from '..';
|
2
|
+
import { CoreAPIConstructorParamsType } from './types';
|
3
|
+
declare class CoreAPI {
|
4
|
+
handleLogout: () => void;
|
5
|
+
handleRedirectToLicenseActivation?: () => void;
|
6
|
+
host: string;
|
7
|
+
timeout: number;
|
8
|
+
constructor({ handleLogout, host, timeout, handleRedirectToLicenseActivation }: CoreAPIConstructorParamsType);
|
9
|
+
private fetchAPI;
|
10
|
+
private fetchInTime;
|
11
|
+
post: <T = any, K = object>(url: string, data: K, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType<T>>;
|
12
|
+
put: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
|
13
|
+
patch: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
|
14
|
+
get: <T = any>(url: string, options?: APIOptions) => Promise<ResponseType<T>>;
|
15
|
+
trash: <T = any, K = object>(url: string, data?: K, options?: APIOptions) => Promise<ResponseType<T>>;
|
16
|
+
}
|
17
|
+
export default CoreAPI;
|
@@ -0,0 +1,70 @@
|
|
1
|
+
export declare const RESPONSE_MESSAGES: {
|
2
|
+
readonly 100: "Continue";
|
3
|
+
readonly 101: "Switching Protocols";
|
4
|
+
readonly 102: "Processing(WebDAV)";
|
5
|
+
readonly 200: "OK";
|
6
|
+
readonly 201: "Created";
|
7
|
+
readonly 202: "Accepted";
|
8
|
+
readonly 203: "Non - Authoritative Information";
|
9
|
+
readonly 204: "No Content";
|
10
|
+
readonly 205: "Reset Content";
|
11
|
+
readonly 206: "Partial Content";
|
12
|
+
readonly 207: "Multi - Status(WebDAV)";
|
13
|
+
readonly 208: "Already Reported(WebDAV)";
|
14
|
+
readonly 226: "IM Used";
|
15
|
+
readonly 300: "Multiple Choices";
|
16
|
+
readonly 301: "Moved Permanently";
|
17
|
+
readonly 302: "Found";
|
18
|
+
readonly 303: "See Other";
|
19
|
+
readonly 304: "Not Modified";
|
20
|
+
readonly 305: "Use Proxy";
|
21
|
+
readonly 307: "Temporary Redirect";
|
22
|
+
readonly 308: "Permanent Redirect(experimental)";
|
23
|
+
readonly 400: "Bad Request";
|
24
|
+
readonly 401: "Unauthorized";
|
25
|
+
readonly 402: "Payment Required";
|
26
|
+
readonly 403: "Forbidden";
|
27
|
+
readonly 404: "Not Found";
|
28
|
+
readonly 405: "Method Not Allowed";
|
29
|
+
readonly 406: "Not Acceptable";
|
30
|
+
readonly 407: "Proxy Authentication Required";
|
31
|
+
readonly 408: "Request Timeout";
|
32
|
+
readonly 409: "Conflict";
|
33
|
+
readonly 410: "Gone";
|
34
|
+
readonly 411: "Length Required";
|
35
|
+
readonly 412: "Precondition Failed";
|
36
|
+
readonly 413: "Request Entity Too Large";
|
37
|
+
readonly 414: "Request - URI Too Long";
|
38
|
+
readonly 415: "Unsupported Media Type";
|
39
|
+
readonly 416: "Requested Range Not Satisfiable";
|
40
|
+
readonly 417: "Expectation Failed";
|
41
|
+
readonly 418: "I'm a teapot";
|
42
|
+
readonly 420: "Enhance Your Calm(Twitter)";
|
43
|
+
readonly 422: "Unprocessable Entity(WebDAV)";
|
44
|
+
readonly 423: "Locked(WebDAV)";
|
45
|
+
readonly 424: "Failed Dependency(WebDAV)";
|
46
|
+
readonly 425: "Reserved for WebDAV";
|
47
|
+
readonly 426: "Upgrade Required";
|
48
|
+
readonly 428: "Precondition Required";
|
49
|
+
readonly 429: "Too Many Requests";
|
50
|
+
readonly 431: "Request Header Fields Too Large";
|
51
|
+
readonly 444: "No Response(Nginx)";
|
52
|
+
readonly 449: "Retry With(Microsoft)";
|
53
|
+
readonly 450: "Blocked by Windows Parental Controls(Microsoft)";
|
54
|
+
readonly 451: "Unavailable For Legal Reasons";
|
55
|
+
readonly 499: "Client Closed Request(Nginx)";
|
56
|
+
readonly 500: "Internal Server Error";
|
57
|
+
readonly 501: "Not Implemented";
|
58
|
+
readonly 502: "Bad Gateway";
|
59
|
+
readonly 503: "Service Unavailable";
|
60
|
+
readonly 504: "Gateway Timeout";
|
61
|
+
readonly 505: "HTTP Version Not Supported";
|
62
|
+
readonly 506: "Variant Also Negotiates(Experimental)";
|
63
|
+
readonly 507: "Insufficient Storage(WebDAV)";
|
64
|
+
readonly 508: "Loop Detected(WebDAV)";
|
65
|
+
readonly 509: "Bandwidth Limit Exceeded(Apache)";
|
66
|
+
readonly 510: "Not Extended";
|
67
|
+
readonly 511: "Network Authentication Required";
|
68
|
+
readonly 598: "Network read timeout error";
|
69
|
+
readonly 599: "Network connect timeout error";
|
70
|
+
};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export declare const post: <T = any, K = object>(url: string, data: K, options?: import('..').APIOptions, isMultipartRequest?: boolean) => Promise<import('..').ResponseType<T>>, put: <T = any, K = object>(url: string, data: K, options?: import('..').APIOptions) => Promise<import('..').ResponseType<T>>, patch: <T = any, K = object>(url: string, data: K, options?: import('..').APIOptions) => Promise<import('..').ResponseType<T>>, get: <T = any>(url: string, options?: import('..').APIOptions) => Promise<import('..').ResponseType<T>>, trash: <T = any, K = object>(url: string, data?: K, options?: import('..').APIOptions) => Promise<import('..').ResponseType<T>>;
|
2
|
+
export { getIsRequestAborted, abortPreviousRequests, handleRedirectToLicenseActivation } from './utils';
|
3
|
+
export { default as CoreAPI } from './CoreAPI';
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { APIOptions } from '..';
|
2
|
+
export interface CoreAPIConstructorParamsType {
|
3
|
+
handleLogout: () => void;
|
4
|
+
handleRedirectToLicenseActivation?: () => void;
|
5
|
+
/**
|
6
|
+
* @default Host
|
7
|
+
*/
|
8
|
+
host?: string;
|
9
|
+
/**
|
10
|
+
* @default FALLBACK_REQUEST_TIMEOUT
|
11
|
+
*/
|
12
|
+
timeout?: number;
|
13
|
+
}
|
14
|
+
export interface FetchInTimeParamsType<Data = object> {
|
15
|
+
url: string;
|
16
|
+
type: 'POST' | 'PUT' | 'PATCH' | 'GET' | 'DELETE';
|
17
|
+
data: Data;
|
18
|
+
options?: APIOptions;
|
19
|
+
isMultipartRequest?: boolean;
|
20
|
+
}
|
21
|
+
export interface FetchAPIParamsType<Data = object> extends Omit<FetchInTimeParamsType<Data>, 'options'>, Pick<APIOptions, 'preventAutoLogout' | 'preventLicenseRedirect' | 'shouldParseServerErrorForUnauthorizedUser'> {
|
22
|
+
signal: AbortSignal;
|
23
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { MutableRefObject } from 'react';
|
2
|
+
export declare const handleServerError: (contentType: string, response: Response) => Promise<never>;
|
3
|
+
/**
|
4
|
+
* Aborts the previous request before triggering next request
|
5
|
+
*/
|
6
|
+
export declare const abortPreviousRequests: <T>(callback: () => Promise<T>, abortControllerRef: MutableRefObject<AbortController>) => Promise<T>;
|
7
|
+
/**
|
8
|
+
* Returns true if the error is due to a aborted request
|
9
|
+
*/
|
10
|
+
export declare const getIsRequestAborted: (error: any) => boolean;
|
11
|
+
export declare const handleDashboardLogout: () => void;
|
12
|
+
export declare const handleRedirectToLicenseActivation: () => void;
|
@@ -7,4 +7,4 @@ import { default as ClipboardProps } from './types';
|
|
7
7
|
* @param rootClassName - additional classes to add to button
|
8
8
|
* @param iconSize - size of svg icon to be shown, default 16 (icon-dim-16)
|
9
9
|
*/
|
10
|
-
export declare const ClipboardButton: ({ content, copiedTippyText, duration, copyToClipboardPromise, rootClassName, iconSize, }: ClipboardProps) => JSX.Element;
|
10
|
+
export declare const ClipboardButton: ({ content, initialTippyText, copiedTippyText, duration, copyToClipboardPromise, rootClassName, iconSize, onClick, }: ClipboardProps) => JSX.Element;
|
@@ -1,8 +1,19 @@
|
|
1
1
|
export default interface ClipboardProps {
|
2
2
|
content: string;
|
3
|
+
/**
|
4
|
+
* tippy text before copying
|
5
|
+
*/
|
6
|
+
initialTippyText?: string;
|
7
|
+
/**
|
8
|
+
* tippy text after copying
|
9
|
+
*/
|
3
10
|
copiedTippyText?: string;
|
11
|
+
/**
|
12
|
+
* reset duration after copying
|
13
|
+
*/
|
4
14
|
duration?: number;
|
5
15
|
copyToClipboardPromise?: Promise<void>;
|
6
16
|
rootClassName?: string;
|
7
17
|
iconSize?: number;
|
18
|
+
onClick?: () => void;
|
8
19
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
export declare const FALLBACK_REQUEST_TIMEOUT = 60000;
|
2
2
|
export declare const Host: string;
|
3
3
|
export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
|
4
|
+
export declare const DEVTRON_HOME_PAGE = "https://devtron.ai/";
|
4
5
|
export declare const DOCUMENTATION_VERSION = "/v/v0.7";
|
5
6
|
export declare const DISCORD_LINK = "https://discord.devtron.ai/";
|
6
7
|
export declare const DEFAULT_JSON_SCHEMA_URI = "https://json-schema.org/draft/2020-12/schema";
|
@@ -65,6 +66,7 @@ export declare const URLS: {
|
|
65
66
|
readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP: "/global-config/templates/devtron-apps";
|
66
67
|
readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_CREATE: "/global-config/templates/devtron-apps/create";
|
67
68
|
readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_DETAIL: "/global-config/templates/devtron-apps/detail/:appId";
|
69
|
+
readonly LICENSE_AUTH: "/license-auth";
|
68
70
|
};
|
69
71
|
export declare const ROUTES: {
|
70
72
|
readonly APP: "app";
|
@@ -126,6 +128,7 @@ export declare const ROUTES: {
|
|
126
128
|
readonly NODE_CAPACITY: "k8s/capacity/node";
|
127
129
|
readonly RESOURCE_TEMPLATE: "resource/template";
|
128
130
|
readonly ENVIRONMENT_DATA: "global/environment-variables";
|
131
|
+
readonly DASHBOARD_EVENT: "dashboard-event";
|
129
132
|
};
|
130
133
|
export declare enum KEY_VALUE {
|
131
134
|
KEY = "key",
|
@@ -287,6 +290,7 @@ export declare const API_STATUS_CODES: {
|
|
287
290
|
PERMISSION_DENIED: number;
|
288
291
|
NOT_FOUND: number;
|
289
292
|
REQUEST_TIMEOUT: number;
|
293
|
+
CONFLICT: number;
|
290
294
|
EXPECTATION_FAILED: number;
|
291
295
|
UNPROCESSABLE_ENTITY: number;
|
292
296
|
LOCKED: number;
|
@@ -318,6 +322,7 @@ export declare const DATE_TIME_FORMATS: {
|
|
318
322
|
TWELVE_HOURS_EXPORT_FORMAT: string;
|
319
323
|
DD_MMM_YYYY_HH_MM: string;
|
320
324
|
DD_MMM_YYYY: string;
|
325
|
+
'DD/MM/YYYY': string;
|
321
326
|
};
|
322
327
|
export declare const SEMANTIC_VERSION_DOCUMENTATION_LINK = "https://semver.org/";
|
323
328
|
export declare const VULNERABILITIES_SORT_PRIORITY: {
|
package/dist/Common/Helper.d.ts
CHANGED
@@ -143,4 +143,5 @@ export declare const getGoLangFormattedDateWithTimezone: (dateFormat: string) =>
|
|
143
143
|
* @returns SHA-256 hashed value
|
144
144
|
*/
|
145
145
|
export declare const getHashedValue: (value: string) => Promise<string | null>;
|
146
|
+
export declare const getTTLInHumanReadableFormat: (ttl: number) => string;
|
146
147
|
export {};
|
package/dist/Common/Types.d.ts
CHANGED
@@ -30,7 +30,18 @@ export interface APIOptions {
|
|
30
30
|
*/
|
31
31
|
signal?: AbortSignal;
|
32
32
|
abortControllerRef?: MutableRefObject<AbortController>;
|
33
|
+
/**
|
34
|
+
* @default false
|
35
|
+
*/
|
33
36
|
preventAutoLogout?: boolean;
|
37
|
+
/**
|
38
|
+
* @default false
|
39
|
+
*/
|
40
|
+
preventLicenseRedirect?: boolean;
|
41
|
+
/**
|
42
|
+
* @default false
|
43
|
+
*/
|
44
|
+
shouldParseServerErrorForUnauthorizedUser?: boolean;
|
34
45
|
}
|
35
46
|
export interface OptionType<T = string, K = string> {
|
36
47
|
value: T;
|
package/dist/Common/index.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
export * from './Constants';
|
2
2
|
export * from './ServerError';
|
3
3
|
export * from './Types';
|
4
|
-
export * from './Api';
|
5
4
|
export { default as Reload } from './Reload';
|
6
5
|
export { default as ErrorScreenManager } from './ErrorScreenManager';
|
7
6
|
export { default as ErrorScreenNotAuthorized } from './ErrorScreenNotAuthorized';
|
@@ -50,4 +49,6 @@ export * from './SegmentedBarChart';
|
|
50
49
|
export * from './CodeEditor/types';
|
51
50
|
export * from './Tooltip';
|
52
51
|
export * from './SegmentedControl';
|
52
|
+
export * from './API';
|
53
53
|
export * from './DeleteCINodeButton';
|
54
|
+
export { default as DevtronCopyright } from './DevtronCopyright';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as CountrySelect } from './CountrySelect.component';
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { CountryISO2Type } from '../../index';
|
2
|
+
import { SelectPickerProps } from '../SelectPicker';
|
3
|
+
export interface CountrySelectProps extends Pick<SelectPickerProps, 'required' | 'label' | 'error' | 'placeholder' | 'size' | 'onMenuOpen' | 'onMenuClose'>, Required<Pick<SelectPickerProps, 'name'>> {
|
4
|
+
selectedCountry: CountryISO2Type;
|
5
|
+
handleChange: (iso2: CountryISO2Type) => void;
|
6
|
+
variant?: 'default' | 'selectPhoneCode';
|
7
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { ParsedCountry } from 'react-international-phone';
|
2
|
+
import { CountrySelectProps } from './types';
|
3
|
+
import { SelectPickerOptionType } from '../SelectPicker';
|
4
|
+
export declare const getCountryOptions: (variant: CountrySelectProps["variant"]) => SelectPickerOptionType<ParsedCountry>[];
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { CustomInputProps } from './types';
|
2
|
-
declare const CustomInput: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderConfig, borderRadiusConfig, type, autoFocus, endIconButtonConfig, labelTippyCustomizedConfig, labelTooltipConfig, ...props }: CustomInputProps) => JSX.Element;
|
2
|
+
declare const CustomInput: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderConfig, borderRadiusConfig, type, autoFocus, endIconButtonConfig, labelTippyCustomizedConfig, labelTooltipConfig, inputRef: inputRefProp, hideFormFieldInfo, ...props }: CustomInputProps) => JSX.Element;
|
3
3
|
export default CustomInput;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { InputHTMLAttributes } from 'react';
|
1
|
+
import { InputHTMLAttributes, MutableRefObject } from 'react';
|
2
2
|
import { ComponentSizeType } from '../../constants';
|
3
3
|
import { FormFieldWrapperProps } from '../FormFieldWrapper';
|
4
4
|
import { ButtonComponentType, ButtonProps } from '../Button';
|
@@ -27,6 +27,10 @@ export interface CustomInputProps extends Omit<FormFieldWrapperProps, 'children'
|
|
27
27
|
* End icon button configuration
|
28
28
|
*/
|
29
29
|
endIconButtonConfig?: Required<Pick<ButtonProps<ButtonComponentType.button>, 'icon' | 'onClick' | 'ariaLabel'>> & Pick<ButtonProps<ButtonComponentType.button>, 'disabled' | 'showAriaLabelInTippy' | 'style'>;
|
30
|
+
/**
|
31
|
+
* Ref for the input element
|
32
|
+
*/
|
33
|
+
inputRef?: MutableRefObject<HTMLInputElement>;
|
30
34
|
}
|
31
35
|
export interface PasswordFieldProps extends Omit<CustomInputProps, 'endIconButtonConfig' | 'type'> {
|
32
36
|
/**
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { DevtronLicenseCardProps } from '../../index';
|
2
|
+
export declare const DevtronLicenseCard: ({ enterpriseName, licenseKey, licenseSuffix, expiryDate, licenseStatus, isTrial, ttl, appTheme, onCopyButtonClick, }: DevtronLicenseCardProps) => JSX.Element;
|
3
|
+
export default DevtronLicenseCard;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { AppThemeType, DevtronLicenseBaseDTO, DevtronLicenseDTO } from '../../index';
|
2
|
+
export declare enum LicenseStatus {
|
3
|
+
ACTIVE = "ACTIVE",
|
4
|
+
EXPIRED = "EXPIRED",
|
5
|
+
REMINDER_THRESHOLD_REACHED = "REMINDER_THRESHOLD_REACHED"
|
6
|
+
}
|
7
|
+
export type DevtronLicenseCardProps = {
|
8
|
+
enterpriseName: string;
|
9
|
+
expiryDate: string;
|
10
|
+
ttl: number;
|
11
|
+
licenseStatus: LicenseStatus;
|
12
|
+
isTrial: boolean;
|
13
|
+
appTheme: AppThemeType;
|
14
|
+
} & ({
|
15
|
+
licenseKey: string;
|
16
|
+
onCopyButtonClick?: () => void;
|
17
|
+
licenseSuffix?: never;
|
18
|
+
} | {
|
19
|
+
licenseKey?: never;
|
20
|
+
onCopyButtonClick?: never;
|
21
|
+
licenseSuffix: string;
|
22
|
+
});
|
23
|
+
export type DevtronLicenseInfo = Omit<DevtronLicenseCardProps, 'appTheme'> & Pick<DevtronLicenseDTO, 'fingerprint' | 'showLicenseData' | 'licenseStatusError'>;
|
24
|
+
export interface InstallFingerprintInfoProps extends Pick<DevtronLicenseBaseDTO, 'fingerprint'> {
|
25
|
+
showHelpTooltip?: boolean;
|
26
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { DevtronLicenseCardProps, DevtronLicenseDTO, LicenseStatus } from '../../index';
|
2
|
+
export declare const getLicenseColorsAccordingToStatus: (licenseStatus: LicenseStatus) => {
|
3
|
+
bgColor: string;
|
4
|
+
textColor: string;
|
5
|
+
};
|
6
|
+
export declare const parseDevtronLicenseDTOIntoLicenseCardData: <isCentralDashboard extends boolean = false>(licenseDTO: DevtronLicenseDTO<isCentralDashboard>, currentUserEmail?: isCentralDashboard extends true ? string : never) => Omit<DevtronLicenseCardProps, "appTheme">;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as FlagImage } from './FlagImage.component';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { FormFieldWrapperProps } from './types';
|
2
|
-
declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, labelTippyCustomizedConfig, labelTooltipConfig, }: Required<FormFieldWrapperProps>) => JSX.Element;
|
2
|
+
declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, labelTippyCustomizedConfig, labelTooltipConfig, hideFormFieldInfo, }: Omit<Required<FormFieldWrapperProps>, "hideFormFieldInfo"> & Pick<FormFieldWrapperProps, "hideFormFieldInfo">) => JSX.Element;
|
3
3
|
export default FormFieldWrapper;
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import { DevtronLicenseInfo } from '../DevtronLicenseCard';
|
1
2
|
export declare const getDateInMilliseconds: (days: any) => number;
|
2
3
|
export declare const handlePostHogEventUpdate: (eventName: string) => Promise<void>;
|
3
4
|
export declare const setActionWithExpiry: (key: string, days: number) => void;
|
5
|
+
export declare const getIsShowingLicenseData: (licenseData: DevtronLicenseInfo) => boolean;
|
@@ -1,16 +1,24 @@
|
|
1
1
|
import { IconBaseProps } from './types';
|
2
2
|
export declare const iconMap: {
|
3
|
+
'ic-73strings': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
3
4
|
'ic-aborted': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
4
5
|
'ic-add': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
6
|
+
'ic-apica': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
5
7
|
'ic-app-group': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
6
8
|
'ic-arrow-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
9
|
+
'ic-ather': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
7
10
|
'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
11
|
+
'ic-bharatpe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
8
12
|
'ic-bitbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
13
|
+
'ic-book-open': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
9
14
|
'ic-browser': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
10
15
|
'ic-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
16
|
+
'ic-calendar': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
11
17
|
'ic-cancelled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
12
18
|
'ic-card-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
19
|
+
'ic-caret-left': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
13
20
|
'ic-cd': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
21
|
+
'ic-chat-circle-dots': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
14
22
|
'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
15
23
|
'ic-ci-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
16
24
|
'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -18,10 +26,14 @@ export declare const iconMap: {
|
|
18
26
|
'ic-close-small': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
19
27
|
'ic-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
20
28
|
'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
29
|
+
'ic-cookr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
21
30
|
'ic-copy': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
22
31
|
'ic-crown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
23
32
|
'ic-cube': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
24
33
|
'ic-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
34
|
+
'ic-delhivery': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
35
|
+
'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
36
|
+
'ic-devtron': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
25
37
|
'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
26
38
|
'ic-ecr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
27
39
|
'ic-env': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -47,6 +59,7 @@ export declare const iconMap: {
|
|
47
59
|
'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
48
60
|
'ic-k8s-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
49
61
|
'ic-ldap': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
62
|
+
'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
50
63
|
'ic-login-devtron-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
51
64
|
'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
52
65
|
'ic-medium-paintbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -62,11 +75,16 @@ export declare const iconMap: {
|
|
62
75
|
'ic-out-of-sync': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
63
76
|
'ic-paper-plane-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
64
77
|
'ic-quay': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
78
|
+
'ic-quote': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
65
79
|
'ic-shield-check': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
80
|
+
'ic-spinny': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
66
81
|
'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
67
82
|
'ic-success': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
68
83
|
'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
84
|
+
'ic-tata1mg': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
69
85
|
'ic-timeout-two-dash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
86
|
+
'ic-timer': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
87
|
+
'ic-travclan': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
70
88
|
'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
71
89
|
'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
72
90
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as LoginBanner } from './LoginBanner';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as PhoneInput } from './PhoneInput.component';
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ComponentProps } from 'react';
|
2
|
+
import { CountrySelect } from '../CountrySelect';
|
3
|
+
export interface PhoneInputProps {
|
4
|
+
phoneValue: string;
|
5
|
+
onChange: (value: string, hasCountryChanged: boolean) => void;
|
6
|
+
error?: string | null;
|
7
|
+
countryCodeSelectName: string;
|
8
|
+
phoneNumberInputName: string;
|
9
|
+
required?: boolean;
|
10
|
+
countryCodeSelectSize?: ComponentProps<typeof CountrySelect>['size'];
|
11
|
+
}
|
@@ -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, warningText, layout, ariaLabel, borderConfig, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, ...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, borderConfig, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, hideFormFieldInfo, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
138
138
|
export default SelectPicker;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { TextareaProps } from './types';
|
2
|
-
declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, labelTooltipConfig, labelTippyCustomizedConfig, value, borderConfig, ...props }: TextareaProps) => JSX.Element;
|
2
|
+
declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, labelTooltipConfig, labelTippyCustomizedConfig, hideFormFieldInfo, value, borderConfig, ...props }: TextareaProps) => JSX.Element;
|
3
3
|
export default Textarea;
|
@@ -69,4 +69,10 @@ export * from './CustomInput';
|
|
69
69
|
export * from './InfoBlock';
|
70
70
|
export * from './CodeEditorWrapper';
|
71
71
|
export * from './SSOProviderIcon';
|
72
|
+
export * from './Backdrop';
|
73
|
+
export * from './CountrySelect';
|
74
|
+
export * from './PhoneInput';
|
75
|
+
export * from './FlagImage';
|
76
|
+
export * from './DevtronLicenseCard';
|
77
|
+
export * from './LoginBanner';
|
72
78
|
export * from './Confetti';
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -4,7 +4,7 @@ import { Pair } from 'yaml';
|
|
4
4
|
import { StrictRJSFSchema } from '@rjsf/utils';
|
5
5
|
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
6
6
|
import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } from '../Common';
|
7
|
-
import { BorderConfigType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
7
|
+
import { BorderConfigType, CentralAPILocalConfig, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
8
8
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
9
9
|
interface HighlightSearchTextProps {
|
10
10
|
/**
|
@@ -100,4 +100,11 @@ export declare const deriveBorderRadiusAndBorderClassFromConfig: ({ borderConfig
|
|
100
100
|
borderRadiusConfig: BorderConfigType | undefined;
|
101
101
|
}) => string;
|
102
102
|
export declare const getClassNameForStickyHeaderWithShadow: (isStuck: boolean, topClassName?: string) => string;
|
103
|
+
export declare const clearCookieOnLogout: () => void;
|
104
|
+
export declare const getCentralAPIHealthObjectFromLocalStorage: () => CentralAPILocalConfig;
|
105
|
+
/**
|
106
|
+
*
|
107
|
+
* @returns null if we do not know yet
|
108
|
+
*/
|
109
|
+
export declare const getCentralAPIHealthFromLocalStorage: () => boolean | null;
|
103
110
|
export {};
|
@@ -4,4 +4,5 @@ export declare const setThemePreferenceInLocalStorage: (themePreference: ThemePr
|
|
4
4
|
export declare const logThemeToAnalytics: ({ appTheme, themePreference }: ThemeConfigType) => void;
|
5
5
|
export declare const getThemeConfigFromLocalStorage: () => ThemeConfigType;
|
6
6
|
export declare const getComponentSpecificThemeClass: (appTheme: AppThemeType) => string;
|
7
|
+
export declare const getThemeOppositeThemeClass: (appTheme: AppThemeType) => "component-specific-theme__light" | "component-specific-theme__dark";
|
7
8
|
export declare const getThemePreferenceText: (themePreference: ThemePreferenceType) => string;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { MutableRefObject, ReactNode } from 'react';
|
1
|
+
import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
|
2
2
|
import { ServerInfo } from '../Components/Header/types';
|
3
3
|
import { SERVER_MODE } from '../../Common';
|
4
|
+
import { DevtronLicenseInfo, LicenseInfoDialogType } from '..';
|
4
5
|
export interface MainContext {
|
5
6
|
serverMode: SERVER_MODE;
|
6
7
|
setServerMode: (serverMode: SERVER_MODE) => void;
|
7
8
|
isHelpGettingStartedClicked: boolean;
|
8
|
-
setPageOverflowEnabled: (isPageOverflowEnabled: boolean) => void;
|
9
9
|
showCloseButtonAfterGettingStartedClicked: () => void;
|
10
10
|
loginCount: number;
|
11
11
|
setLoginCount: (loginCount: number) => void;
|
@@ -39,6 +39,12 @@ export interface MainContext {
|
|
39
39
|
isManifestScanningEnabled: boolean;
|
40
40
|
canOnlyViewPermittedEnvOrgLevel: boolean;
|
41
41
|
viewIsPipelineRBACConfiguredNode: ReactNode;
|
42
|
+
handleOpenLicenseInfoDialog: (initialDialogType?: LicenseInfoDialogType.ABOUT | LicenseInfoDialogType.LICENSE) => void;
|
43
|
+
/**
|
44
|
+
* Data is set only if showLicenseData is received as true
|
45
|
+
*/
|
46
|
+
licenseData: DevtronLicenseInfo;
|
47
|
+
setLicenseData: Dispatch<SetStateAction<DevtronLicenseInfo>>;
|
42
48
|
}
|
43
49
|
export interface MainContextProviderProps {
|
44
50
|
children: ReactNode;
|