@devtron-labs/devtron-fe-common-lib 1.8.9 → 1.8.10-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-lo8klth9.js → @code-editor-DzhuxG2q.js} +7778 -7321
- package/dist/{@common-rjsf-GcRslnd9.js → @common-rjsf-DeAABiF4.js} +2 -2
- package/dist/{@framer-motion-DWs0_8aB.js → @framer-motion-DZUlzA7e.js} +114 -114
- package/dist/{@react-dates-CHCZFrgt.js → @react-dates-RijHSFem.js} +243 -243
- package/dist/{@react-select-Dn2Z7PBK.js → @react-select-Ca8t5EwF.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-KcWdTSlv.js → @react-virtualized-sticky-tree-BtIGiPdm.js} +1 -1
- package/dist/{@vendor-C6JiJKw0.js → @vendor-4tuBSE-O.js} +13375 -13054
- package/dist/Common/API/CoreAPI.d.ts +16 -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 +26 -0
- package/dist/Common/API/utils.d.ts +11 -0
- package/dist/Common/Constants.d.ts +2 -0
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/SegmentedBarChart/types.d.ts +1 -0
- package/dist/Common/index.d.ts +1 -1
- 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/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/Icon/Icon.d.ts +7 -0
- package/dist/Shared/Components/LicenseInfoDialog/LicenseInfoDialog.components.d.ts +31 -0
- package/dist/Shared/Components/LicenseInfoDialog/LicenseInfoDialog.d.ts +2 -0
- package/dist/Shared/Components/LicenseInfoDialog/UpdateLicenseDialog.d.ts +2 -0
- package/dist/Shared/Components/LicenseInfoDialog/constants.d.ts +2 -0
- package/dist/Shared/Components/LicenseInfoDialog/index.d.ts +2 -0
- package/dist/Shared/Components/LicenseInfoDialog/types.d.ts +5 -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/Security/SecurityModal/utils.d.ts +1 -1
- package/dist/Shared/Components/index.d.ts +5 -0
- package/dist/Shared/Helpers.d.ts +5 -1
- package/dist/Shared/Hooks/index.d.ts +1 -0
- package/dist/Shared/Hooks/useStickyEvent/constants.d.ts +3 -0
- package/dist/Shared/Hooks/useStickyEvent/index.d.ts +1 -0
- package/dist/Shared/Hooks/useStickyEvent/types.d.ts +32 -0
- package/dist/Shared/Hooks/useStickyEvent/useStickyEvent.d.ts +8 -0
- package/dist/Shared/Hooks/useStickyEvent/utils.d.ts +2 -0
- package/dist/Shared/constants.d.ts +2 -0
- package/dist/Shared/types.d.ts +33 -0
- package/dist/assets/@code-editor.css +1 -1
- 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-devtron-header-logo.7dc157aa.svg +4 -0
- package/dist/assets/ic-devtron.b509a49f.svg +4 -0
- package/dist/assets/ic-key.56432553.svg +19 -0
- package/dist/assets/ic-timer.56e79173.svg +19 -0
- package/dist/index.js +767 -754
- package/package.json +2 -1
- package/dist/Common/Api.d.ts +0 -15
@@ -0,0 +1,16 @@
|
|
1
|
+
import { APIOptions, ResponseType } from '..';
|
2
|
+
import { CoreAPIConstructorParamsType } from './types';
|
3
|
+
declare class CoreAPI {
|
4
|
+
handleLogout: () => void;
|
5
|
+
host: string;
|
6
|
+
timeout: number;
|
7
|
+
constructor({ handleLogout, host, timeout }: CoreAPIConstructorParamsType);
|
8
|
+
private fetchAPI;
|
9
|
+
private fetchInTime;
|
10
|
+
post: <T = any, K = object>(url: string, data: K, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType<T>>;
|
11
|
+
put: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
|
12
|
+
patch: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
|
13
|
+
get: <T = any>(url: string, options?: APIOptions) => Promise<ResponseType<T>>;
|
14
|
+
trash: <T = any, K = object>(url: string, data?: K, options?: APIOptions) => Promise<ResponseType<T>>;
|
15
|
+
}
|
16
|
+
export default CoreAPI;
|
@@ -0,0 +1,70 @@
|
|
1
|
+
export declare const RESPONSE_MESSAGES: {
|
2
|
+
100: string;
|
3
|
+
101: string;
|
4
|
+
102: string;
|
5
|
+
200: string;
|
6
|
+
201: string;
|
7
|
+
202: string;
|
8
|
+
203: string;
|
9
|
+
204: string;
|
10
|
+
205: string;
|
11
|
+
206: string;
|
12
|
+
207: string;
|
13
|
+
208: string;
|
14
|
+
226: string;
|
15
|
+
300: string;
|
16
|
+
301: string;
|
17
|
+
302: string;
|
18
|
+
303: string;
|
19
|
+
304: string;
|
20
|
+
305: string;
|
21
|
+
307: string;
|
22
|
+
308: string;
|
23
|
+
400: string;
|
24
|
+
401: string;
|
25
|
+
402: string;
|
26
|
+
403: string;
|
27
|
+
404: string;
|
28
|
+
405: string;
|
29
|
+
406: string;
|
30
|
+
407: string;
|
31
|
+
408: string;
|
32
|
+
409: string;
|
33
|
+
410: string;
|
34
|
+
411: string;
|
35
|
+
412: string;
|
36
|
+
413: string;
|
37
|
+
414: string;
|
38
|
+
415: string;
|
39
|
+
416: string;
|
40
|
+
417: string;
|
41
|
+
418: string;
|
42
|
+
420: string;
|
43
|
+
422: string;
|
44
|
+
423: string;
|
45
|
+
424: string;
|
46
|
+
425: string;
|
47
|
+
426: string;
|
48
|
+
428: string;
|
49
|
+
429: string;
|
50
|
+
431: string;
|
51
|
+
444: string;
|
52
|
+
449: string;
|
53
|
+
450: string;
|
54
|
+
451: string;
|
55
|
+
499: string;
|
56
|
+
500: string;
|
57
|
+
501: string;
|
58
|
+
502: string;
|
59
|
+
503: string;
|
60
|
+
504: string;
|
61
|
+
505: string;
|
62
|
+
506: string;
|
63
|
+
507: string;
|
64
|
+
508: string;
|
65
|
+
509: string;
|
66
|
+
510: string;
|
67
|
+
511: string;
|
68
|
+
598: string;
|
69
|
+
599: string;
|
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 } from './utils';
|
3
|
+
export { default as CoreAPI } from './CoreAPI';
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { APIOptions } from '..';
|
2
|
+
export interface CoreAPIConstructorParamsType {
|
3
|
+
handleLogout: () => void;
|
4
|
+
/**
|
5
|
+
* @default Host
|
6
|
+
*/
|
7
|
+
host?: string;
|
8
|
+
/**
|
9
|
+
* @default FALLBACK_REQUEST_TIMEOUT
|
10
|
+
*/
|
11
|
+
timeout?: number;
|
12
|
+
}
|
13
|
+
export interface FetchInTimeParamsType<Data = object> {
|
14
|
+
url: string;
|
15
|
+
type: 'POST' | 'PUT' | 'PATCH' | 'GET' | 'DELETE';
|
16
|
+
data: Data;
|
17
|
+
options?: APIOptions;
|
18
|
+
isMultipartRequest?: boolean;
|
19
|
+
}
|
20
|
+
export interface FetchAPIParamsType<Data = object> extends Omit<FetchInTimeParamsType<Data>, 'options'> {
|
21
|
+
signal: AbortSignal;
|
22
|
+
/**
|
23
|
+
* @default false
|
24
|
+
*/
|
25
|
+
preventAutoLogout?: boolean;
|
26
|
+
}
|
@@ -0,0 +1,11 @@
|
|
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;
|
@@ -281,6 +281,7 @@ export declare const API_STATUS_CODES: {
|
|
281
281
|
PERMISSION_DENIED: number;
|
282
282
|
NOT_FOUND: number;
|
283
283
|
REQUEST_TIMEOUT: number;
|
284
|
+
CONFLICT: number;
|
284
285
|
EXPECTATION_FAILED: number;
|
285
286
|
UNPROCESSABLE_ENTITY: number;
|
286
287
|
LOCKED: number;
|
@@ -312,6 +313,7 @@ export declare const DATE_TIME_FORMATS: {
|
|
312
313
|
TWELVE_HOURS_EXPORT_FORMAT: string;
|
313
314
|
DD_MMM_YYYY_HH_MM: string;
|
314
315
|
DD_MMM_YYYY: string;
|
316
|
+
'DD/MM/YYYY': string;
|
315
317
|
};
|
316
318
|
export declare const SEMANTIC_VERSION_DOCUMENTATION_LINK = "https://semver.org/";
|
317
319
|
export declare const VULNERABILITIES_SORT_PRIORITY: {
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { default as RJSF } from '@rjsf/core';
|
2
2
|
import { FormProps } from './types';
|
3
|
-
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "className" | "children" | "disabled" | "id" | "name" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "autoComplete" | "noValidate" | "tagName" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "action" | "enctype" | "
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "className" | "children" | "disabled" | "id" | "name" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "autoComplete" | "noValidate" | "method" | "tagName" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "action" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<any, import('./types').RJSFFormSchema, any>>>;
|
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,3 +49,4 @@ export * from './SegmentedBarChart';
|
|
50
49
|
export * from './CodeEditor/types';
|
51
50
|
export * from './Tooltip';
|
52
51
|
export * from './SegmentedControl';
|
52
|
+
export * from './API';
|
@@ -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'>, 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, ...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 @@
|
|
1
|
+
export { default as FlagImage } from './FlagImage.component';
|
@@ -5,10 +5,13 @@ export declare const iconMap: {
|
|
5
5
|
'ic-arrow-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
6
6
|
'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
7
7
|
'ic-bitbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
8
|
+
'ic-book-open': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
8
9
|
'ic-browser': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
9
10
|
'ic-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
10
11
|
'ic-cancelled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
12
|
+
'ic-caret-left': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
11
13
|
'ic-cd': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
14
|
+
'ic-chat-circle-dots': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
12
15
|
'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
13
16
|
'ic-ci-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
14
17
|
'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -18,6 +21,8 @@ export declare const iconMap: {
|
|
18
21
|
'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
19
22
|
'ic-crown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
20
23
|
'ic-cube': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
24
|
+
'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
25
|
+
'ic-devtron': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
21
26
|
'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
22
27
|
'ic-ecr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
23
28
|
'ic-env': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -42,6 +47,7 @@ export declare const iconMap: {
|
|
42
47
|
'ic-info-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
43
48
|
'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
44
49
|
'ic-k8s-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
50
|
+
'ic-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
45
51
|
'ic-ldap': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
46
52
|
'ic-login-devtron-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
47
53
|
'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -62,6 +68,7 @@ export declare const iconMap: {
|
|
62
68
|
'ic-success': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
63
69
|
'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
64
70
|
'ic-timeout-two-dash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
71
|
+
'ic-timer': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
65
72
|
'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
66
73
|
'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
67
74
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
export declare enum LicenseStatus {
|
2
|
+
ACTIVE = "ACTIVE",
|
3
|
+
EXPIRED = "EXPIRED",
|
4
|
+
REMINDER_THRESHOLD_REACHED = "REMINDER_THRESHOLD_REACHED"
|
5
|
+
}
|
6
|
+
export type DevtronLicenseCardProps = {
|
7
|
+
enterpriseName: string;
|
8
|
+
expiryDate: string;
|
9
|
+
ttl: number;
|
10
|
+
licenseStatus: LicenseStatus;
|
11
|
+
isTrial: boolean;
|
12
|
+
} & ({
|
13
|
+
licenseKey: string;
|
14
|
+
licenseSuffix?: never;
|
15
|
+
} | {
|
16
|
+
licenseKey?: never;
|
17
|
+
licenseSuffix: string;
|
18
|
+
});
|
19
|
+
export declare const getColorAccordingToStatus: (licenseStatus: LicenseStatus) => {
|
20
|
+
bgColor: string;
|
21
|
+
textColor: string;
|
22
|
+
};
|
23
|
+
export declare const DevtronLicenseCard: ({ enterpriseName, licenseKey, licenseSuffix, expiryDate, licenseStatus, isTrial, ttl, }: DevtronLicenseCardProps) => JSX.Element;
|
24
|
+
export declare const InstallationFingerprintInfo: ({ installationFingerprint, showHelpTip, }: {
|
25
|
+
installationFingerprint: string;
|
26
|
+
showHelpTip?: boolean;
|
27
|
+
}) => JSX.Element;
|
28
|
+
export declare const LicenseInfo: ({ handleUpdateLicenseClick }: {
|
29
|
+
handleUpdateLicenseClick: () => void;
|
30
|
+
}) => JSX.Element;
|
31
|
+
export declare const AboutDevtron: () => JSX.Element;
|
@@ -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) => void;
|
6
|
+
error?: string | null;
|
7
|
+
countryCodeSelectName: string;
|
8
|
+
phoneNumberInputName: string;
|
9
|
+
required?: boolean;
|
10
|
+
countryCodeSelectSize?: ComponentProps<typeof CountrySelect>['size'];
|
11
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ScanResultDTO, SeveritiesDTO, GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, VulnerabilityCountType } from './types';
|
2
2
|
import { SEVERITIES } from './constants';
|
3
3
|
export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
|
4
|
-
color: "var(--G500)" | "var(--
|
4
|
+
color: "var(--G500)" | "var(--R500)" | "var(--N300)" | "var(--R700)" | "var(--O500)" | "var(--Y500)";
|
5
5
|
label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
|
6
6
|
value: number;
|
7
7
|
}[];
|
@@ -67,3 +67,8 @@ export * from './CustomInput';
|
|
67
67
|
export * from './InfoBlock';
|
68
68
|
export * from './CodeEditorWrapper';
|
69
69
|
export * from './SSOProviderIcon';
|
70
|
+
export * from './Backdrop';
|
71
|
+
export * from './LicenseInfoDialog';
|
72
|
+
export * from './CountrySelect';
|
73
|
+
export * from './PhoneInput';
|
74
|
+
export * from './FlagImage';
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -4,8 +4,9 @@ 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, DevtronLicenseDTO, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
8
8
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
9
|
+
import { DevtronLicenseCardProps } from './Components/LicenseInfoDialog/LicenseInfoDialog.components';
|
9
10
|
interface HighlightSearchTextProps {
|
10
11
|
/**
|
11
12
|
* The text to be highlighted
|
@@ -99,4 +100,7 @@ export declare const deriveBorderRadiusAndBorderClassFromConfig: ({ borderConfig
|
|
99
100
|
borderConfig: BorderConfigType | undefined;
|
100
101
|
borderRadiusConfig: BorderConfigType | undefined;
|
101
102
|
}) => string;
|
103
|
+
export declare const getClassNameForStickyHeaderWithShadow: (isStuck: boolean, topClassName?: string) => string;
|
104
|
+
export declare const parseDevtronLicenseDTOIntoLicenseCardData: <isCentralDashboard extends boolean = false>(licenseDTO: DevtronLicenseDTO<isCentralDashboard>, currentUserEmail?: isCentralDashboard extends true ? string : never) => DevtronLicenseCardProps;
|
105
|
+
export declare const clearCookieOnLogout: () => void;
|
102
106
|
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as useStickyEvent } from './useStickyEvent';
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { MutableRefObject } from 'react';
|
2
|
+
export type UseStickyEventProps<T extends HTMLElement = HTMLDivElement> = {
|
3
|
+
/**
|
4
|
+
* Unique identifier used to create the id of the sentinel element
|
5
|
+
*
|
6
|
+
* A sentinel element is used to determine when the sticky element is 'stuck'
|
7
|
+
* It is dynamically created and appended to the DOM
|
8
|
+
*/
|
9
|
+
identifier: string;
|
10
|
+
/**
|
11
|
+
* Indicates whether the sticky element is conditionally rendered.
|
12
|
+
* - Set to true if the sticky element is mounted.
|
13
|
+
* - Set to false if the sticky element is not mounted.
|
14
|
+
* - If the sticky element is always rendered, this flag can be ignored.
|
15
|
+
*/
|
16
|
+
isStickyElementMounted?: boolean;
|
17
|
+
} & ({
|
18
|
+
/**
|
19
|
+
* Reference to the scroll container element that contains the sticky element
|
20
|
+
*
|
21
|
+
* Either the reference can be passed or its querySelector
|
22
|
+
*/
|
23
|
+
containerRef: MutableRefObject<T>;
|
24
|
+
containerSelector?: never;
|
25
|
+
} | {
|
26
|
+
containerSelector: string;
|
27
|
+
containerRef?: never;
|
28
|
+
});
|
29
|
+
export interface UseStickyEventReturnType<T extends HTMLElement = HTMLDivElement> {
|
30
|
+
isStuck: boolean;
|
31
|
+
stickyElementRef: MutableRefObject<T>;
|
32
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { UseStickyEventProps, UseStickyEventReturnType } from './types';
|
2
|
+
/**
|
3
|
+
* Please read
|
4
|
+
* https://developer.chrome.com/docs/css-ui/sticky-headers
|
5
|
+
* as a reference for the implementation
|
6
|
+
*/
|
7
|
+
declare const useStickyEvent: <T extends HTMLElement = HTMLDivElement>({ containerSelector, containerRef, identifier, isStickyElementMounted, }: UseStickyEventProps<T>) => UseStickyEventReturnType<T>;
|
8
|
+
export default useStickyEvent;
|
@@ -407,3 +407,5 @@ export declare const DC_DELETE_SUBTITLES: {
|
|
407
407
|
DELETE_ENVIRONMENT_SUBTITLE: string;
|
408
408
|
DELETE_CLUSTER_SUBTITLES: string;
|
409
409
|
};
|
410
|
+
export declare const EULA_LINK = "https://devtron.ai/end-user-license-agreement-eula";
|
411
|
+
export declare const CONTACT_SUPPORT_LINK = "https://share.hsforms.com/1Yp3bvPAaRCaHUEH5vtMjEQ4368n";
|
package/dist/Shared/types.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
2
2
|
import { APIOptions, ApprovalConfigDataType } from '../Common/Types';
|
3
|
+
import { ParsedCountry } from 'react-international-phone';
|
3
4
|
import { OptionType, CommonNodeAttr, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
|
4
5
|
import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
|
5
6
|
import { SelectPickerOptionType } from './Components';
|
@@ -875,4 +876,36 @@ export interface AppEnvIdType {
|
|
875
876
|
appId: number;
|
876
877
|
envId: number;
|
877
878
|
}
|
879
|
+
export interface DevtronLicenseBaseDTO {
|
880
|
+
fingerprint: string | null;
|
881
|
+
isTrial: boolean | null;
|
882
|
+
/**
|
883
|
+
* In timestamp format
|
884
|
+
*/
|
885
|
+
expiry: string | null;
|
886
|
+
/**
|
887
|
+
* Can be negative, depicts time left in seconds for license to expire
|
888
|
+
*/
|
889
|
+
ttl: number | null;
|
890
|
+
/**
|
891
|
+
* Show a reminder after these many DAYS left for license to expire, i.e,
|
892
|
+
* Show if `ttl` is less than `reminderThreshold` [converted to seconds]
|
893
|
+
*/
|
894
|
+
reminderThreshold: number | null;
|
895
|
+
organisationMetadata: {
|
896
|
+
name: string | null;
|
897
|
+
domain: string | null;
|
898
|
+
} | null;
|
899
|
+
license: string | null;
|
900
|
+
}
|
901
|
+
export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = DevtronLicenseBaseDTO & (isCentralDashboard extends true ? {
|
902
|
+
claimedByUserDetails: {
|
903
|
+
firstName: string | null;
|
904
|
+
lastName: string | null;
|
905
|
+
email: string | null;
|
906
|
+
} | null;
|
907
|
+
} : {
|
908
|
+
claimedByUserDetails?: never;
|
909
|
+
});
|
910
|
+
export type CountryISO2Type = ParsedCountry['iso2'];
|
878
911
|
export {};
|