@devtron-labs/devtron-fe-common-lib 1.13.0-pre-1-beta-1 → 1.13.0-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 (40) hide show
  1. package/dist/{@common-rjsf-y265NK2z.js → @common-rjsf-BnxVmLH4.js} +8416 -8202
  2. package/dist/{@framer-motion-CR14HVwJ.js → @framer-motion-Hh5HoZEj.js} +1 -1
  3. package/dist/{@react-dates-z_WnuIha.js → @react-dates-RAg1eRYJ.js} +1 -1
  4. package/dist/{@react-select-C1KOG39W.js → @react-select-Cyc43HrK.js} +1 -1
  5. package/dist/{@react-virtualized-sticky-tree-DE3LznCK.js → @react-virtualized-sticky-tree-Cby7tsJ8.js} +1 -1
  6. package/dist/{@vendor-0Z6AwxJy.js → @vendor-BZpoz8Ez.js} +12042 -12042
  7. package/dist/Common/Constants.d.ts +2 -1
  8. package/dist/Common/Drawer/index.d.ts +1 -0
  9. package/dist/Common/EmptyState/index.d.ts +2 -0
  10. package/dist/Common/Helper.d.ts +4 -1
  11. package/dist/Common/Toggle/Toggle.d.ts +4 -1
  12. package/dist/Common/Types.d.ts +1 -0
  13. package/dist/Common/index.d.ts +2 -3
  14. package/dist/Shared/Components/AppStatusModal/AppStatusBody.d.ts +2 -0
  15. package/dist/Shared/Components/AppStatusModal/AppStatusContent.d.ts +3 -0
  16. package/dist/Shared/Components/AppStatusModal/AppStatusModal.component.d.ts +3 -0
  17. package/dist/Shared/Components/AppStatusModal/constants.d.ts +4 -0
  18. package/dist/Shared/Components/AppStatusModal/index.d.ts +2 -0
  19. package/dist/Shared/Components/AppStatusModal/service.d.ts +3 -0
  20. package/dist/Shared/Components/AppStatusModal/types.d.ts +38 -0
  21. package/dist/Shared/Components/AppStatusModal/utils.d.ts +5 -0
  22. package/dist/Shared/Components/CICDHistory/constants.d.ts +1 -0
  23. package/dist/Shared/Components/CICDHistory/index.d.ts +0 -1
  24. package/dist/Shared/Components/CICDHistory/types.d.ts +0 -6
  25. package/dist/Shared/Components/Error/ErrorBar.d.ts +1 -1
  26. package/dist/Shared/Components/Error/types.d.ts +4 -0
  27. package/dist/Shared/Components/Error/utils.d.ts +1 -0
  28. package/dist/Shared/Components/GenericInfoCard/index.d.ts +1 -2
  29. package/dist/Shared/Components/GenericInfoCard/types.d.ts +0 -10
  30. package/dist/Shared/Components/Icon/Icon.d.ts +1 -0
  31. package/dist/Shared/Components/InfoIconTippy/InfoIconTippy.d.ts +1 -1
  32. package/dist/Shared/Components/index.d.ts +1 -0
  33. package/dist/Shared/types.d.ts +5 -0
  34. package/dist/assets/@common-rjsf.css +1 -1
  35. package/dist/assets/ic-expand-sm.a9a724f8.svg +3 -0
  36. package/dist/index.js +551 -548
  37. package/package.json +1 -1
  38. package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +0 -3
  39. package/dist/Shared/Components/GenericInfoCard/GenericInfoCardListing.d.ts +0 -2
  40. package/dist/assets/empty-create.661d9355.png +0 -0
@@ -13,6 +13,7 @@ export declare const DOCUMENTATION: {
13
13
  GLOBAL_CONFIG_BUILD_INFRA: string;
14
14
  ENTERPRISE_LICENSE: string;
15
15
  KUBE_CONFIG: string;
16
+ TENANT_INSTALLATION: string;
16
17
  };
17
18
  export declare const PATTERNS: {
18
19
  STRING: RegExp;
@@ -64,7 +65,6 @@ export declare const URLS: {
64
65
  readonly COMPARE_CLUSTERS: "/compare-clusters";
65
66
  readonly APP_CONFIG: "edit";
66
67
  readonly GLOBAL_CONFIG: "/global-config";
67
- readonly CONFIG_DRIFT: "config-drift";
68
68
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP: "/global-config/templates/devtron-apps";
69
69
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_CREATE: "/global-config/templates/devtron-apps/create";
70
70
  readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_DETAIL: "/global-config/templates/devtron-apps/detail/:appId";
@@ -111,6 +111,7 @@ export declare const ROUTES: {
111
111
  readonly ATTRIBUTES_CREATE: "attributes/create";
112
112
  readonly ATTRIBUTES_UPDATE: "attributes/update";
113
113
  readonly APP_LIST_MIN: "app/min";
114
+ readonly APP_DETAIL: "app/detail";
114
115
  readonly CLUSTER_LIST_MIN: "cluster/autocomplete";
115
116
  readonly CLUSTER_LIST_RAW: "k8s/capacity/cluster/list/raw";
116
117
  readonly PLUGIN_GLOBAL_LIST_DETAIL_V2: "plugin/global/list/detail/v2";
@@ -0,0 +1 @@
1
+ export * from './Drawer';
@@ -0,0 +1,2 @@
1
+ export { default as GenericEmptyState } from './GenericEmptyState';
2
+ export { default as GenericFilterEmptyState } from './GenericFilterEmptyState';
@@ -1,7 +1,7 @@
1
1
  import { default as React, SyntheticEvent } from 'react';
2
2
  import { JSONPathOptions } from 'jsonpath-plus';
3
3
  import { AsyncOptions, DeploymentNodeType, UseSearchString } from './Types';
4
- import { scrollableInterface } from '../Shared';
4
+ import { scrollableInterface, AppType } from '../Shared';
5
5
  import * as Sentry from '@sentry/browser';
6
6
  export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
7
7
  interface ConditionalWrapper<T> {
@@ -95,8 +95,10 @@ export declare const flatMapOfJSONPaths: (paths: string[], json: object, resultT
95
95
  export declare const applyCompareDiffOnUneditedDocument: (uneditedDocument: object, editedDocument: object) => any;
96
96
  /**
97
97
  * Returns a debounced variant of the function
98
+ * @deprecated - It should use useRef instead, pls use useDebounce
98
99
  */
99
100
  export declare const debounce: (func: any, timeout?: number) => (this: any, ...args: any[]) => void;
101
+ export declare const useDebounce: <Callback extends (...args: any[]) => void>(cb: Callback, delay: number) => (...args: Parameters<Callback>) => void;
100
102
  /**
101
103
  * Returns a capitalized string with first letter in uppercase and rest in lowercase
102
104
  */
@@ -144,4 +146,5 @@ export declare const getGoLangFormattedDateWithTimezone: (dateFormat: string) =>
144
146
  */
145
147
  export declare const getHashedValue: (value: string) => Promise<string | null>;
146
148
  export declare const getTTLInHumanReadableFormat: (ttl: number) => string;
149
+ export declare const getAIAnalyticsEvents: (context: string, appType?: AppType) => string;
147
150
  export {};
@@ -1,4 +1,5 @@
1
- declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, isLoading, ...props }: {
1
+ import { CHECKBOX_VALUE } from '../Types';
2
+ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, isLoading, value, isControlled, ...props }: {
2
3
  [x: string]: any;
3
4
  selected?: boolean;
4
5
  onSelect?: any;
@@ -11,5 +12,7 @@ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dat
11
12
  throttleOnChange?: boolean;
12
13
  shouldToggleValueOnLabelClick?: boolean;
13
14
  isLoading?: boolean;
15
+ value?: CHECKBOX_VALUE;
16
+ isControlled?: boolean;
14
17
  }) => JSX.Element;
15
18
  export default Toggle;
@@ -111,6 +111,7 @@ export interface InfoIconTippyProps extends Pick<TippyCustomizedProps, 'heading'
111
111
  dataTestid?: string;
112
112
  children?: TippyCustomizedProps['children'];
113
113
  iconClassName?: string;
114
+ buttonPadding?: string;
114
115
  }
115
116
  export interface GenericEmptyStateType {
116
117
  title: ReactNode;
@@ -15,9 +15,8 @@ export { default as DevtronCopyright } from './DevtronCopyright';
15
15
  export * from './DevtronProgressing';
16
16
  export * from './Dialogs';
17
17
  export * from './DraggableWrapper';
18
- export * from './Drawer/Drawer';
19
- export { default as GenericEmptyState } from './EmptyState/GenericEmptyState';
20
- export { default as GenericFilterEmptyState } from './EmptyState/GenericFilterEmptyState';
18
+ export * from './Drawer';
19
+ export * from './EmptyState';
21
20
  export { default as ErrorScreenManager } from './ErrorScreenManager';
22
21
  export { default as ErrorScreenNotAuthorized } from './ErrorScreenNotAuthorized';
23
22
  export * from './GenericDescription';
@@ -0,0 +1,2 @@
1
+ import { AppStatusBodyProps } from './types';
2
+ export declare const AppStatusBody: ({ appDetails, type, handleShowConfigDriftModal, debugWithAIButton: ExplainWithAIButton, }: AppStatusBodyProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { AppStatusContentProps } from './types';
2
+ declare const AppStatusContent: ({ appDetails, handleShowConfigDriftModal, filterHealthyNodes, isCardLayout, }: AppStatusContentProps) => JSX.Element;
3
+ export default AppStatusContent;
@@ -0,0 +1,3 @@
1
+ import { AppStatusModalProps } from './types';
2
+ declare const AppStatusModal: ({ titleSegments, handleClose, type, appDetails: appDetailsProp, isConfigDriftEnabled, configDriftModal: ConfigDriftModal, appId, envId, debugWithAIButton, }: AppStatusModalProps) => JSX.Element;
3
+ export default AppStatusModal;
@@ -0,0 +1,4 @@
1
+ export declare const APP_STATUS_CUSTOM_MESSAGES: {
2
+ HIBERNATED: string;
3
+ 'PARTIALLY HIBERNATED': string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as AppStatusContent } from './AppStatusContent';
2
+ export { default as AppStatusModal } from './AppStatusModal.component';
@@ -0,0 +1,3 @@
1
+ import { APIOptions } from '../../../Common/Types';
2
+ import { AppDetails } from '../../types';
3
+ export declare const getAppDetails: (appId: number, envId: number, abortControllerRef: APIOptions["abortControllerRef"]) => Promise<AppDetails>;
@@ -0,0 +1,38 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { AppDetails, ConfigDriftModalProps, IntelligenceConfig } from '../../types';
3
+ export type AppStatusModalProps = {
4
+ titleSegments: string[];
5
+ handleClose: () => void;
6
+ /**
7
+ * If given would not poll for app details and resource tree, Polling for gitops timeline would still be done
8
+ */
9
+ appDetails?: AppDetails;
10
+ isConfigDriftEnabled: boolean;
11
+ configDriftModal: FunctionComponent<ConfigDriftModalProps>;
12
+ debugWithAIButton: FunctionComponent<{
13
+ intelligenceConfig: IntelligenceConfig;
14
+ }>;
15
+ } & ({
16
+ type: 'release';
17
+ appId: number;
18
+ envId: number;
19
+ } | {
20
+ type: 'devtron-app' | 'other-apps' | 'stack-manager';
21
+ appId?: never;
22
+ envId?: never;
23
+ });
24
+ export interface AppStatusBodyProps extends Required<Pick<AppStatusModalProps, 'appDetails' | 'type' | 'debugWithAIButton'>> {
25
+ handleShowConfigDriftModal: () => void;
26
+ }
27
+ export interface AppStatusContentProps extends Required<Pick<AppStatusBodyProps, 'appDetails'>>, Partial<Pick<AppStatusBodyProps, 'handleShowConfigDriftModal'>> {
28
+ /**
29
+ * @default false
30
+ */
31
+ filterHealthyNodes?: boolean;
32
+ /**
33
+ * @default true
34
+ */
35
+ isCardLayout?: boolean;
36
+ }
37
+ export interface GetFilteredFlattenedNodesFromAppDetailsParamsType extends Pick<AppStatusContentProps, 'appDetails' | 'filterHealthyNodes'> {
38
+ }
@@ -0,0 +1,5 @@
1
+ import { AppDetails, Node } from '../../types';
2
+ import { GetFilteredFlattenedNodesFromAppDetailsParamsType as GetFlattenedNodesFromAppDetailsParamsType } from './types';
3
+ export declare const getAppStatusMessageFromAppDetails: (appDetails: AppDetails) => string;
4
+ export declare const getFlattenedNodesFromAppDetails: ({ appDetails, filterHealthyNodes, }: GetFlattenedNodesFromAppDetailsParamsType) => Node[];
5
+ export declare const getResourceKey: (nodeDetails: Node) => string;
@@ -84,3 +84,4 @@ export declare const PROGRESSING_STATUS: {
84
84
  readonly [x: string]: "progressing" | "starting" | "initiating" | "queued" | "running";
85
85
  };
86
86
  export declare const FAILED_WORKFLOW_STAGE_STATUS_MAP: Record<Extract<WorkflowStageStatusType, WorkflowStageStatusType.ABORTED | WorkflowStageStatusType.FAILED | WorkflowStageStatusType.TIMEOUT>, true>;
87
+ export declare const APP_HEALTH_DROP_DOWN_LIST: string[];
@@ -1,4 +1,3 @@
1
- export { default as AppStatusDetailsChart } from './AppStatusDetailsChart';
2
1
  export { default as Artifacts } from './Artifacts';
3
2
  export { default as CDEmptyState } from './CDEmptyState';
4
3
  export * from './CiPipelineSourceConfig';
@@ -508,12 +508,6 @@ export interface DeploymentHistorySidebarType {
508
508
  deploymentHistoryList: DeploymentTemplateList[];
509
509
  setDeploymentHistoryList: React.Dispatch<React.SetStateAction<DeploymentTemplateList[]>>;
510
510
  }
511
- export interface AppStatusDetailsChartType {
512
- filterRemoveHealth?: boolean;
513
- showFooter: boolean;
514
- showConfigDriftInfo?: boolean;
515
- onClose?: () => void;
516
- }
517
511
  export interface StatusFilterButtonType {
518
512
  nodes: Array<Node>;
519
513
  selectedTab: string;
@@ -1,3 +1,3 @@
1
1
  import { ErrorBarType } from './types';
2
- declare const ErrorBar: ({ appDetails }: ErrorBarType) => JSX.Element;
2
+ declare const ErrorBar: ({ appDetails, useParentMargin }: ErrorBarType) => JSX.Element;
3
3
  export default ErrorBar;
@@ -1,6 +1,10 @@
1
1
  import { AppDetails } from '../../types';
2
2
  export interface ErrorBarType {
3
3
  appDetails: AppDetails;
4
+ /**
5
+ * @default true
6
+ */
7
+ useParentMargin?: boolean;
4
8
  }
5
9
  export declare enum AppDetailsErrorType {
6
10
  ERRIMAGEPULL = "errimagepull",
@@ -1,2 +1,3 @@
1
1
  import { AppDetails } from '../../types';
2
+ export declare const getIsImagePullBackOff: (appDetails: AppDetails) => boolean;
2
3
  export declare const renderErrorHeaderMessage: (appDetails: AppDetails, key: string, onClickActionButton?: any) => JSX.Element;
@@ -1,3 +1,2 @@
1
1
  export { default as GenericInfoCard } from './GenericInfoCard.component';
2
- export * from './GenericInfoCardListing';
3
- export { GenericInfoCardBorderVariant, type GenericInfoCardListingProps, type GenericInfoCardProps } from './types';
2
+ export { GenericInfoCardBorderVariant, type GenericInfoCardProps } from './types';
@@ -1,7 +1,5 @@
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
3
  type BaseGenericInfoCardProps = {
6
4
  title: string;
7
5
  description: string;
@@ -25,12 +23,4 @@ export type GenericInfoCardProps = {
25
23
  } & Partial<Record<keyof BaseGenericInfoCardProps, never>>) | ({
26
24
  isLoading?: boolean;
27
25
  } & BaseGenericInfoCardProps));
28
- export interface GenericInfoCardListingProps extends Pick<GenericInfoCardProps, 'borderVariant'>, Pick<GenericFilterEmptyStateProps, 'handleClearFilters'> {
29
- list: (Pick<GenericInfoCardProps, 'Icon' | 'author' | 'description' | 'linkProps' | 'onClick' | 'title'> & Record<'id', string>)[];
30
- emptyStateConfig: Pick<GenericEmptyStateType, 'title' | 'subTitle' | 'image'>;
31
- searchKey?: string;
32
- reloadList?: () => void;
33
- error?: Record<string, unknown>;
34
- isLoading?: boolean;
35
- }
36
26
  export {};
@@ -54,6 +54,7 @@ export declare const iconMap: {
54
54
  'ic-env': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
55
55
  'ic-error': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
56
56
  'ic-expand-right-sm': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
57
+ 'ic-expand-sm': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
57
58
  'ic-failure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
58
59
  'ic-file-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
59
60
  'ic-folder-user': 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, }: InfoIconTippyProps) => JSX.Element;
2
+ declare const InfoIconTippy: ({ heading, infoText, iconClass, documentationLink, documentationLinkText, additionalContent, iconClassName, placement, dataTestid, children, headingInfo, buttonPadding, }: InfoIconTippyProps) => JSX.Element;
3
3
  export default InfoIconTippy;
@@ -4,6 +4,7 @@ export * from './ActivityIndicator';
4
4
  export * from './AnimatedDeployButton';
5
5
  export * from './AnimatedTimer';
6
6
  export * from './APIResponseHandler';
7
+ export * from './AppStatusModal';
7
8
  export * from './ArtifactInfoModal';
8
9
  export * from './Backdrop';
9
10
  export * from './BulkOperations';
@@ -111,6 +111,7 @@ export interface Node {
111
111
  canBeHibernated: boolean;
112
112
  isHibernated: boolean;
113
113
  hasDrift?: boolean;
114
+ status?: string;
114
115
  }
115
116
  export interface iNodes extends Array<iNode> {
116
117
  }
@@ -198,6 +199,10 @@ export interface AppDetails {
198
199
  fluxTemplateType?: string;
199
200
  FluxAppStatusDetail?: FluxAppStatusDetail;
200
201
  }
202
+ export interface ConfigDriftModalProps extends Required<Pick<AppDetails, 'appId'>> {
203
+ envId: number;
204
+ handleCloseModal?: () => void;
205
+ }
201
206
  export declare enum RegistryType {
202
207
  GIT = "git",
203
208
  GITHUB = "github",