@devtron-labs/devtron-fe-common-lib 1.7.3 → 1.7.5-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{@code-editor-DF4xpSML.js → @code-editor-BmMzQgKS.js} +6259 -6073
- package/dist/{@common-rjsf-DkYtZEPs.js → @common-rjsf-vxINagIC.js} +1 -1
- package/dist/Common/Constants.d.ts +3 -3
- package/dist/Common/Helper.d.ts +1 -1
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/Types.d.ts +2 -1
- package/dist/Common/index.d.ts +0 -1
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +4 -0
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.d.ts +0 -1
- package/dist/Shared/Components/CICDHistory/constants.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +8 -0
- package/dist/Shared/Components/CICDHistory/utils.d.ts +2 -2
- package/dist/Shared/Components/ConfirmationModal/CannotDeleteModal.d.ts +1 -1
- package/dist/Shared/Components/ConfirmationModal/ConfirmationModal.d.ts +3 -2
- package/dist/Shared/Components/ConfirmationModal/ConfirmationModalContext.d.ts +5 -0
- package/dist/Shared/Components/ConfirmationModal/ForceDeleteConfirmationModal.d.ts +1 -1
- package/dist/Shared/Components/ConfirmationModal/index.d.ts +2 -1
- package/dist/Shared/Components/ConfirmationModal/types.d.ts +12 -10
- package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts +1 -1
- package/dist/Shared/Components/GenericSectionErrorState/types.d.ts +18 -5
- package/dist/Shared/Components/GitProviderIcon/GitProviderIcon.d.ts +2 -0
- package/dist/Shared/Components/GitProviderIcon/index.d.ts +2 -0
- package/dist/Shared/Components/GitProviderIcon/types.d.ts +10 -0
- package/dist/Shared/Components/Icon/Icon.d.ts +48 -0
- package/dist/Shared/Components/Icon/IconBase.d.ts +2 -0
- package/dist/Shared/Components/Icon/index.d.ts +1 -0
- package/dist/Shared/Components/Icon/types.d.ts +23 -0
- package/dist/Shared/Components/RegistryIcon/RegistryIcon.d.ts +2 -0
- package/dist/Shared/Components/RegistryIcon/constants.d.ts +2 -0
- package/dist/Shared/Components/RegistryIcon/index.d.ts +2 -0
- package/dist/Shared/Components/RegistryIcon/types.d.ts +10 -0
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +2 -2
- package/dist/Shared/Components/StatusComponent/AppStatus.d.ts +2 -0
- package/dist/Shared/Components/StatusComponent/DeploymentStatus.d.ts +2 -0
- package/dist/Shared/Components/StatusComponent/StatusComponent.d.ts +2 -0
- package/dist/Shared/Components/StatusComponent/constants.d.ts +7 -0
- package/dist/Shared/Components/StatusComponent/index.d.ts +5 -0
- package/dist/Shared/Components/StatusComponent/types.d.ts +48 -0
- package/dist/Shared/Components/StatusComponent/utils.d.ts +5 -0
- package/dist/Shared/Components/UnsavedChangesDialog/UnsavedChangesDialog.component.d.ts +1 -1
- package/dist/Shared/Components/UnsavedChangesDialog/types.d.ts +0 -1
- package/dist/Shared/Components/index.d.ts +4 -0
- package/dist/Shared/Providers/types.d.ts +14 -0
- package/dist/Shared/Services/common.service.d.ts +2 -1
- package/dist/Shared/Services/types.d.ts +6 -0
- package/dist/Shared/Store/IndexStore.d.ts +1 -1
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-aborted.d162b12b.svg +21 -0
- package/dist/assets/ic-azure.fb4a8598.svg +23 -0
- package/dist/assets/ic-build-color.37484d39.svg +33 -0
- package/dist/assets/ic-cancelled.3cd048aa.svg +20 -0
- package/dist/assets/ic-cd.165ef184.svg +46 -0
- package/dist/assets/ic-ci-linked.b25fbb2f.svg +34 -0
- package/dist/assets/ic-ci-webhook.a2ab6db6.svg +42 -0
- package/dist/assets/ic-circle-loader.d46f797f.svg +1 -0
- package/dist/assets/ic-clock.4109c84f.svg +19 -0
- package/dist/assets/ic-close-small.e16620af.svg +3 -0
- package/dist/assets/ic-container.4e1e6455.svg +19 -0
- package/dist/assets/ic-dockerhub.016af724.svg +3 -0
- package/dist/assets/ic-ecr.36433895.svg +9 -0
- package/dist/assets/ic-env.c0634f19.svg +29 -0
- package/dist/assets/ic-error.1794c183.svg +4 -0
- package/dist/assets/ic-failure.0220b612.svg +24 -0
- package/dist/assets/ic-git.bb72e063.svg +17 -0
- package/dist/assets/ic-github.b6e9d0f3.svg +19 -0
- package/dist/assets/ic-google-artifact-registry.73ff5bb0.svg +25 -0
- package/dist/assets/ic-google-container-registry.815ede09.svg +25 -0
- package/dist/assets/ic-heart-green.6d3bb9cf.svg +20 -0
- package/dist/assets/ic-heart-red-animated.5f500b76.svg +58 -0
- package/dist/assets/ic-heart-red.ae773db3.svg +19 -0
- package/dist/assets/ic-hibernate.988d2323.svg +28 -0
- package/dist/assets/ic-in-progress.2557f822.svg +4 -0
- package/dist/assets/ic-info-outline.9f0ddc8d.svg +3 -0
- package/dist/assets/ic-job-color.bb826301.svg +25 -0
- package/dist/assets/ic-missing.917a1291.svg +20 -0
- package/dist/assets/ic-node-script.88af3604.svg +35 -0
- package/dist/assets/ic-out-of-sync.824fb5c6.svg +24 -0
- package/dist/assets/ic-paper-plane-color.b290f604.svg +36 -0
- package/dist/assets/ic-quay.d9df1c86.svg +11 -0
- package/dist/assets/ic-success.22477863.svg +4 -0
- package/dist/assets/ic-suspended.8a62c6bc.svg +25 -0
- package/dist/assets/ic-timeout-two-dash.fed11c84.svg +5 -0
- package/dist/assets/ic-unknown.89dc351a.svg +21 -0
- package/dist/index.js +746 -735
- package/package.json +3 -2
- package/dist/Common/AppStatus/AppStatus.d.ts +0 -2
- package/dist/Common/AppStatus/constants.d.ts +0 -36
- package/dist/Common/AppStatus/index.d.ts +0 -2
- package/dist/Common/AppStatus/types.d.ts +0 -12
- package/dist/Common/AppStatus/utils.d.ts +0 -2
- 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-
|
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-BmMzQgKS.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";
|
@@ -117,6 +116,7 @@ export declare const ROUTES: {
|
|
117
116
|
CD_TRIGGER_POST: string;
|
118
117
|
DELETE_RESOURCE: string;
|
119
118
|
NODE_CAPACITY: string;
|
119
|
+
ENVIRONMENT_DATA: string;
|
120
120
|
};
|
121
121
|
export declare enum KEY_VALUE {
|
122
122
|
KEY = "key",
|
@@ -176,7 +176,6 @@ export declare const BuildStageVariable: {
|
|
176
176
|
Build: string;
|
177
177
|
PostBuild: string;
|
178
178
|
};
|
179
|
-
export declare const REGISTRY_TYPE_MAP: Record<string, RegistryTypeDetailType>;
|
180
179
|
export declare const RepositoryAction: {
|
181
180
|
CONTAINER: string;
|
182
181
|
CHART_PULL: string;
|
@@ -328,7 +327,8 @@ export declare enum GitProviderType {
|
|
328
327
|
GITLAB = "gitlab",
|
329
328
|
BITBUCKET = "bitbucket",
|
330
329
|
AZURE = "azure",
|
331
|
-
GITEA = "gitea"
|
330
|
+
GITEA = "gitea",
|
331
|
+
GIT = "git"
|
332
332
|
}
|
333
333
|
/**
|
334
334
|
* Formats the schema removing any irregularity in the existing schema
|
package/dist/Common/Helper.d.ts
CHANGED
@@ -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):
|
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;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ShortcutType } from './types';
|
2
2
|
export declare const preprocessKeys: (keys: ShortcutType["keys"]) => {
|
3
|
-
keys: ("
|
3
|
+
keys: ("Escape" | "Control" | "Alt" | "F" | "E" | "R" | "K" | "Shift" | "Meta" | "Enter")[];
|
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, "
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "className" | "children" | "disabled" | "id" | "name" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "autoComplete" | "noValidate" | "tagName" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "action" | "enctype" | "method" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -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, ComponentLayoutType } from '../Shared';
|
5
|
+
import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo, TargetPlatformItemDTO, ButtonProps, ComponentLayoutType } 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
|
@@ -158,6 +158,7 @@ interface InfoColourBarTextConfigType {
|
|
158
158
|
* If given would be shown below the heading (if given)
|
159
159
|
*/
|
160
160
|
description: string;
|
161
|
+
actionButtonConfig?: ButtonProps;
|
161
162
|
}
|
162
163
|
type InfoColourBarMessageProp = {
|
163
164
|
message: ReactNode;
|
package/dist/Common/index.d.ts
CHANGED
package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts
CHANGED
@@ -96,6 +96,10 @@ export interface SelectedChartDetailsType {
|
|
96
96
|
selectedChartRefId: number;
|
97
97
|
selectedChart: DeploymentChartVersionType;
|
98
98
|
}
|
99
|
+
export declare enum PipelineMigratedFromType {
|
100
|
+
HELM_RELEASE = "helmRelease",
|
101
|
+
ARGO_APPLICATION = "argoApplication"
|
102
|
+
}
|
99
103
|
interface EnvironmentConfigType {
|
100
104
|
id: number;
|
101
105
|
status: number;
|
@@ -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;
|
@@ -81,6 +81,6 @@ export declare const TERMINAL_STATUS_COLOR_CLASS_MAP: {
|
|
81
81
|
readonly [x: string]: "cr-5" | "cg-5" | "co-5";
|
82
82
|
};
|
83
83
|
export declare const PROGRESSING_STATUS: {
|
84
|
-
readonly [x: string]: "
|
84
|
+
readonly [x: string]: "running" | "progressing" | "starting" | "initiating" | "queued";
|
85
85
|
};
|
86
86
|
export declare const FAILED_WORKFLOW_STAGE_STATUS_MAP: Record<Extract<WorkflowStageStatusType, WorkflowStageStatusType.ABORTED | WorkflowStageStatusType.FAILED | WorkflowStageStatusType.TIMEOUT>, true>;
|
@@ -519,6 +519,14 @@ export interface StatusFilterButtonType {
|
|
519
519
|
handleFilterClick?: (selectedFilter: string) => void;
|
520
520
|
maxInlineFiltersCount?: number;
|
521
521
|
}
|
522
|
+
export declare enum NodeStatusDTO {
|
523
|
+
Healthy = "Healthy",
|
524
|
+
Progressing = "Progressing",
|
525
|
+
Unknown = "Unknown",
|
526
|
+
Suspended = "Suspended",
|
527
|
+
Degraded = "Degraded",
|
528
|
+
Missing = "Missing"
|
529
|
+
}
|
522
530
|
export declare enum NodeStatus {
|
523
531
|
Degraded = "degraded",
|
524
532
|
Healthy = "healthy",
|
@@ -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;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { CannotDeleteModalProps } from './types';
|
2
|
-
export declare const CannotDeleteModal: ({ title, component, subtitle, closeConfirmationModal
|
2
|
+
export declare const CannotDeleteModal: ({ title, component, subtitle, closeConfirmationModal }: CannotDeleteModalProps) => JSX.Element;
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import { ConfirmationModalProps } from './types';
|
2
|
-
declare const
|
3
|
-
|
2
|
+
export declare const BaseConfirmationModal: () => JSX.Element;
|
3
|
+
declare const ConfirmationModal: (props: ConfirmationModalProps) => any;
|
4
|
+
export default ConfirmationModal;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
import { ConfirmationModalContextType } from './types';
|
3
|
+
export declare const ConfirmationModalContext: import('react').Context<ConfirmationModalContextType>;
|
4
|
+
export declare const ConfirmationModalProvider: ({ children }: PropsWithChildren<{}>) => JSX.Element;
|
5
|
+
export declare const useConfirmationModalContext: () => ConfirmationModalContextType;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { ForceDeleteConfirmationProps } from './types';
|
2
|
-
export declare const ForceDeleteConfirmationModal: ({ title, subtitle, onDelete, closeConfirmationModal,
|
2
|
+
export declare const ForceDeleteConfirmationModal: ({ title, subtitle, onDelete, closeConfirmationModal, }: ForceDeleteConfirmationProps) => JSX.Element;
|
@@ -1,5 +1,6 @@
|
|
1
|
-
export { default as ConfirmationModal } from './ConfirmationModal';
|
1
|
+
export { default as ConfirmationModal, BaseConfirmationModal } from './ConfirmationModal';
|
2
2
|
export { DeleteConfirmationModal } from './DeleteConfirmationModal';
|
3
3
|
export { ForceDeleteConfirmationModal } from './ForceDeleteConfirmationModal';
|
4
4
|
export { CannotDeleteModal } from './CannotDeleteModal';
|
5
5
|
export { ConfirmationModalVariantType, type ConfirmationModalProps } from './types';
|
6
|
+
export { ConfirmationModalProvider } from './ConfirmationModalContext';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PropsWithChildren, ReactElement, ReactNode, SyntheticEvent } from 'react';
|
1
|
+
import { Dispatch, MutableRefObject, PropsWithChildren, ReactElement, ReactNode, SetStateAction, SyntheticEvent } from 'react';
|
2
2
|
import { ButtonProps } from '../Button';
|
3
3
|
export declare enum ConfirmationModalVariantType {
|
4
4
|
info = "info",
|
@@ -37,7 +37,7 @@ type ButtonConfigAndVariantType<isConfig extends boolean> = {
|
|
37
37
|
* Supports optional configuration mode with conditional properties.
|
38
38
|
*
|
39
39
|
* @template isConfig - Boolean flag to determine if configuration mode is enabled.
|
40
|
-
* When `false`, `handleClose`
|
40
|
+
* When `false`, `handleClose` is required.
|
41
41
|
*/
|
42
42
|
export type ConfirmationModalProps<isConfig extends boolean = false> = PropsWithChildren<{
|
43
43
|
/**
|
@@ -64,18 +64,14 @@ export type ConfirmationModalProps<isConfig extends boolean = false> = PropsWith
|
|
64
64
|
* Accepts an optional SyntheticEvent.
|
65
65
|
*/
|
66
66
|
handleClose: (e?: SyntheticEvent) => void;
|
67
|
-
/**
|
68
|
-
* Boolean flag to control the visibility of the confirmation modal.
|
69
|
-
*/
|
70
|
-
showConfirmationModal: boolean;
|
71
67
|
} : {});
|
72
|
-
export type ConfirmationModalBodyProps =
|
68
|
+
export type ConfirmationModalBodyProps = ConfirmationModalProps;
|
73
69
|
/**
|
74
70
|
* Props for the DeleteComponentModal component.
|
75
71
|
* This interface extends a subset of `ConfirmationModalProps` to configure
|
76
72
|
* the confirmation modal behavior and allows additional customization options.
|
77
73
|
*/
|
78
|
-
export interface DeleteConfirmationModalProps extends Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle' | '
|
74
|
+
export interface DeleteConfirmationModalProps extends Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle' | 'children' | 'confirmationConfig'>> {
|
79
75
|
/**
|
80
76
|
* Function to close the confirmation modal.
|
81
77
|
*/
|
@@ -124,13 +120,19 @@ export interface DeleteConfirmationModalProps extends Partial<Pick<ConfirmationM
|
|
124
120
|
* and `ConfirmationModalProps` to configure the "Cannot Delete" modal.
|
125
121
|
*/
|
126
122
|
export interface CannotDeleteModalProps extends Partial<Pick<DeleteConfirmationModalProps, 'component' | 'closeConfirmationModal'>>, Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle'>> {
|
127
|
-
showCannotDeleteDialogModal: boolean;
|
128
123
|
}
|
129
124
|
/**
|
130
125
|
* Props for the ForceDeleteConfirmation component.
|
131
126
|
* This interface extends selected properties from `DeleteConfirmationModalProps`
|
132
127
|
* and `ConfirmationModalProps` to configure the force delete confirmation modal.
|
133
128
|
*/
|
134
|
-
export interface ForceDeleteConfirmationProps extends Partial<Pick<DeleteConfirmationModalProps, 'onDelete' | '
|
129
|
+
export interface ForceDeleteConfirmationProps extends Partial<Pick<DeleteConfirmationModalProps, 'onDelete' | 'closeConfirmationModal'>>, Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle'>> {
|
130
|
+
}
|
131
|
+
export interface ConfirmationModalContextType {
|
132
|
+
settersRef: MutableRefObject<{
|
133
|
+
setProps: Dispatch<SetStateAction<ConfirmationModalProps>>;
|
134
|
+
}>;
|
135
|
+
modalKey: string;
|
136
|
+
setModalKey: Dispatch<SetStateAction<ConfirmationModalContextType['modalKey']>>;
|
135
137
|
}
|
136
138
|
export {};
|
package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import { GenericSectionErrorStateProps } from './types';
|
2
|
-
declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, useInfoIcon, }: GenericSectionErrorStateProps) => JSX.Element;
|
2
|
+
declare const GenericSectionErrorState: ({ reload, withBorder, title, subTitle, description, buttonText, rootClassName, useInfoIcon, progressingProps, }: GenericSectionErrorStateProps) => JSX.Element;
|
3
3
|
export default GenericSectionErrorState;
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { ProgressingProps } from '../../../Common/Types';
|
3
|
+
export type GenericSectionErrorStateProps = {
|
2
4
|
/**
|
3
5
|
* Handler for reloading the section
|
4
6
|
*/
|
@@ -16,11 +18,11 @@ export interface GenericSectionErrorStateProps {
|
|
16
18
|
/**
|
17
19
|
* @default 'We could not load the information on this page.'
|
18
20
|
*/
|
19
|
-
subTitle?:
|
21
|
+
subTitle?: ReactNode;
|
20
22
|
/**
|
21
23
|
* @default 'Please reload or try again later'
|
22
24
|
*/
|
23
|
-
description?:
|
25
|
+
description?: ReactNode;
|
24
26
|
/**
|
25
27
|
* @default 'Reload'
|
26
28
|
*/
|
@@ -29,10 +31,21 @@ export interface GenericSectionErrorStateProps {
|
|
29
31
|
* to be applied on parent div
|
30
32
|
*/
|
31
33
|
rootClassName?: string;
|
34
|
+
} & ({
|
35
|
+
/**
|
36
|
+
* If provided, would render the Progressing component with given props instead of error icon
|
37
|
+
*/
|
38
|
+
progressingProps: ProgressingProps;
|
39
|
+
useInfoIcon?: never;
|
40
|
+
} | {
|
41
|
+
progressingProps?: never;
|
32
42
|
/**
|
33
43
|
* If true, info icon would be used instead of error
|
34
44
|
*
|
35
45
|
* @default false
|
36
46
|
*/
|
37
|
-
useInfoIcon
|
38
|
-
}
|
47
|
+
useInfoIcon: boolean;
|
48
|
+
} | {
|
49
|
+
progressingProps?: never;
|
50
|
+
useInfoIcon?: never;
|
51
|
+
});
|
@@ -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 @@
|
|
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 {};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ScanResultDTO, SeveritiesDTO, GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, VulnerabilityCountType } from './types';
|
2
2
|
import { SEVERITIES } from './constants';
|
3
3
|
export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
|
4
|
-
color: "var(--
|
5
|
-
label: "
|
4
|
+
color: "var(--G500)" | "var(--N300)" | "var(--R700)" | "var(--R500)" | "var(--O500)" | "var(--Y500)";
|
5
|
+
label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
|
6
6
|
value: number;
|
7
7
|
}[];
|
8
8
|
export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => string;
|
@@ -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;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { UnsavedChangesDialogProps } from './types';
|
2
|
-
declare const UnsavedChangesDialog: ({
|
2
|
+
declare const UnsavedChangesDialog: ({ handleClose, handleProceed }: UnsavedChangesDialogProps) => JSX.Element;
|
3
3
|
export default UnsavedChangesDialog;
|
@@ -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';
|
@@ -22,6 +22,20 @@ export interface MainContext {
|
|
22
22
|
};
|
23
23
|
isAirgapped: boolean;
|
24
24
|
isSuperAdmin: boolean;
|
25
|
+
featureGitOpsFlags: {
|
26
|
+
/**
|
27
|
+
* Would define whether gitops (Global config tab) feature is enabled or not
|
28
|
+
*/
|
29
|
+
isFeatureGitOpsEnabled: boolean;
|
30
|
+
/**
|
31
|
+
* Would define whether user can select allow custom repo in gitops global config
|
32
|
+
*/
|
33
|
+
isFeatureUserDefinedGitOpsEnabled: boolean;
|
34
|
+
/**
|
35
|
+
* Feature flag for Migrate to devtron from argo cd
|
36
|
+
*/
|
37
|
+
isFeatureArgoCdMigrationEnabled: boolean;
|
38
|
+
};
|
25
39
|
isManifestScanningEnabled: boolean;
|
26
40
|
}
|
27
41
|
export interface MainContextProviderProps {
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { GetPolicyApiUrlProps, GetResourceApiUrlProps } from './types';
|
1
|
+
import { EnvironmentDataValuesDTO, GetPolicyApiUrlProps, GetResourceApiUrlProps } from './types';
|
2
2
|
export declare const getResourceApiUrl: <T>({ baseUrl, kind, version, suffix, queryParams }: GetResourceApiUrlProps<T>) => string;
|
3
3
|
export declare const getPolicyApiUrl: <T>({ kind, version, queryParams, suffix }: GetPolicyApiUrlProps<T>) => string;
|
4
4
|
export declare const saveCDPipeline: (request: any) => Promise<import('../../Common').ResponseType<any>>;
|
5
|
+
export declare const getEnvironmentData: () => Promise<import('../../Common').ResponseType<EnvironmentDataValuesDTO>>;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { MainContext } from '../Providers';
|
1
2
|
import { getUrlWithSearchParams } from '../../Common';
|
2
3
|
import { PolicyKindType, ResourceKindType, ResourceVersionType } from '../types';
|
3
4
|
export interface ClusterType {
|
@@ -28,4 +29,9 @@ export interface GetResourceApiUrlProps<T> extends BaseGetApiUrlProps<T, Resourc
|
|
28
29
|
}
|
29
30
|
export interface GetPolicyApiUrlProps<T> extends Omit<BaseGetApiUrlProps<T, PolicyKindType, ResourceVersionType>, 'baseUrl'> {
|
30
31
|
}
|
32
|
+
export interface EnvironmentDataValuesDTO extends Pick<MainContext, 'featureGitOpsFlags'> {
|
33
|
+
isAirGapEnvironment: boolean;
|
34
|
+
isManifestScanningEnabled: boolean;
|
35
|
+
canOnlyViewPermittedEnvOrgLevel: boolean;
|
36
|
+
}
|
31
37
|
export {};
|