@devtron-labs/devtron-fe-common-lib 1.14.2 → 1.15.0-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.
Files changed (101) hide show
  1. package/dist/{@code-editor-CVEmKqGD.js → @code-editor-DEh7BIxe.js} +11132 -10793
  2. package/dist/{@common-rjsf-C9V3H0_L.js → @common-rjsf-Dvq53Kea.js} +222 -230
  3. package/dist/{@framer-motion-eB9Rj-_8.js → @framer-motion-Dchiw-Rb.js} +3 -3
  4. package/dist/{@react-dates-CJpoumtu.js → @react-dates-D5kydtW-.js} +1 -1
  5. package/dist/{@react-select-CUbAbK6L.js → @react-select-Cmser7OI.js} +6 -6
  6. package/dist/{@react-virtualized-sticky-tree-Ckb5S1RC.js → @react-virtualized-sticky-tree-DMnFy9PE.js} +1 -1
  7. package/dist/{@vendor-4cEd9dja.js → @vendor-STJ9h0oI.js} +14016 -15910
  8. package/dist/Common/Constants.d.ts +4 -11
  9. package/dist/Common/RJSF/widgets/Checkbox.d.ts +1 -1
  10. package/dist/Common/SegmentedControl/Segment.d.ts +1 -1
  11. package/dist/Common/SegmentedControl/types.d.ts +3 -2
  12. package/dist/Common/TippyCustomized.d.ts +1 -1
  13. package/dist/Common/Types.d.ts +8 -48
  14. package/dist/Common/index.d.ts +0 -2
  15. package/dist/Shared/Components/ActionMenu/types.d.ts +31 -4
  16. package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +4 -2
  17. package/dist/Shared/Components/Button/Button.component.d.ts +1 -1
  18. package/dist/Shared/Components/Button/constants.d.ts +1 -0
  19. package/dist/Shared/Components/Button/types.d.ts +14 -1
  20. package/dist/Shared/Components/Button/utils.d.ts +1 -1
  21. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.d.ts +1 -1
  22. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +2 -1
  23. package/dist/Shared/Components/CICDHistory/service.d.ts +1 -7
  24. package/dist/Shared/Components/CICDHistory/types.d.ts +2 -19
  25. package/dist/Shared/Components/CodeEditor/CodeEditor.d.ts +1 -1
  26. package/dist/Shared/Components/CodeEditor/CodeEditorRenderer.d.ts +1 -1
  27. package/dist/Shared/Components/CodeEditor/Extensions/findAndReplace.d.ts +2 -1
  28. package/dist/Shared/Components/CodeEditor/types.d.ts +14 -1
  29. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +18 -1
  30. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +0 -2
  31. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffRadioSelect.d.ts +7 -0
  32. package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +1 -0
  33. package/dist/Shared/Components/DocLink/DocLink.d.ts +2 -0
  34. package/dist/Shared/Components/DocLink/constants.d.ts +94 -0
  35. package/dist/Shared/Components/DocLink/index.d.ts +4 -0
  36. package/dist/Shared/Components/DocLink/types.d.ts +19 -0
  37. package/dist/Shared/Components/DocLink/utils.d.ts +2 -0
  38. package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +1 -1
  39. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +1 -1
  40. package/dist/Shared/Components/DynamicDataTable/types.d.ts +8 -4
  41. package/dist/Shared/Components/FeatureDescription/types.d.ts +2 -1
  42. package/dist/Shared/Components/FramerComponents/index.d.ts +2 -3
  43. package/dist/Shared/Components/GenericInfoCard/GenericInfoCardListing.d.ts +2 -0
  44. package/dist/Shared/Components/GenericInfoCard/GenericInfoListSkeleton.d.ts +2 -0
  45. package/dist/Shared/Components/GenericInfoCard/index.d.ts +3 -1
  46. package/dist/Shared/Components/GenericInfoCard/types.d.ts +13 -0
  47. package/dist/Shared/Components/Header/ProfileMenu.d.ts +2 -0
  48. package/dist/Shared/Components/Header/types.d.ts +8 -8
  49. package/dist/Shared/Components/Header/utils.d.ts +0 -2
  50. package/dist/Shared/Components/Icon/Icon.d.ts +9 -0
  51. package/dist/Shared/Components/InfoIconTippy/InfoIconTippy.d.ts +1 -1
  52. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  53. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +1 -1
  54. package/dist/Shared/Components/ModalSidebarPanel/types.d.ts +2 -1
  55. package/dist/Shared/Components/NumbersCount/index.d.ts +1 -0
  56. package/dist/Shared/Components/Popover/Popover.component.d.ts +1 -1
  57. package/dist/Shared/Components/Popover/types.d.ts +10 -3
  58. package/dist/Shared/Components/Popover/usePopover.hook.d.ts +1 -1
  59. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
  60. package/dist/Shared/Components/Switch/Switch.component.d.ts +3 -0
  61. package/dist/Shared/Components/Switch/constants.d.ts +14 -0
  62. package/dist/Shared/Components/Switch/index.d.ts +2 -0
  63. package/dist/Shared/Components/Switch/types.d.ts +111 -0
  64. package/dist/Shared/Components/Switch/utils.d.ts +12 -0
  65. package/dist/Shared/Components/SwitchThemeDialog/SwitchThemeDialog.component.d.ts +3 -0
  66. package/dist/Shared/Components/SwitchThemeDialog/index.d.ts +2 -0
  67. package/dist/Shared/Components/SwitchThemeDialog/types.d.ts +35 -0
  68. package/dist/Shared/Components/ThemeSwitcher/ThemeSwitcher.component.d.ts +1 -1
  69. package/dist/Shared/Components/ThemeSwitcher/index.d.ts +0 -1
  70. package/dist/Shared/Components/ThemeSwitcher/types.d.ts +1 -1
  71. package/dist/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.d.ts +1 -1
  72. package/dist/Shared/Components/ToggleResolveScopedVariables/types.d.ts +1 -1
  73. package/dist/Shared/Components/index.d.ts +3 -1
  74. package/dist/Shared/Helpers.d.ts +1 -0
  75. package/dist/Shared/Providers/index.d.ts +1 -1
  76. package/dist/Shared/Providers/types.d.ts +47 -9
  77. package/dist/Shared/Services/app.types.d.ts +7 -2
  78. package/dist/Shared/constants.d.ts +3 -1
  79. package/dist/Shared/types.d.ts +32 -2
  80. package/dist/Shared/validations.d.ts +1 -0
  81. package/dist/assets/@code-editor.css +1 -1
  82. package/dist/assets/empty-create.661d9355.png +0 -0
  83. package/dist/assets/ic-app-template.82736707.svg +23 -0
  84. package/dist/assets/ic-asterisk.ab224e72.svg +3 -0
  85. package/dist/assets/ic-devtron-app.a8b688d3.svg +23 -0
  86. package/dist/assets/ic-devtron-job.1b216232.svg +10 -0
  87. package/dist/assets/ic-email.78fed574.svg +3 -0
  88. package/dist/assets/ic-key-enter.59d23056.svg +3 -0
  89. package/dist/assets/ic-spray-can.624b202a.svg +3 -0
  90. package/dist/assets/ic-world-globe.877fa6a0.svg +3 -0
  91. package/dist/index.js +748 -744
  92. package/package.json +3 -4
  93. package/dist/Common/InfoColorBar/InfoColourbar.d.ts +0 -6
  94. package/dist/Common/Toggle/Toggle.d.ts +0 -18
  95. package/dist/Shared/Components/DiffViewer/DiffViewer.component.d.ts +0 -41
  96. package/dist/Shared/Components/DiffViewer/constants.d.ts +0 -2
  97. package/dist/Shared/Components/DiffViewer/index.d.ts +0 -1
  98. package/dist/Shared/Components/DiffViewer/types.d.ts +0 -9
  99. package/dist/Shared/Components/FramerComponents/MotionDiv.d.ts +0 -2
  100. package/dist/Shared/Components/LogoutCard.d.ts +0 -10
  101. package/dist/assets/ic-arrow-square-out.3d1a0d41.svg +0 -19
@@ -2,19 +2,10 @@ 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
4
  export declare const DEVTRON_HOME_PAGE = "https://devtron.ai/";
5
- export declare const DOCUMENTATION_VERSION = "/v/v0.7";
5
+ export declare const DOCUMENTATION_VERSION = "/devtron/v0.7";
6
6
  export declare const DISCORD_LINK = "https://discord.devtron.ai/";
7
7
  export declare const DEFAULT_JSON_SCHEMA_URI = "https://json-schema.org/draft/2020-12/schema";
8
- export declare const DOCUMENTATION: {
9
- APP_METRICS: string;
10
- APP_TAGS: string;
11
- APP_OVERVIEW_TAGS: string;
12
- BLOB_STORAGE: string;
13
- GLOBAL_CONFIG_BUILD_INFRA: string;
14
- ENTERPRISE_LICENSE: string;
15
- KUBE_CONFIG: string;
16
- TENANT_INSTALLATION: string;
17
- };
8
+ export declare const LICENSE_DASHBOARD_HOME_PAGE = "https://license.devtron.ai/dashboard";
18
9
  export declare const PATTERNS: {
19
10
  STRING: RegExp;
20
11
  DECIMAL_NUMBERS: RegExp;
@@ -32,8 +23,10 @@ export declare const PATTERNS: {
32
23
  CONFIG_MAP_AND_SECRET_KEY: RegExp;
33
24
  CONFIGMAP_AND_SECRET_NAME: RegExp;
34
25
  ALPHANUMERIC_WITH_SPECIAL_CHAR_AND_SLASH: RegExp;
26
+ EMAIL: RegExp;
35
27
  };
36
28
  export declare const URLS: {
29
+ readonly LOGIN: "/login";
37
30
  readonly LOGIN_SSO: "/login/sso";
38
31
  readonly PERMISSION_GROUPS: "/global-config/auth/groups";
39
32
  readonly APP: "/app";
@@ -1,2 +1,2 @@
1
1
  import { WidgetProps } from '@rjsf/utils';
2
- export declare const Checkbox: ({ id, onChange, value, required, disabled, readonly, autofocus, onBlur, onFocus, }: WidgetProps) => JSX.Element;
2
+ export declare const Checkbox: ({ id, onChange, value, disabled, readonly, autofocus, }: WidgetProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { SegmentProps } from './types';
2
- declare const Segment: ({ segment, isSelected, name, selectedSegmentRef, onChange, fullWidth, size, disabled, }: SegmentProps) => JSX.Element;
2
+ declare const Segment: ({ segment, isSelected, name, onChange, fullWidth, size, disabled }: SegmentProps) => JSX.Element;
3
3
  export default Segment;
@@ -1,4 +1,3 @@
1
- import { RefObject } from 'react';
2
1
  import { TooltipProps } from '../Tooltip';
3
2
  import { IconsProps, SelectPickerOptionType } from '../../Shared/Components';
4
3
  import { ComponentSizeType } from '../../Shared/constants';
@@ -46,6 +45,9 @@ export type SegmentedControlProps = {
46
45
  * List of segments to be displayed
47
46
  */
48
47
  segments: SegmentType[];
48
+ /**
49
+ * Please make sure this is unique
50
+ */
49
51
  name: string;
50
52
  size?: Extract<ComponentSizeType, ComponentSizeType.xs | ComponentSizeType.small | ComponentSizeType.medium>;
51
53
  fullWidth?: boolean;
@@ -66,6 +68,5 @@ export type SegmentedControlProps = {
66
68
  export interface SegmentProps extends Required<Pick<SegmentedControlProps, 'name' | 'onChange' | 'fullWidth' | 'size' | 'disabled'>> {
67
69
  isSelected: boolean;
68
70
  segment: SegmentType;
69
- selectedSegmentRef: RefObject<HTMLDivElement> | undefined;
70
71
  }
71
72
  export {};
@@ -1,2 +1,2 @@
1
1
  import { TippyCustomizedProps } from './Types';
2
- export declare const TippyCustomized: (props: TippyCustomizedProps) => JSX.Element;
2
+ export declare const TippyCustomized: <T extends boolean = false>(props: TippyCustomizedProps<T>) => JSX.Element;
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObj
2
2
  import { TippyProps } from '@tippyjs/react';
3
3
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
5
- import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ButtonProps, ComponentLayoutType, StatusType, DeploymentStrategyType } from '../Shared';
5
+ import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ComponentLayoutType, StatusType, DocLinkProps, DeploymentStrategyType } from '../Shared';
6
6
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
@@ -78,7 +78,10 @@ export interface CheckboxProps {
78
78
  error?: boolean;
79
79
  children?: ReactNode;
80
80
  }
81
- export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
81
+ export interface TippyWithBaseDocLinkTypes<T extends boolean> extends Pick<DocLinkProps<T>, 'isExternalLink' | 'openInNewTab'> {
82
+ documentationLink?: DocLinkProps<T>['docLinkKey'];
83
+ }
84
+ export type TippyCustomizedProps<T extends boolean> = Pick<TippyProps, 'appendTo'> & TippyWithBaseDocLinkTypes<T> & {
82
85
  theme: TippyTheme;
83
86
  visible?: boolean;
84
87
  heading?: ReactNode | string;
@@ -103,14 +106,13 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
103
106
  animation?: string;
104
107
  duration?: number;
105
108
  additionalContent?: ReactNode;
106
- documentationLink?: string;
107
109
  documentationLinkText?: string;
108
110
  children: React.ReactElement<any>;
109
111
  disableClose?: boolean;
110
- }
111
- export interface InfoIconTippyProps extends Pick<TippyCustomizedProps, 'heading' | 'infoText' | 'iconClass' | 'documentationLink' | 'documentationLinkText' | 'additionalContent' | 'placement' | 'Icon' | 'headingInfo'> {
112
+ };
113
+ export interface InfoIconTippyProps<T extends boolean = false> extends Pick<TippyCustomizedProps<T>, 'heading' | 'infoText' | 'iconClass' | 'documentationLinkText' | 'additionalContent' | 'placement' | 'Icon' | 'headingInfo' | 'documentationLink' | 'isExternalLink' | 'openInNewTab'> {
112
114
  dataTestid?: string;
113
- children?: TippyCustomizedProps['children'];
115
+ children?: TippyCustomizedProps<T>['children'];
114
116
  iconClassName?: string;
115
117
  buttonPadding?: string;
116
118
  }
@@ -160,48 +162,6 @@ export declare enum ImageType {
160
162
  Medium = "medium",
161
163
  SMALL = "small"
162
164
  }
163
- interface InfoColourBarTextConfigType {
164
- /**
165
- * If given would be shown above the description, in bold
166
- */
167
- heading?: string;
168
- /**
169
- * If given would be shown below the heading (if given)
170
- */
171
- description: string;
172
- actionButtonConfig?: ButtonProps;
173
- }
174
- type InfoColourBarMessageProp = {
175
- message: ReactNode;
176
- linkText?: ReactNode;
177
- redirectLink?: string;
178
- linkOnClick?: () => void;
179
- linkClass?: string;
180
- internalLink?: boolean;
181
- textConfig?: never;
182
- } | {
183
- textConfig: InfoColourBarTextConfigType;
184
- message?: never;
185
- linkText?: never;
186
- redirectLink?: never;
187
- linkOnClick?: () => never;
188
- linkClass?: never;
189
- internalLink?: never;
190
- };
191
- export type InfoColourBarType = InfoColourBarMessageProp & {
192
- classname: string;
193
- Icon: any;
194
- iconClass?: string;
195
- iconSize?: number;
196
- renderActionButton?: () => JSX.Element;
197
- styles?: CSSProperties;
198
- /**
199
- * If true, the icon is not shown
200
- *
201
- * @default false
202
- */
203
- hideIcon?: boolean;
204
- };
205
165
  export interface ReloadType {
206
166
  reload?: (event?: any) => void;
207
167
  className?: string;
@@ -25,7 +25,6 @@ export * from './Helper';
25
25
  export * from './Hooks';
26
26
  export * from './ImageTags';
27
27
  export * from './ImageTags.Types';
28
- export { default as InfoColourBar } from './InfoColorBar/InfoColourbar';
29
28
  export * from './Markdown';
30
29
  export * from './Modals/Modal';
31
30
  export * from './Modals/VisibleModal';
@@ -47,6 +46,5 @@ export { default as Select } from './Select/Select';
47
46
  export * from './ServerError';
48
47
  export * from './SortableTableHeaderCell';
49
48
  export * from './TippyCustomized';
50
- export { default as Toggle } from './Toggle/Toggle';
51
49
  export * from './Tooltip';
52
50
  export * from './Types';
@@ -1,8 +1,12 @@
1
- import { LegacyRef, Ref } from 'react';
1
+ import { LegacyRef, MouseEvent, ReactElement, Ref } from 'react';
2
2
  import { LinkProps } from 'react-router-dom';
3
+ import { OmitNever } from '../../types';
4
+ import { ButtonProps } from '../Button';
3
5
  import { IconsProps } from '../Icon';
6
+ import { NumbersCountProps } from '../NumbersCount';
4
7
  import { PopoverProps, UsePopoverProps } from '../Popover';
5
8
  import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
9
+ import { DTSwitchProps } from '../Switch';
6
10
  type ConditionalActionMenuComponentType = {
7
11
  /**
8
12
  * @default 'button'
@@ -25,6 +29,29 @@ type ActionMenuItemIconType = Pick<IconsProps, 'name'> & {
25
29
  /** @default 'N800' */
26
30
  color?: IconsProps['color'];
27
31
  };
32
+ type TrailingItemType = {
33
+ type: 'icon';
34
+ config: ActionMenuItemIconType;
35
+ } | {
36
+ type: 'text';
37
+ config: {
38
+ value: string;
39
+ icon?: ActionMenuItemIconType;
40
+ };
41
+ } | {
42
+ type: 'counter';
43
+ config: {
44
+ value: NumbersCountProps['count'];
45
+ };
46
+ } | {
47
+ type: 'switch';
48
+ config: Pick<DTSwitchProps, 'ariaLabel' | 'isChecked' | 'indeterminate' | 'isDisabled' | 'isLoading' | 'name' | 'onChange' | 'tooltipContent'>;
49
+ } | {
50
+ type: 'button';
51
+ config: OmitNever<Omit<Extract<ButtonProps, {
52
+ icon: ReactElement;
53
+ }>, 'size' | 'variant'>>;
54
+ };
28
55
  export type ActionMenuItemType<T extends string | number = string | number> = Omit<SelectPickerOptionType, 'label' | 'value' | 'endIcon' | 'startIcon'> & {
29
56
  /** A unique identifier for the action menu item. */
30
57
  id: T;
@@ -39,8 +66,8 @@ export type ActionMenuItemType<T extends string | number = string | number> = Om
39
66
  type?: 'neutral' | 'negative';
40
67
  /** Defines the icon to be displayed at the start of the menu item. */
41
68
  startIcon?: ActionMenuItemIconType;
42
- /** Defines the icon to be displayed at the end of the menu item. */
43
- endIcon?: ActionMenuItemIconType;
69
+ /** Defines the item to be displayed at the end of the menu item. */
70
+ trailingItem?: TrailingItemType;
44
71
  } & ConditionalActionMenuComponentType;
45
72
  export type ActionMenuOptionType<T extends string | number> = {
46
73
  /**
@@ -68,7 +95,7 @@ export type ActionMenuProps<T extends string | number = string | number> = UseAc
68
95
  * Callback function triggered when an item is clicked.
69
96
  * @param item - The selected item.
70
97
  */
71
- onClick: (item: ActionMenuItemType<T>) => void;
98
+ onClick: (item: ActionMenuItemType<T>, e: MouseEvent<HTMLAnchorElement> | MouseEvent<HTMLButtonElement>) => void;
72
99
  /**
73
100
  * Config for the footer at the bottom of action menu list. It is sticky by default
74
101
  */
@@ -10,7 +10,9 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
10
10
  filteredOptions: import('./types').ActionMenuOptionType<T>[];
11
11
  focusedIndex: number;
12
12
  itemsRef: import('react').MutableRefObject<RefObject<HTMLAnchorElement | HTMLButtonElement>[]>;
13
- triggerProps: import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
13
+ triggerProps: import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & {
14
+ bounds: Pick<DOMRect, "left" | "top" | "height" | "width">;
15
+ };
14
16
  overlayProps: import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
15
17
  popoverProps: {
16
18
  slot?: string;
@@ -271,5 +273,5 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
271
273
  closePopover: () => void;
272
274
  searchTerm: string;
273
275
  handleSearch: (e: ChangeEvent<HTMLInputElement>) => void;
274
- scrollableRef: import('react').MutableRefObject<HTMLElement>;
276
+ scrollableRef: import('react').MutableRefObject<any> | import('react').LegacyRef<any>;
275
277
  };
@@ -63,5 +63,5 @@ import { ButtonComponentType, ButtonProps } from './types';
63
63
  * <Button icon={<ICCube />} ariaLabel="Label" />
64
64
  * ```
65
65
  */
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;
66
+ declare const Button: <ComponentType extends ButtonComponentType>({ dataTestId, text, variant, size, style, fontWeight, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, triggerAutoClickTimestamp, ...props }: ButtonProps<ComponentType>) => JSX.Element;
67
67
  export default Button;
@@ -1,6 +1,7 @@
1
1
  import { ProgressingProps } from '../../../Common/Types';
2
2
  import { ButtonProps } from './types';
3
3
  export declare const BUTTON_SIZE_TO_CLASS_NAME_MAP: Record<ButtonProps['size'], string>;
4
+ export declare const BUTTON_FONT_WEIGHT_TO_CLASS_NAME_MAP: Record<ButtonProps['fontWeight'], string>;
4
5
  export declare const ICON_BUTTON_SIZE_TO_CLASS_NAME_MAP: Record<ButtonProps['size'], string>;
5
6
  export declare const BUTTON_SIZE_TO_ICON_SIZE_MAP: Record<ButtonProps['size'], ProgressingProps['size']>;
6
7
  export declare const ICON_BUTTON_SIZE_TO_ICON_SIZE_MAP: Record<ButtonProps['size'], ProgressingProps['size']>;
@@ -116,7 +116,13 @@ export type ButtonProps<ComponentType extends ButtonComponentType = ButtonCompon
116
116
  /**
117
117
  * Props for tooltip
118
118
  */
119
- tooltipProps: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'> | (Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'content'> & Required<Pick<TooltipProps, 'shortcutKeyCombo'>>);
119
+ tooltipProps: Omit<Extract<TooltipProps, {
120
+ alwaysShowTippyOnHover: boolean;
121
+ }>, 'alwaysShowTippyOnHover'> | Omit<Extract<TooltipProps, {
122
+ alwaysShowTippyOnHover?: boolean;
123
+ }>, 'alwaysShowTippyOnHover'> | Omit<Extract<TooltipProps, {
124
+ alwaysShowTippyOnHover?: never;
125
+ }>, 'alwaysShowTippyOnHover'>;
120
126
  } | {
121
127
  showTooltip?: never;
122
128
  tooltipProps?: never;
@@ -136,6 +142,12 @@ export type ButtonProps<ComponentType extends ButtonComponentType = ButtonCompon
136
142
  * If provided, icon to be displayed at the end of the button
137
143
  */
138
144
  endIcon?: ReactElement;
145
+ /**
146
+ * Controls the font weight of the button text
147
+ *
148
+ * @default 'bold'
149
+ */
150
+ fontWeight?: 'bold' | 'normal';
139
151
  } | {
140
152
  /**
141
153
  * If provided, icon button is rendered
@@ -155,4 +167,5 @@ export type ButtonProps<ComponentType extends ButtonComponentType = ButtonCompon
155
167
  text?: never;
156
168
  startIcon?: never;
157
169
  endIcon?: never;
170
+ fontWeight?: never;
158
171
  });
@@ -1,6 +1,6 @@
1
1
  import { ButtonProps } from './types';
2
2
  export declare const getButtonIconClassName: ({ size, icon }: Pick<ButtonProps, "size" | "icon">) => string;
3
3
  export declare const getButtonLoaderSize: ({ size, icon }: Pick<ButtonProps, "size" | "icon">) => number;
4
- export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, icon, isAutoTriggerActive, }: Required<Pick<ButtonProps, "variant" | "size" | "style" | "isLoading" | "icon"> & {
4
+ export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, icon, isAutoTriggerActive, fontWeight, }: Required<Pick<ButtonProps, "variant" | "size" | "style" | "isLoading" | "icon" | "fontWeight"> & {
5
5
  isAutoTriggerActive: boolean;
6
6
  }>) => string;
@@ -1,3 +1,3 @@
1
1
  import { DeploymentTemplateHistoryType } from '../types';
2
- declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, rootClassName, codeEditorKey, }: DeploymentTemplateHistoryType) => JSX.Element;
2
+ declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, rootClassName, }: DeploymentTemplateHistoryType) => JSX.Element;
3
3
  export default DeploymentHistoryDiffView;
@@ -1,5 +1,5 @@
1
1
  import { SelectPickerOptionType } from '@Shared/Components/SelectPicker';
2
- import { History } from '../types';
2
+ import { DeploymentHistorySingleValue, History } from '../types';
3
3
  import { DeploymentHistoryConfigDiffProps } from './types';
4
4
  export declare const getPipelineDeployments: (triggerHistory: DeploymentHistoryConfigDiffProps["triggerHistory"]) => History[];
5
5
  export declare const getPipelineDeploymentsWfrIds: ({ pipelineDeployments, wfrId, }: {
@@ -20,3 +20,4 @@ export declare const parseDeploymentHistoryDiffSearchParams: (compareWfrId: numb
20
20
  };
21
21
  export declare const isDeploymentHistoryConfigDiffNotFoundError: <T extends unknown>(res: PromiseSettledResult<T>) => boolean;
22
22
  export declare const getDeploymentHistoryConfigDiffError: <T extends unknown>(res: PromiseSettledResult<T>) => any;
23
+ export declare const renderDetailedValue: (parentClassName: string, singleValue: DeploymentHistorySingleValue, dataTestId: string) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { ResponseType } from '../../../Common';
2
- import { DeploymentConfigurationsRes, DeploymentHistoryDetail, DeploymentHistoryDetailRes, DeploymentHistoryResult, DeploymentHistorySingleValue, DeploymentStatusDetailsResponse, HistoryDiffSelectorRes, ModuleConfigResponse, TriggerDetailsResponseType, TriggerHistoryParamsType } from './types';
2
+ import { DeploymentHistoryDetail, DeploymentHistoryResult, DeploymentStatusDetailsResponse, ModuleConfigResponse, TriggerDetailsResponseType, TriggerHistoryParamsType } from './types';
3
3
  export declare function getTriggerDetails({ appId, envId, pipelineId, triggerId, fetchIdData, }: {
4
4
  appId: any;
5
5
  envId: any;
@@ -18,12 +18,6 @@ export declare function getManualSync(params: {
18
18
  appId: string;
19
19
  envId: string;
20
20
  }): Promise<ResponseType>;
21
- export declare const getDeploymentHistoryList: (appId: string, pipelineId: string, triggerId: string) => Promise<DeploymentConfigurationsRes>;
22
- export declare const getDeploymentHistoryDetail: (appId: string, pipelineId: string, id: string, historyComponent: string, historyComponentName: string) => Promise<DeploymentHistoryDetailRes>;
23
- export declare const prepareDeploymentTemplateData: (rawData: any) => Record<string, DeploymentHistorySingleValue>;
24
- export declare const preparePipelineConfigData: (rawData: any) => Record<string, DeploymentHistorySingleValue>;
25
- export declare const prepareConfigMapAndSecretData: (rawData: any, type: string, historyData: DeploymentHistoryDetail, skipDecode?: boolean) => Record<string, DeploymentHistorySingleValue>;
26
21
  export declare const prepareHistoryData: (rawData: any, historyComponent: string, skipDecode?: boolean) => DeploymentHistoryDetail;
27
- export declare const getDeploymentDiffSelector: (pipelineId: string, historyComponent: any, baseConfigurationId: any, historyComponentName: any) => Promise<HistoryDiffSelectorRes>;
28
22
  export declare const getTriggerHistory: ({ appId, envId, pagination, releaseId, showCurrentReleaseDeployments, }: TriggerHistoryParamsType) => Promise<Pick<DeploymentHistoryResult, "result">>;
29
23
  export declare const getModuleConfigured: (moduleName: string) => Promise<ModuleConfigResponse>;
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties, MutableRefObject, ReactElement, ReactNode } from 'react';
2
2
  import { SupportedKeyboardKeysType } from '@Common/Hooks/UseRegisterShortcut/types';
3
- import { DeploymentAppTypes, FilterConditionsListType, ImageComment, OptionType, PaginationProps, PromotionApprovalMetadataType, ReleaseTag, ResponseType, UserApprovalMetadataType, useScrollable } from '../../../Common';
3
+ import { DeploymentAppTypes, FilterConditionsListType, ImageComment, OptionType, PaginationProps, PromotionApprovalMetadataType, ReleaseTag, ResponseType, TooltipProps, UserApprovalMetadataType, useScrollable } from '../../../Common';
4
4
  import { DeploymentStageType } from '../../constants';
5
5
  import { AggregationKeys, AppDetails, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, DeploymentStatusTimelineType, DeploymentStrategyType, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType, TargetPlatformsDTO } from '../../types';
6
6
  import { TargetPlatformBadgeListProps } from '../TargetPlatforms';
@@ -408,14 +408,12 @@ export interface DeploymentStatusDetailRowType extends Pick<DeploymentStatusDeta
408
408
  hideVerticalConnector?: boolean;
409
409
  deploymentDetailedData: DeploymentStatusDetailsBreakdownDataType;
410
410
  }
411
- export interface DeploymentConfigurationsRes extends ResponseType {
412
- result?: DeploymentTemplateList[];
413
- }
414
411
  export interface DeploymentHistorySingleValue {
415
412
  displayName: string;
416
413
  value: string;
417
414
  variableSnapshot?: object;
418
415
  resolvedValue?: string;
416
+ tooltipContent?: TooltipProps['content'];
419
417
  }
420
418
  export interface DeploymentHistoryDetail {
421
419
  componentName?: string;
@@ -427,21 +425,6 @@ export interface DeploymentTemplateHistoryType {
427
425
  baseTemplateConfiguration: DeploymentHistoryDetail;
428
426
  previousConfigAvailable: boolean;
429
427
  rootClassName?: string;
430
- codeEditorKey?: string;
431
- }
432
- export interface DeploymentHistoryDetailRes extends ResponseType {
433
- result?: DeploymentHistoryDetail;
434
- }
435
- export interface HistoryDiffSelectorList {
436
- id: number;
437
- deployedOn: string;
438
- deployedBy: string;
439
- deploymentStatus: string;
440
- wfrId?: number;
441
- runSource?: RunSourceType;
442
- }
443
- export interface HistoryDiffSelectorRes {
444
- result?: HistoryDiffSelectorList[];
445
428
  }
446
429
  export interface DeploymentHistorySidebarType {
447
430
  deploymentHistoryList: DeploymentTemplateList[];
@@ -1,6 +1,6 @@
1
1
  import { CodeEditorProps } from './types';
2
2
  declare const CodeEditor: {
3
- <DiffView extends boolean = false>({ theme, value: propValue, originalValue, modifiedValue, isOriginalModifiable, mode, noParsing, children, tabSize, height, shebang, onChange, onOriginalValueChange, onModifiedValueChange, readOnly, placeholder, diffView, loading, customLoader, validatorSchema, schemaURI, cleanData, onBlur, onFocus, autoFocus, disableSearch, }: CodeEditorProps<DiffView>): JSX.Element;
3
+ <DiffView extends boolean = false>({ theme, value: propValue, originalValue, modifiedValue, isOriginalModifiable, mode, noParsing, children, tabSize, height, shebang, onChange, onOriginalValueChange, onModifiedValueChange, placeholder, diffView, loading, customLoader, validatorSchema, schemaURI, cleanData, onBlur, onFocus, autoFocus, onSearchPanelOpen, onSearchBarAction, collapseUnchangedDiffView, ...resProps }: CodeEditorProps<DiffView>): JSX.Element;
4
4
  Clipboard: () => JSX.Element;
5
5
  Header: ({ children, className, hideDefaultSplitHeader }: import('./types').CodeEditorHeaderProps) => JSX.Element;
6
6
  Warning: ({ className, text, children }: import('./types').CodeEditorStatusBarProps) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { CodeEditorRendererProps } from './types';
2
- export declare const CodeEditorRenderer: ({ codemirrorMergeKey, theme, loading, customLoader, height, codeEditorTheme, readOnly, handleLhsOnChange, originalViewExtensions, handleOnChange, modifiedViewExtensions, codeMirrorParentDivRef, shebang, placeholder, onFocus, onBlur, extensions, autoFocus, diffMinimapExtensions, }: CodeEditorRendererProps) => JSX.Element;
2
+ export declare const CodeEditorRenderer: ({ codemirrorMergeKey, theme, loading, customLoader, height, codeEditorTheme, readOnly, handleLhsOnChange, originalViewExtensions, handleOnChange, modifiedViewExtensions, codeMirrorParentDivRef, shebang, placeholder, onFocus, onBlur, extensions, autoFocus, diffMinimapExtensions, collapseUnchanged, disableMinimap, }: CodeEditorRendererProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import { EditorView, Panel } from '@uiw/react-codemirror';
2
- export declare const codeEditorFindReplace: (view: EditorView) => Panel;
2
+ import { CodeEditorProps } from '../types';
3
+ export declare const getCodeEditorFindReplace: (onSearchBarAction: CodeEditorProps["onSearchBarAction"]) => (view: EditorView) => Panel;
@@ -29,6 +29,12 @@ type CodeEditorDiffBaseProps = {
29
29
  originalValue?: ReactCodeMirrorProps['value'];
30
30
  modifiedValue?: ReactCodeMirrorProps['value'];
31
31
  isOriginalModifiable?: boolean;
32
+ /**
33
+ * When true, renders a diff view in readOnly mode with collapsed unchanged diffs.
34
+ * This disables the minimap, code-editor search functionality, and language linting.
35
+ * @default false
36
+ */
37
+ collapseUnchangedDiffView?: boolean;
32
38
  };
33
39
  type CodeEditorPropsBasedOnDiffView<DiffView extends boolean> = DiffView extends true ? CodeEditorDiffBaseProps & Never<CodeEditorBaseProps> : CodeEditorBaseProps & Never<CodeEditorDiffBaseProps>;
34
40
  export type CodeEditorProps<DiffView extends boolean = false> = {
@@ -52,6 +58,11 @@ export type CodeEditorProps<DiffView extends boolean = false> = {
52
58
  disableSearch?: boolean;
53
59
  diffView?: DiffView;
54
60
  theme?: AppThemeType;
61
+ onSearchPanelOpen?: () => void;
62
+ /**
63
+ * This method is triggered when user types something in the search/replace bar or applies a search or replace action.
64
+ */
65
+ onSearchBarAction?: () => void;
55
66
  } & CodeEditorPropsBasedOnDiffView<DiffView>;
56
67
  export interface GetCodeEditorHeightReturnType {
57
68
  codeEditorParentClassName: string;
@@ -63,7 +74,7 @@ export type HoverTexts = {
63
74
  typeInfo: string;
64
75
  };
65
76
  export type FindReplaceQuery = Partial<Pick<SearchQuery, 'search' | 'wholeWord' | 'regexp' | 'replace' | 'caseSensitive'>>;
66
- export interface FindReplaceProps {
77
+ export interface FindReplaceProps extends Pick<CodeEditorProps, 'onSearchBarAction'> {
67
78
  view: EditorView;
68
79
  /** Default value for Search Query state. */
69
80
  defaultQuery: SearchQuery;
@@ -94,6 +105,8 @@ export type CodeEditorRendererProps = Required<Pick<CodeEditorProps, 'theme' | '
94
105
  modifiedViewExtensions: ReactCodeMirrorProps['extensions'];
95
106
  extensions: ReactCodeMirrorProps['extensions'];
96
107
  diffMinimapExtensions: ReactCodeMirrorProps['extensions'];
108
+ collapseUnchanged?: boolean;
109
+ disableMinimap?: boolean;
97
110
  };
98
111
  export interface DiffMinimapProps extends Pick<CodeEditorRendererProps, 'theme'> {
99
112
  view: MergeView;
@@ -1,10 +1,11 @@
1
1
  import { SortingOrder } from '../../../Common/Constants';
2
+ import { RadioGroupItemProps, RadioGroupProps } from '../../../Common/Types';
2
3
  import { AppEnvDeploymentConfigDTO, ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO, EnvResourceType, TemplateListDTO } from '../../Services';
3
4
  import { ManifestTemplateDTO } from '../../../Pages/Applications';
4
5
  import { DeploymentHistoryDetail } from '../CICDHistory';
5
6
  import { CollapseProps } from '../Collapse';
6
7
  import { CollapsibleListConfig, CollapsibleListItem } from '../CollapsibleList';
7
- import { SelectPickerProps } from '../SelectPicker';
8
+ import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
8
9
  export declare enum DeploymentConfigDiffState {
9
10
  NO_DIFF = "noDiff",
10
11
  HAS_DIFF = "hasDiff",
@@ -26,6 +27,15 @@ export interface DeploymentConfigListItem {
26
27
  singleView?: boolean;
27
28
  groupHeader?: string;
28
29
  }
30
+ interface DeploymentConfigDiffRadioConfig extends Pick<RadioGroupProps, 'name' | 'onChange'> {
31
+ title: string;
32
+ options: (Pick<RadioGroupItemProps, 'disabled'> & Pick<SelectPickerOptionType<string>, 'label' | 'value' | 'description' | 'tooltipProps'>)[];
33
+ groupValue: string;
34
+ }
35
+ export interface DeploymentConfigDiffRadioSelectConfig {
36
+ triggerElementTitle: string;
37
+ radioGroupConfig: DeploymentConfigDiffRadioConfig[];
38
+ }
29
39
  export type DeploymentConfigDiffSelectPickerProps = {
30
40
  type: 'string';
31
41
  id: string;
@@ -36,6 +46,12 @@ export type DeploymentConfigDiffSelectPickerProps = {
36
46
  id: string;
37
47
  text?: never;
38
48
  selectPickerProps: SelectPickerProps;
49
+ } | {
50
+ type: 'radio-group';
51
+ id: string;
52
+ text?: never;
53
+ radioSelectConfig: DeploymentConfigDiffRadioSelectConfig;
54
+ selectPickerProps?: never;
39
55
  };
40
56
  export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem<'navLink'>, 'href' | 'title' | 'onClick'> {
41
57
  Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
@@ -115,3 +131,4 @@ export type AppEnvDeploymentConfigListParams<IsManifestView> = (IsManifestView e
115
131
  isManifestView?: IsManifestView;
116
132
  convertVariables?: boolean;
117
133
  };
134
+ export {};
@@ -1,6 +1,5 @@
1
1
  import { AppEnvDeploymentConfigListParams, DeploymentConfigDiffProps } from '..';
2
2
  import { ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO, TemplateListDTO } from '../../Services/app.types';
3
- import { DiffViewerProps } from '../DiffViewer/types';
4
3
  export declare const getDeploymentTemplateData: (data: DeploymentTemplateDTO) => any;
5
4
  /**
6
5
  * Retrieves the draft data from the given configuration data object.
@@ -38,4 +37,3 @@ export declare const getDefaultVersionAndPreviousDeploymentOptions: (data: Templ
38
37
  previousDeployments: TemplateListDTO[];
39
38
  defaultVersions: TemplateListDTO[];
40
39
  };
41
- export declare const renderDiffViewNoDifferenceState: (lhsValue: string, rhsValue: string) => DiffViewerProps["codeFoldMessageRenderer"];
@@ -0,0 +1,7 @@
1
+ import { UsePopoverProps } from '../Popover';
2
+ import { DeploymentConfigDiffRadioSelectConfig } from './DeploymentConfigDiff.types';
3
+ declare const DeploymentConfigDiffRadioSelect: ({ radioSelectConfig, position, }: {
4
+ radioSelectConfig: DeploymentConfigDiffRadioSelectConfig;
5
+ position?: UsePopoverProps["position"];
6
+ }) => JSX.Element;
7
+ export default DeploymentConfigDiffRadioSelect;
@@ -2,3 +2,4 @@ export * from './DeploymentConfigDiff.component';
2
2
  export * from './DeploymentConfigDiff.constants';
3
3
  export * from './DeploymentConfigDiff.types';
4
4
  export * from './DeploymentConfigDiff.utils';
5
+ export { default as DeploymentConfigDiffRadioSelect } from './DeploymentConfigDiffRadioSelect';
@@ -0,0 +1,2 @@
1
+ import { DocLinkProps } from './types';
2
+ export declare const DocLink: <T extends boolean = false>({ docLinkKey, text, dataTestId, startIcon, showExternalIcon, onClick, fontWeight, size, variant, isExternalLink, openInNewTab, fullWidth, }: DocLinkProps<T>) => JSX.Element;