@devtron-labs/devtron-fe-common-lib 1.7.2-beta-1 → 1.7.2-beta-3
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-B63wjusN.js → @code-editor-DF4xpSML.js} +5786 -5717
- package/dist/{@common-rjsf-DnWwXM4S.js → @common-rjsf-DkYtZEPs.js} +2 -2
- package/dist/{@framer-motion-C88ROIS4.js → @framer-motion-C9i0O6dh.js} +1 -1
- package/dist/{@react-dates-Ct1VA7V6.js → @react-dates-DEMedmhG.js} +1 -1
- package/dist/{@react-select-qU4oRypC.js → @react-select-DD4GMsWv.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-DmvoaDNw.js → @react-virtualized-sticky-tree-BlYAzsAg.js} +1 -1
- package/dist/{@vendor-C6rSXA7p.js → @vendor-CIA81cZg.js} +2343 -2346
- package/dist/Common/Constants.d.ts +0 -1
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/Tooltip/index.d.ts +1 -0
- package/dist/Common/index.d.ts +0 -1
- package/dist/Pages/GlobalConfigurations/DeploymentCharts/types.d.ts +8 -6
- package/dist/Shared/Components/Button/Button.component.d.ts +2 -2
- package/dist/Shared/Components/Button/types.d.ts +10 -10
- package/dist/Shared/Components/CustomInput/CustomInput.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/PasswordField.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/constants.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/index.d.ts +3 -0
- package/dist/Shared/Components/CustomInput/types.d.ts +36 -0
- package/dist/Shared/Components/FormFieldWrapper/FormFieldLabel.d.ts +1 -1
- package/dist/Shared/Components/FormFieldWrapper/FormFieldWrapper.d.ts +1 -1
- package/dist/Shared/Components/FormFieldWrapper/types.d.ts +19 -4
- package/dist/Shared/Components/ReactSelect/utils.d.ts +0 -1
- 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 +1 -0
- package/dist/Shared/Helpers.d.ts +4 -2
- package/dist/Shared/Services/ToastManager/types.d.ts +3 -3
- package/dist/Shared/types.d.ts +0 -4
- package/dist/Shared/validations.d.ts +0 -1
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-visibility-off.d91d3844.svg +19 -0
- package/dist/assets/ic-visibility-on.7505dd12.svg +20 -0
- package/dist/index.js +334 -336
- package/package.json +3 -3
- package/dist/Common/CustomInput/CustomInput.d.ts +0 -2
- package/dist/Common/CustomInput/Types.d.ts +0 -30
- package/dist/Common/CustomInput/index.d.ts +0 -2
@@ -55,7 +55,6 @@ export declare const URLS: {
|
|
55
55
|
DEPLOYMENT_HISTORY_CONFIGURATIONS: string;
|
56
56
|
GLOBAL_CONFIG_SCOPED_VARIABLES: string;
|
57
57
|
GLOBAL_CONFIG_DEPLOYMENT_CHARTS_LIST: string;
|
58
|
-
GLOBAL_CONFIG_DEPLOYMENT_CHARTS_UPLOAD_CHART: string;
|
59
58
|
NETWORK_STATUS_INTERFACE: string;
|
60
59
|
RESOURCE_BROWSER: string;
|
61
60
|
COMPARE_CLUSTERS: string;
|
@@ -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, "name" | "id" | "children" | "className" | "disabled" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "method" | "autoComplete" | "tagName" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
|
package/dist/Common/index.d.ts
CHANGED
@@ -42,7 +42,6 @@ export * from './RJSF';
|
|
42
42
|
export * from './DevtronProgressing';
|
43
43
|
export { default as ChartVersionAndTypeSelector } from './ChartVersionAndTypeSelector';
|
44
44
|
export * from './AddCDButton';
|
45
|
-
export * from './CustomInput';
|
46
45
|
export * from './DraggableWrapper';
|
47
46
|
export * from './Pagination';
|
48
47
|
export * from './Markdown';
|
@@ -1,16 +1,18 @@
|
|
1
|
-
|
1
|
+
export type DeploymentChartListDTO = Array<{
|
2
2
|
id: number;
|
3
3
|
chartDescription?: string;
|
4
4
|
isUserUploaded: boolean;
|
5
5
|
name: string;
|
6
6
|
version: string;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
}>;
|
8
|
+
interface DeploymentChartVersionsType {
|
9
|
+
id: number;
|
10
|
+
version: string;
|
11
11
|
description: string;
|
12
12
|
}
|
13
|
-
export interface DeploymentChartType
|
13
|
+
export interface DeploymentChartType {
|
14
|
+
name: string;
|
15
|
+
isUserUploaded: boolean;
|
14
16
|
versions: DeploymentChartVersionsType[];
|
15
17
|
}
|
16
18
|
export declare enum DEVTRON_DEPLOYMENT_CHART_NAMES {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ButtonProps } from './types';
|
1
|
+
import { ButtonComponentType, ButtonProps } from './types';
|
2
2
|
/**
|
3
3
|
* Generic component for Button.
|
4
4
|
* Should be used in combination of variant, size and style.
|
@@ -63,5 +63,5 @@ import { ButtonProps } from './types';
|
|
63
63
|
* <Button icon={<ICCube />} ariaLabel="Label" />
|
64
64
|
* ```
|
65
65
|
*/
|
66
|
-
declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, triggerAutoClickTimestamp, ...props }: ButtonProps) => JSX.Element;
|
66
|
+
declare const Button: <ComponentType extends ButtonComponentType>({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, triggerAutoClickTimestamp, ...props }: ButtonProps<ComponentType>) => JSX.Element;
|
67
67
|
export default Button;
|
@@ -20,27 +20,27 @@ export declare enum ButtonComponentType {
|
|
20
20
|
button = "button",
|
21
21
|
link = "link"
|
22
22
|
}
|
23
|
-
export type ButtonProps = ({
|
23
|
+
export type ButtonProps<ComponentType extends ButtonComponentType = ButtonComponentType.button> = (ComponentType extends ButtonComponentType.link ? {
|
24
|
+
component: ButtonComponentType.link;
|
25
|
+
/**
|
26
|
+
* Props for the link component
|
27
|
+
*/
|
28
|
+
linkProps: Omit<LinkProps, 'children' | 'styles' | 'className' | 'onClick'>;
|
29
|
+
buttonProps?: never;
|
30
|
+
onClick?: LinkProps['onClick'];
|
31
|
+
} : {
|
24
32
|
/**
|
25
33
|
* Component to be rendered from the available options
|
26
34
|
*
|
27
35
|
* @default ButtonComponentType.button
|
28
36
|
*/
|
29
|
-
component?:
|
37
|
+
component?: ComponentType | never;
|
30
38
|
/**
|
31
39
|
* Props for the button component
|
32
40
|
*/
|
33
41
|
buttonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'styles' | 'className' | 'disabled' | 'onClick'>;
|
34
42
|
linkProps?: never;
|
35
43
|
onClick?: ButtonHTMLAttributes<HTMLButtonElement>['onClick'];
|
36
|
-
} | {
|
37
|
-
component: ButtonComponentType.link;
|
38
|
-
/**
|
39
|
-
* Props for the link component
|
40
|
-
*/
|
41
|
-
linkProps: Omit<LinkProps, 'children' | 'styles' | 'className' | 'onClick'>;
|
42
|
-
buttonProps?: never;
|
43
|
-
onClick?: LinkProps['onClick'];
|
44
44
|
}) & {
|
45
45
|
/**
|
46
46
|
* Variant of the button
|
@@ -0,0 +1,3 @@
|
|
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;
|
3
|
+
export default CustomInput;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
2
|
+
import { ComponentSizeType } from '../../constants';
|
3
|
+
import { FormFieldWrapperProps } from '../FormFieldWrapper';
|
4
|
+
import { ButtonComponentType, ButtonProps } from '../Button';
|
5
|
+
export interface CustomInputProps extends Omit<FormFieldWrapperProps, 'children' | 'inputId'>, Pick<InputHTMLAttributes<HTMLInputElement>, 'onBlur' | 'disabled' | 'autoFocus' | 'onFocus' | 'onKeyDown'>, Required<Pick<InputHTMLAttributes<HTMLInputElement>, 'placeholder' | 'onChange' | 'value' | 'name'>> {
|
6
|
+
/**
|
7
|
+
* If false, the input is not trimmed on blur
|
8
|
+
*
|
9
|
+
* @default true
|
10
|
+
*/
|
11
|
+
shouldTrim?: boolean;
|
12
|
+
/**
|
13
|
+
* Size of the input
|
14
|
+
*
|
15
|
+
* @default ComponentSizeType.large
|
16
|
+
*/
|
17
|
+
size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
|
18
|
+
/**
|
19
|
+
* Type for the input
|
20
|
+
*
|
21
|
+
* Note: For password field, use PasswordField component
|
22
|
+
*
|
23
|
+
* @default 'text'
|
24
|
+
*/
|
25
|
+
type?: Exclude<InputHTMLAttributes<HTMLInputElement>['type'], 'password'>;
|
26
|
+
/**
|
27
|
+
* End icon button configuration
|
28
|
+
*/
|
29
|
+
endIconButtonConfig?: Required<Pick<ButtonProps<ButtonComponentType.button>, 'icon' | 'onClick' | 'ariaLabel'>> & Pick<ButtonProps<ButtonComponentType.button>, 'disabled' | 'showAriaLabelInTippy' | 'style'>;
|
30
|
+
}
|
31
|
+
export interface PasswordFieldProps extends Omit<CustomInputProps, 'endIconButtonConfig' | 'type'> {
|
32
|
+
/**
|
33
|
+
* If true, the value is cleared & default placeholder is shown on blur
|
34
|
+
*/
|
35
|
+
shouldShowDefaultPlaceholderOnBlur: boolean;
|
36
|
+
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { FormFieldLabelProps } from './types';
|
2
|
-
declare const FormFieldLabel: ({ label, inputId, required, layout }: FormFieldLabelProps) => JSX.Element;
|
2
|
+
declare const FormFieldLabel: ({ label, inputId, required, layout, labelTooltipConfig, labelTippyCustomizedConfig, }: FormFieldLabelProps) => JSX.Element;
|
3
3
|
export default FormFieldLabel;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { FormFieldWrapperProps } from './types';
|
2
|
-
declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, }: Required<FormFieldWrapperProps>) => JSX.Element;
|
2
|
+
declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, labelTippyCustomizedConfig, labelTooltipConfig, }: Required<FormFieldWrapperProps>) => JSX.Element;
|
3
3
|
export default FormFieldWrapper;
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
2
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
3
|
+
import { InfoIconTippyProps } from '../../../Common/Types';
|
2
4
|
import { BorderConfigType, ComponentLayoutType } from '../../types';
|
3
5
|
export type LabelOrAriaLabelType = {
|
4
6
|
label: ReactNode;
|
@@ -7,7 +9,7 @@ export type LabelOrAriaLabelType = {
|
|
7
9
|
label?: never;
|
8
10
|
ariaLabel: string;
|
9
11
|
};
|
10
|
-
export type FormFieldLabelProps = LabelOrAriaLabelType & {
|
12
|
+
export type FormFieldLabelProps<Layout extends ComponentLayoutType = ComponentLayoutType> = LabelOrAriaLabelType & {
|
11
13
|
/**
|
12
14
|
* If true, the field is required and * is shown with the label
|
13
15
|
*/
|
@@ -19,8 +21,20 @@ export type FormFieldLabelProps = LabelOrAriaLabelType & {
|
|
19
21
|
/**
|
20
22
|
* Layout of the field
|
21
23
|
*/
|
22
|
-
layout?:
|
23
|
-
}
|
24
|
+
layout?: Layout;
|
25
|
+
} & (Layout extends 'row' ? {
|
26
|
+
/**
|
27
|
+
* Tooltip configuration for the label in row layout
|
28
|
+
*/
|
29
|
+
labelTooltipConfig?: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'>;
|
30
|
+
labelTippyCustomizedConfig?: never;
|
31
|
+
} : {
|
32
|
+
labelTooltipConfig?: never;
|
33
|
+
/**
|
34
|
+
* Tippy configuration for the label in column layout
|
35
|
+
*/
|
36
|
+
labelTippyCustomizedConfig?: Required<Pick<InfoIconTippyProps, 'heading' | 'infoText'>> & Pick<InfoIconTippyProps, 'documentationLink' | 'documentationLinkText'>;
|
37
|
+
});
|
24
38
|
export interface FormFieldInfoProps extends Pick<FormFieldLabelProps, 'inputId'> {
|
25
39
|
/**
|
26
40
|
* Error message for the field
|
@@ -41,11 +55,12 @@ export interface FormInfoItemProps {
|
|
41
55
|
textClass: string;
|
42
56
|
icon: ReactElement;
|
43
57
|
}
|
44
|
-
export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label' | 'required' | 'ariaLabel' | 'layout'>, FormFieldInfoProps {
|
58
|
+
export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label' | 'required' | 'ariaLabel' | 'layout' | 'labelTippyCustomizedConfig' | 'labelTooltipConfig'>, FormFieldInfoProps {
|
45
59
|
/**
|
46
60
|
* If true, the field takes the full width of the parent
|
47
61
|
*/
|
48
62
|
fullWidth?: boolean;
|
49
63
|
children: ReactElement;
|
50
64
|
borderRadiusConfig?: BorderConfigType;
|
65
|
+
borderConfig?: BorderConfigType;
|
51
66
|
}
|
@@ -2,7 +2,6 @@ import { MenuListProps, StylesConfig, ValueContainerProps } from 'react-select';
|
|
2
2
|
import { OptionType } from '../../../Common';
|
3
3
|
export declare const getCommonSelectStyle: (styleOverrides?: {}) => StylesConfig;
|
4
4
|
export declare const getCustomOptionSelectionStyle: (styleOverrides?: {}) => (base: any, state: any) => any;
|
5
|
-
export declare const SelectOption: (props: any) => JSX.Element;
|
6
5
|
export declare const LoadingIndicator: () => JSX.Element;
|
7
6
|
export declare const GroupHeading: (props: any) => JSX.Element;
|
8
7
|
export declare const commonSelectStyles: StylesConfig;
|
@@ -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, borderRadiusConfig, ...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, ...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, value, ...props }: TextareaProps) => JSX.Element;
|
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;
|
3
3
|
export default Textarea;
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -95,6 +95,8 @@ export declare const checkIfPathIsMatching: (currentPathName: string, customMess
|
|
95
95
|
export declare const sanitizeTargetPlatforms: (targetPlatforms: TargetPlatformsDTO["targetPlatforms"]) => TargetPlatformItemDTO[];
|
96
96
|
export declare const isAWSCodeCommitURL: (url?: string) => boolean;
|
97
97
|
export declare const renderMaterialIcon: (url?: string) => JSX.Element;
|
98
|
-
export declare const
|
99
|
-
|
98
|
+
export declare const deriveBorderRadiusAndBorderClassFromConfig: ({ borderConfig, borderRadiusConfig, }: {
|
99
|
+
borderConfig: BorderConfigType | undefined;
|
100
|
+
borderRadiusConfig: BorderConfigType | undefined;
|
101
|
+
}) => string;
|
100
102
|
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ButtonProps } from '../../Components';
|
1
|
+
import { ButtonComponentType, ButtonProps } from '../../Components';
|
2
2
|
import { ReactElement } from 'react';
|
3
3
|
export declare enum ToastVariantType {
|
4
4
|
info = "info",
|
@@ -30,9 +30,9 @@ export interface ToastProps {
|
|
30
30
|
/**
|
31
31
|
* Props for the action button to be displayed in the toast
|
32
32
|
*
|
33
|
-
* Note: Size, variant and style are hard-coded and cannot be
|
33
|
+
* Note: Size, variant and style are hard-coded and cannot be overridden
|
34
34
|
*/
|
35
|
-
buttonProps?: ButtonProps
|
35
|
+
buttonProps?: ButtonProps<ButtonComponentType>;
|
36
36
|
/**
|
37
37
|
* Custom progress bar color
|
38
38
|
*/
|
package/dist/Shared/types.d.ts
CHANGED