@devtron-labs/devtron-fe-common-lib 1.5.12-beta-2 → 1.5.12

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.
@@ -2,7 +2,7 @@ import { j as t, O as $ } from "./@vendor-CKSERKp7.js";
2
2
  import A, { forwardRef as E } from "react";
3
3
  import L, { getDefaultRegistry as D } from "@rjsf/core";
4
4
  import H from "@rjsf/validator-ajv8";
5
- import { T as v, c as U, a as k, i as J, b as w, d as S } from "./@code-editor-DIH_NWaK.js";
5
+ import { T as v, c as U, a as k, i as J, b as w, d as S } from "./@code-editor-CjWBvOC7.js";
6
6
  import M, { components as B } from "react-select";
7
7
  import { ReactComponent as W } from "./assets/ic-chevron-down.fc70d7a7.svg";
8
8
  import { getUiOptions as C, getTemplate as I, getSubmitButtonOptions as V, ADDITIONAL_PROPERTY_FLAG as P, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
@@ -1,7 +1,3 @@
1
1
  import { DeleteComponentProps } from './types';
2
- /**
3
- *
4
- * @deprecated Use DeleteConfirmationDialog instead
5
- */
6
2
  declare const DeleteComponent: ({ setDeleting, toggleConfirmation, deleteComponent, title, component, payload, confirmationDialogDescription, redirectTo, url, reload, configuration, closeCustomComponent, }: DeleteComponentProps) => JSX.Element;
7
3
  export default DeleteComponent;
@@ -1,9 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { DeleteDialogProps } from './Types';
3
- /**
4
- *
5
- * @deprecated Use DeleteConfirmationDialog instead
6
- */
7
3
  export declare const DeleteDialog: React.FC<DeleteDialogProps> & {
8
4
  Description?: React.FC<any>;
9
5
  };
@@ -1,6 +1,2 @@
1
1
  import { ForceDeleteDialogType } from './Types';
2
- /**
3
- *
4
- * @deprecated Use ForceConfirmationModal instead
5
- */
6
2
  export default function ForceDeleteDialog({ onClickDelete, closeDeleteModal, forceDeleteDialogTitle, forceDeleteDialogMessage, }: ForceDeleteDialogType): JSX.Element;
@@ -1,5 +1,2 @@
1
1
  export { default as ConfirmationModal } from './ConfirmationModal';
2
- export { DeleteConfirmationModal } from './DeleteConfirmationModal';
3
- export { ForceDeleteConfirmationModal } from './ForceDeleteConfirmationModal';
4
- export { CannotDeleteModal } from './CannotDeleteModal';
5
2
  export { ConfirmationModalVariantType, type ConfirmationModalProps } from './types';
@@ -32,109 +32,17 @@ 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
- */
42
35
  export type ConfirmationModalProps<isConfig extends boolean = false> = PropsWithChildren<{
43
- /**
44
- * Title of the confirmation modal.
45
- */
46
36
  title: string;
37
+ subtitle: ReactNode;
47
38
  /**
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.
54
39
  * @default true
55
40
  */
56
41
  shouldCloseOnEscape?: boolean;
57
- /**
58
- * Configuration object for confirmation behavior.
59
- */
60
42
  confirmationConfig?: ConfirmationConfigType;
61
43
  }> & ButtonConfigAndVariantType<isConfig> & (isConfig extends false ? {
62
- /**
63
- * Function to handle modal close action.
64
- * Accepts an optional SyntheticEvent.
65
- */
66
44
  handleClose: (e?: SyntheticEvent) => void;
67
- /**
68
- * Boolean flag to control the visibility of the confirmation modal.
69
- */
70
45
  showConfirmationModal: boolean;
71
46
  } : {});
72
47
  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 DeleteComponentModalProps 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
- isLoading?: 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
- handleError?: (error: any) => void;
116
- /**
117
- * Boolean to determine if event propagation should be stopped.
118
- */
119
- shouldStopPropagation?: boolean;
120
- /**
121
- * Boolean to disable the delete action.
122
- */
123
- disabled?: boolean;
124
- }
125
- /**
126
- * Props for the CannotDeleteModal component.
127
- * This interface extends selected properties from `DeleteComponentModalProps`
128
- * and `ConfirmationModalProps` to configure the "Cannot Delete" modal.
129
- */
130
- export interface CannotDeleteModalProps extends Partial<Pick<DeleteComponentModalProps, 'component' | 'closeConfirmationModal'>>, Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle'>> {
131
- showCannotDeleteDialogModal: boolean;
132
- }
133
- /**
134
- * Props for the ForceDeleteConfirmation component.
135
- * This interface extends selected properties from `DeleteComponentModalProps`
136
- * and `ConfirmationModalProps` to configure the force delete confirmation modal.
137
- */
138
- export interface ForceDeleteConfirmationProps extends Partial<Pick<DeleteComponentModalProps, 'onDelete' | 'showConfirmationModal' | 'closeConfirmationModal'>>, Partial<Pick<ConfirmationModalProps, 'title' | 'subtitle'>> {
139
- }
140
48
  export {};