@devtron-labs/devtron-fe-common-lib 1.13.0-beta-6 → 1.13.0-beta-8
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-C1z5nDQW.js → @code-editor-DfxVL5Vn.js} +3848 -3665
- package/dist/{@common-rjsf-D695U3ed.js → @common-rjsf-6fcCPJuJ.js} +2 -2
- package/dist/{@framer-motion-eB9Rj-_8.js → @framer-motion-DyOLEeMN.js} +1 -1
- package/dist/{@react-dates-CJpoumtu.js → @react-dates-B7d8RWU9.js} +14 -14
- package/dist/{@react-select-CUbAbK6L.js → @react-select-Coo19Q6a.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-Ckb5S1RC.js → @react-virtualized-sticky-tree-BPjPJDIR.js} +1 -1
- package/dist/{@vendor-4cEd9dja.js → @vendor-D9q4wrnL.js} +10002 -9992
- package/dist/Shared/Components/AppStatusModal/types.d.ts +6 -0
- package/dist/Shared/Components/CICDHistory/LogStageAccordion.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +2 -1
- package/dist/Shared/Components/Switch/Switch.component.d.ts +3 -0
- package/dist/Shared/Components/Switch/constants.d.ts +14 -0
- package/dist/Shared/Components/Switch/index.d.ts +3 -0
- package/dist/Shared/Components/Switch/types.d.ts +101 -0
- package/dist/Shared/Components/Switch/utils.d.ts +10 -0
- package/dist/Shared/Components/TargetPlatforms/TargetPlatformListTooltip.d.ts +1 -1
- package/dist/Shared/Components/TargetPlatforms/types.d.ts +1 -2
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/assets/{ic-disconnect.26bad827.svg → ic-disconnect.2ad261fc.svg} +1 -1
- package/dist/index.js +501 -498
- package/package.json +1 -1
@@ -76,3 +76,9 @@ export interface StatusHeadingContainerProps extends PropsWithChildren<Pick<AppS
|
|
76
76
|
envId?: number;
|
77
77
|
actionItem?: ReactNode;
|
78
78
|
}
|
79
|
+
export interface InfoCardItemProps {
|
80
|
+
heading: string;
|
81
|
+
value: ReactNode;
|
82
|
+
isLast?: boolean;
|
83
|
+
alignCenter?: boolean;
|
84
|
+
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { LogStageAccordionProps } from './types';
|
2
|
-
declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, fullScreenView, searchIndex, targetPlatforms, }: LogStageAccordionProps) => JSX.Element;
|
2
|
+
declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, fullScreenView, searchIndex, targetPlatforms, logsRendererRef, }: LogStageAccordionProps) => JSX.Element;
|
3
3
|
export default LogStageAccordion;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CSSProperties, ReactElement, ReactNode } from 'react';
|
1
|
+
import { CSSProperties, MutableRefObject, ReactElement, ReactNode } from 'react';
|
2
2
|
import { SupportedKeyboardKeysType } from '@Common/Hooks/UseRegisterShortcut/types';
|
3
3
|
import { DeploymentAppTypes, FilterConditionsListType, ImageComment, OptionType, PaginationProps, PromotionApprovalMetadataType, ReleaseTag, ResponseType, UserApprovalMetadataType, useScrollable } from '../../../Common';
|
4
4
|
import { DeploymentStageType } from '../../constants';
|
@@ -685,6 +685,7 @@ export interface LogStageAccordionProps extends StageDetailType, Pick<LogsRender
|
|
685
685
|
*/
|
686
686
|
isLoading: boolean;
|
687
687
|
searchIndex: string;
|
688
|
+
logsRendererRef: MutableRefObject<HTMLDivElement>;
|
688
689
|
}
|
689
690
|
export interface CreateMarkupReturnType {
|
690
691
|
__html: string;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { IconBaseColorType } from '../../types';
|
2
|
+
import { SwitchProps } from './types';
|
3
|
+
export declare const SWITCH_VARIANTS: Readonly<Record<SwitchProps['variant'], null>>;
|
4
|
+
export declare const SWITCH_SHAPES: Readonly<Record<SwitchProps['shape'], null>>;
|
5
|
+
export declare const ROUNDED_SWITCH_SIZE_MAP: Readonly<Record<SwitchProps['size'], string>>;
|
6
|
+
export declare const SQUARE_SWITCH_SIZE_MAP: typeof ROUNDED_SWITCH_SIZE_MAP;
|
7
|
+
export declare const SWITCH_HEIGHT_MAP: Readonly<Record<SwitchProps['size'], string>>;
|
8
|
+
export declare const LOADING_COLOR_MAP: Record<SwitchProps['variant'], IconBaseColorType>;
|
9
|
+
export declare const ROUNDED_SWITCH_TRACK_COLOR_MAP: Record<SwitchProps['variant'], string>;
|
10
|
+
export declare const SQUARE_SWITCH_TRACK_COLOR_MAP: typeof ROUNDED_SWITCH_TRACK_COLOR_MAP;
|
11
|
+
export declare const ROUNDED_SWITCH_THUMB_SIZE_MAP: Record<SwitchProps['size'], string>;
|
12
|
+
export declare const INDETERMINATE_ICON_WIDTH_MAP: Record<SwitchProps['size'], string>;
|
13
|
+
export declare const SWITCH_THUMB_PADDING_MAP: Record<SwitchProps['size'], string>;
|
14
|
+
export declare const THUMB_OUTER_PADDING_MAP: Record<SwitchProps['shape'], string>;
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import { ComponentSizeType } from '../../constants';
|
2
|
+
import { IconBaseColorType } from '../../types';
|
3
|
+
import { IconName } from '../Icon';
|
4
|
+
/**
|
5
|
+
* Represents the properties for configuring the shape and behavior of a switch component.
|
6
|
+
*
|
7
|
+
* - When `shape` is `rounded`:
|
8
|
+
* - The switch will have a rounded appearance.
|
9
|
+
* - `iconName`, `iconColor`, and `indeterminate` are not applicable.
|
10
|
+
*
|
11
|
+
* - When `shape` is `square`:
|
12
|
+
* - The switch will have a square appearance.
|
13
|
+
* - `iconName` specifies the name of the icon to display.
|
14
|
+
* - `iconColor` allows customization of the icon's color in the active state.
|
15
|
+
* - `indeterminate` indicates whether the switch is in an indeterminate state, typically used for checkboxes to represent a mixed state.
|
16
|
+
* If `indeterminate` is true, the switch will not be fully checked or unchecked.
|
17
|
+
*/
|
18
|
+
type SwitchShapeProps = {
|
19
|
+
/**
|
20
|
+
* The shape of the switch. Defaults to `rounded` if not specified.
|
21
|
+
*/
|
22
|
+
shape?: 'rounded';
|
23
|
+
/**
|
24
|
+
* Icon name is not applicable for the `rounded` shape.
|
25
|
+
*/
|
26
|
+
iconName?: never;
|
27
|
+
/**
|
28
|
+
* Icon color is not applicable for the `rounded` shape.
|
29
|
+
*/
|
30
|
+
iconColor?: never;
|
31
|
+
/**
|
32
|
+
* Indicates whether the switch is in an indeterminate state.
|
33
|
+
* This state is typically used for checkboxes to indicate a mixed state.
|
34
|
+
* If true, the switch will not be fully checked or unchecked. Due this state alone we are keeping role as `checkbox` instead of `switch`.
|
35
|
+
* This property is not applicable for the `square` shape.
|
36
|
+
* @default false
|
37
|
+
*/
|
38
|
+
indeterminate?: boolean;
|
39
|
+
} | {
|
40
|
+
/**
|
41
|
+
* The shape of the switch. Must be `square` to enable icon-related properties.
|
42
|
+
*/
|
43
|
+
shape: 'square';
|
44
|
+
/**
|
45
|
+
* The name of the icon to display when the shape is `square`.
|
46
|
+
*/
|
47
|
+
iconName: IconName;
|
48
|
+
/**
|
49
|
+
* The color of the icon. If provided, this will override the default color in the active state.
|
50
|
+
*/
|
51
|
+
iconColor?: IconBaseColorType;
|
52
|
+
indeterminate?: never;
|
53
|
+
};
|
54
|
+
/**
|
55
|
+
* Represents the properties for the `Switch` component.
|
56
|
+
*/
|
57
|
+
export type SwitchProps = {
|
58
|
+
/**
|
59
|
+
* The ARIA label for the switch, used for accessibility purposes.
|
60
|
+
*/
|
61
|
+
ariaLabel: string;
|
62
|
+
/**
|
63
|
+
* Used in forms to identify the switch.
|
64
|
+
*/
|
65
|
+
name: string;
|
66
|
+
/**
|
67
|
+
* A unique identifier for testing purposes.
|
68
|
+
*/
|
69
|
+
dataTestId: string;
|
70
|
+
/**
|
71
|
+
* The visual variant of the switch.
|
72
|
+
*
|
73
|
+
* @default `positive`
|
74
|
+
*/
|
75
|
+
variant?: 'theme' | 'positive';
|
76
|
+
/**
|
77
|
+
* The size of the switch.
|
78
|
+
* @default `ComponentSizeType.medium`
|
79
|
+
*/
|
80
|
+
size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.small>;
|
81
|
+
onChange: () => void;
|
82
|
+
/**
|
83
|
+
* Indicates whether the switch is disabled.
|
84
|
+
*/
|
85
|
+
isDisabled?: boolean;
|
86
|
+
/**
|
87
|
+
* Indicates whether the switch is in a loading state.
|
88
|
+
*/
|
89
|
+
isLoading?: boolean;
|
90
|
+
/**
|
91
|
+
* Indicates whether the switch is currently checked (on).
|
92
|
+
*/
|
93
|
+
isChecked: boolean;
|
94
|
+
/**
|
95
|
+
* Optional tooltip content to display when hovering over the switch.
|
96
|
+
*
|
97
|
+
* @default undefined
|
98
|
+
*/
|
99
|
+
tooltipContent?: string;
|
100
|
+
} & SwitchShapeProps;
|
101
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { IconBaseColorType } from '../../types';
|
2
|
+
import { SwitchProps } from './types';
|
3
|
+
export declare const getSwitchContainerClass: ({ shape, size }: Required<Pick<SwitchProps, "shape" | "size">>) => string;
|
4
|
+
export declare const getSwitchTrackColor: ({ shape, variant, isChecked, isLoading, }: Required<Pick<SwitchProps, "shape" | "variant" | "isChecked" | "isLoading">>) => string;
|
5
|
+
export declare const getSwitchThumbClass: ({ shape, size, showIndeterminateIcon, }: Pick<SwitchProps, "shape" | "size"> & {
|
6
|
+
showIndeterminateIcon: boolean;
|
7
|
+
}) => string;
|
8
|
+
export declare const getSwitchIconColor: ({ iconColor, isChecked, variant, }: Pick<SwitchProps, "iconColor" | "isChecked" | "variant">) => IconBaseColorType;
|
9
|
+
export declare const getThumbPosition: ({ isLoading, isChecked, }: Pick<SwitchProps, "isLoading" | "isChecked">) => "left" | "right" | "center";
|
10
|
+
export declare const getThumbPadding: ({ shape, isLoading }: Pick<SwitchProps, "shape" | "isLoading">) => string;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { TargetPlatformListTooltipProps } from './types';
|
2
|
-
declare const TargetPlatformListTooltip: ({ targetPlatforms, children }: TargetPlatformListTooltipProps) => JSX.Element;
|
2
|
+
declare const TargetPlatformListTooltip: ({ targetPlatforms, children, appendTo }: TargetPlatformListTooltipProps) => JSX.Element;
|
3
3
|
export default TargetPlatformListTooltip;
|
@@ -2,6 +2,5 @@ import { TooltipProps } from '@Common/Tooltip/types';
|
|
2
2
|
import { TargetPlatformsDTO } from '../../types';
|
3
3
|
export interface TargetPlatformBadgeListProps extends Required<Pick<TargetPlatformsDTO, 'targetPlatforms'>> {
|
4
4
|
}
|
5
|
-
export interface TargetPlatformListTooltipProps extends Pick<TargetPlatformsDTO, 'targetPlatforms'> {
|
6
|
-
children: TooltipProps['children'];
|
5
|
+
export interface TargetPlatformListTooltipProps extends Pick<TargetPlatformsDTO, 'targetPlatforms'>, Pick<TooltipProps, 'children' | 'appendTo'> {
|
7
6
|
}
|
@@ -71,6 +71,7 @@ export * from './SelectPicker';
|
|
71
71
|
export * from './ShowMoreText';
|
72
72
|
export * from './SSOProviderIcon';
|
73
73
|
export * from './StatusComponent';
|
74
|
+
export * from './Switch';
|
74
75
|
export * from './TabGroup';
|
75
76
|
export * from './Table';
|
76
77
|
export * from './TagsKeyValueTable';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.1558 2.01314C17.0863 2.13825 17.5633 3.24858 17.0081 3.99141C16.883 4.15562 16.0385 5.03138 15.1315 5.93841C14.2244 6.83763 13.4816 7.61173 13.4816 7.65865C13.4816 7.7603 16.0776 10.3563 16.1792 10.3563C16.2183 10.3563 17.0785 9.53528 18.095 8.52659C19.6666 6.95492 19.9716 6.68906 20.2296 6.64215C21.2461 6.45448 22.0359 7.3537 21.6918 8.29983C21.6449 8.41712 20.777 9.34761 19.7683 10.3563L17.9386 12.1938L18.4937 12.7412C19.0958 13.3276 19.2679 13.6326 19.2679 14.0705C19.2679 14.4927 19.1271 14.696 18.181 15.6343C17.704 16.1035 17.313 16.5257 17.313 16.5726C17.313 16.6117 18.267 17.6048 19.4321 18.7777L21.5589 20.9045L21.512 21.2407C21.426 21.8897 20.7848 22.2025 20.2453 21.8584C20.1187 21.7767 18.0146 19.6943 15.2779 16.9616L14.4393 16.1237C14.0594 15.7438 13.6706 15.3548 13.2761 14.9598L12.6806 14.3632C12.3811 14.0631 12.0793 13.7605 11.7765 13.4569L11.1702 12.8485C6.61934 8.28058 2.05799 3.66801 2.02636 3.56917C1.94817 3.28768 2.04982 2.89671 2.25312 2.70123C2.47988 2.49011 2.91776 2.41192 3.16016 2.53703C3.23165 2.57873 3.80698 3.13335 4.55414 3.8758L5.14155 4.46278C5.19232 4.51378 5.24343 4.5652 5.29482 4.61695L7.24964 6.61087L8.23486 5.63346C9.04807 4.83589 9.27483 4.65605 9.51722 4.60914C10.0333 4.50748 10.4008 4.67951 11.0654 5.32851L11.6597 5.90713L13.4034 4.1087C15.2957 2.15388 15.5772 1.93494 16.1558 2.01314ZM4.73183 17.3624L6.46771 19.0982L5.57631 20.0444C5.07588 20.5761 4.59108 21.0218 4.45816 21.0687C4.15321 21.1703 3.80134 21.1625 3.51203 21.0374C3.18362 20.8967 2.86303 20.4979 2.80047 20.1538C2.69882 19.63 2.8943 19.2859 3.84825 18.285L4.73183 17.3624ZM5.3261 9.61347L9.79872 14.0705L14.2713 18.5274L14.0524 18.6213C13.3643 18.9028 11.777 19.0748 10.9012 18.9575C8.16449 18.6134 5.98291 16.7994 5.15407 14.1877C4.77093 12.9914 4.8022 11.1304 5.22445 9.91842L5.3261 9.61347Z" fill="
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.1558 2.01314C17.0863 2.13825 17.5633 3.24858 17.0081 3.99141C16.883 4.15562 16.0385 5.03138 15.1315 5.93841C14.2244 6.83763 13.4816 7.61173 13.4816 7.65865C13.4816 7.7603 16.0776 10.3563 16.1792 10.3563C16.2183 10.3563 17.0785 9.53528 18.095 8.52659C19.6666 6.95492 19.9716 6.68906 20.2296 6.64215C21.2461 6.45448 22.0359 7.3537 21.6918 8.29983C21.6449 8.41712 20.777 9.34761 19.7683 10.3563L17.9386 12.1938L18.4937 12.7412C19.0958 13.3276 19.2679 13.6326 19.2679 14.0705C19.2679 14.4927 19.1271 14.696 18.181 15.6343C17.704 16.1035 17.313 16.5257 17.313 16.5726C17.313 16.6117 18.267 17.6048 19.4321 18.7777L21.5589 20.9045L21.512 21.2407C21.426 21.8897 20.7848 22.2025 20.2453 21.8584C20.1187 21.7767 18.0146 19.6943 15.2779 16.9616L14.4393 16.1237C14.0594 15.7438 13.6706 15.3548 13.2761 14.9598L12.6806 14.3632C12.3811 14.0631 12.0793 13.7605 11.7765 13.4569L11.1702 12.8485C6.61934 8.28058 2.05799 3.66801 2.02636 3.56917C1.94817 3.28768 2.04982 2.89671 2.25312 2.70123C2.47988 2.49011 2.91776 2.41192 3.16016 2.53703C3.23165 2.57873 3.80698 3.13335 4.55414 3.8758L5.14155 4.46278C5.19232 4.51378 5.24343 4.5652 5.29482 4.61695L7.24964 6.61087L8.23486 5.63346C9.04807 4.83589 9.27483 4.65605 9.51722 4.60914C10.0333 4.50748 10.4008 4.67951 11.0654 5.32851L11.6597 5.90713L13.4034 4.1087C15.2957 2.15388 15.5772 1.93494 16.1558 2.01314ZM4.73183 17.3624L6.46771 19.0982L5.57631 20.0444C5.07588 20.5761 4.59108 21.0218 4.45816 21.0687C4.15321 21.1703 3.80134 21.1625 3.51203 21.0374C3.18362 20.8967 2.86303 20.4979 2.80047 20.1538C2.69882 19.63 2.8943 19.2859 3.84825 18.285L4.73183 17.3624ZM5.3261 9.61347L9.79872 14.0705L14.2713 18.5274L14.0524 18.6213C13.3643 18.9028 11.777 19.0748 10.9012 18.9575C8.16449 18.6134 5.98291 16.7994 5.15407 14.1877C4.77093 12.9914 4.8022 11.1304 5.22445 9.91842L5.3261 9.61347Z" fill="#3B444C"/>
|
3
3
|
</svg>
|