@devtron-labs/devtron-fe-common-lib 1.14.1 → 1.14.2-beta-0

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 (117) hide show
  1. package/dist/{@code-editor-Da2XaRcI.js → @code-editor-BuYqYK_U.js} +11115 -10762
  2. package/dist/{@common-rjsf-CK-nXKwn.js → @common-rjsf-C-srMZXE.js} +2 -2
  3. package/dist/{@framer-motion-DyOLEeMN.js → @framer-motion-62wGf8yQ.js} +3 -3
  4. package/dist/{@react-dates-B7d8RWU9.js → @react-dates-CYMJp3U9.js} +14 -14
  5. package/dist/{@react-select-Coo19Q6a.js → @react-select-DwgZP5FJ.js} +6 -6
  6. package/dist/{@react-virtualized-sticky-tree-BPjPJDIR.js → @react-virtualized-sticky-tree-fnroedPy.js} +1 -1
  7. package/dist/{@vendor-D9q4wrnL.js → @vendor-CShVblFI.js} +18496 -18687
  8. package/dist/Common/API/QueryClientProvider.d.ts +2 -0
  9. package/dist/Common/API/index.d.ts +2 -0
  10. package/dist/Common/API/useQueryClient.d.ts +6 -0
  11. package/dist/Common/Constants.d.ts +5 -11
  12. package/dist/Common/SegmentedControl/Segment.d.ts +1 -1
  13. package/dist/Common/SegmentedControl/types.d.ts +3 -2
  14. package/dist/Common/TippyCustomized.d.ts +1 -1
  15. package/dist/Common/Types.d.ts +10 -7
  16. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/services.d.ts +1 -1
  17. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +2 -1
  18. package/dist/Shared/Components/ActionMenu/types.d.ts +31 -4
  19. package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +4 -2
  20. package/dist/Shared/Components/Button/Button.component.d.ts +1 -1
  21. package/dist/Shared/Components/Button/constants.d.ts +1 -0
  22. package/dist/Shared/Components/Button/types.d.ts +14 -1
  23. package/dist/Shared/Components/Button/utils.d.ts +1 -1
  24. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.d.ts +1 -1
  25. package/dist/Shared/Components/CICDHistory/types.d.ts +1 -3
  26. package/dist/Shared/Components/CodeEditor/CodeEditor.d.ts +1 -1
  27. package/dist/Shared/Components/CodeEditor/CodeEditorRenderer.d.ts +1 -1
  28. package/dist/Shared/Components/CodeEditor/Extensions/findAndReplace.d.ts +2 -1
  29. package/dist/Shared/Components/CodeEditor/types.d.ts +14 -1
  30. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +0 -2
  31. package/dist/Shared/Components/DocLink/DocLink.d.ts +2 -0
  32. package/dist/Shared/Components/DocLink/constants.d.ts +94 -0
  33. package/dist/Shared/Components/DocLink/index.d.ts +4 -0
  34. package/dist/Shared/Components/DocLink/types.d.ts +18 -0
  35. package/dist/Shared/Components/DocLink/utils.d.ts +2 -0
  36. package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +1 -1
  37. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +1 -1
  38. package/dist/Shared/Components/DynamicDataTable/types.d.ts +8 -4
  39. package/dist/Shared/Components/FeatureDescription/types.d.ts +2 -1
  40. package/dist/Shared/Components/FramerComponents/index.d.ts +2 -3
  41. package/dist/Shared/Components/GenericInfoCard/GenericInfoCardListing.d.ts +2 -0
  42. package/dist/Shared/Components/GenericInfoCard/GenericInfoListSkeleton.d.ts +2 -0
  43. package/dist/Shared/Components/GenericInfoCard/index.d.ts +3 -1
  44. package/dist/Shared/Components/GenericInfoCard/types.d.ts +13 -0
  45. package/dist/Shared/Components/Header/ProfileMenu.d.ts +2 -0
  46. package/dist/Shared/Components/Header/types.d.ts +8 -8
  47. package/dist/Shared/Components/Header/utils.d.ts +0 -2
  48. package/dist/Shared/Components/Icon/Icon.d.ts +27 -0
  49. package/dist/Shared/Components/Icon/types.d.ts +2 -2
  50. package/dist/Shared/Components/InfoIconTippy/InfoIconTippy.d.ts +1 -1
  51. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  52. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +1 -1
  53. package/dist/Shared/Components/LoadingCard.d.ts +5 -0
  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 +5 -3
  58. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
  59. package/dist/Shared/Components/StatusComponent/AppStatus.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 +102 -0
  64. package/dist/Shared/Components/Switch/utils.d.ts +12 -0
  65. package/dist/Shared/Components/ThemeSwitcher/ThemeSwitcher.component.d.ts +1 -1
  66. package/dist/Shared/Components/ThemeSwitcher/index.d.ts +0 -1
  67. package/dist/Shared/Components/ThemeSwitcher/types.d.ts +1 -1
  68. package/dist/Shared/Components/index.d.ts +3 -1
  69. package/dist/Shared/Helpers.d.ts +1 -0
  70. package/dist/Shared/Providers/index.d.ts +1 -1
  71. package/dist/Shared/Providers/types.d.ts +20 -0
  72. package/dist/Shared/constants.d.ts +1 -0
  73. package/dist/Shared/types.d.ts +28 -0
  74. package/dist/Shared/validations.d.ts +1 -0
  75. package/dist/assets/@code-editor.css +1 -1
  76. package/dist/assets/empty-create.661d9355.png +0 -0
  77. package/dist/assets/ic-app-template.82736707.svg +23 -0
  78. package/dist/assets/ic-arrows-clockwise.5858ba0a.svg +3 -0
  79. package/dist/assets/ic-checkbox-selected-error.185fc40c.svg +4 -0
  80. package/dist/assets/{ic-hibernate.f75c1e70.svg → ic-checkbox-selected-error.b40237bc.svg} +3 -2
  81. package/dist/assets/ic-devtron-app.a8b688d3.svg +23 -0
  82. package/dist/assets/ic-devtron-job.1b216232.svg +10 -0
  83. package/dist/assets/ic-email.78fed574.svg +3 -0
  84. package/dist/assets/ic-fast-forward.8d1a414b.svg +4 -0
  85. package/dist/assets/ic-filter-applied.56f397cb.svg +4 -0
  86. package/dist/assets/ic-filter.d6f03b78.svg +3 -0
  87. package/dist/assets/ic-flask.d0624c30.svg +3 -0
  88. package/dist/assets/ic-hibernate-circle.7c32c56e.svg +3 -0
  89. package/dist/assets/{ic-arrow-square-out.3d1a0d41.svg → ic-hibernate.263ffcea.svg} +2 -2
  90. package/dist/assets/ic-key-enter.59d23056.svg +3 -0
  91. package/dist/assets/ic-lego.1d2c5e1d.svg +3 -0
  92. package/dist/assets/ic-magnifying-glass.cf47bce0.svg +3 -0
  93. package/dist/assets/ic-mechanical-operation.04a318d6.svg +17 -0
  94. package/dist/assets/ic-more-vertical.6b4cc903.svg +3 -0
  95. package/dist/assets/ic-play-outline.a4f09bf9.svg +3 -0
  96. package/dist/assets/ic-rocket-gear.f1e30f8a.svg +3 -0
  97. package/dist/assets/ic-spray-can.624b202a.svg +3 -0
  98. package/dist/assets/ic-strategy-blue-green-color.0b348d03.svg +6 -0
  99. package/dist/assets/ic-strategy-blue-green.4e57a068.svg +3 -0
  100. package/dist/assets/ic-strategy-canary-color.db010ee7.svg +5 -0
  101. package/dist/assets/ic-strategy-canary.aa75f27f.svg +3 -0
  102. package/dist/assets/ic-strategy-recreate-color.187facd4.svg +4 -0
  103. package/dist/assets/ic-strategy-recreate.77b19a53.svg +3 -0
  104. package/dist/assets/ic-strategy-rolling-color.f9b3c0bb.svg +6 -0
  105. package/dist/assets/ic-strategy-rolling.ba8a30f7.svg +3 -0
  106. package/dist/assets/ic-sun.47c14f53.svg +3 -0
  107. package/dist/assets/ic-traffic-signal.f23a1086.svg +3 -0
  108. package/dist/index.d.ts +22 -0
  109. package/dist/index.js +805 -790
  110. package/package.json +3 -3
  111. package/dist/Shared/Components/DiffViewer/DiffViewer.component.d.ts +0 -41
  112. package/dist/Shared/Components/DiffViewer/constants.d.ts +0 -2
  113. package/dist/Shared/Components/DiffViewer/index.d.ts +0 -1
  114. package/dist/Shared/Components/DiffViewer/types.d.ts +0 -9
  115. package/dist/Shared/Components/FramerComponents/MotionDiv.d.ts +0 -2
  116. package/dist/Shared/Components/LogoutCard.d.ts +0 -10
  117. package/dist/assets/ic-mechanical-operation.3c3f4672.svg +0 -76
@@ -0,0 +1,2 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export declare const QueryClientProvider: ({ children }: PropsWithChildren<{}>) => JSX.Element;
@@ -1,3 +1,5 @@
1
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
2
  export { default as CoreAPI } from './CoreAPI';
3
+ export { QueryClientProvider } from './QueryClientProvider';
4
+ export * from './useQueryClient';
3
5
  export { abortPreviousRequests, getIsRequestAborted, handleRedirectToLicenseActivation } from './utils';
@@ -0,0 +1,6 @@
1
+ import { QueryKey, UseMutationOptions, UseMutationResult, useQueryClient, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
+ import { ServerErrors } from '../ServerError';
3
+ import { ResponseType } from '../Types';
4
+ export declare const useQuery: <TQueryFnData = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<ResponseType<TQueryFnData>, ServerErrors, TData, TQueryKey>) => UseQueryResult<TData, ServerErrors>;
5
+ export declare const useMutation: <TData = unknown, TVariables = void, TContext = unknown>(options: UseMutationOptions<ResponseType<TData>, ServerErrors, TVariables, TContext>) => UseMutationResult<ResponseType<TData>, ServerErrors, TVariables, TContext>;
6
+ export { useQueryClient };
@@ -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";
@@ -300,6 +293,7 @@ export declare const API_STATUS_CODES: {
300
293
  EXPECTATION_FAILED: number;
301
294
  UNPROCESSABLE_ENTITY: number;
302
295
  LOCKED: number;
296
+ FAILED_DEPENDENCY: number;
303
297
  };
304
298
  export declare enum SERVER_MODE {
305
299
  EA_ONLY = "EA_ONLY",
@@ -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 } from '../Shared';
5
+ import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ButtonProps, 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
@@ -75,9 +75,13 @@ export interface CheckboxProps {
75
75
  onClick?: (event: any) => void;
76
76
  id?: string;
77
77
  dataTestId?: string;
78
+ error?: boolean;
78
79
  children?: ReactNode;
79
80
  }
80
- 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> & {
81
85
  theme: TippyTheme;
82
86
  visible?: boolean;
83
87
  heading?: ReactNode | string;
@@ -102,14 +106,13 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
102
106
  animation?: string;
103
107
  duration?: number;
104
108
  additionalContent?: ReactNode;
105
- documentationLink?: string;
106
109
  documentationLinkText?: string;
107
110
  children: React.ReactElement<any>;
108
111
  disableClose?: boolean;
109
- }
110
- 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'> {
111
114
  dataTestid?: string;
112
- children?: TippyCustomizedProps['children'];
115
+ children?: TippyCustomizedProps<T>['children'];
113
116
  iconClassName?: string;
114
117
  buttonPadding?: string;
115
118
  }
@@ -712,7 +715,7 @@ export interface AppEnvironment {
712
715
  ciArtifactId?: number;
713
716
  }
714
717
  export interface Strategy {
715
- deploymentTemplate: string;
718
+ deploymentTemplate: DeploymentStrategyType;
716
719
  config: any;
717
720
  default?: boolean;
718
721
  }
@@ -6,4 +6,4 @@ export declare const uploadCDPipelineFile: ({ file, appId, envId, allowedExtensi
6
6
  envId: number;
7
7
  abortControllerRef?: MutableRefObject<AbortController>;
8
8
  }) => Promise<UploadFileDTO>;
9
- export declare const triggerCDNode: ({ pipelineId, ciArtifactId, appId, stageType, deploymentWithConfig, wfrId, runtimeParamsPayload, abortControllerRef, skipIfHibernated, isRollbackTrigger, }: TriggerCDNodeServiceProps) => Promise<import('../../../../../Common/Types').ResponseType<any>>;
9
+ export declare const triggerCDNode: ({ pipelineId, ciArtifactId, appId, stageType, deploymentWithConfig, wfrId, runtimeParamsPayload, abortControllerRef, skipIfHibernated, isRollbackTrigger, strategy, }: TriggerCDNodeServiceProps) => Promise<import('../../../../../Common/Types').ResponseType<any>>;
@@ -1,7 +1,7 @@
1
1
  import { BuildStageType, FormType } from '../../../../../Common/CIPipeline.Types';
2
2
  import { APIOptions, DeploymentAppTypes, DeploymentNodeType } from '../../../../../Common/Types';
3
3
  import { DeploymentStrategy } from '../../../../../Shared/Components';
4
- import { EnvListMinDTO, RuntimeParamsTriggerPayloadType } from '../../../../../Shared/types';
4
+ import { DeploymentStrategyType, EnvListMinDTO, RuntimeParamsTriggerPayloadType } from '../../../../../Shared/types';
5
5
  import { STAGE_MAP } from '../../../../index';
6
6
  interface ConfigSecretType {
7
7
  label: string;
@@ -108,6 +108,7 @@ export interface TriggerCDNodeServiceProps extends Pick<APIOptions, 'abortContro
108
108
  */
109
109
  runtimeParamsPayload?: RuntimeParamsTriggerPayloadType;
110
110
  isRollbackTrigger?: boolean;
111
+ strategy?: DeploymentStrategyType;
111
112
  }
112
113
  export interface TriggerCDPipelinePayloadType extends Pick<TriggerCDNodeServiceProps, 'pipelineId' | 'appId' | 'ciArtifactId' | 'runtimeParamsPayload' | 'deploymentWithConfig'>, Partial<Pick<TriggerCDNodeServiceProps, 'skipIfHibernated'>> {
113
114
  cdWorkflowType: (typeof STAGE_MAP)[keyof typeof STAGE_MAP];
@@ -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;
@@ -2,7 +2,7 @@ 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';
5
- import { AggregationKeys, AppDetails, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, DeploymentStatusTimelineType, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType, TargetPlatformsDTO } from '../../types';
5
+ import { AggregationKeys, AppDetails, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, DeploymentStatusTimelineType, DeploymentStrategyType, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType, TargetPlatformsDTO } from '../../types';
6
6
  import { TargetPlatformBadgeListProps } from '../TargetPlatforms';
7
7
  export declare enum HistoryComponentType {
8
8
  CI = "CI",
@@ -427,7 +427,6 @@ export interface DeploymentTemplateHistoryType {
427
427
  baseTemplateConfiguration: DeploymentHistoryDetail;
428
428
  previousConfigAvailable: boolean;
429
429
  rootClassName?: string;
430
- codeEditorKey?: string;
431
430
  }
432
431
  export interface DeploymentHistoryDetailRes extends ResponseType {
433
432
  result?: DeploymentHistoryDetail;
@@ -593,7 +592,6 @@ export interface DeploymentHistory {
593
592
  ci_artifact_id?: number;
594
593
  runSource?: RunSourceType;
595
594
  }
596
- type DeploymentStrategyType = 'CANARY' | 'ROLLING' | 'RECREATE' | 'BLUE_GREEN';
597
595
  export interface DeploymentStrategy {
598
596
  deploymentTemplate: DeploymentStrategyType;
599
597
  config: any;
@@ -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,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,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;
@@ -0,0 +1,94 @@
1
+ export declare const DOCUMENTATION: {
2
+ readonly ADMIN_PASSWORD: "install/install-devtron#devtron-admin-credentials";
3
+ readonly APP_CI_CONFIG_BUILD_WITHOUT_DOCKER: "usage/applications/creating-application/docker-build-configuration#build-docker-image-without-dockerfile";
4
+ readonly APP_CREATE: "usage/applications/create-application";
5
+ readonly APP_CREATE_CI_CONFIG: "usage/applications/creating-application/docker-build-configuration";
6
+ readonly APP_CREATE_CONFIG_MAP: "usage/applications/creating-application/config-maps";
7
+ readonly APP_CREATE_ENVIRONMENT_OVERRIDE: "usage/applications/creating-application/environment-overrides";
8
+ readonly APP_CREATE_MATERIAL: "usage/applications/creating-application/git-material";
9
+ readonly APP_CREATE_SECRET: "usage/applications/creating-application/secrets";
10
+ readonly APP_CREATE_WORKFLOW: "usage/applications/creating-application/workflow";
11
+ readonly APP_DEPLOYMENT_TEMPLATE: "usage/applications/creating-application/deployment-template";
12
+ readonly APP_EPHEMERAL_CONTAINER: "usage/applications/app-details/ephemeral-containers";
13
+ readonly APP_METRICS: "usage/applications/app-details/app-metrics";
14
+ readonly APP_OVERVIEW_TAGS: "usage/applications/overview#manage-tags";
15
+ readonly APP_ROLLOUT_DEPLOYMENT_TEMPLATE: "usage/applications/creating-application/deployment-template/rollout-deployment";
16
+ readonly BUILD_STAGE: "usage/applications/creating-application/workflow/ci-pipeline#build-stage";
17
+ readonly APP_TAGS: "usage/applications/create-application#tags";
18
+ readonly BLOB_STORAGE: "configurations-overview/installation-configuration#configuration-of-blob-storage";
19
+ readonly BULK_UPDATE: "usage/bulk-update";
20
+ readonly CHART_GROUP: "usage/deploy-chart/chart-group";
21
+ readonly CHART_LIST: "usage/deploy-chart/overview-of-charts";
22
+ readonly CHART_STORE_METRICS_SERVER: "dashboard//chart-store/discover?appStoreName=metrics-server";
23
+ readonly CUSTOM_VALUES: "usage/deploy-chart/overview-of-charts#custom-values";
24
+ readonly DEPLOYMENT: "usage/applications/creating-application/deployment-template/deployment";
25
+ readonly DEPLOYMENT_TEMPLATE: "usage/applications/creating-application/deployment-template";
26
+ readonly DEVTRON_UPGRADE: "getting-started/upgrade";
27
+ readonly CONFIGURING_WEBHOOK: "usage/applications/creating-application/workflow/ci-pipeline#configuring-webhook";
28
+ readonly ENTERPRISE_LICENSE: "enterprise-license";
29
+ readonly EXECUTE_CUSTOM_SCRIPT: "usage/applications/creating-application/workflow/ci-pipeline/ci-build-pre-post-plugins#execute-custom-script";
30
+ readonly EXTERNAL_LINKS: "getting-started/global-configurations/external-links";
31
+ readonly EXTERNAL_SECRET: "usage/applications/creating-application/secrets#external-secrets";
32
+ readonly HOME_PAGE: "https://devtron.ai";
33
+ readonly DOC_HOME_PAGE: "https://docs.devtron.ai";
34
+ readonly KUBE_CONFIG: "usage/resource-browser#running-kubectl-commands-locally";
35
+ readonly JOBS: "usage/jobs";
36
+ readonly TAINT: "usage/resource-browser#taint-a-node";
37
+ readonly GLOBAL_CONFIG_API_TOKEN: "getting-started/global-configurations/authorization/api-tokens";
38
+ readonly GLOBAL_CONFIG_BUILD_INFRA: "global-configurations/build-infra";
39
+ readonly GLOBAL_CONFIG_CHART: "getting-started/global-configurations/chart-repo";
40
+ readonly GLOBAL_CONFIG_CLUSTER: "getting-started/global-configurations/cluster-and-environments";
41
+ readonly GLOBAL_CONFIG_CUSTOM_CHART: "getting-started/global-configurations/custom-charts";
42
+ readonly GLOBAL_CONFIG_CUSTOM_CHART_PRE_REQUISITES: "global-configurations/deployment-charts#preparing-a-deployment-chart";
43
+ readonly GLOBAL_CONFIG_DOCKER: "getting-started/global-configurations/container-registries";
44
+ readonly GLOBAL_CONFIG_GIT: "getting-started/global-configurations/git-accounts";
45
+ readonly GLOBAL_CONFIG_GITOPS: "global-configurations/gitops";
46
+ readonly GLOBAL_CONFIG_GITOPS_GITHUB: "global-configurations/gitops#github";
47
+ readonly GLOBAL_CONFIG_GITOPS_GITLAB: "global-configurations/gitops#gitlab";
48
+ readonly GLOBAL_CONFIG_GITOPS_AZURE: "global-configurations/gitops#azure";
49
+ readonly GLOBAL_CONFIG_GITOPS_BITBUCKET: "global-configurations/gitops#bitbucket";
50
+ readonly GLOBAL_CONFIG_GROUPS: "getting-started/global-configurations/authorization/permission-groups";
51
+ readonly GLOBAL_CONFIG_HOST_URL: "global-configurations/host-url";
52
+ readonly GLOBAL_CONFIG_NOTIFICATION: "getting-started/global-configurations/manage-notification";
53
+ readonly GLOBAL_CONFIG_PERMISSION: "global-configurations/authorization/user-access#devtron-apps-permissions";
54
+ readonly GLOBAL_CONFIG_PROJECT: "global-configurations/projects";
55
+ readonly GLOBAL_CONFIG_SSO: "getting-started/global-configurations/sso-login";
56
+ readonly GLOBAL_CONFIG_SCOPED_VARIABLES: "getting-started/global-configurations/scoped-variables";
57
+ readonly GLOBAL_CONFIG_USER: "getting-started/global-configurations/authorization/user-access";
58
+ readonly HYPERION: "usage/applications#view-external-helm-app-listing";
59
+ readonly JOB_CRONJOB: "usage/applications/creating-application/deployment-template/job-and-cronjob";
60
+ readonly JOB_SOURCE_CODE: "usage/jobs/configuration-job";
61
+ readonly JOB_WORKFLOW_EDITOR: "usage/jobs/workflow-editor-job";
62
+ readonly K8S_RESOURCES_PERMISSIONS: "global-configurations/authorization/user-access#kubernetes-resources-permissions";
63
+ readonly PRE_POST_BUILD_STAGE: "usage/applications/creating-application/ci-pipeline/ci-build-pre-post-plugins";
64
+ readonly ROLLOUT: "usage/applications/creating-application/deployment-template/rollout-deployment";
65
+ readonly SECURITY: "usage/security-features";
66
+ readonly SPECIFY_IMAGE_PULL_SECRET: "getting-started/global-configurations/container-registries#specify-image-pull-secret";
67
+ readonly TENANT_INSTALLATION: "usage/software-distribution-hub/tenants";
68
+ readonly CEL: "https://github.com/google/cel-spec/blob/master/doc/langdef.md";
69
+ readonly KUBERNETES_LABELS: "https://kubernetes.io/docs/concepts/overview/working-with-objects/labels";
70
+ readonly IMAGE_PROMOTION: "global-configurations/image-promotion-policy";
71
+ readonly IMAGE_PROMOTION_ASSIGN_TO: "global-configurations/image-promotion-policy#applying-an-image-promotion-policy";
72
+ readonly TAGS: "usage/applications/create-application#tags";
73
+ readonly TAGS_POLICY: "global-configurations/tags-policy";
74
+ readonly RESOURCE_WATCHER: "usage/resource-watcher";
75
+ readonly GITOPS_BITBUCKET: "global-configurations/gitops#bitbucket";
76
+ readonly DEPLOYMENT_CONFIGS: "resources/glossary#base-deployment-template";
77
+ readonly RJSF_PLAYGROUND: "https://rjsf-team.github.io/react-jsonschema-form/";
78
+ readonly GLOBAL_CONFIG_DEPLOYMENT_WINDOW: "global-configurations/deployment-window";
79
+ readonly GLOBAL_CONFIG_CATALOG_FRAMEWORK: "global-configurations/catalog-framework";
80
+ readonly GLOBAL_CONFIG_DEVTRON_APP_TEMPLATES: "global-configurations";
81
+ readonly GLOBAL_CONFIG_FILTER_CONDITION: "global-configurations/filter-condition";
82
+ readonly GLOBAL_CONFIG_LOCK_DEPLOYMENT_CONFIG: "global-configurations/lock-deployment-config";
83
+ readonly GLOBAL_CONFIG_PLUGINS_POLICY: "global-configurations/plugins-policy";
84
+ readonly GLOBAL_CONFIG_APPROVAL_POLICY: "global-configurations/approval-policy";
85
+ readonly GLOBAL_CONFIG_SSO_LOGIN_LDAP: "global-configurations/authorization/sso-login/ldap";
86
+ readonly GLOBAL_CONFIG_SSO_LOGIN_MICROSOFT: "global-configurations/authorization/sso-login/microsoft";
87
+ readonly GLOBAL_CONFIG_PULL_IMAGE_DIGEST: "global-configurations/pull-image-digest";
88
+ readonly GLOBAL_CONFIG_TAGS: "getting-started/global-configurations/tags-policy";
89
+ readonly SOFTWARE_DISTRIBUTION_HUB: "usage/software-distribution-hub";
90
+ readonly RELEASE_TRACKS: "usage/software-distribution-hub/release-hub#creating-release-tracks-and-versions";
91
+ readonly RELEASES: "usage/software-distribution-hub/release-hub#creating-release-tracks-and-versions";
92
+ readonly TENANTS: "usage/software-distribution-hub/tenants#adding-installation";
93
+ readonly TENANTS_INSTALLATION: "usage/software-distribution-hub/tenants";
94
+ };
@@ -0,0 +1,4 @@
1
+ export { DOCUMENTATION } from './constants';
2
+ export { DocLink } from './DocLink';
3
+ export type { DocLinkProps } from './types';
4
+ export { getDocumentationUrl } from './utils';
@@ -0,0 +1,18 @@
1
+ import { MouseEvent } from 'react';
2
+ import { ButtonComponentType, ButtonProps } from '..';
3
+ import { DOCUMENTATION } from './constants';
4
+ export type BaseDocLink<T extends boolean> = {
5
+ isExternalLink?: T;
6
+ isEnterprise?: boolean;
7
+ docLinkKey: T extends true ? string : keyof typeof DOCUMENTATION;
8
+ };
9
+ export type DocLinkProps<T extends boolean = false> = Pick<ButtonProps<ButtonComponentType.anchor>, 'dataTestId' | 'size' | 'variant' | 'fullWidth' | 'fontWeight' | 'startIcon'> & Omit<BaseDocLink<T>, 'isEnterprise'> & {
10
+ text?: string;
11
+ showExternalIcon?: boolean;
12
+ onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
13
+ /**
14
+ * If `true`, the documentation will open in a new browser tab instead of the side panel.
15
+ * @default false
16
+ */
17
+ openInNewTab?: boolean;
18
+ };
@@ -0,0 +1,2 @@
1
+ import { BaseDocLink } from './types';
2
+ export declare const getDocumentationUrl: <T extends boolean = false>({ docLinkKey, isEnterprise, isExternalLink, }: BaseDocLink<T>) => string;
@@ -1,2 +1,2 @@
1
1
  import { DynamicDataTableProps } from './types';
2
- export declare const DynamicDataTable: <K extends string, CustomStateType = Record<string, unknown>>({ headers, onRowAdd, ...props }: DynamicDataTableProps<K, CustomStateType>) => JSX.Element;
2
+ export declare const DynamicDataTable: <K extends string, CustomStateType = Record<string, unknown>>({ headers, ...props }: DynamicDataTableProps<K, CustomStateType>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { DynamicDataTableRowProps } from './types';
2
- export declare const DynamicDataTableRow: <K extends string, CustomStateType = Record<string, unknown>>({ rows, headers, readOnly, isDeletionNotAllowed, cellError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, focusableFieldKey, isAddRowButtonClicked, setIsAddRowButtonClicked, }: DynamicDataTableRowProps<K, CustomStateType>) => JSX.Element;
2
+ export declare const DynamicDataTableRow: <K extends string, CustomStateType = Record<string, unknown>>({ rows, headers, readOnly, isDeletionNotAllowed, cellError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, focusableFieldKey, shouldAutoFocusOnMount, }: DynamicDataTableRowProps<K, CustomStateType>) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import { DetailedHTMLProps, Dispatch, ReactElement, ReactNode, SetStateAction } from 'react';
1
+ import { DetailedHTMLProps, ReactElement, ReactNode } from 'react';
2
2
  import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
3
3
  import { UseStateFiltersReturnType } from '../../../Common/Hooks';
4
4
  import { TooltipProps } from '@Common/Tooltip/types';
@@ -166,11 +166,15 @@ export type DynamicDataTableProps<K extends string, CustomStateType = Record<str
166
166
  * @default 'first column key'
167
167
  */
168
168
  focusableFieldKey?: K;
169
+ /**
170
+ * When true, the table will automatically focus the first focusable cell
171
+ * or cell key denoted by `focusableFieldKey` when the component mounts.
172
+ * @default false
173
+ */
174
+ shouldAutoFocusOnMount?: boolean;
169
175
  };
170
176
  export interface DynamicDataTableHeaderProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'addBtnTooltip' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'> {
171
177
  }
172
- export interface DynamicDataTableRowProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'rows' | 'headers' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'cellError' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent' | 'focusableFieldKey'> {
173
- isAddRowButtonClicked: boolean;
174
- setIsAddRowButtonClicked: Dispatch<SetStateAction<boolean>>;
178
+ export interface DynamicDataTableRowProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'rows' | 'headers' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'cellError' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent' | 'focusableFieldKey' | 'shouldAutoFocusOnMount'> {
175
179
  }
176
180
  export {};
@@ -1,9 +1,10 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { ImageType } from '../../../Common';
3
3
  import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
4
+ import { DocLinkProps } from '../DocLink';
4
5
  interface BaseFeatureDescriptionModalProps {
5
6
  renderDescriptionContent?: () => ReactNode;
6
- docLink?: string;
7
+ docLink?: DocLinkProps['docLinkKey'];
7
8
  imageVariant?: ImageType;
8
9
  SVGImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
9
10
  imageStyles?: React.CSSProperties;