@devtron-labs/devtron-fe-common-lib 1.7.4 → 1.7.5-beta-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.
- package/dist/{@code-editor-eNie_Z1c.js → @code-editor-DSKhPkHo.js} +4335 -4295
- package/dist/{@common-rjsf-CeBDaYTw.js → @common-rjsf-6TVYwyAe.js} +2 -2
- package/dist/{@framer-motion-C9i0O6dh.js → @framer-motion-BCnBBNCY.js} +1 -1
- package/dist/{@react-dates-DEMedmhG.js → @react-dates-B3W7S3ht.js} +20 -20
- package/dist/{@react-select-DD4GMsWv.js → @react-select-DSiYA_G3.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-BlYAzsAg.js → @react-virtualized-sticky-tree-DIgmxudW.js} +1 -1
- package/dist/{@vendor-CIA81cZg.js → @vendor-C7-HiwfO.js} +3676 -3715
- package/dist/Common/Constants.d.ts +1 -0
- package/dist/Common/SegmentedControl/SegmentedControl.component.d.ts +1 -1
- package/dist/Common/SegmentedControl/types.d.ts +4 -0
- 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/UnsavedChangesDialog/UnsavedChangesDialog.component.d.ts +1 -1
- package/dist/Shared/Components/UnsavedChangesDialog/types.d.ts +0 -1
- package/dist/Shared/Providers/types.d.ts +2 -0
- package/dist/Shared/Services/common.service.d.ts +3 -1
- package/dist/Shared/Services/constants.d.ts +1 -0
- package/dist/Shared/Services/types.d.ts +16 -1
- package/dist/Shared/types.d.ts +9 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +746 -741
- package/package.json +1 -1
@@ -1,3 +1,3 @@
|
|
1
1
|
import { SegmentedControlProps } from './types';
|
2
|
-
declare const SegmentedControl: ({ tabs, initialTab, onChange, tooltips, disabled, rootClassName, name, variant, size, }: SegmentedControlProps) => JSX.Element;
|
2
|
+
declare const SegmentedControl: ({ tabs, initialTab, onChange, tooltips, disabled, rootClassName, name, variant, size, isControlled, }: SegmentedControlProps) => JSX.Element;
|
3
3
|
export default SegmentedControl;
|
@@ -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 {};
|
@@ -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;
|
@@ -23,6 +23,8 @@ export interface MainContext {
|
|
23
23
|
isAirgapped: boolean;
|
24
24
|
isSuperAdmin: boolean;
|
25
25
|
isManifestScanningEnabled: boolean;
|
26
|
+
isOrgLevelRBACViewEnforced: boolean;
|
27
|
+
viewIsPipelineRBACConfiguredNode: ReactNode;
|
26
28
|
}
|
27
29
|
export interface MainContextProviderProps {
|
28
30
|
children: ReactNode;
|
@@ -1,4 +1,6 @@
|
|
1
|
-
import { GetPolicyApiUrlProps, GetResourceApiUrlProps } from './types';
|
1
|
+
import { GetPolicyApiUrlProps, GetResourceApiUrlProps, UserPreferencesType } 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 getUserPreferences: () => Promise<UserPreferencesType>;
|
6
|
+
export declare const updateUserPreferences: (updatedUserPreferences: UserPreferencesType, shouldThrowError?: boolean) => Promise<boolean>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const USER_PREFERENCES_ATTRIBUTE_KEY = "userPreferences";
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { getUrlWithSearchParams } from '../../Common';
|
2
|
-
import { PolicyKindType, ResourceKindType, ResourceVersionType } from '../types';
|
2
|
+
import { PolicyKindType, ResourceKindType, ResourceVersionType, ViewIsPipelineRBACConfiguredRadioTabs } from '../types';
|
3
|
+
import { USER_PREFERENCES_ATTRIBUTE_KEY } from './constants';
|
3
4
|
export interface ClusterType {
|
4
5
|
id: number;
|
5
6
|
name: string;
|
@@ -28,4 +29,18 @@ 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 GetUserPreferencesQueryParamsType {
|
33
|
+
key: typeof USER_PREFERENCES_ATTRIBUTE_KEY;
|
34
|
+
}
|
35
|
+
export interface GetUserPreferencesParsedDTO {
|
36
|
+
viewPermittedEnvOnly?: boolean;
|
37
|
+
}
|
38
|
+
export interface UpdateUserPreferencesParsedValueType extends GetUserPreferencesParsedDTO {
|
39
|
+
}
|
40
|
+
export interface UpdateUserPreferencesPayloadType extends Pick<GetUserPreferencesQueryParamsType, 'key'> {
|
41
|
+
value: string;
|
42
|
+
}
|
43
|
+
export interface UserPreferencesType {
|
44
|
+
pipelineRBACViewSelectedTab: ViewIsPipelineRBACConfiguredRadioTabs;
|
45
|
+
}
|
31
46
|
export {};
|
package/dist/Shared/types.d.ts
CHANGED
@@ -824,6 +824,15 @@ export declare const TriggerType: {
|
|
824
824
|
readonly Auto: "AUTOMATIC";
|
825
825
|
readonly Manual: "MANUAL";
|
826
826
|
};
|
827
|
+
export declare enum ViewIsPipelineRBACConfiguredRadioTabs {
|
828
|
+
ALL_ENVIRONMENTS = "All environments",
|
829
|
+
ACCESS_ONLY = "Access only"
|
830
|
+
}
|
831
|
+
export interface EnvironmentDataValuesDTO {
|
832
|
+
isAirGapEnvironment: boolean;
|
833
|
+
isManifestScanningEnabled: boolean;
|
834
|
+
canOnlyViewPermittedEnvOrgLevel: boolean;
|
835
|
+
}
|
827
836
|
export type ComponentLayoutType = 'row' | 'column';
|
828
837
|
export interface BorderConfigType {
|
829
838
|
/**
|
package/dist/index.d.ts
CHANGED
@@ -88,6 +88,11 @@ export interface customEnv {
|
|
88
88
|
* @default false
|
89
89
|
*/
|
90
90
|
FEATURE_EXPERIMENTAL_THEMING_ENABLE?: boolean;
|
91
|
+
/**
|
92
|
+
* If true, only pipelines to which the user has access will be shown across the application
|
93
|
+
* @default false
|
94
|
+
*/
|
95
|
+
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE?: boolean;
|
91
96
|
}
|
92
97
|
declare global {
|
93
98
|
interface Window {
|