@devtron-labs/devtron-fe-common-lib 1.14.1-gpu-workload → 1.14.1-pre-2

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 (52) hide show
  1. package/dist/{@code-editor-BFK-59yA.js → @code-editor-CrOGfgr1.js} +25497 -25289
  2. package/dist/{@common-rjsf-YUW2Pq1O.js → @common-rjsf-D4AGo7Oh.js} +7 -7
  3. package/dist/{@framer-motion-eB9Rj-_8.js → @framer-motion-C2xOL-4M.js} +1 -1
  4. package/dist/{@react-dates-CJpoumtu.js → @react-dates-BWXINTab.js} +14 -14
  5. package/dist/{@react-select-CUbAbK6L.js → @react-select-CJ8Qoy49.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-Ckb5S1RC.js → @react-virtualized-sticky-tree-DMTSZNIX.js} +1 -1
  7. package/dist/{@vendor-4cEd9dja.js → @vendor-Cmeb0vtT.js} +10011 -10001
  8. package/dist/Common/Constants.d.ts +0 -10
  9. package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
  10. package/dist/Common/RJSF/Form.d.ts +1 -1
  11. package/dist/Common/SegmentedControl/Segment.d.ts +1 -1
  12. package/dist/Common/SegmentedControl/types.d.ts +3 -2
  13. package/dist/Common/TippyCustomized.d.ts +1 -1
  14. package/dist/Common/Types.d.ts +10 -6
  15. package/dist/Common/index.d.ts +1 -0
  16. package/dist/Pages/GlobalConfigurations/DeploymentCharts/types.d.ts +1 -2
  17. package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +11 -11
  18. package/dist/Shared/Components/FeatureDescription/FeatureDescriptionModal.d.ts +1 -1
  19. package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +1 -1
  20. package/dist/Shared/Components/FeatureDescription/types.d.ts +5 -2
  21. package/dist/Shared/Components/GenericInfoCard/GenericInfoCardListing.d.ts +2 -0
  22. package/dist/Shared/Components/GenericInfoCard/GenericInfoListSkeleton.d.ts +2 -0
  23. package/dist/Shared/Components/GenericInfoCard/index.d.ts +3 -1
  24. package/dist/Shared/Components/GenericInfoCard/types.d.ts +13 -0
  25. package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
  26. package/dist/Shared/Components/Header/types.d.ts +5 -4
  27. package/dist/Shared/Components/Icon/Icon.d.ts +3 -0
  28. package/dist/Shared/Components/InfoIconTippy/InfoIconTippy.d.ts +1 -1
  29. package/dist/Shared/Components/ModalSidebarPanel/ModalSidebarPanel.component.d.ts +1 -1
  30. package/dist/Shared/Components/ModalSidebarPanel/types.d.ts +4 -2
  31. package/dist/Shared/Components/Popover/utils.d.ts +1 -1
  32. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
  33. package/dist/Shared/Components/Switch/Switch.component.d.ts +3 -0
  34. package/dist/Shared/Components/Switch/constants.d.ts +14 -0
  35. package/dist/Shared/Components/Switch/index.d.ts +2 -0
  36. package/dist/Shared/Components/Switch/types.d.ts +105 -0
  37. package/dist/Shared/Components/Switch/utils.d.ts +12 -0
  38. package/dist/Shared/Components/index.d.ts +1 -0
  39. package/dist/Shared/DocLink/DocLink.d.ts +2 -0
  40. package/dist/Shared/DocLink/constants.d.ts +91 -0
  41. package/dist/Shared/DocLink/index.d.ts +3 -0
  42. package/dist/Shared/DocLink/types.d.ts +11 -0
  43. package/dist/Shared/DocLink/utils.d.ts +2 -0
  44. package/dist/assets/@code-editor.css +1 -1
  45. package/dist/assets/empty-create.661d9355.png +0 -0
  46. package/dist/assets/ic-app-template.82736707.svg +23 -0
  47. package/dist/assets/ic-devtron-app.a8b688d3.svg +23 -0
  48. package/dist/assets/ic-devtron-job.1b216232.svg +10 -0
  49. package/dist/index.js +715 -710
  50. package/package.json +1 -1
  51. package/dist/Pages/GlobalConfigurations/DeploymentCharts/gpuWorkloadSchema.json.d.ts +0 -102
  52. package/dist/assets/ic-arrow-square-out.3d1a0d41.svg +0 -19
@@ -5,16 +5,6 @@ export declare const DEVTRON_HOME_PAGE = "https://devtron.ai/";
5
5
  export declare const DOCUMENTATION_VERSION = "/v/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
- };
18
8
  export declare const PATTERNS: {
19
9
  STRING: RegExp;
20
10
  DECIMAL_NUMBERS: RegExp;
@@ -1,6 +1,6 @@
1
1
  import { ShortcutType } from './types';
2
2
  export declare const preprocessKeys: (keys: ShortcutType["keys"]) => {
3
- keys: ("R" | "Alt" | "F" | "E" | "K" | "X" | "A" | "Home" | "End" | "." | "Space" | "Control" | "Shift" | "Meta" | "Escape" | "Enter" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "ArrowDown" | "PageUp" | "PageDown" | "Backspace" | "Delete")[];
3
+ keys: ("R" | "Enter" | "Escape" | "." | "Alt" | "F" | "E" | "K" | "X" | "A" | "Home" | "End" | "Space" | "Control" | "Shift" | "Meta" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "ArrowDown" | "PageUp" | "PageDown" | "Backspace" | "Delete")[];
4
4
  id: string;
5
5
  };
6
6
  export declare const verifyCallbackStack: (stack: ShortcutType["callbackStack"]) => void;
@@ -1,3 +1,3 @@
1
1
  import { default as RJSF } from '@rjsf/core';
2
2
  import { FormProps } from './types';
3
- export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "name" | "id" | "disabled" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "autoComplete" | "method" | "action" | "tagName" | "noValidate" | "readonly" | "uiSchema" | "schema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<any, import('./types').RJSFFormSchema, any>>>;
3
+ export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "name" | "id" | "disabled" | "tagName" | "onChange" | "onBlur" | "onSubmit" | "target" | "onFocus" | "onError" | "autoComplete" | "method" | "action" | "noValidate" | "readonly" | "uiSchema" | "schema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<any, import('./types').RJSFFormSchema, any>>>;
@@ -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;
@@ -3,7 +3,7 @@ import { TippyProps } from '@tippyjs/react';
3
3
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
5
5
  import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ButtonProps, ComponentLayoutType, StatusType } from '../Shared';
6
- import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
6
+ import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, DOCUMENTATION, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
9
9
  *
@@ -77,7 +77,12 @@ export interface CheckboxProps {
77
77
  dataTestId?: string;
78
78
  children?: ReactNode;
79
79
  }
80
- export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
80
+ export type TippyWithBaseDocLinkTypes<T extends boolean> = {
81
+ isExternalLink?: T;
82
+ isEnterprise?: boolean;
83
+ documentationLink?: T extends true ? string : keyof typeof DOCUMENTATION;
84
+ };
85
+ export type TippyCustomizedProps<T extends boolean> = Pick<TippyProps, 'appendTo'> & TippyWithBaseDocLinkTypes<T> & {
81
86
  theme: TippyTheme;
82
87
  visible?: boolean;
83
88
  heading?: ReactNode | string;
@@ -102,14 +107,13 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
102
107
  animation?: string;
103
108
  duration?: number;
104
109
  additionalContent?: ReactNode;
105
- documentationLink?: string;
106
110
  documentationLinkText?: string;
107
111
  children: React.ReactElement<any>;
108
112
  disableClose?: boolean;
109
- }
110
- export interface InfoIconTippyProps extends Pick<TippyCustomizedProps, 'heading' | 'infoText' | 'iconClass' | 'documentationLink' | 'documentationLinkText' | 'additionalContent' | 'placement' | 'Icon' | 'headingInfo'> {
113
+ };
114
+ export interface InfoIconTippyProps<T extends boolean = false> extends Pick<TippyCustomizedProps<T>, 'heading' | 'infoText' | 'iconClass' | 'documentationLinkText' | 'additionalContent' | 'placement' | 'Icon' | 'headingInfo' | 'documentationLink' | 'isEnterprise' | 'isExternalLink'> {
111
115
  dataTestid?: string;
112
- children?: TippyCustomizedProps['children'];
116
+ children?: TippyCustomizedProps<T>['children'];
113
117
  iconClassName?: string;
114
118
  buttonPadding?: string;
115
119
  }
@@ -1,3 +1,4 @@
1
+ export * from '../Shared/DocLink';
1
2
  export * from './AddCDButton';
2
3
  export * from './API';
3
4
  export { BreadCrumb, useBreadcrumb } from './BreadCrumb/BreadCrumb';
@@ -17,7 +17,6 @@ export declare enum DEVTRON_DEPLOYMENT_CHART_NAMES {
17
17
  JOB_AND_CRONJOB_CHART_NAME = "Job & CronJob",
18
18
  ROLLOUT_DEPLOYMENT = "Rollout Deployment",
19
19
  DEPLOYMENT = "Deployment",
20
- STATEFUL_SET = "StatefulSet",
21
- GPU_WORKLOAD = "GPU-Workload"
20
+ STATEFUL_SET = "StatefulSet"
22
21
  }
23
22
  export {};
@@ -23,22 +23,26 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
23
23
  role?: import('react').AriaRole;
24
24
  about?: string;
25
25
  is?: string;
26
- security?: string;
26
+ hidden?: boolean;
27
+ prefix?: string;
28
+ resource?: string;
29
+ draggable?: boolean | "true" | "false";
30
+ onClick?: import('react').MouseEventHandler<HTMLDivElement>;
31
+ onChange?: import('react').FormEventHandler<HTMLDivElement>;
32
+ onBlur?: import('react').FocusEventHandler<HTMLDivElement>;
33
+ onSubmit?: import('react').FormEventHandler<HTMLDivElement>;
34
+ dir?: string;
27
35
  onMouseEnter?: import('react').MouseEventHandler<HTMLDivElement>;
28
36
  "aria-describedby"?: string;
29
37
  "aria-errormessage"?: string;
30
38
  "aria-label"?: string;
31
39
  "aria-labelledby"?: string;
32
- onClick?: import('react').MouseEventHandler<HTMLDivElement>;
33
40
  defaultChecked?: boolean;
34
41
  suppressContentEditableWarning?: boolean;
35
42
  suppressHydrationWarning?: boolean;
36
43
  accessKey?: string;
37
44
  contentEditable?: "inherit" | (boolean | "true" | "false");
38
45
  contextMenu?: string;
39
- dir?: string;
40
- draggable?: boolean | "true" | "false";
41
- hidden?: boolean;
42
46
  lang?: string;
43
47
  placeholder?: string;
44
48
  spellCheck?: boolean | "true" | "false";
@@ -47,9 +51,7 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
47
51
  radioGroup?: string;
48
52
  datatype?: string;
49
53
  inlist?: any;
50
- prefix?: string;
51
54
  property?: string;
52
- resource?: string;
53
55
  typeof?: string;
54
56
  vocab?: string;
55
57
  autoCapitalize?: string;
@@ -61,6 +63,7 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
61
63
  itemID?: string;
62
64
  itemRef?: string;
63
65
  results?: number;
66
+ security?: string;
64
67
  unselectable?: "on" | "off";
65
68
  inputMode?: "search" | "text" | "none" | "url" | "tel" | "email" | "numeric" | "decimal";
66
69
  "aria-activedescendant"?: string;
@@ -75,7 +78,7 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
75
78
  "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date";
76
79
  "aria-details"?: string;
77
80
  "aria-disabled"?: boolean | "true" | "false";
78
- "aria-dropeffect"?: "link" | "none" | "popup" | "copy" | "execute" | "move";
81
+ "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup";
79
82
  "aria-expanded"?: boolean | "true" | "false";
80
83
  "aria-flowto"?: string;
81
84
  "aria-grabbed"?: boolean | "true" | "false";
@@ -124,9 +127,7 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
124
127
  onCompositionUpdateCapture?: import('react').CompositionEventHandler<HTMLDivElement>;
125
128
  onFocus?: import('react').FocusEventHandler<HTMLDivElement>;
126
129
  onFocusCapture?: import('react').FocusEventHandler<HTMLDivElement>;
127
- onBlur?: import('react').FocusEventHandler<HTMLDivElement>;
128
130
  onBlurCapture?: import('react').FocusEventHandler<HTMLDivElement>;
129
- onChange?: import('react').FormEventHandler<HTMLDivElement>;
130
131
  onChangeCapture?: import('react').FormEventHandler<HTMLDivElement>;
131
132
  onBeforeInput?: import('react').FormEventHandler<HTMLDivElement>;
132
133
  onBeforeInputCapture?: import('react').FormEventHandler<HTMLDivElement>;
@@ -134,7 +135,6 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
134
135
  onInputCapture?: import('react').FormEventHandler<HTMLDivElement>;
135
136
  onReset?: import('react').FormEventHandler<HTMLDivElement>;
136
137
  onResetCapture?: import('react').FormEventHandler<HTMLDivElement>;
137
- onSubmit?: import('react').FormEventHandler<HTMLDivElement>;
138
138
  onSubmitCapture?: import('react').FormEventHandler<HTMLDivElement>;
139
139
  onInvalid?: import('react').FormEventHandler<HTMLDivElement>;
140
140
  onInvalidCapture?: import('react').FormEventHandler<HTMLDivElement>;
@@ -1,2 +1,2 @@
1
1
  import { FeatureDescriptionModalProps } from './types';
2
- export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, tabsConfig, }: FeatureDescriptionModalProps) => JSX.Element;
2
+ export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, tabsConfig, isEnterprise, }: FeatureDescriptionModalProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { DescriptorProps } from './types';
2
- declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, tabsConfig, }: DescriptorProps) => JSX.Element;
2
+ declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, tabsConfig, isEnterprise, }: DescriptorProps) => JSX.Element;
3
3
  export default FeatureTitleWithInfo;
@@ -1,9 +1,10 @@
1
1
  import { default as React, ReactNode } from 'react';
2
+ import { DocLinkProps } from '@Shared/DocLink/types';
2
3
  import { ImageType } from '../../../Common';
3
4
  import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
4
- interface BaseFeatureDescriptionModalProps {
5
+ interface BaseFeatureDescriptionModalProps<T extends boolean = false> {
5
6
  renderDescriptionContent?: () => ReactNode;
6
- docLink?: string;
7
+ docLink?: DocLinkProps<T>['docLinkKey'];
7
8
  imageVariant?: ImageType;
8
9
  SVGImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
9
10
  imageStyles?: React.CSSProperties;
@@ -33,6 +34,7 @@ export type FeatureDescriptionModalProps = {
33
34
  title: string;
34
35
  closeModalText?: string;
35
36
  closeModal?: () => void;
37
+ isEnterprise?: boolean;
36
38
  } & ((BaseFeatureDescriptionModalProps & {
37
39
  tabsConfig?: never;
38
40
  }) | FeatureDescriptionModalWithTabsConfig);
@@ -53,5 +55,6 @@ export type DescriptorProps = ((Omit<FeatureDescriptionModalProps, 'tabsConfig'>
53
55
  * @default false
54
56
  */
55
57
  showInfoIcon?: boolean;
58
+ isEnterprise?: boolean;
56
59
  };
57
60
  export {};
@@ -0,0 +1,2 @@
1
+ import { GenericInfoCardListingProps } from './types';
2
+ export declare const GenericInfoCardListing: ({ isLoading, error, list, searchKey, reloadList, borderVariant, handleClearFilters, emptyStateConfig, }: GenericInfoCardListingProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { GenericInfoListSkeletonProps } from './types';
2
+ export declare const GenericInfoListSkeleton: ({ borderVariant }: GenericInfoListSkeletonProps) => JSX.Element;
@@ -1,2 +1,4 @@
1
1
  export { default as GenericInfoCard } from './GenericInfoCard.component';
2
- export { GenericInfoCardBorderVariant, type GenericInfoCardProps } from './types';
2
+ export * from './GenericInfoCardListing';
3
+ export { GenericInfoListSkeleton } from './GenericInfoListSkeleton';
4
+ export { GenericInfoCardBorderVariant, type GenericInfoCardListingProps, type GenericInfoCardProps } from './types';
@@ -1,5 +1,8 @@
1
1
  import { MouseEventHandler, ReactElement } from 'react';
2
2
  import { LinkProps } from 'react-router-dom';
3
+ import { GenericFilterEmptyStateProps } from '@Common/EmptyState/types';
4
+ import { GenericEmptyStateType } from '../../../Common/Types';
5
+ import { APIResponseHandlerProps } from '../APIResponseHandler';
3
6
  type BaseGenericInfoCardProps = {
4
7
  title: string;
5
8
  description: string;
@@ -23,4 +26,14 @@ export type GenericInfoCardProps = {
23
26
  } & Partial<Record<keyof BaseGenericInfoCardProps, never>>) | ({
24
27
  isLoading?: boolean;
25
28
  } & BaseGenericInfoCardProps));
29
+ export interface GenericInfoCardListingProps extends Pick<GenericInfoCardProps, 'borderVariant'>, Pick<GenericFilterEmptyStateProps, 'handleClearFilters'> {
30
+ list: (Pick<GenericInfoCardProps, 'Icon' | 'author' | 'description' | 'linkProps' | 'onClick' | 'title'> & Record<'id', string>)[];
31
+ emptyStateConfig: Pick<GenericEmptyStateType, 'title' | 'subTitle' | 'image' | 'renderButton' | 'renderButton'>;
32
+ searchKey?: string;
33
+ reloadList: () => void;
34
+ error?: APIResponseHandlerProps['error'];
35
+ isLoading?: boolean;
36
+ }
37
+ export interface GenericInfoListSkeletonProps extends Partial<Pick<GenericInfoCardProps, 'borderVariant'>> {
38
+ }
26
39
  export {};
@@ -1,3 +1,3 @@
1
1
  import { PageHeaderType } from './types';
2
- declare const PageHeader: ({ headerName, additionalHeaderInfo, showTabs, renderHeaderTabs, isBreadcrumbs, breadCrumbs, renderActionButtons, showCloseButton, onClose, markAsBeta, tippyProps, }: PageHeaderType) => JSX.Element;
2
+ declare const PageHeader: ({ headerName, additionalHeaderInfo, showTabs, renderHeaderTabs, isBreadcrumbs, breadCrumbs, renderActionButtons, showCloseButton, onClose, markAsBeta, tippyProps, isEnterprise, }: PageHeaderType) => JSX.Element;
3
3
  export default PageHeader;
@@ -1,12 +1,12 @@
1
1
  import { ModuleStatus } from '../../types';
2
- import { ResponseType, TippyCustomizedProps } from '../../../Common';
2
+ import { DOCUMENTATION, ResponseType, TippyCustomizedProps } from '../../../Common';
3
3
  import { ActionMenuProps } from '../ActionMenu';
4
4
  export declare enum InstallationType {
5
5
  OSS_KUBECTL = "oss_kubectl",
6
6
  OSS_HELM = "oss_helm",
7
7
  ENTERPRISE = "enterprise"
8
8
  }
9
- export interface PageHeaderType {
9
+ export interface PageHeaderType<T extends boolean = false> {
10
10
  headerName?: string;
11
11
  showTabs?: boolean;
12
12
  additionalHeaderInfo?: () => JSX.Element;
@@ -17,13 +17,14 @@ export interface PageHeaderType {
17
17
  showCloseButton?: boolean;
18
18
  onClose?: () => void;
19
19
  markAsBeta?: boolean;
20
- tippyProps?: Pick<TippyCustomizedProps, 'additionalContent'> & {
20
+ tippyProps?: Pick<TippyCustomizedProps<T>, 'additionalContent'> & {
21
21
  isTippyCustomized?: boolean;
22
- tippyRedirectLink?: string;
22
+ tippyRedirectLink?: keyof typeof DOCUMENTATION;
23
23
  TippyIcon?: React.FunctionComponent<any>;
24
24
  tippyMessage?: string;
25
25
  onClickTippyButton?: () => void;
26
26
  };
27
+ isEnterprise?: boolean;
27
28
  }
28
29
  export interface ServerInfo {
29
30
  currentVersion: string;
@@ -6,6 +6,7 @@ export declare const iconMap: {
6
6
  'ic-amazon-eks': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
7
7
  'ic-apica': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
8
8
  'ic-app-group': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
9
+ 'ic-app-template': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
9
10
  'ic-arrow-clockwise': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
10
11
  'ic-arrow-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
11
12
  'ic-arrow-square-out': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -49,7 +50,9 @@ export declare const iconMap: {
49
50
  'ic-delete-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
50
51
  'ic-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
51
52
  'ic-delhivery': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
53
+ 'ic-devtron-app': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
52
54
  'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
55
+ 'ic-devtron-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
53
56
  'ic-devtron': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
54
57
  'ic-disconnect': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
55
58
  'ic-discord-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -1,3 +1,3 @@
1
1
  import { InfoIconTippyProps } from '../../../Common/Types';
2
- declare const InfoIconTippy: ({ heading, infoText, iconClass, documentationLink, documentationLinkText, additionalContent, iconClassName, placement, dataTestid, children, headingInfo, buttonPadding, }: InfoIconTippyProps) => JSX.Element;
2
+ declare const InfoIconTippy: <T extends boolean = false>({ heading, infoText, iconClass, documentationLink, documentationLinkText, additionalContent, iconClassName, placement, dataTestid, children, headingInfo, buttonPadding, isEnterprise, isExternalLink, }: InfoIconTippyProps<T>) => JSX.Element;
3
3
  export default InfoIconTippy;
@@ -1,3 +1,3 @@
1
1
  import { ModalSidebarPanelProps } from './types';
2
- declare const ModalSidebarPanel: ({ rootClassName, heading, icon, children, documentationLink, }: ModalSidebarPanelProps) => JSX.Element;
2
+ declare const ModalSidebarPanel: ({ rootClassName, heading, icon, children, documentationLink, isEnterprise, }: ModalSidebarPanelProps) => JSX.Element;
3
3
  export default ModalSidebarPanel;
@@ -1,8 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
- export interface ModalSidebarPanelProps {
2
+ import { DocLinkProps } from '@Shared/DocLink/types';
3
+ import { PageHeaderType } from '../Header/types';
4
+ export interface ModalSidebarPanelProps<T extends boolean = false> extends Pick<PageHeaderType, 'isEnterprise'> {
3
5
  rootClassName?: string;
4
6
  heading: string | null;
5
7
  icon?: JSX.Element;
6
8
  children?: ReactNode;
7
- documentationLink: string;
9
+ documentationLink: DocLinkProps<T>['docLinkKey'];
8
10
  }
@@ -87,6 +87,6 @@ export declare const getPopoverActualPositionAlignment: ({ position, alignment,
87
87
  triggerRect: DOMRect;
88
88
  popoverRect: DOMRect;
89
89
  }) => {
90
- fallbackPosition: "top" | "bottom" | "right" | "left";
90
+ fallbackPosition: "top" | "right" | "bottom" | "left";
91
91
  fallbackAlignment: "start" | "middle" | "end";
92
92
  };
@@ -1,7 +1,7 @@
1
1
  import { SEVERITIES } from './constants';
2
2
  import { GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, ScanResultDTO, SeveritiesDTO, VulnerabilityCountType } from './types';
3
3
  export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
4
- color: "var(--R500)" | "var(--N300)" | "var(--O500)" | "var(--Y500)" | "var(--G500)" | "var(--R700)";
4
+ color: "var(--Y500)" | "var(--R700)" | "var(--R500)" | "var(--G500)" | "var(--N300)" | "var(--O500)";
5
5
  label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
6
6
  value: number;
7
7
  }[];
@@ -0,0 +1,3 @@
1
+ import { DTSwitchProps } from './types';
2
+ declare const Switch: ({ ariaLabel, dataTestId, isDisabled, isLoading, isChecked, tooltipContent, shape, variant, iconColor, iconName, indeterminate, size, name, onChange, }: DTSwitchProps) => JSX.Element;
3
+ export default Switch;
@@ -0,0 +1,14 @@
1
+ import { IconBaseColorType } from '../../types';
2
+ import { DTSwitchProps } from './types';
3
+ export declare const ROUNDED_SWITCH_SIZE_MAP: Readonly<Record<DTSwitchProps['size'], string>>;
4
+ export declare const SQUARE_SWITCH_SIZE_MAP: typeof ROUNDED_SWITCH_SIZE_MAP;
5
+ export declare const SWITCH_HEIGHT_MAP: Readonly<Record<DTSwitchProps['size'], string>>;
6
+ export declare const LOADING_COLOR_MAP: Record<DTSwitchProps['variant'], IconBaseColorType>;
7
+ export declare const ROUNDED_SWITCH_TRACK_COLOR_MAP: Record<DTSwitchProps['variant'], string>;
8
+ export declare const ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP: Record<DTSwitchProps['variant'], `var(--${IconBaseColorType})`>;
9
+ export declare const SQUARE_SWITCH_TRACK_COLOR_MAP: typeof ROUNDED_SWITCH_TRACK_COLOR_MAP;
10
+ export declare const SQUARE_SWITCH_TRACK_HOVER_COLOR_MAP: typeof ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP;
11
+ export declare const ROUNDED_SWITCH_THUMB_SIZE_MAP: Record<DTSwitchProps['size'], string>;
12
+ export declare const INDETERMINATE_ICON_WIDTH_MAP: Record<DTSwitchProps['size'], string>;
13
+ export declare const SWITCH_THUMB_PADDING_MAP: Record<DTSwitchProps['size'], string>;
14
+ export declare const THUMB_OUTER_PADDING_MAP: Record<DTSwitchProps['shape'], string>;
@@ -0,0 +1,2 @@
1
+ export { default as DTSwitch } from './Switch.component';
2
+ export type { DTSwitchProps } from './types';
@@ -0,0 +1,105 @@
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 DTSwitchProps = {
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
+ /**
82
+ * Callback function that is called when the switch state changes.
83
+ * This function should handle the logic for toggling the switch.
84
+ */
85
+ onChange: () => void;
86
+ /**
87
+ * Indicates whether the switch is disabled.
88
+ */
89
+ isDisabled?: boolean;
90
+ /**
91
+ * Indicates whether the switch is in a loading state.
92
+ */
93
+ isLoading?: boolean;
94
+ /**
95
+ * Indicates whether the switch is currently checked (on).
96
+ */
97
+ isChecked: boolean;
98
+ /**
99
+ * Optional tooltip content to display when hovering over the switch.
100
+ *
101
+ * @default undefined
102
+ */
103
+ tooltipContent?: string;
104
+ } & SwitchShapeProps;
105
+ export {};
@@ -0,0 +1,12 @@
1
+ import { IconBaseColorType } from '../../types';
2
+ import { ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP } from './constants';
3
+ import { DTSwitchProps } from './types';
4
+ export declare const getSwitchContainerClass: ({ shape, size }: Required<Pick<DTSwitchProps, "shape" | "size">>) => string;
5
+ export declare const getSwitchTrackColor: ({ shape, variant, isChecked, isLoading, }: Required<Pick<DTSwitchProps, "shape" | "variant" | "isChecked" | "isLoading">>) => string;
6
+ export declare const getSwitchTrackHoverColor: ({ shape, variant, isChecked, }: Required<Pick<DTSwitchProps, "shape" | "variant" | "isChecked">>) => (typeof ROUNDED_SWITCH_TRACK_HOVER_COLOR_MAP)[DTSwitchProps["variant"]];
7
+ export declare const getSwitchThumbClass: ({ shape, size, showIndeterminateIcon, }: Pick<DTSwitchProps, "shape" | "size"> & {
8
+ showIndeterminateIcon: boolean;
9
+ }) => string;
10
+ export declare const getSwitchIconColor: ({ iconColor, isChecked, variant, }: Pick<DTSwitchProps, "iconColor" | "isChecked" | "variant">) => IconBaseColorType;
11
+ export declare const getThumbPosition: ({ isLoading, isChecked, }: Pick<DTSwitchProps, "isLoading" | "isChecked">) => "left" | "right" | "center";
12
+ export declare const getThumbPadding: ({ shape, isLoading }: Pick<DTSwitchProps, "shape" | "isLoading">) => string;
@@ -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';
@@ -0,0 +1,2 @@
1
+ import { DocLinkProps } from './types';
2
+ export declare const DocLink: <T extends boolean = false>({ docLinkKey, text, dataTestId, showExternalIcon, onClick, size, variant, isEnterprise, isExternalLink, }: DocLinkProps<T>) => JSX.Element;