@devtron-labs/devtron-fe-common-lib 1.7.3 → 1.7.4

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 (71) hide show
  1. package/dist/{@code-editor-DF4xpSML.js → @code-editor-eNie_Z1c.js} +5709 -5547
  2. package/dist/{@common-rjsf-DkYtZEPs.js → @common-rjsf-CeBDaYTw.js} +1 -1
  3. package/dist/Common/Constants.d.ts +2 -3
  4. package/dist/Common/Helper.d.ts +1 -1
  5. package/dist/Common/index.d.ts +0 -1
  6. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.d.ts +0 -1
  7. package/dist/Shared/Components/CICDHistory/utils.d.ts +2 -2
  8. package/dist/Shared/Components/GitProviderIcon/GitProviderIcon.d.ts +2 -0
  9. package/dist/Shared/Components/GitProviderIcon/index.d.ts +2 -0
  10. package/dist/Shared/Components/GitProviderIcon/types.d.ts +10 -0
  11. package/dist/Shared/Components/Icon/Icon.d.ts +48 -0
  12. package/dist/Shared/Components/Icon/IconBase.d.ts +2 -0
  13. package/dist/Shared/Components/Icon/index.d.ts +1 -0
  14. package/dist/Shared/Components/Icon/types.d.ts +23 -0
  15. package/dist/Shared/Components/RegistryIcon/RegistryIcon.d.ts +2 -0
  16. package/dist/Shared/Components/RegistryIcon/constants.d.ts +2 -0
  17. package/dist/Shared/Components/RegistryIcon/index.d.ts +2 -0
  18. package/dist/Shared/Components/RegistryIcon/types.d.ts +10 -0
  19. package/dist/Shared/Components/StatusComponent/AppStatus.d.ts +2 -0
  20. package/dist/Shared/Components/StatusComponent/DeploymentStatus.d.ts +2 -0
  21. package/dist/Shared/Components/StatusComponent/StatusComponent.d.ts +2 -0
  22. package/dist/Shared/Components/StatusComponent/constants.d.ts +7 -0
  23. package/dist/Shared/Components/StatusComponent/index.d.ts +5 -0
  24. package/dist/Shared/Components/StatusComponent/types.d.ts +48 -0
  25. package/dist/Shared/Components/StatusComponent/utils.d.ts +5 -0
  26. package/dist/Shared/Components/index.d.ts +4 -0
  27. package/dist/assets/@code-editor.css +1 -1
  28. package/dist/assets/ic-aborted.d162b12b.svg +21 -0
  29. package/dist/assets/ic-azure.fb4a8598.svg +23 -0
  30. package/dist/assets/ic-build-color.37484d39.svg +33 -0
  31. package/dist/assets/ic-cancelled.3cd048aa.svg +20 -0
  32. package/dist/assets/ic-cd.165ef184.svg +46 -0
  33. package/dist/assets/ic-ci-linked.b25fbb2f.svg +34 -0
  34. package/dist/assets/ic-ci-webhook.a2ab6db6.svg +42 -0
  35. package/dist/assets/ic-circle-loader.d46f797f.svg +1 -0
  36. package/dist/assets/ic-clock.4109c84f.svg +19 -0
  37. package/dist/assets/ic-close-small.e16620af.svg +3 -0
  38. package/dist/assets/ic-container.4e1e6455.svg +19 -0
  39. package/dist/assets/ic-dockerhub.016af724.svg +3 -0
  40. package/dist/assets/ic-ecr.36433895.svg +9 -0
  41. package/dist/assets/ic-env.c0634f19.svg +29 -0
  42. package/dist/assets/ic-error.1794c183.svg +4 -0
  43. package/dist/assets/ic-failure.0220b612.svg +24 -0
  44. package/dist/assets/ic-git.bb72e063.svg +17 -0
  45. package/dist/assets/ic-github.b6e9d0f3.svg +19 -0
  46. package/dist/assets/ic-google-artifact-registry.73ff5bb0.svg +25 -0
  47. package/dist/assets/ic-google-container-registry.815ede09.svg +25 -0
  48. package/dist/assets/ic-heart-green.6d3bb9cf.svg +20 -0
  49. package/dist/assets/ic-heart-red-animated.5f500b76.svg +58 -0
  50. package/dist/assets/ic-heart-red.ae773db3.svg +19 -0
  51. package/dist/assets/ic-hibernate.988d2323.svg +28 -0
  52. package/dist/assets/ic-in-progress.2557f822.svg +4 -0
  53. package/dist/assets/ic-info-outline.9f0ddc8d.svg +3 -0
  54. package/dist/assets/ic-job-color.bb826301.svg +25 -0
  55. package/dist/assets/ic-missing.917a1291.svg +20 -0
  56. package/dist/assets/ic-node-script.88af3604.svg +35 -0
  57. package/dist/assets/ic-out-of-sync.824fb5c6.svg +24 -0
  58. package/dist/assets/ic-paper-plane-color.b290f604.svg +36 -0
  59. package/dist/assets/ic-quay.d9df1c86.svg +11 -0
  60. package/dist/assets/ic-success.22477863.svg +4 -0
  61. package/dist/assets/ic-suspended.8a62c6bc.svg +25 -0
  62. package/dist/assets/ic-timeout-two-dash.fed11c84.svg +5 -0
  63. package/dist/assets/ic-unknown.89dc351a.svg +21 -0
  64. package/dist/index.js +630 -624
  65. package/package.json +3 -2
  66. package/dist/Common/AppStatus/AppStatus.d.ts +0 -2
  67. package/dist/Common/AppStatus/constants.d.ts +0 -36
  68. package/dist/Common/AppStatus/index.d.ts +0 -2
  69. package/dist/Common/AppStatus/types.d.ts +0 -12
  70. package/dist/Common/AppStatus/utils.d.ts +0 -2
  71. package/dist/Common/utils.d.ts +0 -1
@@ -1,7 +1,7 @@
1
1
  import { j as t, J as P } from "./@vendor-CIA81cZg.js";
2
2
  import R, { forwardRef as $ } from "react";
3
3
  import L, { getDefaultRegistry as D } from "@rjsf/core";
4
- import { T as v, c as H, a as U, i as k, b as y, d as S, S as J } from "./@code-editor-DF4xpSML.js";
4
+ import { T as v, c as H, a as U, i as k, b as y, d as S, S as J } from "./@code-editor-eNie_Z1c.js";
5
5
  import M, { components as A } from "react-select";
6
6
  import { ReactComponent as V } from "./assets/ic-chevron-down.fc70d7a7.svg";
7
7
  import { getUiOptions as C, getTemplate as B, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as I, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
@@ -1,4 +1,3 @@
1
- import { RegistryTypeDetailType } from './Types';
2
1
  export declare const FALLBACK_REQUEST_TIMEOUT = 60000;
3
2
  export declare const Host: string;
4
3
  export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
@@ -176,7 +175,6 @@ export declare const BuildStageVariable: {
176
175
  Build: string;
177
176
  PostBuild: string;
178
177
  };
179
- export declare const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType>;
180
178
  export declare const RepositoryAction: {
181
179
  CONTAINER: string;
182
180
  CHART_PULL: string;
@@ -328,7 +326,8 @@ export declare enum GitProviderType {
328
326
  GITLAB = "gitlab",
329
327
  BITBUCKET = "bitbucket",
330
328
  AZURE = "azure",
331
- GITEA = "gitea"
329
+ GITEA = "gitea",
330
+ GIT = "git"
332
331
  }
333
332
  /**
334
333
  * Formats the schema removing any irregularity in the existing schema
@@ -10,7 +10,7 @@ interface ConditionalWrapper<T> {
10
10
  children: T;
11
11
  }
12
12
  export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
13
- export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 0 | 1 | -1;
13
+ export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 1 | 0 | -1;
14
14
  export declare const stopPropagation: (event: any) => void;
15
15
  export declare const preventDefault: (event: SyntheticEvent) => void;
16
16
  export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
@@ -48,6 +48,5 @@ export * from './Markdown';
48
48
  export * from './GenericDescription';
49
49
  export * from './SegmentedBarChart';
50
50
  export * from './CodeEditor';
51
- export * from './AppStatus';
52
51
  export * from './Tooltip';
53
52
  export * from './SegmentedControl';
@@ -2,5 +2,4 @@ import { DeploymentConfigDiffProps } from '@Shared/Components/DeploymentConfigDi
2
2
  import { History } from '../types';
3
3
  import { DeploymentHistoryConfigDiffProps } from './types';
4
4
  export declare const renderDeploymentHistoryConfig: (config: DeploymentConfigDiffProps["configList"], heading: string, pathname: string, hideDiffState: boolean) => JSX.Element;
5
- export declare const renderPipelineDeploymentStatusIcon: (status: string) => JSX.Element;
6
5
  export declare const renderPipelineDeploymentOptionDescription: ({ stage, triggeredBy, triggeredByEmail, artifact, renderRunSource, resourceId, runSource, }: Pick<History, "triggeredBy" | "triggeredByEmail" | "artifact" | "stage" | "runSource"> & Pick<DeploymentHistoryConfigDiffProps, "renderRunSource" | "resourceId">) => JSX.Element;
@@ -6,8 +6,6 @@ export declare const getParsedTriggerHistory: (result: any) => DeploymentHistory
6
6
  export declare const buildHoverHtmlForWebhook: (eventName: any, condition: any, selectors: any) => JSX.Element;
7
7
  export declare const renderIcon: (iconState: string) => JSX.Element;
8
8
  export declare const getStageStatusIcon: (status: StageStatusType) => JSX.Element;
9
- export declare const renderProgressingTriggerIcon: (baseClass?: string) => JSX.Element;
10
- export declare const getTriggerStatusIcon: (triggerDetailStatus: string) => JSX.Element;
11
9
  export declare const getLogSearchIndex: ({ stageIndex, lineNumberInsideStage, }: Record<"stageIndex" | "lineNumberInsideStage", number>) => string;
12
10
  export declare const sanitizeWorkflowExecutionStages: (workflowExecutionStages: WorkflowExecutionStagesMapDTO["workflowExecutionStages"]) => ExecutionInfoType | null;
13
11
  export declare const getIconFromWorkflowStageStatusType: (status: WorkflowStageStatusType, baseClass?: string) => ReactElement;
@@ -36,3 +34,5 @@ export declare const getStatusFilters: ({ allNodeCount, missingNodeCount, failed
36
34
  count: number;
37
35
  })[];
38
36
  };
37
+ export declare const getAppStatusIcon: (status: NodeStatus | NodeFilters, hideMessage?: boolean) => JSX.Element;
38
+ export declare const getTriggerStatusIcon: (status: string) => string;
@@ -0,0 +1,2 @@
1
+ import { GitProviderIconProps } from './types';
2
+ export declare const GitProviderIcon: ({ gitProvider, size }: GitProviderIconProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './GitProviderIcon';
2
+ export * from './types';
@@ -0,0 +1,10 @@
1
+ import { GitProviderType } from '../../../Common/Constants';
2
+ import { IconsProps } from '../Icon';
3
+ export interface GitProviderIconProps {
4
+ gitProvider: GitProviderType;
5
+ /**
6
+ * The size of the icon in pixels.
7
+ * @default 20
8
+ */
9
+ size?: IconsProps['size'];
10
+ }
@@ -0,0 +1,48 @@
1
+ import { IconBaseProps } from './types';
2
+ export declare const iconMap: {
3
+ 'ic-aborted': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
4
+ 'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
5
+ 'ic-bitbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
6
+ 'ic-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
7
+ 'ic-cancelled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
8
+ 'ic-cd': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
9
+ 'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
10
+ 'ic-ci-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
11
+ 'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
12
+ 'ic-clock': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
13
+ 'ic-close-small': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
14
+ 'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
15
+ 'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
16
+ 'ic-ecr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
17
+ 'ic-env': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
18
+ 'ic-error': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
19
+ 'ic-failure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
20
+ 'ic-git': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
21
+ 'ic-github': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
22
+ 'ic-gitlab': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
23
+ 'ic-google-artifact-registry': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
24
+ 'ic-google-container-registry': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
25
+ 'ic-heart-green': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
26
+ 'ic-heart-red-animated': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
27
+ 'ic-heart-red': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
28
+ 'ic-hibernate': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
29
+ 'ic-in-progress': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
30
+ 'ic-info-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
31
+ 'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
32
+ 'ic-missing': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
33
+ 'ic-node-script': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
34
+ 'ic-open-in-new': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
35
+ 'ic-out-of-sync': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
36
+ 'ic-paper-plane-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
37
+ 'ic-quay': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
38
+ 'ic-success': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
39
+ 'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
40
+ 'ic-timeout-two-dash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
41
+ 'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
42
+ };
43
+ export type IconName = keyof typeof iconMap;
44
+ export interface IconsProps extends Omit<IconBaseProps, 'name' | 'iconMap'> {
45
+ /** The name of the icon to render. */
46
+ name: keyof typeof iconMap;
47
+ }
48
+ export declare const Icon: (props: IconsProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { IconBaseProps } from './types';
2
+ export declare const IconBase: ({ name, iconMap, size, tooltipProps, color, strokeWidth }: IconBaseProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Icon';
@@ -0,0 +1,23 @@
1
+ import { FC, SVGAttributes, SVGProps } from 'react';
2
+ import { TooltipProps } from '@Common/Tooltip/types';
3
+ type IconMap = Record<string, FC<SVGProps<SVGSVGElement>>>;
4
+ export interface IconBaseProps extends Pick<SVGAttributes<SVGSVGElement>, 'strokeWidth'> {
5
+ /** The name of the icon to render. */
6
+ name: keyof IconMap;
7
+ /** The map containing all available icons. */
8
+ iconMap: IconMap;
9
+ /**
10
+ * The size of the icon in pixels.
11
+ * @default 16
12
+ */
13
+ size?: 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 28 | 30 | 32 | 34 | 36 | 40 | 42 | 44 | 48 | 72 | 80;
14
+ /** Props to configure the tooltip when hovering over the icon. */
15
+ tooltipProps?: TooltipProps;
16
+ /**
17
+ * The color of the icon (color tokens). \
18
+ * If `null`, the default color present in icon is used.
19
+ * @example `'B500'`, `'N200'`, `'G50'`, `'R700'`
20
+ */
21
+ color: `${'B' | 'N' | 'G' | 'Y' | 'R' | 'V' | 'O'}${`${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | '50'}` | null;
22
+ }
23
+ export {};
@@ -0,0 +1,2 @@
1
+ import { RegistryIconProps } from './types';
2
+ export declare const RegistryIcon: ({ registryType, size }: RegistryIconProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { RegistryTypeDetailType } from '../../../Common/Types';
2
+ export declare const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType>;
@@ -0,0 +1,2 @@
1
+ export * from './RegistryIcon';
2
+ export * from './constants';
@@ -0,0 +1,10 @@
1
+ import { RegistryType } from '../../types';
2
+ import { IconsProps } from '../Icon';
3
+ export interface RegistryIconProps {
4
+ registryType: RegistryType;
5
+ /**
6
+ * The size of the icon in pixels.
7
+ * @default 20
8
+ */
9
+ size?: IconsProps['size'];
10
+ }
@@ -0,0 +1,2 @@
1
+ import { AppStatusProps } from './types';
2
+ export declare const AppStatus: ({ status, isJobView, isVirtualEnv, ...restProps }: AppStatusProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DeploymentStatusProps } from './types';
2
+ export declare const DeploymentStatus: ({ status, ...restProps }: DeploymentStatusProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { StatusComponentProps } from './types';
2
+ export declare const StatusComponent: ({ status, hideIcon, hideMessage, iconSize, showAnimatedIcon, hideIconTooltip, message, }: StatusComponentProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ export declare const APP_STATUS: {
2
+ NOT_AVAILABLE: string;
3
+ NOT_DEPLOYED: string;
4
+ NOT_DEPLOYED_NO_SPACE: string;
5
+ JOB_VIEW_NOT_DEPLOYED_MESSAGE: string;
6
+ NOT_DEPLOYED_MESSAGE: string;
7
+ };
@@ -0,0 +1,5 @@
1
+ export * from './StatusComponent';
2
+ export * from './AppStatus';
3
+ export * from './DeploymentStatus';
4
+ export * from './types';
5
+ export { getDeploymentStatusFromStatus } from './utils';
@@ -0,0 +1,48 @@
1
+ import { IconsProps } from '../Icon';
2
+ export declare enum StatusType {
3
+ QUEUED = "QUEUED",
4
+ FAILED = "FAILED",
5
+ ERROR = "ERROR",
6
+ CANCELLED = "CANCELLED",
7
+ ABORTED = "ABORTED",
8
+ HEALTHY = "HEALTHY",
9
+ SUCCEEDED = "SUCCEEDED",
10
+ DRIFTED = "DRIFTED",
11
+ MISSING = "MISSING",
12
+ UNKNOWN = "UNKNOWN",
13
+ NOT_DEPLOYED = "NOT-DEPLOYED",
14
+ SUSPENDED = "SUSPENDED",
15
+ DEGRADED = "DEGRADED",
16
+ PROGRESSING = "PROGRESSING",
17
+ INPROGRESS = "INPROGRESS",
18
+ HIBERNATING = "HIBERNATING",
19
+ TIMED_OUT = "TIMED_OUT"
20
+ }
21
+ export interface StatusComponentProps {
22
+ /** The status to display, either a predefined StatusType or a custom string. */
23
+ status: StatusType | string;
24
+ /** A custom message to display instead of the status. If not provided, the status is shown. */
25
+ message?: string;
26
+ /** If true, hides the status icon. */
27
+ hideIcon?: boolean;
28
+ /**
29
+ * If true, hides the status message and displays it in a tooltip instead.
30
+ * @default false
31
+ */
32
+ hideMessage?: boolean;
33
+ /** Size of the status icon. */
34
+ iconSize?: IconsProps['size'];
35
+ /** If true, displays an animated version of the icon (if available). */
36
+ showAnimatedIcon?: boolean;
37
+ /**
38
+ * If true, hides the tooltip on the status icon.
39
+ * @note Tooltip is only shown when `hideMessage` is true.
40
+ */
41
+ hideIconTooltip?: boolean;
42
+ }
43
+ export interface AppStatusProps extends Omit<StatusComponentProps, 'statusMessage'> {
44
+ isJobView?: boolean;
45
+ isVirtualEnv?: boolean;
46
+ }
47
+ export interface DeploymentStatusProps extends Omit<AppStatusProps, 'isJobView'> {
48
+ }
@@ -0,0 +1,5 @@
1
+ import { IconName, IconsProps } from '../Icon';
2
+ export declare const getIconName: (status: string, showAnimatedIcon: boolean) => IconName;
3
+ export declare const getIconColor: (status: string) => IconsProps["color"];
4
+ export declare const getDeploymentStatusFromStatus: (status: string) => string;
5
+ export declare const getJobStatusFromStatus: (status: string) => string;
@@ -60,5 +60,9 @@ export * from './ThemeSwitcher';
60
60
  export * from './TargetPlatforms';
61
61
  export * from './UnsavedChanges';
62
62
  export * from './UnsavedChangesDialog';
63
+ export * from './Icon';
64
+ export * from './StatusComponent';
65
+ export * from './RegistryIcon';
66
+ export * from './GitProviderIcon';
63
67
  export * from './CustomInput';
64
68
  export * from './InfoBlock';