@devtron-labs/devtron-fe-common-lib 1.6.7 → 1.6.9
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-CWv7Lu2E.js → @code-editor-BH51hfxq.js} +8006 -8018
- package/dist/{@common-rjsf-UP8mrsPh.js → @common-rjsf-BPr88OZb.js} +1 -1
- package/dist/Common/Constants.d.ts +0 -1
- package/dist/Common/Dialogs/index.d.ts +0 -2
- package/dist/Common/index.d.ts +0 -1
- package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +1 -1
- package/dist/Shared/Components/ConfirmationModal/CannotDeleteModal.d.ts +2 -0
- package/dist/Shared/Components/ConfirmationModal/DeleteConfirmationModal.d.ts +3 -0
- package/dist/Shared/Components/ConfirmationModal/ForceDeleteConfirmationModal.d.ts +2 -0
- package/dist/Shared/Components/ConfirmationModal/index.d.ts +3 -0
- package/dist/Shared/Components/ConfirmationModal/types.d.ts +89 -1
- package/dist/Shared/constants.d.ts +4 -0
- package/dist/index.js +653 -652
- package/package.json +1 -1
- package/dist/Common/DeleteComponentModal/DeleteComponent.d.ts +0 -3
- package/dist/Common/DeleteComponentModal/types.d.ts +0 -18
- package/dist/Common/Dialogs/DeleteDialog.d.ts +0 -5
- package/dist/Common/Dialogs/ForceDeleteDialog.d.ts +0 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
import { j as t, O as E } from "./@vendor-CWh7bjwl.js";
|
2
2
|
import P, { 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 T, d as S, S as M } from "./@code-editor-
|
4
|
+
import { T as v, c as H, a as U, i as k, b as T, d as S, S as M } from "./@code-editor-BH51hfxq.js";
|
5
5
|
import J, { components as C } from "react-select";
|
6
6
|
import { ReactComponent as V } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
7
7
|
import { getUiOptions as A, getTemplate as I, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as B, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
|
package/dist/Common/index.d.ts
CHANGED
@@ -31,7 +31,6 @@ export { default as Toggle } from './Toggle/Toggle';
|
|
31
31
|
export { default as StyledRadioGroup } from './RadioGroup/RadioGroup';
|
32
32
|
export * from './CIPipeline.Types';
|
33
33
|
export * from './Policy.Types';
|
34
|
-
export { default as DeleteComponent } from './DeleteComponentModal/DeleteComponent';
|
35
34
|
export * from './ImageTags';
|
36
35
|
export * from './ImageTags.Types';
|
37
36
|
export { default as DebouncedSearch } from './DebouncedSearch/DebouncedSearch';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { AppStatusDetailsChartType } from './types';
|
2
|
-
declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter,
|
2
|
+
declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter, handleOpenConfigDriftModal, onClose, }: AppStatusDetailsChartType) => JSX.Element;
|
3
3
|
export default AppStatusDetailsChart;
|
@@ -445,7 +445,7 @@ export interface DeploymentHistorySidebarType {
|
|
445
445
|
export interface AppStatusDetailsChartType {
|
446
446
|
filterRemoveHealth?: boolean;
|
447
447
|
showFooter: boolean;
|
448
|
-
|
448
|
+
handleOpenConfigDriftModal?: () => void;
|
449
449
|
onClose?: () => void;
|
450
450
|
}
|
451
451
|
export interface StatusFilterButtonType {
|
@@ -1,2 +1,5 @@
|
|
1
1
|
export { default as ConfirmationModal } from './ConfirmationModal';
|
2
|
+
export { DeleteConfirmationModal } from './DeleteConfirmationModal';
|
3
|
+
export { ForceDeleteConfirmationModal } from './ForceDeleteConfirmationModal';
|
4
|
+
export { CannotDeleteModal } from './CannotDeleteModal';
|
2
5
|
export { ConfirmationModalVariantType, type ConfirmationModalProps } from './types';
|
@@ -32,17 +32,105 @@ type ButtonConfigAndVariantType<isConfig extends boolean> = {
|
|
32
32
|
Icon: ReactElement;
|
33
33
|
buttonConfig: ButtonConfig<isConfig, true>;
|
34
34
|
};
|
35
|
+
/**
|
36
|
+
* Props for the ConfirmationModal component.
|
37
|
+
* Supports optional configuration mode with conditional properties.
|
38
|
+
*
|
39
|
+
* @template isConfig - Boolean flag to determine if configuration mode is enabled.
|
40
|
+
* When `false`, `handleClose` and `showConfirmationModal` are required.
|
41
|
+
*/
|
35
42
|
export type ConfirmationModalProps<isConfig extends boolean = false> = PropsWithChildren<{
|
43
|
+
/**
|
44
|
+
* Title of the confirmation modal.
|
45
|
+
*/
|
36
46
|
title: string;
|
37
|
-
subtitle: ReactNode;
|
38
47
|
/**
|
48
|
+
* Optional subtitle or additional description.
|
49
|
+
* Accepts ReactNode to support text or custom elements.
|
50
|
+
*/
|
51
|
+
subtitle?: ReactNode;
|
52
|
+
/**
|
53
|
+
* Determines if the modal should close when the Escape key is pressed.
|
39
54
|
* @default true
|
40
55
|
*/
|
41
56
|
shouldCloseOnEscape?: boolean;
|
57
|
+
/**
|
58
|
+
* Configuration object for confirmation behavior.
|
59
|
+
*/
|
42
60
|
confirmationConfig?: ConfirmationConfigType;
|
43
61
|
}> & ButtonConfigAndVariantType<isConfig> & (isConfig extends false ? {
|
62
|
+
/**
|
63
|
+
* Function to handle modal close action.
|
64
|
+
* Accepts an optional SyntheticEvent.
|
65
|
+
*/
|
44
66
|
handleClose: (e?: SyntheticEvent) => void;
|
67
|
+
/**
|
68
|
+
* Boolean flag to control the visibility of the confirmation modal.
|
69
|
+
*/
|
45
70
|
showConfirmationModal: boolean;
|
46
71
|
} : {});
|
47
72
|
export type ConfirmationModalBodyProps = Omit<ConfirmationModalProps, 'showConfirmationModal'>;
|
73
|
+
/**
|
74
|
+
* Props for the DeleteComponentModal component.
|
75
|
+
* This interface extends a subset of `ConfirmationModalProps` to configure
|
76
|
+
* the confirmation modal behavior and allows additional customization options.
|
77
|
+
*/
|
78
|
+
export interface DeleteConfirmationModalProps extends Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle' | 'showConfirmationModal' | 'children' | 'confirmationConfig'>> {
|
79
|
+
/**
|
80
|
+
* Function to close the confirmation modal.
|
81
|
+
*/
|
82
|
+
closeConfirmationModal: () => void;
|
83
|
+
/**
|
84
|
+
* Function to handle the delete action.
|
85
|
+
*/
|
86
|
+
onDelete: () => void;
|
87
|
+
/**
|
88
|
+
* Custom text for the primary action button. Default is "Delete".
|
89
|
+
*/
|
90
|
+
primaryButtonText?: string;
|
91
|
+
/**
|
92
|
+
* Name of the component being deleted.
|
93
|
+
*/
|
94
|
+
component?: string;
|
95
|
+
/**
|
96
|
+
* Custom success message displayed upon successful deletion.
|
97
|
+
*/
|
98
|
+
successToastMessage?: string;
|
99
|
+
/**
|
100
|
+
* Boolean indicating if the delete action is in progress.
|
101
|
+
*/
|
102
|
+
isDeleting?: boolean;
|
103
|
+
/**
|
104
|
+
* Custom ReactNode to render a subtitle when the component cannot be deleted.
|
105
|
+
*/
|
106
|
+
renderCannotDeleteConfirmationSubTitle?: ReactNode;
|
107
|
+
/**
|
108
|
+
* Error code that triggers the "Cannot Delete" dialog.
|
109
|
+
*/
|
110
|
+
errorCodeToShowCannotDeleteDialog?: number;
|
111
|
+
/**
|
112
|
+
*
|
113
|
+
* Function to handle error
|
114
|
+
*/
|
115
|
+
onError?: (error: any) => void;
|
116
|
+
/**
|
117
|
+
* Boolean to disable the delete action.
|
118
|
+
*/
|
119
|
+
disabled?: boolean;
|
120
|
+
}
|
121
|
+
/**
|
122
|
+
* Props for the CannotDeleteModal component.
|
123
|
+
* This interface extends selected properties from `DeleteConfirmationModalProps`
|
124
|
+
* and `ConfirmationModalProps` to configure the "Cannot Delete" modal.
|
125
|
+
*/
|
126
|
+
export interface CannotDeleteModalProps extends Partial<Pick<DeleteConfirmationModalProps, 'component' | 'closeConfirmationModal'>>, Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle'>> {
|
127
|
+
showCannotDeleteDialogModal: boolean;
|
128
|
+
}
|
129
|
+
/**
|
130
|
+
* Props for the ForceDeleteConfirmation component.
|
131
|
+
* This interface extends selected properties from `DeleteConfirmationModalProps`
|
132
|
+
* and `ConfirmationModalProps` to configure the force delete confirmation modal.
|
133
|
+
*/
|
134
|
+
export interface ForceDeleteConfirmationProps extends Partial<Pick<DeleteConfirmationModalProps, 'onDelete' | 'showConfirmationModal' | 'closeConfirmationModal'>>, Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle'>> {
|
135
|
+
}
|
48
136
|
export {};
|
@@ -427,3 +427,7 @@ export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
|
|
427
427
|
export declare const SKIP_LABEL_KEY_VALIDATION_PREFIX = "devtron.ai/";
|
428
428
|
export declare const UNSAVED_CHANGES_PROMPT_MESSAGE = "You have unsaved changes. Are you sure you want to leave?";
|
429
429
|
export declare const DEFAULT_ROUTE_PROMPT_MESSAGE = "Please don't wander off! Reloading or going back might disrupt the ongoing operation.";
|
430
|
+
export declare const DC_DELETE_SUBTITLES: {
|
431
|
+
DELETE_ENVIRONMENT_SUBTITLE: string;
|
432
|
+
DELETE_CLUSTER_SUBTITLES: string;
|
433
|
+
};
|